mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-09 06:28:59 +02:00
chore(guards): register wave-2 carves (15 carved skills); autoplan monolith retires; baselines follow
CARVE_GUARDS gains autoplan (behavioral: external via the chain eval), spec, and setup-gbrain; autoplan's MONOLITH_INVARIANTS entry retires. Touchfiles: setup-gbrain periodic dep lists gain the section tmpls + fixture helper; the stale-brain-refs scan covers setup-gbrain/sections. Regen + goldens + branch baseline + ratchet recaptured. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
cdfe2d9074
commit
706091cbf9
Vendored
+3
-3
@@ -2,7 +2,7 @@
|
||||
"_comment": "Context-budget ratchet ceilings (~tokens). Regenerate: bun test/helpers/capture-context-budget.ts. Headroom: alwaysOnTotal x1.05, eagerPerInvocation x1.1. Graded by test/context-budget-ratchet.test.ts via lib/context-bill.ts checkBudget.",
|
||||
"alwaysOnTotal": 6344,
|
||||
"eagerPerInvocation": {
|
||||
"autoplan": 21874,
|
||||
"autoplan": 15337,
|
||||
"benchmark": 4856,
|
||||
"benchmark-models": 3829,
|
||||
"browse": 10212,
|
||||
@@ -55,10 +55,10 @@
|
||||
"scrape": 3939,
|
||||
"setup-browser-cookies": 3119,
|
||||
"setup-deploy": 9674,
|
||||
"setup-gbrain": 19678,
|
||||
"setup-gbrain": 14882,
|
||||
"ship": 18275,
|
||||
"skillify": 11520,
|
||||
"spec": 17090,
|
||||
"spec": 13243,
|
||||
"sync-gbrain": 13302,
|
||||
"unfreeze": 393
|
||||
}
|
||||
|
||||
+22
-22
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"tag": "v1.69.1.0",
|
||||
"capturedAt": "2026-08-25T16:33:17.541Z",
|
||||
"capturedFromCommit": "c7488f7e",
|
||||
"capturedAt": "2026-08-25T16:58:29.504Z",
|
||||
"capturedFromCommit": "2877b63a",
|
||||
"capturedFromBranch": "prompt-token-load-reduction",
|
||||
"totalSkills": 53,
|
||||
"totalCorpusBytes": 2798083,
|
||||
"totalCorpusBytes": 2807143,
|
||||
"estTotalCatalogTokens": 4195,
|
||||
"topHeaviest": [
|
||||
{
|
||||
@@ -98,23 +98,23 @@
|
||||
"hasPeriodicEval": false
|
||||
},
|
||||
{
|
||||
"skill": "codex",
|
||||
"skillMdBytes": 84304,
|
||||
"skillMdLines": 886,
|
||||
"estTokens": 21076,
|
||||
"tmplBytes": 16072,
|
||||
"descriptionLen": 187,
|
||||
"skill": "autoplan",
|
||||
"skillMdBytes": 86921,
|
||||
"skillMdLines": 1046,
|
||||
"estTokens": 21730,
|
||||
"tmplBytes": 23529,
|
||||
"descriptionLen": 336,
|
||||
"hasGateEval": true,
|
||||
"hasPeriodicEval": false
|
||||
"hasPeriodicEval": true
|
||||
}
|
||||
],
|
||||
"skills": {
|
||||
"autoplan": {
|
||||
"skill": "autoplan",
|
||||
"skillMdBytes": 83714,
|
||||
"skillMdLines": 1487,
|
||||
"estTokens": 20929,
|
||||
"tmplBytes": 46355,
|
||||
"skillMdBytes": 86921,
|
||||
"skillMdLines": 1046,
|
||||
"estTokens": 21730,
|
||||
"tmplBytes": 23529,
|
||||
"descriptionLen": 336,
|
||||
"hasGateEval": true,
|
||||
"hasPeriodicEval": true
|
||||
@@ -581,10 +581,10 @@
|
||||
},
|
||||
"setup-gbrain": {
|
||||
"skill": "setup-gbrain",
|
||||
"skillMdBytes": 75311,
|
||||
"skillMdLines": 1501,
|
||||
"estTokens": 18828,
|
||||
"tmplBytes": 48298,
|
||||
"skillMdBytes": 79139,
|
||||
"skillMdLines": 1060,
|
||||
"estTokens": 19785,
|
||||
"tmplBytes": 27628,
|
||||
"descriptionLen": 325,
|
||||
"hasGateEval": true,
|
||||
"hasPeriodicEval": false
|
||||
@@ -611,10 +611,10 @@
|
||||
},
|
||||
"spec": {
|
||||
"skill": "spec",
|
||||
"skillMdBytes": 65405,
|
||||
"skillMdLines": 1229,
|
||||
"estTokens": 16351,
|
||||
"tmplBytes": 32196,
|
||||
"skillMdBytes": 67430,
|
||||
"skillMdLines": 901,
|
||||
"estTokens": 16858,
|
||||
"tmplBytes": 19784,
|
||||
"descriptionLen": 282,
|
||||
"hasGateEval": true,
|
||||
"hasPeriodicEval": false
|
||||
|
||||
@@ -456,6 +456,100 @@ export const CARVE_GUARDS: Record<string, CarveGuard> = {
|
||||
minUnionBytes: 91_000, // Phase 4 wave 1; estimated union ~94.9KB
|
||||
mustContain: ['readiness', 'merge', 'canary', 'revert', 'staging'],
|
||||
},
|
||||
// ── Token-reduction Phase 4 wave 2 (v1.69.x branch) ──────────────────────
|
||||
autoplan: {
|
||||
skill: 'autoplan',
|
||||
expectedSections: ['ceo-phase.md', 'design-phase.md', 'eng-phase.md', 'dx-phase.md', 'tasks-aggregator.md'],
|
||||
requiredReads: ['ceo-phase.md', 'eng-phase.md', 'tasks-aggregator.md'],
|
||||
scenario:
|
||||
'Run the /autoplan pipeline against the plan in PLAN.md. Codex and subagent tools are unavailable — note both voices unavailable (single-reviewer mode) and keep going. The plan has no UI scope and no developer-facing scope, so Phase 2 and Phase 3.5 are skipped (do not read their sections). Execute Phase 1 (CEO) and Phase 3 (Eng) at full depth, run the Phase 4 aggregator step, and produce the Final Approval Gate summary as the report.',
|
||||
staticInvariants: {
|
||||
mustStayInSkeleton: [
|
||||
'## The 6 Decision Principles',
|
||||
'## Sequential Execution — MANDATORY',
|
||||
'## Decision Classification',
|
||||
'## Filesystem Boundary — Codex Prompts',
|
||||
'## Phase 0.5: Codex auth + version preflight',
|
||||
'## Pre-Gate Verification',
|
||||
'## Phase 2: Design Review (conditional — skip if no UI scope)',
|
||||
'## Phase 3.5: DX Review (conditional — skip if no developer-facing scope)',
|
||||
'- Scope gate (the plan under review is already the target)',
|
||||
],
|
||||
mustPrecedeStop: ['## The 6 Decision Principles', '## Sequential Execution — MANDATORY', '## Decision Classification'],
|
||||
mustMoveToSection: [
|
||||
'CEO DUAL VOICES — CONSENSUS TABLE:',
|
||||
'CODEX SAYS (design — UX challenge)',
|
||||
'ENG DUAL VOICES — CONSENSUS TABLE:',
|
||||
'DX DUAL VOICES — CONSENSUS TABLE:',
|
||||
'## Implementation Tasks aggregator',
|
||||
],
|
||||
gateAfterStop: 'AskUserQuestion options:',
|
||||
},
|
||||
behavioral: 'external',
|
||||
externalTest: 'test/skill-e2e-autoplan-chain.test.ts', // phase-complete markers live ONLY in sections — its assertions ARE section-read proof
|
||||
maxSkeletonBytes: 59_300, // Phase 4 wave 2; measured 58,696
|
||||
minUnionBytes: 85_000, // measured union 86,926
|
||||
mustContain: ['6 Decision Principles', 'TASTE DECISION', 'USER CHALLENGE', 'consensus', 'Restore Point'],
|
||||
},
|
||||
spec: {
|
||||
skill: 'spec',
|
||||
expectedSections: ['gate-and-file.md'],
|
||||
requiredReads: ['gate-and-file.md'],
|
||||
scenario:
|
||||
"The user already completed Phases 1-4 of /spec for the request 'add a --json output flag to the CLI status command'. Treat the five Phase 1 answers, the scope lock, and the technical interrogation as settled, and the Phase 4 draft as CONFIRMED by the user. Continue from that point in file-only mode (--no-execute is set): run the Phase 4.5 sequence and Phase 5, simulating every external command (codex, gh, the redaction bin) by stating what you would run and the expected outcome instead of executing it. Do NOT use AskUserQuestion.",
|
||||
staticInvariants: {
|
||||
mustStayInSkeleton: [
|
||||
'HARD GATE',
|
||||
'### Phase 1: Understand the "Why"',
|
||||
'### Phase 3: Technical Interrogation',
|
||||
'### Phase 4: Draft Review',
|
||||
'gstack-issue-guard',
|
||||
'## Issue Structure Templates',
|
||||
],
|
||||
mustPrecedeStop: ['## Flag Reference', '### Phase 1: Understand the "Why"'],
|
||||
mustMoveToSection: [
|
||||
'<<<USER_SPEC>>>',
|
||||
'SEMANTIC_REVIEW: clean',
|
||||
'gh issue create --title',
|
||||
'PIN_SHA=$(git rev-parse HEAD)',
|
||||
],
|
||||
gateAfterStop: undefined,
|
||||
},
|
||||
behavioral: 'prompt',
|
||||
maxSkeletonBytes: 51_200, // Phase 4 wave 2: Phases 4.5-5 carved at the post-confirmation boundary; measured 50,681
|
||||
minUnionBytes: 64_500, // measured union 67,430
|
||||
mustContain: ['HARD GATE', 'dedupe', 'quality gate', 'acceptance criteria', 'archive'],
|
||||
},
|
||||
'setup-gbrain': {
|
||||
skill: 'setup-gbrain',
|
||||
expectedSections: ['engine-remediation.md', 'brain-init.md', 'transcript-gate.md', 'claude-md-persist.md'],
|
||||
requiredReads: ['brain-init.md', 'claude-md-persist.md'],
|
||||
scenario:
|
||||
"Walk /setup-gbrain in SIMULATION — do not execute any bash, install anything, or register MCP; for each step state the exact commands you WOULD run. Treat Step 1 detect as: gbrain_on_path=false, gbrain_local_status=missing-config, no shortcut flags. Treat Path 3 (PGLite local) as already picked at Step 2 — do not use AskUserQuestion. Walk Steps 3, 4 (Path 3 init), 5, 5a, and 8: read each step's pointed section before doing it, and write out the exact CLAUDE.md block Step 8 would persist. Skip Steps 6, 7, 7.5, 9, 9.5, and 10. End with a one-paragraph setup summary.",
|
||||
staticInvariants: {
|
||||
mustStayInSkeleton: [
|
||||
'## Step 2: Pick a path (AskUserQuestion)',
|
||||
'## Step 1: Detect current state',
|
||||
'gbrain_mcp_mode=remote-http',
|
||||
'claude mcp add --scope user --transport http gbrain',
|
||||
'SKIP entirely on Path 4 (Remote MCP)',
|
||||
'<YOUR_TOKEN>',
|
||||
],
|
||||
mustPrecedeStop: ['## Step 1: Detect current state'],
|
||||
mustMoveToSection: [
|
||||
'### Path 1 (Supabase, existing URL)',
|
||||
'read_secret_to_env GBRAIN_MCP_TOKEN',
|
||||
'Mode: remote-http',
|
||||
'gstack-memory-ingest.ts --probe',
|
||||
],
|
||||
gateAfterStop: undefined,
|
||||
},
|
||||
behavioral: 'prompt',
|
||||
maxSkeletonBytes: 57_600, // Phase 4 wave 2; measured 56,954
|
||||
minUnionBytes: 78_300, // measured union 79,139
|
||||
mustContain: ['PGLite', 'Supabase', 'claude mcp add', 'read_secret_to_env', 'pooler'],
|
||||
maxSizeRatio: 1.07, // measured 1.051 vs the branch monolith: index + stubs + 4 STOP pointers
|
||||
},
|
||||
};
|
||||
|
||||
/** Sorted carved-skill names. Consumers derive their lists from this — no parallel lists. */
|
||||
|
||||
@@ -206,7 +206,7 @@ export function runParityChecks(opts: {
|
||||
*/
|
||||
const MONOLITH_INVARIANTS: ParityInvariant[] = [
|
||||
// cso is now carved — its invariant is generated from CARVE_GUARDS below.
|
||||
// review, codex, and land-and-deploy carved in token-reduction Phase 4
|
||||
// review, codex, land-and-deploy (wave 1) and autoplan (wave 2) carved in token-reduction Phase 4
|
||||
// wave 1 (v1.69.x branch) — their invariants generate from CARVE_GUARDS too.
|
||||
{
|
||||
skill: 'qa',
|
||||
@@ -237,16 +237,6 @@ const MONOLITH_INVARIANTS: ParityInvariant[] = [
|
||||
maxSizeRatio: 1.12, // D1 measured
|
||||
minBytes: 30_000,
|
||||
},
|
||||
{
|
||||
skill: 'autoplan',
|
||||
mustContain: ['ceo', 'eng', 'design'],
|
||||
mustHaveHeadings: ['## Preamble', '## When to invoke'],
|
||||
// v1.2.0 activation lift: shared first-run-guidance preamble section.
|
||||
// Fork port wave 2 (D1): the evidence-before-claimed-limitations preamble
|
||||
// directive adds ~0.45KB to every tier-2+ skill. Measured values noted.
|
||||
maxSizeRatio: 1.09, // D1 measured
|
||||
minBytes: 70_000,
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -175,13 +175,13 @@ export const E2E_TOUCHFILES: Record<string, string[]> = {
|
||||
// Agent SDK. Gate-tier (deterministic stub server, fixed inputs); fires
|
||||
// when the skill template, the verify helper, the artifacts-init helper,
|
||||
// or the detect script changes.
|
||||
'setup-gbrain-remote': ['setup-gbrain/SKILL.md.tmpl', 'bin/gstack-gbrain-mcp-verify', 'bin/gstack-artifacts-init', 'bin/gstack-gbrain-detect', 'test/helpers/agent-sdk-runner.ts', 'test/skill-e2e-setup-gbrain-remote.test.ts'],
|
||||
'setup-gbrain-bad-token': ['setup-gbrain/SKILL.md.tmpl', 'bin/gstack-gbrain-mcp-verify', 'test/helpers/agent-sdk-runner.ts', 'test/skill-e2e-setup-gbrain-bad-token.test.ts'],
|
||||
'setup-gbrain-remote': ['setup-gbrain/sections/brain-init.md.tmpl', 'setup-gbrain/sections/claude-md-persist.md.tmpl', 'setup-gbrain/sections/manifest.json', 'test/helpers/setup-gbrain-fixture.ts', 'setup-gbrain/SKILL.md.tmpl', 'bin/gstack-gbrain-mcp-verify', 'bin/gstack-artifacts-init', 'bin/gstack-gbrain-detect', 'test/helpers/agent-sdk-runner.ts', 'test/skill-e2e-setup-gbrain-remote.test.ts'],
|
||||
'setup-gbrain-bad-token': ['setup-gbrain/sections/brain-init.md.tmpl', 'setup-gbrain/sections/manifest.json', 'test/helpers/setup-gbrain-fixture.ts', 'setup-gbrain/SKILL.md.tmpl', 'bin/gstack-gbrain-mcp-verify', 'test/helpers/agent-sdk-runner.ts', 'test/skill-e2e-setup-gbrain-bad-token.test.ts'],
|
||||
// v1.34.0.0 split-engine Path 4 + Step 4.5 Yes (local PGLite for code).
|
||||
// Periodic-tier per codex #12 (AgentSDK harness is non-deterministic).
|
||||
// Fires when the setup-gbrain template, install/verify/init helpers, or
|
||||
// the agent-sdk-runner harness changes.
|
||||
'setup-gbrain-path4-local-pglite': ['setup-gbrain/SKILL.md.tmpl', 'bin/gstack-gbrain-mcp-verify', 'bin/gstack-gbrain-install', 'bin/gstack-gbrain-detect', 'lib/gbrain-local-status.ts', 'test/helpers/agent-sdk-runner.ts', 'test/skill-e2e-setup-gbrain-path4-local-pglite.test.ts'],
|
||||
'setup-gbrain-path4-local-pglite': ['setup-gbrain/sections/brain-init.md.tmpl', 'setup-gbrain/sections/claude-md-persist.md.tmpl', 'setup-gbrain/sections/manifest.json', 'test/helpers/setup-gbrain-fixture.ts', 'setup-gbrain/SKILL.md.tmpl', 'bin/gstack-gbrain-mcp-verify', 'bin/gstack-gbrain-install', 'bin/gstack-gbrain-detect', 'lib/gbrain-local-status.ts', 'test/helpers/agent-sdk-runner.ts', 'test/skill-e2e-setup-gbrain-path4-local-pglite.test.ts'],
|
||||
|
||||
// AskUserQuestion format regression (RECOMMENDATION + Completeness: N/10)
|
||||
// Fires when either template OR the two preamble resolvers change.
|
||||
|
||||
@@ -81,6 +81,7 @@ const SCAN_PATHS = [
|
||||
'bin/',
|
||||
'scripts/',
|
||||
'setup-gbrain/SKILL.md.tmpl',
|
||||
'setup-gbrain/sections',
|
||||
'sync-gbrain/SKILL.md.tmpl',
|
||||
'health/SKILL.md.tmpl',
|
||||
'plan-eng-review/SKILL.md.tmpl',
|
||||
|
||||
Reference in New Issue
Block a user