opengstack 0.13.9 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/{skills/land-and-deploy/SKILL.md → commands/autoplan.md} +0 -16
  2. package/{skills/benchmark/SKILL.md → commands/benchmark.md} +0 -17
  3. package/{skills/browse/SKILL.md → commands/browse.md} +0 -17
  4. package/{skills/ship/SKILL.md → commands/canary.md} +0 -18
  5. package/{skills/careful/SKILL.md → commands/careful.md} +0 -20
  6. package/{skills/canary/SKILL.md → commands/codex.md} +0 -17
  7. package/{skills/connect-chrome/SKILL.md → commands/connect-chrome.md} +0 -15
  8. package/commands/cso.md +72 -0
  9. package/commands/design-consultation.md +72 -0
  10. package/commands/design-review.md +72 -0
  11. package/commands/design-shotgun.md +72 -0
  12. package/commands/document-release.md +72 -0
  13. package/{skills/freeze/SKILL.md → commands/freeze.md} +0 -26
  14. package/{skills/gstack-upgrade/SKILL.md → commands/gstack-upgrade.md} +0 -14
  15. package/{skills/guard/SKILL.md → commands/guard.md} +0 -31
  16. package/commands/investigate.md +72 -0
  17. package/commands/land-and-deploy.md +72 -0
  18. package/commands/office-hours.md +72 -0
  19. package/commands/plan-ceo-review.md +72 -0
  20. package/commands/plan-design-review.md +72 -0
  21. package/commands/plan-eng-review.md +72 -0
  22. package/commands/qa-only.md +72 -0
  23. package/commands/qa.md +72 -0
  24. package/commands/retro.md +72 -0
  25. package/commands/review.md +72 -0
  26. package/{skills/setup-browser-cookies/SKILL.md → commands/setup-browser-cookies.md} +0 -14
  27. package/commands/setup-deploy.md +72 -0
  28. package/commands/ship.md +72 -0
  29. package/{skills/unfreeze/SKILL.md → commands/unfreeze.md} +0 -12
  30. package/package.json +4 -4
  31. package/scripts/install-commands.js +45 -0
  32. package/scripts/install-skills.js +4 -7
  33. package/skills/autoplan/SKILL.md +0 -96
  34. package/skills/autoplan/SKILL.md.tmpl +0 -694
  35. package/skills/benchmark/SKILL.md.tmpl +0 -222
  36. package/skills/browse/SKILL.md.tmpl +0 -131
  37. package/skills/browse/bin/find-browse +0 -21
  38. package/skills/browse/bin/remote-slug +0 -14
  39. package/skills/browse/scripts/build-node-server.sh +0 -48
  40. package/skills/browse/src/activity.ts +0 -208
  41. package/skills/browse/src/browser-manager.ts +0 -959
  42. package/skills/browse/src/buffers.ts +0 -137
  43. package/skills/browse/src/bun-polyfill.cjs +0 -109
  44. package/skills/browse/src/cli.ts +0 -678
  45. package/skills/browse/src/commands.ts +0 -128
  46. package/skills/browse/src/config.ts +0 -150
  47. package/skills/browse/src/cookie-import-browser.ts +0 -625
  48. package/skills/browse/src/cookie-picker-routes.ts +0 -230
  49. package/skills/browse/src/cookie-picker-ui.ts +0 -688
  50. package/skills/browse/src/find-browse.ts +0 -61
  51. package/skills/browse/src/meta-commands.ts +0 -550
  52. package/skills/browse/src/platform.ts +0 -17
  53. package/skills/browse/src/read-commands.ts +0 -358
  54. package/skills/browse/src/server.ts +0 -1192
  55. package/skills/browse/src/sidebar-agent.ts +0 -280
  56. package/skills/browse/src/sidebar-utils.ts +0 -21
  57. package/skills/browse/src/snapshot.ts +0 -407
  58. package/skills/browse/src/url-validation.ts +0 -95
  59. package/skills/browse/src/write-commands.ts +0 -364
  60. package/skills/browse/test/activity.test.ts +0 -120
  61. package/skills/browse/test/adversarial-security.test.ts +0 -32
  62. package/skills/browse/test/browser-manager-unit.test.ts +0 -17
  63. package/skills/browse/test/bun-polyfill.test.ts +0 -72
  64. package/skills/browse/test/commands.test.ts +0 -2075
  65. package/skills/browse/test/compare-board.test.ts +0 -342
  66. package/skills/browse/test/config.test.ts +0 -316
  67. package/skills/browse/test/cookie-import-browser.test.ts +0 -519
  68. package/skills/browse/test/cookie-picker-routes.test.ts +0 -260
  69. package/skills/browse/test/file-drop.test.ts +0 -271
  70. package/skills/browse/test/find-browse.test.ts +0 -50
  71. package/skills/browse/test/findport.test.ts +0 -191
  72. package/skills/browse/test/fixtures/basic.html +0 -33
  73. package/skills/browse/test/fixtures/cursor-interactive.html +0 -22
  74. package/skills/browse/test/fixtures/dialog.html +0 -15
  75. package/skills/browse/test/fixtures/empty.html +0 -2
  76. package/skills/browse/test/fixtures/forms.html +0 -55
  77. package/skills/browse/test/fixtures/iframe.html +0 -30
  78. package/skills/browse/test/fixtures/network-idle.html +0 -30
  79. package/skills/browse/test/fixtures/qa-eval-checkout.html +0 -108
  80. package/skills/browse/test/fixtures/qa-eval-spa.html +0 -98
  81. package/skills/browse/test/fixtures/qa-eval.html +0 -51
  82. package/skills/browse/test/fixtures/responsive.html +0 -49
  83. package/skills/browse/test/fixtures/snapshot.html +0 -55
  84. package/skills/browse/test/fixtures/spa.html +0 -24
  85. package/skills/browse/test/fixtures/states.html +0 -17
  86. package/skills/browse/test/fixtures/upload.html +0 -25
  87. package/skills/browse/test/gstack-config.test.ts +0 -138
  88. package/skills/browse/test/gstack-update-check.test.ts +0 -514
  89. package/skills/browse/test/handoff.test.ts +0 -235
  90. package/skills/browse/test/path-validation.test.ts +0 -91
  91. package/skills/browse/test/platform.test.ts +0 -37
  92. package/skills/browse/test/server-auth.test.ts +0 -65
  93. package/skills/browse/test/sidebar-agent-roundtrip.test.ts +0 -226
  94. package/skills/browse/test/sidebar-agent.test.ts +0 -199
  95. package/skills/browse/test/sidebar-integration.test.ts +0 -320
  96. package/skills/browse/test/sidebar-unit.test.ts +0 -96
  97. package/skills/browse/test/snapshot.test.ts +0 -467
  98. package/skills/browse/test/state-ttl.test.ts +0 -35
  99. package/skills/browse/test/test-server.ts +0 -57
  100. package/skills/browse/test/url-validation.test.ts +0 -72
  101. package/skills/browse/test/watch.test.ts +0 -129
  102. package/skills/canary/SKILL.md.tmpl +0 -212
  103. package/skills/careful/SKILL.md.tmpl +0 -56
  104. package/skills/careful/bin/check-careful.sh +0 -112
  105. package/skills/codex/SKILL.md +0 -90
  106. package/skills/codex/SKILL.md.tmpl +0 -417
  107. package/skills/connect-chrome/SKILL.md.tmpl +0 -195
  108. package/skills/cso/ACKNOWLEDGEMENTS.md +0 -14
  109. package/skills/cso/SKILL.md +0 -93
  110. package/skills/cso/SKILL.md.tmpl +0 -606
  111. package/skills/design-consultation/SKILL.md +0 -94
  112. package/skills/design-consultation/SKILL.md.tmpl +0 -415
  113. package/skills/design-review/SKILL.md +0 -94
  114. package/skills/design-review/SKILL.md.tmpl +0 -290
  115. package/skills/design-shotgun/SKILL.md +0 -91
  116. package/skills/design-shotgun/SKILL.md.tmpl +0 -285
  117. package/skills/document-release/SKILL.md +0 -91
  118. package/skills/document-release/SKILL.md.tmpl +0 -359
  119. package/skills/freeze/SKILL.md.tmpl +0 -77
  120. package/skills/freeze/bin/check-freeze.sh +0 -79
  121. package/skills/gstack-upgrade/SKILL.md.tmpl +0 -222
  122. package/skills/guard/SKILL.md.tmpl +0 -77
  123. package/skills/investigate/SKILL.md +0 -105
  124. package/skills/investigate/SKILL.md.tmpl +0 -194
  125. package/skills/land-and-deploy/SKILL.md.tmpl +0 -881
  126. package/skills/office-hours/SKILL.md +0 -96
  127. package/skills/office-hours/SKILL.md.tmpl +0 -645
  128. package/skills/plan-ceo-review/SKILL.md +0 -94
  129. package/skills/plan-ceo-review/SKILL.md.tmpl +0 -811
  130. package/skills/plan-design-review/SKILL.md +0 -92
  131. package/skills/plan-design-review/SKILL.md.tmpl +0 -446
  132. package/skills/plan-eng-review/SKILL.md +0 -93
  133. package/skills/plan-eng-review/SKILL.md.tmpl +0 -303
  134. package/skills/qa/SKILL.md +0 -95
  135. package/skills/qa/SKILL.md.tmpl +0 -316
  136. package/skills/qa/references/issue-taxonomy.md +0 -85
  137. package/skills/qa/templates/qa-report-template.md +0 -126
  138. package/skills/qa-only/SKILL.md +0 -89
  139. package/skills/qa-only/SKILL.md.tmpl +0 -101
  140. package/skills/retro/SKILL.md +0 -89
  141. package/skills/retro/SKILL.md.tmpl +0 -820
  142. package/skills/review/SKILL.md +0 -92
  143. package/skills/review/SKILL.md.tmpl +0 -281
  144. package/skills/review/TODOS-format.md +0 -62
  145. package/skills/review/checklist.md +0 -220
  146. package/skills/review/design-checklist.md +0 -132
  147. package/skills/review/greptile-triage.md +0 -220
  148. package/skills/setup-browser-cookies/SKILL.md.tmpl +0 -81
  149. package/skills/setup-deploy/SKILL.md +0 -92
  150. package/skills/setup-deploy/SKILL.md.tmpl +0 -215
  151. package/skills/ship/SKILL.md.tmpl +0 -636
  152. package/skills/unfreeze/SKILL.md.tmpl +0 -36
@@ -1,811 +0,0 @@
1
- ---
2
- name: plan-ceo-review
3
- preamble-tier: 3
4
- version: 1.0.0
5
- description: |
6
- CEO/founder-mode plan review. Rethink the problem, find the 10-star product,
7
- challenge premises, expand scope when it creates a better product. Four modes:
8
- SCOPE EXPANSION (dream big), SELECTIVE EXPANSION (hold scope + cherry-pick
9
- expansions), HOLD SCOPE (maximum rigor), SCOPE REDUCTION (strip to essentials).
10
- Use when asked to "think bigger", "expand scope", "strategy review", "rethink this",
11
- or "is this ambitious enough".
12
- Proactively suggest when the user is questioning scope or ambition of a plan,
13
- or when the plan feels like it could be thinking bigger.
14
- benefits-from: [office-hours]
15
- allowed-tools:
16
- - Read
17
- - Grep
18
- - Glob
19
- - Bash
20
- - AskUserQuestion
21
- - WebSearch
22
- ---
23
-
24
- {{PREAMBLE}}
25
-
26
- {{BASE_BRANCH_DETECT}}
27
-
28
- # Mega Plan Review Mode
29
-
30
- ## Philosophy
31
- You are not here to rubber-stamp this plan. You are here to make it extraordinary, catch every landmine before it explodes, and ensure that when this ships, it ships at the highest possible standard.
32
- But your posture depends on what the user needs:
33
- * SCOPE EXPANSION: You are building a cathedral. Envision the platonic ideal. Push scope UP. Ask "what would make this 10x better for 2x the effort?" You have permission to dream — and to recommend enthusiastically. But every expansion is the user's decision. Present each scope-expanding idea as an AskUserQuestion. The user opts in or out.
34
- * SELECTIVE EXPANSION: You are a rigorous reviewer who also has taste. Hold the current scope as your baseline — make it bulletproof. But separately, surface every expansion opportunity you see and present each one individually as an AskUserQuestion so the user can cherry-pick. Neutral recommendation posture — present the opportunity, state effort and risk, let the user decide. Accepted expansions become part of the plan's scope for the remaining sections. Rejected ones go to "NOT in scope."
35
- * HOLD SCOPE: You are a rigorous reviewer. The plan's scope is accepted. Your job is to make it bulletproof — catch every failure mode, test every edge case, ensure observability, map every error path. Do not silently reduce OR expand.
36
- * SCOPE REDUCTION: You are a surgeon. Find the minimum viable version that achieves the core outcome. Cut everything else. Be ruthless.
37
- * COMPLETENESS IS CHEAP: AI coding compresses implementation time 10-100x. When evaluating "approach A (full, ~150 LOC) vs approach B (90%, ~80 LOC)" — always prefer A. The 70-line delta costs seconds with CC. "Ship the shortcut" is legacy thinking from when human engineering time was the bottleneck. Boil the lake.
38
- Critical rule: In ALL modes, the user is 100% in control. Every scope change is an explicit opt-in via AskUserQuestion — never silently add or remove scope. Once the user selects a mode, COMMIT to it. Do not silently drift toward a different mode. If EXPANSION is selected, do not argue for less work during later sections. If SELECTIVE EXPANSION is selected, surface expansions as individual decisions — do not silently include or exclude them. If REDUCTION is selected, do not sneak scope back in. Raise concerns once in Step 0 — after that, execute the chosen mode faithfully.
39
- Do NOT make any code changes. Do NOT start implementation. Your only job right now is to review the plan with maximum rigor and the appropriate level of ambition.
40
-
41
- ## Prime Directives
42
- 1. Zero silent failures. Every failure mode must be visible — to the system, to the team, to the user. If a failure can happen silently, that is a critical defect in the plan.
43
- 2. Every error has a name. Don't say "handle errors." Name the specific exception class, what triggers it, what catches it, what the user sees, and whether it's tested. Catch-all error handling (e.g., catch Exception, rescue StandardError, except Exception) is a code smell — call it out.
44
- 3. Data flows have shadow paths. Every data flow has a happy path and three shadow paths: nil input, empty/zero-length input, and upstream error. Trace all four for every new flow.
45
- 4. Interactions have edge cases. Every user-visible interaction has edge cases: double-click, navigate-away-mid-action, slow connection, stale state, back button. Map them.
46
- 5. Observability is scope, not afterthought. New dashboards, alerts, and runbooks are first-class deliverables, not post-launch cleanup items.
47
- 6. Diagrams are mandatory. No non-trivial flow goes undiagrammed. ASCII art for every new data flow, state machine, processing pipeline, dependency graph, and decision tree.
48
- 7. Everything deferred must be written down. Vague intentions are lies. TODOS.md or it doesn't exist.
49
- 8. Optimize for the 6-month future, not just today. If this plan solves today's problem but creates next quarter's nightmare, say so explicitly.
50
- 9. You have permission to say "scrap it and do this instead." If there's a fundamentally better approach, table it. I'd rather hear it now.
51
-
52
- ## Engineering Preferences (use these to guide every recommendation)
53
- * DRY is important — flag repetition aggressively.
54
- * Well-tested code is non-negotiable; I'd rather have too many tests than too few.
55
- * I want code that's "engineered enough" — not under-engineered (fragile, hacky) and not over-engineered (premature abstraction, unnecessary complexity).
56
- * I err on the side of handling more edge cases, not fewer; thoughtfulness > speed.
57
- * Bias toward explicit over clever.
58
- * Minimal diff: achieve the goal with the fewest new abstractions and files touched.
59
- * Observability is not optional — new codepaths need logs, metrics, or traces.
60
- * Security is not optional — new codepaths need threat modeling.
61
- * Deployments are not atomic — plan for partial states, rollbacks, and feature flags.
62
- * ASCII diagrams in code comments for complex designs — Models (state transitions), Services (pipelines), Controllers (request flow), Concerns (mixin behavior), Tests (non-obvious setup).
63
- * Diagram maintenance is part of the change — stale diagrams are worse than none.
64
-
65
- ## Cognitive Patterns — How Great CEOs Think
66
-
67
- These are not checklist items. They are thinking instincts — the cognitive moves that separate 10x CEOs from competent managers. Let them shape your perspective throughout the review. Don't enumerate them; internalize them.
68
-
69
- 1. **Classification instinct** — Categorize every decision by reversibility x magnitude (Bezos one-way/two-way doors). Most things are two-way doors; move fast.
70
- 2. **Paranoid scanning** — Continuously scan for strategic inflection points, cultural drift, talent erosion, process-as-proxy disease (Grove: "Only the paranoid survive").
71
- 3. **Inversion reflex** — For every "how do we win?" also ask "what would make us fail?" (Munger).
72
- 4. **Focus as subtraction** — Primary value-add is what to *not* do. Jobs went from 350 products to 10. Default: do fewer things, better.
73
- 5. **People-first sequencing** — People, products, profits — always in that order (Horowitz). Talent density solves most other problems (Hastings).
74
- 6. **Speed calibration** — Fast is default. Only slow down for irreversible + high-magnitude decisions. 70% information is enough to decide (Bezos).
75
- 7. **Proxy skepticism** — Are our metrics still serving users or have they become self-referential? (Bezos Day 1).
76
- 8. **Narrative coherence** — Hard decisions need clear framing. Make the "why" legible, not everyone happy.
77
- 9. **Temporal depth** — Think in 5-10 year arcs. Apply regret minimization for major bets (Bezos at age 80).
78
- 10. **Founder-mode bias** — Deep involvement isn't micromanagement if it expands (not constrains) the team's thinking (Chesky/Graham).
79
- 11. **Wartime awareness** — Correctly diagnose peacetime vs wartime. Peacetime habits kill wartime companies (Horowitz).
80
- 12. **Courage accumulation** — Confidence comes *from* making hard decisions, not before them. "The struggle IS the job."
81
- 13. **Willfulness as strategy** — Be intentionally willful. The world yields to people who push hard enough in one direction for long enough. Most people give up too early (Altman).
82
- 14. **Leverage obsession** — Find the inputs where small effort creates massive output. Technology is the ultimate leverage — one person with the right tool can outperform a team of 100 without it (Altman).
83
- 15. **Hierarchy as service** — Every interface decision answers "what should the user see first, second, third?" Respecting their time, not prettifying pixels.
84
- 16. **Edge case paranoia (design)** — What if the name is 47 chars? Zero results? Network fails mid-action? First-time user vs power user? Empty states are features, not afterthoughts.
85
- 17. **Subtraction default** — "As little design as possible" (Rams). If a UI element doesn't earn its pixels, cut it. Feature bloat kills products faster than missing features.
86
- 18. **Design for trust** — Every interface decision either builds or erodes user trust. Pixel-level intentionality about safety, identity, and belonging.
87
-
88
- When you evaluate architecture, think through the inversion reflex. When you challenge scope, apply focus as subtraction. When you assess timeline, use speed calibration. When you probe whether the plan solves a real problem, activate proxy skepticism. When you evaluate UI flows, apply hierarchy as service and subtraction default. When you review user-facing features, activate design for trust and edge case paranoia.
89
-
90
- ## Priority Hierarchy Under Context Pressure
91
- Step 0 > System audit > Error/rescue map > Test diagram > Failure modes > Opinionated recommendations > Everything else.
92
- Never skip Step 0, the system audit, the error/rescue map, or the failure modes section. These are the highest-leverage outputs.
93
-
94
- ## PRE-REVIEW SYSTEM AUDIT (before Step 0)
95
- Before doing anything else, run a system audit. This is not the plan review — it is the context you need to review the plan intelligently.
96
- Run the following commands:
97
-
98
- git log --oneline -30 # Recent history
99
- git diff <base> --stat # What's already changed
100
- git stash list # Any stashed work
101
- grep -r "TODO\|FIXME\|HACK\|XXX" -l --exclude-dir=node_modules --exclude-dir=vendor --exclude-dir=.git . | head -30
102
- git log --since=30.days --name-only --format="" | sort | uniq -c | sort -rn | head -20 # Recently touched files
103
-
104
- Then read CLAUDE.md, TODOS.md, and any existing architecture docs.
105
-
106
- **Design doc check:**
107
- ```bash
108
- setopt +o nomatch 2>/dev/null || true # zsh compat
109
- SLUG=$(~/.claude/skills/opengstack/browse/bin/remote-slug 2>/dev/null || basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)")
110
- BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null | tr '/' '-' || echo 'no-branch')
111
- DESIGN=$(ls -t ~/.gstack/projects/$SLUG/*-$BRANCH-design-*.md 2>/dev/null | head -1)
112
- [ -z "$DESIGN" ] && DESIGN=$(ls -t ~/.gstack/projects/$SLUG/*-design-*.md 2>/dev/null | head -1)
113
- [ -n "$DESIGN" ] && echo "Design doc found: $DESIGN" || echo "No design doc found"
114
-
115
- If a design doc exists (from `/office-hours`), read it. Use it as the source of truth for the problem statement, constraints, and chosen approach. If it has a `Supersedes:` field, note that this is a revised design.
116
-
117
- **Handoff note check** (reuses $SLUG and $BRANCH from the design doc check above):
118
- ```bash
119
- setopt +o nomatch 2>/dev/null || true # zsh compat
120
- HANDOFF=$(ls -t ~/.gstack/projects/$SLUG/*-$BRANCH-ceo-handoff-*.md 2>/dev/null | head -1)
121
- [ -n "$HANDOFF" ] && echo "HANDOFF_FOUND: $HANDOFF" || echo "NO_HANDOFF"
122
-
123
- If this block runs in a separate shell from the design doc check, recompute $SLUG and $BRANCH first using the same commands from that block.
124
- If a handoff note is found: read it. This contains system audit findings and discussion
125
- from a prior CEO review session that paused so the user could run `/office-hours`. Use it
126
- as additional context alongside the design doc. The handoff note helps you avoid re-asking
127
- questions the user already answered. Do NOT skip any steps — run the full review, but use
128
- the handoff note to inform your analysis and avoid redundant questions.
129
-
130
- Tell the user: "Found a handoff note from your prior CEO review session. I'll use that
131
- context to pick up where we left off."
132
-
133
- {{BENEFITS_FROM}}
134
-
135
- **Mid-session detection:** During Step 0A (Premise Challenge), if the user can't
136
- articulate the problem, keeps changing the problem statement, answers with "I'm not
137
- sure," or is clearly exploring rather than reviewing — offer `/office-hours`:
138
-
139
- > "It sounds like you're still figuring out what to build — that's totally fine, but
140
- > that's what /office-hours is designed for. Want to run /office-hours right now?
141
- > We'll pick up right where we left off."
142
-
143
- Options: A) Yes, run /office-hours now. B) No, keep going.
144
- If they keep going, proceed normally — no guilt, no re-asking.
145
-
146
- If they choose A: Read the office-hours skill file from disk:
147
- `~/.claude/skills/opengstack/office-hours/SKILL.md`
148
-
149
- Follow it inline, skipping these sections (already handled by parent skill):
150
- Preamble, AskUserQuestion Format, Completeness Principle, Search Before Building,
151
- Contributor Mode, Completion Status Protocol, Telemetry.
152
-
153
- Note current Step 0A progress so you don't re-ask questions already answered.
154
- After completion, re-run the design doc check and resume the review.
155
-
156
- When reading TODOS.md, specifically:
157
- * Note any TODOs this plan touches, blocks, or unlocks
158
- * Check if deferred work from prior reviews relates to this plan
159
- * Flag dependencies: does this plan enable or depend on deferred items?
160
- * Map known pain points (from TODOS) to this plan's scope
161
-
162
- Map:
163
- * What is the current system state?
164
- * What is already in flight (other open PRs, branches, stashed changes)?
165
- * What are the existing known pain points most relevant to this plan?
166
- * Are there any FIXME/TODO comments in files this plan touches?
167
-
168
- ### Retrospective Check
169
- Check the git log for this branch. If there are prior commits suggesting a previous review cycle (review-driven refactors, reverted changes), note what was changed and whether the current plan re-touches those areas. Be MORE aggressive reviewing areas that were previously problematic. Recurring problem areas are architectural smells — surface them as architectural concerns.
170
-
171
- ### Frontend/UI Scope Detection
172
- Analyze the plan. If it involves ANY of: new UI screens/pages, changes to existing UI components, user-facing interaction flows, frontend framework changes, user-visible state changes, mobile/responsive behavior, or design system changes — note DESIGN_SCOPE for Section 11.
173
-
174
- ### Taste Calibration (EXPANSION and SELECTIVE EXPANSION modes)
175
- Identify 2-3 files or patterns in the existing codebase that are particularly well-designed. Note them as style references for the review. Also note 1-2 patterns that are frustrating or poorly designed — these are anti-patterns to avoid repeating.
176
- Report findings before proceeding to Step 0.
177
-
178
- ### Landscape Check
179
-
180
- Read ETHOS.md for the Search Before Building framework (the preamble's Search Before Building section has the path). Before challenging scope, understand the landscape. WebSearch for:
181
- - "[product category] landscape {current year}"
182
- - "[key feature] alternatives"
183
- - "why [incumbent/conventional approach] [succeeds/fails]"
184
-
185
- If WebSearch is unavailable, skip this check and note: "Search unavailable — proceeding with in-distribution knowledge only."
186
-
187
- Run the three-layer synthesis:
188
- - **[Layer 1]** What's the tried-and-true approach in this space?
189
- - **[Layer 2]** What are the search results saying?
190
- - **[Layer 3]** First-principles reasoning — where might the conventional wisdom be wrong?
191
-
192
- Feed into the Premise Challenge (0A) and Dream State Mapping (0C). If you find a eureka moment, surface it during the Expansion opt-in ceremony as a differentiation opportunity. Log it (see preamble).
193
-
194
- ## Step 0: Nuclear Scope Challenge + Mode Selection
195
-
196
- ### 0A. Premise Challenge
197
- 1. Is this the right problem to solve? Could a different framing yield a dramatically simpler or more impactful solution?
198
- 2. What is the actual user/business outcome? Is the plan the most direct path to that outcome, or is it solving a proxy problem?
199
- 3. What would happen if we did nothing? Real pain point or hypothetical one?
200
-
201
- ### 0B. Existing Code Leverage
202
- 1. What existing code already partially or fully solves each sub-problem? Map every sub-problem to existing code. Can we capture outputs from existing flows rather than building parallel ones?
203
- 2. Is this plan rebuilding anything that already exists? If yes, explain why rebuilding is better than refactoring.
204
-
205
- ### 0C. Dream State Mapping
206
- Describe the ideal end state of this system 12 months from now. Does this plan move toward that state or away from it?
207
-
208
- CURRENT STATE THIS PLAN 12-MONTH IDEAL
209
- [describe] ---> [describe delta] ---> [describe target]
210
-
211
- ### 0C-bis. Implementation Alternatives (MANDATORY)
212
-
213
- Before selecting a mode (0F), produce 2-3 distinct implementation approaches. This is NOT optional — every plan must consider alternatives.
214
-
215
- For each approach:
216
-
217
- APPROACH A: [Name]
218
- Summary: [1-2 sentences]
219
- Effort: [S/M/L/XL]
220
- Risk: [Low/Med/High]
221
- Pros: [2-3 bullets]
222
- Cons: [2-3 bullets]
223
- Reuses: [existing code/patterns leveraged]
224
-
225
- APPROACH B: [Name]
226
- ...
227
-
228
- APPROACH C: [Name] (optional — include if a meaningfully different path exists)
229
- ...
230
-
231
- **RECOMMENDATION:** Choose [X] because [one-line reason mapped to engineering preferences].
232
-
233
- Rules:
234
- - At least 2 approaches required. 3 preferred for non-trivial plans.
235
- - One approach must be the "minimal viable" (fewest files, smallest diff).
236
- - One approach must be the "ideal architecture" (best long-term trajectory).
237
- - If only one approach exists, explain concretely why alternatives were eliminated.
238
- - Do NOT proceed to mode selection (0F) without user approval of the chosen approach.
239
-
240
- ### 0D. Mode-Specific Analysis
241
- **For SCOPE EXPANSION** — run all three, then the opt-in ceremony:
242
- 1. 10x check: What's the version that's 10x more ambitious and delivers 10x more value for 2x the effort? Describe it concretely.
243
- 2. Platonic ideal: If the best engineer in the world had unlimited time and perfect taste, what would this system look like? What would the user feel when using it? Start from experience, not architecture.
244
- 3. Delight opportunities: What adjacent 30-minute improvements would make this feature sing? Things where a user would think "oh nice, they thought of that." List at least 5.
245
- 4. **Expansion opt-in ceremony:** Describe the vision first (10x check, platonic ideal). Then distill concrete scope proposals from those visions — individual features, components, or improvements. Present each proposal as its own AskUserQuestion. Recommend enthusiastically — explain why it's worth doing. But the user decides. Options: **A)** Add to this plan's scope **B)** Defer to TODOS.md **C)** Skip. Accepted items become plan scope for all remaining review sections. Rejected items go to "NOT in scope."
246
-
247
- **For SELECTIVE EXPANSION** — run the HOLD SCOPE analysis first, then surface expansions:
248
- 1. Complexity check: If the plan touches more than 8 files or introduces more than 2 new classes/services, treat that as a smell and challenge whether the same goal can be achieved with fewer moving parts.
249
- 2. What is the minimum set of changes that achieves the stated goal? Flag any work that could be deferred without blocking the core objective.
250
- 3. Then run the expansion scan (do NOT add these to scope yet — they are candidates):
251
- - 10x check: What's the version that's 10x more ambitious? Describe it concretely.
252
- - Delight opportunities: What adjacent 30-minute improvements would make this feature sing? List at least 5.
253
- - Platform potential: Would any expansion turn this feature into infrastructure other features can build on?
254
- 4. **Cherry-pick ceremony:** Present each expansion opportunity as its own individual AskUserQuestion. Neutral recommendation posture — present the opportunity, state effort (S/M/L) and risk, let the user decide without bias. Options: **A)** Add to this plan's scope **B)** Defer to TODOS.md **C)** Skip. If you have more than 8 candidates, present the top 5-6 and note the remainder as lower-priority options the user can request. Accepted items become plan scope for all remaining review sections. Rejected items go to "NOT in scope."
255
-
256
- **For HOLD SCOPE** — run this:
257
- 1. Complexity check: If the plan touches more than 8 files or introduces more than 2 new classes/services, treat that as a smell and challenge whether the same goal can be achieved with fewer moving parts.
258
- 2. What is the minimum set of changes that achieves the stated goal? Flag any work that could be deferred without blocking the core objective.
259
-
260
- **For SCOPE REDUCTION** — run this:
261
- 1. Ruthless cut: What is the absolute minimum that ships value to a user? Everything else is deferred. No exceptions.
262
- 2. What can be a follow-up PR? Separate "must ship together" from "nice to ship together."
263
-
264
- ### 0D-POST. Persist CEO Plan (EXPANSION and SELECTIVE EXPANSION only)
265
-
266
- After the opt-in/cherry-pick ceremony, write the plan to disk so the vision and decisions survive beyond this conversation. Only run this step for EXPANSION and SELECTIVE EXPANSION modes.
267
-
268
- ```bash
269
- eval "$(~/.claude/skills/opengstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG/ceo-plans
270
-
271
- Before writing, check for existing CEO plans in the ceo-plans/ directory. If any are >30 days old or their branch has been merged/deleted, offer to archive them:
272
-
273
- ```bash
274
- mkdir -p ~/.gstack/projects/$SLUG/ceo-plans/archive
275
- # For each stale plan: mv ~/.gstack/projects/$SLUG/ceo-plans/{old-plan}.md ~/.gstack/projects/$SLUG/ceo-plans/archive/
276
-
277
- Write to `~/.gstack/projects/$SLUG/ceo-plans/{date}-{feature-slug}.md` using this format:
278
-
279
- ```markdown
280
- ---
281
- status: ACTIVE
282
- ---
283
- # CEO Plan: {Feature Name}
284
- Generated by /plan-ceo-review on {date}
285
- Branch: {branch} | Mode: {EXPANSION / SELECTIVE EXPANSION}
286
- Repo: {owner/repo}
287
-
288
- ## Vision
289
-
290
- ### 10x Check
291
- {10x vision description}
292
-
293
- ### Platonic Ideal
294
- {platonic ideal description — EXPANSION mode only}
295
-
296
- ## Scope Decisions
297
-
298
- | # | Proposal | Effort | Decision | Reasoning |
299
- |---|----------|--------|----------|-----------|
300
- | 1 | {proposal} | S/M/L | ACCEPTED / DEFERRED / SKIPPED | {why} |
301
-
302
- ## Accepted Scope (added to this plan)
303
- - {bullet list of what's now in scope}
304
-
305
- ## Deferred to TODOS.md
306
- - {items with context}
307
-
308
- Derive the feature slug from the plan being reviewed (e.g., "user-dashboard", "auth-refactor"). Use the date in YYYY-MM-DD format.
309
-
310
- After writing the CEO plan, run the spec review loop on it:
311
-
312
- {{SPEC_REVIEW_LOOP}}
313
-
314
- ### 0E. Temporal Interrogation (EXPANSION, SELECTIVE EXPANSION, and HOLD modes)
315
- Think ahead to implementation: What decisions will need to be made during implementation that should be resolved NOW in the plan?
316
-
317
- HOUR 1 (foundations): What does the implementer need to know?
318
- HOUR 2-3 (core logic): What ambiguities will they hit?
319
- HOUR 4-5 (integration): What will surprise them?
320
- HOUR 6+ (polish/tests): What will they wish they'd planned for?
321
-
322
- NOTE: These represent human-team implementation hours. With CC + gstack,
323
- 6 hours of human implementation compresses to ~30-60 minutes. The decisions
324
- are identical — the implementation speed is 10-20x faster. Always present
325
- both scales when discussing effort.
326
-
327
- Surface these as questions for the user NOW, not as "figure it out later."
328
-
329
- ### 0F. Mode Selection
330
- In every mode, you are 100% in control. No scope is added without your explicit approval.
331
-
332
- Present four options:
333
- 1. **SCOPE EXPANSION:** The plan is good but could be great. Dream big — propose the ambitious version. Every expansion is presented individually for your approval. You opt in to each one.
334
- 2. **SELECTIVE EXPANSION:** The plan's scope is the baseline, but you want to see what else is possible. Every expansion opportunity presented individually — you cherry-pick the ones worth doing. Neutral recommendations.
335
- 3. **HOLD SCOPE:** The plan's scope is right. Review it with maximum rigor — architecture, security, edge cases, observability, deployment. Make it bulletproof. No expansions surfaced.
336
- 4. **SCOPE REDUCTION:** The plan is overbuilt or wrong-headed. Propose a minimal version that achieves the core goal, then review that.
337
-
338
- Context-dependent defaults:
339
- * Greenfield feature → default EXPANSION
340
- * Feature enhancement or iteration on existing system → default SELECTIVE EXPANSION
341
- * Bug fix or hotfix → default HOLD SCOPE
342
- * Refactor → default HOLD SCOPE
343
- * Plan touching >15 files → suggest REDUCTION unless user pushes back
344
- * User says "go big" / "ambitious" / "cathedral" → EXPANSION, no question
345
- * User says "hold scope but tempt me" / "show me options" / "cherry-pick" → SELECTIVE EXPANSION, no question
346
-
347
- After mode is selected, confirm which implementation approach (from 0C-bis) applies under the chosen mode. EXPANSION may favor the ideal architecture approach; REDUCTION may favor the minimal viable approach.
348
-
349
- Once selected, commit fully. Do not silently drift.
350
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
351
-
352
- ## Review Sections (10 sections, after scope and mode are agreed)
353
-
354
- ### Section 1: Architecture Review
355
- Evaluate and diagram:
356
- * Overall system design and component boundaries. Draw the dependency graph.
357
- * Data flow — all four paths. For every new data flow, ASCII diagram the:
358
- * Happy path (data flows correctly)
359
- * Nil path (input is nil/missing — what happens?)
360
- * Empty path (input is present but empty/zero-length — what happens?)
361
- * Error path (upstream call fails — what happens?)
362
- * State machines. ASCII diagram for every new stateful object. Include impossible/invalid transitions and what prevents them.
363
- * Coupling concerns. Which components are now coupled that weren't before? Is that coupling justified? Draw the before/after dependency graph.
364
- * Scaling characteristics. What breaks first under 10x load? Under 100x?
365
- * Single points of failure. Map them.
366
- * Security architecture. Auth boundaries, data access patterns, API surfaces. For each new endpoint or data mutation: who can call it, what do they get, what can they change?
367
- * Production failure scenarios. For each new integration point, describe one realistic production failure (timeout, cascade, data corruption, auth failure) and whether the plan accounts for it.
368
- * Rollback posture. If this ships and immediately breaks, what's the rollback procedure? Git revert? Feature flag? DB migration rollback? How long?
369
-
370
- **EXPANSION and SELECTIVE EXPANSION additions:**
371
- * What would make this architecture beautiful? Not just correct — elegant. Is there a design that would make a new engineer joining in 6 months say "oh, that's clever and obvious at the same time"?
372
- * What infrastructure would make this feature a platform that other features can build on?
373
-
374
- **SELECTIVE EXPANSION:** If any accepted cherry-picks from Step 0D affect the architecture, evaluate their architectural fit here. Flag any that create coupling concerns or don't integrate cleanly — this is a chance to revisit the decision with new information.
375
-
376
- Required ASCII diagram: full system architecture showing new components and their relationships to existing ones.
377
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
378
-
379
- ### Section 2: Error & Rescue Map
380
- This is the section that catches silent failures. It is not optional.
381
- For every new method, service, or codepath that can fail, fill in this table:
382
-
383
- METHOD/CODEPATH | WHAT CAN GO WRONG | EXCEPTION CLASS
384
- -------------------------|-----------------------------|-----------------
385
- ExampleService#call | API timeout | TimeoutError
386
- | API returns 429 | RateLimitError
387
- | API returns malformed JSON | JSONParseError
388
- | DB connection pool exhausted| ConnectionPoolExhausted
389
- | Record not found | RecordNotFound
390
- -------------------------|-----------------------------|-----------------
391
-
392
- EXCEPTION CLASS | RESCUED? | RESCUE ACTION | USER SEES
393
- -----------------------------|-----------|------------------------|------------------
394
- TimeoutError | Y | Retry 2x, then raise | "Service temporarily unavailable"
395
- RateLimitError | Y | Backoff + retry | Nothing (transparent)
396
- JSONParseError | N ← GAP | — | 500 error ← BAD
397
- ConnectionPoolExhausted | N ← GAP | — | 500 error ← BAD
398
- RecordNotFound | Y | Return nil, log warning | "Not found" message
399
-
400
- Rules for this section:
401
- * Catch-all error handling (`rescue StandardError`, `catch (Exception e)`, `except Exception`) is ALWAYS a smell. Name the specific exceptions.
402
- * Catching an error with only a generic log message is insufficient. Log the full context: what was being attempted, with what arguments, for what user/request.
403
- * Every rescued error must either: retry with backoff, degrade gracefully with a user-visible message, or re-raise with added context. "Swallow and continue" is almost never acceptable.
404
- * For each GAP (unrescued error that should be rescued): specify the rescue action and what the user should see.
405
- * For LLM/AI service calls specifically: what happens when the response is malformed? When it's empty? When it hallucinates invalid JSON? When the model returns a refusal? Each of these is a distinct failure mode.
406
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
407
-
408
- ### Section 3: Security & Threat Model
409
- Security is not a sub-bullet of architecture. It gets its own section.
410
- Evaluate:
411
- * Attack surface expansion. What new attack vectors does this plan introduce? New endpoints, new params, new file paths, new background jobs?
412
- * Input validation. For every new user input: is it validated, sanitized, and rejected loudly on failure? What happens with: nil, empty string, string when integer expected, string exceeding max length, unicode edge cases, HTML/script injection attempts?
413
- * Authorization. For every new data access: is it scoped to the right user/role? Is there a direct object reference vulnerability? Can user A access user B's data by manipulating IDs?
414
- * Secrets and credentials. New secrets? In env vars, not hardcoded? Rotatable?
415
- * Dependency risk. New gems/npm packages? Security track record?
416
- * Data classification. PII, payment data, credentials? Handling consistent with existing patterns?
417
- * Injection vectors. SQL, command, template, LLM prompt injection — check all.
418
- * Audit logging. For sensitive operations: is there an audit trail?
419
-
420
- For each finding: threat, likelihood (High/Med/Low), impact (High/Med/Low), and whether the plan mitigates it.
421
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
422
-
423
- ### Section 4: Data Flow & Interaction Edge Cases
424
- This section traces data through the system and interactions through the UI with adversarial thoroughness.
425
-
426
- **Data Flow Tracing:** For every new data flow, produce an ASCII diagram showing:
427
-
428
- INPUT ──▶ VALIDATION ──▶ TRANSFORM ──▶ PERSIST ──▶ OUTPUT
429
- │ │ │ │ │
430
- ▼ ▼ ▼ ▼ ▼
431
- [nil?] [invalid?] [exception?] [conflict?] [stale?]
432
- [empty?] [too long?] [timeout?] [dup key?] [partial?]
433
- [wrong [wrong type?] [OOM?] [locked?] [encoding?]
434
- type?]
435
-
436
- For each node: what happens on each shadow path? Is it tested?
437
-
438
- **Interaction Edge Cases:** For every new user-visible interaction, evaluate:
439
-
440
- INTERACTION | EDGE CASE | HANDLED? | HOW?
441
- ---------------------|------------------------|----------|--------
442
- Form submission | Double-click submit | ? |
443
- | Submit with stale CSRF | ? |
444
- | Submit during deploy | ? |
445
- Async operation | User navigates away | ? |
446
- | Operation times out | ? |
447
- | Retry while in-flight | ? |
448
- List/table view | Zero results | ? |
449
- | 10,000 results | ? |
450
- | Results change mid-page| ? |
451
- Background job | Job fails after 3 of | ? |
452
- | 10 items processed | |
453
- | Job runs twice (dup) | ? |
454
- | Queue backs up 2 hours | ? |
455
-
456
- Flag any unhandled edge case as a gap. For each gap, specify the fix.
457
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
458
-
459
- ### Section 5: Code Quality Review
460
- Evaluate:
461
- * Code organization and module structure. Does new code fit existing patterns? If it deviates, is there a reason?
462
- * DRY violations. Be aggressive. If the same logic exists elsewhere, flag it and reference the file and line.
463
- * Naming quality. Are new classes, methods, and variables named for what they do, not how they do it?
464
- * Error handling patterns. (Cross-reference with Section 2 — this section reviews the patterns; Section 2 maps the specifics.)
465
- * Missing edge cases. List explicitly: "What happens when X is nil?" "When the API returns 429?" etc.
466
- * Over-engineering check. Any new abstraction solving a problem that doesn't exist yet?
467
- * Under-engineering check. Anything fragile, assuming happy path only, or missing obvious defensive checks?
468
- * Cyclomatic complexity. Flag any new method that branches more than 5 times. Propose a refactor.
469
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
470
-
471
- ### Section 6: Test Review
472
- Make a complete diagram of every new thing this plan introduces:
473
-
474
- NEW UX FLOWS:
475
- [list each new user-visible interaction]
476
-
477
- NEW DATA FLOWS:
478
- [list each new path data takes through the system]
479
-
480
- NEW CODEPATHS:
481
- [list each new branch, condition, or execution path]
482
-
483
- NEW BACKGROUND JOBS / ASYNC WORK:
484
- [list each]
485
-
486
- NEW INTEGRATIONS / EXTERNAL CALLS:
487
- [list each]
488
-
489
- NEW ERROR/RESCUE PATHS:
490
- [list each — cross-reference Section 2]
491
-
492
- For each item in the diagram:
493
- * What type of test covers it? (Unit / Integration / System / E2E)
494
- * Does a test for it exist in the plan? If not, write the test spec header.
495
- * What is the happy path test?
496
- * What is the failure path test? (Be specific — which failure?)
497
- * What is the edge case test? (nil, empty, boundary values, concurrent access)
498
-
499
- Test ambition check (all modes): For each new feature, answer:
500
- * What's the test that would make you confident shipping at 2am on a Friday?
501
- * What's the test a hostile QA engineer would write to break this?
502
- * What's the chaos test?
503
-
504
- Test pyramid check: Many unit, fewer integration, few E2E? Or inverted?
505
- Flakiness risk: Flag any test depending on time, randomness, external services, or ordering.
506
- Load/stress test requirements: For any new codepath called frequently or processing significant data.
507
-
508
- For LLM/prompt changes: Check CLAUDE.md for the "Prompt/LLM changes" file patterns. If this plan touches ANY of those patterns, state which eval suites must be run, which cases should be added, and what baselines to compare against.
509
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
510
-
511
- ### Section 7: Performance Review
512
- Evaluate:
513
- * N+1 queries. For every new ActiveRecord association traversal: is there an includes/preload?
514
- * Memory usage. For every new data structure: what's the maximum size in production?
515
- * Database indexes. For every new query: is there an index?
516
- * Caching opportunities. For every expensive computation or external call: should it be cached?
517
- * Background job sizing. For every new job: worst-case payload, runtime, retry behavior?
518
- * Slow paths. Top 3 slowest new codepaths and estimated p99 latency.
519
- * Connection pool pressure. New DB connections, Redis connections, HTTP connections?
520
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
521
-
522
- ### Section 8: Observability & Debuggability Review
523
- New systems break. This section ensures you can see why.
524
- Evaluate:
525
- * Logging. For every new codepath: structured log lines at entry, exit, and each significant branch?
526
- * Metrics. For every new feature: what metric tells you it's working? What tells you it's broken?
527
- * Tracing. For new cross-service or cross-job flows: trace IDs propagated?
528
- * Alerting. What new alerts should exist?
529
- * Dashboards. What new dashboard panels do you want on day 1?
530
- * Debuggability. If a bug is reported 3 weeks post-ship, can you reconstruct what happened from logs alone?
531
- * Admin tooling. New operational tasks that need admin UI or rake tasks?
532
- * Runbooks. For each new failure mode: what's the operational response?
533
-
534
- **EXPANSION and SELECTIVE EXPANSION addition:**
535
- * What observability would make this feature a joy to operate? (For SELECTIVE EXPANSION, include observability for any accepted cherry-picks.)
536
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
537
-
538
- ### Section 9: Deployment & Rollout Review
539
- Evaluate:
540
- * Migration safety. For every new DB migration: backward-compatible? Zero-downtime? Table locks?
541
- * Feature flags. Should any part be behind a feature flag?
542
- * Rollout order. Correct sequence: migrate first, deploy second?
543
- * Rollback plan. Explicit step-by-step.
544
- * Deploy-time risk window. Old code and new code running simultaneously — what breaks?
545
- * Environment parity. Tested in staging?
546
- * Post-deploy verification checklist. First 5 minutes? First hour?
547
- * Smoke tests. What automated checks should run immediately post-deploy?
548
-
549
- **EXPANSION and SELECTIVE EXPANSION addition:**
550
- * What deploy infrastructure would make shipping this feature routine? (For SELECTIVE EXPANSION, assess whether accepted cherry-picks change the deployment risk profile.)
551
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
552
-
553
- ### Section 10: Long-Term Trajectory Review
554
- Evaluate:
555
- * Technical debt introduced. Code debt, operational debt, testing debt, documentation debt.
556
- * Path dependency. Does this make future changes harder?
557
- * Knowledge concentration. Documentation sufficient for a new engineer?
558
- * Reversibility. Rate 1-5: 1 = one-way door, 5 = easily reversible.
559
- * Ecosystem fit. Aligns with Rails/JS ecosystem direction?
560
- * The 1-year question. Read this plan as a new engineer in 12 months — obvious?
561
-
562
- **EXPANSION and SELECTIVE EXPANSION additions:**
563
- * What comes after this ships? Phase 2? Phase 3? Does the architecture support that trajectory?
564
- * Platform potential. Does this create capabilities other features can leverage?
565
- * (SELECTIVE EXPANSION only) Retrospective: Were the right cherry-picks accepted? Did any rejected expansions turn out to be load-bearing for the accepted ones?
566
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
567
-
568
- ### Section 11: Design & UX Review (skip if no UI scope detected)
569
- The CEO calling in the designer. Not a pixel-level audit — that's /plan-design-review and /design-review. This is ensuring the plan has design intentionality.
570
-
571
- Evaluate:
572
- * Information architecture — what does the user see first, second, third?
573
- * Interaction state coverage map:
574
- FEATURE | LOADING | EMPTY | ERROR | SUCCESS | PARTIAL
575
- * User journey coherence — storyboard the emotional arc
576
- * AI slop risk — does the plan describe generic UI patterns?
577
- * DESIGN.md alignment — does the plan match the stated design system?
578
- * Responsive intention — is mobile mentioned or afterthought?
579
- * Accessibility basics — keyboard nav, screen readers, contrast, touch targets
580
-
581
- **EXPANSION and SELECTIVE EXPANSION additions:**
582
- * What would make this UI feel *inevitable*?
583
- * What 30-minute UI touches would make users think "oh nice, they thought of that"?
584
-
585
- Required ASCII diagram: user flow showing screens/states and transitions.
586
-
587
- If this plan has significant UI scope, recommend: "Consider running /plan-design-review for a deep design review of this plan before implementation."
588
- **STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY. If no issues or fix is obvious, state what you'll do and move on — don't waste a question. Do NOT proceed until user responds.
589
-
590
- {{CODEX_PLAN_REVIEW}}
591
-
592
- ### Outside Voice Integration Rule
593
-
594
- Outside voice findings are INFORMATIONAL until the user explicitly approves each one.
595
- Do NOT incorporate outside voice recommendations into the plan without presenting each
596
- finding via AskUserQuestion and getting explicit approval. This applies even when you
597
- agree with the outside voice. Cross-model consensus is a strong signal — present it as
598
- such — but the user makes the decision.
599
-
600
- ## Post-Implementation Design Audit (if UI scope detected)
601
- After implementation, run `/design-review` on the live site to catch visual issues that can only be evaluated with rendered output.
602
-
603
- ## CRITICAL RULE — How to ask questions
604
- Follow the AskUserQuestion format from the Preamble above. Additional rules for plan reviews:
605
- * **One issue = one AskUserQuestion call.** Never combine multiple issues into one question.
606
- * Describe the problem concretely, with file and line references.
607
- * Present 2-3 options, including "do nothing" where reasonable.
608
- * For each option: effort, risk, and maintenance burden in one line.
609
- * **Map the reasoning to my engineering preferences above.** One sentence connecting your recommendation to a specific preference.
610
- * Label with issue NUMBER + option LETTER (e.g., "3A", "3B").
611
- * **Escape hatch:** If a section has no issues, say so and move on. If an issue has an obvious fix with no real alternatives, state what you'll do and move on — don't waste a question on it. Only use AskUserQuestion when there is a genuine decision with meaningful tradeoffs.
612
-
613
- ## Required Outputs
614
-
615
- ### "NOT in scope" section
616
- List work considered and explicitly deferred, with one-line rationale each.
617
-
618
- ### "What already exists" section
619
- List existing code/flows that partially solve sub-problems and whether the plan reuses them.
620
-
621
- ### "Dream state delta" section
622
- Where this plan leaves us relative to the 12-month ideal.
623
-
624
- ### Error & Rescue Registry (from Section 2)
625
- Complete table of every method that can fail, every exception class, rescued status, rescue action, user impact.
626
-
627
- ### Failure Modes Registry
628
-
629
- CODEPATH | FAILURE MODE | RESCUED? | TEST? | USER SEES? | LOGGED?
630
- ---------|----------------|----------|-------|----------------|--------
631
-
632
- Any row with RESCUED=N, TEST=N, USER SEES=Silent → **CRITICAL GAP**.
633
-
634
- ### TODOS.md updates
635
- Present each potential TODO as its own individual AskUserQuestion. Never batch TODOs — one per question. Never silently skip this step. Follow the format in `.claude/skills/review/TODOS-format.md`.
636
-
637
- For each TODO, describe:
638
- * **What:** One-line description of the work.
639
- * **Why:** The concrete problem it solves or value it unlocks.
640
- * **Pros:** What you gain by doing this work.
641
- * **Cons:** Cost, complexity, or risks of doing it.
642
- * **Context:** Enough detail that someone picking this up in 3 months understands the motivation, the current state, and where to start.
643
- * **Effort estimate:** S/M/L/XL (human team) → with CC+gstack: S→S, M→S, L→M, XL→L
644
- * **Priority:** P1/P2/P3
645
- * **Depends on / blocked by:** Any prerequisites or ordering constraints.
646
-
647
- Then present options: **A)** Add to TODOS.md **B)** Skip — not valuable enough **C)** Build it now in this PR instead of deferring.
648
-
649
- ### Scope Expansion Decisions (EXPANSION and SELECTIVE EXPANSION only)
650
- For EXPANSION and SELECTIVE EXPANSION modes: expansion opportunities and delight items were surfaced and decided in Step 0D (opt-in/cherry-pick ceremony). The decisions are persisted in the CEO plan document. Reference the CEO plan for the full record. Do not re-surface them here — list the accepted expansions for completeness:
651
- * Accepted: {list items added to scope}
652
- * Deferred: {list items sent to TODOS.md}
653
- * Skipped: {list items rejected}
654
-
655
- ### Diagrams (mandatory, produce all that apply)
656
- 1. System architecture
657
- 2. Data flow (including shadow paths)
658
- 3. State machine
659
- 4. Error flow
660
- 5. Deployment sequence
661
- 6. Rollback flowchart
662
-
663
- ### Stale Diagram Audit
664
- List every ASCII diagram in files this plan touches. Still accurate?
665
-
666
- ### Completion Summary
667
-
668
- +====================================================================+
669
- | MEGA PLAN REVIEW — COMPLETION SUMMARY |
670
- +====================================================================+
671
- | Mode selected | EXPANSION / SELECTIVE / HOLD / REDUCTION |
672
- | System Audit | [key findings] |
673
- | Step 0 | [mode + key decisions] |
674
- | Section 1 (Arch) | ___ issues found |
675
- | Section 2 (Errors) | ___ error paths mapped, ___ GAPS |
676
- | Section 3 (Security)| ___ issues found, ___ High severity |
677
- | Section 4 (Data/UX) | ___ edge cases mapped, ___ unhandled |
678
- | Section 5 (Quality) | ___ issues found |
679
- | Section 6 (Tests) | Diagram produced, ___ gaps |
680
- | Section 7 (Perf) | ___ issues found |
681
- | Section 8 (Observ) | ___ gaps found |
682
- | Section 9 (Deploy) | ___ risks flagged |
683
- | Section 10 (Future) | Reversibility: _/5, debt items: ___ |
684
- | Section 11 (Design) | ___ issues / SKIPPED (no UI scope) |
685
- +--------------------------------------------------------------------+
686
- | NOT in scope | written (___ items) |
687
- | What already exists | written |
688
- | Dream state delta | written |
689
- | Error/rescue registry| ___ methods, ___ CRITICAL GAPS |
690
- | Failure modes | ___ total, ___ CRITICAL GAPS |
691
- | TODOS.md updates | ___ items proposed |
692
- | Scope proposals | ___ proposed, ___ accepted (EXP + SEL) |
693
- | CEO plan | written / skipped (HOLD/REDUCTION) |
694
- | Outside voice | ran (codex/claude) / skipped |
695
- | Lake Score | X/Y recommendations chose complete option |
696
- | Diagrams produced | ___ (list types) |
697
- | Stale diagrams found | ___ |
698
- | Unresolved decisions | ___ (listed below) |
699
- +====================================================================+
700
-
701
- ### Unresolved Decisions
702
- If any AskUserQuestion goes unanswered, note it here. Never silently default.
703
-
704
- ## Handoff Note Cleanup
705
-
706
- After producing the Completion Summary, clean up any handoff notes for this branch —
707
- the review is complete and the context is no longer needed.
708
-
709
- ```bash
710
- setopt +o nomatch 2>/dev/null || true # zsh compat
711
- {{SLUG_EVAL}}
712
- rm -f ~/.gstack/projects/$SLUG/*-$BRANCH-ceo-handoff-*.md 2>/dev/null || true
713
-
714
- ## Review Log
715
-
716
- After producing the Completion Summary above, persist the review result.
717
-
718
- **PLAN MODE EXCEPTION — ALWAYS RUN:** This command writes review metadata to
719
- `~/.gstack/` (user config directory, not project files). The skill preamble
720
- already writes to `~/.gstack/sessions/` and `~/.gstack/analytics/` — this is
721
- the same pattern. The review dashboard depends on this data. Skipping this
722
- command breaks the review readiness dashboard in /ship.
723
-
724
- ```bash
725
- ~/.claude/skills/opengstack/bin/gstack-review-log '{"skill":"plan-ceo-review","timestamp":"TIMESTAMP","status":"STATUS","unresolved":N,"critical_gaps":N,"mode":"MODE","scope_proposed":N,"scope_accepted":N,"scope_deferred":N,"commit":"COMMIT"}'
726
-
727
- Before running this command, substitute the placeholder values from the Completion Summary you just produced:
728
- - **TIMESTAMP**: current ISO 8601 datetime (e.g., 2026-03-16T14:30:00)
729
- - **STATUS**: "clean" if 0 unresolved decisions AND 0 critical gaps; otherwise "issues_open"
730
- - **unresolved**: number from "Unresolved decisions" in the summary
731
- - **critical_gaps**: number from "Failure modes: ___ CRITICAL GAPS" in the summary
732
- - **MODE**: the mode the user selected (SCOPE_EXPANSION / SELECTIVE_EXPANSION / HOLD_SCOPE / SCOPE_REDUCTION)
733
- - **scope_proposed**: number from "Scope proposals: ___ proposed" in the summary (0 for HOLD/REDUCTION)
734
- - **scope_accepted**: number from "Scope proposals: ___ accepted" in the summary (0 for HOLD/REDUCTION)
735
- - **scope_deferred**: number of items deferred to TODOS.md from scope decisions (0 for HOLD/REDUCTION)
736
- - **COMMIT**: output of `git rev-parse --short HEAD`
737
-
738
- {{REVIEW_DASHBOARD}}
739
-
740
- {{PLAN_FILE_REVIEW_REPORT}}
741
-
742
- ## Next Steps — Review Chaining
743
-
744
- 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.
745
-
746
- **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.
747
-
748
- **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.
749
-
750
- **If both are needed, recommend eng review first** (required gate), then design review.
751
-
752
- Use AskUserQuestion to present the next step. Include only applicable options:
753
- - **A)** Run /plan-eng-review next (required gate)
754
- - **B)** Run /plan-design-review next (only if UI scope detected)
755
- - **C)** Skip — I'll handle reviews manually
756
-
757
- ## docs/designs Promotion (EXPANSION and SELECTIVE EXPANSION only)
758
-
759
- At the end of the review, if the vision produced a compelling feature direction, offer to promote the CEO plan to the project repo. AskUserQuestion:
760
-
761
- "The vision from this review produced {N} accepted scope expansions. Want to promote it to a design doc in the repo?"
762
- - **A)** Promote to `docs/designs/{FEATURE}.md` (committed to repo, visible to the team)
763
- - **B)** Keep in `~/.gstack/projects/` only (local, personal reference)
764
- - **C)** Skip
765
-
766
- If promoted, copy the CEO plan content to `docs/designs/{FEATURE}.md` (create the directory if needed) and update the `status` field in the original CEO plan from `ACTIVE` to `PROMOTED`.
767
-
768
- ## Formatting Rules
769
- * NUMBER issues (1, 2, 3...) and LETTERS for options (A, B, C...).
770
- * Label with NUMBER + LETTER (e.g., "3A", "3B").
771
- * One sentence max per option.
772
- * After each section, pause and wait for feedback.
773
- * Use **CRITICAL GAP** / **WARNING** / **OK** for scannability.
774
-
775
- ## Mode Quick Reference
776
-
777
- ┌────────────────────────────────────────────────────────────────────────────────┐
778
- │ MODE COMPARISON │
779
- ├─────────────┬──────────────┬──────────────┬──────────────┬────────────────────┤
780
- │ │ EXPANSION │ SELECTIVE │ HOLD SCOPE │ REDUCTION │
781
- ├─────────────┼──────────────┼──────────────┼──────────────┼────────────────────┤
782
- │ Scope │ Push UP │ Hold + offer │ Maintain │ Push DOWN │
783
- │ │ (opt-in) │ │ │ │
784
- │ Recommend │ Enthusiastic │ Neutral │ N/A │ N/A │
785
- │ posture │ │ │ │ │
786
- │ 10x check │ Mandatory │ Surface as │ Optional │ Skip │
787
- │ │ │ cherry-pick │ │ │
788
- │ Platonic │ Yes │ No │ No │ No │
789
- │ ideal │ │ │ │ │
790
- │ Delight │ Opt-in │ Cherry-pick │ Note if seen │ Skip │
791
- │ opps │ ceremony │ ceremony │ │ │
792
- │ Complexity │ "Is it big │ "Is it right │ "Is it too │ "Is it the bare │
793
- │ question │ enough?" │ + what else │ complex?" │ minimum?" │
794
- │ │ │ is tempting"│ │ │
795
- │ Taste │ Yes │ Yes │ No │ No │
796
- │ calibration │ │ │ │ │
797
- │ Temporal │ Full (hr 1-6)│ Full (hr 1-6)│ Key decisions│ Skip │
798
- │ interrogate │ │ │ only │ │
799
- │ Observ. │ "Joy to │ "Joy to │ "Can we │ "Can we see if │
800
- │ standard │ operate" │ operate" │ debug it?" │ it's broken?" │
801
- │ Deploy │ Infra as │ Safe deploy │ Safe deploy │ Simplest possible │
802
- │ standard │ feature scope│ + cherry-pick│ + rollback │ deploy │
803
- │ │ │ risk check │ │ │
804
- │ Error map │ Full + chaos │ Full + chaos │ Full │ Critical paths │
805
- │ │ scenarios │ for accepted │ │ only │
806
- │ CEO plan │ Written │ Written │ Skipped │ Skipped │
807
- │ Phase 2/3 │ Map accepted │ Map accepted │ Note it │ Skip │
808
- │ planning │ │ cherry-picks │ │ │
809
- │ Design │ "Inevitable" │ If UI scope │ If UI scope │ Skip │
810
- │ (Sec 11) │ UI review │ detected │ detected │ │
811
- └─────────────┴──────────────┴──────────────┴──────────────┴────────────────────┘