mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-31 14:06:50 +01:00
* fix(plan-eng-review): define the three references its judged text left dangling (GSTA-91) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore: ship coverage test, unattended doc and CHANGELOG for review fixes test/plan-reality.test.ts asserts each phase's gstack-plan-reality check line names PLAN_REALITY (Step 7 gap). docs/unattended.md names the unattended-session block the skill prose now cites (Step 14.5 audit). CHANGELOG [Unreleased] covers the hook pointer fix and the new tests. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(changelog): drop the hook directive claim (GSTA-91) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: keep destructive options pending in the unattended AUQ fallback (GSTA-91) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: trim the unattended pointers so every size pin goes down (GSTA-91) The failure fallback's unattended branch now says a consent, destructive or irreversible option, unrecommended question or approval gate stays pending, keeping the carve-out. Item 1 drops its dangling '(per its printed unattended-session block)' pointer. CQ3 now asserts no section or block pointer remains in item 1; CQ4 is retitled to the block and hook; the plan-reality pointer loop drops devex, which renders no reality rows. Every host and the /ship goldens are regenerated and all 89 pins go down versus4814b3d8a(78 by 62, 11 by 38). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(unattended): drop the claim that skill prose cites the block id (GSTA-91) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: item 1 names destructive or irreversible options as pending in unattended runs (GSTA-91) Dropping item 1's block pointer also dropped its only route to the printed block's destructive/irreversible carve-out. Item 1 now lists them in its unattended pending set, matching the failure-fallback branch, the hook and the printed block; the shared Exception is unchanged. CQ3 requires destructive and irreversible. Regenerated every host and the /ship goldens; every pin still goes down versus4814b3d8a(78 by 32, 11 by 8). Includes the /ship Step 7 test that docs/unattended.md names the printed block header and END. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
65 lines
3.4 KiB
TypeScript
65 lines
3.4 KiB
TypeScript
/**
|
|
* Plan reality rows (multi-agent wave D1, release promise P5).
|
|
*
|
|
* {{PLAN_REALITY_ROWS}} and its variants render lib/plan-reality.ts's one row
|
|
* table into the plan-review skills and the autoplan phase files, so the rows a
|
|
* review must carry, the `REALITY:` line a reviewer emits and the check a
|
|
* parent runs never drift apart:
|
|
*
|
|
* {{PLAN_REALITY_ROWS:eng}} / {{PLAN_REALITY_ROWS:ceo}}
|
|
* the operative block for an interactive plan review (tier 1 row ids, the
|
|
* bin that prints every applicable row, the line grammar, the miss rule)
|
|
* {{PLAN_REALITY_ROWS:deep}}
|
|
* the full table with each row's incident note, for the deep section
|
|
* {{PLAN_REALITY_ROWS:autoplan:<phase>}}
|
|
* one checklist item for an autoplan phase file
|
|
* {{PLAN_REALITY_ROWS:pregate}}
|
|
* the Pre-Gate rule: unattended a miss is `incomplete`, never a warning
|
|
* {{PLAN_REALITY_ROWS:summary}}
|
|
* the Completion Summary line
|
|
*
|
|
* The rows themselves are printed by `gstack-plan-reality rows` at run time so
|
|
* the zero-headroom skills carry the contract, not eighteen rows of prose.
|
|
*/
|
|
import type { TemplateContext } from './types';
|
|
import { REALITY_LINE_SHAPE, REALITY_ROWS, TIER1_ROW_IDS, renderIncidentTable } from '../../lib/plan-reality';
|
|
|
|
const BIN = '~/.claude/skills/gstack/bin/gstack-plan-reality';
|
|
|
|
function phaseFor(ctx: TemplateContext, arg: string | undefined): string {
|
|
if (arg && arg !== 'deep' && arg !== 'summary' && arg !== 'pregate' && arg !== 'autoplan') return arg;
|
|
const m = /^plan-(ceo|eng|devex|design)-review$/.exec(ctx.skillName);
|
|
return m ? (m[1] === 'devex' ? 'dx' : m[1]) : 'eng';
|
|
}
|
|
|
|
export function generatePlanRealityRows(ctx: TemplateContext, args?: string[]): string {
|
|
const mode = args?.[0];
|
|
if (mode === 'deep') {
|
|
return `### Reality rows (why each exists)
|
|
|
|
Each row is tied to the incident that earned it; its check is what
|
|
\`${BIN} rows --phase <p> --deep\` prints. Tier 1 rows are required in every review and never
|
|
\`n/a\`; a tier 2 row is required only when the detected scope names its scope (\`--scope\`).
|
|
|
|
${renderIncidentTable(REALITY_ROWS)}`;
|
|
}
|
|
if (mode === 'summary') return `- Reality rows: ___/___ applicable rows emitted (\`PLAN_REALITY\` line), ___ unverified premises`;
|
|
if (mode === 'pregate') {
|
|
return `Reality rows: each phase's \`PLAN_REALITY: … verdict=complete\` from
|
|
\`${BIN} check --phase <ceo|eng> <review-file|->\`. A missing applicable row is \`incomplete\`
|
|
in an unattended run, never a warning; interactive runs follow the repair rule above.`;
|
|
}
|
|
if (mode === 'autoplan') {
|
|
return `Reality rows: the loaded skill's \`REALITY:\` lines, one per applicable row;
|
|
\`${BIN} check --phase ${args?.[1] ?? 'ceo'} --plan <reviewed snapshot> <review-file|->\` prints \`PLAN_REALITY: … verdict=complete\` before the phase closes
|
|
(unattended: \`incomplete\` keeps it open).`;
|
|
}
|
|
const phase = phaseFor(ctx, mode);
|
|
return `**Reality rows (required):** run \`${BIN} rows --phase ${phase}\` and work its
|
|
rows (tier 1 always, never \`n/a\`: ${TIER1_ROW_IDS.join(', ')}; tier 2 by detected scope, \`--scope <csv>\`).
|
|
Every row cites a file:line receipt (with no linked issue, deferred-asks is \`pass\`); the premise table counts \`unverified=<n>\`. End with
|
|
one line per row, \`${REALITY_LINE_SHAPE}\`, then run
|
|
\`${BIN} check --phase ${phase} <review-file|->\` (prints \`PLAN_REALITY\`): a missing row is \`incomplete\`
|
|
unattended; interactive runs repair twice, then warn at the gate.`;
|
|
}
|