@hecer/yoke 1.11.0 → 1.12.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 (128) hide show
  1. package/.claude-plugin/plugin.json +13 -13
  2. package/.codex-plugin/plugin.json +7 -7
  3. package/CHANGELOG.md +416 -398
  4. package/README.md +931 -915
  5. package/TODOS.md +5 -5
  6. package/agents/docs.toml +6 -6
  7. package/agents/implementer.toml +6 -6
  8. package/agents/reviewer.toml +6 -6
  9. package/agents/security.toml +6 -6
  10. package/bench/README.md +86 -86
  11. package/bench/RESULTS.md +35 -35
  12. package/bench/output-compaction.mjs +65 -65
  13. package/bench/result-schema.mjs +12 -12
  14. package/bench/results/claude-2026-07-27T18-03-26.json +50 -50
  15. package/bench/results/codex-unavailable-1785175418318.json +15 -15
  16. package/bench/results/gemini-2026-07-27T18-03-44.json +46 -46
  17. package/bench/run-matrix.mjs +26 -26
  18. package/bench/run.mjs +106 -106
  19. package/canon/AGENTS.md +30 -30
  20. package/canon/context/DECISIONS.md +4 -4
  21. package/canon/context/GLOSSARY.md +11 -11
  22. package/canon/context/KNOWLEDGE.md +4 -4
  23. package/canon/context/PROJECT.md +15 -15
  24. package/canon/loop/loop-spec.md +65 -65
  25. package/canon/loop/prd.schema.md +41 -41
  26. package/canon/manifest.yaml +59 -59
  27. package/canon/policy/gates.md +7 -7
  28. package/canon/policy/roles.md +9 -9
  29. package/canon/skills/ATTRIBUTION.md +99 -99
  30. package/canon/skills/authoring-prd/SKILL.md +56 -56
  31. package/canon/skills/brainstorming/SKILL.md +164 -164
  32. package/canon/skills/codebase-design/DEEPENING.md +15 -15
  33. package/canon/skills/codebase-design/DESIGN-IT-TWICE.md +12 -12
  34. package/canon/skills/codebase-design/SKILL.md +39 -39
  35. package/canon/skills/dispatching-parallel-agents/SKILL.md +182 -182
  36. package/canon/skills/document-release/SKILL.md +302 -302
  37. package/canon/skills/domain-modeling/ADR-FORMAT.md +19 -19
  38. package/canon/skills/domain-modeling/CONTEXT-FORMAT.md +39 -39
  39. package/canon/skills/domain-modeling/SKILL.md +35 -35
  40. package/canon/skills/executing-plans/SKILL.md +70 -70
  41. package/canon/skills/finishing-a-development-branch/SKILL.md +200 -200
  42. package/canon/skills/health/SKILL.md +177 -177
  43. package/canon/skills/maintaining-context/SKILL.md +34 -34
  44. package/canon/skills/minimal-code/SKILL.md +21 -21
  45. package/canon/skills/no-ai-slop/SKILL.md +103 -103
  46. package/canon/skills/no-ai-slop/eval.md +43 -43
  47. package/canon/skills/plan-ceo-review/SKILL.md +541 -541
  48. package/canon/skills/plan-eng-review/SKILL.md +362 -362
  49. package/canon/skills/receiving-code-review/SKILL.md +213 -213
  50. package/canon/skills/requesting-code-review/SKILL.md +105 -105
  51. package/canon/skills/resolving-merge-conflicts/SKILL.md +18 -18
  52. package/canon/skills/retro/SKILL.md +397 -397
  53. package/canon/skills/review/SKILL.md +246 -246
  54. package/canon/skills/ship/SKILL.md +691 -691
  55. package/canon/skills/subagent-driven-development/SKILL.md +277 -277
  56. package/canon/skills/systematic-debugging/SKILL.md +296 -296
  57. package/canon/skills/tdd/SKILL.md +371 -371
  58. package/canon/skills/unslop-ui/SKILL.md +34 -34
  59. package/canon/skills/using-git-worktrees/SKILL.md +218 -218
  60. package/canon/skills/verification-before-completion/SKILL.md +139 -139
  61. package/canon/skills/visual-verification/SKILL.md +54 -54
  62. package/canon/skills/workflow/SKILL.md +22 -22
  63. package/canon/skills/writing-for-agents/SKILL-MECHANICS.md +27 -27
  64. package/canon/skills/writing-for-agents/SKILL.md +42 -42
  65. package/canon/skills/writing-plans/SKILL.md +152 -152
  66. package/canon/skills/writing-skills/SKILL.md +655 -655
  67. package/canon/skills/yoke-retrofit/SKILL.md +26 -26
  68. package/canon/skills/yoke-workflow/SKILL.md +20 -20
  69. package/canon/tools/codex-rtk-hook.mjs +35 -35
  70. package/canon/tools/gemini-rtk-hook.mjs +25 -25
  71. package/canon/tools/graphify.md +3 -3
  72. package/canon/tools/playwright-mcp.md +3 -3
  73. package/canon/tools/qwen-rtk-hook.mjs +25 -0
  74. package/canon/tools/rtk.md +7 -7
  75. package/canon/tools/serena.md +6 -6
  76. package/dist/agents/host.js +1 -1
  77. package/dist/agents/providers.js +18 -5
  78. package/dist/agents/telemetry.js +35 -36
  79. package/dist/cli.js +18 -10
  80. package/dist/dashboard/page.js +122 -122
  81. package/dist/dashboard/panels.js +91 -91
  82. package/dist/loop/run-command.js +3 -3
  83. package/dist/prd/command.js +17 -17
  84. package/dist/retrofit/apply.js +8 -1
  85. package/dist/retrofit/config.js +1 -1
  86. package/dist/retrofit/detect.js +2 -0
  87. package/dist/retrofit/planners/claude.js +14 -14
  88. package/dist/retrofit/planners/qwen.js +3 -3
  89. package/dist/retrofit/preserve.js +2 -2
  90. package/dist/retrofit/qwen-settings.js +17 -0
  91. package/dist/retrofit/skill-actions.js +1 -1
  92. package/dist/setup/command.js +22 -8
  93. package/dist/setup/model-presets.js +48 -0
  94. package/docs/CAPABILITY-ROUTING.md +51 -51
  95. package/docs/DASHBOARD-EVOLUTION.md +33 -33
  96. package/docs/MIGRATING-TO-1.0.md +33 -33
  97. package/docs/MIGRATING-TO-1.1.md +27 -27
  98. package/docs/MIGRATING-TO-1.4.md +70 -70
  99. package/docs/PRODUCT-DIRECTION-2026-09-05.md +210 -210
  100. package/docs/PUBLISHING.md +114 -114
  101. package/docs/QWEN-MODEL-SUPPORT.md +142 -0
  102. package/docs/VERIFIED-PROJECTS-VALIDATION.md +29 -29
  103. package/docs/VERIFIED-PROJECTS.md +167 -167
  104. package/docs/superpowers/plans/2026-06-28-baustein-e-context-layer.md +981 -981
  105. package/docs/superpowers/plans/2026-06-29-baustein-f-routing.md +258 -258
  106. package/docs/superpowers/plans/2026-06-29-baustein-g-loop-observability.md +1006 -1006
  107. package/docs/superpowers/plans/2026-06-29-baustein-h-loop-robustness.md +374 -374
  108. package/docs/superpowers/plans/2026-06-30-baustein-i-visual-design-verification.md +450 -450
  109. package/docs/superpowers/plans/2026-07-02-baustein-k-zero-to-100-bootstrap.md +1024 -1024
  110. package/docs/superpowers/plans/2026-07-02-baustein-m-flow-smoke-proofs.md +574 -574
  111. package/docs/superpowers/plans/2026-08-13-gauntlet-quality-loop.md +537 -537
  112. package/docs/superpowers/plans/2026-08-16-artifact-backed-output-compaction.md +329 -329
  113. package/docs/superpowers/plans/2026-09-05-verified-projects.md +83 -83
  114. package/docs/superpowers/specs/2026-06-28-baustein-e-context-layer-design.md +146 -146
  115. package/docs/superpowers/specs/2026-06-29-baustein-f-routing-design.md +106 -106
  116. package/docs/superpowers/specs/2026-06-29-baustein-g-loop-observability-design.md +186 -186
  117. package/docs/superpowers/specs/2026-06-29-baustein-h-loop-robustness-design.md +113 -113
  118. package/docs/superpowers/specs/2026-06-30-baustein-i-visual-design-verification-design.md +98 -98
  119. package/docs/superpowers/specs/2026-07-02-baustein-k-zero-to-100-bootstrap-design.md +200 -200
  120. package/docs/superpowers/specs/2026-07-02-baustein-m-flow-smoke-proofs-design.md +155 -155
  121. package/docs/superpowers/specs/2026-08-13-gauntlet-quality-loop-design.md +422 -422
  122. package/docs/superpowers/specs/2026-08-16-artifact-backed-output-compaction-design.md +166 -166
  123. package/gemini-extension.json +6 -6
  124. package/hooks/hooks.json +19 -19
  125. package/package.json +87 -87
  126. package/dist/dashboard/discovery.js +0 -73
  127. package/docs/community-outreach-2026-08-20.md +0 -85
  128. package/docs/launch-copy-2026-08-21.md +0 -193
@@ -1,25 +1,25 @@
1
- ---
2
- name: authoring-prd
3
- description: Use when turning a product idea or change into a loop-ready continuous backlog with small stories and executable behavioral evidence.
4
- ---
5
-
6
- # Authoring a PRD
7
-
8
- The Yoke loop is only as good as its stories. Keep the backlog continuous: new requests become
9
- new stories; they do not require a release object.
10
-
11
- ## Story rules
12
-
13
- 1. One iteration per story. Prefer 5–12 small stories over a few epics.
14
- 2. Each story leaves the project buildable and testable.
15
- 3. Acceptance describes observable behavior, never implementation. Give each of 2–5 criteria
16
- a stable `id`, behavioral `text`, and `verify` list with one or more real commands proving
17
- that exact outcome.
18
- 4. Use dense priorities from 1; order by dependency, then risk.
19
- 5. Greenfield `STORY-1` creates the skeleton, runnable suite, and `verify.command`.
20
- 6. Express performance with numbers and executable benchmarks, not words such as “fast”.
21
- 7. Resolve planning questions before unattended execution. `yoke prd check` rejects unresolved
22
- placeholders; critical irreversible choices use the structured decision channel.
1
+ ---
2
+ name: authoring-prd
3
+ description: Use when turning a product idea or change into a loop-ready continuous backlog with small stories and executable behavioral evidence.
4
+ ---
5
+
6
+ # Authoring a PRD
7
+
8
+ The Yoke loop is only as good as its stories. Keep the backlog continuous: new requests become
9
+ new stories; they do not require a release object.
10
+
11
+ ## Story rules
12
+
13
+ 1. One iteration per story. Prefer 5–12 small stories over a few epics.
14
+ 2. Each story leaves the project buildable and testable.
15
+ 3. Acceptance describes observable behavior, never implementation. Give each of 2–5 criteria
16
+ a stable `id`, behavioral `text`, and `verify` list with one or more real commands proving
17
+ that exact outcome.
18
+ 4. Use dense priorities from 1; order by dependency, then risk.
19
+ 5. Greenfield `STORY-1` creates the skeleton, runnable suite, and `verify.command`.
20
+ 6. Express performance with numbers and executable benchmarks, not words such as “fast”.
21
+ 7. Resolve planning questions before unattended execution. `yoke prd check` rejects unresolved
22
+ placeholders; critical irreversible choices use the structured decision channel.
23
23
  8. Use `needs` only for hard prerequisites, `area` for collision domains, and `agent` only as
24
24
  a Claude/Codex/Gemini affinity hint.
25
25
  9. Keep planning on the start model. Add an `assessment` to each story: `taskClass`
@@ -29,37 +29,37 @@ new stories; they do not require a release object.
29
29
  reliably detect mistakes. Small security-sensitive changes can still be high-risk.
30
30
  These are planning judgments, never invented success probabilities; Yoke selects the
31
31
  execution model from configured profiles and independent outcomes.
32
-
33
- ## Format (`.yoke/prd.yaml`)
34
-
35
- ```yaml
36
- - id: STORY-1
37
- title: scaffold a TypeScript CLI with vitest
38
- priority: 1
39
- acceptance:
40
- - id: cli-help-runs
41
- text: the CLI help command exits 0 and prints usage
42
- verify: [npm run test:cli-help-runs]
43
- - id: test-runner-starts
44
- text: the project test runner starts and reports at least one passing test
45
- verify: [npm run test:test-runner-starts]
46
- passes: false
47
- - id: STORY-2
48
- title: add the sum command
49
- priority: 2
50
- needs: [STORY-1]
51
- area: cli
52
- agent: codex
53
- acceptance:
54
- - id: sum-valid
55
- text: cli sum 1 2 prints 3
56
- verify: [npm run test:sum-valid]
57
- - id: sum-invalid
58
- text: non-numeric input exits 1 with an error message
59
- verify: [npm run test:sum-invalid]
60
- passes: false
61
- ```
62
-
63
- Every story has 2–5 structured criteria. Each `verify` entry is one approved test command whose
64
- normalized text contains its criterion ID; never use shell operators or a broad unrelated suite.
65
- `passes` is owned by the loop and always starts false. Validate with `yoke prd check`.
32
+
33
+ ## Format (`.yoke/prd.yaml`)
34
+
35
+ ```yaml
36
+ - id: STORY-1
37
+ title: scaffold a TypeScript CLI with vitest
38
+ priority: 1
39
+ acceptance:
40
+ - id: cli-help-runs
41
+ text: the CLI help command exits 0 and prints usage
42
+ verify: [npm run test:cli-help-runs]
43
+ - id: test-runner-starts
44
+ text: the project test runner starts and reports at least one passing test
45
+ verify: [npm run test:test-runner-starts]
46
+ passes: false
47
+ - id: STORY-2
48
+ title: add the sum command
49
+ priority: 2
50
+ needs: [STORY-1]
51
+ area: cli
52
+ agent: codex
53
+ acceptance:
54
+ - id: sum-valid
55
+ text: cli sum 1 2 prints 3
56
+ verify: [npm run test:sum-valid]
57
+ - id: sum-invalid
58
+ text: non-numeric input exits 1 with an error message
59
+ verify: [npm run test:sum-invalid]
60
+ passes: false
61
+ ```
62
+
63
+ Every story has 2–5 structured criteria. Each `verify` entry is one approved test command whose
64
+ normalized text contains its criterion ID; never use shell operators or a broad unrelated suite.
65
+ `passes` is owned by the loop and always starts false. Validate with `yoke prd check`.
@@ -1,164 +1,164 @@
1
- ---
2
- name: brainstorming
3
- description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
- ---
5
-
6
- # Brainstorming Ideas Into Designs
7
-
8
- Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
-
10
- Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
11
-
12
- <HARD-GATE>
13
- Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
14
- </HARD-GATE>
15
-
16
- ## Anti-Pattern: "This Is Too Simple To Need A Design"
17
-
18
- Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
19
-
20
- ## Checklist
21
-
22
- You MUST create a task for each of these items and complete them in order:
23
-
24
- 1. **Explore project context** — check files, docs, recent commits
25
- 2. **Offer visual companion** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. See the Visual Companion section below.
26
- 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
27
- 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
28
- 5. **Present design** — in sections scaled to their complexity, get user approval after each section
29
- 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
30
- 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
31
- 8. **User reviews written spec** — ask user to review the spec file before proceeding
32
- 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
33
-
34
- ## Process Flow
35
-
36
- ```dot
37
- digraph brainstorming {
38
- "Explore project context" [shape=box];
39
- "Visual questions ahead?" [shape=diamond];
40
- "Offer Visual Companion\n(own message, no other content)" [shape=box];
41
- "Ask clarifying questions" [shape=box];
42
- "Propose 2-3 approaches" [shape=box];
43
- "Present design sections" [shape=box];
44
- "User approves design?" [shape=diamond];
45
- "Write design doc" [shape=box];
46
- "Spec self-review\n(fix inline)" [shape=box];
47
- "User reviews spec?" [shape=diamond];
48
- "Invoke writing-plans skill" [shape=doublecircle];
49
-
50
- "Explore project context" -> "Visual questions ahead?";
51
- "Visual questions ahead?" -> "Offer Visual Companion\n(own message, no other content)" [label="yes"];
52
- "Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
53
- "Offer Visual Companion\n(own message, no other content)" -> "Ask clarifying questions";
54
- "Ask clarifying questions" -> "Propose 2-3 approaches";
55
- "Propose 2-3 approaches" -> "Present design sections";
56
- "Present design sections" -> "User approves design?";
57
- "User approves design?" -> "Present design sections" [label="no, revise"];
58
- "User approves design?" -> "Write design doc" [label="yes"];
59
- "Write design doc" -> "Spec self-review\n(fix inline)";
60
- "Spec self-review\n(fix inline)" -> "User reviews spec?";
61
- "User reviews spec?" -> "Write design doc" [label="changes requested"];
62
- "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
63
- }
64
- ```
65
-
66
- **The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
67
-
68
- ## The Process
69
-
70
- **Understanding the idea:**
71
-
72
- - Check out the current project state first (files, docs, recent commits)
73
- - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
74
- - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
75
- - For appropriately-scoped projects, ask questions one at a time to refine the idea
76
- - Prefer multiple choice questions when possible, but open-ended is fine too
77
- - Only one question per message - if a topic needs more exploration, break it into multiple questions
78
- - Focus on understanding: purpose, constraints, success criteria
79
-
80
- **Exploring approaches:**
81
-
82
- - Propose 2-3 different approaches with trade-offs
83
- - Present options conversationally with your recommendation and reasoning
84
- - Lead with your recommended option and explain why
85
-
86
- **Presenting the design:**
87
-
88
- - Once you believe you understand what you're building, present the design
89
- - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
90
- - Ask after each section whether it looks right so far
91
- - Cover: architecture, components, data flow, error handling, testing
92
- - Be ready to go back and clarify if something doesn't make sense
93
-
94
- **Design for isolation and clarity:**
95
-
96
- - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
97
- - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
98
- - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
99
- - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
100
-
101
- **Working in existing codebases:**
102
-
103
- - Explore the current structure before proposing changes. Follow existing patterns.
104
- - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
105
- - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
106
-
107
- ## After the Design
108
-
109
- **Documentation:**
110
-
111
- - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
112
- - (User preferences for spec location override this default)
113
- - Use elements-of-style:writing-clearly-and-concisely skill if available
114
- - Commit the design document to git
115
-
116
- **Spec Self-Review:**
117
- After writing the spec document, look at it with fresh eyes:
118
-
119
- 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
120
- 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
121
- 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
122
- 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
123
-
124
- Fix any issues inline. No need to re-review — just fix and move on.
125
-
126
- **User Review Gate:**
127
- After the spec review loop passes, ask the user to review the written spec before proceeding:
128
-
129
- > "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
130
-
131
- Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
132
-
133
- **Implementation:**
134
-
135
- - Invoke the writing-plans skill to create a detailed implementation plan
136
- - Do NOT invoke any other skill. writing-plans is the next step.
137
-
138
- ## Key Principles
139
-
140
- - **One question at a time** - Don't overwhelm with multiple questions
141
- - **Multiple choice preferred** - Easier to answer than open-ended when possible
142
- - **YAGNI ruthlessly** - Remove unnecessary features from all designs
143
- - **Explore alternatives** - Always propose 2-3 approaches before settling
144
- - **Incremental validation** - Present design, get approval before moving on
145
- - **Be flexible** - Go back and clarify when something doesn't make sense
146
-
147
- ## Visual Companion
148
-
149
- A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
150
-
151
- **Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
152
- > "Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. This feature is still new and can be token-intensive. Want to try it? (Requires opening a local URL)"
153
-
154
- **This offer MUST be its own message.** Do not combine it with clarifying questions, context summaries, or any other content. The message should contain ONLY the offer above and nothing else. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.
155
-
156
- **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
157
-
158
- - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
159
- - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
160
-
161
- A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
162
-
163
- If they agree to the companion, read the detailed guide before proceeding:
164
- `skills/brainstorming/visual-companion.md`
1
+ ---
2
+ name: brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
+ ---
5
+
6
+ # Brainstorming Ideas Into Designs
7
+
8
+ Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
+
10
+ Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
11
+
12
+ <HARD-GATE>
13
+ Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
14
+ </HARD-GATE>
15
+
16
+ ## Anti-Pattern: "This Is Too Simple To Need A Design"
17
+
18
+ Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
19
+
20
+ ## Checklist
21
+
22
+ You MUST create a task for each of these items and complete them in order:
23
+
24
+ 1. **Explore project context** — check files, docs, recent commits
25
+ 2. **Offer visual companion** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. See the Visual Companion section below.
26
+ 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
27
+ 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
28
+ 5. **Present design** — in sections scaled to their complexity, get user approval after each section
29
+ 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
30
+ 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
31
+ 8. **User reviews written spec** — ask user to review the spec file before proceeding
32
+ 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
33
+
34
+ ## Process Flow
35
+
36
+ ```dot
37
+ digraph brainstorming {
38
+ "Explore project context" [shape=box];
39
+ "Visual questions ahead?" [shape=diamond];
40
+ "Offer Visual Companion\n(own message, no other content)" [shape=box];
41
+ "Ask clarifying questions" [shape=box];
42
+ "Propose 2-3 approaches" [shape=box];
43
+ "Present design sections" [shape=box];
44
+ "User approves design?" [shape=diamond];
45
+ "Write design doc" [shape=box];
46
+ "Spec self-review\n(fix inline)" [shape=box];
47
+ "User reviews spec?" [shape=diamond];
48
+ "Invoke writing-plans skill" [shape=doublecircle];
49
+
50
+ "Explore project context" -> "Visual questions ahead?";
51
+ "Visual questions ahead?" -> "Offer Visual Companion\n(own message, no other content)" [label="yes"];
52
+ "Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
53
+ "Offer Visual Companion\n(own message, no other content)" -> "Ask clarifying questions";
54
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
55
+ "Propose 2-3 approaches" -> "Present design sections";
56
+ "Present design sections" -> "User approves design?";
57
+ "User approves design?" -> "Present design sections" [label="no, revise"];
58
+ "User approves design?" -> "Write design doc" [label="yes"];
59
+ "Write design doc" -> "Spec self-review\n(fix inline)";
60
+ "Spec self-review\n(fix inline)" -> "User reviews spec?";
61
+ "User reviews spec?" -> "Write design doc" [label="changes requested"];
62
+ "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
63
+ }
64
+ ```
65
+
66
+ **The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
67
+
68
+ ## The Process
69
+
70
+ **Understanding the idea:**
71
+
72
+ - Check out the current project state first (files, docs, recent commits)
73
+ - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
74
+ - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
75
+ - For appropriately-scoped projects, ask questions one at a time to refine the idea
76
+ - Prefer multiple choice questions when possible, but open-ended is fine too
77
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
78
+ - Focus on understanding: purpose, constraints, success criteria
79
+
80
+ **Exploring approaches:**
81
+
82
+ - Propose 2-3 different approaches with trade-offs
83
+ - Present options conversationally with your recommendation and reasoning
84
+ - Lead with your recommended option and explain why
85
+
86
+ **Presenting the design:**
87
+
88
+ - Once you believe you understand what you're building, present the design
89
+ - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
90
+ - Ask after each section whether it looks right so far
91
+ - Cover: architecture, components, data flow, error handling, testing
92
+ - Be ready to go back and clarify if something doesn't make sense
93
+
94
+ **Design for isolation and clarity:**
95
+
96
+ - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
97
+ - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
98
+ - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
99
+ - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
100
+
101
+ **Working in existing codebases:**
102
+
103
+ - Explore the current structure before proposing changes. Follow existing patterns.
104
+ - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
105
+ - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
106
+
107
+ ## After the Design
108
+
109
+ **Documentation:**
110
+
111
+ - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
112
+ - (User preferences for spec location override this default)
113
+ - Use elements-of-style:writing-clearly-and-concisely skill if available
114
+ - Commit the design document to git
115
+
116
+ **Spec Self-Review:**
117
+ After writing the spec document, look at it with fresh eyes:
118
+
119
+ 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
120
+ 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
121
+ 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
122
+ 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
123
+
124
+ Fix any issues inline. No need to re-review — just fix and move on.
125
+
126
+ **User Review Gate:**
127
+ After the spec review loop passes, ask the user to review the written spec before proceeding:
128
+
129
+ > "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
130
+
131
+ Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
132
+
133
+ **Implementation:**
134
+
135
+ - Invoke the writing-plans skill to create a detailed implementation plan
136
+ - Do NOT invoke any other skill. writing-plans is the next step.
137
+
138
+ ## Key Principles
139
+
140
+ - **One question at a time** - Don't overwhelm with multiple questions
141
+ - **Multiple choice preferred** - Easier to answer than open-ended when possible
142
+ - **YAGNI ruthlessly** - Remove unnecessary features from all designs
143
+ - **Explore alternatives** - Always propose 2-3 approaches before settling
144
+ - **Incremental validation** - Present design, get approval before moving on
145
+ - **Be flexible** - Go back and clarify when something doesn't make sense
146
+
147
+ ## Visual Companion
148
+
149
+ A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
150
+
151
+ **Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
152
+ > "Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. This feature is still new and can be token-intensive. Want to try it? (Requires opening a local URL)"
153
+
154
+ **This offer MUST be its own message.** Do not combine it with clarifying questions, context summaries, or any other content. The message should contain ONLY the offer above and nothing else. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.
155
+
156
+ **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
157
+
158
+ - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
159
+ - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
160
+
161
+ A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
162
+
163
+ If they agree to the companion, read the detailed guide before proceeding:
164
+ `skills/brainstorming/visual-companion.md`
@@ -1,15 +1,15 @@
1
- # Deepening
2
-
3
- Classify dependencies before moving shallow behavior behind one interface.
4
-
5
- 1. **In-process:** pure computation or in-memory state. Merge and test through the new interface.
6
- 2. **Local-substitutable:** a real local stand-in exists, such as an in-memory filesystem. Test the
7
- module with that stand-in; the seam can remain internal.
8
- 3. **Remote but owned:** define a port at the seam. Use the production transport adapter and an
9
- in-memory test adapter.
10
- 4. **True external:** inject a narrow port for the third-party dependency and test with a controlled
11
- adapter.
12
-
13
- Replace shallow implementation tests with tests at the deepened interface once equivalent
14
- observable coverage exists. Avoid layering both suites indefinitely. If a test must change for an
15
- internal refactor, it is probably reaching past the interface.
1
+ # Deepening
2
+
3
+ Classify dependencies before moving shallow behavior behind one interface.
4
+
5
+ 1. **In-process:** pure computation or in-memory state. Merge and test through the new interface.
6
+ 2. **Local-substitutable:** a real local stand-in exists, such as an in-memory filesystem. Test the
7
+ module with that stand-in; the seam can remain internal.
8
+ 3. **Remote but owned:** define a port at the seam. Use the production transport adapter and an
9
+ in-memory test adapter.
10
+ 4. **True external:** inject a narrow port for the third-party dependency and test with a controlled
11
+ adapter.
12
+
13
+ Replace shallow implementation tests with tests at the deepened interface once equivalent
14
+ observable coverage exists. Avoid layering both suites indefinitely. If a test must change for an
15
+ internal refactor, it is probably reaching past the interface.
@@ -1,12 +1,12 @@
1
- # Design it twice
2
-
3
- Use this only for a consequential interface with more than one credible shape.
4
-
5
- 1. State constraints, dependency categories, required invariants, error modes, and the current
6
- seam. A small sketch may clarify the problem but must not preselect the answer.
7
- 2. Produce at least two materially different interfaces. When parallel agents are authorized and
8
- available, one can minimize surface area while another optimizes the common caller or adapter
9
- flexibility. Otherwise, explore the alternatives sequentially.
10
- 3. For each design, show caller usage, hidden implementation, adapters, and trade-offs.
11
- 4. Compare designs by depth, locality, seam placement, migration cost, and verification surface.
12
- 5. Recommend one design or a concrete hybrid. Do not leave the user with an unranked menu.
1
+ # Design it twice
2
+
3
+ Use this only for a consequential interface with more than one credible shape.
4
+
5
+ 1. State constraints, dependency categories, required invariants, error modes, and the current
6
+ seam. A small sketch may clarify the problem but must not preselect the answer.
7
+ 2. Produce at least two materially different interfaces. When parallel agents are authorized and
8
+ available, one can minimize surface area while another optimizes the common caller or adapter
9
+ flexibility. Otherwise, explore the alternatives sequentially.
10
+ 3. For each design, show caller usage, hidden implementation, adapters, and trade-offs.
11
+ 4. Compare designs by depth, locality, seam placement, migration cost, and verification surface.
12
+ 5. Recommend one design or a concrete hybrid. Do not leave the user with an unranked menu.
@@ -1,39 +1,39 @@
1
- ---
2
- name: codebase-design
3
- description: Design or improve deep modules, small interfaces, real seams, and public-interface tests. Use when shaping a module, placing a dependency seam, evaluating shallow pass-through layers, improving testability, or comparing architecture alternatives; do not force unrelated refactors.
4
- ---
5
-
6
- # Codebase design
7
-
8
- Design deep modules: substantial behavior behind a small interface, placed at a real seam and
9
- tested through that interface. Optimize for caller leverage and maintainer locality.
10
-
11
- ## Vocabulary
12
-
13
- - **Module:** anything with one interface and an implementation, from a function to a package.
14
- - **Interface:** everything a caller must know: types, invariants, ordering, errors, configuration,
15
- and relevant performance behavior.
16
- - **Implementation:** the behavior hidden inside a module.
17
- - **Depth:** useful behavior per unit of interface a caller must learn.
18
- - **Seam:** a place where behavior can change without editing the caller at that place.
19
- - **Adapter:** a concrete implementation that satisfies an interface at a seam.
20
- - **Leverage:** capability callers gain from a small interface.
21
- - **Locality:** change, knowledge, bugs, and verification concentrated in one place.
22
-
23
- Use these terms consistently. Prefer **seam** over the overloaded word **boundary** when discussing
24
- replaceable behavior.
25
-
26
- ## Design checks
27
-
28
- - Reduce methods and parameters when callers do not need the exposed choice.
29
- - Hide repeated orchestration, invariants, and error handling inside the module.
30
- - Apply the deletion test: deleting a useful module should make its complexity reappear across its
31
- callers. A layer whose complexity simply vanishes was probably a pass-through.
32
- - Treat the interface as the test surface. Tests should survive internal refactors.
33
- - Accept dependencies at real seams instead of constructing hard-to-replace externals internally.
34
- - Introduce a seam for demonstrated variation. Production plus a meaningful test adapter can make
35
- two real adapters; a single speculative adapter does not.
36
- - Return observable results where practical instead of requiring tests to inspect internal state.
37
-
38
- For dependency-specific deepening, read [DEEPENING.md](DEEPENING.md). For a consequential interface
39
- with several plausible shapes, read [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md).
1
+ ---
2
+ name: codebase-design
3
+ description: Design or improve deep modules, small interfaces, real seams, and public-interface tests. Use when shaping a module, placing a dependency seam, evaluating shallow pass-through layers, improving testability, or comparing architecture alternatives; do not force unrelated refactors.
4
+ ---
5
+
6
+ # Codebase design
7
+
8
+ Design deep modules: substantial behavior behind a small interface, placed at a real seam and
9
+ tested through that interface. Optimize for caller leverage and maintainer locality.
10
+
11
+ ## Vocabulary
12
+
13
+ - **Module:** anything with one interface and an implementation, from a function to a package.
14
+ - **Interface:** everything a caller must know: types, invariants, ordering, errors, configuration,
15
+ and relevant performance behavior.
16
+ - **Implementation:** the behavior hidden inside a module.
17
+ - **Depth:** useful behavior per unit of interface a caller must learn.
18
+ - **Seam:** a place where behavior can change without editing the caller at that place.
19
+ - **Adapter:** a concrete implementation that satisfies an interface at a seam.
20
+ - **Leverage:** capability callers gain from a small interface.
21
+ - **Locality:** change, knowledge, bugs, and verification concentrated in one place.
22
+
23
+ Use these terms consistently. Prefer **seam** over the overloaded word **boundary** when discussing
24
+ replaceable behavior.
25
+
26
+ ## Design checks
27
+
28
+ - Reduce methods and parameters when callers do not need the exposed choice.
29
+ - Hide repeated orchestration, invariants, and error handling inside the module.
30
+ - Apply the deletion test: deleting a useful module should make its complexity reappear across its
31
+ callers. A layer whose complexity simply vanishes was probably a pass-through.
32
+ - Treat the interface as the test surface. Tests should survive internal refactors.
33
+ - Accept dependencies at real seams instead of constructing hard-to-replace externals internally.
34
+ - Introduce a seam for demonstrated variation. Production plus a meaningful test adapter can make
35
+ two real adapters; a single speculative adapter does not.
36
+ - Return observable results where practical instead of requiring tests to inspect internal state.
37
+
38
+ For dependency-specific deepening, read [DEEPENING.md](DEEPENING.md). For a consequential interface
39
+ with several plausible shapes, read [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md).