From 8837fda3998224fc09f46e6e90a549334fbc9b68 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 15 Nov 2026 10:11:18 +0800 Subject: [PATCH] Bring back the standalone /plan-eng-review command (GST-2726) (#4375) Garry, 2026-11-15: people rely on /plan-eng-review, so it returns as its own command on every host that had it before GST-1698 (#4108). /autoplan's eng phase is unchanged: external hosts still ship the same methodology beside gstack-autoplan/SKILL.md, now rendered from the same pass as the standalone skill, and the Kiro sibling copy and ownership guards from #4108 stay. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- AGENTS.md | 1 + ARCHITECTURE.md | 6 +- BROWSER.md | 2 +- CLAUDE.md | 2 +- README.md | 9 +- SKILL.md | 3 +- SKILL.md.tmpl | 2 +- TODOS.md | 8 +- autoplan/SKILL.md | 2 +- autoplan/SKILL.md.tmpl | 11 +- autoplan/bin/guard-reasons.ts | 2 +- bin/gstack-doctor-components.sh | 8 +- bin/gstack-install-registry.sh | 9 +- bin/gstack-skill-start | 2 +- changelog.d/restore-plan-eng-review.md | 4 + codex/SKILL.md | 2 +- devex-review/SKILL.md | 2 +- docs/OPENCLAW.md | 6 +- docs/PROJECT_STRUCTURE.md | 2 +- docs/TEST_PORTFOLIO.md | 6 +- docs/autoplan-guard-troubleshooting.md | 3 +- docs/hosts.md | 2 +- docs/skills.md | 72 ++++++++-- docs/test-value-bar.md | 2 +- docs/troubleshooting.md | 4 +- docs/voice-input.md | 4 +- gstack/llms.txt | 3 +- lib/doctor-components.ts | 3 +- lib/harness-register.ts | 2 +- lib/ship-preflight.ts | 2 +- office-hours/SKILL.md.tmpl | 2 +- office-hours/sections/design-and-handoff.md | 12 +- .../sections/design-and-handoff.md.tmpl | 12 +- plan-ceo-review/sections/review-sections.md | 8 +- .../sections/review-sections.md.tmpl | 6 +- .../sections/review-sections.md | 8 +- .../sections/review-sections.md.tmpl | 6 +- plan-devex-review/SKILL.md | 2 +- plan-devex-review/SKILL.md.tmpl | 2 +- plan-devex-review/sections/review-sections.md | 8 +- .../sections/review-sections.md.tmpl | 6 +- qa/SKILL.md | 2 +- qa/SKILL.md.tmpl | 2 +- retro/SKILL.md | 2 +- retro/SKILL.md.tmpl | 2 +- scripts/discover-skills.ts | 20 ++- scripts/gen-skill-docs.ts | 19 +-- scripts/resolvers/composition.ts | 4 +- scripts/resolvers/review-dashboard.ts | 4 +- ship/SKILL.md | 4 +- ship/SKILL.md.tmpl | 2 +- spec/SKILL.md | 3 +- spec/SKILL.md.tmpl | 3 +- test-audit/SKILL.md | 2 +- test-audit/SKILL.md.tmpl | 2 +- test/autoplan-bounded-journal.test.ts | 4 +- test/autoplan-guard-reasons.test.ts | 2 +- test/autoplan-methodology-names.test.ts | 14 +- test/autoplan-publication-hook.test.ts | 2 +- test/autoplan-publication-payload.test.ts | 2 +- test/autoplan-review-discovery.test.ts | 10 +- test/carve-section-sharding.test.ts | 5 +- test/e2e-harness-audit.test.ts | 5 +- test/eng-review-routing.test.ts | 2 +- test/fixtures/golden/agy-ship-SKILL.md | 4 +- test/fixtures/golden/claude-ship-SKILL.md | 4 +- test/fixtures/golden/codex-ship-SKILL.md | 4 +- test/fixtures/golden/factory-ship-SKILL.md | 4 +- test/fixtures/skill-md-size-allowlist.json | 60 ++++----- test/gen-skill-docs.test.ts | 10 +- .../helpers/autoplan-preconfigured-fixture.ts | 2 +- test/helpers/carve-guards.ts | 6 +- test/helpers/office-hours-completion.ts | 2 +- test/helpers/periodic-exclude-data.ts | 4 +- test/office-hours-completion.test.ts | 14 +- test/outside-voice-routing.test.ts | 3 +- test/plan-review-cases.test.ts | 6 +- test/retired-skills.test.ts | 126 ++++++++++-------- test/shared-libs-rendering.test.ts | 3 +- .../ship/restore-plan-eng-review.json | 4 + test/skill-md-size-guard.test.ts | 6 - test/skill-routing-e2e.test.ts | 4 +- 82 files changed, 362 insertions(+), 279 deletions(-) create mode 100644 changelog.d/restore-plan-eng-review.md create mode 100644 test/size-ledger/ship/restore-plan-eng-review.json diff --git a/AGENTS.md b/AGENTS.md index bbfdc843b..ab1ff3f3b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,6 +16,7 @@ CLIs (`gstack-ios-qa-daemon`, `gstack-ios-qa-mint`, `gstack-ios-qa-regen`) are i |-------|------| | `/office-hours` | plan | | `/plan-ceo-review` | plan | +| `/plan-eng-review` | plan | | `/plan-design-review` | plan | | `/plan-devex-review` | plan | | `/plan-tune` | plan | diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 14dea0a77..7dc9c3546 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -345,12 +345,12 @@ Templates contain the workflows, tips, and examples that require human judgment. | `{{QA_METHODOLOGY}}` | `resolvers/utility.ts` | Browser-only QA methodology, conditionally loaded by /qa and /qa-only | | `{{QA_SCOPE}}, {{QA_EXPLORATORY}}, {{QA_FUNCTIONAL}}, {{QA_RESOURCE}}, {{QA_METHOD_READS}}, {{QA_REVIEW}}` | `resolvers/qa.ts` | Surface selection, checkpointed native/exploratory QA, direct conditional method reads, installed-asset references and bounded review/ship callers | | `{{DESIGN_METHODOLOGY}}` | `gen-skill-docs.ts` | Shared design audit methodology for /plan-design-review and /design-review | -| `{{SHARED_LIBS_RUBRIC}}` | `resolvers/shared-libs.ts` | Shared-code criteria for /deslop-shared-libs, /autoplan's eng phase, and /review: verified callers, existing helpers, compatibility, tests, and total savings | +| `{{SHARED_LIBS_RUBRIC}}` | `resolvers/shared-libs.ts` | Shared-code criteria for /deslop-shared-libs, /plan-eng-review, and /review: verified callers, existing helpers, compatibility, tests, and total savings | | `{{REVIEW_DASHBOARD}}` | `gen-skill-docs.ts` | Review Readiness Dashboard for /ship pre-flight | -| `{{TEST_VALUE_BAR:}}` | `resolvers/test-value.ts` | Shared test value bar (authoring gate, value card, X/Y coverage, red-first proof, low-value catalog) for /qa and /qa-only (`qa`) and /test-audit (`audit`); /autoplan's eng phase and /ship embed it through the coverage audit | +| `{{TEST_VALUE_BAR:}}` | `resolvers/test-value.ts` | Shared test value bar (authoring gate, value card, X/Y coverage, red-first proof, low-value catalog) for /qa and /qa-only (`qa`) and /test-audit (`audit`); /plan-eng-review and /ship embed it through the coverage audit | | `{{TEST_VALUE_MESSAGE:}}` | `resolvers/test-value.ts` | One degraded-mode message (problem, consequence, fix, docs anchor) from the shared constants | | `{{TEST_BOOTSTRAP}}` | `resolvers/testing.ts` | Test framework detection, bootstrap, CI/CD setup for /ship and /design-review | -| `{{CODEX_PLAN_REVIEW}}` | `resolvers/outside-voice-steps.ts` | Optional outside plan review for /plan-ceo-review and /autoplan's eng phase: Claude Code on Codex, Codex on other supported harnesses, with the caller's native subagent fallback | +| `{{CODEX_PLAN_REVIEW}}` | `resolvers/outside-voice-steps.ts` | Optional outside plan review for /plan-ceo-review and /plan-eng-review: Claude Code on Codex, Codex on other supported harnesses, with the caller's native subagent fallback | | `{{DESIGN_SETUP}}` | `resolvers/design.ts` | Discovery pattern for `$D` design binary, mirrors `{{BROWSE_SETUP}}` | | `{{DESIGN_DETECTOR}}` | `resolvers/design.ts` | Probe block + sentinel reading for the user-installed impeccable engine (`bin/gstack-design-detect.ts`); `:phase0` renders design-review's mechanical scan, `:gate` design-html's bounded slop gate | | `{{DESIGN_MD_CHECK}}` | `resolvers/design.ts` | Open DESIGN.md format check through `bin/gstack-design-md.ts`, with the one-time conversion offer persisted in the file; `:calibrate` renders the tokens-as-calibration form for /design-review | diff --git a/BROWSER.md b/BROWSER.md index 4bfc52c07..d319829e2 100644 --- a/BROWSER.md +++ b/BROWSER.md @@ -99,7 +99,7 @@ through CDP before `goto`, as the cookbook does), and no `file://` navigation. | `/scrape` | Prototype the extraction with `aside repl`, hand back the table, list, or prices as structured data. Read-only. | | `/devex-review` | Walk the real onboarding flow and time it, carrying the cookbook inline. | | `/ship`, `/spec`, `/land-and-deploy`, `/setup-deploy`, `/office-hours` | Third-party web actions (vendor dashboards, API keys, webhooks) offered as an Aside drive across your real sessions, with the one-question consent gate for anything mutating. | -| `/plan-ceo-review`, `/plan-devex-review`, `/design-consultation`, `/review`, `/cso`, `/office-hours` | Web research runs through `aside exec` in your real browser (`{{ASIDE_RESEARCH}}`), one read-only request per question, answers treated as untrusted content. No Aside → the same queries go to the host's WebSearch tool; no WebSearch either → "Search unavailable" once and the skill proceeds on in-distribution knowledge. | +| `/plan-ceo-review`, `/plan-eng-review`, `/plan-devex-review`, `/design-consultation`, `/review`, `/cso`, `/office-hours` | Web research runs through `aside exec` in your real browser (`{{ASIDE_RESEARCH}}`), one read-only request per question, answers treated as untrusted content. No Aside → the same queries go to the host's WebSearch tool; no WebSearch either → "Search unavailable" once and the skill proceeds on in-distribution knowledge. | ### Local-HTML rendering diff --git a/CLAUDE.md b/CLAUDE.md index 83cd96c33..35db4608f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -546,7 +546,7 @@ When the user's request matches an available skill, invoke it via the Skill tool Key routing rules: - Product ideas/brainstorming → invoke /office-hours - Strategy/scope → invoke /plan-ceo-review -- Architecture → invoke /autoplan +- Architecture → invoke /plan-eng-review - Design system/plan review → invoke /design-consultation or /plan-design-review - Full review pipeline → invoke /autoplan - Bugs/errors → fix them directly: one read-only check of the cause, or a focused failing test first when the cause is unclear; then fix it and run that test diff --git a/README.md b/README.md index 9e30e702f..e7d04738b 100644 --- a/README.md +++ b/README.md @@ -118,8 +118,8 @@ Claude: I'm going to push back on the framing. You said "daily briefing You: /plan-ceo-review [reads the design doc, challenges scope, runs 10-section review] -You: /autoplan - [eng phase: ASCII diagrams for data flow, state machines, error paths] +You: /plan-eng-review + [ASCII diagrams for data flow, state machines, error paths] [test matrix, failure modes, security concerns] You: Approve plan. Exit plan mode. @@ -143,12 +143,13 @@ gstack is a process, not a collection of tools. The skills run in the order a sp **Think → Plan → Build → Review → Test → Ship → Reflect** -Each skill feeds into the next. `/office-hours` writes a design doc that `/plan-ceo-review` reads. An interactive `/autoplan` run's eng phase writes a test plan that `/qa` picks up. `/review` catches bugs that `/ship` verifies are fixed. Nothing falls through the cracks because every step knows what came before it. +Each skill feeds into the next. `/office-hours` writes a design doc that `/plan-ceo-review` reads. `/plan-eng-review` writes a test plan that `/qa` picks up. `/review` catches bugs that `/ship` verifies are fixed. Nothing falls through the cracks because every step knows what came before it. | Skill | Your specialist | What they do | |-------|----------------|--------------| | `/office-hours` | **YC Office Hours** | Start here. Six forcing questions that reframe your product before you write code. Pushes back on your framing, challenges premises, generates implementation alternatives. Design doc feeds into every downstream skill. | | `/plan-ceo-review` | **CEO / Founder** | Rethink the problem. Find the 10-star product hiding inside the request. Four modes: Expansion, Selective Expansion, Hold Scope, Reduction. | +| `/plan-eng-review` | **Eng Manager** | Lock in architecture, data flow, diagrams, edge cases, and tests. Forces hidden assumptions into the open. | | `/plan-design-review` | **Senior Designer** | Rates each design dimension 0-10, explains what a 10 looks like, then edits the plan to get there. AI Slop detection. Interactive — one AskUserQuestion per design choice. | | `/plan-devex-review` | **Developer Experience Lead** | Interactive DX review: explores developer personas, benchmarks against competitors' TTHW, designs your magical moment, traces friction points step by step. Scores error messages for the agents that read them ([agent-ready errors](docs/agent-ready-errors.md)). Three modes: DX EXPANSION, DX POLISH, DX TRIAGE. 20-45 forcing questions. | | `/design-consultation` | **Design Partner** | Build a complete design system from scratch. Researches the landscape, proposes creative risks, generates realistic product mockups. Writes `DESIGN.md` in the open DESIGN.md format, so impeccable, Google Stitch, and any tool that reads it share one file. | @@ -194,7 +195,7 @@ The same `/qa` and `/qa-only` commands test CLIs, APIs, jobs, workers and webhoo |-----------------|--------------------------|----------------------------| | **End users** (UI, web app, mobile) | `/plan-design-review` | `/design-review` | | **Developers** (API, CLI, SDK, docs) | `/plan-devex-review` | `/devex-review` | -| **Architecture** (data flow, perf, tests) | `/autoplan` (eng phase) | `/review` | +| **Architecture** (data flow, perf, tests) | `/plan-eng-review` | `/review` | | **All of the above** | `/autoplan` (runs CEO → design → DX → eng, auto-detects which apply; eng always last) | — | ### Power tools diff --git a/SKILL.md b/SKILL.md index d314cb816..386f4b08d 100644 --- a/SKILL.md +++ b/SKILL.md @@ -194,7 +194,7 @@ quality gates that produce better results than answering inline. - User describes a new idea, asks "is this worth building", brainstorms, pitches a concept → invoke `/office-hours` - User asks to spec something out, file an issue, write up a ticket, "turn this into a GitHub issue", "backlog item" → invoke `/spec` - User asks about strategy, scope, ambition, "think bigger", "what should we build" → invoke `/plan-ceo-review` -- User asks to review architecture, lock in the plan, "does this design make sense" → invoke `/autoplan` +- User asks to review architecture, lock in the plan, "does this design make sense" → invoke `/plan-eng-review` - User asks about design system, brand, visual identity, "how should this look" → invoke `/design-consultation` - User asks to review design of a plan → invoke `/plan-design-review` - User asks about developer experience of a plan, API/CLI/SDK design → invoke `/plan-devex-review` @@ -256,6 +256,7 @@ Generic “second opinion”, “outside review”, or “cross-model review” - Voice trigger "show me the browser" → invoke `/open-gstack-browser` - Voice trigger "pair agent", "connect agent", "share my browser", "remote browser access" → invoke `/pair-agent` - Voice trigger "dx review", "developer experience review", "devex review", "devex audit", "API design review", "onboarding review" → invoke `/plan-devex-review` +- Voice trigger "tech review", "technical review", "plan engineering review" → invoke `/plan-eng-review` - Voice trigger "quality check", "test the app", "run QA" → invoke `/qa` - Voice trigger "bug report", "just check for bugs" → invoke `/qa-only` diff --git a/SKILL.md.tmpl b/SKILL.md.tmpl index 58e44e0a2..3f7cd498e 100644 --- a/SKILL.md.tmpl +++ b/SKILL.md.tmpl @@ -70,7 +70,7 @@ quality gates that produce better results than answering inline. - User describes a new idea, asks "is this worth building", brainstorms, pitches a concept → invoke `/office-hours` - User asks to spec something out, file an issue, write up a ticket, "turn this into a GitHub issue", "backlog item" → invoke `/spec` - User asks about strategy, scope, ambition, "think bigger", "what should we build" → invoke `/plan-ceo-review` -- User asks to review architecture, lock in the plan, "does this design make sense" → invoke `/autoplan` +- User asks to review architecture, lock in the plan, "does this design make sense" → invoke `/plan-eng-review` - User asks about design system, brand, visual identity, "how should this look" → invoke `/design-consultation` - User asks to review design of a plan → invoke `/plan-design-review` - User asks about developer experience of a plan, API/CLI/SDK design → invoke `/plan-devex-review` diff --git a/TODOS.md b/TODOS.md index 12d02f317..e47fc855e 100644 --- a/TODOS.md +++ b/TODOS.md @@ -2,13 +2,9 @@ ## NEXT PRIORITY -### P2: `/plan-eng-review` retirement follow-ups (filed 2026-11-06, GST-1698 /ship review of #4108) +### P3: `/plan-eng-review` return follow-up (filed 2026-11-15, GST-2726) -- **Delete the retired `plan-eng-multi-finding-batching` case and its counter subsystem.** The case checks one interactive question per eng finding; /autoplan Phase 3 auto-decides findings, so no shipped entry reaches it. The follow-up to #4108 took it out of the weekly lane through `PERIODIC_CI_EXCLUDE` instead of deleting it, because about 20 free tests and fixtures depend on its counter (`createEngBatchingIssueCounter` in `test/helpers/eng-seeded-coverage.ts`, `test/eng-batching-saved-ledger.test.ts`, `test/detector-corpus-plan-eng-multi-finding-batching.test.ts`, the `eng-batching-*` fixtures). Retirement card: detects=an eng review that batches findings into one plan write; non_test_callers=0; stronger_proof=the ceo/design/devex finding floors keep the shared one-question-per-finding contract; unlocks=the counter helpers, their free tests and fixtures. Delete each helper only after checking it has no other caller (plan-eng-review-artifact shares `engFirstReviewAUQ`). **Effort:** M. **Priority:** P3. -- **Point the external-host methodology file's preamble Read at `gstack-autoplan`.** Every external host's `gstack-autoplan/plan-eng-review.md` says to Read `sections/preamble.md` relative to the installed `gstack-plan-eng-review` directory, which no longer exists. Normally the matching preamble id skips the reread, but after compaction late in a run the agent follows a missing path. Fixing it changes Phase 3 bytes, so it needs its own byte-pin update. **Effort:** S. **Priority:** P3. -- **Redirect `gstack-doctor --for plan-eng-review`.** It now exits 2 with "unknown skill"; map the retired name to `/autoplan`'s requirements and print a one-line redirect, so saved lane scripts keep working. **Effort:** S. **Priority:** P3. -- **Decide whether the QM edition keeps `gstack-plan`.** `hosts/qm.ts` and `qm/edition.json` still build `gstack-plan` from the `plan-eng-review` sources under another name, so the retired-name guards don't see it. Product call for Garry. **Effort:** S. **Priority:** P3. -- **Pin the retirement in two more tests.** Assert that `generateLlmsTxt` output lists no `plan-eng-review` entry (`test/llms-txt-shape.test.ts`), and that `HYBRID_SKILLS` holds none of `RETIRED_SKILLS` (`test/harness-register.test.ts`). **Effort:** S. **Priority:** P3. +- **Decide whether `plan-eng-multi-finding-batching` rejoins the weekly lane.** The cut of the standalone skill (GST-1698) took it out through `PERIODIC_CI_EXCLUDE`, because /autoplan Phase 3 auto-decides findings. The standalone `/plan-eng-review` is back (GST-2726) and asks one question per eng finding again, so the case reaches a shipped entry. Running it weekly is paid spend, so the call belongs to the measurement plan in GST-1966. The standalone paid cases deleted with the cut (`plan-eng-plan-mode`, `plan-eng-finding-floor`, `plan-eng-review-artifact-full`) are not restored either. **Effort:** S. **Priority:** P3. ### P3: clarity-judge removal follow-ups (filed 2026-11-04, GST-1371) diff --git a/autoplan/SKILL.md b/autoplan/SKILL.md index 962e7a4d8..6fed17905 100644 --- a/autoplan/SKILL.md +++ b/autoplan/SKILL.md @@ -2,7 +2,7 @@ name: autoplan preamble-tier: 3 version: 1.0.0 -description: "Auto-review pipeline — runs the CEO, design, eng (architecture, edge cases, failure modes, tests) and DX reviews (lean run: one reviewer), auto-deciding. (gstack)" +description: "Auto-review pipeline — runs the CEO, design, eng and DX reviews in order (lean run: one reviewer), auto-deciding. (gstack)" triggers: - run all reviews - automatic review pipeline diff --git a/autoplan/SKILL.md.tmpl b/autoplan/SKILL.md.tmpl index 57c9a5e10..a4b0433d8 100644 --- a/autoplan/SKILL.md.tmpl +++ b/autoplan/SKILL.md.tmpl @@ -3,12 +3,11 @@ name: autoplan preamble-tier: 3 version: 1.0.0 description: | - Auto-review pipeline — runs the CEO, design, eng (architecture, edge cases, failure - modes, tests) and DX reviews (lean run: one reviewer), auto-deciding. Surfaces - taste decisions (close approaches, borderline scope, outside-review disagreements) at - one approval gate. Use when asked to "auto review", "autoplan", "run all reviews", - "review this plan automatically", "review the architecture", "engineering review", or - "make the decisions for me". (gstack) + Auto-review pipeline — runs the CEO, design, eng and DX reviews in order (lean + run: one reviewer), auto-deciding. Surfaces taste decisions (close approaches, + borderline scope, outside-review disagreements) at one approval gate. Use when + asked to "auto review", "autoplan", "run all reviews", "review this plan + automatically", or "make the decisions for me". (gstack) codex_default_prompt: "Use $gstack-autoplan to run the CEO, design, DX and eng reviews over this plan in one pass, decide the routine questions itself, and stop at a single approval gate." voice-triggers: - "auto plan" diff --git a/autoplan/bin/guard-reasons.ts b/autoplan/bin/guard-reasons.ts index fde59f000..ad143c2d5 100644 --- a/autoplan/bin/guard-reasons.ts +++ b/autoplan/bin/guard-reasons.ts @@ -16,7 +16,7 @@ export type Disposition = 'fallback' | 'corrective' | 'transient' | 'unverified' export type Detail = { phase?: string | number; keys?: string[]; cause?: string; size?: string; limit?: string }; interface Reason { disposition: Disposition; text: (d: Detail) => string } -export const FALLBACK = 'Fallback: run /plan-ceo-review, then /plan-devex-review by hand; ' + +export const FALLBACK = 'Fallback: run /plan-ceo-review, then /plan-devex-review, then /plan-eng-review by hand; ' + 'or run /context-save, start a new Claude Code session (not --resume), run /context-restore, then /autoplan .'; const PUBLISH_SEPARATELY = (d: Detail) => `Publish the filled Phase ${d.phase} report as your own parent assistant text in a message ` + `whose only tool call is the Bash no-op \`true autoplan-published \`, then make this phase-entry call in a later message.`; diff --git a/bin/gstack-doctor-components.sh b/bin/gstack-doctor-components.sh index 157afdf0d..4a810df8a 100644 --- a/bin/gstack-doctor-components.sh +++ b/bin/gstack-doctor-components.sh @@ -8,7 +8,7 @@ GSTACK_DOCTOR_COMPONENTS="claude codex patch codex-cli browse-bundle browser cso GSTACK_DOCTOR_CORE="runtime pins state-root privacy cores revision floor wrapper" GSTACK_DOCTOR_HOSTS="claude codex" GSTACK_DOCTOR_OPTIONAL="codex-cli cso" -GSTACK_DOCTOR_SKILLS="autoplan plan-ceo-review plan-design-review plan-devex-review plan-tune office-hours spec review ship codex cso browse qa qa-only design-review design-consultation design-html design-motion devex-review scrape skillify canary benchmark make-pdf diagram pair-agent open-gstack-browser setup-browser-cookies connect-chrome land-and-deploy benchmark-models captain careful claude-code context-restore context-save design-shotgun deslop-shared-libs document-generate document-release eval-plan freeze gstack-upgrade guard health ios-clean ios-design-review ios-fix ios-qa ios-sync landing-report learn write-skill modernize retro runaway-stopper setup-deploy setup-gbrain sync-gbrain test-audit ubicloud unfreeze verify review-voice" +GSTACK_DOCTOR_SKILLS="autoplan plan-ceo-review plan-eng-review plan-design-review plan-devex-review plan-tune office-hours spec review ship codex cso browse qa qa-only design-review design-consultation design-html design-motion devex-review scrape skillify canary benchmark make-pdf diagram pair-agent open-gstack-browser setup-browser-cookies connect-chrome land-and-deploy benchmark-models captain careful claude-code context-restore context-save design-shotgun deslop-shared-libs document-generate document-release eval-plan freeze gstack-upgrade guard health ios-clean ios-design-review ios-fix ios-qa ios-sync landing-report learn write-skill modernize retro runaway-stopper setup-deploy setup-gbrain sync-gbrain test-audit ubicloud unfreeze verify review-voice" GSTACK_BROWSER_LAZY_REASON="lazy; gstack-browser-ensure installs on first use" GSTACK_DOCTOR_HELPERS="gstack-pregate gstack-plan-reality gstack-artifact gstack-autoplan" GSTACK_DOCTOR_NOT_NEEDED="none" @@ -65,7 +65,7 @@ gstack_doctor_component_kind() { # gstack_doctor_skill_requires SKILL — the non-core ids the skill needs; returns 1 for an unknown skill. gstack_doctor_skill_requires() { case "$1" in - autoplan|plan-ceo-review|plan-design-review|plan-devex-review|plan-tune|office-hours|spec|review|ship) printf '%s' 'claude codex patch' ;; + autoplan|plan-ceo-review|plan-eng-review|plan-design-review|plan-devex-review|plan-tune|office-hours|spec|review|ship) printf '%s' 'claude codex patch' ;; codex) printf '%s' 'claude codex patch codex-cli' ;; cso) printf '%s' 'claude cso' ;; browse|qa|qa-only|design-review|design-consultation|design-html|design-motion|devex-review|scrape|skillify|canary|benchmark|make-pdf|diagram|pair-agent|open-gstack-browser|setup-browser-cookies|connect-chrome|land-and-deploy) printf '%s' 'claude codex patch browse-bundle browser' ;; @@ -78,7 +78,7 @@ gstack_doctor_skill_requires() { # gstack_doctor_skill_optional SKILL — ids that SKIP when absent; returns 1 for an unknown skill. gstack_doctor_skill_optional() { case "$1" in - autoplan|plan-ceo-review|plan-design-review|plan-devex-review|plan-tune|office-hours|spec|review|ship) printf '%s' 'codex-cli' ;; + autoplan|plan-ceo-review|plan-eng-review|plan-design-review|plan-devex-review|plan-tune|office-hours|spec|review|ship) printf '%s' 'codex-cli' ;; codex) printf '%s' '' ;; cso) printf '%s' '' ;; browse|qa|qa-only|design-review|design-consultation|design-html|design-motion|devex-review|scrape|skillify|canary|benchmark|make-pdf|diagram|pair-agent|open-gstack-browser|setup-browser-cookies|connect-chrome|land-and-deploy) printf '%s' 'codex-cli' ;; @@ -91,7 +91,7 @@ gstack_doctor_skill_optional() { # gstack_doctor_skill_pins_advisory SKILL — true for a planning-only workflow (a repo test-pin mismatch SKIPs pins). gstack_doctor_skill_pins_advisory() { case "$1" in - autoplan|plan-ceo-review|plan-design-review|plan-devex-review|office-hours) return 0 ;; + autoplan|plan-ceo-review|plan-eng-review|plan-design-review|plan-devex-review|office-hours) return 0 ;; *) return 1 ;; esac } diff --git a/bin/gstack-install-registry.sh b/bin/gstack-install-registry.sh index 10d754ad4..a56caf180 100644 --- a/bin/gstack-install-registry.sh +++ b/bin/gstack-install-registry.sh @@ -342,11 +342,10 @@ gstack_disabled_normalize() { # GSTACK_RETIRED_SKILLS — skills gstack keeps off every host whatever # disabled_skills says; an existing gstack-owned entry is removed like a -# disabled one. plan-eng-review's source stays as /autoplan's eng-phase -# methodology (GST-1698); investigate's source is gone (GST-1717), and its old -# entries are still removed. Same list as RETIRED_SKILLS in -# scripts/discover-skills.ts (test/retired-skills.test.ts). -GSTACK_RETIRED_SKILLS="plan-eng-review investigate" +# disabled one. investigate's source is gone (GST-1717), and its old entries +# are still removed. Same list as RETIRED_SKILLS in scripts/discover-skills.ts +# (test/retired-skills.test.ts). +GSTACK_RETIRED_SKILLS="investigate" # GSTACK_CREW_SKILLS — the gstack-on-Capy skills (crew/README.md). Only a Capy # machine registers them; anywhere else they get no entry on any host and an diff --git a/bin/gstack-skill-start b/bin/gstack-skill-start index b448e56ee..105c1d5c5 100755 --- a/bin/gstack-skill-start +++ b/bin/gstack-skill-start @@ -701,7 +701,7 @@ When the user's request matches an available skill, invoke it via the Skill tool Key routing rules: - Product ideas/brainstorming → invoke /office-hours - Strategy/scope → invoke /plan-ceo-review -- Architecture → invoke /autoplan +- Architecture → invoke /plan-eng-review - Design system/plan review → invoke /design-consultation or /plan-design-review - Full review pipeline → invoke /autoplan - Bugs/errors → fix them directly: one read-only check of the cause, or a focused failing test first when the cause is unclear; then fix it and run that test diff --git a/changelog.d/restore-plan-eng-review.md b/changelog.d/restore-plan-eng-review.md new file mode 100644 index 000000000..c321c3f95 --- /dev/null +++ b/changelog.d/restore-plan-eng-review.md @@ -0,0 +1,4 @@ +--- +important: regression +--- +- **`/plan-eng-review` is back as its own command (GST-2726).** Many people ran it on its own, and cutting it in GST-1698 took that away. `./setup` installs `/plan-eng-review` again on every host that had it before: Claude Code, Codex and the other external hosts, and OpenClaw's default skill list. If an earlier upgrade removed it, your next `./setup` or upgrade puts it back. The router sends "review the architecture" and "engineering review" requests to it again, and the office-hours handoff, the CEO, design and devex review chaining, `/ship`'s review dashboard and its over-200-lines hint name it again. `/autoplan` is unchanged: its eng phase still reads the same methodology, which external hosts still ship beside `gstack-autoplan/SKILL.md` as `plan-eng-review.md`, so `/autoplan` keeps working if you disable the standalone command. Its description no longer claims architecture-review requests, so those route to `/plan-eng-review`. diff --git a/codex/SKILL.md b/codex/SKILL.md index 01a54c478..de293bd30 100644 --- a/codex/SKILL.md +++ b/codex/SKILL.md @@ -438,7 +438,7 @@ Produce this markdown table: |--------|---------|-----|------|--------|----------| | CEO Review | \`/plan-ceo-review\` | Scope & strategy | {runs} | {status} | {findings} | | Outside Review | {recorded provider and trigger} | Independent 2nd opinion | {runs} | {outside_status} | {findings} | -| Eng Review | \`/autoplan\` | Architecture & tests (required) | {runs} | {status} | {findings} | +| Eng Review | \`/plan-eng-review\` | Architecture & tests (required) | {runs} | {status} | {findings} | | Design Review | \`/plan-design-review\` | UI/UX gaps | {runs} | {status} | {findings} | | DX Review | \`/plan-devex-review\` | Developer experience gaps | {runs} | {status} | {findings} | \`\`\` diff --git a/devex-review/SKILL.md b/devex-review/SKILL.md index d22a5cea1..1dc425e3c 100644 --- a/devex-review/SKILL.md +++ b/devex-review/SKILL.md @@ -821,7 +821,7 @@ Produce this markdown table: |--------|---------|-----|------|--------|----------| | CEO Review | \`/plan-ceo-review\` | Scope & strategy | {runs} | {status} | {findings} | | Outside Review | {recorded provider and trigger} | Independent 2nd opinion | {runs} | {outside_status} | {findings} | -| Eng Review | \`/autoplan\` | Architecture & tests (required) | {runs} | {status} | {findings} | +| Eng Review | \`/plan-eng-review\` | Architecture & tests (required) | {runs} | {status} | {findings} | | Design Review | \`/plan-design-review\` | UI/UX gaps | {runs} | {status} | {findings} | | DX Review | \`/plan-devex-review\` | Developer experience gaps | {runs} | {status} | {findings} | \`\`\` diff --git a/docs/OPENCLAW.md b/docs/OPENCLAW.md index d42ec5faf..0ec78bc3a 100644 --- a/docs/OPENCLAW.md +++ b/docs/OPENCLAW.md @@ -180,8 +180,8 @@ The agent should: 4. Verify with a test spawn **Native skills or ACP.** `./setup --host openclaw` (or `./setup` run inside an -OpenClaw session) gives OpenClaw's own agent gstack's skills: the three task -skills (review, qa, ship) listed directly and one +OpenClaw session) gives OpenClaw's own agent gstack's skills: the four task +skills (review, qa, ship, plan-eng-review) listed directly and one `gstack` router skill for the rest in `$OPENCLAW_STATE_DIR/skills`, rendered with OpenClaw's tool names and pointing at the installed gstack, so the agent runs gstack's workflows and helpers itself. Use ACP when the work should happen in a Claude @@ -189,7 +189,7 @@ Code session with the full install (hooks, Claude tool names); use native skills when the OpenClaw agent should do it. Both can be installed together. OpenClaw serves a registered skill's `SKILL.md` whole or refuses it, and its limit is 32,768 bytes when it does not know the model's context window -(32,000 characters with a 100K-200K-token one), so a skill over 32,000 bytes (review and ship among the three) is +(32,000 characters with a 100K-200K-token one), so a skill over 32,000 bytes (review, ship and plan-eng-review among the four) is registered as a short entry that tells the agent to read the skill's full `SKILL.md` in `gstack/skills/`, a plain copy of every skill that OpenClaw reads in pages (`.gstack-skills/` under `--skills all`). diff --git a/docs/PROJECT_STRUCTURE.md b/docs/PROJECT_STRUCTURE.md index 6c5f35dd4..9d76b6a28 100644 --- a/docs/PROJECT_STRUCTURE.md +++ b/docs/PROJECT_STRUCTURE.md @@ -58,7 +58,7 @@ gstack/ ├── eval-plan/ # Preregistered paid evals: prereg, arms, $0 dry run, priced pilot (bin/gstack-eval-plan) ├── captain/ # /captain (also /crew): one controller, many lanes; templates/ holds CREW.md, AGENTS.md, NOTES.md, DIGEST.md, the flaky ledger, the lane report, the READY block, slot call, the lane brief, asks and the daily automation prompt ├── plan-ceo-review/ # /plan-ceo-review skill -├── plan-eng-review/ # /autoplan's eng-phase methodology (retired as a skill, GST-1698) +├── plan-eng-review/ # /plan-eng-review skill ├── autoplan/ # /autoplan skill (auto-review pipeline: CEO → design → DX → eng, eng always last) ├── benchmark/ # /benchmark skill (performance regression detection) ├── runaway-stopper/ # /runaway-stopper skill (runaway thread/subagent detect, stop, rotate, prevent; bin/gstack-runaway, templates/) diff --git a/docs/TEST_PORTFOLIO.md b/docs/TEST_PORTFOLIO.md index b63a2dcc6..d5de31d9b 100644 --- a/docs/TEST_PORTFOLIO.md +++ b/docs/TEST_PORTFOLIO.md @@ -300,8 +300,8 @@ cases are not flaky, their entry point is gone. | `plan-eng-review` (SDK) | kept | Runs the methodology source over a plan, the bytes Phase 3 loads. | | `plan-eng-coverage-audit` (gate) | kept | Phase 3 must produce the codepath-to-test diagram; the case reads the same methodology and sections. | | `plan-eng-review-artifact` (PTY checkpoint) | kept | Phase 3 must leave a test plan on disk; the case's Test review writes it from the same section. | -| `journey-plan-eng` | kept, retargeted | Architecture-review requests now route to /autoplan (#4108). | -| `plan-eng-multi-finding-batching` | retired, excluded | Checks one interactive question per finding; Phase 3 auto-decides findings. `PERIODIC_CI_EXCLUDE` stops its weekly run; deleting it with its counter helpers is a TODOS.md item. | +| `journey-plan-eng` | kept, retargeted back | #4108 routed architecture-review requests to /autoplan; GST-2726 routes them to /plan-eng-review again. | +| `plan-eng-multi-finding-batching` | retired, excluded | Checks one interactive question per finding; Phase 3 auto-decides findings. `PERIODIC_CI_EXCLUDE` stops its weekly run; with the standalone skill back, whether it runs weekly again is a TODOS.md item for GST-1966. | | `plan-eng-review-plan-mode` | retired, deleted | Standalone plan-mode handshake; the ceo, design and devex plan-mode cases and `plan-mode-no-op` keep the shared contract. | | `plan-eng-finding-floor` | retired, deleted | Interactive first-finding question; the ceo, design and devex floors keep the shared floor. | | `plan-eng-review-artifact-full` | retired, deleted | Fresh standalone marathon run; the checkpoint case keeps the artifact requirement. | @@ -309,6 +309,8 @@ cases are not flaky, their entry point is gone. | `carve-section-loading-plan-eng-review` | retired, deleted | Model-driven section loading on standalone entry; Phase 3 gets the methodology through the snapshot instead. | | `auq-matrix-plan-eng-review`, the eng rows of `plan-mode-no-op` | retired rows | Standalone entry; the other skills' rows keep both files' contracts. | +The standalone `/plan-eng-review` came back on 2026-11-15 (GST-2726) because people rely on it. The kept cases cover it again. The retired and deleted cases above were not restored with it; whether any return is the measurement plan's call (GST-1966). + ## Remaining work, not claimed savings Report final acceptance with the delivery revision and its actual case inventory. diff --git a/docs/autoplan-guard-troubleshooting.md b/docs/autoplan-guard-troubleshooting.md index 22bb45be5..b4778a16a 100644 --- a/docs/autoplan-guard-troubleshooting.md +++ b/docs/autoplan-guard-troubleshooting.md @@ -22,7 +22,8 @@ Each code has one of four dispositions: **The fallback** (printed in every fallback denial): -1. Run the reviews by hand: `/plan-ceo-review`, then `/plan-devex-review`. +1. Run the reviews by hand: `/plan-ceo-review`, then `/plan-devex-review`, + then `/plan-eng-review`. 2. Or move to a fresh session and keep your work: `/context-save`, start a new Claude Code session in the project (not `--resume`), `/context-restore`, then `/autoplan `. diff --git a/docs/hosts.md b/docs/hosts.md index 2cfdba646..e0a55a6cd 100644 --- a/docs/hosts.md +++ b/docs/hosts.md @@ -61,7 +61,7 @@ characters, the part of a description Hermes's skills index shows. | Harness | What gstack registers | Install | Verify | Remove | |---|---|---|---|---| -| OpenClaw | default `--skills hybrid`: `gstack-review`, `gstack-qa` and `gstack-ship` as top-level skills plus one `gstack` router skill whose body lists every other skill and its path, in `${OPENCLAW_STATE_DIR:-~/.openclaw}/skills`. With OpenClaw 2026.10.6's 19 eligible bundled skills, hybrid's skills section stays in full format under its 18,000-character budget; `--skills all` (17,971, compact format, descriptions cut) lists every skill as its own folder, `--skills router` (6,701) only the router. OpenClaw serves a registered skill's `SKILL.md` whole or refuses it ("Skill instructions cannot be partially served"), at most 32,768 bytes when its model catalog has no context window for the model and 32,000 characters with a 100K-200K-token window, so any registered skill over 32,000 bytes (three of the four in hybrid, 25 of 62 in `all` today) is a short entry `SKILL.md` with the same name and description that sends the agent to its full `SKILL.md` in a plain copy of every skill (the router's `gstack/skills/`, or `.gstack-skills/` under `--skills all`, a folder OpenClaw's skill scan skips), which OpenClaw reads in pages. A context window under 100K tokens lowers that budget to 16,000 characters, which this limit does not cover | `./setup --host openclaw`, or `./setup` inside OpenClaw | `openclaw skills list --json` shows `gstack` and the four task skills (source `openclaw-managed`, eligible) | `gstack-harness unregister openclaw` | +| OpenClaw | default `--skills hybrid`: `gstack-review`, `gstack-qa`, `gstack-ship` and `gstack-plan-eng-review` as top-level skills plus one `gstack` router skill whose body lists every other skill and its path, in `${OPENCLAW_STATE_DIR:-~/.openclaw}/skills`. With OpenClaw 2026.10.6's 19 eligible bundled skills, hybrid's skills section stays in full format under its 18,000-character budget; `--skills all` (17,971, compact format, descriptions cut) lists every skill as its own folder, `--skills router` (6,701) only the router. OpenClaw serves a registered skill's `SKILL.md` whole or refuses it ("Skill instructions cannot be partially served"), at most 32,768 bytes when its model catalog has no context window for the model and 32,000 characters with a 100K-200K-token window, so any registered skill over 32,000 bytes (review, ship and plan-eng-review among the four task skills in hybrid, 26 of 63 in `all` today) is a short entry `SKILL.md` with the same name and description that sends the agent to its full `SKILL.md` in a plain copy of every skill (the router's `gstack/skills/`, or `.gstack-skills/` under `--skills all`, a folder OpenClaw's skill scan skips), which OpenClaw reads in pages. A context window under 100K tokens lowers that budget to 16,000 characters, which this limit does not cover | `./setup --host openclaw`, or `./setup` inside OpenClaw | `openclaw skills list --json` shows `gstack` and the four task skills (source `openclaw-managed`, eligible) | `gstack-harness unregister openclaw` | | Hermes | every skill, as `gstack-` in one `gstack` category, in `${HERMES_HOME:-~/.hermes}/skills/gstack`. Hermes's skills index lists only skills registered as folders, so a router would leave the rest out of the listing (`skill_view` still loads an unlisted skill by name, but nothing tells the model it exists) | `./setup --host hermes`, or `./setup` inside Hermes | `hermes skills list` shows the `gstack-*` skills in category `gstack` | `gstack-harness unregister hermes` | | dots (feder-cr) | the `gstack` router in `/home/dot/skills/gstack`, which the Dot lists every turn | `./setup` on the Dot's computer, or `gstack-harness register dots` | the Dot's Skills page, or `GET /skills` | `gstack-harness unregister dots` | | QM | one skill (`gstack-plan`) in QM's own skill format, from `qm/sandbox/skills/` ([qm/README.md](../qm/README.md)). `gstack-harness register qm --yes` still stops before sending anything: QM imports a skill pack by cloning the whole repository and caps it at 32 MiB and 5,000 files, and gstack's repository is about 73 MiB ([why](troubleshooting.md#harness-qm-pack-too-large)) | copy `qm/sandbox/skills/gstack-*` into `/sandbox/skills/` and run `qm up` | ask it for a gstack skill | remove the folders and run `qm up` again | diff --git a/docs/skills.md b/docs/skills.md index 4fe89a9ab..e45ad381c 100644 --- a/docs/skills.md +++ b/docs/skills.md @@ -7,6 +7,7 @@ Detailed guides for every gstack skill — philosophy, workflow, and examples. | [`/office-hours`](#office-hours) | **YC Office Hours** | Start here. Six forcing questions that reframe your product before you write code. Pushes back on your framing, challenges premises, generates implementation alternatives. Design doc feeds into every downstream skill. | | [`/spec`](#spec) | **Spec Author** | Turn vague intent into a precise, executable spec in five phases. Backlog-ready output that downstream skills can pick up. Optional agent spawn at the end. | | [`/plan-ceo-review`](#plan-ceo-review) | **CEO / Founder** | Rethink the problem. Find the 10-star product hiding inside the request. Four modes: Expansion, Selective Expansion, Hold Scope, Reduction. | +| [`/plan-eng-review`](#plan-eng-review) | **Eng Manager** | Lock in architecture, data flow, diagrams, edge cases, and tests. Forces hidden assumptions into the open. | | [`/plan-design-review`](#plan-design-review) | **Senior Designer** | Interactive plan-mode design review. Rates each dimension 0-10, explains what a 10 looks like, fixes the plan. Works in plan mode. | | [`/design-consultation`](#design-consultation) | **Design Partner** | Build a complete design system from scratch. Knows the landscape, proposes creative risks, generates realistic product mockups. Design at the heart of all other phases. | | [`/review`](#review) | **Staff Engineer** | Find the bugs that pass CI but blow up in production. Auto-fixes the obvious ones. Flags completeness gaps. Advisory simplification lens flags over-built code — never blocks, never auto-applies. | @@ -125,7 +126,7 @@ Recommends A because you learn from real usage. CRM data comes naturally in week ### The design doc -Both modes end with a design doc written to `~/.gstack/projects/` — and that doc feeds directly into `/plan-ceo-review` and `/autoplan`. The full lifecycle is now: `office-hours → plan → implement → review → QA → ship → retro`. +Both modes end with a design doc written to `~/.gstack/projects/` — and that doc feeds directly into `/plan-ceo-review` and `/plan-eng-review`. The full lifecycle is now: `office-hours → plan → implement → review → QA → ship → retro`. After the design doc is approved, `/office-hours` reflects on what it noticed about how you think — not generic praise, but specific callbacks to things you said during the session. The observations appear in the design doc too, so you re-encounter them when you re-read later. @@ -183,11 +184,62 @@ Visions and decisions are persisted to `~/.gstack/projects/` so they survive bey --- -## `/plan-eng-review` (cut) +## `/plan-eng-review` -`/plan-eng-review` was cut on 2026-11-06 (GST-1698) after two evals found no gain. In the seeded-flaw panel, plain Opus 5.5 with no gstack found the planted engineering flaws in 15 of 16 reviews. In the wave 1 outcome test, plain Opus 5.5 built 22 of 22 planned features correctly, and a session told to use the skill cost 7.1 times a plain one. The evidence is in GST-1218 and gstack-evals#253. +This is my **eng manager mode**. -The standalone skill no longer installs, and `./setup` removes an existing gstack-owned `/plan-eng-review` entry on every host. Its review methodology stays as `/autoplan`'s eng phase (Phase 3), unchanged, in an interactive session. A run driven by `gstack-autoplan` (the Capy default) gives its reviewer only the skill's 36-line checklist, not the methodology. To review a plan's architecture, data flow, edge cases and tests, run `/autoplan`. `/review` covers the diff before `/ship`. +Once the product direction is right, I want a different kind of intelligence entirely. I do not want more sprawling ideation. I do not want more "wouldn't it be cool if." I want the model to become my best technical lead. + +This mode should nail: + +* architecture +* system boundaries +* data flow +* state transitions +* failure modes +* edge cases +* trust boundaries +* test coverage + +And one surprisingly big unlock for me: **diagrams**. + +LLMs get way more complete when you force them to draw the system. Sequence diagrams, state diagrams, component diagrams, data-flow diagrams, even test matrices. Diagrams force hidden assumptions into the open. They make hand-wavy planning much harder. + +So `/plan-eng-review` is where I want the model to build the technical spine that can carry the product vision. + +### Example + +Take the same listing app example. + +Let's say `/plan-ceo-review` already did its job. We decided the real feature is not just photo upload. It is a smart listing flow that: + +* uploads photos +* identifies the product +* enriches the listing from the web +* drafts a strong title and description +* suggests the best hero image + +Now `/plan-eng-review` takes over. + +Now I want the model to answer questions like: + +* What is the architecture for upload, classification, enrichment, and draft generation? +* Which steps happen synchronously, and which go to background jobs? +* Where are the boundaries between app server, object storage, vision model, search/enrichment APIs, and the listing database? +* What happens if upload succeeds but enrichment fails? +* What happens if product identification is low-confidence? +* How do retries work? +* How do we prevent duplicate jobs? +* What gets persisted when, and what can be safely recomputed? + +And this is where I want diagrams — architecture diagrams, state models, data-flow diagrams, test matrices. Diagrams force hidden assumptions into the open. They make hand-wavy planning much harder. + +That is `/plan-eng-review`. + +Not "make the idea smaller." +**Make the idea buildable.** + +One note on invocation: in plan mode, the skill skips the "what should I review?" scope question and reviews your active plan automatically, announcing its pick in one line ("Scope gate: plan mode — auto-selected B") so you can redirect it. Name a target explicitly ("review PLAN.md") and your choice wins in any mode. Outside plan mode with nothing named, it asks first — that gate is a hard stop. ### Review Readiness Dashboard @@ -207,7 +259,7 @@ Every review (CEO, Eng, Design) logs its result. At the end of each review, you +====================================================================+ ``` -Eng Review is the only required gate; `/review` on the diff or `/autoplan`'s eng phase satisfies it (disable with `gstack-config set skip_eng_review true`). CEO and Design are informational — recommended for product and UI changes respectively. +Eng Review is the only required gate (disable with `gstack-config set skip_eng_review true`). CEO and Design are informational — recommended for product and UI changes respectively. Diff reviews use the `review_freshness` grade computed by `gstack-review-read`, shared by `/ship` and `/land-and-deploy`. CURRENT requires a clean, reviewer-reported completed and converged pass whose captured start and finish fingerprints match the current working-tree content. Tracked edits and non-ignored untracked source both count; an identical commit hash or zero commits since review is not a fallback. @@ -217,7 +269,7 @@ Plan-file reviews retain their existing seven-day freshness handling and optiona ### Plan-to-QA flow -When an eng review writes a test plan artifact to `~/.gstack/projects/`, a later `/qa` picks up that test plan automatically — your engineering review feeds directly into QA testing with no manual copy-paste. +When `/plan-eng-review` finishes the test review section, it writes a test plan artifact to `~/.gstack/projects/`. When you later run `/qa`, it picks up that test plan automatically — your engineering review feeds directly into QA testing with no manual copy-paste. --- @@ -229,7 +281,7 @@ Most plans describe what the backend does but never specify what the user actual `/plan-design-review` catches all of this during planning, when it's cheap to fix. -It works like `/plan-ceo-review` — interactive, one issue at a time, with the **STOP + AskUserQuestion** pattern. It rates each design dimension 0-10, explains what a 10 looks like, then edits the plan to get there. The rating drives the work: rate low = lots of fixes, rate high = quick pass. It skips the "what should I review?" scope question in plan mode and targets your active plan automatically (announced in one line so you can redirect); an explicitly named target wins in any mode. +It works like `/plan-ceo-review` and `/plan-eng-review` — interactive, one issue at a time, with the **STOP + AskUserQuestion** pattern. It rates each design dimension 0-10, explains what a 10 looks like, then edits the plan to get there. The rating drives the work: rate low = lots of fixes, rate high = quick pass. Like `/plan-eng-review`, it skips the "what should I review?" scope question in plan mode and targets your active plan automatically (announced in one line so you can redirect); an explicitly named target wins in any mode. Seven passes over the plan: information architecture, interaction state coverage, user journey, AI slop risk, design system alignment, responsive/accessibility, and unresolved design decisions. For each pass, it finds gaps and either fixes them directly (obvious ones) or asks you to make a design choice (genuine tradeoffs). @@ -841,7 +893,7 @@ bounded scan and discloses inaccessible history or incomplete coverage. It reads raw uncommitted source without running project hooks or filters. It never edits code, runs project tests, saves a report, or creates issues or PRs. -`/autoplan`'s eng phase applies the same criteria to the plan and proposed callers. +`/plan-eng-review` applies the same criteria to the plan and proposed callers. `/review` checks the diff and related callers even on tiny changes. These scoped checks do not run the history audit. Optional extractions are advisory and require approval; they do not block a clean review or reduce its score. Actual defects @@ -883,7 +935,7 @@ gstack's own templates and for any skill folder you own. ## `/test-audit` Find existing tests that cost more than they protect. `/review`, `/ship`, `/qa` and -`/autoplan`'s eng phase apply the same [test value bar](test-value-bar.md) to tests in a +`/plan-eng-review` apply the same [test value bar](test-value-bar.md) to tests in a diff; `/test-audit` sweeps the tests that already exist. ```text @@ -1243,7 +1295,7 @@ English in, diagram out. Describe the diagram (or paste mermaid source) and you This is my **review autopilot mode**. -Running `/plan-ceo-review`, `/plan-design-review` and `/plan-devex-review` individually means answering 15-30 intermediate questions. Each question is valuable, but sometimes you want the gauntlet to run without stopping for every decision. +Running `/plan-ceo-review`, then `/plan-design-review`, then `/plan-eng-review` individually means answering 15-30 intermediate questions. Each question is valuable, but sometimes you want the gauntlet to run without stopping for every decision. In an interactive session, `/autoplan` reads the review skills from disk and runs them sequentially: CEO → Design (if UI scope) → DX (if developer-facing scope) → Eng, always last — the required shipping gate reviews the final amended plan, not a stale one. It makes decisions automatically: each question resolves to its recommended option by default, with six encoded principles (prefer completeness, match existing patterns, choose reversible options, prefer the option the user chose for similar past decisions, defer ambiguous items, and escalate security) breaking ties and deciding questions that carry no recommendation. Taste decisions (close approaches, borderline scope expansions, cross-model disagreements) get saved and presented at a final approval gate. diff --git a/docs/test-value-bar.md b/docs/test-value-bar.md index 5233b4550..5cd916e0d 100644 --- a/docs/test-value-bar.md +++ b/docs/test-value-bar.md @@ -2,7 +2,7 @@ gstack's test workflows share one rule: a test earns its place by protecting behavior that a real regression would break. Test count is not a goal. The bar is -embedded in `/autoplan`'s eng phase, `/review`, `/qa`, `/qa-only` and `/ship`, so every +embedded in `/plan-eng-review`, `/review`, `/qa`, `/qa-only` and `/ship`, so every new or changed test in a diff meets it without a separate step. `/test-audit` applies the same bar to tests that already exist. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index f6bf87f05..f14f21b3d 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -759,7 +759,7 @@ plan; the audit is `not run`. ### `PERSISTED: no` / `PERSIST: gstack-review-log '{...}'` / `no saved Eng Review: run the PERSIST: line ...` -**Meaning.** The eng review methodology (`/autoplan`'s eng phase) ran where the caller forbids writes (for example +**Meaning.** /plan-eng-review ran where the caller forbids writes (for example a delegating agent keeps the reviewer read-only, so it cannot edit the plan it judges). The review completed: it ends `DONE` with `PERSISTED: no`, records telemetry `success`, and returns the full report and decision ledger in its @@ -777,7 +777,7 @@ review-log command with this review's values. ~/.claude/skills/gstack/bin/gstack-review-log '{"skill":"plan-eng-review",...}' ``` -Or rerun /autoplan where it may write its report and log. +Or rerun /plan-eng-review where it may write its report and log. **Expected result.** `gstack-review-read` lists the `plan-eng-review` entry and /ship's dashboard shows the Eng Review row (CLEAR when its status is `clean`). diff --git a/docs/voice-input.md b/docs/voice-input.md index 5cfdae809..3401077f6 100644 --- a/docs/voice-input.md +++ b/docs/voice-input.md @@ -1,8 +1,8 @@ # Voice input (AquaVoice, Whisper, etc.) Many gstack skills list speech-to-text aliases (`voice-triggers:` in their -templates): "security check" for `/cso`, "run QA" or "test the app" for `/qa`. -Say one of those naturally and the right +templates): "security check" for `/cso`, "run QA" or "test the app" for `/qa`, +"tech review" for `/plan-eng-review`. Say one of those naturally and the right skill can be picked without the slash command name. On Claude Code the aliases are routing lines in the root `/gstack` router; on Codex and the other hosts they are appended to each skill's description, which is what those hosts match diff --git a/gstack/llms.txt b/gstack/llms.txt index d047388ff..41e78daf0 100644 --- a/gstack/llms.txt +++ b/gstack/llms.txt @@ -10,7 +10,7 @@ Conventions: ## Skills -- [/autoplan](autoplan/SKILL.md): Auto-review pipeline — runs the CEO, design, eng (architecture, edge cases, failure modes, tests) and DX reviews (lean run: one reviewer), auto-deciding. +- [/autoplan](autoplan/SKILL.md): Auto-review pipeline — runs the CEO, design, eng and DX reviews in order (lean run: one reviewer), auto-deciding. - [/benchmark](benchmark/SKILL.md): Web performance regression detection. - [/benchmark-models](benchmark-models/SKILL.md): Cross-model benchmark for gstack skills. - [/browse](browse/SKILL.md): Drive a real browser through Aside: open a page, read it, click through a flow, take screenshots, check console errors. @@ -53,6 +53,7 @@ Conventions: - [/plan-ceo-review](plan-ceo-review/SKILL.md): CEO/founder-mode plan review. - [/plan-design-review](plan-design-review/SKILL.md): Designer's eye plan review — interactive, like CEO and Eng review. - [/plan-devex-review](plan-devex-review/SKILL.md): Interactive developer experience plan review. +- [/plan-eng-review](plan-eng-review/SKILL.md): Eng manager-mode plan review. - [/plan-tune](plan-tune/SKILL.md): Self-tuning question sensitivity + developer psychographic for gstack (v1: observational). - [/qa](qa/SKILL.md): Use when you test the site, API or CLI and fix bugs. - [/qa-only](qa-only/SKILL.md): Report browser/API/CLI/job/worker/webhook bugs. diff --git a/lib/doctor-components.ts b/lib/doctor-components.ts index a6282d0ec..7ecc614fb 100644 --- a/lib/doctor-components.ts +++ b/lib/doctor-components.ts @@ -134,6 +134,7 @@ export function capyBootstrapCommand(skill: string, root: string = CAPY_INSTALL_ export const SKILL_REQUIREMENTS: Readonly> = { autoplan: PLANNING, 'plan-ceo-review': PLANNING, + 'plan-eng-review': PLANNING, 'plan-design-review': PLANNING, 'plan-devex-review': PLANNING, 'plan-tune': PLANNING, @@ -206,7 +207,7 @@ export const SKILL_REQUIREMENTS: Readonly> = { * required. */ export const PINS_ADVISORY_SKILLS: readonly string[] = [ - 'autoplan', 'plan-ceo-review', 'plan-design-review', 'plan-devex-review', 'office-hours', + 'autoplan', 'plan-ceo-review', 'plan-eng-review', 'plan-design-review', 'plan-devex-review', 'office-hours', ]; /** Rows always evaluated and required, in print order. */ diff --git a/lib/harness-register.ts b/lib/harness-register.ts index e5430e3dc..22ff1d093 100644 --- a/lib/harness-register.ts +++ b/lib/harness-register.ts @@ -38,7 +38,7 @@ export const BLOCK_END = ''; export const DOT_SKILLS_DIR = '/home/dot/skills'; export const ROUTER_DESCRIPTION = 'Use to review a diff or PR, debug a bug or failing test, QA test a site, plan or review architecture, ship a PR, audit security or write release docs. Load first for any coding task: lists every gstack skill and where to read it.'; /** OpenClaw hybrid mode: these task skills are listed as skills of their own; the router carries the rest. */ -export const HYBRID_SKILLS = ['review', 'qa', 'ship']; +export const HYBRID_SKILLS = ['review', 'qa', 'ship', 'plan-eng-review']; /** * OpenClaw serves a registered skill's SKILL.md whole or refuses it ("Skill instructions cannot be partially * served"), with maxBytes from resolveAdaptiveReadMaxBytes: 32,768 (DEFAULT_READ_PAGE_MAX_BYTES) when the model's diff --git a/lib/ship-preflight.ts b/lib/ship-preflight.ts index 0e85f77ab..5f99780ff 100644 --- a/lib/ship-preflight.ts +++ b/lib/ship-preflight.ts @@ -86,7 +86,7 @@ function integrate(cwd: string, base: string, run: string | undefined, r: Report const stat = git(cwd, ['diff', forkPoint(cwd, base), '--shortstat']).stdout.trim(); const lines = [...stat.matchAll(/(\d+) (insertion|deletion)/g)].reduce((n, m) => n + Number(m[1]), 0); const commits = git(cwd, ['rev-list', '--count', `origin/${base}..HEAD`]).stdout.trim(); - r.add(`DIFF: ${stat || 'no changes'}; commits=${commits || 0}${lines > 200 ? '; over 200 lines: recommend /autoplan' : ''}`); + r.add(`DIFF: ${stat || 'no changes'}; commits=${commits || 0}${lines > 200 ? '; over 200 lines: recommend /plan-eng-review or /autoplan' : ''}`); const pr = hostedOrigin(cwd) ? gh(cwd, ['pr', 'list', '--head', branch, '--state', 'open', '--json', 'number', '--jq', '.[0].number // empty']) : null; const n = pr?.stdout.trim() ?? ''; if (!pr) r.add('PR: not checked (origin is a local path, not a hosted remote gh can map; Step 0 uses git-native commands)'); diff --git a/office-hours/SKILL.md.tmpl b/office-hours/SKILL.md.tmpl index fb80d82fe..de7f761c0 100644 --- a/office-hours/SKILL.md.tmpl +++ b/office-hours/SKILL.md.tmpl @@ -13,7 +13,7 @@ description: | a new product idea, asks whether something is worth building, wants to think through design decisions for something that doesn't exist yet, or is exploring a concept before any code is written. - Use before /plan-ceo-review or /autoplan. (gstack) + Use before /plan-ceo-review or /plan-eng-review. (gstack) codex_default_prompt: "Use $gstack-office-hours to think this idea through before any code: challenge the premise, find the narrowest wedge, and save a design doc the later skills read." allowed-tools: - Bash diff --git a/office-hours/sections/design-and-handoff.md b/office-hours/sections/design-and-handoff.md index 5071a96f9..e201e0c85 100644 --- a/office-hours/sections/design-and-handoff.md +++ b/office-hours/sections/design-and-handoff.md @@ -46,7 +46,7 @@ are empty or that restate what's already settled. No page cap — extra length must come from genuinely open questions, not template completeness. After writing, tell the user: -**"Design doc saved to: {repo path if written, else ~/.gstack path}{when both: ' (cross-session copy in ~/.gstack)'}. Other skills (/plan-ceo-review, /autoplan) will find it automatically."** +**"Design doc saved to: {repo path if written, else ~/.gstack path}{when both: ' (cross-session copy in ~/.gstack)'}. Other skills (/plan-ceo-review, /plan-eng-review) will find it automatically."** ### Startup mode design doc template: @@ -656,13 +656,13 @@ If E: proceed to next-skill recommendations. Don't just list options. Offer to launch the next review NOW so the design doc flows straight into a structured review. Map the design-doc mode to the recommended option -(default `/autoplan` when ambiguous — it runs the CEO, design, DX and eng reviews in one -pass). +(default `/plan-eng-review` when ambiguous — it has the broadest real-world use and the +strongest retention). **If `PROACTIVE` is `false` or `off`, OR `CONDUCTOR_SESSION: true`:** do NOT auto-launch. Recommend in one line and stop; the user invokes: - EXPANSION / ambitious → "Next: `/plan-ceo-review` to pressure-test scope and find the 10-star product." -- well-scoped → "Next: `/autoplan` to lock architecture, tests, and edge cases." +- well-scoped → "Next: `/plan-eng-review` to lock architecture, tests, and edge cases." - visual/UX-heavy → "Next: `/plan-design-review` for a visual/UX pass." **Otherwise**, offer via AskUserQuestion (D format from the preamble): @@ -673,11 +673,11 @@ ELI10: You just wrote a design doc. The natural next step is a structured review catches scope and architecture problems before you build. I can launch it right now, or you can run it later yourself. Stakes if we pick wrong: skipping review means problems surface mid-build, costing rework. -Recommendation: the mode-mapped option (`/autoplan` if unsure) because it locks the +Recommendation: the mode-mapped option (`/plan-eng-review` if unsure) because it locks the plan before any code is written. Completeness: A=10/10, B=9/10, C=8/10, D=3/10 Pros / cons: -A) Run /autoplan now (recommended) +A) Run /plan-eng-review now (recommended) ✅ Locks architecture, tests, and edge cases before a line of code is written ❌ Adds ~15 min CC now (human: 1-2 hrs of review compressed) B) Run /plan-ceo-review now diff --git a/office-hours/sections/design-and-handoff.md.tmpl b/office-hours/sections/design-and-handoff.md.tmpl index 91d5439be..e9d57fe7a 100644 --- a/office-hours/sections/design-and-handoff.md.tmpl +++ b/office-hours/sections/design-and-handoff.md.tmpl @@ -43,7 +43,7 @@ are empty or that restate what's already settled. No page cap — extra length must come from genuinely open questions, not template completeness. After writing, tell the user: -**"Design doc saved to: {repo path if written, else ~/.gstack path}{when both: ' (cross-session copy in ~/.gstack)'}. Other skills (/plan-ceo-review, /autoplan) will find it automatically."** +**"Design doc saved to: {repo path if written, else ~/.gstack path}{when both: ' (cross-session copy in ~/.gstack)'}. Other skills (/plan-ceo-review, /plan-eng-review) will find it automatically."** ### Startup mode design doc template: @@ -497,13 +497,13 @@ If E: proceed to next-skill recommendations. Don't just list options. Offer to launch the next review NOW so the design doc flows straight into a structured review. Map the design-doc mode to the recommended option -(default `/autoplan` when ambiguous — it runs the CEO, design, DX and eng reviews in one -pass). +(default `/plan-eng-review` when ambiguous — it has the broadest real-world use and the +strongest retention). **If `PROACTIVE` is `false` or `off`, OR `CONDUCTOR_SESSION: true`:** do NOT auto-launch. Recommend in one line and stop; the user invokes: - EXPANSION / ambitious → "Next: `/plan-ceo-review` to pressure-test scope and find the 10-star product." -- well-scoped → "Next: `/autoplan` to lock architecture, tests, and edge cases." +- well-scoped → "Next: `/plan-eng-review` to lock architecture, tests, and edge cases." - visual/UX-heavy → "Next: `/plan-design-review` for a visual/UX pass." **Otherwise**, offer via AskUserQuestion (D format from the preamble): @@ -514,11 +514,11 @@ ELI10: You just wrote a design doc. The natural next step is a structured review catches scope and architecture problems before you build. I can launch it right now, or you can run it later yourself. Stakes if we pick wrong: skipping review means problems surface mid-build, costing rework. -Recommendation: the mode-mapped option (`/autoplan` if unsure) because it locks the +Recommendation: the mode-mapped option (`/plan-eng-review` if unsure) because it locks the plan before any code is written. Completeness: A=10/10, B=9/10, C=8/10, D=3/10 Pros / cons: -A) Run /autoplan now (recommended) +A) Run /plan-eng-review now (recommended) ✅ Locks architecture, tests, and edge cases before a line of code is written ❌ Adds ~15 min CC now (human: 1-2 hrs of review compressed) B) Run /plan-ceo-review now diff --git a/plan-ceo-review/sections/review-sections.md b/plan-ceo-review/sections/review-sections.md index e82389574..d43808d78 100644 --- a/plan-ceo-review/sections/review-sections.md +++ b/plan-ceo-review/sections/review-sections.md @@ -897,7 +897,7 @@ Produce this markdown table: |--------|---------|-----|------|--------|----------| | CEO Review | `/plan-ceo-review` | Scope & strategy | {runs} | {status} | {findings} | | Outside Review | {recorded provider and trigger} | Independent 2nd opinion | {runs} | {outside_status} | {findings} | -| Eng Review | `/autoplan` | Architecture & tests (required) | {runs} | {status} | {findings} | +| Eng Review | `/plan-eng-review` | Architecture & tests (required) | {runs} | {status} | {findings} | | Design Review | `/plan-design-review` | UI/UX gaps | {runs} | {status} | {findings} | | DX Review | `/plan-devex-review` | Developer experience gaps | {runs} | {status} | {findings} | ``` @@ -1085,14 +1085,14 @@ explicitly, never as CLEAR. Display a fresh `clean` result as CLEAR and After displaying the Review Readiness Dashboard, recommend the next review(s) based on what this CEO review discovered. Read the dashboard output to see which reviews have already been run and whether they are stale. -**Recommend /autoplan for the eng review if eng review is not skipped globally** — check the dashboard output for `skip_eng_review`. If it is `true`, eng review is opted out — do not recommend it. Otherwise, /autoplan runs the eng review as its last phase. If this CEO review expanded scope, changed architectural direction, or accepted scope expansions, emphasize that a fresh eng review is needed. If an eng review already exists in the dashboard but the commit hash shows it predates this CEO review, note that it may be stale and should be re-run. +**Recommend /plan-eng-review if eng review is not skipped globally** — check the dashboard output for `skip_eng_review`. If it is `true`, eng review is opted out — do not recommend it. Otherwise, eng review is the required shipping gate. If this CEO review expanded scope, changed architectural direction, or accepted scope expansions, emphasize that a fresh eng review is needed. If an eng review already exists in the dashboard but the commit hash shows it predates this CEO review, note that it may be stale and should be re-run. **Recommend /plan-design-review if UI scope was detected** — specifically if Section 11 (Design & UX Review) was NOT skipped, or if accepted scope expansions included UI-facing features. If an existing design review is stale (commit hash drift), note that. In SCOPE REDUCTION mode, skip this recommendation — design review is unlikely relevant for scope cuts. -**If both are needed, recommend /autoplan**: it also runs the design review when it detects UI scope. +**If both are needed, recommend eng review first** (required gate), then design review. Use AskUserQuestion to present the next step. Include only applicable options: -- **A)** Run /autoplan next (eng review) +- **A)** Run /plan-eng-review next (required gate) - **B)** Run /plan-design-review next (only if UI scope detected) - **C)** Skip — I'll handle reviews manually diff --git a/plan-ceo-review/sections/review-sections.md.tmpl b/plan-ceo-review/sections/review-sections.md.tmpl index 601d20ea3..fd32eeb6f 100644 --- a/plan-ceo-review/sections/review-sections.md.tmpl +++ b/plan-ceo-review/sections/review-sections.md.tmpl @@ -568,14 +568,14 @@ Substitute `SCOPE_SUMMARY` (e.g. "accepted 4 of 6 proposals", "held scope" or After displaying the Review Readiness Dashboard, recommend the next review(s) based on what this CEO review discovered. Read the dashboard output to see which reviews have already been run and whether they are stale. -**Recommend /autoplan for the eng review if eng review is not skipped globally** — check the dashboard output for `skip_eng_review`. If it is `true`, eng review is opted out — do not recommend it. Otherwise, /autoplan runs the eng review as its last phase. If this CEO review expanded scope, changed architectural direction, or accepted scope expansions, emphasize that a fresh eng review is needed. If an eng review already exists in the dashboard but the commit hash shows it predates this CEO review, note that it may be stale and should be re-run. +**Recommend /plan-eng-review if eng review is not skipped globally** — check the dashboard output for `skip_eng_review`. If it is `true`, eng review is opted out — do not recommend it. Otherwise, eng review is the required shipping gate. If this CEO review expanded scope, changed architectural direction, or accepted scope expansions, emphasize that a fresh eng review is needed. If an eng review already exists in the dashboard but the commit hash shows it predates this CEO review, note that it may be stale and should be re-run. **Recommend /plan-design-review if UI scope was detected** — specifically if Section 11 (Design & UX Review) was NOT skipped, or if accepted scope expansions included UI-facing features. If an existing design review is stale (commit hash drift), note that. In SCOPE REDUCTION mode, skip this recommendation — design review is unlikely relevant for scope cuts. -**If both are needed, recommend /autoplan**: it also runs the design review when it detects UI scope. +**If both are needed, recommend eng review first** (required gate), then design review. Use AskUserQuestion to present the next step. Include only applicable options: -- **A)** Run /autoplan next (eng review) +- **A)** Run /plan-eng-review next (required gate) - **B)** Run /plan-design-review next (only if UI scope detected) - **C)** Skip — I'll handle reviews manually diff --git a/plan-design-review/sections/review-sections.md b/plan-design-review/sections/review-sections.md index 5318555d7..256f8a17a 100644 --- a/plan-design-review/sections/review-sections.md +++ b/plan-design-review/sections/review-sections.md @@ -449,7 +449,7 @@ Produce this markdown table: |--------|---------|-----|------|--------|----------| | CEO Review | \`/plan-ceo-review\` | Scope & strategy | {runs} | {status} | {findings} | | Outside Review | {recorded provider and trigger} | Independent 2nd opinion | {runs} | {outside_status} | {findings} | -| Eng Review | \`/autoplan\` | Architecture & tests (required) | {runs} | {status} | {findings} | +| Eng Review | \`/plan-eng-review\` | Architecture & tests (required) | {runs} | {status} | {findings} | | Design Review | \`/plan-design-review\` | UI/UX gaps | {runs} | {status} | {findings} | | DX Review | \`/plan-devex-review\` | Developer experience gaps | {runs} | {status} | {findings} | \`\`\` @@ -676,14 +676,14 @@ SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG 2>/dev/null) || true From the dashboard output, recommend the next review(s): -- **/autoplan** unless `skip_eng_review` is `true`: its eng phase reviews architecture and tests. Stress it when this review added flows or changed the information architecture; an eng review whose commit predates this review is stale and should be re-run. -- **/plan-ceo-review** only for fundamental product gaps (initial score below 4/10, major IA problems, or doubt about the problem itself) and no CEO review exists. Most design reviews should not trigger it. If both apply, /autoplan covers both. +- **/plan-eng-review** unless `skip_eng_review` is `true`: it is the required shipping gate. Stress it when this review added flows or changed the information architecture; an eng review whose commit predates this review is stale and should be re-run. +- **/plan-ceo-review** only for fundamental product gaps (initial score below 4/10, major IA problems, or doubt about the problem itself) and no CEO review exists. Most design reviews should not trigger it. If both apply, eng review first. - **/design-shotgun** for visual issues worth exploring; **/design-html** when approved mockups need HTML. Both produce design artifacts, so they fit plan mode. Use AskUserQuestion to present the next step. Always include the manual/stop option E; offer only applicable follow-on skills. If the user chooses manual, finish without starting another skill: -- **A)** Run /autoplan next (eng review) +- **A)** Run /plan-eng-review next (required gate) - **B)** Run /plan-ceo-review (only if fundamental product gaps found) - **C)** Run /design-shotgun — explore visual design variants for issues found - **D)** Run /design-html — generate Pretext-native HTML from approved mockups diff --git a/plan-design-review/sections/review-sections.md.tmpl b/plan-design-review/sections/review-sections.md.tmpl index c8a5b66c4..9f86e6a9d 100644 --- a/plan-design-review/sections/review-sections.md.tmpl +++ b/plan-design-review/sections/review-sections.md.tmpl @@ -260,14 +260,14 @@ Substitute values from the Completion Summary: From the dashboard output, recommend the next review(s): -- **/autoplan** unless `skip_eng_review` is `true`: its eng phase reviews architecture and tests. Stress it when this review added flows or changed the information architecture; an eng review whose commit predates this review is stale and should be re-run. -- **/plan-ceo-review** only for fundamental product gaps (initial score below 4/10, major IA problems, or doubt about the problem itself) and no CEO review exists. Most design reviews should not trigger it. If both apply, /autoplan covers both. +- **/plan-eng-review** unless `skip_eng_review` is `true`: it is the required shipping gate. Stress it when this review added flows or changed the information architecture; an eng review whose commit predates this review is stale and should be re-run. +- **/plan-ceo-review** only for fundamental product gaps (initial score below 4/10, major IA problems, or doubt about the problem itself) and no CEO review exists. Most design reviews should not trigger it. If both apply, eng review first. - **/design-shotgun** for visual issues worth exploring; **/design-html** when approved mockups need HTML. Both produce design artifacts, so they fit plan mode. Use AskUserQuestion to present the next step. Always include the manual/stop option E; offer only applicable follow-on skills. If the user chooses manual, finish without starting another skill: -- **A)** Run /autoplan next (eng review) +- **A)** Run /plan-eng-review next (required gate) - **B)** Run /plan-ceo-review (only if fundamental product gaps found) - **C)** Run /design-shotgun — explore visual design variants for issues found - **D)** Run /design-html — generate Pretext-native HTML from approved mockups diff --git a/plan-devex-review/SKILL.md b/plan-devex-review/SKILL.md index 19ca31daf..b9e9f11ab 100644 --- a/plan-devex-review/SKILL.md +++ b/plan-devex-review/SKILL.md @@ -383,7 +383,7 @@ Before proceeding, read the plan and infer the developer product type from conte If NONE of the above: the plan has no developer-facing surface. Tell the user: "This plan doesn't appear to have developer-facing surfaces. /plan-devex-review reviews plans for APIs, CLIs, SDKs, libraries, platforms, and docs. Consider -/autoplan or /plan-design-review instead." Exit gracefully. +/plan-eng-review or /plan-design-review instead." Exit gracefully. If detected: State your classification and ask for confirmation. Do not ask from scratch. "I'm reading this as a CLI Tool plan. Correct?" diff --git a/plan-devex-review/SKILL.md.tmpl b/plan-devex-review/SKILL.md.tmpl index 8696d9838..18a919793 100644 --- a/plan-devex-review/SKILL.md.tmpl +++ b/plan-devex-review/SKILL.md.tmpl @@ -135,7 +135,7 @@ Before proceeding, read the plan and infer the developer product type from conte If NONE of the above: the plan has no developer-facing surface. Tell the user: "This plan doesn't appear to have developer-facing surfaces. /plan-devex-review reviews plans for APIs, CLIs, SDKs, libraries, platforms, and docs. Consider -/autoplan or /plan-design-review instead." Exit gracefully. +/plan-eng-review or /plan-design-review instead." Exit gracefully. If detected: State your classification and ask for confirmation. Do not ask from scratch. "I'm reading this as a CLI Tool plan. Correct?" diff --git a/plan-devex-review/sections/review-sections.md b/plan-devex-review/sections/review-sections.md index f1d056825..4a8c60a0c 100644 --- a/plan-devex-review/sections/review-sections.md +++ b/plan-devex-review/sections/review-sections.md @@ -763,7 +763,7 @@ Produce this markdown table: |--------|---------|-----|------|--------|----------| | CEO Review | \`/plan-ceo-review\` | Scope & strategy | {runs} | {status} | {findings} | | Outside Review | {recorded provider and trigger} | Independent 2nd opinion | {runs} | {outside_status} | {findings} | -| Eng Review | \`/autoplan\` | Architecture & tests (required) | {runs} | {status} | {findings} | +| Eng Review | \`/plan-eng-review\` | Architecture & tests (required) | {runs} | {status} | {findings} | | Design Review | \`/plan-design-review\` | UI/UX gaps | {runs} | {status} | {findings} | | DX Review | \`/plan-devex-review\` | Developer experience gaps | {runs} | {status} | {findings} | \`\`\` @@ -983,9 +983,9 @@ SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG 2>/dev/null) || true After displaying the Review Readiness Dashboard, recommend next reviews: -**Recommend /autoplan if eng review is not skipped globally** — DX issues often +**Recommend /plan-eng-review if eng review is not skipped globally** — DX issues often have architectural implications. If this DX review found API design problems, error -handling gaps, or CLI ergonomics issues, /autoplan's eng phase should validate the fixes. +handling gaps, or CLI ergonomics issues, eng review should validate the fixes. **Suggest /plan-design-review if user-facing UI exists** — DX review focuses on developer-facing surfaces; design review covers end-user-facing UI. @@ -996,7 +996,7 @@ out. This is where the competitive benchmark pays off: you have a concrete targe measure against. Use AskUserQuestion with applicable options: -- **A)** Run /autoplan next (eng review) +- **A)** Run /plan-eng-review next (required gate) - **B)** Run /plan-design-review (only if UI scope detected) - **C)** Ready to implement, run /devex-review after shipping - **D)** Skip, I'll handle next steps manually diff --git a/plan-devex-review/sections/review-sections.md.tmpl b/plan-devex-review/sections/review-sections.md.tmpl index 1c0d4d6a0..7ad879c6a 100644 --- a/plan-devex-review/sections/review-sections.md.tmpl +++ b/plan-devex-review/sections/review-sections.md.tmpl @@ -427,9 +427,9 @@ TIMESTAMP = current ISO 8601 datetime; STATUS = "clean" if score 8+ AND 0 unreso After displaying the Review Readiness Dashboard, recommend next reviews: -**Recommend /autoplan if eng review is not skipped globally** — DX issues often +**Recommend /plan-eng-review if eng review is not skipped globally** — DX issues often have architectural implications. If this DX review found API design problems, error -handling gaps, or CLI ergonomics issues, /autoplan's eng phase should validate the fixes. +handling gaps, or CLI ergonomics issues, eng review should validate the fixes. **Suggest /plan-design-review if user-facing UI exists** — DX review focuses on developer-facing surfaces; design review covers end-user-facing UI. @@ -440,7 +440,7 @@ out. This is where the competitive benchmark pays off: you have a concrete targe measure against. Use AskUserQuestion with applicable options: -- **A)** Run /autoplan next (eng review) +- **A)** Run /plan-eng-review next (required gate) - **B)** Run /plan-design-review (only if UI scope detected) - **C)** Ready to implement, run /devex-review after shipping - **D)** Skip, I'll handle next steps manually diff --git a/qa/SKILL.md b/qa/SKILL.md index d9b5dd54d..5c8b6ab91 100644 --- a/qa/SKILL.md +++ b/qa/SKILL.md @@ -307,7 +307,7 @@ Prefer the richer of recent project test plans and plans in conversation over gi SLUG=$(~/.claude/skills/gstack/bin/gstack-slug --get SLUG 2>/dev/null) ls -t "$GSTACK_STATE_ROOT"/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1 ``` -2. **Conversation context:** Prior `/autoplan` or `/plan-ceo-review` test plans. +2. **Conversation context:** Prior `/plan-eng-review` or `/plan-ceo-review` test plans. 3. Fall back to git diff only if neither exists. --- diff --git a/qa/SKILL.md.tmpl b/qa/SKILL.md.tmpl index 359b35ff1..7bc6706b1 100644 --- a/qa/SKILL.md.tmpl +++ b/qa/SKILL.md.tmpl @@ -120,7 +120,7 @@ Prefer the richer of recent project test plans and plans in conversation over gi {{SLUG_EVAL}} ls -t "$GSTACK_STATE_ROOT"/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1 ``` -2. **Conversation context:** Prior `/autoplan` or `/plan-ceo-review` test plans. +2. **Conversation context:** Prior `/plan-eng-review` or `/plan-ceo-review` test plans. 3. Fall back to git diff only if neither exists. --- diff --git a/retro/SKILL.md b/retro/SKILL.md index 30af82d85..49f2fad38 100644 --- a/retro/SKILL.md +++ b/retro/SKILL.md @@ -371,7 +371,7 @@ Conditional rows (skip each when its input is absent or empty in the window): If eureka moments exist, list them: ``` EUREKA /office-hours (branch: garrytan/auth-rethink): "Session tokens don't need server storage — browser crypto API makes client-side JWT validation viable" - EUREKA /autoplan (branch: garrytan/cache-layer): "Redis isn't needed here — Bun's built-in LRU cache handles this workload" + EUREKA /plan-eng-review (branch: garrytan/cache-layer): "Redis isn't needed here — Bun's built-in LRU cache handles this workload" ``` ### Step 3: Commit Time Distribution diff --git a/retro/SKILL.md.tmpl b/retro/SKILL.md.tmpl index 51560fdc8..e30ff8969 100644 --- a/retro/SKILL.md.tmpl +++ b/retro/SKILL.md.tmpl @@ -216,7 +216,7 @@ Conditional rows (skip each when its input is absent or empty in the window): If eureka moments exist, list them: ``` EUREKA /office-hours (branch: garrytan/auth-rethink): "Session tokens don't need server storage — browser crypto API makes client-side JWT validation viable" - EUREKA /autoplan (branch: garrytan/cache-layer): "Redis isn't needed here — Bun's built-in LRU cache handles this workload" + EUREKA /plan-eng-review (branch: garrytan/cache-layer): "Redis isn't needed here — Bun's built-in LRU cache handles this workload" ``` ### Step 3: Commit Time Distribution diff --git a/scripts/discover-skills.ts b/scripts/discover-skills.ts index dbc1b5868..a4ddd1d66 100644 --- a/scripts/discover-skills.ts +++ b/scripts/discover-skills.ts @@ -12,14 +12,20 @@ const SKIP = new Set(['node_modules', '.git', 'dist']); /** * Retired skills: no host registers them, and setup removes an earlier - * install's gstack-owned entry. plan-eng-review's source stays as /autoplan's - * eng-phase methodology (GST-1698); external hosts get it beside - * gstack-autoplan/SKILL.md as .md, since Codex and Copilot register every - * nested SKILL.md. investigate was cut after a no-gain eval and its source is - * gone (GST-1717). setup and gstack-relink read the same list from - * GSTACK_RETIRED_SKILLS in bin/gstack-install-registry.sh. + * install's gstack-owned entry. investigate was cut after a no-gain eval and + * its source is gone (GST-1717). setup and gstack-relink read the same list + * from GSTACK_RETIRED_SKILLS in bin/gstack-install-registry.sh. */ -export const RETIRED_SKILLS = ['plan-eng-review', 'investigate']; +export const RETIRED_SKILLS = ['investigate']; + +/** + * Review skills /autoplan reads as a phase methodology from its own directory + * on external hosts: each renders a second time beside gstack-autoplan/SKILL.md + * as .md, so /autoplan's phase does not depend on the standalone skill + * staying installed (GST-1698; the standalone /plan-eng-review returned in + * GST-2726). + */ +export const AUTOPLAN_SIBLING_METHODOLOGIES = ['plan-eng-review']; /** * The gstack-on-Capy skills (crew/README.md): registered only on a Capy diff --git a/scripts/gen-skill-docs.ts b/scripts/gen-skill-docs.ts index 6dddb73d1..937ad99d1 100644 --- a/scripts/gen-skill-docs.ts +++ b/scripts/gen-skill-docs.ts @@ -9,7 +9,7 @@ * Used by skill:check and CI freshness checks. */ -import { discoverTemplates, discoverSectionTemplates, includesSkill, RETIRED_SKILLS } from './discover-skills'; +import { discoverTemplates, discoverSectionTemplates, includesSkill, AUTOPLAN_SIBLING_METHODOLOGIES } from './discover-skills'; import { externalSkillName, extractNameAndDescription } from './external-skill-names'; export { extractNameAndDescription } from './external-skill-names'; import { generateLlmsTxt } from './gen-llms-txt'; @@ -755,10 +755,9 @@ function processExternalHost( const hostConfig = getHostConfig(host); const name = externalSkillName(skillDir === '.' ? '' : skillDir, frontmatterName); - const retired = RETIRED_SKILLS.includes(skillDir); // --out-dir mirrors the host tree (outputs only; inputs read from ROOT). - const outputDir = path.join(options.outputRoot, hostConfig.hostSubdir, 'skills', retired ? 'gstack-autoplan' : name); - const outputPath = path.join(outputDir, retired ? `${skillDir}.md` : 'SKILL.md'); + const outputDir = path.join(options.outputRoot, hostConfig.hostSubdir, 'skills', name); + const outputPath = path.join(outputDir, 'SKILL.md'); // Guard against symlink loops let symlinkLoop = false; @@ -791,7 +790,7 @@ function processExternalHost( // Config-driven: generate metadata (e.g., openai.yaml for Codex). The // default_prompt comes from the template's codex_default_prompt: key when set. - const metadata = hostConfig.generation.generateMetadata && !symlinkLoop && !retired ? { + const metadata = hostConfig.generation.generateMetadata && !symlinkLoop ? { outputPath: path.join(outputDir, 'agents', 'openai.yaml'), content: generateOpenAIYaml(name, condenseOpenAIShortDescription(extractedDescription), extractCodexDefaultPrompt(tmplContent)), } : undefined; @@ -807,7 +806,7 @@ function renderSharedPreamble(ctx: TemplateContext, hostConfig: HostConfig, opti return GENERATED_HEADER.replace('{{SOURCE}}', 'scripts/resolvers/preamble-hoist.ts') + content; } -function processTemplate(tmplPath: string, host: Host, options: RenderOptions): { outputPath: string; content: string; symlinkLoop?: boolean; metadata?: { outputPath: string; content: string }; preamble?: { outputPath: string; content: string } } { +function processTemplate(tmplPath: string, host: Host, options: RenderOptions): { outputPath: string; content: string; symlinkLoop?: boolean; metadata?: { outputPath: string; content: string }; preamble?: { outputPath: string; content: string }; autoplanSibling?: string } { // Normalize to LF at the entry point. Templates may have CRLF on disk when // checked out on Windows with core.autocrlf=true. Downstream regexes // (processVoiceTriggers, transformFrontmatter) hardcode \n, so without @@ -885,10 +884,13 @@ function processTemplate(tmplPath: string, host: Host, options: RenderOptions): if (skillDir === '' || skillDir === '.') content = omitDisabledSkills(content, [...options.disabledSkills, ...excludedSkillDirs(options.modules)]); content = rewriteInstallRoot(insertRuntimePreludes(rewriteCarvedSectionRefs(content, ctx), ctx), currentHostConfig, options.installRoot); - const preamble = !(host !== 'claude' && RETIRED_SKILLS.includes(skillDir)) && hoistsPreamble(ctx) && tmplContent.includes('{{PREAMBLE}}') && !effectiveSuppressedResolvers(currentHostConfig, options).has('PREAMBLE') + const preamble = hoistsPreamble(ctx) && tmplContent.includes('{{PREAMBLE}}') && !effectiveSuppressedResolvers(currentHostConfig, options).has('PREAMBLE') ? { outputPath: path.join(path.dirname(outputPath), 'sections', SHARED_PREAMBLE_FILE), content: renderSharedPreamble(ctx, currentHostConfig, options) } : undefined; - return { outputPath, content, symlinkLoop, metadata, preamble }; + const autoplanSibling = host !== 'claude' && AUTOPLAN_SIBLING_METHODOLOGIES.includes(skillDir) + ? path.join(options.outputRoot, currentHostConfig.hostSubdir, 'skills', 'gstack-autoplan', `${skillDir}.md`) + : undefined; + return { outputPath, content, symlinkLoop, metadata, preamble, autoplanSibling }; } /** autoplan/DRIVER.md (field wave item 13): one host-neutral render of autoplan/DRIVER.md.tmpl through the same resolvers. */ @@ -1066,6 +1068,7 @@ export async function runGeneration(settings: GenerationOptions = {}): Promise`) (Lit or htm templates in .ts/.js count) with no design review: mention "Design Review: static (no preview declared) — Step 9 runs the lite check only; consider /design-review on a served page for a visual audit." Continue to Step 2 without asking; Step 9 applies the review gates. diff --git a/ship/SKILL.md.tmpl b/ship/SKILL.md.tmpl index 4d604f7ae..36cd86644 100644 --- a/ship/SKILL.md.tmpl +++ b/ship/SKILL.md.tmpl @@ -153,7 +153,7 @@ act on each `STOP:` and `NEXT:` line. An outside review with status `unverified` or `unavailable` is missing coverage, never a pass. -Over 200 lines, `DIFF:` recommends `/autoplan`. `SCOPE: frontend=true` (from +Over 200 lines, `DIFF:` recommends `/plan-eng-review` or `/autoplan`. `SCOPE: frontend=true` (from `gstack-diff-scope `) (Lit or htm templates in .ts/.js count) with no design review: mention "Design Review: static (no preview declared) — Step 9 runs the lite check only; consider /design-review on a served page for a visual audit." Continue to Step 2 without asking; Step 9 applies the review gates. diff --git a/spec/SKILL.md b/spec/SKILL.md index 4307940e1..722483a88 100644 --- a/spec/SKILL.md +++ b/spec/SKILL.md @@ -622,7 +622,8 @@ Add to the standard template: route them to `/office-hours` first. `/spec` is for work that has already passed the "is this worth building" bar. - **After `/spec`:** if the spec describes architectural or design risk that - needs review before implementation starts, suggest `/autoplan`. + needs review before implementation starts, suggest `/plan-eng-review` (or + `/autoplan` for the full review gauntlet). - **For implementation:** the issue itself is the handoff. The implementer can open it and execute without re-asking the user. **Implementation model:** relay model/source from `"$HOME/.claude/skills/gstack/bin/gstack-models" resolve --role implementation --provider anthropic`. gstack cannot change this session. Recommend only; no spawn or config edits unless asked. On error, relay its repair, not a model. [Policy setup](https://github.com/garrytan/gstack/blob/main/docs/model-policy.md). diff --git a/spec/SKILL.md.tmpl b/spec/SKILL.md.tmpl index 58b8eb7d2..aad712c22 100644 --- a/spec/SKILL.md.tmpl +++ b/spec/SKILL.md.tmpl @@ -474,7 +474,8 @@ Add to the standard template: route them to `/office-hours` first. `/spec` is for work that has already passed the "is this worth building" bar. - **After `/spec`:** if the spec describes architectural or design risk that - needs review before implementation starts, suggest `/autoplan`. + needs review before implementation starts, suggest `/plan-eng-review` (or + `/autoplan` for the full review gauntlet). - **For implementation:** the issue itself is the handoff. The implementer can open it and execute without re-asking the user. {{IMPLEMENTATION_MODEL_HANDOFF}} diff --git a/test-audit/SKILL.md b/test-audit/SKILL.md index 03c444f6f..3072ea8cf 100644 --- a/test-audit/SKILL.md +++ b/test-audit/SKILL.md @@ -102,7 +102,7 @@ telemetry — it never blocks the workflow. Find existing tests that cost more than they protect, prove it with evidence, and retire them only in approved batches. Optimize for confidence, not deletion count; a few well-evidenced candidates beat a large speculative list, and none is a valid -result. `/review`, `/ship`, `/qa` and `/autoplan` apply the same bar to new +result. `/review`, `/ship`, `/qa` and `/plan-eng-review` apply the same bar to new tests in a diff; this skill is the whole-repo sweep for tests that already exist. Usage: `/test-audit [path ...] [--since ] [--max-candidates N]` (default: whole diff --git a/test-audit/SKILL.md.tmpl b/test-audit/SKILL.md.tmpl index 4c66b7b7c..b063cd16d 100644 --- a/test-audit/SKILL.md.tmpl +++ b/test-audit/SKILL.md.tmpl @@ -26,7 +26,7 @@ allowed-tools: Find existing tests that cost more than they protect, prove it with evidence, and retire them only in approved batches. Optimize for confidence, not deletion count; a few well-evidenced candidates beat a large speculative list, and none is a valid -result. `/review`, `/ship`, `/qa` and `/autoplan` apply the same bar to new +result. `/review`, `/ship`, `/qa` and `/plan-eng-review` apply the same bar to new tests in a diff; this skill is the whole-repo sweep for tests that already exist. Usage: `/test-audit [path ...] [--since ] [--max-candidates N]` (default: whole diff --git a/test/autoplan-bounded-journal.test.ts b/test/autoplan-bounded-journal.test.ts index 087a75009..768d50c2a 100644 --- a/test/autoplan-bounded-journal.test.ts +++ b/test/autoplan-bounded-journal.test.ts @@ -77,7 +77,7 @@ describe('A2: the guard decides on a journal larger than its shrunk bounds', () const output = await bounded(() => f.hook(input), RECORD, 4 * 1024); expect(codeOf(output)).toBe('oversized_invocation'); expect(denial(output)).toContain('retained-data bound'); - expect(denial(output)).toContain('/plan-ceo-review, then /plan-devex-review by hand'); + expect(denial(output)).toContain('/plan-ceo-review, then /plan-devex-review, then /plan-eng-review'); expect(f.log().at(-1)).toMatchObject({ decision: 'deny', disposition: 'fallback', code: 'oversized_invocation' }); await bounded(() => expect(ownedRetainedLimit()).toBe(OWNED_RETAINED_MAX_BYTES), RECORD, OWNED_RETAINED_MAX_BYTES * 4); }); @@ -157,7 +157,7 @@ describe('A2: append-tolerant reads with prefix identity', () => { test('a journal that shrinks between two reads is an identity denial', async () => { const { output } = await twoReads(file => fs.truncateSync(file, Math.floor(fs.statSync(file).size / 2))); expect(codeOf(output)).toBe('identity'); - expect(denial(output)).toContain('/plan-ceo-review, then /plan-devex-review by hand'); + expect(denial(output)).toContain('/plan-ceo-review, then /plan-devex-review, then /plan-eng-review'); }); test('the reader itself: a changed prefix is rewritten, fewer bytes than the prefix is identity', () => { diff --git a/test/autoplan-guard-reasons.test.ts b/test/autoplan-guard-reasons.test.ts index 39963056b..6154d918f 100644 --- a/test/autoplan-guard-reasons.test.ts +++ b/test/autoplan-guard-reasons.test.ts @@ -30,7 +30,7 @@ describe('guard reason inventory', () => { if (reason.disposition === 'unverified') expect(text).toContain('Phase-report enforcement was skipped for this call'); if (reason.disposition === 'corrective') expect(text).not.toContain(FALLBACK); } - expect(FALLBACK).toContain('/plan-ceo-review, then /plan-devex-review by hand'); + expect(FALLBACK).toContain('/plan-ceo-review, then /plan-devex-review, then /plan-eng-review'); expect(FALLBACK).toContain('/context-save'); expect(FALLBACK).toContain('/context-restore, then /autoplan '); }); diff --git a/test/autoplan-methodology-names.test.ts b/test/autoplan-methodology-names.test.ts index deda76857..91f29c3d0 100644 --- a/test/autoplan-methodology-names.test.ts +++ b/test/autoplan-methodology-names.test.ts @@ -4,7 +4,7 @@ import { chmodSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rm import { tmpdir } from 'node:os'; import { join, resolve } from 'node:path'; import { createSnapshot, prepareMethodology } from '../bin/gstack-autoplan-snapshot'; -import { RETIRED_SKILLS } from '../scripts/discover-skills'; +import { AUTOPLAN_SIBLING_METHODOLOGIES } from '../scripts/discover-skills'; const ROOT = resolve(import.meta.dir, '..'); const owned: string[] = []; @@ -23,16 +23,16 @@ function fixture(phase: string, layout: string) { }); expect(generated.status, generated.stderr).toBe(0); } - // A retired skill's external render is a methodology file beside /autoplan. - const retiredInline = layout === 'inlineCodex' && RETIRED_SKILLS.includes(skill); - const source = layout === 'inlineCodex' ? join(dir, '.agents/skills', retiredInline ? 'gstack-autoplan' : `gstack-${skill}`) : join(ROOT, skill); - const fileName = retiredInline ? `${skill}.md` : 'SKILL.md'; - const target = join(dir, retiredInline ? 'gstack-autoplan' : skill); + // /autoplan reads a sibling methodology file beside its own SKILL.md on external hosts. + const siblingInline = layout === 'inlineCodex' && AUTOPLAN_SIBLING_METHODOLOGIES.includes(skill); + const source = layout === 'inlineCodex' ? join(dir, '.agents/skills', siblingInline ? 'gstack-autoplan' : `gstack-${skill}`) : join(ROOT, skill); + const fileName = siblingInline ? `${skill}.md` : 'SKILL.md'; + const target = join(dir, siblingInline ? 'gstack-autoplan' : skill); mkdirSync(target); cpSync(join(source, fileName), join(target, fileName)); // C4: Codex carves plan-ceo-review too, so an install that has sections/ copies it. // Every tier 2+ skill ships sections/preamble.md; carving is the review section. - const carved = !retiredInline && existsSync(join(source, 'sections', 'review-sections.md')); + const carved = !siblingInline && existsSync(join(source, 'sections', 'review-sections.md')); if (existsSync(join(source, 'sections'))) cpSync(join(source, 'sections'), join(target, 'sections'), { recursive: true }); if (layout === 'patchedClaude') { const result = spawnSync('bash', [join(ROOT, 'bin/gstack-patch-names'), dir, 'true'], { encoding: 'utf8', timeout: 10_000 }); diff --git a/test/autoplan-publication-hook.test.ts b/test/autoplan-publication-hook.test.ts index da97d11ee..9635e38fa 100644 --- a/test/autoplan-publication-hook.test.ts +++ b/test/autoplan-publication-hook.test.ts @@ -156,7 +156,7 @@ describe('Autoplan hook journal-root verdicts', () => { const reason: string = output.hookSpecificOutput.permissionDecisionReason; expect(reason).toContain(`code ${code}`); expect(reason).toContain('Claude Code 2.1.284'); - expect(reason).toContain('/plan-ceo-review, then /plan-devex-review by hand'); + expect(reason).toContain('/plan-ceo-review, then /plan-devex-review, then /plan-eng-review'); expect(reason).toContain('docs/autoplan-guard-troubleshooting.md'); expect(reason).not.toContain('no missing-publication conclusion'); const records = fs.readFileSync(s.log, 'utf8').trim().split('\n').map(line => JSON.parse(line)); diff --git a/test/autoplan-publication-payload.test.ts b/test/autoplan-publication-payload.test.ts index 471649705..0515e426f 100644 --- a/test/autoplan-publication-payload.test.ts +++ b/test/autoplan-publication-payload.test.ts @@ -156,7 +156,7 @@ describe('Publication flush: a report counts only once a later journaled record f.report(f.nextMessage()); f.journal(); const output = await f.hook(next(f)); expect(codeOf(output)).toBe('publication_repeat'); - expect(denial(output)).toContain('/plan-ceo-review, then /plan-devex-review by hand'); + expect(denial(output)).toContain('/plan-ceo-review, then /plan-devex-review, then /plan-eng-review'); }); test('a denied call after the report proves the report was journaled, so the next attempt counts it', async () => { diff --git a/test/autoplan-review-discovery.test.ts b/test/autoplan-review-discovery.test.ts index 24215662c..e701dab77 100644 --- a/test/autoplan-review-discovery.test.ts +++ b/test/autoplan-review-discovery.test.ts @@ -8,12 +8,12 @@ import { ALL_HOST_CONFIGS } from '../hosts'; import { generateAutoplanReviewFile } from '../scripts/resolvers/composition'; import { HOST_PATHS, type TemplateContext } from '../scripts/resolvers/types'; import { E2E_TOUCHFILES } from './helpers/touchfiles'; -import { RETIRED_SKILLS } from '../scripts/discover-skills'; +import { AUTOPLAN_SIBLING_METHODOLOGIES } from '../scripts/discover-skills'; const ROOT = path.resolve(import.meta.dir, '..'); const REVIEWS = ['plan-ceo-review', 'plan-design-review', 'plan-devex-review', 'plan-eng-review']; -/** External hosts: a retired review ships beside gstack-autoplan/SKILL.md as .md (GST-1698). */ -const externalRef = (review: string) => RETIRED_SKILLS.includes(review) ? `${review}.md` : `../gstack-${review}/SKILL.md`; +/** External hosts: /autoplan reads a sibling methodology beside gstack-autoplan/SKILL.md as .md (GST-1698). */ +const externalRef = (review: string) => AUTOPLAN_SIBLING_METHODOLOGIES.includes(review) ? `${review}.md` : `../gstack-${review}/SKILL.md`; let owned: string; let rendered: string; @@ -78,8 +78,8 @@ describe('autoplan reads installed host methodology', () => { // Read the path actually emitted in the entrypoint. Resolving it from // the installed entrypoint works for copied installs and symlinked ones. const refs = [...body.matchAll(/`(\.\.\/gstack-plan-[a-z-]+\/SKILL\.md)`/g)].map(match => match[1]!); - expect([...new Set(refs)].sort()).toEqual(REVIEWS.filter(name => !RETIRED_SKILLS.includes(name)).map(externalRef).sort()); - for (const name of REVIEWS.filter(review => RETIRED_SKILLS.includes(review))) { + expect([...new Set(refs)].sort()).toEqual(REVIEWS.filter(name => !AUTOPLAN_SIBLING_METHODOLOGIES.includes(name)).map(externalRef).sort()); + for (const name of REVIEWS.filter(review => AUTOPLAN_SIBLING_METHODOLOGIES.includes(review))) { expect(body).toContain(`the file \`${name}.md\` in the installed \`/autoplan\` SKILL.md directory`); expect(body).not.toContain(`gstack-${name}/SKILL.md`); } diff --git a/test/carve-section-sharding.test.ts b/test/carve-section-sharding.test.ts index f9be6a12b..0f239b413 100644 --- a/test/carve-section-sharding.test.ts +++ b/test/carve-section-sharding.test.ts @@ -18,7 +18,10 @@ describe('carved-skill cases each get a complete paid process budget', () => { const cases = [...source.matchAll(/test\('carve-section-loading-([a-z-]+)', \(\) => runCarveSectionCase\('([a-z-]+)'\), CAPTURE_LONG_MS\)/g)] .map(match => ({ id: `carve-section-loading-${match[1]}`, skill: match[2]! })); // A retired skill keeps its carve guard (its methodology still renders) but no section-loading case. - const generic = Object.values(CARVE_GUARDS).filter(guard => (guard.behavioral === 'plan' || guard.behavioral === 'prompt') && !RETIRED_SKILLS.includes(guard.skill)).map(guard => guard.skill).sort(); + // plan-eng-review's case was deleted with the GST-1698 cut; the skill came back in GST-2726 without + // it, and whether the paid case returns is the GST-1966 measurement plan's call. + const NO_LOADING_CASE = [...RETIRED_SKILLS, 'plan-eng-review']; + const generic = Object.values(CARVE_GUARDS).filter(guard => (guard.behavioral === 'plan' || guard.behavioral === 'prompt') && !NO_LOADING_CASE.includes(guard.skill)).map(guard => guard.skill).sort(); test('every generic registry entry has exactly one periodic case, under its own case id, and no external entry does', () => { expect(source).toContain("describeE2ETier('periodic')"); diff --git a/test/e2e-harness-audit.test.ts b/test/e2e-harness-audit.test.ts index 41bcd15e3..64d68b59a 100644 --- a/test/e2e-harness-audit.test.ts +++ b/test/e2e-harness-audit.test.ts @@ -67,14 +67,15 @@ function findInteractiveSkills(): string[] { /** * Scan a test file's contents for any of the supported real-interactive * coverage patterns. Either: direct canUseTool usage in runAgentSdkTest, - * the legacy plan-mode-helpers wrapper, or the new real-PTY observation - * helper. + * the legacy plan-mode-helpers wrapper, or a real-PTY helper that answers + * the skill's native questions (observation or counting). */ function hasCanUseToolCoverage(testFile: string): boolean { const content = fs.readFileSync(testFile, 'utf-8'); if (content.includes('canUseTool')) return true; if (content.includes('runPlanModeSkillTest')) return true; if (content.includes('runPlanSkillObservation')) return true; + if (content.includes('runPlanSkillCounting')) return true; return false; } diff --git a/test/eng-review-routing.test.ts b/test/eng-review-routing.test.ts index 92215bfd9..6c8372d7d 100644 --- a/test/eng-review-routing.test.ts +++ b/test/eng-review-routing.test.ts @@ -158,7 +158,7 @@ describe('engineering review routing contracts', () => { test('#3106: an unpersisted review gets no saved credit; /ship names the PERSIST: line or a rerun', () => { const ctx = (skillName: string) => ({ skillName, tmplPath: `${skillName}/SKILL.md.tmpl`, host: 'claude', paths: HOST_PATHS.claude } as TemplateContext); const ship = compact(generateReviewDashboard(ctx('ship'))); - expect(ship).toContain('With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only eng review printed, or rerun /autoplan"'); + expect(ship).toContain('With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only /plan-eng-review printed, or rerun it"'); expect(ship).toContain('docs/troubleshooting.md#plan-eng-review-not-persisted'); expect(generateReviewDashboard(ctx('plan-eng-review'))).not.toContain('PERSIST:'); const gate = compact(generateExitPlanModeGate(ctx('plan-eng-review'))); diff --git a/test/fixtures/golden/agy-ship-SKILL.md b/test/fixtures/golden/agy-ship-SKILL.md index a9671d209..010b34e2e 100644 --- a/test/fixtures/golden/agy-ship-SKILL.md +++ b/test/fixtures/golden/agy-ship-SKILL.md @@ -396,7 +396,7 @@ and outside_status; retain partial coverage. These details do not clear Eng Revi **3. Choose the historical verdict.** CLEARED requires the selected Eng Review to be `clean`, within 7 days and fresh under step 2. Otherwise report NOT CLEARED -and its missing, stale or open-issue reason. With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only eng review printed, or rerun /autoplan" (docs/troubleshooting.md#plan-eng-review-not-persisted). If `skip_eng_review` is true, show +and its missing, stale or open-issue reason. With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only /plan-eng-review printed, or rerun it" (docs/troubleshooting.md#plan-eng-review-not-persisted). If `skip_eng_review` is true, show "SKIPPED (global)" for Eng Review and CLEARED for this dashboard. This verdict never skips Step 9 or its finding, approval and convergence gates. Continue Step 1 even when history is NOT CLEARED. @@ -424,7 +424,7 @@ VERDICT: {CLEARED or NOT CLEARED} — {reason} An outside review with status `unverified` or `unavailable` is missing coverage, never a pass. -Over 200 lines, `DIFF:` recommends `/autoplan`. `SCOPE: frontend=true` (from +Over 200 lines, `DIFF:` recommends `/plan-eng-review` or `/autoplan`. `SCOPE: frontend=true` (from `gstack-diff-scope `) (Lit or htm templates in .ts/.js count) with no design review: mention "Design Review: static (no preview declared) — Step 9 runs the lite check only; consider /design-review on a served page for a visual audit." Continue to Step 2 without asking; Step 9 applies the review gates. diff --git a/test/fixtures/golden/claude-ship-SKILL.md b/test/fixtures/golden/claude-ship-SKILL.md index c389dd072..b439b8a3c 100644 --- a/test/fixtures/golden/claude-ship-SKILL.md +++ b/test/fixtures/golden/claude-ship-SKILL.md @@ -395,7 +395,7 @@ and outside_status; retain partial coverage. These details do not clear Eng Revi **3. Choose the historical verdict.** CLEARED requires the selected Eng Review to be `clean`, within 7 days and fresh under step 2. Otherwise report NOT CLEARED -and its missing, stale or open-issue reason. With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only eng review printed, or rerun /autoplan" (docs/troubleshooting.md#plan-eng-review-not-persisted). If `skip_eng_review` is true, show +and its missing, stale or open-issue reason. With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only /plan-eng-review printed, or rerun it" (docs/troubleshooting.md#plan-eng-review-not-persisted). If `skip_eng_review` is true, show "SKIPPED (global)" for Eng Review and CLEARED for this dashboard. This verdict never skips Step 9 or its finding, approval and convergence gates. Continue Step 1 even when history is NOT CLEARED. @@ -423,7 +423,7 @@ VERDICT: {CLEARED or NOT CLEARED} — {reason} An outside review with status `unverified` or `unavailable` is missing coverage, never a pass. -Over 200 lines, `DIFF:` recommends `/autoplan`. `SCOPE: frontend=true` (from +Over 200 lines, `DIFF:` recommends `/plan-eng-review` or `/autoplan`. `SCOPE: frontend=true` (from `gstack-diff-scope `) (Lit or htm templates in .ts/.js count) with no design review: mention "Design Review: static (no preview declared) — Step 9 runs the lite check only; consider /design-review on a served page for a visual audit." Continue to Step 2 without asking; Step 9 applies the review gates. diff --git a/test/fixtures/golden/codex-ship-SKILL.md b/test/fixtures/golden/codex-ship-SKILL.md index 3f8c25589..df8ef255e 100644 --- a/test/fixtures/golden/codex-ship-SKILL.md +++ b/test/fixtures/golden/codex-ship-SKILL.md @@ -395,7 +395,7 @@ and outside_status; retain partial coverage. These details do not clear Eng Revi **3. Choose the historical verdict.** CLEARED requires the selected Eng Review to be `clean`, within 7 days and fresh under step 2. Otherwise report NOT CLEARED -and its missing, stale or open-issue reason. With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only eng review printed, or rerun /autoplan" (docs/troubleshooting.md#plan-eng-review-not-persisted). If `skip_eng_review` is true, show +and its missing, stale or open-issue reason. With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only /plan-eng-review printed, or rerun it" (docs/troubleshooting.md#plan-eng-review-not-persisted). If `skip_eng_review` is true, show "SKIPPED (global)" for Eng Review and CLEARED for this dashboard. This verdict never skips Step 9 or its finding, approval and convergence gates. Continue Step 1 even when history is NOT CLEARED. @@ -423,7 +423,7 @@ VERDICT: {CLEARED or NOT CLEARED} — {reason} An outside review with status `unverified` or `unavailable` is missing coverage, never a pass. -Over 200 lines, `DIFF:` recommends `/autoplan`. `SCOPE: frontend=true` (from +Over 200 lines, `DIFF:` recommends `/plan-eng-review` or `/autoplan`. `SCOPE: frontend=true` (from `gstack-diff-scope `) (Lit or htm templates in .ts/.js count) with no design review: mention "Design Review: static (no preview declared) — Step 9 runs the lite check only; consider /design-review on a served page for a visual audit." Continue to Step 2 without asking; Step 9 applies the review gates. diff --git a/test/fixtures/golden/factory-ship-SKILL.md b/test/fixtures/golden/factory-ship-SKILL.md index 2854fa993..83c053a6f 100644 --- a/test/fixtures/golden/factory-ship-SKILL.md +++ b/test/fixtures/golden/factory-ship-SKILL.md @@ -397,7 +397,7 @@ and outside_status; retain partial coverage. These details do not clear Eng Revi **3. Choose the historical verdict.** CLEARED requires the selected Eng Review to be `clean`, within 7 days and fresh under step 2. Otherwise report NOT CLEARED -and its missing, stale or open-issue reason. With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only eng review printed, or rerun /autoplan" (docs/troubleshooting.md#plan-eng-review-not-persisted). If `skip_eng_review` is true, show +and its missing, stale or open-issue reason. With no Eng Review record, say "no saved Eng Review: run the `PERSIST:` line a read-only /plan-eng-review printed, or rerun it" (docs/troubleshooting.md#plan-eng-review-not-persisted). If `skip_eng_review` is true, show "SKIPPED (global)" for Eng Review and CLEARED for this dashboard. This verdict never skips Step 9 or its finding, approval and convergence gates. Continue Step 1 even when history is NOT CLEARED. @@ -425,7 +425,7 @@ VERDICT: {CLEARED or NOT CLEARED} — {reason} An outside review with status `unverified` or `unavailable` is missing coverage, never a pass. -Over 200 lines, `DIFF:` recommends `/autoplan`. `SCOPE: frontend=true` (from +Over 200 lines, `DIFF:` recommends `/plan-eng-review` or `/autoplan`. `SCOPE: frontend=true` (from `gstack-diff-scope `) (Lit or htm templates in .ts/.js count) with no design review: mention "Design Review: static (no preview declared) — Step 9 runs the lite check only; consider /design-review on a served page for a visual audit." Continue to Step 2 without asking; Step 9 applies the review gates. diff --git a/test/fixtures/skill-md-size-allowlist.json b/test/fixtures/skill-md-size-allowlist.json index 7ee2c844e..1933b8af5 100644 --- a/test/fixtures/skill-md-size-allowlist.json +++ b/test/fixtures/skill-md-size-allowlist.json @@ -2,55 +2,55 @@ "_comment": "Generated SKILL.md files over the limit, pinned at their exact character count (#3199). test/skill-md-size-guard.test.ts fails when a pinned skill grows past its pin or shrinks below it: lower the pin when a skill shrinks and delete it once the skill is within the limit. Raising a pin is an owner decision. The shared-preamble hoist (GSTA-96) moved every tier 2+ skill's shared preamble into sections/preamble.md; the pins below are what remains.", "limit": 100000, "pins": { - "agy/gstack-autoplan": 109540, - "agy/gstack-plan-design-review": 109096, - "agy/gstack-plan-devex-review": 114924, + "agy/gstack-autoplan": 109449, + "agy/gstack-plan-design-review": 109103, + "agy/gstack-plan-devex-review": 114944, "agy/gstack-plan-eng-review": 143580, "agy/gstack-review": 104735, - "codex/gstack-autoplan": 108283, - "codex/gstack-plan-design-review": 110453, - "codex/gstack-plan-devex-review": 116432, + "codex/gstack-autoplan": 108192, + "codex/gstack-plan-design-review": 110460, + "codex/gstack-plan-devex-review": 116452, "codex/gstack-plan-eng-review": 144745, "codex/gstack-review": 104119, - "copilot/gstack-autoplan": 108983, - "copilot/gstack-plan-design-review": 109362, - "copilot/gstack-plan-devex-review": 114386, + "copilot/gstack-autoplan": 108892, + "copilot/gstack-plan-design-review": 109369, + "copilot/gstack-plan-devex-review": 114406, "copilot/gstack-plan-eng-review": 143745, "copilot/gstack-review": 104316, - "cursor/gstack-autoplan": 108215, - "cursor/gstack-plan-design-review": 107904, - "cursor/gstack-plan-devex-review": 113656, + "cursor/gstack-autoplan": 108124, + "cursor/gstack-plan-design-review": 107911, + "cursor/gstack-plan-devex-review": 113676, "cursor/gstack-plan-eng-review": 142335, "cursor/gstack-review": 122788, - "factory/gstack-autoplan": 110493, - "factory/gstack-plan-design-review": 111002, - "factory/gstack-plan-devex-review": 117019, + "factory/gstack-autoplan": 110402, + "factory/gstack-plan-design-review": 111009, + "factory/gstack-plan-devex-review": 117039, "factory/gstack-plan-eng-review": 145443, "factory/gstack-review": 126561, - "gbrain/gstack-autoplan": 108622, + "gbrain/gstack-autoplan": 108531, "gbrain/gstack-plan-eng-review": 124963, - "gemini/gstack-autoplan": 108773, - "gemini/gstack-plan-design-review": 109190, - "gemini/gstack-plan-devex-review": 114214, + "gemini/gstack-autoplan": 108682, + "gemini/gstack-plan-design-review": 109197, + "gemini/gstack-plan-devex-review": 114234, "gemini/gstack-plan-eng-review": 143578, "gemini/gstack-review": 104138, - "hermes/gstack-autoplan": 108576, + "hermes/gstack-autoplan": 108536, "hermes/gstack-plan-eng-review": 124999, - "kiro/gstack-autoplan": 107989, - "kiro/gstack-plan-design-review": 107750, - "kiro/gstack-plan-devex-review": 113508, + "kiro/gstack-autoplan": 107898, + "kiro/gstack-plan-design-review": 107757, + "kiro/gstack-plan-devex-review": 113528, "kiro/gstack-plan-eng-review": 142197, "kiro/gstack-review": 122612, - "openclaw/gstack-autoplan": 108445, + "openclaw/gstack-autoplan": 108354, "openclaw/gstack-plan-eng-review": 123478, - "opencode/gstack-autoplan": 108964, - "opencode/gstack-plan-design-review": 109218, - "opencode/gstack-plan-devex-review": 114264, + "opencode/gstack-autoplan": 108873, + "opencode/gstack-plan-design-review": 109225, + "opencode/gstack-plan-devex-review": 114284, "opencode/gstack-plan-eng-review": 143604, "opencode/gstack-review": 123410, - "slate/gstack-autoplan": 108102, - "slate/gstack-plan-design-review": 107827, - "slate/gstack-plan-devex-review": 113582, + "slate/gstack-autoplan": 108011, + "slate/gstack-plan-design-review": 107834, + "slate/gstack-plan-devex-review": 113602, "slate/gstack-plan-eng-review": 142266, "slate/gstack-review": 122700 } diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index 2e3bb05fd..4fe1639e1 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -917,13 +917,13 @@ describe('REVIEW_DASHBOARD resolver', () => { }); } - test('plan-ceo-review chaining mentions eng (via /autoplan) and design reviews', () => { + test('plan-ceo-review chaining mentions eng and design reviews', () => { // Carved skill: the chaining prose lives in sections/*.md. (It used to // pass against the skeleton only because the preamble's routing-injection // rules incidentally named these skills — that prose moved into // bin/gstack-skill-start in token-reduction Phase 2.) const content = readSkillUnion('plan-ceo-review'); - expect(content).toContain('Run /autoplan next (eng review)'); + expect(content).toContain('/plan-eng-review'); expect(content).toContain('/plan-design-review'); }); @@ -933,9 +933,9 @@ describe('REVIEW_DASHBOARD resolver', () => { expect(content).toContain('/plan-ceo-review'); }); - test('plan-design-review chaining mentions eng (via /autoplan), ceo, and design skills', () => { + test('plan-design-review chaining mentions eng, ceo, and design skills', () => { const content = readSkillUnion('plan-design-review'); - expect(content).toContain('Run /autoplan next (eng review)'); + expect(content).toContain('/plan-eng-review'); expect(content).toContain('/plan-ceo-review'); expect(content).toContain('/design-shotgun'); expect(content).toContain('/design-html'); @@ -1303,7 +1303,7 @@ describe('PLAN_FILE_REVIEW_REPORT resolver', () => { expect(content).toContain('Findings'); expect(content).toContain('VERDICT'); expect(content).toContain('/plan-ceo-review'); - expect(content).toContain('| Eng Review | `/autoplan` |'); + expect(content).toContain('/plan-eng-review'); expect(content).toContain('/plan-design-review'); expect(content).toContain('/codex review'); }); diff --git a/test/helpers/autoplan-preconfigured-fixture.ts b/test/helpers/autoplan-preconfigured-fixture.ts index 758bd086c..f5c426221 100644 --- a/test/helpers/autoplan-preconfigured-fixture.ts +++ b/test/helpers/autoplan-preconfigured-fixture.ts @@ -9,7 +9,7 @@ When the user's request matches an available skill, invoke it via the Skill tool Key routing rules: - Product ideas/brainstorming → invoke /office-hours - Strategy/scope → invoke /plan-ceo-review -- Architecture → invoke /autoplan +- Architecture → invoke /plan-eng-review - Design system/plan review → invoke /design-consultation or /plan-design-review - Full review pipeline → invoke /autoplan - Bugs/errors → fix them directly: one read-only check of the cause, or a focused failing test first when the cause is unclear; then fix it and run that test diff --git a/test/helpers/carve-guards.ts b/test/helpers/carve-guards.ts index 40393984f..5971f0d45 100644 --- a/test/helpers/carve-guards.ts +++ b/test/helpers/carve-guards.ts @@ -161,7 +161,7 @@ export const CARVE_GUARDS: Record = { }, behavioral: 'external', externalTest: 'test/skill-e2e-ship-section-loading.test.ts', - maxSkeletonBytes: 61_420, // GSTA-152 token cap (2026-10-29, Garry's "Do it" on plan v3): the skeleton's Budget paragraph (the --token-cap, --resume and --continue flags, start/check/close, the budget-handoff pointer) and the section index's budget-handoff line; measured 61,420 (before: 60,958 on edf4c2e). Before that: GSTA-131 token efficiency (2026-10-27, Garry's D1): Step 1's delta carry (dry run, pregate at HEAD, then carry --pregate) and Step 11.5's fix-check and planned-skip binding, +60 bytes after tightening Step 1 and the Review policy paragraph; measured 60,960 (before: 60,900 on 10b77de4). Before that: GSTA-96 hoist merged with GSTA-92 phase 2 (2026-10-26): the hoisted skeleton (59,706) plus this PR's growth, keeping the hoist's 65-byte headroom; measured 60,848. Before: + v2.0 {{ASIDE_RESEARCH}} (Aside first, WebSearch fallback); measured 78_275. + gate integrity (HONEST_WORK_GATE_INTEGRITY W3): Step 16 stage 4 ZERO-RUN/unknown receipt rows, stage 5 honesty inventory, Step 17 open-gate ready-PR gate; measured 80,540 (2026-10-10). + rule 22 / GBRA-108 (2026-10-25): Step 22's terminal line (gstack-ship-receipt result, the GSTACK_RESULT line a parent greps) and Step 18's unattended routing (an open PR at HEAD gets its body updated, else handoff), offset in part by tightening Steps 14, 16, 18 and 20 prose after the 2026-10-14 tightening left 2 bytes of headroom; measured 81,535. + harness lane E (2026-10-26, issue row 3: four Captains re-ran /ship on identical product code): Step 1's carry check (gstack-ship-receipt carry binds an earlier receipt to HEAD when the product patch-id is unchanged); measured 82,165. + the Review policy paragraph (the blocking floor, pass structure and cap, NO FINDINGS, the review_loop receipt counters, the review_scope knob), stated in the skeleton because gstack is the canonical holder of its review policy (docs/review-policy.md); measured 82,645. + maxSkeletonBytes: 61_438, // GST-2726 (2026-11-15, Garry: bring /plan-eng-review back): Step 1's DIFF hint and the no-Eng-Review line name /plan-eng-review again, the wording GST-1698 removed; measured 61,438 (before: 61,417 on 81fb900). Before that: GSTA-152 token cap (2026-10-29, Garry's "Do it" on plan v3): the skeleton's Budget paragraph (the --token-cap, --resume and --continue flags, start/check/close, the budget-handoff pointer) and the section index's budget-handoff line; measured 61,420 (before: 60,958 on edf4c2e). Before that: GSTA-131 token efficiency (2026-10-27, Garry's D1): Step 1's delta carry (dry run, pregate at HEAD, then carry --pregate) and Step 11.5's fix-check and planned-skip binding, +60 bytes after tightening Step 1 and the Review policy paragraph; measured 60,960 (before: 60,900 on 10b77de4). Before that: GSTA-96 hoist merged with GSTA-92 phase 2 (2026-10-26): the hoisted skeleton (59,706) plus this PR's growth, keeping the hoist's 65-byte headroom; measured 60,848. Before: + v2.0 {{ASIDE_RESEARCH}} (Aside first, WebSearch fallback); measured 78_275. + gate integrity (HONEST_WORK_GATE_INTEGRITY W3): Step 16 stage 4 ZERO-RUN/unknown receipt rows, stage 5 honesty inventory, Step 17 open-gate ready-PR gate; measured 80,540 (2026-10-10). + rule 22 / GBRA-108 (2026-10-25): Step 22's terminal line (gstack-ship-receipt result, the GSTACK_RESULT line a parent greps) and Step 18's unattended routing (an open PR at HEAD gets its body updated, else handoff), offset in part by tightening Steps 14, 16, 18 and 20 prose after the 2026-10-14 tightening left 2 bytes of headroom; measured 81,535. + harness lane E (2026-10-26, issue row 3: four Captains re-ran /ship on identical product code): Step 1's carry check (gstack-ship-receipt carry binds an earlier receipt to HEAD when the product patch-id is unchanged); measured 82,165. + the Review policy paragraph (the blocking floor, pass structure and cap, NO FINDINGS, the review_loop receipt counters, the review_scope knob), stated in the skeleton because gstack is the canonical holder of its review policy (docs/review-policy.md); measured 82,645. minUnionBytes: 181_000, // token-reduction Phases 1-2 (v1.69.x branch); measured union 201,464 mustContain: ['VERSION', 'CHANGELOG', 'review', 'merge', 'PR'], // v1.58.5.0: pre-push-guard install (#2077) stacks on the shared first-run-guidance preamble. @@ -359,7 +359,7 @@ do not launch the downstream skill or open a browser.`, maxSkeletonBytes: 43_885, // GSTA-134 skill diet (2026-10-28): lowered from 80_533 to the measured skeleton after the second opinion and visual design moved to sections, 43,885. Before: GSTA-96 hoist (2026-10-26): lowered from 95_900 by the shared preamble that moved to sections/preamble.md, keeping the pre-hoist headroom of 952 bytes; measured 79,581. Before: Office-hours + sketch outside voices include host guards and completion checks. + v1.91.19.0 wave: Q open-question prose form (#2729, approved Q3), DESIGN_READY --version probe (B4), Aside ~/.local/bin fallback (E7), verdict-form outside voice (INV-1), plus v1.91.17.0's round accounting (#3022) merged in; measured 89,684 (2026-10-03). + 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); skeleton measured 92,590 (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; skeleton measured 92,869 (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; skeleton measured 92,930 (2026-10-07). + Oct 7 wave guard (CEO-20): conditional `run_in_background` request plus the background-run recovery at each foreground dispatch site; skeleton measured 92,756 (2026-10-07). Merged with the guard area: measured skeleton 93,099 (2026-10-07). + fix wave PR D: the Phase 4.5 builder-profile read before the session log (#2801) and the pre-telemetry design-doc check (#1049); measured skeleton 94,877 (2026-10-07). + Honest Work wave merged (W2/W3 gate integrity in review/ship, W4 kernel + DONE line in every tier-2+ skill, W5/W7 in spec/ship): re-measured on the integrated tree (2026-10-10). minUnionBytes: 115_800, // Phase 4 wave 4; measured union 118,175 mustContain: ['design doc', 'problem statement'], - maxSizeRatio: 1.1921, // GSTA-134 (2026-10-28, raised from 1.1796 by GStack Minder as merge-queue owner): +1,662 B union: second-opinion question moved into the main file while CODEX_SECOND_OPINION keeps its copy; per-run load 73,248→43,885 B; measured 156,286 / 131,110 = 1.19202, rounded up. Before: + 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 149,758 / 131,110 = 1.1422 (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 150,037 / 131,110 = 1.1444 (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 150,098 / 131,110 = 1.1448 (2026-10-07). + Oct 7 wave guard (CEO-20): conditional `run_in_background` request plus the background-run recovery at each foreground dispatch site; measured 150,011 / 131,110 = 1.1442 (2026-10-07). Merged with the guard area: measured 150,354 / 131,110 = 1.1468 (2026-10-07). + fix wave PR D: builder-profile read before the session log with Phase 6 using the carried values (#2801), the inline design doc before approval (#879) and the pre-telemetry design-doc check (#1049); measured 153,206 / 131,110 = 1.1685 (2026-10-07). + empty LAST_ASSIGNMENT/LAST_PROJECT guards in the welcome_back and regular greetings (backfilled profiles); measured 153,469 / 131,110 = 1.1705 (2026-10-08). + Honest Work wave merged (W2/W3 gate integrity in review/ship, W4 kernel + DONE line in every tier-2+ skill, W5/W7 in spec/ship): re-measured on the integrated tree (2026-10-10). + GSTA-96 shared-preamble hoist (owner-approved raise, Garry 2026-10-25: "do it"): the union now holds sections/preamble.md, so a fresh invocation reads the pointer plus the shared file and its own copies of shared sections; measured 160,989 / 131,110 = 1.2279 (2026-10-25). Before: 1.18. - GSTA-96 dedupe: the Q open-question form is office-hours' own appended subsection, so its copies of the shared Format and fallback subsections go; measured 154,653 / 131,110 = 1.1796 (2026-10-26), 154,624 = 1.1793 after the main merge. Before: 1.2279. + maxSizeRatio: 1.1922, // GST-2726 (2026-11-15, Garry: bring /plan-eng-review back): the handoff menu, its default and the design-doc line name /plan-eng-review again, +42 B union; measured 156,298 / 131,110 = 1.19211, rounded up (before: 156,256 = 1.19179 on 81fb900). Before that: GSTA-134 (2026-10-28, raised from 1.1796 by GStack Minder as merge-queue owner): +1,662 B union: second-opinion question moved into the main file while CODEX_SECOND_OPINION keeps its copy; per-run load 73,248→43,885 B; measured 156,286 / 131,110 = 1.19202, rounded up. Before: + 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 149,758 / 131,110 = 1.1422 (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 150,037 / 131,110 = 1.1444 (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 150,098 / 131,110 = 1.1448 (2026-10-07). + Oct 7 wave guard (CEO-20): conditional `run_in_background` request plus the background-run recovery at each foreground dispatch site; measured 150,011 / 131,110 = 1.1442 (2026-10-07). Merged with the guard area: measured 150,354 / 131,110 = 1.1468 (2026-10-07). + fix wave PR D: builder-profile read before the session log with Phase 6 using the carried values (#2801), the inline design doc before approval (#879) and the pre-telemetry design-doc check (#1049); measured 153,206 / 131,110 = 1.1685 (2026-10-07). + empty LAST_ASSIGNMENT/LAST_PROJECT guards in the welcome_back and regular greetings (backfilled profiles); measured 153,469 / 131,110 = 1.1705 (2026-10-08). + Honest Work wave merged (W2/W3 gate integrity in review/ship, W4 kernel + DONE line in every tier-2+ skill, W5/W7 in spec/ship): re-measured on the integrated tree (2026-10-10). + GSTA-96 shared-preamble hoist (owner-approved raise, Garry 2026-10-25: "do it"): the union now holds sections/preamble.md, so a fresh invocation reads the pointer plus the shared file and its own copies of shared sections; measured 160,989 / 131,110 = 1.2279 (2026-10-25). Before: 1.18. - GSTA-96 dedupe: the Q open-question form is office-hours' own appended subsection, so its copies of the shared Format and fallback subsections go; measured 154,653 / 131,110 = 1.1796 (2026-10-26), 154,624 = 1.1793 after the main merge. Before: 1.2279. }, 'document-release': { skill: 'document-release', @@ -733,7 +733,7 @@ do not launch the downstream skill or open a browser.`, gateAfterStop: undefined, }, behavioral: 'prompt', - maxSkeletonBytes: 51_622, // GSTA-96 hoist (2026-10-26): lowered from 73_450 by the shared preamble that moved to sections/preamble.md, keeping the pre-hoist headroom of 937 bytes; measured 50,685. Before: + v1.78 AUQ spawned-trigger objectivity (explicit declaration + interactive fence); measured 73_059 + maxSkeletonBytes: 51_626, // GST-2726 (2026-11-15, Garry: bring /plan-eng-review back): the EUREKA example names /plan-eng-review again; measured 51,626 (before: 51,619 on 81fb900). Before that: GSTA-96 hoist (2026-10-26): lowered from 73_450 by the shared preamble that moved to sections/preamble.md, keeping the pre-hoist headroom of 937 bytes; measured 50,685. Before: + v1.78 AUQ spawned-trigger objectivity (explicit declaration + interactive fence); measured 73_059 minUnionBytes: 66_000, // measured union 73,496 mustContain: ['retrospective', '45-minute gap', 'Ship of the week', 'Praise'], }, diff --git a/test/helpers/office-hours-completion.ts b/test/helpers/office-hours-completion.ts index ead28775d..9a4960f0e 100644 --- a/test/helpers/office-hours-completion.ts +++ b/test/helpers/office-hours-completion.ts @@ -223,7 +223,7 @@ export function validateOfficeHoursCompletion(evidence: OfficeHoursCompletionEvi const handoff = sectionBody(evidence.output, ['handoff', 'handoff — the relationship closing', 'handoff - the relationship closing']) || sectionBody(evidence.output, ['relationship closing']); if (!substantive(handoff)) fail('REPORT.md lacks a substantive Handoff'); - if (!/\/(?:autoplan|plan-(?:ceo|design|devex)-review)\b/.test(handoff)) fail('Handoff lacks the next-skill recommendation'); + if (!/\/(?:autoplan|plan-(?:ceo|eng|design|devex)-review)\b/.test(handoff)) fail('Handoff lacks the next-skill recommendation'); if (!/\b(?:declined|deferred|not now|later)\b/i.test(handoff)) fail('Handoff does not record the declined downstream launch'); // The caller separately checks actual tool calls for downstream launch; // recording the user's choice here is not proof that it was respected. diff --git a/test/helpers/periodic-exclude-data.ts b/test/helpers/periodic-exclude-data.ts index 70f6b6bee..515b4ced4 100644 --- a/test/helpers/periodic-exclude-data.ts +++ b/test/helpers/periodic-exclude-data.ts @@ -24,8 +24,8 @@ export const PERIODIC_CI_EXCLUDE: Record { expect(() => validateOfficeHoursCompletion({ ...completed(), output: noDecline })).toThrow('declined downstream launch'); }); - test('accepts every next skill the handoff menu offers and rejects the retired /plan-eng-review', () => { - // #4108 moved the default recommendation to /autoplan; run 42371706491 failed a - // correct /autoplan handoff against the old list. + test('accepts every next skill the handoff menu offers, and /autoplan', () => { + // Run 42371706491 failed a correct handoff against a stale list; the menu + // offers /plan-eng-review again since GST-2726, and /autoplan stays valid. const menu = fs.readFileSync(path.join(import.meta.dir, '..', 'office-hours', 'sections', 'design-and-handoff.md'), 'utf8'); const offered = [...menu.matchAll(/^[A-C]\) Run (\/[\w-]+) now/gm)].map(match => match[1]); - expect(offered).toEqual(['/autoplan', '/plan-ceo-review', '/plan-design-review']); - for (const skill of offered) { + expect(offered).toEqual(['/plan-eng-review', '/plan-ceo-review', '/plan-design-review']); + for (const skill of [...offered, '/autoplan']) { expect(() => validateOfficeHoursCompletion({ ...completed(), output: report.replace('Next: /autoplan', `Next: ${skill}`) })).not.toThrow(); } - const retired = report.replace('Next: /autoplan', 'Next: /plan-eng-review'); - expect(() => validateOfficeHoursCompletion({ ...completed(), output: retired })).toThrow('next-skill recommendation'); + const unknown = report.replace('Next: /autoplan', 'Next: /plan-qa-review'); + expect(() => validateOfficeHoursCompletion({ ...completed(), output: unknown })).toThrow('next-skill recommendation'); }); }); diff --git a/test/outside-voice-routing.test.ts b/test/outside-voice-routing.test.ts index 257d55067..2dddae92e 100644 --- a/test/outside-voice-routing.test.ts +++ b/test/outside-voice-routing.test.ts @@ -5,7 +5,6 @@ import { tmpdir } from 'node:os'; import { join, resolve } from 'node:path'; import { ALL_HOST_CONFIGS } from '../hosts'; import { ALL_MODEL_NAMES } from '../scripts/models'; -import { RETIRED_SKILLS } from '../scripts/discover-skills'; import { HOST_PATHS, type TemplateContext } from '../scripts/resolvers/types'; import { outsideVoiceFor, outsideVoiceCommand } from '../scripts/resolvers/outside-voice'; import { RESOLVERS } from '../scripts/resolvers'; @@ -82,7 +81,7 @@ describe('generated automatic review coverage', () => { for (const skill of skills) { test(`Codex /${skill} invokes Claude Code, including lazy sections`, () => { const host = ALL_HOST_CONFIGS.find(h => h.name === 'codex')!; - const text = RETIRED_SKILLS.includes(skill) ? readFileSync(join(skillDir(host, 'autoplan'), `${skill}.md`), 'utf8') : readUnion(skillDir(host, skill)); + const text = readUnion(skillDir(host, skill)); expect(text).toContain('gstack-claude-code'); // Prose about the CLI is permitted; executable codex review commands are not. expect(shellLines(text).filter(line => /\bcodex\s+(?:exec|review)\b/.test(line))).toEqual([]); diff --git a/test/plan-review-cases.test.ts b/test/plan-review-cases.test.ts index 14917fd58..6d0f66e13 100644 --- a/test/plan-review-cases.test.ts +++ b/test/plan-review-cases.test.ts @@ -265,12 +265,12 @@ describe('plan report persistence precedes completion logging', () => { || artifact.relativePath.endsWith(`/gstack-${skill}/sections/review-sections.md`)); const carved = new Set(generated.artifacts.filter(isSection).map(a => `${a.host}:${a.relativePath.replace(/\/sections\/review-sections\.md$/, '')}`)); const carriers = generated.artifacts.filter(artifact => isSection(artifact) - || (artifact.kind === 'skill' && plans.some(skill => artifact.relativePath.endsWith(`/gstack-${skill}/SKILL.md`) || artifact.relativePath.endsWith(`/gstack-autoplan/${skill}.md`)) + || (artifact.kind === 'skill' && plans.some(skill => artifact.relativePath.endsWith(`/gstack-${skill}/SKILL.md`)) && !carved.has(`${artifact.host}:${artifact.relativePath.replace(/\/SKILL\.md$/, '')}`))); expect(carriers).toHaveLength(plans.length * ALL_HOST_CONFIGS.length); for (const carrier of carriers) { const content = readFileSync(join(outputRoot, carrier.relativePath), 'utf8'); - if (carrier.relativePath.includes('plan-eng-review')) { + if (carrier.relativePath.includes('plan-eng-review/')) { const dispatch = compactProse(content.slice(content.indexOf('**Pending-record checkpoint.**'), content.indexOf('## Scope Challenge'))); ordered(dispatch, ['AskUserQuestion({ questions: [currentDecision] })', /stop until the actual answer arrives/i, '### Record the answer', 'For the next choice']); } @@ -280,7 +280,7 @@ describe('plan report persistence precedes completion logging', () => { const dashboard = content.indexOf('\n## Review Readiness Dashboard\n'); expect({ carrier: carrier.relativePath, ordered: 0 < report && report < readback && readback < log && log < dashboard }).toMatchObject({ ordered: true }); expect(content.slice(report, readback)).toContain('current Completion Summary'); - expect(content.slice(readback, log)).toMatch(carrier.relativePath.includes('plan-eng-review') + expect(content.slice(readback, log)).toMatch(carrier.relativePath.includes('plan-eng-review/') ? /follow \*\*Blocked outcome\*\* before Review Log or decision logging/i : /stop before Review Log or decision logging/i); } diff --git a/test/retired-skills.test.ts b/test/retired-skills.test.ts index f465b796d..790f44aa3 100644 --- a/test/retired-skills.test.ts +++ b/test/retired-skills.test.ts @@ -1,11 +1,11 @@ /** - * GST-1698: /plan-eng-review is cut. Its source stays as /autoplan's eng-phase - * methodology, and no host registers it. setup and gstack-relink treat it as a - * disabled skill that config cannot re-enable (GSTACK_RETIRED_SKILLS), so an - * existing gstack-owned entry is removed on the next setup or upgrade and a - * user's own same-name skill stays. External hosts carry the methodology beside - * gstack-autoplan/SKILL.md as plan-eng-review.md (Codex and Copilot register - * every nested SKILL.md). + * Retired skills: no host registers them, and setup and gstack-relink treat + * each as a disabled skill that config cannot re-enable (GSTACK_RETIRED_SKILLS), + * so an existing gstack-owned entry is removed on the next setup or upgrade and + * a user's own same-name skill stays. /investigate is retired (GST-1717). + * /plan-eng-review was retired in GST-1698 and came back in GST-2726: every host + * registers it again, and external hosts still carry its methodology beside + * gstack-autoplan/SKILL.md as plan-eng-review.md for /autoplan's eng phase. */ import { afterEach, beforeEach, describe, expect, test } from 'bun:test'; import { spawnSync } from 'child_process'; @@ -18,13 +18,13 @@ import { runGeneration } from '../scripts/gen-skill-docs'; const ROOT = path.resolve(import.meta.dir, '..'); const REGISTRY = path.join(ROOT, 'bin', 'gstack-install-registry.sh'); const BINS = ['gstack-config', 'gstack-relink', 'gstack-patch-names', 'gstack-skill-name.sh', 'gstack-state-root.sh', 'gstack-install-registry.sh']; -const PLAN_ENG = 'plan-eng-review'; // pregate-literal: GSTACK_RETIRED_SKILLS=plan-eng-review still retired; GST-1717 appended investigate to the list +const PLAN_ENG = 'plan-eng-review'; // pregate-literal: GST-2726 took plan-eng-review off GSTACK_RETIRED_SKILLS; investigate stays retired test('setup and gstack-relink retire the same skills as the generator', () => { const r = spawnSync('bash', ['-c', '. "$1" && printf %s "$GSTACK_RETIRED_SKILLS"', '_', REGISTRY], { encoding: 'utf8', timeout: 10_000 }); expect(r.status, r.stderr).toBe(0); expect(r.stdout.split(/\s+/).filter(Boolean)).toEqual(RETIRED_SKILLS); - expect(RETIRED_SKILLS.join(' ')).toBe('plan-eng-review investigate'); + expect(RETIRED_SKILLS.join(' ')).toBe('investigate'); }); describe('gstack-relink after an upgrade removed /investigate (GST-1717)', () => { @@ -104,7 +104,7 @@ describe('gstack-relink after an upgrade removed /investigate (GST-1717)', () => }); }); -describe('gstack-relink on an install that still has /plan-eng-review', () => { +describe('gstack-relink after /plan-eng-review returned (GST-2726)', () => { let tmp: string; let install: string; let skills: string; @@ -137,27 +137,17 @@ describe('gstack-relink on an install that still has /plan-eng-review', () => { }); afterEach(() => fs.rmSync(tmp, { recursive: true, force: true })); - test('an upgrade removes the old gstack-owned entry and keeps the methodology source', () => { - setRegistry(''); - const before = relink(); - expect(before.status, before.stderr).toBe(0); - expect(fs.existsSync(path.join(skills, PLAN_ENG, 'SKILL.md'))).toBe(true); - - setRegistry(PLAN_ENG); - const after = relink(); - expect(after.status, after.stderr).toBe(0); + test('an install whose upgrade removed the entry gets /plan-eng-review back on the next relink', () => { + setRegistry(`${PLAN_ENG} investigate`); + const cut = relink(); + expect(cut.status, cut.stderr).toBe(0); expect(fs.lstatSync(path.join(skills, PLAN_ENG), { throwIfNoEntry: false })).toBeUndefined(); - expect(fs.existsSync(path.join(skills, 'ship', 'SKILL.md'))).toBe(true); - expect(fs.existsSync(path.join(install, PLAN_ENG, 'SKILL.md'))).toBe(true); - expect(after.stdout).not.toContain('Disabled (gstack-config disabled_skills'); - }); - test('a gstack-plan-eng-review entry from a prefixed install goes too', () => { - fs.mkdirSync(path.join(skills, 'gstack-plan-eng-review'), { recursive: true }); - fs.symlinkSync(path.join(install, PLAN_ENG, 'SKILL.md'), path.join(skills, 'gstack-plan-eng-review', 'SKILL.md')); - const r = relink(); - expect(r.status, r.stderr).toBe(0); - expect(fs.lstatSync(path.join(skills, 'gstack-plan-eng-review'), { throwIfNoEntry: false })).toBeUndefined(); + fs.copyFileSync(REGISTRY, path.join(install, 'bin', 'gstack-install-registry.sh')); + const back = relink(); + expect(back.status, back.stderr).toBe(0); + expect(fs.readFileSync(path.join(skills, PLAN_ENG, 'SKILL.md'), 'utf8')).toContain(`# ${PLAN_ENG}`); + expect(fs.existsSync(path.join(skills, 'ship', 'SKILL.md'))).toBe(true); }); test("a user's own plan-eng-review skill is left alone", () => { @@ -179,29 +169,35 @@ describe('setup prunes external-host entries for a retired skill whose source st return SETUP_SRC.slice(start, end + 2); }; - test('the old gstack-plan-eng-review render and its host link are removed, live skills stay', () => { + const pruneScript = (src: string, gen: string, host: string, retired?: string) => [ + 'set -e', 'log() { echo "$@"; }', `. "${REGISTRY}"`, ...(retired ? [`GSTACK_RETIRED_SKILLS="${retired}"`] : []), + ...['_gstack_link_target_abs', '_gstack_target_is_ours', '_gstack_generated_header', '_backup_skill_md', '_cleanup_weak_dir', + '_owned_for_windows_refresh', '_skill_source_exists', '_prune_stale_generated'].map(extractFn), + `_prune_stale_generated "${src}" "${gen}" "${host}"`, + ].join('\n'); + const pruneFixture = (t: string, live: string[]) => { + const src = path.join(t, 'src'), gen = path.join(t, 'gen'), host = path.join(t, 'host'); + for (const s of live) { + fs.mkdirSync(path.join(src, s), { recursive: true }); + fs.writeFileSync(path.join(src, s, 'SKILL.md.tmpl'), `---\nname: ${s}\n---\nx\n`); + } + fs.mkdirSync(host); + for (const s of live) { + const g = `gstack-${s}`; + fs.mkdirSync(path.join(gen, g), { recursive: true }); + fs.writeFileSync(path.join(gen, g, 'SKILL.md'), `\n# ${g}\n`); + fs.symlinkSync(path.join(gen, g) + '/', path.join(host, g)); + } + return { src, gen, host }; + }; + + test('a retired skill whose source still exists loses its render and host link, live skills stay', () => { const t = fs.mkdtempSync(path.join(os.tmpdir(), 'retired-prune-')); try { - const src = path.join(t, 'src'), gen = path.join(t, 'gen'), host = path.join(t, 'host'); - for (const s of [PLAN_ENG, 'autoplan']) { - fs.mkdirSync(path.join(src, s), { recursive: true }); - fs.writeFileSync(path.join(src, s, 'SKILL.md.tmpl'), `---\nname: ${s}\n---\nx\n`); - } - for (const g of ['gstack-plan-eng-review', 'gstack-autoplan']) { - fs.mkdirSync(path.join(gen, g), { recursive: true }); - fs.writeFileSync(path.join(gen, g, 'SKILL.md'), `\n# ${g}\n`); - } - fs.mkdirSync(host); - for (const g of ['gstack-plan-eng-review', 'gstack-autoplan']) fs.symlinkSync(path.join(gen, g) + '/', path.join(host, g)); - const script = [ - 'set -e', 'log() { echo "$@"; }', `. "${REGISTRY}"`, - ...['_gstack_link_target_abs', '_gstack_target_is_ours', '_gstack_generated_header', '_backup_skill_md', '_cleanup_weak_dir', - '_owned_for_windows_refresh', '_skill_source_exists', '_prune_stale_generated'].map(extractFn), - `_prune_stale_generated "${src}" "${gen}" "${host}"`, - ].join('\n'); - const r = spawnSync('bash', ['-c', script], { encoding: 'utf-8', timeout: 30_000 }); + const { src, gen, host } = pruneFixture(t, ['old-review', 'autoplan']); + const r = spawnSync('bash', ['-c', pruneScript(src, gen, host, 'old-review investigate')], { encoding: 'utf-8', timeout: 30_000 }); expect(r.status, r.stderr).toBe(0); - expect(r.stdout).toContain('pruned retired skill: gstack-plan-eng-review'); + expect(r.stdout).toContain('pruned retired skill: gstack-old-review'); expect(fs.readdirSync(gen)).toEqual(['gstack-autoplan']); expect(fs.readdirSync(host)).toEqual(['gstack-autoplan']); } finally { @@ -209,6 +205,20 @@ describe('setup prunes external-host entries for a retired skill whose source st } }); + test('the gstack-plan-eng-review render and its host link stay now that the skill is back (GST-2726)', () => { + const t = fs.mkdtempSync(path.join(os.tmpdir(), 'retired-prune-back-')); + try { + const { src, gen, host } = pruneFixture(t, [PLAN_ENG, 'autoplan']); + const r = spawnSync('bash', ['-c', pruneScript(src, gen, host)], { encoding: 'utf-8', timeout: 30_000 }); + expect(r.status, r.stderr).toBe(0); + expect(r.stdout).not.toContain('pruned retired skill'); + expect(fs.readdirSync(gen).sort()).toEqual(['gstack-autoplan', 'gstack-plan-eng-review']); + expect(fs.readdirSync(host).sort()).toEqual(['gstack-autoplan', 'gstack-plan-eng-review']); + } finally { + fs.rmSync(t, { recursive: true, force: true }); + } + }); + test('a copied gstack-investigate whose source is gone: an edited SKILL.md is backed up, a pristine copy goes (GST-1717)', () => { const t = fs.mkdtempSync(path.join(os.tmpdir(), 'retired-prune-gone-')); try { @@ -271,24 +281,28 @@ describe('setup prunes external-host entries for a retired skill whose source st }); }); -test('no host renders a plan-eng-review skill; external hosts get the methodology beside gstack-autoplan', async () => { +test('every host renders /plan-eng-review; external hosts also keep the same methodology beside gstack-autoplan', async () => { const out = fs.mkdtempSync(path.join(os.tmpdir(), 'retired-gen-')); try { const result = await runGeneration({ host: 'all', outputRoot: out }); expect(result.diagnostics.filter(d => d.kind === 'error'), JSON.stringify(result.diagnostics.filter(d => d.kind === 'error'))).toEqual([]); const paths = result.artifacts.map(a => a.relativePath); - expect(paths.filter(p => /gstack-plan-eng-review\//.test(p))).toEqual([]); expect(paths).toContain('plan-eng-review/SKILL.md'); const external = result.artifacts.filter(a => a.host && a.host !== 'claude' && a.kind === 'skill'); const hosts = new Set(external.map(a => a.host)); + expect(hosts.size).toBeGreaterThan(5); for (const host of hosts) { - const copy = external.find(a => a.host === host && a.relativePath.endsWith('/skills/gstack-autoplan/plan-eng-review.md')); - expect(copy, host).toBeDefined(); - expect(fs.readFileSync(path.join(out, copy!.relativePath), 'utf8')).toMatch(/^---\nname: (gstack-)?plan-eng-review\n/); + const standalone = external.find(a => a.host === host && a.relativePath.endsWith('/skills/gstack-plan-eng-review/SKILL.md')); + const sibling = external.find(a => a.host === host && a.relativePath.endsWith('/skills/gstack-autoplan/plan-eng-review.md')); + expect(standalone, host).toBeDefined(); + expect(sibling, host).toBeDefined(); + const body = fs.readFileSync(path.join(out, standalone!.relativePath), 'utf8'); + expect(body).toMatch(/^---\nname: (gstack-)?plan-eng-review\n/); + expect(fs.readFileSync(path.join(out, sibling!.relativePath), 'utf8')).toBe(body); } const router = fs.readFileSync(path.join(out, 'SKILL.md'), 'utf8'); - expect(router).not.toContain('/plan-eng-review'); - expect(fs.readFileSync(path.join(out, 'gstack', 'llms.txt'), 'utf8')).not.toContain(PLAN_ENG); + expect(router).toContain('→ invoke `/plan-eng-review`'); + expect(fs.readFileSync(path.join(out, 'gstack', 'llms.txt'), 'utf8')).toContain('[/plan-eng-review](plan-eng-review/SKILL.md)'); expect(paths.filter(p => /(^|\/)(gstack-)?investigate\//.test(p))).toEqual([]); expect(router).not.toContain('/investigate'); expect(fs.readFileSync(path.join(out, 'gstack', 'llms.txt'), 'utf8')).not.toContain('/investigate'); diff --git a/test/shared-libs-rendering.test.ts b/test/shared-libs-rendering.test.ts index 0a246d7b6..07bde9b55 100644 --- a/test/shared-libs-rendering.test.ts +++ b/test/shared-libs-rendering.test.ts @@ -4,7 +4,7 @@ import { mkdtempSync, readFileSync, readdirSync, existsSync, rmSync } from 'node import { tmpdir } from 'node:os'; import { join, resolve } from 'node:path'; import { ALL_HOST_CONFIGS } from '../hosts'; -import { discoverTemplates, RETIRED_SKILLS } from '../scripts/discover-skills'; +import { discoverTemplates } from '../scripts/discover-skills'; import { sharedLibsPlanExcerpt } from './helpers/shared-libs-plan-excerpt'; import { readSkillEffective } from './helpers/skill-startup'; @@ -12,7 +12,6 @@ const ROOT = resolve(import.meta.dir, '..'); let output: string; function rendered(host: (typeof ALL_HOST_CONFIGS)[number], skill: string): string { - if (host.name !== 'claude' && RETIRED_SKILLS.includes(skill)) return readFileSync(join(output, host.hostSubdir, 'skills', 'gstack-autoplan', `${skill}.md`), 'utf8'); const dir = host.name === 'claude' ? join(output, skill) : join(output, host.hostSubdir, 'skills', `gstack-${skill}`); const sections = join(dir, 'sections'); diff --git a/test/size-ledger/ship/restore-plan-eng-review.json b/test/size-ledger/ship/restore-plan-eng-review.json new file mode 100644 index 000000000..bda8bebc6 --- /dev/null +++ b/test/size-ledger/ship/restore-plan-eng-review.json @@ -0,0 +1,4 @@ +{ + "bytes": 21, + "why": "GST-2726: /plan-eng-review is back; the preflight DIFF hint and the no-Eng-Review line name it again" +} diff --git a/test/skill-md-size-guard.test.ts b/test/skill-md-size-guard.test.ts index 09ce7a164..44d095442 100644 --- a/test/skill-md-size-guard.test.ts +++ b/test/skill-md-size-guard.test.ts @@ -15,7 +15,6 @@ import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; import { ALL_HOST_CONFIGS } from '../hosts/index'; -import { RETIRED_SKILLS } from '../scripts/discover-skills'; const ROOT = path.resolve(import.meta.dir, '..'); const ALLOWLIST_FILE = 'test/fixtures/skill-md-size-allowlist.json'; @@ -83,11 +82,6 @@ function renderAllHosts(outDir: string): Record { if (host.name === 'claude' && !fs.existsSync(`${file}.tmpl`)) continue; sizes[`${host.name}/${dir === '.' ? 'gstack' : dir}`] = countChars(fs.readFileSync(file, 'utf-8')); } - // A retired skill's methodology ships beside /autoplan; it keeps its pin. - for (const skill of RETIRED_SKILLS) { - const file = path.join(skillsRoot, 'gstack-autoplan', `${skill}.md`); - if (host.name !== 'claude' && fs.existsSync(file)) sizes[`${host.name}/gstack-${skill}`] = countChars(fs.readFileSync(file, 'utf-8')); - } } return sizes; } diff --git a/test/skill-routing-e2e.test.ts b/test/skill-routing-e2e.test.ts index c5d23df0a..1919375ea 100644 --- a/test/skill-routing-e2e.test.ts +++ b/test/skill-routing-e2e.test.ts @@ -73,7 +73,7 @@ if (evalsEnabled && process.env.EVALS_TIER) { function installSkills(tmpDir: string) { const skillDirs = [ '', // root gstack SKILL.md - 'qa', 'qa-only', 'ship', 'review', 'plan-ceo-review', 'autoplan', + 'qa', 'qa-only', 'ship', 'review', 'plan-ceo-review', 'plan-eng-review', 'autoplan', 'plan-design-review', 'design-review', 'design-consultation', 'retro', 'document-release', 'office-hours', 'browse', 'setup-browser-cookies', 'gstack-upgrade', 'humanizer', @@ -241,7 +241,7 @@ describeE2E('Skill Routing E2E — Developer Journey', () => { spawnSync('git', ['commit', '-m', 'initial'], { cwd: tmpDir, stdio: 'pipe', timeout: 5000 }); const testName = 'journey-plan-eng'; - const expectedSkill = 'autoplan'; + const expectedSkill = 'plan-eng-review'; const result = await runSkillTest({ prompt: "I wrote up a plan for the waitlist app in plan.md. Can you take a look at the architecture and make sure I'm not missing any edge cases or failure modes before I start coding?", workingDirectory: tmpDir,