feat(skills): absorb pstack's blast radius, transcript recall, vet-the-number and design-twice as lazy sections

/investigate gains sections/blast-radius.md (the one safety fact, the five-rung
evidence ladder, look where grep stops, confirmed and cleared risks apart) with a
Phase 4 pointer, and the shared-premise red flag before the 3-strike rule.
/context-restore is carved for the first time: on NO_CHECKPOINTS, sections/transcripts.md
mines this workspace's own transcripts (host stores declared in hosts/*.ts and rendered
by TRANSCRIPT_SOURCES / TRANSCRIPT_DISCOVERY), a fixed 7-day window, never another
project's folder, subagents return only findings, redaction before anything leaves,
git and gh verify every artifact, a status-tagged brief. /benchmark is carved for the
first time: sections/vet-the-number.md asks the seven questions before Phase 5 reports
a comparison. /plan-eng-review gains sections/design-twice.md (a second structurally
distinct shape compared on interface depth, the eight design red flags), bound by the
autoplan methodology snapshot alongside review-sections.md.

Ideas from pstack (Lauren Tan, MIT), rewritten in gstack's words; NOTICE.md. Garry,
2026-10-26: "Do it, send". Guards: carve-guards entries and measured lines, eleven
plan-eng-review pins re-measured, periodic carve-section-loading cases for the two new
carves, free tests with a fixture transcript.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-26 21:38:10 +00:00
1 parent 576839cb8c
commit 6b530ccc0b
42 files changed
+1186 -47

No files matched your search

+11 -4
View File
@@ -122,9 +122,13 @@ describe('autoplan reads installed host methodology', () => {
expect(directive).toContain('"<REVIEW_SKILL>"');
}
if (carved) {
const relative = 'sections/review-sections.md';
const sectionInstalled = path.resolve(path.dirname(entry), reference, '..', relative);
installFile(sectionSource, sectionInstalled, mode);
// An install carries every generated section, not only the review body:
// plan-eng-review's design-twice companion is bound by the same snapshot.
const sectionsDir = path.dirname(sectionSource);
for (const file of fs.readdirSync(sectionsDir).filter(name => name.endsWith('.md'))) {
installFile(path.join(sectionsDir, file), path.resolve(path.dirname(entry), reference, '..', 'sections', file), mode);
}
const sectionInstalled = path.resolve(path.dirname(entry), reference, '..', 'sections/review-sections.md');
const section = fs.readFileSync(sectionInstalled, 'utf8');
expect(section).toBe(fs.readFileSync(sectionSource, 'utf8'));
expect(section).toContain('## Review Sections');
@@ -135,7 +139,10 @@ describe('autoplan reads installed host methodology', () => {
const restore = path.join(registry, 'restore.md');
fs.writeFileSync(restore, 'owned restore\n');
const skillPath = path.resolve(path.dirname(entry), reference);
assertBundle(methodology(phase, skillPath, restore), [skillPath, sectionInstalled]);
// The bundle binds every section the skill's index names, in index order.
const indexed = [...loaded.matchAll(/^\| .* \| `(sections\/[^`]+)` \|$/gm)].map(match => match[1]!);
expect(indexed).toContain('sections/review-sections.md');
assertBundle(methodology(phase, skillPath, restore), [skillPath, ...indexed.map(rel => path.resolve(path.dirname(skillPath), rel))]);
} else {
expect(directive).not.toContain('sections/review-sections.md');
expect(loaded).toContain('## Review Sections');
+2
View File
@@ -12,8 +12,10 @@ import { CAPTURE_LONG_MS } from './helpers/eval-budgets';
import { runCarveSectionCase } from './helpers/carve-section-case';
describeE2ETier('periodic')('carve section-loading', () => {
test('carve-section-loading-benchmark', () => runCarveSectionCase('benchmark'), CAPTURE_LONG_MS);
test('carve-section-loading-browse', () => runCarveSectionCase('browse'), CAPTURE_LONG_MS);
test('carve-section-loading-codex', () => runCarveSectionCase('codex'), CAPTURE_LONG_MS);
test('carve-section-loading-context-restore', () => runCarveSectionCase('context-restore'), CAPTURE_LONG_MS);
test('carve-section-loading-design-consultation', () => runCarveSectionCase('design-consultation'), CAPTURE_LONG_MS);
test('carve-section-loading-design-html', () => runCarveSectionCase('design-html'), CAPTURE_LONG_MS);
test('carve-section-loading-design-shotgun', () => runCarveSectionCase('design-shotgun'), CAPTURE_LONG_MS);
+164
View File
@@ -0,0 +1,164 @@
/**
* /context-restore's no-checkpoint fallback (pstack absorb, item 3): the carve
* shape, the host transcript table, and the discovery block run against fixture
* transcripts. The block must list only this workspace's files inside the
* window, never a sibling project's, and print TRANSCRIPTS: none on Capy.
*/
import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
import { spawnSync } from 'node:child_process';
import * as fs from 'node:fs';
import * as os from 'node:os';
import * as path from 'node:path';
import { CARVE_GUARDS } from './helpers/carve-guards';
import { ALL_HOST_CONFIGS } from '../hosts/index';
import { generateTranscriptDiscovery, generateTranscriptSources } from '../scripts/resolvers/transcripts';
const ROOT = path.resolve(import.meta.dir, '..');
const read = (rel: string) => fs.readFileSync(path.join(ROOT, rel), 'utf8');
const FIXTURE = path.join(ROOT, 'test', 'fixtures', 'context-restore-transcript.jsonl');
const FENCE = '\u0060\u0060\u0060';
const DISCOVERY_MARKER = 'TRANSCRIPT_DAYS="${TRANSCRIPT_DAYS:-7}"';
function bashBlockAfter(text: string, heading: string, marker: string): string {
const start = text.indexOf(heading);
if (start < 0) throw new Error('no heading ' + heading);
const at = text.indexOf(marker, start);
if (at < 0) throw new Error('no ' + marker + ' after ' + heading);
const open = text.lastIndexOf(FENCE + 'bash', at);
const close = text.indexOf(FENCE, open + 7);
return text.slice(open + 8, close);
}
describe('context-restore carve: the transcript fallback', () => {
const skeleton = read('context-restore/SKILL.md');
const section = read('context-restore/sections/transcripts.md');
const manifest = JSON.parse(read('context-restore/sections/manifest.json')) as { skill: string; sections: Array<{ id: string; file: string }> };
test('one section, registered, pointed to from the no-checkpoint branch and nowhere earlier', () => {
expect(manifest.skill).toBe('context-restore');
expect(manifest.sections.map(s => s.id)).toEqual(['transcripts']);
expect(CARVE_GUARDS['context-restore']!.expectedSections).toEqual(['transcripts.md']);
const noSaved = skeleton.indexOf('## If no saved contexts exist');
const stop = skeleton.indexOf('> **STOP.**');
expect(noSaved).toBeGreaterThan(skeleton.indexOf('### Step 1: Find saved contexts'));
expect(stop).toBeGreaterThan(noSaved);
expect(skeleton.match(/> \*\*STOP\.\*\*/g)).toHaveLength(1);
expect(skeleton).toContain('sections/transcripts.md');
expect(skeleton).not.toContain('"No saved contexts yet.');
expect(skeleton).toMatch(/HARD GATE:\*\* Do NOT implement code changes/);
});
test('the host table comes from hosts/*.ts and carries Claude Code, Codex and the Capy row', () => {
const table = generateTranscriptSources();
expect(section).toContain(table);
for (const host of ALL_HOST_CONFIGS.filter(h => h.transcripts)) {
expect(table).toContain('| ' + host.displayName + ' | \u0060' + host.transcripts!.root + '\u0060 |');
}
expect(ALL_HOST_CONFIGS.filter(h => h.transcripts).map(h => h.name).sort()).toEqual(['claude', 'codex']);
expect(table).toContain('~/.claude/projects/<slug>/*.jsonl');
expect(table).toContain('~/.codex/sessions/');
expect(table).toContain('| Capy (any model) | none |');
expect(section).toMatch(/Capy[^\n]*say so and use the shared record and git/);
});
test('the rules: a 7-day default window, never another project, subagents return findings only, redaction before anything leaves, git and gh verify, the tagged brief', () => {
expect(section).toContain('the default is the last 7 days');
expect(section).toContain('"all" means all and is never quietly narrowed');
expect(section).toContain("never open another project's");
expect(section).toContain('The raw transcript stays in the subagent.');
expect(section).toContain('gstack-redact');
expect(section).toContain('gbrain search');
expect(section).toMatch(/checked with \u0060git\u0060 and\s+\u0060gh\u0060 before it enters the brief/);
for (const tag of ['[merged #N]', '[open PR #N]', '[in flight <branch>]', '[verified, uncommitted]', '[reverted #N]', '[planned, not started]']) expect(section).toContain(tag);
for (const heading of ['### Capsule', '### Threads', '### Problems', '### Next move']) expect(section).toContain(heading);
expect(section).toContain('D) Save this as a checkpoint now (/context-save)');
});
test('hosts with no declared store render a one-line none; Claude and Codex render their own discovery', () => {
const ctx = (host: string) => ({ host, skillName: 'context-restore', paths: { binDir: '$GSTACK_BIN' } }) as never;
expect(generateTranscriptDiscovery(ctx('cursor'))).toContain('TRANSCRIPTS: none (Cursor declares no transcript store');
expect(generateTranscriptDiscovery(ctx('claude'))).toContain('$HOME/.claude/projects/');
expect(generateTranscriptDiscovery(ctx('codex'))).toContain('$HOME/.codex/sessions');
for (const host of ['claude', 'codex', 'cursor']) expect(generateTranscriptDiscovery(ctx(host))).toContain('if [ -n "${GSTACK_CAPY:-}" ]');
});
});
describe('the discovery block against fixture transcripts', () => {
let tmp: string;
let home: string;
let project: string;
const block = bashBlockAfter(read('context-restore/sections/transcripts.md'), '### Step T1', DISCOVERY_MARKER);
const codexRender = path.join(ROOT, '.agents', 'skills', 'gstack-context-restore', 'SKILL.md');
function sh(script: string, extra: Record<string, string> = {}, cwd = project) {
const env: Record<string, string> = {};
for (const [k, v] of Object.entries(process.env)) if (v !== undefined && !k.startsWith('GSTACK_') && k !== 'CLAUDE_PROJECT_DIR') env[k] = v;
const r = spawnSync('bash', ['-c', script], { cwd, env: { ...env, HOME: home, ...extra }, encoding: 'utf8', timeout: 30_000 });
return { out: (r.stdout ?? '') + (r.stderr ?? ''), status: r.status ?? -1 };
}
const slug = (p: string) => p.replace(/[^A-Za-z0-9]/g, '-');
beforeAll(() => {
tmp = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), 'cr-transcripts-')));
home = path.join(tmp, 'home');
project = path.join(tmp, 'work', 'shop.app');
fs.mkdirSync(project, { recursive: true });
spawnSync('git', ['init', '-q', project], { timeout: 30_000 });
// ~/.claude/skills/gstack is this checkout, so the block's gstack-slug call resolves.
fs.mkdirSync(path.join(home, '.claude', 'skills'), { recursive: true });
fs.symlinkSync(ROOT, path.join(home, '.claude', 'skills', 'gstack'));
const mine = path.join(home, '.claude', 'projects', slug(project));
const sibling = path.join(home, '.claude', 'projects', slug(path.join(tmp, 'work', 'shop-admin')));
fs.mkdirSync(mine, { recursive: true });
fs.mkdirSync(sibling, { recursive: true });
fs.copyFileSync(FIXTURE, path.join(mine, '7c2f.jsonl'));
fs.copyFileSync(FIXTURE, path.join(mine, 'old.jsonl'));
fs.copyFileSync(FIXTURE, path.join(sibling, 'other.jsonl'));
const tenDaysAgo = new Date(Date.now() - 10 * 86_400_000);
fs.utimesSync(path.join(mine, 'old.jsonl'), tenDaysAgo, tenDaysAgo);
// Codex: dated rollouts, one for this cwd, one for the sibling.
const day = path.join(home, '.codex', 'sessions', '2026', '10', '20');
fs.mkdirSync(day, { recursive: true });
const meta = (cwd: string) => JSON.stringify({ timestamp: '2026-10-20T17:02:11.000Z', type: 'session_meta', payload: { id: 'r1', cwd } }) + '\n' + fs.readFileSync(FIXTURE, 'utf8');
fs.writeFileSync(path.join(day, 'rollout-2026-10-20T17-02-11-r1.jsonl'), meta(project));
fs.writeFileSync(path.join(day, 'rollout-2026-10-20T17-02-12-r2.jsonl'), meta(path.join(tmp, 'work', 'shop-admin')));
});
afterAll(() => { fs.rmSync(tmp, { recursive: true, force: true }); });
test('the fixture is a Claude Code transcript: one JSON record per line with a cwd and a message', () => {
const lines = fs.readFileSync(FIXTURE, 'utf8').trim().split('\n').map(l => JSON.parse(l) as { type: string; cwd?: string; message?: unknown });
expect(lines.length).toBeGreaterThan(2);
expect(lines.filter(l => l.type === 'user' || l.type === 'assistant').every(l => l.cwd && l.message)).toBe(true);
});
test("Claude Code: lists this workspace's files inside the window, not the old one, never the sibling project", () => {
const r = sh(block);
expect(r.status, r.out).toBe(0);
expect(r.out).toContain('TRANSCRIPT_WINDOW: last 7 days');
expect(r.out).toContain('TRANSCRIPT_PROJECT: ' + project);
expect(r.out).toContain('/7c2f.jsonl');
expect(r.out).not.toContain('/old.jsonl');
expect(r.out).not.toContain('shop-admin');
expect(r.out).toMatch(/TRANSCRIPTS: .*\(1 files in the last 7 days\)/);
});
test('a wider window admits the old file; a missing folder and Capy both print none', () => {
expect(sh(block, { TRANSCRIPT_DAYS: '30' }).out).toContain('/old.jsonl');
const empty = path.join(tmp, 'work', 'fresh');
fs.mkdirSync(empty, { recursive: true });
spawnSync('git', ['init', '-q', empty], { timeout: 30_000 });
expect(sh(block, {}, empty).out).toMatch(/TRANSCRIPTS: none \(.*is missing/);
const capy = sh(block, { GSTACK_CAPY: '1' });
expect(capy.out).toContain('TRANSCRIPTS: none (Capy keeps no session transcript on this machine');
expect(capy.out).not.toContain('TRANSCRIPT: ');
});
test.skipIf(!fs.existsSync(codexRender))('Codex: lists only the rollout whose cwd is this workspace', () => {
const codexBlock = bashBlockAfter(fs.readFileSync(codexRender, 'utf8'), '### Step T1', DISCOVERY_MARKER);
const r = sh(codexBlock, { GSTACK_ROOT: ROOT, GSTACK_BIN: path.join(ROOT, 'bin') });
expect(r.status, r.out).toBe(0);
expect(r.out).toContain('rollout-2026-10-20T17-02-11-r1.jsonl');
expect(r.out).not.toContain('r2.jsonl');
expect(r.out).toMatch(/TRANSCRIPTS: .*\(1 files whose cwd is this workspace/);
});
});
+4
View File
@@ -0,0 +1,4 @@
{"type":"summary","summary":"Checkout webhook retry cap","leafUuid":"a1"}
{"parentUuid":null,"isSidechain":false,"cwd":"/home/dev/shop","sessionId":"7c2f","version":"2.1.0","type":"user","uuid":"u1","timestamp":"2026-10-20T17:02:11.000Z","message":{"role":"user","content":"The checkout webhook retries forever when the payment API returns 409. Fix it on a branch."}}
{"parentUuid":"u1","isSidechain":false,"cwd":"/home/dev/shop","sessionId":"7c2f","version":"2.1.0","type":"assistant","uuid":"a1","timestamp":"2026-10-20T17:03:40.000Z","message":{"role":"assistant","content":[{"type":"text","text":"Root cause: the retry loop treats 409 as transient. I capped it at 3 attempts in src/webhooks/retry.ts and opened PR #412 from branch fix/webhook-409."}]}}
{"parentUuid":"a1","isSidechain":false,"cwd":"/home/dev/shop","sessionId":"7c2f","version":"2.1.0","type":"user","uuid":"u2","timestamp":"2026-10-20T17:10:02.000Z","message":{"role":"user","content":"CI is red on the idempotency test. Leave it for tomorrow."}}
+11 -11
View File
@@ -8,7 +8,7 @@
"agy/gstack-land-and-deploy": 117690,
"agy/gstack-plan-design-review": 139981,
"agy/gstack-plan-devex-review": 135728,
"agy/gstack-plan-eng-review": 152574,
"agy/gstack-plan-eng-review": 155459,
"agy/gstack-review": 124400,
"claude/design-review": 136499,
"codex/gstack-autoplan": 130596,
@@ -18,7 +18,7 @@
"codex/gstack-office-hours": 102276,
"codex/gstack-plan-design-review": 142434,
"codex/gstack-plan-devex-review": 138617,
"codex/gstack-plan-eng-review": 155120,
"codex/gstack-plan-eng-review": 158005,
"codex/gstack-review": 125304,
"copilot/gstack-autoplan": 131605,
"copilot/gstack-codex": 100203,
@@ -28,7 +28,7 @@
"copilot/gstack-office-hours": 100432,
"copilot/gstack-plan-design-review": 140852,
"copilot/gstack-plan-devex-review": 136880,
"copilot/gstack-plan-eng-review": 153299,
"copilot/gstack-plan-eng-review": 156184,
"copilot/gstack-review": 125671,
"cursor/gstack-autoplan": 129246,
"cursor/gstack-design-consultation": 107190,
@@ -36,7 +36,7 @@
"cursor/gstack-land-and-deploy": 116613,
"cursor/gstack-plan-design-review": 138936,
"cursor/gstack-plan-devex-review": 134559,
"cursor/gstack-plan-eng-review": 151428,
"cursor/gstack-plan-eng-review": 154313,
"cursor/gstack-review": 142320,
"factory/gstack-autoplan": 131530,
"factory/gstack-codex": 100623,
@@ -46,34 +46,34 @@
"factory/gstack-office-hours": 101311,
"factory/gstack-plan-design-review": 141717,
"factory/gstack-plan-devex-review": 137928,
"factory/gstack-plan-eng-review": 154542,
"factory/gstack-plan-eng-review": 157427,
"factory/gstack-review": 146099,
"gbrain/gstack-autoplan": 129783,
"gbrain/gstack-design-review": 132810,
"gbrain/gstack-land-and-deploy": 117135,
"gbrain/gstack-plan-design-review": 127823,
"gbrain/gstack-plan-devex-review": 115097,
"gbrain/gstack-plan-eng-review": 134160,
"gbrain/gstack-plan-eng-review": 137045,
"hermes/gstack-autoplan": 129873,
"hermes/gstack-design-review": 132917,
"hermes/gstack-land-and-deploy": 117237,
"hermes/gstack-plan-design-review": 127932,
"hermes/gstack-plan-devex-review": 115183,
"hermes/gstack-plan-eng-review": 134245,
"hermes/gstack-plan-eng-review": 137130,
"kiro/gstack-autoplan": 129008,
"kiro/gstack-design-consultation": 107032,
"kiro/gstack-design-review": 142289,
"kiro/gstack-land-and-deploy": 116501,
"kiro/gstack-plan-design-review": 138776,
"kiro/gstack-plan-devex-review": 134399,
"kiro/gstack-plan-eng-review": 151278,
"kiro/gstack-plan-eng-review": 154163,
"kiro/gstack-review": 142132,
"openclaw/gstack-autoplan": 129488,
"openclaw/gstack-design-review": 131615,
"openclaw/gstack-land-and-deploy": 116725,
"openclaw/gstack-plan-design-review": 126674,
"openclaw/gstack-plan-devex-review": 113936,
"openclaw/gstack-plan-eng-review": 132557,
"openclaw/gstack-plan-eng-review": 135442,
"opencode/gstack-autoplan": 131608,
"opencode/gstack-design-consultation": 109325,
"opencode/gstack-design-review": 144673,
@@ -81,7 +81,7 @@
"opencode/gstack-office-hours": 100266,
"opencode/gstack-plan-design-review": 140706,
"opencode/gstack-plan-devex-review": 136780,
"opencode/gstack-plan-eng-review": 153180,
"opencode/gstack-plan-eng-review": 156065,
"opencode/gstack-review": 144555,
"slate/gstack-autoplan": 129127,
"slate/gstack-design-consultation": 107111,
@@ -89,7 +89,7 @@
"slate/gstack-land-and-deploy": 116557,
"slate/gstack-plan-design-review": 138856,
"slate/gstack-plan-devex-review": 134479,
"slate/gstack-plan-eng-review": 151353,
"slate/gstack-plan-eng-review": 154238,
"slate/gstack-review": 142226
}
}
+59 -9
View File
@@ -195,13 +195,13 @@ export const CARVE_GUARDS: Record<string, CarveGuard> = {
},
'plan-eng-review': {
skill: 'plan-eng-review',
expectedSections: ['review-sections.md'],
expectedSections: ['design-twice.md', 'review-sections.md'],
requiredReads: ['review-sections.md'],
scenario:
'Review the plan in PLAN.md. Accept the current scope. Run the full engineering review (architecture, code quality, tests, performance) and produce the review report.',
staticInvariants: {
mustStayInSkeleton: ['### Step 0: Scope Challenge'],
mustMoveToSection: ['### 1. Architecture review'],
mustMoveToSection: ['### 1. Architecture review', '## Two shapes before one', '### The eight red flags'],
gateAfterStop: 'EXIT PLAN MODE GATE',
},
behavioral: 'plan',
@@ -212,9 +212,9 @@ export const CARVE_GUARDS: Record<string, CarveGuard> = {
// check grew every plan-review skeleton ~0.7KB. Measured values noted.
// #2499 project-scope MCP jq in the brain-sync block grew every tier-2+
// skeleton ~1.5KB (entry resolution emitted once per SKILL.md).
maxSkeletonBytes: 57_800, // Scoped reuse entry guidance; measured 57,549 bytes (2026-09-16). Shared rubric remains in the existing section.
maxSkeletonBytes: 57_800, // Scoped reuse entry guidance; measured 57,549 bytes (2026-09-16). Shared rubric remains in the existing section. + pstack item 9 (Garry 2026-10-26 "do it"): the design-twice STOP pointer and its index row; measured 52,185 (2026-10-26), inside the cap.
minUnionBytes: 99_800, // token-reduction Phases 1-2 (v1.69.x branch); measured union 110,910
mustContain: ['Architecture', 'Code Quality', 'Test', 'Performance'],
mustContain: ['Architecture', 'Code Quality', 'Test', 'Performance', 'interface depth'],
// Cross-cutting preamble growth (v1.57.2.0 AUQ-failure prose fallback + the
// decision-memory nudge + the v1.57.4.0 Boil-the-Ocean rename) plus the
// default-on Codex outside-voice (codexPreflight block + CODEX_MODE branch
@@ -223,7 +223,7 @@ export const CARVE_GUARDS: Record<string, CarveGuard> = {
// 1.08 → 1.10: the scope-gate exceptions block (+ its adversarial-review
// hardening: host-anchored mode signal, precedence, passing-mention
// guards) and the plan-mode preamble reword land the union at 1.092.
maxSizeRatio: 1.2196, // + clarity rules for saved decisions/setup gates + the Aside probe's failure reason; measured 1.1504. + test value bar and Tests to Retire in the lazy Test review section (~2.6KB); measured 1.168 + W1 guarded state-root resolution (`eval gstack-paths; : "${GSTACK_STATE_ROOT:?…}"`) in the Context Recovery preamble, the eureka log and each state-writing bash block; measured 1.173 (2026-09-30). + v1.91.12.0 merge of #2999 (headless rule: a disallowed question tool never qualifies) with #3002; measured 1.1741 (2026-10-01). + Oct 6 fix wave A3/CEO-12: free text reaches commands only through agent-written mktemp files (mktemp block, write rule, path rebuild and refusal at each posting, prompt and brief site); measured 146,905 / 124,597 = 1.1790 (2026-10-06). Combined Oct 6 wave head (A and B): measured 147,524 / 124,597 = 1.1840 (2026-10-06). + Oct 7 wave B3: the Codex probe runs as a command (select-model capture lines, check-sandbox/probe-model/run-with-timeout subcommands) instead of being sourced; measured 147,693 / 124,597 = 1.1854 (2026-10-07). + Oct 7 wave CEO-28/DX-11: review prompts ask for a severity per finding and design proposals use the proposal gate; measured 147,752 / 124,597 = 1.1858 (2026-10-07). + fix wave PR D: the prerequisite offer is skipped in spawned/headless sessions (#1958); measured 147,864 / 124,597 = 1.1867 (2026-10-07). + Oct 10 multi-agent wave PR D1 (reality rows): the Scope Challenge reality-rows block, the deep incident table (18 rows, each tied to the incident that earned it), the Completion summary line and the checklist row; measured 151,423 / 124,597 = 1.2153 (2026-10-10). + #280: the Design Doc Check finds the CEO plan (`gstack-ceo-plan-find`) and names it in the data rule, +325 bytes on main's 151,630; measured 151,955 / 124,597 = 1.2196 (2026-10-12). Fix wave PR 4 (owner-approved raise 1.2170 → 1.2196): #3182's timer-bounded native fallback (net −17 bytes) plus #280's cross-branch rule, offset by tightening the Design Doc Check; measured 151,950 / 124,597 = 1.2195 (2026-10-15).
maxSizeRatio: 1.26, // pstack item 9 (Garry 2026-10-26 "do it"): the design-twice section (3.0 KB) joins the union; measured 154,988 / 124,597 = 1.2439 (2026-10-26). Earlier history: + clarity rules for saved decisions/setup gates + the Aside probe's failure reason; measured 1.1504. + test value bar and Tests to Retire in the lazy Test review section (~2.6KB); measured 1.168 + W1 guarded state-root resolution (`eval gstack-paths; : "${GSTACK_STATE_ROOT:?…}"`) in the Context Recovery preamble, the eureka log and each state-writing bash block; measured 1.173 (2026-09-30). + v1.91.12.0 merge of #2999 (headless rule: a disallowed question tool never qualifies) with #3002; measured 1.1741 (2026-10-01). + Oct 6 fix wave A3/CEO-12: free text reaches commands only through agent-written mktemp files (mktemp block, write rule, path rebuild and refusal at each posting, prompt and brief site); measured 146,905 / 124,597 = 1.1790 (2026-10-06). Combined Oct 6 wave head (A and B): measured 147,524 / 124,597 = 1.1840 (2026-10-06). + Oct 7 wave B3: the Codex probe runs as a command (select-model capture lines, check-sandbox/probe-model/run-with-timeout subcommands) instead of being sourced; measured 147,693 / 124,597 = 1.1854 (2026-10-07). + Oct 7 wave CEO-28/DX-11: review prompts ask for a severity per finding and design proposals use the proposal gate; measured 147,752 / 124,597 = 1.1858 (2026-10-07). + fix wave PR D: the prerequisite offer is skipped in spawned/headless sessions (#1958); measured 147,864 / 124,597 = 1.1867 (2026-10-07). + Oct 10 multi-agent wave PR D1 (reality rows): the Scope Challenge reality-rows block, the deep incident table (18 rows, each tied to the incident that earned it), the Completion summary line and the checklist row; measured 151,423 / 124,597 = 1.2153 (2026-10-10). + #280: the Design Doc Check finds the CEO plan (`gstack-ceo-plan-find`) and names it in the data rule, +325 bytes on main's 151,630; measured 151,955 / 124,597 = 1.2196 (2026-10-12). Fix wave PR 4 (owner-approved raise 1.2170 → 1.2196): #3182's timer-bounded native fallback (net −17 bytes) plus #280's cross-branch rule, offset by tightening the Design Doc Check; measured 151,950 / 124,597 = 1.2195 (2026-10-15).
},
'plan-design-review': {
skill: 'plan-design-review',
@@ -797,7 +797,7 @@ do not launch the downstream skill or open a browser.`,
// Iron Law and the Scope Lock stay always-loaded.
investigate: {
skill: 'investigate',
expectedSections: ['flake.md', 'polluter.md', 'race.md', 'eval-bisect.md', 'backlog.md'],
expectedSections: ['flake.md', 'polluter.md', 'race.md', 'eval-bisect.md', 'backlog.md', 'blast-radius.md'],
requiredReads: ['flake.md'],
scenario:
'Walk /investigate in SIMULATION — do not run bash, edit files or acquire a freeze lock. The symptom: test/widget.test.ts fails in CI about one run in eight ("expected 3 events, got 2") and passes locally every time; the PR under review only touched src/widget.ts. Do NOT use AskUserQuestion. Read each pointed section before doing its step, apply the matching recipe, and report the investigation plan: what you would run on main and on the branch, the forced probe, and the exact `## Flake evidence` section you would require in the PR body. Stop before Phase 4.',
@@ -820,14 +820,64 @@ do not launch the downstream skill or open a browser.`,
'## Backlog mode (`/investigate --backlog`)',
'## Flake evidence',
'ship-measure.ts free --files',
'## Blast radius',
'Look where grep stops',
],
gateAfterStop: undefined, // operational skill, no plan-mode gate
},
behavioral: 'prompt',
maxSkeletonBytes: 52_000, // D3 carve: Arguments table, Section index, Phase 1 call-site and update-index additions, five STOP pointers; measured 51,532 (2026-10-10)
maxSkeletonBytes: 52_000, // D3 carve: Arguments table, Section index, Phase 1 call-site and update-index additions, five STOP pointers; measured 51,532 (2026-10-10). + pstack item 2(b)/8 (Garry 2026-10-26 "do it"): the blast-radius STOP pointer and index row plus the shared-premise red flag; measured 51,623 (2026-10-26), inside the existing cap.
minUnionBytes: 55_000, // D3 carve: skeleton + five recipes; measured union 61,513 (2026-10-10)
mustContain: ['root cause', 'hypothes', 'Flake evidence', 'still_open', 'already_fixed', 'P(fail | regression)'],
maxSizeRatio: 1.12, // the monolith's cap (parity-harness MONOLITH_INVARIANTS before the carve); measured 61,513 / 60,600 = 1.0151 (2026-10-10)
mustContain: ['root cause', 'hypothes', 'Flake evidence', 'still_open', 'already_fixed', 'P(fail | regression)', 'the one fact it is safe because of'],
maxSizeRatio: 1.12, // the monolith's cap (parity-harness MONOLITH_INVARIANTS before the carve); measured 61,513 / 60,600 = 1.0151 (2026-10-10). + the blast-radius section (2.8 KB); measured 66,167 / 60,600 = 1.0919 (2026-10-26).
},
// ── pstack absorb C1 (2026-10-26, Garry "do it"): context-restore's first carve ──
// One lazy section: the no-checkpoint fallback that mines this workspace's
// own transcripts (host stores from hosts/*.ts, a fixed window, never another
// project's folder, cheap subagents return only findings, git and gh verify
// every artifact, the status-tagged brief). Detect, Step 1 and the summary
// stay always-loaded.
'context-restore': {
skill: 'context-restore',
expectedSections: ['transcripts.md'],
requiredReads: ['transcripts.md'],
scenario:
'Walk /context-restore in SIMULATION — do not run bash or read any transcript. Step 1 printed exactly NO_CHECKPOINTS and nothing else (no BELOW_CWD, POINTER or LEGACY_BUCKET line). Do NOT use AskUserQuestion. Read the pointed section and report the plan: which transcript store you would list on this host and how this workspace\'s folder is told apart from another project\'s, the window you would use, how the files would be read and what returns to this conversation, what you would verify with git and gh, and the four headings of the brief with the status tags a thread line may carry.',
staticInvariants: {
mustStayInSkeleton: ['## Detect command', '### Step 1: Find saved contexts', '## If no saved contexts exist', 'RESUMING CONTEXT', '## Important Rules'],
mustPrecedeStop: ['### Step 1: Find saved contexts'],
mustMoveToSection: ["## No saved context: mine this workspace's transcripts", '[verified, uncommitted]', 'TRANSCRIPT_DAYS'],
gateAfterStop: undefined, // operational skill, no plan-mode gate
},
behavioral: 'prompt',
maxSkeletonBytes: 46_300, // first carve: Section index and one STOP pointer on the 45.0k monolith; measured 45,848 (2026-10-26)
minUnionBytes: 50_000, // skeleton + transcripts section; measured union 52,510 (2026-10-26)
mustContain: ['NO_CHECKPOINTS', 'RESUMING CONTEXT', '[merged #N]', "never open another project's", 'gstack-redact', 'last 7 days'],
// The v1.64.1.0 baseline measured the 53.5k monolith; the carved union is below it.
},
// ── pstack absorb C1 (2026-10-26, Garry "do it"): benchmark's first carve ──
// One lazy section: the seven questions that vet a measured speedup or
// regression before Phase 5 reports it. Setup, collection, baseline, budget
// and trend phases stay always-loaded.
benchmark: {
skill: 'benchmark',
expectedSections: ['vet-the-number.md'],
requiredReads: ['vet-the-number.md'],
scenario:
'Walk /benchmark in SIMULATION — do not run bash, aside or a browser. A baseline exists and the current run already measured the dashboard page: LCP 1.6 s on the baseline, 1.1 s now, from one run per side on a laptop that was also building. Do NOT use AskUserQuestion. Before writing the Phase 5 comparison, read the pointed section, then report the verdict you would give for this delta and which of its questions decide it, and what you would run before calling it a speedup.',
staticInvariants: {
mustStayInSkeleton: ['## Arguments', '### Phase 3: Performance Data Collection', '### Phase 5: Comparison', '### Phase 7: Performance Budget', '## Important Rules'],
mustPrecedeStop: ['## Arguments'],
mustMoveToSection: ['## Vet the number', '**Why not double?**', '**Did it even happen?**'],
gateAfterStop: undefined, // operational skill, no plan-mode gate
},
behavioral: 'prompt',
maxSkeletonBytes: 31_300, // first carve: Section index, one STOP pointer and the vet rule on the 29.9k monolith; measured 30,781 (2026-10-26)
minUnionBytes: 33_000, // skeleton + vet-the-number section; measured union 34,527 (2026-10-26)
mustContain: ['performance.getEntries()', 'REGRESSION', 'Name the limiter', 'run-to-run variation', 'inconclusive'],
// The v1.64.1.0 baseline measured the 37.2k monolith; the carved union is below it.
},
};
+6
View File
@@ -416,6 +416,8 @@ export const E2E_TOUCHFILES: Record<string, string[]> = {
'carve-section-loading-design-html': ['design-html/**', 'setup', 'bin/gstack-bun-version.sh', 'bin/gstack-state-root.sh', 'lib/state-root.ts', 'bin/gstack-review-log', 'bin/gstack-review-read', 'lib/review-evidence.ts', 'bin/gstack-slug', 'bin/gstack-remote-identity.sh', 'bin/gstack-wtree', 'bin/gstack-config', 'bin/gstack-brain-enqueue', 'test/fixtures/autoplan-amend-input-77.json', 'test/fixtures/autoplan-phase-handoff-6714.json', 'test/fixtures/plan-scope-recovery-av.json', 'test/fixtures/design-scope-checkpoint-at.json', 'scripts/resolvers/composition.ts', 'autoplan/**', 'test/helpers/carve-guards.ts', 'scripts/resolvers/sections.ts', 'scripts/resolvers/redact-doc.ts', 'scripts/gen-skill-docs.ts', 'test/helpers/auq-sdk-capture.ts', 'test/helpers/session-runner.ts', 'bin/gstack-autoplan-snapshot.ts', 'test/fixtures/autoplan/t-ceo-omitted-obligations.json', 'test/fixtures/autoplan/u-ceo-original-loss.json', 'test/fixtures/autoplan/v-ceo-dangling-references.json', 'scripts/resolvers/preamble/generate-preamble-bash.ts', 'scripts/resolvers/preamble/generate-completion-status.ts', 'test/carve-section-loading.test.ts', 'test/helpers/carve-section-case.ts', 'test/fixtures/design-html-section-complete.md', 'test/helpers/carve-plan-fixture.ts', 'test/fixtures/carve-existing-repository/**', 'scripts/resolvers/review-dashboard.ts', 'scripts/resolvers/plan-gates.ts', 'scripts/resolvers/spec-review.ts', 'scripts/resolvers/outside-voice-steps.ts', 'scripts/resolvers/review-scope.ts', 'scripts/resolvers/outside-voice.ts', 'scripts/resolvers/preamble/generate-ask-user-format.ts', 'test/helpers/agent-sdk-runner.ts', 'test/helpers/auq-native-capture.ts', 'test/helpers/auto-decision-state.ts', 'test/helpers/autoplan-artifact-digest.ts', 'test/helpers/autoplan-artifact-permission.ts', 'test/helpers/autoplan-artifact-recorder.ts', 'test/helpers/capture-parity-baseline.ts', 'test/helpers/claude-pty-runner.ts', 'test/helpers/pty/**', 'test/helpers/dx-selected-navigation.ts', 'test/helpers/e2e-gate.ts', 'test/helpers/eng-cache-writer-decision.ts', 'test/helpers/hermetic-skill-runtime.ts', 'test/helpers/llm-judge.ts', 'test/helpers/native-auto-decide.ts', 'test/helpers/owned-claude-transcript.ts', 'test/helpers/parity-harness.ts', 'test/helpers/plan-count-artifacts.ts', 'test/helpers/plan-count-file-permission.ts', 'test/helpers/plan-count-fixture.ts', 'test/helpers/plan-count-pending-exit.ts', 'test/helpers/plan-count-pending-question.ts', 'test/helpers/plan-count-transcript.ts', 'test/helpers/plan-floor-review.ts', 'test/helpers/plan-floor-target.ts', 'test/helpers/plan-scope-selection.ts', 'test/helpers/plan-seed-submission.ts', 'test/helpers/plan-skill-question-events.ts', 'test/helpers/plan-skill-question-hook-scope.ts', 'test/helpers/plan-skill-questions.ts', 'test/helpers/pty-screen.ts', 'test/helpers/pty-trust-dialog.ts', 'test/helpers/skill-census.ts'],
'carve-section-loading-design-shotgun': ['design-shotgun/**', 'setup', 'bin/gstack-bun-version.sh', 'bin/gstack-state-root.sh', 'lib/state-root.ts', 'bin/gstack-review-log', 'bin/gstack-review-read', 'lib/review-evidence.ts', 'bin/gstack-slug', 'bin/gstack-remote-identity.sh', 'bin/gstack-wtree', 'bin/gstack-config', 'bin/gstack-brain-enqueue', 'test/fixtures/autoplan-amend-input-77.json', 'test/fixtures/autoplan-phase-handoff-6714.json', 'test/fixtures/plan-scope-recovery-av.json', 'test/fixtures/design-scope-checkpoint-at.json', 'scripts/resolvers/composition.ts', 'autoplan/**', 'test/helpers/carve-guards.ts', 'scripts/resolvers/sections.ts', 'scripts/resolvers/redact-doc.ts', 'scripts/gen-skill-docs.ts', 'test/helpers/auq-sdk-capture.ts', 'test/helpers/session-runner.ts', 'bin/gstack-autoplan-snapshot.ts', 'test/fixtures/autoplan/t-ceo-omitted-obligations.json', 'test/fixtures/autoplan/u-ceo-original-loss.json', 'test/fixtures/autoplan/v-ceo-dangling-references.json', 'scripts/resolvers/preamble/generate-preamble-bash.ts', 'scripts/resolvers/preamble/generate-completion-status.ts', 'test/carve-section-loading.test.ts', 'test/helpers/carve-section-case.ts', 'test/fixtures/design-html-section-complete.md', 'test/helpers/carve-plan-fixture.ts', 'test/fixtures/carve-existing-repository/**', 'scripts/resolvers/review-dashboard.ts', 'scripts/resolvers/plan-gates.ts', 'scripts/resolvers/spec-review.ts', 'scripts/resolvers/outside-voice-steps.ts', 'scripts/resolvers/review-scope.ts', 'scripts/resolvers/outside-voice.ts', 'scripts/resolvers/preamble/generate-ask-user-format.ts', 'test/helpers/agent-sdk-runner.ts', 'test/helpers/auq-native-capture.ts', 'test/helpers/auto-decision-state.ts', 'test/helpers/autoplan-artifact-digest.ts', 'test/helpers/autoplan-artifact-permission.ts', 'test/helpers/autoplan-artifact-recorder.ts', 'test/helpers/capture-parity-baseline.ts', 'test/helpers/claude-pty-runner.ts', 'test/helpers/pty/**', 'test/helpers/dx-selected-navigation.ts', 'test/helpers/e2e-gate.ts', 'test/helpers/eng-cache-writer-decision.ts', 'test/helpers/hermetic-skill-runtime.ts', 'test/helpers/llm-judge.ts', 'test/helpers/native-auto-decide.ts', 'test/helpers/owned-claude-transcript.ts', 'test/helpers/parity-harness.ts', 'test/helpers/plan-count-artifacts.ts', 'test/helpers/plan-count-file-permission.ts', 'test/helpers/plan-count-fixture.ts', 'test/helpers/plan-count-pending-exit.ts', 'test/helpers/plan-count-pending-question.ts', 'test/helpers/plan-count-transcript.ts', 'test/helpers/plan-floor-review.ts', 'test/helpers/plan-floor-target.ts', 'test/helpers/plan-scope-selection.ts', 'test/helpers/plan-seed-submission.ts', 'test/helpers/plan-skill-question-events.ts', 'test/helpers/plan-skill-question-hook-scope.ts', 'test/helpers/plan-skill-questions.ts', 'test/helpers/pty-screen.ts', 'test/helpers/pty-trust-dialog.ts', 'test/helpers/skill-census.ts'],
'carve-section-loading-document-release': ['document-release/**', 'setup', 'bin/gstack-bun-version.sh', 'bin/gstack-state-root.sh', 'lib/state-root.ts', 'bin/gstack-review-log', 'bin/gstack-review-read', 'lib/review-evidence.ts', 'bin/gstack-slug', 'bin/gstack-remote-identity.sh', 'bin/gstack-wtree', 'bin/gstack-config', 'bin/gstack-brain-enqueue', 'test/fixtures/autoplan-amend-input-77.json', 'test/fixtures/autoplan-phase-handoff-6714.json', 'test/fixtures/plan-scope-recovery-av.json', 'test/fixtures/design-scope-checkpoint-at.json', 'scripts/resolvers/composition.ts', 'autoplan/**', 'test/helpers/carve-guards.ts', 'scripts/resolvers/sections.ts', 'scripts/resolvers/redact-doc.ts', 'scripts/gen-skill-docs.ts', 'test/helpers/auq-sdk-capture.ts', 'test/helpers/session-runner.ts', 'bin/gstack-autoplan-snapshot.ts', 'test/fixtures/autoplan/t-ceo-omitted-obligations.json', 'test/fixtures/autoplan/u-ceo-original-loss.json', 'test/fixtures/autoplan/v-ceo-dangling-references.json', 'scripts/resolvers/preamble/generate-preamble-bash.ts', 'scripts/resolvers/preamble/generate-completion-status.ts', 'test/carve-section-loading.test.ts', 'test/helpers/carve-section-case.ts', 'test/fixtures/design-html-section-complete.md', 'test/helpers/carve-plan-fixture.ts', 'test/fixtures/carve-existing-repository/**', 'scripts/resolvers/review-dashboard.ts', 'scripts/resolvers/plan-gates.ts', 'scripts/resolvers/spec-review.ts', 'scripts/resolvers/outside-voice-steps.ts', 'scripts/resolvers/review-scope.ts', 'scripts/resolvers/outside-voice.ts', 'scripts/resolvers/preamble/generate-ask-user-format.ts', 'test/helpers/agent-sdk-runner.ts', 'test/helpers/auq-native-capture.ts', 'test/helpers/auto-decision-state.ts', 'test/helpers/autoplan-artifact-digest.ts', 'test/helpers/autoplan-artifact-permission.ts', 'test/helpers/autoplan-artifact-recorder.ts', 'test/helpers/capture-parity-baseline.ts', 'test/helpers/claude-pty-runner.ts', 'test/helpers/pty/**', 'test/helpers/dx-selected-navigation.ts', 'test/helpers/e2e-gate.ts', 'test/helpers/eng-cache-writer-decision.ts', 'test/helpers/hermetic-skill-runtime.ts', 'test/helpers/llm-judge.ts', 'test/helpers/native-auto-decide.ts', 'test/helpers/owned-claude-transcript.ts', 'test/helpers/parity-harness.ts', 'test/helpers/plan-count-artifacts.ts', 'test/helpers/plan-count-file-permission.ts', 'test/helpers/plan-count-fixture.ts', 'test/helpers/plan-count-pending-exit.ts', 'test/helpers/plan-count-pending-question.ts', 'test/helpers/plan-count-transcript.ts', 'test/helpers/plan-floor-review.ts', 'test/helpers/plan-floor-target.ts', 'test/helpers/plan-scope-selection.ts', 'test/helpers/plan-seed-submission.ts', 'test/helpers/plan-skill-question-events.ts', 'test/helpers/plan-skill-question-hook-scope.ts', 'test/helpers/plan-skill-questions.ts', 'test/helpers/pty-screen.ts', 'test/helpers/pty-trust-dialog.ts', 'test/helpers/skill-census.ts'],
'carve-section-loading-benchmark': ['benchmark/**', 'setup', 'bin/gstack-bun-version.sh', 'bin/gstack-state-root.sh', 'lib/state-root.ts', 'bin/gstack-review-log', 'bin/gstack-review-read', 'lib/review-evidence.ts', 'bin/gstack-slug', 'bin/gstack-remote-identity.sh', 'bin/gstack-wtree', 'bin/gstack-config', 'bin/gstack-brain-enqueue', 'test/fixtures/autoplan-amend-input-77.json', 'test/fixtures/autoplan-phase-handoff-6714.json', 'test/fixtures/plan-scope-recovery-av.json', 'test/fixtures/design-scope-checkpoint-at.json', 'scripts/resolvers/composition.ts', 'autoplan/**', 'test/helpers/carve-guards.ts', 'scripts/resolvers/sections.ts', 'scripts/resolvers/redact-doc.ts', 'scripts/gen-skill-docs.ts', 'test/helpers/auq-sdk-capture.ts', 'test/helpers/session-runner.ts', 'bin/gstack-autoplan-snapshot.ts', 'test/fixtures/autoplan/t-ceo-omitted-obligations.json', 'test/fixtures/autoplan/u-ceo-original-loss.json', 'test/fixtures/autoplan/v-ceo-dangling-references.json', 'scripts/resolvers/preamble/generate-preamble-bash.ts', 'scripts/resolvers/preamble/generate-completion-status.ts', 'test/carve-section-loading.test.ts', 'test/helpers/carve-section-case.ts', 'test/fixtures/design-html-section-complete.md', 'test/helpers/carve-plan-fixture.ts', 'test/fixtures/carve-existing-repository/**', 'scripts/resolvers/review-dashboard.ts', 'scripts/resolvers/plan-gates.ts', 'scripts/resolvers/spec-review.ts', 'scripts/resolvers/outside-voice-steps.ts', 'scripts/resolvers/review-scope.ts', 'scripts/resolvers/outside-voice.ts', 'scripts/resolvers/preamble/generate-ask-user-format.ts', 'test/helpers/agent-sdk-runner.ts', 'test/helpers/auq-native-capture.ts', 'test/helpers/auto-decision-state.ts', 'test/helpers/autoplan-artifact-digest.ts', 'test/helpers/autoplan-artifact-permission.ts', 'test/helpers/autoplan-artifact-recorder.ts', 'test/helpers/capture-parity-baseline.ts', 'test/helpers/claude-pty-runner.ts', 'test/helpers/pty/**', 'test/helpers/dx-selected-navigation.ts', 'test/helpers/e2e-gate.ts', 'test/helpers/eng-cache-writer-decision.ts', 'test/helpers/hermetic-skill-runtime.ts', 'test/helpers/llm-judge.ts', 'test/helpers/native-auto-decide.ts', 'test/helpers/owned-claude-transcript.ts', 'test/helpers/parity-harness.ts', 'test/helpers/plan-count-artifacts.ts', 'test/helpers/plan-count-file-permission.ts', 'test/helpers/plan-count-fixture.ts', 'test/helpers/plan-count-pending-exit.ts', 'test/helpers/plan-count-pending-question.ts', 'test/helpers/plan-count-transcript.ts', 'test/helpers/plan-floor-review.ts', 'test/helpers/plan-floor-target.ts', 'test/helpers/plan-scope-selection.ts', 'test/helpers/plan-seed-submission.ts', 'test/helpers/plan-skill-question-events.ts', 'test/helpers/plan-skill-question-hook-scope.ts', 'test/helpers/plan-skill-questions.ts', 'test/helpers/pty-screen.ts', 'test/helpers/pty-trust-dialog.ts', 'test/helpers/skill-census.ts'],
'carve-section-loading-context-restore': ['context-restore/**', 'setup', 'bin/gstack-bun-version.sh', 'bin/gstack-state-root.sh', 'lib/state-root.ts', 'bin/gstack-review-log', 'bin/gstack-review-read', 'lib/review-evidence.ts', 'bin/gstack-slug', 'bin/gstack-remote-identity.sh', 'bin/gstack-wtree', 'bin/gstack-config', 'bin/gstack-brain-enqueue', 'test/fixtures/autoplan-amend-input-77.json', 'test/fixtures/autoplan-phase-handoff-6714.json', 'test/fixtures/plan-scope-recovery-av.json', 'test/fixtures/design-scope-checkpoint-at.json', 'scripts/resolvers/composition.ts', 'autoplan/**', 'test/helpers/carve-guards.ts', 'scripts/resolvers/sections.ts', 'scripts/resolvers/redact-doc.ts', 'scripts/gen-skill-docs.ts', 'test/helpers/auq-sdk-capture.ts', 'test/helpers/session-runner.ts', 'bin/gstack-autoplan-snapshot.ts', 'test/fixtures/autoplan/t-ceo-omitted-obligations.json', 'test/fixtures/autoplan/u-ceo-original-loss.json', 'test/fixtures/autoplan/v-ceo-dangling-references.json', 'scripts/resolvers/preamble/generate-preamble-bash.ts', 'scripts/resolvers/preamble/generate-completion-status.ts', 'test/carve-section-loading.test.ts', 'test/helpers/carve-section-case.ts', 'test/fixtures/design-html-section-complete.md', 'test/helpers/carve-plan-fixture.ts', 'test/fixtures/carve-existing-repository/**', 'scripts/resolvers/review-dashboard.ts', 'scripts/resolvers/plan-gates.ts', 'scripts/resolvers/spec-review.ts', 'scripts/resolvers/outside-voice-steps.ts', 'scripts/resolvers/review-scope.ts', 'scripts/resolvers/outside-voice.ts', 'scripts/resolvers/preamble/generate-ask-user-format.ts', 'test/helpers/agent-sdk-runner.ts', 'test/helpers/auq-native-capture.ts', 'test/helpers/auto-decision-state.ts', 'test/helpers/autoplan-artifact-digest.ts', 'test/helpers/autoplan-artifact-permission.ts', 'test/helpers/autoplan-artifact-recorder.ts', 'test/helpers/capture-parity-baseline.ts', 'test/helpers/claude-pty-runner.ts', 'test/helpers/pty/**', 'test/helpers/dx-selected-navigation.ts', 'test/helpers/e2e-gate.ts', 'test/helpers/eng-cache-writer-decision.ts', 'test/helpers/hermetic-skill-runtime.ts', 'test/helpers/llm-judge.ts', 'test/helpers/native-auto-decide.ts', 'test/helpers/owned-claude-transcript.ts', 'test/helpers/parity-harness.ts', 'test/helpers/plan-count-artifacts.ts', 'test/helpers/plan-count-file-permission.ts', 'test/helpers/plan-count-fixture.ts', 'test/helpers/plan-count-pending-exit.ts', 'test/helpers/plan-count-pending-question.ts', 'test/helpers/plan-count-transcript.ts', 'test/helpers/plan-floor-review.ts', 'test/helpers/plan-floor-target.ts', 'test/helpers/plan-scope-selection.ts', 'test/helpers/plan-seed-submission.ts', 'test/helpers/plan-skill-question-events.ts', 'test/helpers/plan-skill-question-hook-scope.ts', 'test/helpers/plan-skill-questions.ts', 'test/helpers/pty-screen.ts', 'test/helpers/pty-trust-dialog.ts', 'test/helpers/skill-census.ts'],
'carve-section-loading-investigate': ['investigate/**', 'setup', 'bin/gstack-bun-version.sh', 'bin/gstack-state-root.sh', 'lib/state-root.ts', 'bin/gstack-review-log', 'bin/gstack-review-read', 'lib/review-evidence.ts', 'bin/gstack-slug', 'bin/gstack-remote-identity.sh', 'bin/gstack-wtree', 'bin/gstack-config', 'bin/gstack-brain-enqueue', 'test/fixtures/autoplan-amend-input-77.json', 'test/fixtures/autoplan-phase-handoff-6714.json', 'test/fixtures/plan-scope-recovery-av.json', 'test/fixtures/design-scope-checkpoint-at.json', 'scripts/resolvers/composition.ts', 'autoplan/**', 'test/helpers/carve-guards.ts', 'scripts/resolvers/sections.ts', 'scripts/resolvers/redact-doc.ts', 'scripts/gen-skill-docs.ts', 'test/helpers/auq-sdk-capture.ts', 'test/helpers/session-runner.ts', 'bin/gstack-autoplan-snapshot.ts', 'test/fixtures/autoplan/t-ceo-omitted-obligations.json', 'test/fixtures/autoplan/u-ceo-original-loss.json', 'test/fixtures/autoplan/v-ceo-dangling-references.json', 'scripts/resolvers/preamble/generate-preamble-bash.ts', 'scripts/resolvers/preamble/generate-completion-status.ts', 'test/carve-section-loading.test.ts', 'test/helpers/carve-section-case.ts', 'test/fixtures/design-html-section-complete.md', 'test/helpers/carve-plan-fixture.ts', 'test/fixtures/carve-existing-repository/**', 'scripts/resolvers/review-dashboard.ts', 'scripts/resolvers/plan-gates.ts', 'scripts/resolvers/spec-review.ts', 'scripts/resolvers/outside-voice-steps.ts', 'scripts/resolvers/review-scope.ts', 'scripts/resolvers/outside-voice.ts', 'scripts/resolvers/preamble/generate-ask-user-format.ts', 'test/helpers/agent-sdk-runner.ts', 'test/helpers/auq-native-capture.ts', 'test/helpers/auto-decision-state.ts', 'test/helpers/autoplan-artifact-digest.ts', 'test/helpers/autoplan-artifact-permission.ts', 'test/helpers/autoplan-artifact-recorder.ts', 'test/helpers/capture-parity-baseline.ts', 'test/helpers/claude-pty-runner.ts', 'test/helpers/pty/**', 'test/helpers/dx-selected-navigation.ts', 'test/helpers/e2e-gate.ts', 'test/helpers/eng-cache-writer-decision.ts', 'test/helpers/hermetic-skill-runtime.ts', 'test/helpers/llm-judge.ts', 'test/helpers/native-auto-decide.ts', 'test/helpers/owned-claude-transcript.ts', 'test/helpers/parity-harness.ts', 'test/helpers/plan-count-artifacts.ts', 'test/helpers/plan-count-file-permission.ts', 'test/helpers/plan-count-fixture.ts', 'test/helpers/plan-count-pending-exit.ts', 'test/helpers/plan-count-pending-question.ts', 'test/helpers/plan-count-transcript.ts', 'test/helpers/plan-floor-review.ts', 'test/helpers/plan-floor-target.ts', 'test/helpers/plan-scope-selection.ts', 'test/helpers/plan-seed-submission.ts', 'test/helpers/plan-skill-question-events.ts', 'test/helpers/plan-skill-question-hook-scope.ts', 'test/helpers/plan-skill-questions.ts', 'test/helpers/pty-screen.ts', 'test/helpers/pty-trust-dialog.ts', 'test/helpers/skill-census.ts'],
'carve-section-loading-land-and-deploy': ['land-and-deploy/**', 'setup', 'bin/gstack-bun-version.sh', 'bin/gstack-state-root.sh', 'lib/state-root.ts', 'bin/gstack-review-log', 'bin/gstack-review-read', 'lib/review-evidence.ts', 'bin/gstack-slug', 'bin/gstack-remote-identity.sh', 'bin/gstack-wtree', 'bin/gstack-config', 'bin/gstack-brain-enqueue', 'test/fixtures/autoplan-amend-input-77.json', 'test/fixtures/autoplan-phase-handoff-6714.json', 'test/fixtures/plan-scope-recovery-av.json', 'test/fixtures/design-scope-checkpoint-at.json', 'scripts/resolvers/composition.ts', 'autoplan/**', 'test/helpers/carve-guards.ts', 'scripts/resolvers/sections.ts', 'scripts/resolvers/redact-doc.ts', 'scripts/gen-skill-docs.ts', 'test/helpers/auq-sdk-capture.ts', 'test/helpers/session-runner.ts', 'bin/gstack-autoplan-snapshot.ts', 'test/fixtures/autoplan/t-ceo-omitted-obligations.json', 'test/fixtures/autoplan/u-ceo-original-loss.json', 'test/fixtures/autoplan/v-ceo-dangling-references.json', 'scripts/resolvers/preamble/generate-preamble-bash.ts', 'scripts/resolvers/preamble/generate-completion-status.ts', 'test/carve-section-loading.test.ts', 'test/helpers/carve-section-case.ts', 'test/fixtures/design-html-section-complete.md', 'test/helpers/carve-plan-fixture.ts', 'test/fixtures/carve-existing-repository/**', 'scripts/resolvers/review-dashboard.ts', 'scripts/resolvers/plan-gates.ts', 'scripts/resolvers/spec-review.ts', 'scripts/resolvers/outside-voice-steps.ts', 'scripts/resolvers/review-scope.ts', 'scripts/resolvers/outside-voice.ts', 'scripts/resolvers/preamble/generate-ask-user-format.ts', 'test/helpers/agent-sdk-runner.ts', 'test/helpers/auq-native-capture.ts', 'test/helpers/auto-decision-state.ts', 'test/helpers/autoplan-artifact-digest.ts', 'test/helpers/autoplan-artifact-permission.ts', 'test/helpers/autoplan-artifact-recorder.ts', 'test/helpers/capture-parity-baseline.ts', 'test/helpers/claude-pty-runner.ts', 'test/helpers/pty/**', 'test/helpers/dx-selected-navigation.ts', 'test/helpers/e2e-gate.ts', 'test/helpers/eng-cache-writer-decision.ts', 'test/helpers/hermetic-skill-runtime.ts', 'test/helpers/llm-judge.ts', 'test/helpers/native-auto-decide.ts', 'test/helpers/owned-claude-transcript.ts', 'test/helpers/parity-harness.ts', 'test/helpers/plan-count-artifacts.ts', 'test/helpers/plan-count-file-permission.ts', 'test/helpers/plan-count-fixture.ts', 'test/helpers/plan-count-pending-exit.ts', 'test/helpers/plan-count-pending-question.ts', 'test/helpers/plan-count-transcript.ts', 'test/helpers/plan-floor-review.ts', 'test/helpers/plan-floor-target.ts', 'test/helpers/plan-scope-selection.ts', 'test/helpers/plan-seed-submission.ts', 'test/helpers/plan-skill-question-events.ts', 'test/helpers/plan-skill-question-hook-scope.ts', 'test/helpers/plan-skill-questions.ts', 'test/helpers/pty-screen.ts', 'test/helpers/pty-trust-dialog.ts', 'test/helpers/skill-census.ts'],
'carve-section-loading-plan-design-review': ['plan-design-review/**', 'setup', 'bin/gstack-bun-version.sh', 'bin/gstack-state-root.sh', 'lib/state-root.ts', 'bin/gstack-review-log', 'bin/gstack-review-read', 'lib/review-evidence.ts', 'bin/gstack-slug', 'bin/gstack-remote-identity.sh', 'bin/gstack-wtree', 'bin/gstack-config', 'bin/gstack-brain-enqueue', 'test/fixtures/autoplan-amend-input-77.json', 'test/fixtures/autoplan-phase-handoff-6714.json', 'test/fixtures/plan-scope-recovery-av.json', 'test/fixtures/design-scope-checkpoint-at.json', 'scripts/resolvers/composition.ts', 'autoplan/**', 'test/helpers/carve-guards.ts', 'scripts/resolvers/sections.ts', 'scripts/resolvers/redact-doc.ts', 'scripts/gen-skill-docs.ts', 'test/helpers/auq-sdk-capture.ts', 'test/helpers/session-runner.ts', 'bin/gstack-autoplan-snapshot.ts', 'test/fixtures/autoplan/t-ceo-omitted-obligations.json', 'test/fixtures/autoplan/u-ceo-original-loss.json', 'test/fixtures/autoplan/v-ceo-dangling-references.json', 'scripts/resolvers/preamble/generate-preamble-bash.ts', 'scripts/resolvers/preamble/generate-completion-status.ts', 'test/carve-section-loading.test.ts', 'test/helpers/carve-section-case.ts', 'test/fixtures/design-html-section-complete.md', 'test/helpers/carve-plan-fixture.ts', 'test/fixtures/carve-existing-repository/**', 'scripts/resolvers/review-dashboard.ts', 'scripts/resolvers/plan-gates.ts', 'scripts/resolvers/spec-review.ts', 'scripts/resolvers/outside-voice-steps.ts', 'scripts/resolvers/review-scope.ts', 'scripts/resolvers/outside-voice.ts', 'scripts/resolvers/preamble/generate-ask-user-format.ts', 'test/helpers/agent-sdk-runner.ts', 'test/helpers/auq-native-capture.ts', 'test/helpers/auto-decision-state.ts', 'test/helpers/autoplan-artifact-digest.ts', 'test/helpers/autoplan-artifact-permission.ts', 'test/helpers/autoplan-artifact-recorder.ts', 'test/helpers/capture-parity-baseline.ts', 'test/helpers/claude-pty-runner.ts', 'test/helpers/pty/**', 'test/helpers/dx-selected-navigation.ts', 'test/helpers/e2e-gate.ts', 'test/helpers/eng-cache-writer-decision.ts', 'test/helpers/hermetic-skill-runtime.ts', 'test/helpers/llm-judge.ts', 'test/helpers/native-auto-decide.ts', 'test/helpers/owned-claude-transcript.ts', 'test/helpers/parity-harness.ts', 'test/helpers/plan-count-artifacts.ts', 'test/helpers/plan-count-file-permission.ts', 'test/helpers/plan-count-fixture.ts', 'test/helpers/plan-count-pending-exit.ts', 'test/helpers/plan-count-pending-question.ts', 'test/helpers/plan-count-transcript.ts', 'test/helpers/plan-floor-review.ts', 'test/helpers/plan-floor-target.ts', 'test/helpers/plan-scope-selection.ts', 'test/helpers/plan-seed-submission.ts', 'test/helpers/plan-skill-question-events.ts', 'test/helpers/plan-skill-question-hook-scope.ts', 'test/helpers/plan-skill-questions.ts', 'test/helpers/pty-screen.ts', 'test/helpers/pty-trust-dialog.ts', 'test/helpers/skill-census.ts'],
@@ -1293,6 +1295,8 @@ export const E2E_TIERS: Record<string, 'gate' | 'periodic' | 'marathon'> = {
'carve-section-loading-design-html': 'periodic',
'carve-section-loading-design-shotgun': 'periodic',
'carve-section-loading-document-release': 'periodic',
'carve-section-loading-benchmark': 'periodic',
'carve-section-loading-context-restore': 'periodic',
'carve-section-loading-investigate': 'periodic',
'carve-section-loading-land-and-deploy': 'periodic',
'carve-section-loading-plan-design-review': 'periodic',
@@ -1757,6 +1761,8 @@ export const E2E_KINDS: Record<string, 'rule' | 'behavior' | 'judge'> = {
'carve-section-loading-design-html': 'rule',
'carve-section-loading-design-shotgun': 'rule',
'carve-section-loading-document-release': 'rule',
'carve-section-loading-benchmark': 'rule',
'carve-section-loading-context-restore': 'rule',
'carve-section-loading-investigate': 'rule',
'carve-section-loading-land-and-deploy': 'rule',
'carve-section-loading-plan-design-review': 'rule',
+18 -3
View File
@@ -13,12 +13,12 @@ import { CARVE_GUARDS } from './helpers/carve-guards';
const ROOT = path.resolve(import.meta.dir, '..');
const read = (rel: string) => fs.readFileSync(path.join(ROOT, rel), 'utf8');
const RECIPES = ['flake', 'polluter', 'race', 'eval-bisect', 'backlog'] as const;
const RECIPES = ['flake', 'polluter', 'race', 'eval-bisect', 'backlog', 'blast-radius'] as const;
describe('investigate carve', () => {
const manifest = JSON.parse(read('investigate/sections/manifest.json')) as { skill: string; sections: Array<{ id: string; file: string; trigger: string }> };
const skeleton = read('investigate/SKILL.md');
test('manifest lists the five recipes and the registry guards them', () => {
test('manifest lists the six recipes and the registry guards them', () => {
expect(manifest.skill).toBe('investigate');
expect(manifest.sections.map(s => s.id)).toEqual([...RECIPES]);
expect(CARVE_GUARDS.investigate!.expectedSections).toEqual(manifest.sections.map(s => s.file));
@@ -95,13 +95,28 @@ describe('recipe tokens', () => {
expect(backlog).toMatch(/no `gh issue close`/);
expect(backlog).not.toMatch(/gh issue close <n>/);
});
test('blast-radius: the one safety fact, the five-rung ladder, look where grep stops, confirmed and cleared risks apart, the Phase 4 pointer and the shared-premise red flag', () => {
const blast = read('investigate/sections/blast-radius.md');
expect(blast).toContain('## Blast radius');
expect(blast).toContain('**Name the one fact it is safe because of.**');
expect(blast).toContain('**Look where grep stops.**');
expect(blast).toMatch(/1\. You said so\.[\s\S]*5\. You reproduced it in the running app\./);
expect(blast).toContain('**Keep confirmed risks and cleared risks apart.**');
expect(blast).toContain('the word "unproven"');
const skeleton = read('investigate/SKILL.md');
const phase4 = skeleton.slice(skeleton.indexOf('## Phase 4: Implementation'), skeleton.indexOf('## Phase 5: Verification & Report'));
expect(phase4).toContain('sections/blast-radius.md');
expect(phase4.indexOf('sections/blast-radius.md')).toBeLessThan(phase4.indexOf('**Fix the root cause, not the symptom.**'));
const phase3 = skeleton.slice(skeleton.indexOf('## Phase 3: Hypothesis Testing'), skeleton.indexOf('## Phase 4: Implementation'));
expect(phase3).toMatch(/Two fixes that shared one premise failed the same gate — write the premise down in one sentence and test it before a third fix/);
});
});
describe('external hosts inline the recipes', () => {
const codex = path.join(ROOT, '.agents', 'skills', 'gstack-investigate', 'SKILL.md');
test.skipIf(!fs.existsSync(codex))('the codex render carries every recipe heading and no section pointer', () => {
const text = fs.readFileSync(codex, 'utf8');
for (const heading of ['## Flake recipe', '## Polluter recipe', '## Race recipe', '## Eval bisect recipe', '## Backlog mode']) expect(text).toContain(heading);
for (const heading of ['## Flake recipe', '## Polluter recipe', '## Race recipe', '## Eval bisect recipe', '## Backlog mode', '## Blast radius']) expect(text).toContain(heading);
expect(text).not.toContain('sections/flake.md');
});
});
+3 -1
View File
@@ -811,7 +811,9 @@ console.log("Ran 1 tests across 1 files. [1ms]"); process.exit(${fail ? 1 : 0});
// The report's after-a-repair command selects exactly one case: --case when it resolves, else that shard's file.
expect(afterRepairCommand('gate', 'plan-mode-no-op', 'test/skill-e2e-plan-mode-no-op.test.ts')).toBe('bun run scripts/test-paid-shards.ts --tier gate --case plan-mode-no-op');
expect(afterRepairCommand('periodic', 'carve-section-loading', 'test/carve-section-loading-qa.test.ts')).toBe('EVALS=1 EVALS_TIER=periodic bun test test/carve-section-loading-qa.test.ts');
});
// caseSelection parses every paid file once per registered id; the loop took 4.97 s
// on a 4-core machine at main (2026-10-26), so the default 5 s budget is not a measurement of anything.
}, 30_000);
test('B4: --list prints the selection; an unknown id exits non-zero before any process starts', () => {
const run = (args: string[]) => spawnSync(process.execPath, [path.join(ROOT, 'scripts/test-paid-shards.ts'), ...args], { encoding: 'utf8', timeout: 60_000, cwd: ROOT });
+103
View File
@@ -0,0 +1,103 @@
/**
* pstack absorb (GSTA-116 plan, items 6 and 9): benchmark's vet-the-number
* section and plan-eng-review's design-twice section. Pins the carve shape
* (manifest ids, STOP pointers, where each pointer sits) and the tokens each
* section must carry; prose is not pinned.
*/
import { describe, expect, test } from 'bun:test';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { CARVE_GUARDS } from './helpers/carve-guards';
const ROOT = path.resolve(import.meta.dir, '..');
const read = (rel: string) => fs.readFileSync(path.join(ROOT, rel), 'utf8');
describe('benchmark carve: vet the number', () => {
const skeleton = read('benchmark/SKILL.md');
const section = read('benchmark/sections/vet-the-number.md');
const manifest = JSON.parse(read('benchmark/sections/manifest.json')) as { skill: string; sections: Array<{ id: string; file: string }> };
test('one section, registered, pointed to at the top of Phase 5 before any comparison is written', () => {
expect(manifest.skill).toBe('benchmark');
expect(manifest.sections.map(s => s.id)).toEqual(['vet-the-number']);
expect(CARVE_GUARDS.benchmark!.expectedSections).toEqual(['vet-the-number.md']);
const phase5 = skeleton.indexOf('### Phase 5: Comparison');
const stop = skeleton.indexOf('> **STOP.**');
expect(skeleton.indexOf('## Arguments')).toBeLessThan(stop);
expect(stop).toBeGreaterThan(phase5);
expect(stop).toBeLessThan(skeleton.indexOf('If baseline exists, compare current metrics against it'));
expect(skeleton.match(/> \*\*STOP\.\*\*/g)).toHaveLength(1);
expect(skeleton).toContain('sections/vet-the-number.md');
expect(skeleton).toMatch(/\*\*Vet every number before reporting it\.\*\*/);
});
test('the seven questions, the one-run ballpark rule, the 11% arithmetic, alternating runs, and the inconclusive verdict', () => {
expect(section).toContain('## Vet the number');
const questions = ['**Why not double?**', '**Was it tuned?**', '**Did it break a limit?**', '**Did it error?**', '**Does it reproduce?**', '**Does it matter?**', '**Did it even happen?**'];
let last = -1;
for (const q of questions) {
const at = section.indexOf(q);
expect(at, q).toBeGreaterThan(last);
last = at;
}
expect(section).toContain('Name the limiter');
expect(section).toMatch(/one run,\s+still answer questions 4 and 7/);
expect(section).toMatch(/10%[\s\S]*at most about 11% faster/);
expect(section).toMatch(/alternating A, B, A, B/);
expect(section).toContain('A gap smaller than the run-to-run');
expect(section).toMatch(/faster, slower, no measurable difference, or\s+inconclusive/);
expect(section).toMatch(/cannot name the limiter/);
});
});
describe('plan-eng-review carve: two shapes before one', () => {
const skeleton = read('plan-eng-review/SKILL.md');
const section = read('plan-eng-review/sections/design-twice.md');
const manifest = JSON.parse(read('plan-eng-review/sections/manifest.json')) as { sections: Array<{ id: string; file: string; scope?: string; runner_only?: boolean }> };
test('registered beside review-sections, pointed to before it, and visible to the autoplan runner', () => {
expect(manifest.sections.map(s => s.id)).toEqual(['review-sections', 'design-twice', 'checklist']);
const entry = manifest.sections.find(s => s.id === 'design-twice')!;
expect(entry.scope).toBe('always');
expect(entry.runner_only).toBeUndefined();
expect(CARVE_GUARDS['plan-eng-review']!.expectedSections).toEqual(['design-twice.md', 'review-sections.md']);
const designStop = skeleton.indexOf('sections/design-twice.md', skeleton.indexOf('> **STOP.**'));
const reviewStop = skeleton.indexOf('sections/review-sections.md', skeleton.indexOf('> **STOP.**'));
expect(designStop).toBeGreaterThan(0);
expect(designStop).toBeLessThan(reviewStop);
expect(skeleton.lastIndexOf('EXIT PLAN MODE GATE')).toBeGreaterThan(skeleton.lastIndexOf('> **STOP.**'));
expect(read('plan-eng-review/sections/checklist.md')).toContain('Two shapes before one (design-twice)');
});
test('a second structurally distinct shape, interface depth, the agent-contributor assumption, and the eight red flags in order', () => {
expect(section).toContain('## Two shapes before one');
expect(section).toContain('### Ask for the second shape');
expect(section).toMatch(/require a second shape that is structurally\s+different/);
expect(section).toMatch(/A point fix inside the first shape is not a\s+second candidate\./);
expect(section).toContain('interface depth');
expect(section).toContain('A deep module is not a deep call chain');
expect(section).toMatch(/an agent that sees only the files it opened, copies the nearest example\s+and takes the shortest path that compiles/);
const flags = ['**Shallow module.**', '**Information leakage.**', '**Temporal decomposition.**', '**Pass-through method.**', '**Split ownership.**', '**Two ways to do one task.**', '**Importable internals.**', '**Hand-synced list.**'];
let last = section.indexOf('### The eight red flags');
expect(last).toBeGreaterThan(0);
for (const f of flags) {
const at = section.indexOf(f);
expect(at, f).toBeGreaterThan(last);
last = at;
}
});
});
describe('every pstack-derived section carries its credit line', () => {
for (const rel of ['investigate/sections/blast-radius.md.tmpl', 'context-restore/sections/transcripts.md.tmpl', 'benchmark/sections/vet-the-number.md.tmpl', 'plan-eng-review/sections/design-twice.md.tmpl']) {
test(rel, () => {
const first = read(rel).split('\n')[0]!;
expect(first.startsWith('<!--')).toBe(true);
expect(first).toContain('pstack');
expect(first).toContain('MIT');
expect(first).toContain('rewritten');
expect(first).toContain('See NOTICE.md');
expect(read('NOTICE.md')).toContain(rel.replace('.tmpl', ''));
});
}
});
+1 -1
View File
@@ -6,7 +6,7 @@ const ptyIds = [
'plan-devex-review-plan-mode', 'plan-mode-no-op', 'office-hours-auto-mode',
'auto-decide-preserved', 'plan-ceo-mode-routing', 'plan-design-with-ui-scope', 'plan-eng-finding-floor',
// The two formerly keyless AUQ probes (W1b) import the same SDK capture helper as auq-format-gate, which reaches the PTY runner.
'auq-format-gate', 'auq-consistency', 'auq-verbose-vs-carved-ab', ...['browse', 'codex', 'design-consultation', 'design-html', 'design-shotgun', 'document-release', 'investigate', 'land-and-deploy',
'auq-format-gate', 'auq-consistency', 'auq-verbose-vs-carved-ab', ...['benchmark', 'browse', 'codex', 'context-restore', 'design-consultation', 'design-html', 'design-shotgun', 'document-release', 'investigate', 'land-and-deploy',
'plan-design-review', 'plan-devex-review', 'plan-eng-review', 'qa', 'retro', 'review', 'setup-gbrain', 'spec'].map(skill => `carve-section-loading-${skill}`),
'office-hours-section-loading', 'office-hours-design-draft', 'plan-ceo-section-loading', 'ship-section-loading',
'plan-ceo-finding-floor', 'plan-design-finding-floor', 'plan-devex-finding-floor',