refactor(fleet): replace dropbox protocol with universal inbox#637
Merged
refactor(fleet): replace dropbox protocol with universal inbox#637
Conversation
Remove the complex dropbox messaging system (task IDs, history.jsonl, flock locking, ack files) in favor of a simpler file-based inbox protocol at ~/.kild/inbox/<project_id>/<branch>/. Key changes: - Delete dropbox.rs (2,100 lines) and its CLI commands (check-queue, report) - Add inbox.rs with streamlined read_inbox_state() and generate_prime_context() - Extract fleet instruction generation into fleet_instructions.rs - Simplify Claude hooks: remove Stop prompt hook, SessionStart auto-prime, check-queue from TeammateIdle, and report from TaskCompleted - Rewrite inbox/inject/prime CLI commands for the new protocol - Add inbox path helpers to kild-paths
Owner
Author
PR Review Summary — 5 Specialized AgentsCritical Issues (3 found)
Important Issues (5 found)
Suggestions (6 found)
Documentation Issues
Strengths
Type Design Scores
VerdictNEEDS FIXES — 3 critical issues (brain task clobber, empty fleet JSON, silent prime errors) must be addressed before merge. The 5 important issues should also be fixed. The refactoring direction is excellent and the simplification is well-motivated. Recommended Actions
|
Critical fixes:
- Remove write_task("honryu",...) from forward_to_brain that clobbered
the brain's task.md on every worker Stop event
- Populate fleet entries in kild prime --json (was always empty vec)
- Surface errors in handle_all_prime (was silently returning Ok)
Error handling fixes:
- Narrow status file read to only swallow NotFound, warn on other I/O errors
- Await spawn_blocking JoinHandle in forward_to_brain to catch panics
- Add eprintln for inbox status init failure (was warn-only)
Simplification:
- Remove unused _is_brain parameter from ensure_inbox
- Flatten write_task return from Result<Option<()>> to Result<bool>
- Extract build_fleet_entries() and render_fleet_table() helpers
- Merge _resolved wrappers into primary read_inbox_state/generate_prime_context
- Extract write_fleet_instructions_to() shared helper
- Warn on corrupt fleet instruction markers (begin without end)
Docs:
- Fix README.md stale dropbox references and removed --task/--report/--status flags
- Fix wave planner skill referencing deleted dropbox.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the complex dropbox messaging system (2,100 lines with task IDs, history.jsonl, flock locking, ack files) with a simpler file-based inbox protocol at
~/.kild/inbox/<project_id>/<branch>/. Net deletion of ~2,100 lines.Changes
dropbox.rsand its CLI commands (check-queue,report)inbox.rswith streamlinedread_inbox_state()andgenerate_prime_context()fleet_instructions.rsinbox/inject/primeCLI commands for the new protocolkild-pathsFiles Changed
30 files changed
File list
.claude/agents/kild-brain.md.claude/skills/kild/SKILL.mdCLAUDE.mdcrates/kild-core/src/agents/mod.rscrates/kild-core/src/agents/registry.rscrates/kild-core/src/agents/types.rscrates/kild-core/src/sessions/create.rscrates/kild-core/src/sessions/daemon_request.rscrates/kild-core/src/sessions/daemon_spawn.rscrates/kild-core/src/sessions/destroy.rscrates/kild-core/src/sessions/dropbox.rs(deleted)crates/kild-core/src/sessions/fleet.rscrates/kild-core/src/sessions/inbox.rs(new)crates/kild-core/src/sessions/integrations/claude.rscrates/kild-core/src/sessions/integrations/fleet_instructions.rs(new)crates/kild-core/src/sessions/integrations/mod.rscrates/kild-core/src/sessions/mod.rscrates/kild-core/src/sessions/open.rscrates/kild-daemon/src/hooks/mod.rscrates/kild-paths/src/lib.rscrates/kild/src/app/daemon.rscrates/kild/src/app/misc.rscrates/kild/src/app/mod.rscrates/kild/src/app/tests.rscrates/kild/src/commands/check_queue.rs(deleted)crates/kild/src/commands/inbox.rscrates/kild/src/commands/inject.rscrates/kild/src/commands/mod.rscrates/kild/src/commands/prime.rscrates/kild/src/commands/report.rs(deleted)Testing
cargo fmt --checkpassescargo clippy --all -- -D warningspassescargo test --allpassescargo build --allpasses