Repository navigation
docs(agents): split AGENTS.md into lean core plus on-demand skill branches - #1
Merged
Merged
Conversation
…ranches Restructure the 886-line always-loaded AGENTS.md into a ~150-content-line core (prime directives, session-start/intake/supervision/delivery spines, captain etiquette, X-mode gate, expanded trigger-router) plus seven new agent-only branch skills loaded at mechanical triggers: fm-session-start, fm-dispatch, fm-project-setup, fm-brief, fm-backlog, fm-supervise-depth, fm-deliver. fmx-respond gains the X-mode image/length/dry-run details the old section 14 carried that it lacked. bin comments that named old AGENTS.md sections now name the skills. docs/agents-md-restructure-audit.md maps every removed line to its destination (kept invariant, branch skill, or deliberate drop with reason) and records the trigger-router reconciliation against the session-1 v1 draft.
… split skills; re-key audit
…rvise-depth router row
…ise-depth description
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.
Intent
Captain-approved firstmate documentation restructure: split the always-loaded AGENTS.md into a ~150-content-line core plus on-demand agent-only skill branches per the settled design in data/revive-doc-restructure/report.md and data/scout-doc-web-tree/report.md. The core keeps every universal invariant (all 5 prime directives, captain etiquette, lifecycle spine, supervision invariant, delivery modes + yolo, X-mode gate, expanded trigger-router); depth moved near-verbatim to seven new fm- prefixed skills (fm-session-start, fm-dispatch, fm-project-setup, fm-brief, fm-backlog, fm-supervise-depth, fm-deliver); fmx-respond gained the X-mode image/length/dry-run details it lacked; bin/ comment changes only retarget old section references to skill names. docs/agents-md-restructure-audit.md is the captain's acceptance-test evidence mapping every removed line to its destination. This head (dbbc257) already passed review, document, and lint in the previous run: review rounds applied and verified the kunchenguid#183 runtime-backend re-sync, the kunchenguid#186 herdr re-sync, the kunchenguid#188 auto-detection re-sync, the check.sh authoring-contract pointer at fm-deliver's PR-ready section (explicit firstmate gate decision), and the captain's explicit decision to drop the dead state/.subsuper-inject-wedged sub-trigger from the fm-supervise-depth router row because the afk row covers that marker; multiple full content-preservation sweeps found no contradictions and no narrowed triggers. The previous run failed only at push with a 403: origin pointed at kunchenguid/firstmate which this machine's landontu credential cannot push to; the captain has since forked the repo and origin now points at https://github.com/landontu/firstmate (verified pushable; gate remote refreshed via no-mistakes init). The PR should be opened on that fork and is HELD for captain review after checks are green - never self-merged. THE TEST STEP IS DELIBERATELY SKIPPED with cause: the gate's local test execution reproducibly deadlocks (three runs) - tests/fm-bootstrap.test.sh runs bin/fm-bootstrap.sh whose 'no-mistakes --version' probe hangs when invoked as a descendant of the no-mistakes daemon step executor (verified stuck process trees; the probe returns instantly from a normal shell), surfacing as 'daemon crashed during execution'. The identical suite ran locally in this worktree: 26/26 executed, 25 pass, the single failure being tests/fm-x-mode.test.sh requiring jq which is not installed locally - unrelated to this docs-only diff. GitHub CI (.github/workflows/ci.yml) runs shellcheck plus this exact behavior test suite on the PR, where the no-mistakes binary is absent so the probe short-circuits. Skill bodies duplicating a compressed core line is intentional belt-and-suspenders redundancy per the spec.
What Changed
AGENTS.md(~940 lines removed) into a lean core carrying the universal invariants — all five prime directives, captain etiquette, lifecycle spine, supervision invariant, delivery modes plus yolo, X-mode gate, and an expanded trigger-router — with depth moved near-verbatim into seven new on-demand skill branches:fm-session-start,fm-dispatch,fm-project-setup,fm-brief,fm-backlog,fm-supervise-depth, andfm-deliver.fmx-respond/SKILL.mdwith the X-mode image/length/dry-run handling it previously lacked, and retargeted stale section references inbin/comments (spawn, backend, bootstrap, brief, ff-lib, merge-local, supervise-daemon, tmux backend) plusREADME.mdanddocs/to point at the new skill names.docs/agents-md-restructure-audit.mdmapping every removed AGENTS.md line to its destination, and trimmed a deadstate/.subsuper-inject-wedgedmarker route from thefm-supervise-depthrouter row and description since the afk row already owns that marker.Risk Assessment
✅ Low: Docs-only restructure of AGENTS.md into on-demand skills with bin/ comment retargets; all cross-references resolve to existing skills, the new fmx-respond text accurately matches the unchanged X-mode scripts, and the sole prior-round finding is applied.
Testing
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
.agents/skills/fm-supervise-depth/SKILL.md:3- fm-supervise-depth/SKILL.md frontmatterdescription:still lists "a state/.subsuper-inject-wedged marker" as a load trigger, contradicting commit dbbc257 which deliberately dropped that dead route from the AGENTS.md section-9 router row. The skill description is the load-trigger surface shown in the skill index, and this skill's body carries no guidance on the marker (the afk skill owns it, and the afk router row already routesany state/.subsuper-* marker → afk). An agent seeing the marker could load fm-supervise-depth — the exact dead route the commit removed. Drop the marker phrase from this description to match the router decision.🔧 Fix: drop dead subsuper marker trigger from fm-supervise-depth description
✅ Re-checked - no issues remain.
⏭️ **Test** - skipped
Step was skipped.
✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Line-audit summary (acceptance test: every deleted line lands in a branch OR is a kept invariant)
The full line-by-line audit is committed in this PR at
docs/agents-md-restructure-audit.md, mapping every removed AGENTS.md line range → its destination (kept in core / named skill / deliberate drop with reason).fm-session-start(layout/state reference, bootstrap + diagnostic catalog, recovery, X-mode activation/cadence),fm-dispatch(intake, secondmate routing, dispatch profiles, spawn mechanics),fm-project-setup,fm-brief,fm-backlog,fm-supervise-depth(wake triage, guard beacon, tangle guard),fm-deliver(per-mode delivery, landed definition, sanctioned-write exception catalog, teardown/scout/promotion).fmx-respondgained the old §14 details it lacked (--imagecontract, length knobs, dry-run markers,connector/followupendpoint).secondmate-provisioningcontents list; afk's "refresh flag" / "bias toward exit" lines) — documented with reasons in the audit.state/.subsuper-inject-wedgedsub-trigger was removed from thefm-supervise-depthrow as a dead route (theafkrow already owns that marker).Verification note
The gate's local test step was skipped with cause (its
no-mistakes --versionprobe deadlocks under the daemon's step executor; documented in the run intent). Compensating verification run directly in the worktree at this PR's exact head:bash -non everybin/,bin/backends/, andtests/script (clean) and the fulltests/*.test.shbehavior suite. Suite result: 23/26 pass; the 3 failures are all environmental and were verified to reproduce identically on pristine upstream main (30a89bc) in the same environment —fm-x-mode.test.sh(requiresjq, not installed on this machine),fm-backend-herdr.test.sh(needs a live herdr workspace), andfm-teardown.test.shcontent-landed case — i.e. none are caused by this branch, whose delta is docs and bin comments only.shellcheckis not installed on this machine, and this fork has no GitHub Actions enabled, so the PR shows no CI checks; upstream CI (shellcheck + this suite on ubuntu) will run when this lands there.