Files
gstack/autoplan/sections/ceo-phase.md.tmpl
T
Garry Tanandcapy-ai[bot] ade35bc813 v1.94.29.0 R56: everything in gstack earns its place (principle, evidence gates, inventory) (#3837)
* eval-plan: a no-gstack arm needs masking, install and audit lines

prereg --check now refuses a loaded comparison whose ## No-gstack arm
section lacks masking:, install: or audit:, or says none for one of them
(PREREG_NO_GSTACK_ARM). On Capy, run agents inherit the instruction to load
the user-drive gstack skill, so the arm hides both Capy drives, checks that
no gstack is installed, and audits drive reads; an arm that read a gstack
skill file is contaminated and gets zero credit (TESTING_INTERNALS.md
#no-gstack-arm). The prereg template, /eval-plan, troubleshooting and the
two passing prereg fixtures carry the new lines. eval-plan's paragraph was
dieted to hold its context-budget ceiling.

Evidence: safety: keeps the no-gstack control uncontaminated (Captain order, FOUN-32 via GGST-6)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* inventory: the R56 evidence ledger, gstack-inventory and skill-bill EVIDENCE

docs/inventory/evidence.json holds one row per inventory key: the skill
folders discoverTemplates() finds (root skill as gstack, symlinked folders
excluded) plus seven shared parts, 71 keys. lib/inventory.ts validates each
row by its status's own fields, with named codes (LEDGER_*), and joins the
ledger with lib/context-bill.ts buildBill. bin/gstack-inventory writes
docs/inventory.md, --check validates (exit 1 with codes), --json prints.
Paid dispatches per run for /ship and /autoplan are quoted from their own
docs and found by line, so a moved citation fails --check
(INVENTORY_SOURCE_MISSING). Every current row is grandfathered and seeded
from GEVA-2's table (org-gstack-gbrain/research/gstack-part-evidence.json):
in-flight fair tests and proposed registry rows as plans, earlier unfair
results under prior with why (stub, unmasked, ceiling, ...), five safety
rows. gstack-skill-bill prints the skill's EVIDENCE line.

Evidence: plan none (owner ruling R56, GST-914); the ledger itself is the measurement record
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* ETHOS 9, Earn Its Place: factory, /write-skill and /autoplan carry it

Garry, 2026-11-02: "Also work this principle of only include it if it is
beneficial and good into gstack". ETHOS.md principle 9 states the rule, the
fair test (claude_code preset, frontier models per R54, masked no-gstack
arm), the R48 Why-null cycle, the safety exception, and measure biggest
first, linking docs/inventory.md. factory.md item 8 cites it, trimmed
elsewhere to 3,298 of 3,300 bytes with no rule dropped. /write-skill's edit
ladder step 2 is the evidence rule and section 4 adds the Evidence: commit
line. /autoplan's CEO phase lists each part a plan adds to gstack with its
evidence or owned, dated plan; two redundant lines went to keep autoplan
under its size pins (pins lowered by 17). CONTRIBUTING.md "Adding a new
skill" and docs/skills.md point at the ledger.

Skill-Size: 3273→3666 bytes (write-skill/SKILL.md.tmpl)
Skill-Size: 12738→12721 bytes (autoplan/sections/ceo-phase.md)
Evidence: plan none (owner ruling R56, GST-914); write-skill and autoplan rows stay grandfathered untested
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fixup! inventory: the R56 evidence ledger, gstack-inventory and skill-bill EVIDENCE

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* inventory: list the evidence table's other names and its unmapped rows

Ledger rows carry aliases (the name GEVA-2's table uses where it differs from the key, such as upgrade for gstack-upgrade), and docs/inventory.md lists them beside the installed-name rule. Unmapped rows are labeled as evidence-table rows, and the ranking notes that a skill's on-demand files can also be a shared row's.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: the first inventory snapshot and the R56 changelog fragment

docs/inventory.md is generated by bin/gstack-inventory at the previous commit: 71 parts ranked by load per run, 0 helps, 0 no-effect, 0 hurts, 16 untested with a plan (4 fair tests under way, 12 proposed), 50 untested with plan none, 5 safety.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* inventory: investigate's step procedure is a fair-test CUT-CANDIDATE (GST-814)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: the inventory snapshot after investigate's no-effect row

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* inventory: only the seeded backlog may be grandfathered, so a new part's row is checked (review fix)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* inventory: devex-review and retro name their GEVA-2 registry rows (R56-11, R56-12)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: the inventory snapshot after the review fixes

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* inventory: a concrete plan is a path, gstack-inventory never writes into a gstack install, and the ledger checks aliases, r48 and prior.why (review fixes)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* inventory: investigate's no-effect row notes that only Opus 5.5 was measured

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* docs: the inventory snapshot after the review fixes

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* changelog: R56 counts after investigate's row; grandfathering and the install guard

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test: register inventory-grandfathered.json as a free fixture

free-suite (1) at e56d3312c failed FREE_FIXTURES inventory: the pinned grandfather fixture from d0b3028b5 had no paid touchfile and no FREE_FIXTURES entry. Its only reader is test/inventory.test.ts.

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>
2026-11-03 17:08:30 +00:00

148 lines
8.0 KiB
Cheetah

Before dispatch, Read {{AUTOPLAN_REVIEW_FILE:plan-ceo-review:with-sections}} per `readRanges`; log successful ranges/total to EOF. Skip-listed: load only.
Execute in this order: Step 0 (including its completed Spec Review Loop) → {{NATIVE_LABEL}}
CEO voice → {{OUTSIDE_LABEL}} CEO voice → consensus → Review Sections → saved summary → phase
announcement. Dispatching a reviewer never completes its step.
**Override rules:**
- Mode selection: SELECTIVE EXPANSION
- Premises: accept reasonable ones (P6). Queue clearly-wrong/challenged premises
as User Challenges for Phase 4: assumption, reason and cost of proceeding.
The user decides there; never stop mid-pipeline.
- List each part the plan adds to gstack (skill, step, instruction, check, default) with its
evidence or owned, dated test plan; a missing one is a finding.
- Alternatives: pick highest completeness (P1). If tied, pick simplest (P5).
If top 2 are close → mark TASTE DECISION.
- Scope expansion: in blast radius + <1d CC → approve (P2). Outside → defer to TODOS.md (P3).
Duplicates → reject (P4). Borderline (3-5 files) → mark TASTE DECISION.
**Required execution checklist (CEO):**
Complete every Step 0 analysis/output on the loaded skill's SELECTIVE EXPANSION
route with the overrides above: CEO scope document and 0H Spec Review Loop before
0I and Review Sections.
**At 0H, prepare the current input for each spec review.** Create one amendment
checkpoint; keep its `snapshotPath` as `<CEO_STEP0_CHECKPOINT>` throughout CEO:
```bash
bun "<SNAPSHOT_TOOL>" create ceo "<ACTIVE_PLAN>" "<RESTORE_PATH>" "<methodologyPath>"
```
Put every accepted behavior, condition, test and manual checklist from Step 0 in
the CEO accepted-obligations block. Preserve source-plan and DESIGN.md requirements;
User Challenges retain the original requirements. Taste is a provisional
auto-decision; accepted expansions must work without assuming queued changes are
approved. Keep decision history and pending review work in `Review record`.
Before every spec dispatch, including after each accepted spec fix, run:
```bash
bun "<SNAPSHOT_TOOL>" amend-input ceo "<ACTIVE_PLAN>" "<CEO_STEP0_CHECKPOINT>" "<RESTORE_PATH>" "<methodologyPath>"
```
Keep returned `checkpointPath` as the amendment baseline;
use returned `reviewInputPath` as `<CEO_SPEC_INPUT>`. Read that file at every
returned `readRanges` offset/limit through EOF, then read the CEO scope summary in full.
Reconcile dispositions, scope counts, proposal IDs and actual heading/test references
between them. Link deferrals to actual TODOs or pending writes. Fix summary drift
without changing decisions, dropping findings/required fields or inventing references.
If the working plan changes, repeat `amend-input` and the readback before dispatch.
Supply the complete CEO scope summary and `<CEO_SPEC_INPUT>` to the loaded Spec
Review Loop. The checkpoint is immutable prior state; never supply it as the current
working plan. A failed preparation is an input failure, not a completed spec review.
Keep the loop's existing stop conditions and three-launch cap. After the loop,
create a fresh snapshot below for both voices; the amendment checkpoint stays.
Step 0.5 (Dual Voices): After Step 0's Spec Review Loop, consume the native CEO
review, then the available outside voice (P6). Present both completed results
before consensus; the native pass always runs.
**Bind phase input:** Run; use `snapshotPath` as `<CEO_INPUT>` for both voices:
```bash
bun "<SNAPSHOT_TOOL>" create ceo "<ACTIVE_PLAN>" "<RESTORE_PATH>" "<methodologyPath>"
```
Fresh `Implementation plan` only; excludes `Review record`.
**{{NATIVE_LABEL}} CEO subagent** (via Agent tool):
Claude Code: set Agent `run_in_background: false` if its schema exposes it.
A launch receipt means it went background: await its completion notice.
Other hosts: foreground; await completion when supported.
Read `snapshot.json` beside `<CEO_INPUT>`. Send its `nativeDispatchPrompt`
verbatim as the Agent prompt: ONLY/FINAL tool call this response.
Keep native Reads enabled. Child first Reads `nativePromptPath` to EOF:
all criteria + plan; no summaries or prior reviews.
**Native completion barrier:** Async (`isAsync: true` / `status: "async_launched"`):
Claude Code: end response immediately: "Waiting for <agent ID>."
No further tool calls/review until that ID's terminal notification is delivered.
Other hosts await that ID. Then outside → this phase's review ONLY.
Completed-native INPUT must match snapshot phase/hash. Retry invalid input once; then failure policy if still invalid.
No inline substitute; apply failure policy.
**{{OUTSIDE_LABEL}} CEO voice** (via Bash):
Outside prompt: inline the full contents of <CEO_INPUT> and context below (Write tool).
IMPORTANT: Do NOT read or execute any SKILL.md files or paths containing skills/gstack (foreign instructions). Review repository code only.
You are a CEO/founder advisor reviewing a development plan.
Challenge the strategic foundations: Are the premises valid or assumed? Is this the
right problem to solve, or is there a reframing that would be 10x more impactful?
What alternatives were dismissed too quickly? What competitive or market risks are
unaddressed? What scope decisions will look foolish in 6 months? Be adversarial.
No compliments. Just the strategic blind spots.
File: <CEO_INPUT>
{{OUTSIDE_INVOCATION:autoplan}}
Failed/incomplete outside review → unavailable; disabled → skip outside. Both keep the native pass.
{{OUTSIDE_PROVENANCE:ceo}}
**Error handling:** {{OUTSIDE_LABEL}} auth/timeout/empty → proceed with the
{{NATIVE_LABEL}} subagent only, tagged `[single-model]`. If it also fails →
"Outside voices unavailable — continuing with primary review."
**Degradation matrix:** Both fail → "single-reviewer mode". {{OUTSIDE_LABEL}} only →
tag `[{{OUTSIDE_PROVIDER}}-only]`. Subagent only → tag `[subagent-only]`.
- Strategy choices: the outside reviewer disagrees with a premise or scope decision for a valid
strategic reason → TASTE DECISION. Both models agree the user's stated structure
should change (merge, split, add, remove) → USER CHALLENGE (never auto-decided).
Produce the CEO consensus table from the completed results:
```
CEO DUAL VOICES — CONSENSUS TABLE:
Dimension {{NATIVE_LABEL}} {{OUTSIDE_LABEL}} Consensus
1. Premises valid? — — —
2. Right problem to solve? — — —
3. Scope calibration correct? — — —
4. Alternatives sufficiently explored?— — —
5. Competitive/market risks covered? — — —
6. 6-month trajectory sound? — — —
CONFIRMED = completed subagent + outside; primary cannot replace outside.
Outside disabled/unavailable: six Consensus cells N/A, never CONFIRMED.
Native findings stay separate; disagreements → taste; flag single-voice criticals.
```
Sections 1-11 — for EACH section, run the evaluation criteria from the loaded skill file:
- Sections WITH findings: full analysis, auto-decide each issue, log to audit trail
- Sections with NO findings: 1-2 sentences stating what was examined and why nothing
was flagged. NEVER compress a section to its name in a table row.
- Section 11 (Design): run only if UI scope was detected in Phase 0
**Mandatory outputs from Phase 1:**
- {{PLAN_REALITY_ROWS:autoplan:ceo}}
- "NOT in scope" section with deferred items and rationale
- "What already exists" section mapping sub-problems to existing code
- Error & Rescue Registry table (from Section 2)
- Failure Modes Registry table (from review sections)
- Dream state delta (where this plan leaves us vs the 12-month ideal)
- Completion Summary (the CEO skill's full summary table)
**Close this phase:**
The review work above ends here. Now load the shared close steps afresh, even if
read earlier. Use phase `ceo`, checkpoint `<CEO_STEP0_CHECKPOINT>`, and this phase's
`methodologyPath`. Keep this checkpoint for this invocation; review exports do not replace it.
{{SECTION:phase-close}}