@comfanion/workflow 4.36.58 → 4.36.60

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 (32) hide show
  1. package/package.json +1 -1
  2. package/src/build-info.json +2 -2
  3. package/src/opencode/FLOW.yaml +18 -1
  4. package/src/opencode/agents/analyst.md +6 -18
  5. package/src/opencode/agents/architect.md +5 -21
  6. package/src/opencode/agents/coder.md +8 -13
  7. package/src/opencode/agents/crawler.md +38 -38
  8. package/src/opencode/agents/dev.md +3 -64
  9. package/src/opencode/agents/pm.md +9 -25
  10. package/src/opencode/agents/researcher.md +1 -6
  11. package/src/opencode/agents/reviewer.md +26 -29
  12. package/src/opencode/commands/dev-story.md +2 -1
  13. package/src/opencode/plugins/custom-compaction.ts +7 -1
  14. package/src/opencode/skills/acceptance-criteria/SKILL.md +1 -1
  15. package/src/opencode/skills/archiving/SKILL.md +7 -18
  16. package/src/opencode/skills/changelog/SKILL.md +1 -1
  17. package/src/opencode/skills/code-review/SKILL.md +2 -3
  18. package/src/opencode/skills/coding-standards/SKILL.md +8 -18
  19. package/src/opencode/skills/dev-story/SKILL.md +69 -543
  20. package/src/opencode/skills/doc-todo/SKILL.md +22 -313
  21. package/src/opencode/skills/epic-writing/SKILL.md +1 -1
  22. package/src/opencode/skills/jira-integration/SKILL.md +1 -1
  23. package/src/opencode/skills/methodologies/SKILL.md +1 -1
  24. package/src/opencode/skills/module-documentation/SKILL.md +1 -1
  25. package/src/opencode/skills/prd-validation/SKILL.md +1 -1
  26. package/src/opencode/skills/prd-writing/SKILL.md +1 -1
  27. package/src/opencode/skills/requirements-gathering/SKILL.md +1 -1
  28. package/src/opencode/skills/requirements-validation/SKILL.md +1 -1
  29. package/src/opencode/skills/research-methodology/SKILL.md +1 -1
  30. package/src/opencode/skills/story-writing/SKILL.md +1 -1
  31. package/src/opencode/skills/test-design/SKILL.md +63 -275
  32. package/src/opencode/skills/translation/SKILL.md +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-story
3
- description: Execute a story by implementing tasks/subtasks using TDD, validating, and updating story file
3
+ description: Use when implementing a story with tasks/subtasks using TDD red-green-refactor cycle
4
4
  license: MIT
5
5
  compatibility: opencode
6
6
  metadata:
@@ -11,597 +11,123 @@ metadata:
11
11
 
12
12
  # Dev Story Skill
13
13
 
14
- Execute a story by implementing tasks/subtasks, writing tests, validating, and updating the story file per acceptance criteria.
14
+ Details for implementing stories. For workflow overview, see `/dev-story` command.
15
15
 
16
16
  ## Critical Rules
17
17
 
18
18
  - **Story File is the single source of truth** - tasks sequence is authoritative
19
19
  - **Respect task dependencies** - never start blocked tasks
20
- - **Methodology from config.yaml** - TDD or STUB approach
21
- - **Tests are MANDATORY validation** - each task has tests that MUST pass
22
- - **Continue until COMPLETE** - do not stop for "milestones"
20
+ - **Tests are MANDATORY** - each task has tests that MUST pass
23
21
  - **NEVER lie about tests** - tests must actually exist and pass
24
- - **For parallel execution** - call multiple @coder in one message (they run concurrently)
22
+ - **For parallel execution** - call multiple @coder in one message
25
23
 
26
- ## Methodology Selection
27
-
28
- Read from `config.yaml → development.methodology`:
24
+ ## Methodology (from config.yaml)
29
25
 
30
26
  | Methodology | Flow | Validation |
31
27
  |-------------|------|------------|
32
28
  | **TDD** | Interface → Test (RED) → Impl (GREEN) → Refactor | Test must FAIL first, then PASS |
33
29
  | **STUB** | Interface → Stub → Test → Real Impl | Test against stub, then real |
34
30
 
35
- ## Workflow Steps
36
-
37
- ### Step 1: Find and Load Story
38
-
39
- ```xml
40
- <step n="1" goal="Find next ready story and load it">
41
-
42
- <!-- MODE 1: Jira link provided -->
43
- <check if="jira_link is provided">
44
- <action>Extract Jira key from link</action>
45
- <action>Load jira-cache.yaml</action>
46
- <action>Lookup story by Jira key</action>
47
- <check if="found in cache">
48
- <action>Get local_doc path from cache</action>
49
- <action>Get branch name from cache</action>
50
- <output>
51
- 📋 Jira: {{jira_key}} - {{summary}}
52
- 📄 Local: {{local_doc}}
53
- 🌿 Branch: {{branch}}
54
- </output>
55
- </check>
56
- <check if="not in cache">
57
- <action>Fetch from Jira API</action>
58
- <action>Find matching local doc by summary</action>
59
- <ask>Link {{jira_key}} to which local doc?</ask>
60
- </check>
61
- <goto anchor="parse_story" />
62
- </check>
63
-
64
- <!-- MODE 2: Local path provided -->
65
- <check if="story_path is provided">
66
- <action>Use story_path directly</action>
67
- <action>Check jira-cache.yaml for Jira link</action>
68
- <check if="jira linked">
69
- <output>📋 Jira: {{jira_key}} linked</output>
70
- </check>
71
- <goto anchor="parse_story" />
72
- </check>
73
-
74
- <!-- MODE 3: Auto-find next story -->
75
- <check if="no input provided">
76
- <action>Load jira-cache.yaml</action>
77
- <check if="jira.control_development enabled">
78
- <action>Find stories with status = "planned" or "in_progress"</action>
79
- <output>
80
- 📋 Ready for development:
81
-
82
- | # | Jira | Story | Status | Branch |
83
- |---|------|-------|--------|--------|
84
- | 1 | PROJ-S01 | Product Aggregate | planned | - |
85
- | 2 | PROJ-S02 | Product Repository | in_progress | feature/... |
86
- </output>
87
- <ask>Which story to work on? (number or Jira key)</ask>
88
- </check>
89
- <check else="no jira control">
90
- <action>Load sprint-status.yaml</action>
91
- <action>Find FIRST story with status = "ready-for-dev"</action>
92
- </check>
93
- </check>
94
-
95
- <anchor id="parse_story" />
96
- <action>Read COMPLETE story file</action>
97
- <action>Parse sections: Story, AC, Tasks, Dev Notes, Jira Metadata</action>
98
- <action>Identify first incomplete task</action>
99
- <action if="no incomplete tasks">COMPLETE - goto Step 7</action>
100
- </step>
101
- ```
31
+ ## Task Implementation
102
32
 
103
- ### Step 1b: Jira Setup (if control_development)
33
+ ### Dependency Check
104
34
 
105
35
  ```xml
106
- <step n="1b" goal="Setup Jira task and branch">
107
- <check if="jira.control_development enabled AND story has jira_key">
108
-
109
- <!-- Transition to In Progress -->
110
- <check if="jira status != in_progress">
111
- <action>Transition Jira issue to "In Progress"</action>
112
- <action>Update cache</action>
113
- <output>📋 Jira {{jira_key}} → In Progress</output>
114
- </check>
115
-
116
- <!-- Create/checkout branch -->
117
- <check if="branch not exists">
118
- <action>Generate branch name from config pattern</action>
119
- <action>Create branch from epic branch or main</action>
120
- <action>Link branch to Jira issue</action>
121
- <action>Update cache</action>
122
- <output>🌿 Branch created: {{branch}}</output>
123
- </check>
124
- <check if="branch exists">
125
- <action>Checkout existing branch</action>
126
- <output>🌿 Switched to: {{branch}}</output>
127
- </check>
128
-
129
- <!-- Store task context -->
130
- <action>Store in session: jira_key, branch, transitions</action>
36
+ <phase name="DEPENDENCY_CHECK">
37
+ <action>Parse task summary table from story file</action>
38
+ <action>Read "Depends On" column for current task</action>
39
+ <check if="dependencies not complete">
40
+ <action>SKIP this task, find next ready task</action>
131
41
  </check>
132
- </step>
42
+ </phase>
133
43
  ```
134
44
 
135
- ### Step 2: Load Context
45
+ ### Parallel Opportunity
136
46
 
137
47
  ```xml
138
- <step n="2" goal="Load project context and story information">
139
- <action>Load project-context.md if exists</action>
140
- <action>Load CLAUDE.md for coding standards</action>
141
- <action>Extract developer guidance from Dev Notes section</action>
142
- <action>Note architecture requirements and technical specifications</action>
143
-
144
- <output>✅ **Context Loaded**
145
- - Story: {{story_title}}
146
- - First task: {{first_incomplete_task}}
147
- - Architecture guidance available: {{has_architecture}}
148
- - Coding standards loaded: {{has_claude_md}}
149
- </output>
150
- </step>
151
- ```
152
-
153
- ### Step 3: Mark Story In-Progress
154
-
155
- ```xml
156
- <step n="3" goal="Mark story in-progress">
157
- <check if="sprint_status file exists">
158
- <action>Update story status to "in-progress"</action>
159
- <output>🚀 Starting work on story {{story_key}}</output>
48
+ <phase name="PARALLEL_CHECK">
49
+ <action>Identify tasks with same satisfied dependencies</action>
50
+ <check if="parallel tasks exist">
51
+ <action>Call multiple @coder in ONE message</action>
160
52
  </check>
161
-
162
- <action>Update Status section in story file to "in-progress"</action>
163
- </step>
53
+ </phase>
164
54
  ```
165
55
 
166
- ### Step 4: Implement Task (Respect Dependencies)
56
+ ### TDD Cycle
167
57
 
168
58
  ```xml
169
- <step n="4" goal="Implement task following red-green-refactor cycle, respecting dependencies">
170
- <critical>RESPECT TASK DEPENDENCIES - never start a task if dependencies are incomplete</critical>
171
-
172
- <!-- DEPENDENCY CHECK -->
173
- <phase name="DEPENDENCY_CHECK">
174
- <action>Parse task summary table from story file</action>
175
- <action>Read "Depends On" column for current task</action>
176
- <check if="dependencies exist AND any dependency not marked ✅">
177
- <action>SKIP this task</action>
178
- <action>Find next task with all dependencies satisfied</action>
179
- <output>⏸️ Task {{task_id}} blocked by incomplete dependencies: {{blocking_tasks}}</output>
180
- </check>
181
- <check if="all dependencies complete OR no dependencies">
182
- <action>Proceed with task implementation</action>
183
- <output>✅ Task {{task_id}} dependencies satisfied, starting implementation</output>
184
- </check>
185
- </phase>
186
-
187
- <!-- PARALLEL OPPORTUNITY CHECK -->
188
- <phase name="PARALLEL_CHECK">
189
- <action>Identify other tasks with same satisfied dependencies</action>
190
- <check if="parallel tasks exist">
191
- <output>💡 **Parallel Opportunity:** Tasks {{parallel_tasks}} can be done together</output>
192
- <action>Call multiple @coder in ONE message to run them concurrently</action>
193
- </check>
59
+ <check if="methodology is TDD">
60
+ <phase name="RED">
61
+ <action>Write test for task deliverables</action>
62
+ <action>Run test - MUST FAIL</action>
194
63
  </phase>
195
64
 
196
- <!-- LOAD METHODOLOGY FROM CONFIG -->
197
- <phase name="METHODOLOGY">
198
- <action>Read config.yaml development.methodology</action>
199
- <output>📋 Methodology: {{methodology}} (TDD | STUB)</output>
65
+ <phase name="GREEN">
66
+ <action>Implement MINIMAL code to pass test</action>
67
+ <action>Run test - MUST PASS</action>
200
68
  </phase>
201
69
 
202
- <!-- TDD METHODOLOGY -->
203
- <check if="methodology is TDD">
204
- <phase name="TDD-1-INTERFACE">
205
- <action>Define interface/contract if task requires</action>
206
- <action>Ensure interface compiles</action>
207
- </phase>
208
-
209
- <phase name="TDD-2-RED">
210
- <action>Write test for task deliverables</action>
211
- <action>Run test - MUST FAIL (RED)</action>
212
- <check if="test passes">
213
- <halt>ERROR: Test should fail! Implementation exists before test.</halt>
214
- </check>
215
- <output>🔴 RED: Test failing as expected</output>
216
- </phase>
217
-
218
- <phase name="TDD-3-GREEN">
219
- <action>Implement MINIMAL code to pass test</action>
220
- <action>Run test - MUST PASS (GREEN)</action>
221
- <check if="test fails">
222
- <action>Fix implementation until test passes</action>
223
- </check>
224
- <output>🟢 GREEN: Test passing</output>
225
- </phase>
226
-
227
- <phase name="TDD-4-REFACTOR">
228
- <action>Refactor code (improve structure)</action>
229
- <action>Run test - MUST STILL PASS</action>
230
- <output>🔵 REFACTOR: Clean code, tests green</output>
231
- </phase>
232
- </check>
233
-
234
- <!-- STUB METHODOLOGY -->
235
- <check if="methodology is STUB">
236
- <phase name="STUB-1-INTERFACE">
237
- <action>Define interface/contract</action>
238
- <action>Ensure interface compiles</action>
239
- </phase>
240
-
241
- <phase name="STUB-2-STUB">
242
- <action>Write stub implementation (mock data)</action>
243
- <action>Stub returns expected data shapes</action>
244
- <output>🧪 STUB: Mock implementation ready</output>
245
- </phase>
246
-
247
- <phase name="STUB-3-TEST">
248
- <action>Write tests against stub</action>
249
- <action>Run test - MUST PASS with stub</action>
250
- <output>✅ Tests pass with stub</output>
251
- </phase>
252
-
253
- <phase name="STUB-4-REAL">
254
- <action>Replace stub with real implementation</action>
255
- <action>Run test - MUST STILL PASS</action>
256
- <check if="test fails">
257
- <action>Fix real implementation until test passes</action>
258
- </check>
259
- <output>🟢 REAL: Tests pass with real implementation</output>
260
- </phase>
261
- </check>
262
-
263
- <!-- TASK VALIDATION (MANDATORY FOR ALL TASKS) -->
264
- <phase name="TASK_VALIDATION" critical="MANDATORY">
265
- <action>Locate "Validation Test" section in task</action>
266
- <check if="validation test defined">
267
- <action>Run ALL validation tests listed</action>
268
- <check if="any test fails">
269
- <halt>❌ TASK FAILED: Validation tests not passing</halt>
270
- </check>
271
- <output>✅ All validation tests pass</output>
272
- </check>
273
- <check if="no validation test">
274
- <halt>❌ ERROR: Task missing validation test</halt>
275
- </check>
70
+ <phase name="REFACTOR">
71
+ <action>Improve code structure</action>
72
+ <action>Run test - MUST STILL PASS</action>
276
73
  </phase>
277
-
278
- <!-- TODO PLACEHOLDERS FOR FUTURE WORK -->
279
- <phase name="TODO_PLACEHOLDERS">
280
- <action>Check config.yaml → development.todo.enabled</action>
281
- <check if="todo enabled">
282
- <action>Review "TODO Placeholders" section in story</action>
283
- <action>Review "Related Future Work" table</action>
284
-
285
- <!-- Add TODOs for next tasks -->
286
- <check if="current task has dependent tasks (Blocks: T{n})">
287
- <action>Add TODO comment at integration point</action>
288
- <example>
289
- // TODO(TASK:T{n}): {description from next task}
290
- // Implement in next task, current code provides interface
291
- // See: story file #T{n}
292
- </example>
293
- </check>
294
-
295
- <!-- Add TODOs for future stories -->
296
- <check if="story references future stories">
297
- <action>Add TODO comment where future story will extend</action>
298
- <example>
299
- // TODO(STORY:{MODULE}-S{epic}-{nn}): {description}
300
- // Current implementation is basic, enhanced in {story-id}
301
- // See: docs/sprint-artifacts/.../story-{id}.md
302
- </example>
303
- </check>
304
-
305
- <!-- Add TODOs for future epics -->
306
- <check if="story references future epics">
307
- <action>Add TODO comment for architectural evolution</action>
308
- <example>
309
- // TODO(EPIC:{MODULE}-E{nn}): {description}
310
- // Current sync approach, will be async in {epic-id}
311
- // See: docs/sprint-artifacts/.../epic-{id}.md
312
- </example>
313
- </check>
314
-
315
- <!-- Add TODOs for technical debt -->
316
- <check if="implementation has known limitations">
317
- <action>Add TODO comment for tech debt</action>
318
- <example>
319
- // TODO(TECH_DEBT): {description}
320
- // Known limitation: {what}
321
- // Improvement: {how}
322
- </example>
323
- </check>
324
-
325
- <!-- Add TODOs for backlog items -->
326
- <check if="implementation could be improved but not planned">
327
- <action>Add TODO comment for backlog</action>
328
- <example>
329
- // TODO(BACKLOG): {description}
330
- // Nice to have: {improvement idea}
331
- </example>
332
- </check>
333
-
334
- <!-- Add FIXME for known bugs -->
335
- <check if="known bug or issue discovered">
336
- <action>Add FIXME comment</action>
337
- <example>
338
- // FIXME(BUG:{ticket-id}): {description}
339
- // Ticket: {url}
340
- </example>
341
- </check>
342
-
343
- <!-- Add HACK for temporary workarounds -->
344
- <check if="temporary workaround implemented">
345
- <action>Add HACK comment</action>
346
- <example>
347
- // HACK: {description}
348
- // Temporary until: {condition}
349
- // Remove when: {story/epic id}
350
- </example>
351
- </check>
352
-
353
- <output>📝 TODO placeholders added for future work</output>
354
- </check>
355
- </phase>
356
-
357
- <halt-conditions>
358
- <halt if="task dependencies not satisfied">Cannot start - dependencies incomplete</halt>
359
- <halt if="new dependencies required beyond story specs">Additional dependencies need user approval</halt>
360
- <halt if="3 consecutive implementation failures">Request guidance</halt>
361
- <halt if="required configuration missing">Cannot proceed without necessary configuration</halt>
362
- </halt-conditions>
363
-
364
- <critical>NEVER implement anything not mapped to a specific task</critical>
365
- <critical>NEVER skip dependency checks</critical>
366
- </step>
367
- ```
368
-
369
- ### Step 4b: Update Task Status
370
-
371
- ```xml
372
- <step n="4b" goal="Update task status in summary table">
373
- <action>Find task row in summary table</action>
374
- <action>Update Status column: ⬜ → 🔄 (when starting) → ✅ (when complete)</action>
375
-
376
- <output>
377
- | ID | Task | Est | Depends On | Status |
378
- |----|------|-----|------------|--------|
379
- | T1 | ... | 5h | - | ✅ |
380
- | T2 | ... | 6h | T1 | 🔄 | ← Current
381
- | T3 | ... | 5h | T1 | ⬜ | ← Can run parallel with T2
382
- </output>
383
- </step>
384
- ```
385
-
386
- ### Step 5: Run Validations
387
-
388
- ```xml
389
- <step n="5" goal="Run validations and tests">
390
- <action>Determine test framework from project structure</action>
391
- <action>Run all existing tests to ensure no regressions</action>
392
- <action>Run new tests to verify implementation</action>
393
- <action>Run linting and code quality checks if configured</action>
394
- <action>Validate implementation meets story acceptance criteria</action>
395
-
396
- <check if="regression tests fail">
397
- <action>STOP and fix before continuing</action>
398
- <action>Identify breaking changes</action>
399
- </check>
400
-
401
- <check if="new tests fail">
402
- <action>STOP and fix before continuing</action>
403
- <action>Ensure implementation correctness</action>
404
- </check>
405
- </step>
74
+ </check>
406
75
  ```
407
76
 
408
- ### Step 6: Mark Task Complete
77
+ ### STUB Cycle
409
78
 
410
79
  ```xml
411
- <step n="6" goal="Validate and mark task complete ONLY when fully done">
412
- <critical>NEVER mark a task complete unless ALL conditions are met</critical>
413
-
414
- <!-- VALIDATION GATES -->
415
- <validation>
416
- <check>Verify ALL tests for this task ACTUALLY EXIST and PASS 100%</check>
417
- <check>Confirm implementation matches EXACTLY what task specifies</check>
418
- <check>Validate related acceptance criteria are satisfied</check>
419
- <check>Run full test suite - NO regressions</check>
420
- </validation>
421
-
422
- <check if="ALL validation gates pass">
423
- <action>Mark task checkbox with [x]</action>
424
- <action>Update File List with all new/modified/deleted files</action>
425
- <action>Add completion notes to Dev Agent Record</action>
426
- <action>Add entry to Change Log</action>
427
- <action>Save story file</action>
428
- </check>
429
-
430
- <check if="ANY validation fails">
431
- <action>DO NOT mark task complete</action>
432
- <action>Fix issues first</action>
433
- <action>HALT if unable to fix</action>
434
- </check>
435
-
436
- <check if="more tasks remain">
437
- <goto step="4">Next task</goto>
438
- </check>
439
-
440
- <check if="no tasks remain">
441
- <goto step="7">Completion</goto>
442
- </check>
443
- </step>
444
- ```
445
-
446
- ### Step 7: Story Completion (Session End)
447
-
448
- ```xml
449
- <step n="7" goal="Story completion and mark for review">
450
- <action>Verify ALL tasks marked ✅</action>
451
- <action>Run full regression suite</action>
452
- <action>Confirm File List includes every changed file</action>
453
-
454
- <!-- SESSION END: Update changelogs with summary -->
455
- <phase name="SESSION_END_CHANGELOG" critical="MANDATORY">
456
- <note>Update changelog ONCE at session end, summarizing all work</note>
457
-
458
- <!-- Story changelog: one summary entry -->
459
- <action>Add ONE entry to story Changelog summarizing session work</action>
460
- <example>
461
- | 2.0 | {{date}} | @dev | Complete: T1-T7 done; All tests pass; Files: 12 created, 3 modified |
462
- </example>
463
-
464
- <!-- Repo CHANGELOG.md: grouped entries -->
465
- <action>Update repository CHANGELOG.md [Unreleased] section</action>
466
- <action>Group all story changes by category</action>
467
- <example>
468
- ### Added
469
- - Add product catalog API with CRUD operations (CATALOG-S05-03)
470
- - Add product validation with custom rules (CATALOG-S05-03)
471
-
472
- ### Changed
473
- - Change price precision from float to decimal (CATALOG-S05-03)
474
- </example>
80
+ <check if="methodology is STUB">
81
+ <phase name="STUB">
82
+ <action>Write stub implementation (mock data)</action>
475
83
  </phase>
476
-
477
- <!-- Definition of Done -->
478
- <validation name="definition-of-done">
479
- <check>All tasks/subtasks marked complete [x]</check>
480
- <check>Implementation satisfies every Acceptance Criterion</check>
481
- <check>Unit tests for core functionality added/updated</check>
482
- <check>Integration tests added when required</check>
483
- <check>All tests pass (no regressions)</check>
484
- <check>Code quality checks pass</check>
485
- <check>File List complete</check>
486
- <check>Dev Agent Record has implementation notes</check>
487
- <check>Change Log has summary</check>
488
- </validation>
489
84
 
490
- <action>Update story Status to "review"</action>
491
-
492
- <check if="sprint_status file exists">
493
- <action>Update story status to "review" in sprint-status.yaml</action>
494
- </check>
85
+ <phase name="TEST">
86
+ <action>Write tests against stub</action>
87
+ <action>Run test - MUST PASS with stub</action>
88
+ </phase>
495
89
 
496
- <output>✅ **Story Complete - Ready for Review**
497
-
498
- Story: {{story_key}}
499
- Status: review
500
-
501
- **Summary:**
502
- - Tasks completed: {{completed_tasks_count}}
503
- - Tests added: {{new_tests_count}}
504
- - Files changed: {{changed_files_count}}
505
- </output>
506
-
507
- <!-- AUTO-INVOKE: @reviewer for code review -->
508
- <goto step="8">Automatic code review</goto>
509
- </step>
90
+ <phase name="REAL">
91
+ <action>Replace stub with real implementation</action>
92
+ <action>Run test - MUST STILL PASS</action>
93
+ </phase>
94
+ </check>
510
95
  ```
511
96
 
512
- ### Step 8: Auto Review (configurable via config.yaml)
97
+ ## Task Validation
513
98
 
514
99
  ```xml
515
- <step n="8" goal="Auto review based on config.yaml setting">
516
- <action>Read config.yaml development.auto_review</action>
517
-
518
- <!-- AUTO REVIEW ENABLED -->
519
- <check if="auto_review: true">
520
- <critical>Invoke @reviewer for automatic code review</critical>
521
-
522
- <action>Invoke @reviewer agent with story path</action>
523
- <action>@reviewer uses GPT-5.2 Codex for deep analysis</action>
524
-
525
- <invoke agent="reviewer">
526
- <param name="story_path">{{story_path}}</param>
527
- <param name="files_changed">{{file_list}}</param>
528
- <param name="focus">security, correctness, test coverage</param>
529
- </invoke>
530
-
531
- <check if="reviewer verdict = APPROVE">
532
- <action>Mark story status as "done"</action>
533
- <output>✅ Code review passed! Story complete.</output>
534
- </check>
535
-
536
- <check if="reviewer verdict = CHANGES_REQUESTED">
537
- <action>Create follow-up tasks from review findings</action>
538
- <action>Add tasks to story file</action>
539
- <output>
540
- 🔄 **Code Review: Changes Requested**
541
-
542
- Review found {{issues_count}} issues to fix.
543
- New tasks added to story.
544
-
545
- Run dev-story again to fix issues.
546
- </output>
547
- <goto step="4">Fix review issues</goto>
548
- </check>
549
-
550
- <check if="reviewer verdict = BLOCKED">
551
- <action>Mark story status as "blocked"</action>
552
- <output>
553
- ❌ **Code Review: Blocked**
554
-
555
- Critical issues found. See review for details.
556
- Cannot proceed until blocking issues resolved.
557
- </output>
558
- <halt reason="Blocked by code review"/>
559
- </check>
560
- </check>
561
-
562
- <!-- AUTO REVIEW DISABLED -->
563
- <check if="auto_review: false OR not set">
564
- <output>
565
- ✅ **Story Ready for Review**
566
-
567
- Story: {{story_key}}
568
- Status: review
569
-
570
- Run `/review-story` to complete code review.
571
- </output>
572
- </check>
573
- </step>
100
+ <validation>
101
+ <check>ALL tests for this task EXIST and PASS 100%</check>
102
+ <check>Implementation matches EXACTLY what task specifies</check>
103
+ <check>Related acceptance criteria satisfied</check>
104
+ <check>Full test suite - NO regressions</check>
105
+ </validation>
106
+
107
+ <check if="ALL pass">
108
+ <action>Mark task [x] in story file</action>
109
+ <action>Update File List</action>
110
+ </check>
111
+
112
+ <check if="ANY fails">
113
+ <action>DO NOT mark task complete</action>
114
+ <action>Fix issues first</action>
115
+ </check>
574
116
  ```
575
117
 
576
- ## Story File Sections Updated
577
-
578
- | Section | When Updated |
579
- |---------|--------------|
580
- | Tasks/Subtasks `[ ]` → `[x]` | After each task completion |
581
- | Dev Agent Record | Implementation notes, debug log |
582
- | File List | All new/modified/deleted files |
583
- | Change Log | Summary of changes with date |
584
- | Status | draft → in-progress → review → done |
585
-
586
118
  ## HALT Conditions
587
119
 
120
+ - Task dependencies not satisfied
588
121
  - Additional dependencies need user approval
589
122
  - 3 consecutive implementation failures
590
- - Required configuration is missing
591
- - Ambiguous requirements need clarification
592
- - Cannot access story file
123
+ - Required configuration missing
593
124
 
594
- ## Definition of Done Checklist
125
+ ## Definition of Done
595
126
 
596
- - [ ] All tasks/subtasks marked complete
127
+ - [ ] All tasks marked [x]
597
128
  - [ ] Implementation satisfies every AC
598
- - [ ] Security checklist passed
599
- - [ ] Unit tests added for core functionality
600
- - [ ] Integration tests added when required
601
- - [ ] All tests pass (no regressions)
602
- - [ ] Code quality checks pass
603
- - [ ] File List includes all changes
604
- - [ ] Dev Agent Record complete
129
+ - [ ] Unit tests added
130
+ - [ ] Integration tests (if required)
131
+ - [ ] All tests pass
132
+ - [ ] File List complete
605
133
  - [ ] Change Log updated
606
- - [ ] **@reviewer approved** (if `auto_review: true`) OR status = `review` (if `auto_review: false`)
607
- - [ ] Status set to "done" (after review)