Feat/fleet init - #2
Merged
Merged
Conversation
The Claude Code skill shipped in 0.3.0, but installing it was a manual copy documented in the README, so the convention that makes Switchyard work usually never reached the agents that needed it. The tools report state; they cannot convey that checking belongs before the edit, and an agent that finds no spawn tool and was never told why falls back to a raw `git worktree add` — the untracked state this project exists to prevent. fleet init writes the exclude entry, a starter .fleetrc.json wired to the config schema, the skill into .claude/skills/, and a protocol block into AGENTS.md so agents that do not read Claude skills learn the convention too. Ownership decides overwrite behavior: .fleetrc.json is the user's file and needs --force, while the skill and the AGENTS.md block are package-managed and refresh on every run, making re-running init the upgrade path. Marker delimiters keep the AGENTS.md rewrite scoped to our own region; a broken marker pair is an error rather than a guess, since guessing where the user's content ends risks eating it. ensureFleetExcluded now reports whether it wrote, so init can tell "already ignored" from "just ignored it" instead of always claiming the former.
Records the reasoning the code cannot carry: why two hand-maintained texts beat one generated from the other, why AGENTS.md beats per-tool detection, and why claims are deferred a second time — they are advisory, so they only pay off once agents reliably follow the first convention, which is what init establishes. Also replaces the README's manual-copy instructions, which are now the thing init exists to remove.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughAdds ChangesFleet initialization
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant CLI
participant InitCommand
participant MutationLock
participant RepositoryFiles
participant ProtocolHelpers
CLI->>InitCommand: run fleet init with options
InitCommand->>MutationLock: acquire init lock
InitCommand->>RepositoryFiles: update exclude and config artifacts
InitCommand->>ProtocolHelpers: read packaged skill and upsert AGENTS.md block
ProtocolHelpers-->>InitCommand: initialized artifact content
InitCommand-->>CLI: return InitResult or JSON output
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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 by CodeRabbit
New Features
fleet initto set up repository configuration, agent guidance, and the packaged Claude Code skill.--forceand--jsonoptions for controlled overwrites and machine-readable results.Documentation