@mindfoldhq/trellis 0.3.0-rc.5 → 0.3.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 (121) hide show
  1. package/README.md +16 -4
  2. package/dist/cli/index.js +4 -0
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/commands/init.d.ts +4 -0
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +29 -15
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/update.d.ts.map +1 -1
  9. package/dist/commands/update.js +19 -11
  10. package/dist/commands/update.js.map +1 -1
  11. package/dist/configurators/antigravity.d.ts +8 -0
  12. package/dist/configurators/antigravity.d.ts.map +1 -0
  13. package/dist/configurators/antigravity.js +18 -0
  14. package/dist/configurators/antigravity.js.map +1 -0
  15. package/dist/configurators/gemini.d.ts +8 -0
  16. package/dist/configurators/gemini.d.ts.map +1 -0
  17. package/dist/configurators/gemini.js +52 -0
  18. package/dist/configurators/gemini.js.map +1 -0
  19. package/dist/configurators/index.d.ts.map +1 -1
  20. package/dist/configurators/index.js +49 -1
  21. package/dist/configurators/index.js.map +1 -1
  22. package/dist/configurators/kilo.d.ts +8 -0
  23. package/dist/configurators/kilo.d.ts.map +1 -0
  24. package/dist/configurators/kilo.js +51 -0
  25. package/dist/configurators/kilo.js.map +1 -0
  26. package/dist/configurators/kiro.d.ts +8 -0
  27. package/dist/configurators/kiro.d.ts.map +1 -0
  28. package/dist/configurators/kiro.js +20 -0
  29. package/dist/configurators/kiro.js.map +1 -0
  30. package/dist/migrations/manifests/0.3.0-rc.6.json +9 -0
  31. package/dist/migrations/manifests/0.3.0.json +11 -0
  32. package/dist/templates/antigravity/index.d.ts +12 -0
  33. package/dist/templates/antigravity/index.d.ts.map +1 -0
  34. package/dist/templates/antigravity/index.js +29 -0
  35. package/dist/templates/antigravity/index.js.map +1 -0
  36. package/dist/templates/claude/agents/implement.md +1 -1
  37. package/dist/templates/claude/commands/trellis/brainstorm.md +16 -18
  38. package/dist/templates/claude/commands/trellis/start.md +73 -48
  39. package/dist/templates/codex/skills/brainstorm/SKILL.md +16 -18
  40. package/dist/templates/codex/skills/start/SKILL.md +80 -46
  41. package/dist/templates/cursor/commands/trellis-brainstorm.md +16 -18
  42. package/dist/templates/cursor/commands/trellis-start.md +191 -23
  43. package/dist/templates/extract.d.ts +52 -0
  44. package/dist/templates/extract.d.ts.map +1 -1
  45. package/dist/templates/extract.js +90 -0
  46. package/dist/templates/extract.js.map +1 -1
  47. package/dist/templates/gemini/commands/trellis/before-backend-dev.toml +17 -0
  48. package/dist/templates/gemini/commands/trellis/before-frontend-dev.toml +17 -0
  49. package/dist/templates/gemini/commands/trellis/brainstorm.toml +420 -0
  50. package/dist/templates/gemini/commands/trellis/break-loop.toml +129 -0
  51. package/dist/templates/gemini/commands/trellis/check-backend.toml +17 -0
  52. package/dist/templates/gemini/commands/trellis/check-cross-layer.toml +147 -0
  53. package/dist/templates/gemini/commands/trellis/check-frontend.toml +17 -0
  54. package/dist/templates/gemini/commands/trellis/create-command.toml +119 -0
  55. package/dist/templates/gemini/commands/trellis/finish-work.toml +133 -0
  56. package/dist/templates/gemini/commands/trellis/integrate-skill.toml +104 -0
  57. package/dist/templates/gemini/commands/trellis/onboard.toml +111 -0
  58. package/dist/templates/gemini/commands/trellis/record-session.toml +66 -0
  59. package/dist/templates/gemini/commands/trellis/start.toml +292 -0
  60. package/dist/templates/gemini/commands/trellis/update-spec.toml +132 -0
  61. package/dist/templates/gemini/index.d.ts +21 -0
  62. package/dist/templates/gemini/index.d.ts.map +1 -0
  63. package/dist/templates/gemini/index.js +44 -0
  64. package/dist/templates/gemini/index.js.map +1 -0
  65. package/dist/templates/iflow/agents/implement.md +1 -1
  66. package/dist/templates/iflow/commands/trellis/brainstorm.md +16 -18
  67. package/dist/templates/iflow/commands/trellis/finish-work.md +9 -0
  68. package/dist/templates/iflow/commands/trellis/start.md +108 -50
  69. package/dist/templates/iflow/index.d.ts +3 -2
  70. package/dist/templates/iflow/index.d.ts.map +1 -1
  71. package/dist/templates/iflow/index.js +7 -9
  72. package/dist/templates/iflow/index.js.map +1 -1
  73. package/dist/templates/kilo/commands/trellis/before-backend-dev.md +13 -0
  74. package/dist/templates/kilo/commands/trellis/before-frontend-dev.md +13 -0
  75. package/dist/templates/kilo/commands/trellis/brainstorm.md +474 -0
  76. package/dist/templates/kilo/commands/trellis/break-loop.md +125 -0
  77. package/dist/templates/kilo/commands/trellis/check-backend.md +13 -0
  78. package/dist/templates/kilo/commands/trellis/check-cross-layer.md +153 -0
  79. package/dist/templates/kilo/commands/trellis/check-frontend.md +13 -0
  80. package/dist/templates/kilo/commands/trellis/create-command.md +152 -0
  81. package/dist/templates/kilo/commands/trellis/finish-work.md +129 -0
  82. package/dist/templates/kilo/commands/trellis/integrate-skill.md +219 -0
  83. package/dist/templates/kilo/commands/trellis/onboard.md +358 -0
  84. package/dist/templates/kilo/commands/trellis/parallel.md +194 -0
  85. package/dist/templates/kilo/commands/trellis/record-session.md +62 -0
  86. package/dist/templates/kilo/commands/trellis/start.md +321 -0
  87. package/dist/templates/kilo/commands/trellis/update-spec.md +285 -0
  88. package/dist/templates/kilo/index.d.ts +16 -0
  89. package/dist/templates/kilo/index.d.ts.map +1 -0
  90. package/dist/templates/kilo/index.js +39 -0
  91. package/dist/templates/kilo/index.js.map +1 -0
  92. package/dist/templates/kiro/index.d.ts +18 -0
  93. package/dist/templates/kiro/index.d.ts.map +1 -0
  94. package/dist/templates/kiro/index.js +40 -0
  95. package/dist/templates/kiro/index.js.map +1 -0
  96. package/dist/templates/kiro/skills/before-backend-dev/SKILL.md +18 -0
  97. package/dist/templates/kiro/skills/before-frontend-dev/SKILL.md +18 -0
  98. package/dist/templates/kiro/skills/brainstorm/SKILL.md +479 -0
  99. package/dist/templates/kiro/skills/break-loop/SKILL.md +130 -0
  100. package/dist/templates/kiro/skills/check-backend/SKILL.md +18 -0
  101. package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +158 -0
  102. package/dist/templates/kiro/skills/check-frontend/SKILL.md +18 -0
  103. package/dist/templates/kiro/skills/create-command/SKILL.md +101 -0
  104. package/dist/templates/kiro/skills/finish-work/SKILL.md +148 -0
  105. package/dist/templates/kiro/skills/integrate-skill/SKILL.md +221 -0
  106. package/dist/templates/kiro/skills/onboard/SKILL.md +363 -0
  107. package/dist/templates/kiro/skills/record-session/SKILL.md +67 -0
  108. package/dist/templates/kiro/skills/start/SKILL.md +330 -0
  109. package/dist/templates/kiro/skills/update-spec/SKILL.md +335 -0
  110. package/dist/templates/opencode/agents/implement.md +1 -1
  111. package/dist/templates/opencode/agents/research.md +1 -2
  112. package/dist/templates/opencode/commands/trellis/brainstorm.md +16 -18
  113. package/dist/templates/opencode/commands/trellis/start.md +71 -48
  114. package/dist/templates/trellis/scripts/common/cli_adapter.py +100 -12
  115. package/dist/templates/trellis/scripts/common/registry.py +1 -1
  116. package/dist/templates/trellis/scripts/task.py +1 -8
  117. package/dist/types/ai-tools.d.ts +4 -4
  118. package/dist/types/ai-tools.d.ts.map +1 -1
  119. package/dist/types/ai-tools.js +32 -0
  120. package/dist/types/ai-tools.js.map +1 -1
  121. package/package.json +3 -2
@@ -95,6 +95,57 @@ export function getIflowTemplatePath() {
95
95
  export function getIflowSourcePath() {
96
96
  return getIflowTemplatePath();
97
97
  }
98
+ /**
99
+ * Get the path to the kilo templates directory.
100
+ *
101
+ * This reads from src/templates/kilo/ (development) or dist/templates/kilo/ (production).
102
+ * These are GENERIC templates, not the Trellis project's own .kilo/ configuration.
103
+ */
104
+ export function getKiloTemplatePath() {
105
+ const templatePath = path.join(__dirname, "kilo");
106
+ if (fs.existsSync(templatePath)) {
107
+ return templatePath;
108
+ }
109
+ throw new Error("Could not find kilo templates directory. Expected at templates/kilo/");
110
+ }
111
+ /**
112
+ * Get the path to the kiro templates directory.
113
+ *
114
+ * This reads from src/templates/kiro/ (development) or dist/templates/kiro/ (production).
115
+ * These are GENERIC templates, not the Trellis project's own .kiro/ configuration.
116
+ */
117
+ export function getKiroTemplatePath() {
118
+ const templatePath = path.join(__dirname, "kiro");
119
+ if (fs.existsSync(templatePath)) {
120
+ return templatePath;
121
+ }
122
+ throw new Error("Could not find kiro templates directory. Expected at templates/kiro/");
123
+ }
124
+ /**
125
+ * @deprecated Use getKiroTemplatePath() instead.
126
+ */
127
+ export function getKiroSourcePath() {
128
+ return getKiroTemplatePath();
129
+ }
130
+ /**
131
+ * Get the path to the antigravity templates directory.
132
+ *
133
+ * This reads from src/templates/antigravity/ (development) or dist/templates/antigravity/ (production).
134
+ * These are GENERIC templates, not the Trellis project's own .agent/workflows configuration.
135
+ */
136
+ export function getAntigravityTemplatePath() {
137
+ const templatePath = path.join(__dirname, "antigravity");
138
+ if (fs.existsSync(templatePath)) {
139
+ return templatePath;
140
+ }
141
+ throw new Error("Could not find antigravity templates directory. Expected at templates/antigravity/");
142
+ }
143
+ /**
144
+ * @deprecated Use getAntigravityTemplatePath() instead.
145
+ */
146
+ export function getAntigravitySourcePath() {
147
+ return getAntigravityTemplatePath();
148
+ }
98
149
  /**
99
150
  * Read a file from the .trellis directory
100
151
  * @param relativePath - Path relative to .trellis/ (e.g., 'scripts/task.py')
@@ -171,6 +222,45 @@ export function readOpenCodeFile(relativePath) {
171
222
  const filePath = path.join(opencodePath, relativePath);
172
223
  return fs.readFileSync(filePath, "utf-8");
173
224
  }
225
+ /**
226
+ * Read a file from the .kilo directory (dogfooding)
227
+ * @param relativePath - Path relative to .kilo/ (e.g., 'commands/start.md')
228
+ * @returns File content as string
229
+ */
230
+ export function readKiloFile(relativePath) {
231
+ const kiloPath = getKiloTemplatePath();
232
+ const filePath = path.join(kiloPath, relativePath);
233
+ return fs.readFileSync(filePath, "utf-8");
234
+ }
235
+ /**
236
+ * Get the path to the gemini templates directory.
237
+ *
238
+ * This reads from src/templates/gemini/ (development) or dist/templates/gemini/ (production).
239
+ * These are GENERIC templates, not the Trellis project's own .gemini/ configuration.
240
+ */
241
+ export function getGeminiTemplatePath() {
242
+ const templatePath = path.join(__dirname, "gemini");
243
+ if (fs.existsSync(templatePath)) {
244
+ return templatePath;
245
+ }
246
+ throw new Error("Could not find gemini templates directory. Expected at templates/gemini/");
247
+ }
248
+ /**
249
+ * @deprecated Use getGeminiTemplatePath() instead.
250
+ */
251
+ export function getGeminiSourcePath() {
252
+ return getGeminiTemplatePath();
253
+ }
254
+ /**
255
+ * Read a file from the .gemini directory (dogfooding)
256
+ * @param relativePath - Path relative to .gemini/ (e.g., 'commands/trellis/start.toml')
257
+ * @returns File content as string
258
+ */
259
+ export function readGeminiFile(relativePath) {
260
+ const geminiPath = getGeminiTemplatePath();
261
+ const filePath = path.join(geminiPath, relativePath);
262
+ return fs.readFileSync(filePath, "utf-8");
263
+ }
174
264
  /**
175
265
  * Copy a directory from .trellis/ to target, making scripts executable
176
266
  * Uses writeFile to handle file conflicts with the global writeMode setting
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/templates/extract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAI3C;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB;IACpC,mDAAmD;IACnD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACrD,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM,IAAI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,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1E,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,17 @@
1
+ description = "Read backend development guidelines before starting your task"
2
+
3
+ prompt = """
4
+ Read the backend development guidelines before starting your development task.
5
+
6
+ Execute these steps:
7
+ 1. Read `.trellis/spec/backend/index.md` to understand available guidelines
8
+ 2. Based on your task, read the relevant guideline files:
9
+ - Database work -> `.trellis/spec/backend/database-guidelines.md`
10
+ - Error handling -> `.trellis/spec/backend/error-handling.md`
11
+ - Logging -> `.trellis/spec/backend/logging-guidelines.md`
12
+ - Type questions -> `.trellis/spec/backend/type-safety.md`
13
+ 3. Understand the coding standards and patterns you need to follow
14
+ 4. Then proceed with your development plan
15
+
16
+ This step is **mandatory** before writing any backend code.
17
+ """
@@ -0,0 +1,17 @@
1
+ description = "Read frontend development guidelines before starting your task"
2
+
3
+ prompt = """
4
+ Read the frontend development guidelines before starting your development task.
5
+
6
+ Execute these steps:
7
+ 1. Read `.trellis/spec/frontend/index.md` to understand available guidelines
8
+ 2. Based on your task, read the relevant guideline files:
9
+ - Component work -> `.trellis/spec/frontend/component-guidelines.md`
10
+ - Hook work -> `.trellis/spec/frontend/hook-guidelines.md`
11
+ - State management -> `.trellis/spec/frontend/state-management.md`
12
+ - Type questions -> `.trellis/spec/frontend/type-safety.md`
13
+ 3. Understand the coding standards and patterns you need to follow
14
+ 4. Then proceed with your development plan
15
+
16
+ This step is **mandatory** before writing any frontend code.
17
+ """
@@ -0,0 +1,420 @@
1
+ description = "Guide AI through collaborative requirements discovery before implementation"
2
+
3
+ prompt = """
4
+ # Brainstorm - Requirements Discovery (AI Coding Enhanced)
5
+
6
+ Guide AI through collaborative requirements discovery **before implementation**, optimized for AI coding workflows:
7
+
8
+ * **Task-first** (capture ideas immediately)
9
+ * **Action-before-asking** (reduce low-value questions)
10
+ * **Research-first** for technical choices (avoid asking users to invent options)
11
+ * **Diverge -> Converge** (expand thinking, then lock MVP)
12
+
13
+ ---
14
+
15
+ ## When to Use
16
+
17
+ Triggered from `/trellis:start` when the user describes a development task, especially when:
18
+
19
+ * requirements are unclear or evolving
20
+ * there are multiple valid implementation paths
21
+ * trade-offs matter (UX, reliability, maintainability, cost, performance)
22
+ * the user might not know the best options up front
23
+
24
+ ---
25
+
26
+ ## Core Principles (Non-negotiable)
27
+
28
+ 1. **Task-first (capture early)**
29
+ Always ensure a task exists at the start so the user's ideas are recorded immediately.
30
+
31
+ 2. **Action before asking**
32
+ If you can derive the answer from repo code, docs, configs, conventions, or quick research -- do that first.
33
+
34
+ 3. **One question per message**
35
+ Never overwhelm the user with a list of questions. Ask one, update PRD, repeat.
36
+
37
+ 4. **Prefer concrete options**
38
+ For preference/decision questions, present 2-3 feasible, specific approaches with trade-offs.
39
+
40
+ 5. **Research-first for technical choices**
41
+ If the decision depends on industry conventions / similar tools / established patterns, do research first, then propose options.
42
+
43
+ 6. **Diverge -> Converge**
44
+ After initial understanding, proactively consider future evolution, related scenarios, and failure/edge cases -- then converge to an MVP with explicit out-of-scope.
45
+
46
+ 7. **No meta questions**
47
+ Do not ask "should I search?" or "can you paste the code so I can continue?"
48
+ If you need information: search/inspect. If blocked: ask the minimal blocking question.
49
+
50
+ ---
51
+
52
+ ## Step 0: Ensure Task Exists (ALWAYS)
53
+
54
+ Before any Q&A, ensure a task exists. If none exists, create one immediately.
55
+
56
+ * Use a **temporary working title** derived from the user's message.
57
+ * It's OK if the title is imperfect -- refine later in PRD.
58
+
59
+ ```bash
60
+ TASK_DIR=$(python3 ./.trellis/scripts/task.py create "brainstorm: <short goal>" --slug <auto>)
61
+ ```
62
+
63
+ Create/seed `prd.md` immediately with what you know:
64
+
65
+ ```markdown
66
+ # brainstorm: <short goal>
67
+
68
+ ## Goal
69
+
70
+ <one paragraph: what + why>
71
+
72
+ ## What I already know
73
+
74
+ * <facts from user message>
75
+ * <facts discovered from repo/docs>
76
+
77
+ ## Assumptions (temporary)
78
+
79
+ * <assumptions to validate>
80
+
81
+ ## Open Questions
82
+
83
+ * <ONLY Blocking / Preference questions; keep list short>
84
+
85
+ ## Requirements (evolving)
86
+
87
+ * <start with what is known>
88
+
89
+ ## Acceptance Criteria (evolving)
90
+
91
+ * [ ] <testable criterion>
92
+
93
+ ## Definition of Done (team quality bar)
94
+
95
+ * Tests added/updated (unit/integration where appropriate)
96
+ * Lint / typecheck / CI green
97
+ * Docs/notes updated if behavior changes
98
+ * Rollout/rollback considered if risky
99
+
100
+ ## Out of Scope (explicit)
101
+
102
+ * <what we will not do in this task>
103
+
104
+ ## Technical Notes
105
+
106
+ * <files inspected, constraints, links, references>
107
+ * <research notes summary if applicable>
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Step 1: Auto-Context (DO THIS BEFORE ASKING QUESTIONS)
113
+
114
+ Before asking questions like "what does the code look like?", gather context yourself:
115
+
116
+ ### Repo inspection checklist
117
+
118
+ * Identify likely modules/files impacted
119
+ * Locate existing patterns (similar features, conventions, error handling style)
120
+ * Check configs, scripts, existing command definitions
121
+ * Note any constraints (runtime, dependency policy, build tooling)
122
+
123
+ ### Documentation checklist
124
+
125
+ * Look for existing PRDs/specs/templates
126
+ * Look for command usage examples, README, ADRs if any
127
+
128
+ Write findings into PRD:
129
+
130
+ * Add to `What I already know`
131
+ * Add constraints/links to `Technical Notes`
132
+
133
+ ---
134
+
135
+ ## Step 2: Classify Complexity (still useful, not gating task creation)
136
+
137
+ | Complexity | Criteria | Action |
138
+ | ------------ | ------------------------------------------------------ | ------------------------------------------- |
139
+ | **Trivial** | Single-line fix, typo, obvious change | Skip brainstorm, implement directly |
140
+ | **Simple** | Clear goal, 1-2 files, scope well-defined | Ask 1 confirm question, then implement |
141
+ | **Moderate** | Multiple files, some ambiguity | Light brainstorm (2-3 high-value questions) |
142
+ | **Complex** | Vague goal, architectural choices, multiple approaches | Full brainstorm |
143
+
144
+ > Note: Task already exists from Step 0. Classification only affects depth of brainstorming.
145
+
146
+ ---
147
+
148
+ ## Step 3: Question Gate (Ask ONLY high-value questions)
149
+
150
+ Before asking ANY question, run the following gate:
151
+
152
+ ### Gate A -- Can I derive this without the user?
153
+
154
+ If answer is available via:
155
+
156
+ * repo inspection (code/config)
157
+ * docs/specs/conventions
158
+ * quick market/OSS research
159
+
160
+ -> **Do not ask.** Fetch it, summarize, update PRD.
161
+
162
+ ### Gate B -- Is this a meta/lazy question?
163
+
164
+ Examples:
165
+
166
+ * "Should I search?"
167
+ * "Can you paste the code so I can proceed?"
168
+ * "What does the code look like?" (when repo is available)
169
+
170
+ -> **Do not ask.** Take action.
171
+
172
+ ### Gate C -- What type of question is it?
173
+
174
+ * **Blocking**: cannot proceed without user input
175
+ * **Preference**: multiple valid choices, depends on product/UX/risk preference
176
+ * **Derivable**: should be answered by inspection/research
177
+
178
+ -> Only ask **Blocking** or **Preference**.
179
+
180
+ ---
181
+
182
+ ## Step 4: Research-first Mode (Mandatory for technical choices)
183
+
184
+ ### Trigger conditions (any -> research-first)
185
+
186
+ * The task involves selecting an approach, library, protocol, framework, template system, plugin mechanism, or CLI UX convention
187
+ * The user asks for "best practice", "how others do it", "recommendation"
188
+ * The user can't reasonably enumerate options
189
+
190
+ ### Research steps
191
+
192
+ 1. Identify 2-4 comparable tools/patterns
193
+ 2. Summarize common conventions and why they exist
194
+ 3. Map conventions onto our repo constraints
195
+ 4. Produce **2-3 feasible approaches** for our project
196
+
197
+ ### Research output format (PRD)
198
+
199
+ Add a section in PRD (either within Technical Notes or as its own):
200
+
201
+ ```markdown
202
+ ## Research Notes
203
+
204
+ ### What similar tools do
205
+
206
+ * ...
207
+ * ...
208
+
209
+ ### Constraints from our repo/project
210
+
211
+ * ...
212
+
213
+ ### Feasible approaches here
214
+
215
+ **Approach A: <name>** (Recommended)
216
+
217
+ * How it works:
218
+ * Pros:
219
+ * Cons:
220
+
221
+ **Approach B: <name>**
222
+
223
+ * How it works:
224
+ * Pros:
225
+ * Cons:
226
+
227
+ **Approach C: <name>** (optional)
228
+
229
+ * ...
230
+ ```
231
+
232
+ Then ask **one** preference question:
233
+
234
+ * "Which approach do you prefer: A / B / C (or other)?"
235
+
236
+ ---
237
+
238
+ ## Step 5: Expansion Sweep (DIVERGE) -- Required after initial understanding
239
+
240
+ After you can summarize the goal, proactively broaden thinking before converging.
241
+
242
+ ### Expansion categories (keep to 1-2 bullets each)
243
+
244
+ 1. **Future evolution**
245
+
246
+ * What might this feature become in 1-3 months?
247
+ * What extension points are worth preserving now?
248
+
249
+ 2. **Related scenarios**
250
+
251
+ * What adjacent commands/flows should remain consistent with this?
252
+ * Are there parity expectations (create vs update, import vs export, etc.)?
253
+
254
+ 3. **Failure & edge cases**
255
+
256
+ * Conflicts, offline/network failure, retries, idempotency, compatibility, rollback
257
+ * Input validation, security boundaries, permission checks
258
+
259
+ ### Expansion message template (to user)
260
+
261
+ ```markdown
262
+ I understand you want to implement: <current goal>.
263
+
264
+ Before diving into design, let me quickly diverge to consider three categories (to avoid rework later):
265
+
266
+ 1. Future evolution: <1-2 bullets>
267
+ 2. Related scenarios: <1-2 bullets>
268
+ 3. Failure/edge cases: <1-2 bullets>
269
+
270
+ For this MVP, which would you like to include (or none)?
271
+
272
+ 1. Current requirement only (minimal viable)
273
+ 2. Add <X> (reserve for future extension)
274
+ 3. Add <Y> (improve robustness/consistency)
275
+ 4. Other: describe your preference
276
+ ```
277
+
278
+ Then update PRD:
279
+
280
+ * What's in MVP -> `Requirements`
281
+ * What's excluded -> `Out of Scope`
282
+
283
+ ---
284
+
285
+ ## Step 6: Q&A Loop (CONVERGE)
286
+
287
+ ### Rules
288
+
289
+ * One question per message
290
+ * Prefer multiple-choice when possible
291
+ * After each user answer:
292
+
293
+ * Update PRD immediately
294
+ * Move answered items from `Open Questions` -> `Requirements`
295
+ * Update `Acceptance Criteria` with testable checkboxes
296
+ * Clarify `Out of Scope`
297
+
298
+ ### Question priority (recommended)
299
+
300
+ 1. **MVP scope boundary** (what is included/excluded)
301
+ 2. **Preference decisions** (after presenting concrete options)
302
+ 3. **Failure/edge behavior** (only for MVP-critical paths)
303
+ 4. **Success metrics & Acceptance Criteria** (what proves it works)
304
+
305
+ ### Preferred question format (multiple choice)
306
+
307
+ ```markdown
308
+ For <topic>, which approach do you prefer?
309
+
310
+ 1. **Option A** -- <what it means + trade-off>
311
+ 2. **Option B** -- <what it means + trade-off>
312
+ 3. **Option C** -- <what it means + trade-off>
313
+ 4. **Other** -- describe your preference
314
+ ```
315
+
316
+ ---
317
+
318
+ ## Step 7: Propose Approaches + Record Decisions (Complex tasks)
319
+
320
+ After requirements are clear enough, propose 2-3 approaches (if not already done via research-first):
321
+
322
+ ```markdown
323
+ Based on current information, here are 2-3 feasible approaches:
324
+
325
+ **Approach A: <name>** (Recommended)
326
+
327
+ * How:
328
+ * Pros:
329
+ * Cons:
330
+
331
+ **Approach B: <name>**
332
+
333
+ * How:
334
+ * Pros:
335
+ * Cons:
336
+
337
+ Which direction do you prefer?
338
+ ```
339
+
340
+ Record the outcome in PRD as an ADR-lite section:
341
+
342
+ ```markdown
343
+ ## Decision (ADR-lite)
344
+
345
+ **Context**: Why this decision was needed
346
+ **Decision**: Which approach was chosen
347
+ **Consequences**: Trade-offs, risks, potential future improvements
348
+ ```
349
+
350
+ ---
351
+
352
+ ## Step 8: Final Confirmation + Implementation Plan
353
+
354
+ When open questions are resolved, confirm complete requirements with a structured summary:
355
+
356
+ ### Final confirmation format
357
+
358
+ ```markdown
359
+ Here's my understanding of the complete requirements:
360
+
361
+ **Goal**: <one sentence>
362
+
363
+ **Requirements**:
364
+
365
+ * ...
366
+ * ...
367
+
368
+ **Acceptance Criteria**:
369
+
370
+ * [ ] ...
371
+ * [ ] ...
372
+
373
+ **Definition of Done**:
374
+
375
+ * ...
376
+
377
+ **Out of Scope**:
378
+
379
+ * ...
380
+
381
+ **Technical Approach**:
382
+ <brief summary + key decisions>
383
+
384
+ **Implementation Plan (small PRs)**:
385
+
386
+ * PR1: <scaffolding + tests + minimal plumbing>
387
+ * PR2: <core behavior>
388
+ * PR3: <edge cases + docs + cleanup>
389
+
390
+ Does this look correct? If yes, I'll proceed with implementation.
391
+ ```
392
+
393
+ ---
394
+
395
+ ## Anti-Patterns (Hard Avoid)
396
+
397
+ * Asking user for code/context that can be derived from repo
398
+ * Asking user to choose an approach before presenting concrete options
399
+ * Meta questions about whether to research
400
+ * Staying narrowly on the initial request without considering evolution/edges
401
+ * Letting brainstorming drift without updating PRD
402
+
403
+ ---
404
+
405
+ ## Integration with Start Workflow
406
+
407
+ After brainstorm completes (Step 8 confirmation approved), the flow continues to the Task Workflow's **Phase 2: Prepare for Implementation**.
408
+
409
+ The task directory and PRD already exist from brainstorm, so Phase 1 of the Task Workflow is skipped entirely.
410
+
411
+ ---
412
+
413
+ ## Related Commands
414
+
415
+ | Command | When to Use |
416
+ |---------|-------------|
417
+ | `/trellis:start` | Entry point that triggers brainstorm |
418
+ | `/trellis:finish-work` | After implementation is complete |
419
+ | `/trellis:update-spec` | If new patterns emerge during work |
420
+ """