feat(brief): add standing CodeGraph usage contract to ship and scout scaffolds - #11
Merged
Conversation
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.
What
Adds a standing CodeGraph usage contract to the crewmate/scout brief scaffold in
bin/fm-brief.sh, so every firstmate-spawned worker uses CodeGraph consistently across all projects.The new
# CodeGraph usage contractsection appears in both ship and scout scaffolds (not secondmate charters) with five points:codegraph statusin the worktree;codegraph initif.codegraph/is absent,codegraph syncif present.codegraph explore|node|callers|callees|impactinstead of grep.codegraph syncafter each edit batch - the index does not follow edits and silently goes stale; a staleNo results foundis NOT proof code is absent.codegraph affectedon changed files to select which tests to run.docs/agents/codegraph/README.md(created lazily), keeping anAGENTS.mdpointer viabin/fm-ensure-agents-md.sh.The section never assumes codegraph is installed: when the binary is missing, the worker appends a one-line status note and continues with ordinary tools.
Scope
bin/fm-brief.sh: shared section builder (printf-based, Bash 3.2 parse-safe, guarded by the existing structural test), rendered into ship and scout heredocs.tests/fm-brief.test.sh: newtest_codegraph_contract_in_ship_and_scout_briefscovering all five points on both variants plus the absent-binary note and the charter exclusion.Out of scope per task: MCP server installation, fm-spawn/fm-control changes, per-project AGENTS.md edits.
Verification
bash tests/fm-brief.test.sh: all pass including the new test.bin/fm-lint.sh: shellcheck 0.11.0 clean, actionlint clean.bin/fm-doc-audience-check.sh: ok.fm-secondmate-safety,fm-tangle-guard,fm-subagent-pretool-check,fm-ask-user-authority) pass.tests/fm-voice-relay.test.shhas one pre-existing failure ("note should not need any configuration", sed error on a temp path) that reproduces identically on the clean base branch, unrelated to this change.