mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 06:24:41 +01:00
feat(ship): version-less repos, docs-audit record and caps, the frozen-scope paid case, and the review-loop follow-ups
Follow-up to the review-loop convergence PR: Step 12 and the CHANGELOG step skip cleanly in a repository with no version source (receipt version "none"); the receipt records the docs audit outcome and the owner exception (DOCS_AUDIT_BLOCKED without one) and a policy may declare doc caps (gstack-ship-receipt docs-caps); docs/unattended.md names the READY evidence and the cross-family outside voice; the ship-frozen-scope-convergence behaviour case runs the generated Step 9.4 under review_scope frozen through the real binaries; carry probes git >= 2.39 (RECEIPT_GIT_TOO_OLD); defer passes the repository to gh repo view positionally and names its search limit; late defers count without being passes; reviewers diff from RANGE_BASE on pass 2+; the cap check runs before edits; --review-fanout batches specialists by free slots; read --check-prose compares quoted counters with the receipt (RECEIPT_PROSE_MISMATCH); checklist rule ids prereg-with-results and test-keyboard-count-loop; gstack-coauthor-trailers. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
576839cb8c
commit
2d73fadd56
47 files changed
+1909
-155
No files matched your search
@@ -88,13 +88,29 @@ Print the selection:
|
||||
"Dispatching N specialists: [names]. Skipped: [names] (scope not detected). Gated: [names] (0 findings in N+ reviews)."`;
|
||||
}
|
||||
|
||||
/** The diff command every dispatched reviewer runs: in /ship, pass 2+ reads the range since the previous pass (RANGE_BASE), never the whole branch again. */
|
||||
function diffBase(ctx: TemplateContext): string {
|
||||
return ctx.skillName === 'ship' ? 'DIFF_BASE=${RANGE_BASE:-$(git merge-base origin/<base> HEAD)}' : 'DIFF_BASE=$(git merge-base origin/<base> HEAD)';
|
||||
}
|
||||
|
||||
function generateSpecialistDispatch(ctx: TemplateContext): string {
|
||||
return `### Dispatch specialists in parallel
|
||||
|
||||
For each selected specialist, launch an independent subagent via the Agent tool.
|
||||
**Launch ALL selected specialists in a single message** (multiple Agent tool calls)
|
||||
so they run in parallel. Each subagent has fresh context — no prior review bias.
|
||||
|
||||
${ctx.skillName === 'ship' ? `
|
||||
**Fan-out (\`--review-fanout auto|serial|parallel\` in the prompt; default \`auto\`).**
|
||||
Under \`auto\`, when the host reports fewer free subagent slots than selected
|
||||
specialists (Capy caps a thread at 8 running subagents, and waiting or idle ones hold
|
||||
a slot), dispatch in batches of the free-slot count, at least one per batch, each
|
||||
batch in one message, and start the next batch only after every reader of the
|
||||
previous one has finished or is confirmed stopped; print \`Fan-out: N specialists in
|
||||
M batches of K\`. A host that reports no slot count runs one parallel batch.
|
||||
\`serial\` is batches of one; \`parallel\` is one batch regardless of slots (a refused
|
||||
launch is a failed reader, never silently dropped coverage). Batching changes the
|
||||
order, never the set: every selected specialist still runs before Step 9.2 merges.
|
||||
` : ''}
|
||||
**Each specialist subagent prompt:**
|
||||
|
||||
Each specialist prompt includes:
|
||||
@@ -118,7 +134,7 @@ Every other specialist, including Testing, reads the full diff with fixtures.
|
||||
5. Instructions:
|
||||
|
||||
"You are a specialist code reviewer. Read the checklist at {checklist path}, then run
|
||||
\`DIFF_BASE=$(git merge-base origin/<base> HEAD) && git diff "$DIFF_BASE"\` to get the full diff. Apply the checklist against the diff.
|
||||
\`${diffBase(ctx)} && git diff "$DIFF_BASE"\` to get the ${ctx.skillName === 'ship' ? 'diff (the whole branch on pass 1; from pass 2 on, RANGE_BASE is set and the diff is the range since the previous pass)' : 'full diff'}. Apply the checklist against the diff.
|
||||
|
||||
\`NO FINDINGS\` alone is the expected, complete result for a clean diff; never invent an item to show work. Otherwise output one JSON object per finding, on its own line:
|
||||
{\\"severity\\":\\"CRITICAL|INFORMATIONAL\\",\\"confidence\\":N,\\"path\\":\\"file\\",\\"line\\":N,\\"category\\":\\"category\\",\\"summary\\":\\"description\\",\\"fix\\":\\"recommended fix\\",\\"fingerprint\\":\\"path:line:category\\",\\"specialist\\":\\"name\\"}
|
||||
@@ -297,7 +313,7 @@ The Red Team subagent receives:
|
||||
|
||||
Prompt, after the defensive framing and fixture handling from item 4 of the specialist dispatch: "You are a red team reviewer. The code has already been reviewed by N specialists
|
||||
who found the following issues: {merged findings summary}. Your job is to find what they
|
||||
MISSED. Read the checklist at {red-team checklist path}, list changed files with \`DIFF_BASE=$(git merge-base origin/<base> HEAD) && git diff --name-status "$DIFF_BASE"\`, read them as that fixture handling says, and look for gaps.
|
||||
MISSED. Read the checklist at {red-team checklist path}, list changed files with \`${diffBase(ctx)} && git diff --name-status "$DIFF_BASE"\`, read them as that fixture handling says, and look for gaps.
|
||||
Output findings as JSON objects (same schema as the specialists), or \`NO FINDINGS\` alone, the expected result when they missed nothing. Focus on cross-cutting
|
||||
concerns, integration boundary issues, and failure modes that specialist checklists
|
||||
don't cover."
|
||||
|
||||
Reference in new issue
Block a user