Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ cargo run -p kild -- complete my-branch # Complete kild (PR clean
- `crates/kild-paths` - Centralized path construction for ~/.kild/ directory layout (KildPaths struct with typed methods for all paths including `tls_cert_path()` and `tls_key_path()` for daemon TLS certs, and `fleet_dir()`, `fleet_project_dir()`, `fleet_dropbox_dir()` for fleet dropbox paths). Single source of truth for KILD filesystem layout.
- `crates/kild-config` - TOML configuration types, loading, validation, and keybindings for ~/.kild/config.toml. Depends only on kild-paths and kild-protocol. Single source of truth for all KildConfig/Config/Keybindings types. Extracted from kild-core to enable fast incremental compilation of config-only changes.
- `crates/kild-protocol` - Shared IPC protocol types (ClientMessage, DaemonMessage, DaemonSessionStatus, SessionStatus, ErrorCode), domain newtypes (SessionId, BranchName, ProjectId), and serde-only domain enums (ForgeType). Also provides `IpcConnection` for JSONL-over-Unix-socket-or-TCP/TLS client used by both kild-core and kild-tmux-shim with connection health checking via `is_alive()` and TLS variant via `connect_tls()`, and `AsyncIpcClient<R, W>` — a generic async JSONL client over any `AsyncBufRead + AsyncWrite` pair used by kild-ui. Also provides `pool` module with `take(socket_path)` and `release(conn)` functions — shared thread-local `IpcConnection` pool used by both kild-core and kild-tmux-shim. All public enums are `#[non_exhaustive]` for forward compatibility. Newtypes defined via `newtype_string!` macro for compile-time type safety. Deps: serde, serde_json, futures (tempfile, smol for tests). No tokio, no kild-core. Single source of truth for daemon wire format and IPC client.
- `crates/kild-git` - Git worktree naming, health, project queries, and CLI helpers. `naming.rs` is the single source of truth for `KILD_BRANCH_PREFIX`, `kild_branch_name()`, and `kild_worktree_admin_name()`. Consumed by kild-core, kild-ui, and kild-tmux-shim.
- `crates/kild-core` - Core library with all business logic, no CLI dependencies
- `crates/kild` - Thin CLI that consumes kild-core (clap for arg parsing, color.rs for Tallinn Night palette output)
- `crates/kild-daemon` - Standalone daemon binary for PTY management (async tokio server, JSONL IPC protocol, portable-pty integration). CLI spawns this as subprocess. Wire types re-exported from kild-protocol. Optionally binds a TLS-wrapped TCP listener (`bind_tcp`) alongside the Unix socket for remote access; self-signed cert auto-generated at `~/.kild/certs/` on first start.
Expand All @@ -148,7 +149,7 @@ cargo run -p kild -- complete my-branch # Complete kild (PR clean
- `agents/` - Agent backend system (amp, claude, kiro, gemini, codex, opencode, resume.rs for session continuity)
- `daemon/` - Daemon client for IPC communication with auto-start logic (discovers kild-daemon binary as sibling executable). Connection pooling delegates to `kild_protocol::pool`. `tofu.rs` implements SHA-256 TOFU fingerprint verification for remote TCP/TLS connections. `mod.rs` exposes `set_remote_override()` for `--remote` CLI flag to route connections via TCP/TLS without touching handler signatures.
- `editor/` - Editor backend system (Zed, VS Code, Vim, generic fallback) with registry.rs for detection and resolution chain (CLI > config > $VISUAL > $EDITOR > OS default via duti/xdg-mime > PATH scan)
- `git/` - Git worktree operations via git2
- `git/` - Git worktree operations via git2 (overlaps, removals, CLI shelling). Naming utilities (`kild_branch_name`, `KILD_BRANCH_PREFIX`) live in the separate `kild-git` crate.
- `forge/` - Forge backend system (GitHub, future: GitLab, Bitbucket, Gitea) for PR operations
- `config/` - REMOVED (moved to kild-config crate). kild-core re-exports all types from kild-config.
- `projects/` - Project management (types, validation, persistence, manager)
Expand Down
4 changes: 2 additions & 2 deletions crates/kild-core/src/cleanup/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,8 +1007,8 @@ mod tests {

git::test_support::init_repo_with_commit(repo_dir.path()).unwrap();

let branch_name = format!("kild/{branch_suffix}");
let admin_name = format!("kild-{branch_suffix}");
let branch_name = git::naming::kild_branch_name(branch_suffix);
let admin_name = git::naming::kild_worktree_admin_name(branch_suffix);
git::test_support::create_branch(repo_dir.path(), &branch_name).unwrap();

let worktree_path = worktree_base.path().join(&admin_name);
Expand Down
2 changes: 1 addition & 1 deletion crates/kild-core/src/git/overlaps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ mod tests {
.current_dir(dir)
.output()
.unwrap();
let kild_branch = format!("kild/{}", branch);
let kild_branch = crate::git::naming::kild_branch_name(branch);
Command::new("git")
.args(["checkout", "-b", &kild_branch])
.current_dir(dir)
Expand Down
Loading
Loading