From 30caa1fd71428c77d83a9d7aba7c5284fbbd48d8 Mon Sep 17 00:00:00 2001 From: garrytan Date: Mon, 26 Oct 2026 14:15:50 +0000 Subject: [PATCH] feat(captain): AGENTS.md and NOTES.md templates, roles, ship lane sequence, owner device and lessons loop in docs/captain.md; owner-brief closes with the do-it reply Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- CHANGELOG.md | 5 +-- captain/SKILL.md | 5 ++- captain/SKILL.md.tmpl | 5 ++- captain/templates/AGENTS.md | 38 ++++++++++++++++++++ captain/templates/NOTES.md | 17 +++++++++ capy/skill/gstack/captain.md | 9 +++-- docs/captain.md | 70 ++++++++++++++++++++++++++++++++++-- lib/captain-brief.ts | 5 +-- test/captain-brief.test.ts | 3 +- test/captain-skill.test.ts | 2 +- 10 files changed, 147 insertions(+), 12 deletions(-) create mode 100644 captain/templates/AGENTS.md create mode 100644 captain/templates/NOTES.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 618d14bdd..60a8ad7d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,12 @@ ### Added - **`captain/SKILL.md.tmpl`**: the skill, tier 2, routed from the root router on "captain", "crew", "merge train", "call the slot", "validate this ready", "write the digest" and "flaky pass". -- **`captain/templates/`**: `CREW.md` (the 22 lane rules, parametrized), `DIGEST.md`, `flaky-ledger.md`, `report.md` (Outcome, PR, Needs, Cost, Lesson, Approvals), `READY.md` (the block, the optional lines, the refusal list), `slot-call.md`, `plan-ask.md`, `merge-ask.md` and `automation-flaky-pass.md` (the schedule, what it reads, what it starts). -- **`docs/captain.md`**: how a team sets up a Captain crew on Capy with gstack: the drive layout, the crew rules file, the READY contract, trains, approvals, the digest, the flaky pass, and the setup steps; linked from the README docs table, `docs/skills.md`, `docs/capy-install.md` and the skill. +- **`captain/templates/`**: `CREW.md` (the 22 lane rules, parametrized), `AGENTS.md` (the controller's standing rules with the owner's dated words), `NOTES.md` (the append-only timestamped log), `DIGEST.md`, `flaky-ledger.md`, `report.md` (Outcome, PR, Needs, Cost, Lesson, Approvals), `READY.md` (the block, the optional lines, the refusal list), `slot-call.md`, `plan-ask.md`, `merge-ask.md` and `automation-flaky-pass.md` (the schedule, what it reads, what it starts). +- **`docs/captain.md`**: how a team sets up a Captain crew on Capy with gstack: the roles, the drive layout, the crew rules file, the READY contract, the lane's /ship sequence before READY, trains with the slot-2 recipe, approvals, the digest, the flaky pass, the owner's device, the lessons loop, and the setup steps; linked from the README docs table, `docs/skills.md`, `docs/capy-install.md` and the skill. - **`test/captain-skill.test.ts`**: pins the contract the skill teaches, the template set, the generic wording (no crew codes, names or repository literals) and the registration points. ### Changed +- **`gstack-owner-brief render --captain`** closes "What we need from you" with the **do it** reply (every recommendation at full scope, the plan's follow-ons included, carried through with no further ask) and invites `rec` or `do it`; `capy/skill/gstack/captain.md` documents it as step 6 and points at the controller's side. - `README.md` (power tools), `AGENTS.md`, `docs/skills.md`, `docs/PROJECT_STRUCTURE.md`, the root router and the doctor component table register the skill; `test/fixtures/context-budget.json` gains the `captain` ceiling and the router's, grown by its one new rule; `test/catalog-budget.test.ts` and `CLAUDE.md` carry the catalog ceiling the new skill ratchets to. ## [1.91.248.0] - 2026-10-26 diff --git a/captain/SKILL.md b/captain/SKILL.md index cfc00f340..f9e2a711f 100644 --- a/captain/SKILL.md +++ b/captain/SKILL.md @@ -629,7 +629,10 @@ occurrence escalates. Every rerun's spend is reported. A lane that finishes writes `reports/.md` (`captain/templates/report.md`): Outcome, PR (number, head, version, checks), Needs (what the owner must do), Cost, Lesson, and -the Approvals table. The controller reads reports before it reads chat. +the Approvals table. The controller reads reports before it reads chat, and turns every +Lesson into a rule in the rules file, a line in the standing-rules file +(`captain/templates/AGENTS.md`), or a filed tool fix. The controller's own log is +append-only and timestamped (`captain/templates/NOTES.md`); the digest is derived from it. Serial slots cost tens of minutes each, so small fixes in one area travel together: when a lane's diff is small and open PRs touch the same area, fold them into one wave PR with diff --git a/captain/SKILL.md.tmpl b/captain/SKILL.md.tmpl index 3ec377fe9..15f998e3d 100644 --- a/captain/SKILL.md.tmpl +++ b/captain/SKILL.md.tmpl @@ -307,7 +307,10 @@ occurrence escalates. Every rerun's spend is reported. A lane that finishes writes `reports/.md` (`captain/templates/report.md`): Outcome, PR (number, head, version, checks), Needs (what the owner must do), Cost, Lesson, and -the Approvals table. The controller reads reports before it reads chat. +the Approvals table. The controller reads reports before it reads chat, and turns every +Lesson into a rule in the rules file, a line in the standing-rules file +(`captain/templates/AGENTS.md`), or a filed tool fix. The controller's own log is +append-only and timestamped (`captain/templates/NOTES.md`); the digest is derived from it. Serial slots cost tens of minutes each, so small fixes in one area travel together: when a lane's diff is small and open PRs touch the same area, fold them into one wave PR with diff --git a/captain/templates/AGENTS.md b/captain/templates/AGENTS.md new file mode 100644 index 000000000..b9c09f064 --- /dev/null +++ b/captain/templates/AGENTS.md @@ -0,0 +1,38 @@ +# standing rules + +The controller's own file. Scope instructions: every thread in the crew reads it. Each +rule that came from the owner keeps the date and the exact words, so lanes can cite it as +a standing approval instead of asking again. Append; never rewrite an owner's words. + +## Mandate (, ) +"" + +- Every -* thread in is in the crew. New threads the owner starts + are added too. +- Watch issues and PRs. Start lanes for severe user-reported bugs no live thread + has claimed (the severity bar is below). +- Severity first: S1 is a broken install or upgrade, data loss, a security result that is + wrong, or `BASE` red. S2 is a broken workflow with no workaround. Everything else is + batched. + +## Merging (, : "") +- One controller merges, through a train (`/captain`, the merge-train section). Lanes send + READY and never merge. Standing approval to merge when green: "". +- A merge outside a train costs a backstop gate; none without the owner's words. + +## Spend (, : "") +- Pre-approved: train gates, bisects, the backstop, screens, focused paid cases. Cap per + rerun: . Over the cap is a fresh ask. + +## Asks to the owner (, : "") +- Plain language, each option with what it is, why it matters, what each answer does and + the cost. The recommended one-word reply is the default. Every ask ends with "do it": + every recommendation at full scope, follow-ons included, no further ask. + +## Parallelism (, : "") +- Keep about lanes working on disjoint files whenever there is backlog. Serial steps + stay serial only where the tooling requires it: one train's slots, version stamps, edits + to a shared file. + +## Decisions log +-