@mindfoldhq/trellis 0.6.0-beta.8 → 0.6.0-beta.9

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 (33) hide show
  1. package/dist/cli/index.d.ts +1 -1
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +23 -2
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/update.d.ts.map +1 -1
  6. package/dist/commands/update.js +2 -2
  7. package/dist/commands/update.js.map +1 -1
  8. package/dist/commands/upgrade.d.ts +28 -0
  9. package/dist/commands/upgrade.d.ts.map +1 -0
  10. package/dist/commands/upgrade.js +84 -0
  11. package/dist/commands/upgrade.js.map +1 -0
  12. package/dist/migrations/manifests/0.5.13.json +9 -0
  13. package/dist/migrations/manifests/0.6.0-beta.9.json +9 -0
  14. package/dist/templates/claude/settings.json +4 -4
  15. package/dist/templates/codebuddy/settings.json +4 -4
  16. package/dist/templates/codex/hooks.json +1 -1
  17. package/dist/templates/codex/skills/brainstorm/SKILL.md +69 -519
  18. package/dist/templates/common/skills/brainstorm.md +68 -518
  19. package/dist/templates/copilot/hooks/session-start.py +12 -11
  20. package/dist/templates/copilot/hooks.json +2 -2
  21. package/dist/templates/copilot/prompts/brainstorm.prompt.md +69 -519
  22. package/dist/templates/cursor/hooks.json +2 -2
  23. package/dist/templates/droid/settings.json +4 -4
  24. package/dist/templates/gemini/settings.json +2 -2
  25. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +45 -10
  26. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +10 -4
  27. package/dist/templates/opencode/lib/trellis-context.js +73 -11
  28. package/dist/templates/opencode/plugins/inject-subagent-context.js +112 -26
  29. package/dist/templates/opencode/plugins/inject-workflow-state.js +8 -1
  30. package/dist/templates/opencode/plugins/session-start.js +9 -1
  31. package/dist/templates/qoder/settings.json +4 -4
  32. package/dist/templates/trellis/scripts/common/session_context.py +215 -138
  33. package/package.json +1 -1
@@ -1,561 +1,111 @@
1
1
  ---
2
- description: "Trellis Copilot prompt: Brainstorm - Requirements Discovery (AI Coding Enhanced)"
2
+ description: "Guide requirements discovery for a Trellis task after task-creation consent."
3
3
  ---
4
4
 
5
- # Brainstorm - Requirements Discovery (AI Coding Enhanced)
5
+ # Trellis Brainstorm
6
6
 
7
- **CoreRule**: Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
7
+ ## Non-Negotiable Interview Contract
8
8
 
9
- Ask the questions one at a time.
10
-
11
- If a question can be answered by exploring the codebase, explore the codebase instead.
12
-
13
- ---
14
-
15
- Guide AI through collaborative requirements discovery **before implementation**, optimized for AI coding workflows:
16
-
17
- * **Task-first** (capture ideas immediately)
18
- * **Action-before-asking** (reduce low-value questions)
19
- * **Research-first** for technical choices (avoid asking users to invent options)
20
- * **Diverge → Converge** (expand thinking, then lock MVP)
21
-
22
- ---
23
-
24
- ## When to Use
25
-
26
- Triggered from {{CMD_REF:start}} when the user describes a development task, especially when:
27
-
28
- * requirements are unclear or evolving
29
- * there are multiple valid implementation paths
30
- * trade-offs matter (UX, reliability, maintainability, cost, performance)
31
- * the user might not know the best options up front
32
-
33
- ---
34
-
35
- ## Core Principles (Non-negotiable)
36
-
37
- 1. **Task-first (capture early)**
38
- Always ensure a task exists at the start so the user's ideas are recorded immediately.
39
-
40
- 2. **Action before asking**
41
- If you can derive the answer from repo code, docs, configs, conventions, or quick research — do that first.
42
-
43
- 3. **One question per message**
44
- Never overwhelm the user with a list of questions. Ask one, update PRD, repeat.
45
-
46
- 4. **Prefer concrete options**
47
- For preference/decision questions, present 2–3 feasible, specific approaches with trade-offs.
48
-
49
- 5. **Research-first for technical choices**
50
- If the decision depends on industry conventions / similar tools / established patterns, do research first, then propose options.
51
-
52
- 6. **Diverge → Converge**
53
- After initial understanding, proactively consider future evolution, related scenarios, and failure/edge cases — then converge to an MVP with explicit out-of-scope.
54
-
55
- 7. **No meta questions**
56
- Do not ask "should I search?" or "can you paste the code so I can continue?"
57
- If you need information: search/inspect. If blocked: ask the minimal blocking question.
58
-
59
- ---
60
-
61
- ## Step 0: Ensure Task Exists (ALWAYS)
62
-
63
- Before any Q&A, ensure a task exists. If none exists, create one immediately.
64
-
65
- * Use a **temporary working title** derived from the user's message.
66
- * It's OK if the title is imperfect — refine later in PRD.
67
-
68
- ```bash
69
- TASK_DIR=$(python3 ./.trellis/scripts/task.py create "brainstorm: <short goal>" --slug <auto>)
70
- ```
71
-
72
- Use a slug without a date prefix. `task.py create` adds the `MM-DD-`
73
- directory prefix automatically.
74
-
75
- `task.py create` already created a default `prd.md`. Immediately update it with what you know:
76
-
77
- ```markdown
78
- # brainstorm: <short goal>
79
-
80
- ## Goal
81
-
82
- <one paragraph: what + why>
83
-
84
- ## Background / Known Context
85
-
86
- * <facts from user message>
87
- * <facts discovered from repo/docs>
88
-
89
- ## Assumptions (temporary)
90
-
91
- * <assumptions to validate>
92
-
93
- ## Open Questions
94
-
95
- * <ONLY Blocking / Preference questions; keep list short>
96
-
97
- ## Requirements
98
-
99
- * <start with what is known>
100
-
101
- ## Acceptance Criteria
102
-
103
- * [ ] <testable criterion>
104
-
105
- ## Definition of Done (team quality bar)
106
-
107
- * Tests added/updated (unit/integration where appropriate)
108
- * Lint / typecheck / CI green
109
- * Docs/notes updated if behavior changes
110
- * Rollout/rollback considered if risky
111
-
112
- ## Out of Scope (explicit)
113
-
114
- * <what we will not do in this task>
115
-
116
- ## Research References
117
-
118
- * <links to research/*.md or external references>
119
- ```
120
-
121
- For complex tasks, also create/update:
122
-
123
- ```markdown
124
- # design.md
125
-
126
- ## Technical Design
127
-
128
- <boundaries, contracts, data flow, compatibility, tradeoffs>
129
-
130
- ## Rollout / Rollback
131
-
132
- <operational notes if relevant>
133
- ```
134
-
135
- ```markdown
136
- # implement.md
137
-
138
- ## Implementation Checklist
139
-
140
- - [ ] <ordered implementation step>
141
-
142
- ## Validation
143
-
144
- - <lint/typecheck/test command>
145
-
146
- ## Review Gates
147
-
148
- - <human or technical checkpoint before start/finish>
149
- ```
150
-
151
- ---
152
-
153
- ## Step 1: Auto-Context (DO THIS BEFORE ASKING QUESTIONS)
154
-
155
- Before asking questions like "what does the code look like?", gather context yourself:
156
-
157
- ### Repo inspection checklist
158
-
159
- * Identify likely modules/files impacted
160
- * Locate existing patterns (similar features, conventions, error handling style)
161
- * Check configs, scripts, existing command definitions
162
- * Note any constraints (runtime, dependency policy, build tooling)
163
-
164
- ### Documentation checklist
165
-
166
- * Look for existing PRDs/specs/templates
167
- * Look for command usage examples, README, ADRs if any
168
-
169
- Write findings into PRD:
170
-
171
- * Add user-visible facts to `Background / Known Context`
172
- * Write technical findings to `research/*.md`, `design.md`, or `implement.md` as appropriate
173
-
174
- ---
175
-
176
- ## Step 2: Classify Complexity (still useful, not gating task creation)
177
-
178
- | Complexity | Criteria | Action |
179
- | ------------ | ------------------------------------------------------ | ------------------------------------------- |
180
- | **Trivial** | Single-line fix, typo, obvious change | Skip brainstorm, implement directly |
181
- | **Simple** | Clear goal, 1–2 files, scope well-defined | Ask 1 confirm question, then implement |
182
- | **Moderate** | Multiple files, some ambiguity | Light brainstorm (2–3 high-value questions) |
183
- | **Complex** | Vague goal, architectural choices, multiple approaches | Full brainstorm |
184
-
185
- > Note: Task already exists from Step 0. Classification only affects depth of brainstorming.
186
-
187
- ---
188
-
189
- ## Step 3: Question Gate (Ask ONLY high-value questions)
190
-
191
- Before asking ANY question, run the following gate:
192
-
193
- ### Gate A — Can I derive this without the user?
194
-
195
- If answer is available via:
196
-
197
- * repo inspection (code/config)
198
- * docs/specs/conventions
199
- * quick market/OSS research
200
-
201
- → **Do not ask.** Fetch it, summarize, update PRD.
202
-
203
- ### Gate B — Is this a meta/lazy question?
204
-
205
- Examples:
206
-
207
- * "Should I search?"
208
- * "Can you paste the code so I can proceed?"
209
- * "What does the code look like?" (when repo is available)
210
-
211
- → **Do not ask.** Take action.
212
-
213
- ### Gate C — What type of question is it?
214
-
215
- * **Blocking**: cannot proceed without user input
216
- * **Preference**: multiple valid choices, depends on product/UX/risk preference
217
- * **Derivable**: should be answered by inspection/research
218
-
219
- → Only ask **Blocking** or **Preference**.
220
-
221
- ---
222
-
223
- ## Step 4: Research-first Mode (Mandatory for technical choices)
224
-
225
- ### Trigger conditions (any → research-first)
226
-
227
- * The task involves selecting an approach, library, protocol, framework, template system, plugin mechanism, or CLI UX convention
228
- * The user asks for "best practice", "how others do it", "recommendation"
229
- * The user can't reasonably enumerate options
9
+ Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
230
10
 
231
- ### Delegate to `trellis-research` sub-agent (don't research inline)
232
-
233
- For each research topic, **spawn a `trellis-research` sub-agent via the Task tool** — don't do WebFetch / WebSearch / `gh api` inline in the main conversation.
234
-
235
- Why:
236
- - The sub-agent has its own context window → doesn't pollute brainstorm context with raw tool output
237
- - It persists findings to `{TASK_DIR}/research/<topic>.md` (the contract — see `workflow.md` Phase 1.2)
238
- - It returns only `{file path, one-line summary}` to the main agent
239
- - Independent topics can be **parallelized** — spawn multiple sub-agents in one tool call
240
-
241
- > **Codex exception**: on Codex CLI, do NOT dispatch `trellis-research` for research-first mode — do the research inline (WebFetch / WebSearch in the main session) and write findings to `{TASK_DIR}/research/<topic>.md` yourself. Reason: Codex `spawn_agent` runs sub-agents with `fork_turns="none"` (isolated context, no parent session inheritance), so the research sub-agent cannot resolve the active task path via `task.py current` and silently aborts without producing files. Inline research on Codex avoids this failure mode. The 3+ inline research calls limit (B rule in `workflow.md`) is relaxed for Codex specifically.
242
-
243
- Agent type: `trellis-research`
244
- Task description template: "Research <specific question>; persist findings to `{TASK_DIR}/research/<topic-slug>.md`."
245
-
246
- ❌ Bad (what you must NOT do):
247
- ```
248
- Main agent: WebFetch(url-A) → WebFetch(url-B) → Bash(gh api ...)
249
- → WebSearch(q1) → WebSearch(q2) → ... (10+ inline calls)
250
- → Write(research/topic.md)
251
- ```
252
- → Pollutes main context with raw HTML/JSON, burns tokens.
253
-
254
- ✅ Good:
255
- ```
256
- Main agent: Task(subagent_type="trellis-research",
257
- prompt="Research topic A; persist to research/topic-a.md")
258
- + Task(subagent_type="trellis-research",
259
- prompt="Research topic B; persist to research/topic-b.md")
260
- + Task(subagent_type="trellis-research",
261
- prompt="Research topic C; persist to research/topic-c.md")
262
- → Reads research/topic-{a,b,c}.md after they finish.
263
- ```
264
-
265
- ### Research steps (to pass into each sub-agent prompt)
266
-
267
- Each `trellis-research` sub-agent should:
268
-
269
- 1. Identify 2–4 comparable tools/patterns for its topic
270
- 2. Summarize common conventions and why they exist
271
- 3. Map conventions onto our repo constraints
272
- 4. Write findings to `{TASK_DIR}/research/<topic>.md`
273
-
274
- Main agent then reads the persisted files and produces **2–3 feasible approaches** in PRD.
275
-
276
- ### Research output format (PRD)
277
-
278
- The PRD itself should only reference the persisted research files, not duplicate their content. Add a `## Research References` section pointing at `research/*.md`.
279
-
280
- Optionally, add a convergence section with feasible approaches derived from the research:
281
-
282
- ```markdown
283
- ## Research References
284
-
285
- * [`research/<topic-a>.md`](research/<topic-a>.md) — <one-line takeaway>
286
- * [`research/<topic-b>.md`](research/<topic-b>.md) — <one-line takeaway>
287
-
288
- ## Research Notes
289
-
290
- ### What similar tools do
291
-
292
- * ...
293
- * ...
294
-
295
- ### Constraints from our repo/project
296
-
297
- * ...
298
-
299
- ### Feasible approaches here
300
-
301
- **Approach A: <name>** (Recommended)
302
-
303
- * How it works:
304
- * Pros:
305
- * Cons:
306
-
307
- **Approach B: <name>**
308
-
309
- * How it works:
310
- * Pros:
311
- * Cons:
312
-
313
- **Approach C: <name>** (optional)
314
-
315
- * ...
316
- ```
317
-
318
- Then ask **one** preference question:
319
-
320
- * "Which approach do you prefer: A / B / C (or other)?"
321
-
322
- ---
323
-
324
- ## Step 5: Expansion Sweep (DIVERGE) — Required after initial understanding
325
-
326
- After you can summarize the goal, proactively broaden thinking before converging.
327
-
328
- ### Expansion categories (keep to 1–2 bullets each)
329
-
330
- 1. **Future evolution**
331
-
332
- * What might this feature become in 1–3 months?
333
- * What extension points are worth preserving now?
334
-
335
- 2. **Related scenarios**
336
-
337
- * What adjacent commands/flows should remain consistent with this?
338
- * Are there parity expectations (create vs update, import vs export, etc.)?
339
-
340
- 3. **Failure & edge cases**
341
-
342
- * Conflicts, offline/network failure, retries, idempotency, compatibility, rollback
343
- * Input validation, security boundaries, permission checks
344
-
345
- ### Expansion message template (to user)
346
-
347
- ```markdown
348
- I understand you want to implement: <current goal>.
349
-
350
- Before diving into design, let me quickly diverge to consider three categories (to avoid rework later):
351
-
352
- 1. Future evolution: <1–2 bullets>
353
- 2. Related scenarios: <1–2 bullets>
354
- 3. Failure/edge cases: <1–2 bullets>
355
-
356
- For this MVP, which would you like to include (or none)?
357
-
358
- 1. Current requirement only (minimal viable)
359
- 2. Add <X> (reserve for future extension)
360
- 3. Add <Y> (improve robustness/consistency)
361
- 4. Other: describe your preference
362
- ```
363
-
364
- Then update PRD:
365
-
366
- * What's in MVP → `Requirements`
367
- * What's excluded → `Out of Scope`
368
-
369
- ---
370
-
371
- ## Step 6: Q&A Loop (CONVERGE)
372
-
373
- ### Rules
374
-
375
- * One question per message
376
- * Prefer multiple-choice when possible
377
- * After each user answer:
378
-
379
- * Update PRD immediately
380
- * Move answered items from `Open Questions` → `Requirements`
381
- * Update `Acceptance Criteria` with testable checkboxes
382
- * Clarify `Out of Scope`
383
-
384
- ### Question priority (recommended)
385
-
386
- 1. **MVP scope boundary** (what is included/excluded)
387
- 2. **Preference decisions** (after presenting concrete options)
388
- 3. **Failure/edge behavior** (only for MVP-critical paths)
389
- 4. **Success metrics & Acceptance Criteria** (what proves it works)
390
-
391
- ### Preferred question format (multiple choice)
392
-
393
- ```markdown
394
- For <topic>, which approach do you prefer?
395
-
396
- 1. **Option A** — <what it means + trade-off>
397
- 2. **Option B** — <what it means + trade-off>
398
- 3. **Option C** — <what it means + trade-off>
399
- 4. **Other** — describe your preference
400
- ```
401
-
402
- ---
403
-
404
- ## Step 7: Propose Approaches + Record Decisions (Complex tasks)
405
-
406
- After requirements are clear enough, propose 2–3 approaches (if not already done via research-first):
407
-
408
- ```markdown
409
- Based on current information, here are 2–3 feasible approaches:
410
-
411
- **Approach A: <name>** (Recommended)
412
-
413
- * How:
414
- * Pros:
415
- * Cons:
416
-
417
- **Approach B: <name>**
418
-
419
- * How:
420
- * Pros:
421
- * Cons:
11
+ Ask the questions one at a time.
422
12
 
423
- Which direction do you prefer?
424
- ```
13
+ ## Non-Negotiable Evidence Rule
425
14
 
426
- Record the outcome in PRD as an ADR-lite section:
15
+ If a question can be answered by exploring the codebase, explore the codebase instead.
427
16
 
428
- ```markdown
429
- ## Decision (ADR-lite)
17
+ This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
430
18
 
431
- **Context**: Why this decision was needed
432
- **Decision**: Which approach was chosen
433
- **Consequences**: Trade-offs, risks, potential future improvements
434
- ```
19
+ Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
435
20
 
436
21
  ---
437
22
 
438
- ## Step 8: Final Confirmation + Planning Artifacts
439
-
440
- When open questions are resolved, confirm complete requirements with a structured summary:
441
-
442
- ### Final confirmation format
443
-
444
- ```markdown
445
- Here's my understanding of the complete requirements:
446
-
447
- **Goal**: <one sentence>
448
-
449
- **Requirements**:
450
-
451
- * ...
452
- * ...
453
-
454
- **Acceptance Criteria**:
455
-
456
- * [ ] ...
457
- * [ ] ...
458
-
459
- **Definition of Done**:
460
-
461
- * ...
23
+ Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
462
24
 
463
- **Out of Scope**:
25
+ ## Preconditions
464
26
 
465
- * ...
27
+ Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
466
28
 
467
- **Artifact status**:
468
-
469
- * prd.md: <ready / needs update>
470
- * design.md: <not needed for lightweight / ready / missing>
471
- * implement.md: <not needed for lightweight / ready / missing>
472
-
473
- Does this look correct? If yes, the next step is planning review before `task.py start`.
474
- ```
475
-
476
- ### Subtask Decomposition (Complex Tasks)
477
-
478
- For complex tasks with multiple independent work items, create subtasks:
29
+ If no task exists yet, create one:
479
30
 
480
31
  ```bash
481
- # Create child tasks
482
- CHILD1=$(python3 ./.trellis/scripts/task.py create "Child task 1" --slug child1 --parent "$TASK_DIR")
483
- CHILD2=$(python3 ./.trellis/scripts/task.py create "Child task 2" --slug child2 --parent "$TASK_DIR")
484
-
485
- # Or link existing tasks
486
- python3 ./.trellis/scripts/task.py add-subtask "$TASK_DIR" "$CHILD_DIR"
32
+ TASK_DIR=$({{PYTHON_CMD}} ./.trellis/scripts/task.py create "<short task title>" --slug <slug>)
487
33
  ```
488
34
 
489
- ---
35
+ Use a concise title from the user's request. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
490
36
 
491
- ## PRD Target Structure (final)
37
+ `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
492
38
 
493
- `prd.md` should converge to:
39
+ ## Planning Flow
494
40
 
495
- ```markdown
496
- # <Task Title>
41
+ 1. Capture the user's request and initial known facts in `prd.md`.
42
+ 2. Inspect available evidence before asking questions:
43
+ - code, tests, fixtures, and configs
44
+ - README files, docs, existing specs, and domain notes
45
+ - related Trellis tasks, research files, and session history when present
46
+ 3. Separate what you found into:
47
+ - confirmed facts
48
+ - product intent still needed from the user
49
+ - scope or risk decisions still needed from the user
50
+ - likely out-of-scope items
51
+ 4. Ask the single highest-value remaining question.
52
+ 5. Include your recommended answer with the question.
53
+ 6. After each user answer, update `prd.md` before continuing.
54
+ 7. For complex tasks, create or update `design.md` and `implement.md` before implementation starts.
497
55
 
498
- ## Goal
56
+ Do not invent a project-specific product/spec hierarchy. If the repository already has product, domain, or spec docs, use them. If it does not, proceed with the evidence that exists.
499
57
 
500
- <why + what>
58
+ ## Question Rules
501
59
 
502
- ## Requirements
60
+ Ask only one question per message.
503
61
 
504
- * ...
62
+ Each question must include:
505
63
 
506
- ## Acceptance Criteria
64
+ - the decision needed
65
+ - why the answer matters
66
+ - your recommended answer
67
+ - the trade-off if the user chooses differently
507
68
 
508
- * [ ] ...
69
+ Do not ask process questions such as whether to search, inspect files, or continue brainstorming. Do the evidence work directly. Ask the user only when the remaining issue is a product decision, preference, scope boundary, or risk tolerance choice.
509
70
 
510
- ## Out of Scope
71
+ ## Artifact Rules
511
72
 
512
- * ...
73
+ `prd.md` records requirements and acceptance:
513
74
 
514
- ## Research References
75
+ - goal and user value
76
+ - confirmed facts
77
+ - requirements
78
+ - acceptance criteria
79
+ - out of scope
80
+ - open questions that still block planning
515
81
 
516
- * <links to research/*.md or external references>
517
- ```
82
+ `design.md` records technical design for complex tasks:
518
83
 
519
- ---
84
+ - architecture and boundaries
85
+ - data flow and contracts
86
+ - compatibility and migration notes
87
+ - important trade-offs
88
+ - operational or rollback considerations
520
89
 
521
- ## Anti-Patterns (Hard Avoid)
90
+ `implement.md` records execution planning for complex tasks:
522
91
 
523
- * Asking user for code/context that can be derived from repo
524
- * Asking user to choose an approach before presenting concrete options
525
- * Meta questions about whether to research
526
- * Staying narrowly on the initial request without considering evolution/edges
527
- * Letting brainstorming drift without updating PRD
92
+ - ordered implementation checklist
93
+ - validation commands
94
+ - risky files or rollback points
95
+ - follow-up checks before `task.py start`
528
96
 
529
- ---
97
+ Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start`.
530
98
 
531
- ## Integration with Start Workflow
532
-
533
- After brainstorm completes (Step 8 confirmation approved), the flow continues to the Task Workflow planning review gate:
534
-
535
- ```text
536
- Brainstorm
537
- Step 0: Create task directory + update PRD
538
- Step 1–7: Discover requirements, research, converge
539
- Step 8: Final confirmation → user approves planning artifacts
540
-
541
- Task Workflow Phase 1 (Plan)
542
- Lightweight task → PRD-only may be enough
543
- Complex task → design.md + implement.md required
544
- Sub-agent platforms → curate implement.jsonl / check.jsonl manifests
545
- → Review gate → task.py start
546
-
547
- Task Workflow Phase 2 (Execute)
548
- Implement → Check → Complete
549
- ```
99
+ `implement.md` is not a replacement for `implement.jsonl`. Use JSONL files only for manifest-style spec and research references when the task needs them.
550
100
 
551
- The task directory and PRD already exist from brainstorm, but Phase 1 is not skipped; it owns artifact review and the `task.py start` gate.
101
+ ## Quality Bar
552
102
 
553
- ---
103
+ Before declaring planning ready:
554
104
 
555
- ## Related Commands
105
+ - `prd.md` contains testable acceptance criteria.
106
+ - Repository-answerable questions have already been answered through inspection.
107
+ - Remaining open questions are genuinely about user intent or scope.
108
+ - Complex tasks have `design.md` and `implement.md`.
109
+ - The user has reviewed the final planning artifacts or explicitly approved proceeding.
556
110
 
557
- | Command | When to Use |
558
- |---------|-------------|
559
- | `{{CMD_REF:start}}` | Entry point that triggers brainstorm |
560
- | `{{CMD_REF:finish-work}}` | After implementation is complete |
561
- | `{{CMD_REF:update-spec}}` | If new patterns emerge during work |
111
+ Do not start implementation until the user approves or asks for implementation.
@@ -11,13 +11,13 @@
11
11
  "sessionStart": [
12
12
  {
13
13
  "command": "{{PYTHON_CMD}} .cursor/hooks/session-start.py",
14
- "timeout": 10
14
+ "timeout": 30
15
15
  }
16
16
  ],
17
17
  "beforeSubmitPrompt": [
18
18
  {
19
19
  "command": "{{PYTHON_CMD}} .cursor/hooks/inject-workflow-state.py",
20
- "timeout": 5
20
+ "timeout": 15
21
21
  }
22
22
  ],
23
23
  "beforeShellExecution": [
@@ -7,7 +7,7 @@
7
7
  {
8
8
  "type": "command",
9
9
  "command": "{{PYTHON_CMD}} .factory/hooks/session-start.py",
10
- "timeout": 10
10
+ "timeout": 30
11
11
  }
12
12
  ]
13
13
  },
@@ -17,7 +17,7 @@
17
17
  {
18
18
  "type": "command",
19
19
  "command": "{{PYTHON_CMD}} .factory/hooks/session-start.py",
20
- "timeout": 10
20
+ "timeout": 30
21
21
  }
22
22
  ]
23
23
  },
@@ -27,7 +27,7 @@
27
27
  {
28
28
  "type": "command",
29
29
  "command": "{{PYTHON_CMD}} .factory/hooks/session-start.py",
30
- "timeout": 10
30
+ "timeout": 30
31
31
  }
32
32
  ]
33
33
  }
@@ -50,7 +50,7 @@
50
50
  {
51
51
  "type": "command",
52
52
  "command": "{{PYTHON_CMD}} .factory/hooks/inject-workflow-state.py",
53
- "timeout": 5
53
+ "timeout": 15
54
54
  }
55
55
  ]
56
56
  }