@leeovery/claude-technical-workflows 2.1.27 → 2.1.29

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 (76) hide show
  1. package/README.md +90 -92
  2. package/agents/implementation-analysis-task-writer.md +6 -5
  3. package/agents/planning-review-integrity.md +71 -0
  4. package/agents/planning-review-traceability.md +74 -0
  5. package/agents/planning-task-designer.md +4 -4
  6. package/package.json +1 -1
  7. package/skills/link-dependencies/SKILL.md +3 -3
  8. package/skills/migrate/scripts/migrations/002-specification-frontmatter.sh +5 -0
  9. package/skills/migrate/scripts/migrations/003-planning-frontmatter.sh +5 -0
  10. package/skills/migrate/scripts/migrations/004-sources-object-format.sh +5 -0
  11. package/skills/migrate/scripts/migrations/005-plan-external-deps-frontmatter.sh +5 -0
  12. package/skills/migrate/scripts/migrations/006-directory-restructure.sh +167 -0
  13. package/skills/migrate/scripts/migrations/007-tasks-subdirectory.sh +86 -0
  14. package/skills/start-discussion/references/handle-selection.md +8 -0
  15. package/skills/start-feature/SKILL.md +2 -2
  16. package/skills/start-implementation/SKILL.md +1 -3
  17. package/skills/start-implementation/scripts/discovery.sh +7 -7
  18. package/skills/start-planning/references/invoke-skill.md +3 -3
  19. package/skills/start-planning/scripts/discovery.sh +8 -8
  20. package/skills/start-review/references/invoke-skill.md +3 -3
  21. package/skills/start-review/scripts/discovery.sh +3 -3
  22. package/skills/start-specification/references/confirm-continue.md +3 -3
  23. package/skills/start-specification/references/confirm-create.md +3 -3
  24. package/skills/start-specification/references/confirm-refine.md +1 -1
  25. package/skills/start-specification/references/confirm-unify.md +4 -4
  26. package/skills/start-specification/references/handoffs/continue-concluded.md +3 -1
  27. package/skills/start-specification/references/handoffs/continue.md +3 -1
  28. package/skills/start-specification/references/handoffs/create-with-incorporation.md +2 -2
  29. package/skills/start-specification/references/handoffs/create.md +1 -1
  30. package/skills/start-specification/references/handoffs/unify-with-incorporation.md +3 -3
  31. package/skills/start-specification/references/handoffs/unify.md +1 -1
  32. package/skills/start-specification/scripts/discovery.sh +6 -6
  33. package/skills/status/scripts/discovery.sh +7 -7
  34. package/skills/technical-discussion/SKILL.md +46 -8
  35. package/skills/technical-implementation/SKILL.md +66 -20
  36. package/skills/technical-implementation/references/{steps/analysis-loop.md → analysis-loop.md} +1 -1
  37. package/skills/technical-implementation/references/{steps/invoke-analysis.md → invoke-analysis.md} +5 -5
  38. package/skills/technical-implementation/references/{steps/invoke-executor.md → invoke-executor.md} +5 -5
  39. package/skills/technical-implementation/references/{steps/invoke-reviewer.md → invoke-reviewer.md} +2 -2
  40. package/skills/technical-implementation/references/{steps/invoke-synthesizer.md → invoke-synthesizer.md} +3 -3
  41. package/skills/technical-implementation/references/{steps/invoke-task-writer.md → invoke-task-writer.md} +4 -4
  42. package/skills/technical-implementation/references/{steps/task-loop.md → task-loop.md} +45 -38
  43. package/skills/technical-planning/SKILL.md +64 -22
  44. package/skills/technical-planning/references/{steps/analyze-task-graph.md → analyze-task-graph.md} +33 -16
  45. package/skills/technical-planning/references/author-tasks.md +100 -0
  46. package/skills/technical-planning/references/{steps/define-phases.md → define-phases.md} +15 -9
  47. package/skills/technical-planning/references/{steps/define-tasks.md → define-tasks.md} +10 -6
  48. package/skills/technical-planning/references/invoke-review-integrity.md +36 -0
  49. package/skills/technical-planning/references/invoke-review-traceability.md +37 -0
  50. package/skills/technical-planning/references/output-formats/local-markdown/about.md +6 -4
  51. package/skills/technical-planning/references/output-formats/local-markdown/authoring.md +3 -3
  52. package/skills/technical-planning/references/output-formats/local-markdown/reading.md +3 -3
  53. package/skills/technical-planning/references/output-formats/local-markdown/updating.md +1 -1
  54. package/skills/technical-planning/references/output-formats/tick/about.md +68 -0
  55. package/skills/technical-planning/references/output-formats/tick/authoring.md +106 -0
  56. package/skills/technical-planning/references/output-formats/tick/graph.md +62 -0
  57. package/skills/technical-planning/references/output-formats/tick/reading.md +61 -0
  58. package/skills/technical-planning/references/output-formats/tick/updating.md +25 -0
  59. package/skills/technical-planning/references/output-formats.md +11 -0
  60. package/skills/technical-planning/references/{steps/plan-construction.md → plan-construction.md} +33 -9
  61. package/skills/technical-planning/references/plan-review.md +122 -0
  62. package/skills/technical-planning/references/process-review-findings.md +171 -0
  63. package/skills/technical-planning/references/{steps/resolve-dependencies.md → resolve-dependencies.md} +18 -12
  64. package/skills/technical-planning/references/review-integrity.md +127 -0
  65. package/skills/technical-planning/references/review-traceability.md +105 -0
  66. package/skills/technical-planning/references/task-design.md +1 -1
  67. package/skills/technical-planning/references/{steps/verify-source-material.md → verify-source-material.md} +3 -3
  68. package/skills/technical-research/SKILL.md +20 -4
  69. package/skills/technical-review/SKILL.md +21 -4
  70. package/skills/technical-specification/SKILL.md +34 -8
  71. package/skills/technical-specification/references/specification-guide.md +228 -56
  72. package/skills/view-plan/SKILL.md +1 -1
  73. package/skills/technical-planning/references/steps/author-tasks.md +0 -72
  74. package/skills/technical-planning/references/steps/plan-review.md +0 -94
  75. package/skills/technical-planning/references/steps/review-integrity.md +0 -222
  76. package/skills/technical-planning/references/steps/review-traceability.md +0 -200
@@ -70,19 +70,27 @@ For each topic or subtopic, perform exhaustive extraction:
70
70
  **Why this matters:** The specification is the single source of truth for planning. Planning will not reference prior source material - only this document. Missing a detail here means that detail doesn't get implemented.
71
71
 
72
72
  ### 2. Synthesize and Present
73
- Present your understanding to the user **in the format it would appear in the specification**. Output the content as rendered markdown (not in a code block) — the user needs to read it naturally, not inspect raw formatting:
73
+ Present your understanding to the user **in the format it would appear in the specification**:
74
74
 
75
- "Here's what I understand about [topic] based on the reference material. This is exactly what I'll write into the specification:
75
+ > *Output the next fenced block as markdown (not a code block):*
76
+
77
+ ```
78
+ Here's what I understand about [topic] based on the reference material. This is exactly what I'll write into the specification:
76
79
 
77
80
  [content as rendered markdown]
81
+ ```
82
+
83
+ Then, **separately from the content above** (clear visual break):
78
84
 
79
- Then, **separately from the content above** (clear visual break), present the choices as raw markdown:
85
+ > *Output the next fenced block as markdown (not a code block):*
80
86
 
87
+ ```
81
88
  · · · · · · · · · · · ·
82
89
  **To proceed:**
83
90
  - **`y`/`yes`** — Approved. I'll add the above to the specification **verbatim** (exactly as shown, no modifications).
84
91
  - **Or tell me what to change.**
85
92
  · · · · · · · · · · · ·
93
+ ```
86
94
 
87
95
  Content and choices must be visually distinct (not run together).
88
96
 
@@ -138,7 +146,7 @@ This is encouraged. Better to resurface and confirm "already covered" than let s
138
146
 
139
147
  > **CHECKPOINT**: You should NOT be creating or writing to this file unless you have explicit user approval for specific content. If you're about to create this file with content you haven't presented and had approved, **STOP**. That violates the workflow.
140
148
 
141
- Create `docs/workflow/specification/{topic}.md`
149
+ Create `docs/workflow/specification/{topic}/specification.md`
142
150
 
143
151
  This is a single file per topic. Structure is **flexible** - organize around phases and subject matter, not rigid sections. This is a working document.
144
152
 
@@ -150,6 +158,8 @@ topic: {topic-name}
150
158
  status: in-progress
151
159
  type: feature
152
160
  date: YYYY-MM-DD # Use today's actual date
161
+ review_cycle: 0
162
+ finding_gate_mode: gated
153
163
  sources:
154
164
  - name: discussion-one
155
165
  status: incorporated
@@ -172,10 +182,11 @@ sources:
172
182
 
173
183
  ### Frontmatter Fields
174
184
 
175
- - **topic**: Kebab-case identifier matching the filename
185
+ - **topic**: Kebab-case identifier matching the directory name
176
186
  - **status**: `in-progress` (building) or `concluded` (complete)
177
187
  - **type**: `feature` (something to build) or `cross-cutting` (patterns/policies)
178
188
  - **date**: Last updated date
189
+ - **review_cycle**: Current review cycle number (starts at 0, incremented each review cycle). Missing field treated as 0.
179
190
  - **sources**: Array of source discussions with incorporation status (see below)
180
191
 
181
192
  ### Sources and Incorporation Status
@@ -382,15 +393,18 @@ After documenting dependencies, perform a **final comprehensive review** in two
382
393
 
383
394
  To ensure analysis isn't lost during context refresh, create tracking files that capture your findings. These files persist your analysis so work can continue across sessions.
384
395
 
385
- **Location**: Store tracking files alongside the specification:
386
- - `docs/workflow/specification/{topic}-review-input-tracking.md` - Phase 1 findings
387
- - `docs/workflow/specification/{topic}-review-gap-analysis-tracking.md` - Phase 2 findings
396
+ **Location**: Store tracking files in the specification topic directory (`docs/workflow/specification/{topic}/`), cycle-numbered:
397
+ - `review-input-tracking-c{N}.md` Phase 1 findings for cycle N
398
+ - `review-gap-analysis-tracking-c{N}.md` Phase 2 findings for cycle N
399
+
400
+ Tracking files are **never deleted**. After all findings are processed, mark `status: complete`. Previous cycles' files persist as analysis history.
388
401
 
389
402
  **Format**:
390
403
  ```markdown
391
404
  ---
392
405
  status: in-progress | complete
393
406
  created: YYYY-MM-DD
407
+ cycle: {N}
394
408
  phase: Input Review | Gap Analysis
395
409
  topic: [Topic Name]
396
410
  ---
@@ -429,13 +443,45 @@ topic: [Topic Name]
429
443
  - Get approval
430
444
  - Log to specification
431
445
  - Update the tracking file: mark resolution, add notes
432
- 4. After all items resolved, delete the tracking file
433
- 5. Proceed to the next phase (or completion)
446
+ 4. After all items resolved, mark tracking file `status: complete`
447
+ 5. Proceed to the next phase (or re-loop prompt)
434
448
 
435
449
  **Why tracking files**: If context refreshes mid-review, you can read the tracking file and continue where you left off. The tracking file shows which items are resolved and which remain. This is especially important when reviews surface 10-20 items that need individual discussion.
436
450
 
437
451
  ---
438
452
 
453
+ ### Review Cycle Gate
454
+
455
+ Each review cycle runs Phase 1 (Input Review) + Phase 2 (Gap Analysis) as a pair. Always start here.
456
+
457
+ Increment `review_cycle` in the specification frontmatter and commit.
458
+
459
+ → If `review_cycle <= 3`, proceed directly to **Phase 1: Input Review**.
460
+
461
+ If `review_cycle > 3`:
462
+
463
+ **Do NOT skip review autonomously.** This gate is an escape hatch for the user — not a signal to stop. The expected default is to continue running review until no issues are found. Present the choice and let the user decide.
464
+
465
+ **Review cycle {N}**
466
+
467
+ Review has run {N-1} times so far. You can continue (recommended if issues were still found last cycle) or skip to completion.
468
+
469
+ > *Output the next fenced block as markdown (not a code block):*
470
+
471
+ ```
472
+ · · · · · · · · · · · ·
473
+ - **`p`/`proceed`** — Continue review *(default)*
474
+ - **`s`/`skip`** — Skip review, proceed to completion
475
+ · · · · · · · · · · · ·
476
+ ```
477
+
478
+ **STOP.** Wait for user choice. You MUST NOT choose on the user's behalf.
479
+
480
+ - **`proceed`**: → Continue to **Phase 1: Input Review**.
481
+ - **`skip`**: → Jump to **Completion**.
482
+
483
+ ---
484
+
439
485
  ### Phase 1: Input Review
440
486
 
441
487
  Compare the specification against all source material to catch anything that was missed from discussions, research, and requirements.
@@ -483,7 +529,7 @@ Compare the specification against all source material to catch anything that was
483
529
 
484
530
  After completing your review (steps 1-7):
485
531
 
486
- 1. **Create the tracking file** - Write all findings to `{topic}-review-input-tracking.md` using the format above
532
+ 1. **Create the tracking file** - Write all findings to `review-input-tracking-c{N}.md` in the specification topic directory (where N is the current review cycle)
487
533
  2. **Commit the tracking file** - This ensures it survives context refresh
488
534
  3. **Present findings** to the user in two stages:
489
535
 
@@ -491,7 +537,10 @@ After completing your review (steps 1-7):
491
537
 
492
538
  Present a numbered summary of everything you found (from your tracking file):
493
539
 
494
- "I've completed my final review against all source material. I found [N] items:
540
+ > *Output the next fenced block as markdown (not a code block):*
541
+
542
+ ```
543
+ I've completed my final review against all source material. I found [N] items:
495
544
 
496
545
  1. **[Brief title]**
497
546
  [2-4 line explanation: what was missed, where it came from, what it affects]
@@ -502,21 +551,39 @@ Present a numbered summary of everything you found (from your tracking file):
502
551
  3. **[Brief title]**
503
552
  [2-4 line explanation]
504
553
 
505
- Let's work through these one at a time, starting with #1."
554
+ Let's work through these one at a time, starting with #1.
555
+ ```
506
556
 
507
557
  Each item should have enough context that the user understands what they're about to discuss - not just a label, but clarity on what was missed and why it matters.
508
558
 
509
559
  **Stage 2: Process One Item at a Time**
510
560
 
511
- For each item, follow the **same workflow as the main specification process**:
561
+ For each item, present what you found, where it came from (source reference), and what you propose to add.
562
+
563
+ > *Output the next fenced block as markdown (not a code block):*
564
+
565
+ ```
566
+ {proposed content for this review item}
567
+ ```
512
568
 
513
- 1. **Present** the item in detail - what you found, where it came from (source reference), and what you propose to add
514
- 2. **Discuss** if needed - clarify ambiguities, answer questions, refine the content
515
- 3. **Present for approval** - show as rendered markdown (not a code block) exactly what will be written to the specification. Then, separately, show the choices:
569
+ Check `finding_gate_mode` in the specification frontmatter.
570
+
571
+ #### If `finding_gate_mode: auto`
572
+
573
+ Auto-approve: log verbatim, update tracking file (Resolution: Approved), commit.
574
+
575
+ > *Output the next fenced block as a code block:*
576
+
577
+ ```
578
+ Item {N} of {total}: {Brief Title} — approved. Added to specification.
579
+ ```
516
580
 
517
- "Here's what I'll add to the specification:
581
+ Proceed to the next item. After all items processed, continue to **Completing Phase 1**.
518
582
 
519
- [content as rendered markdown]
583
+ #### If `finding_gate_mode: gated`
584
+
585
+ 1. **Discuss** if needed - clarify ambiguities, answer questions, refine the content
586
+ 2. **Present for approval** - show as rendered markdown (not a code block) exactly what will be written to the specification. Then, separately, show the choices:
520
587
 
521
588
  > *Output the next fenced block as markdown (not a code block):*
522
589
 
@@ -524,18 +591,20 @@ For each item, follow the **same workflow as the main specification process**:
524
591
  · · · · · · · · · · · ·
525
592
  **To proceed:**
526
593
  - **`y`/`yes`** — Approved. I'll add the above to the specification **verbatim**.
594
+ - **`a`/`auto`** — Approve this and all remaining findings automatically
527
595
  - **Or tell me what to change.**
528
596
  · · · · · · · · · · · ·
529
597
  ```
530
598
 
531
599
  Content and choices must be visually distinct.
532
600
 
533
- 4. **Wait for explicit approval** - same rules as always: `y`/`yes` or equivalent before writing
534
- 5. **Log verbatim** when approved
535
- 6. **Update tracking file** - Mark the item's resolution (Approved/Adjusted/Skipped) and add any notes
601
+ 3. **Wait for explicit approval** - same rules as always: `y`/`yes` or equivalent before writing
602
+ 4. **Log verbatim** when approved
603
+ 5. **Update tracking file** - Mark the item's resolution (Approved/Adjusted/Skipped) and add any notes
604
+ 6. **If user chose `auto`**: update `finding_gate_mode: auto` in the spec frontmatter, then process all remaining items using the auto-mode flow above → After all processed, continue to **Completing Phase 1**.
536
605
  7. **Move to the next item**: "Moving to #2: [Brief title]..."
537
606
 
538
- > **CHECKPOINT**: Each review item requires the full present → approve → log cycle. Do not batch multiple items together. Do not proceed to the next item until the current one is resolved (approved, adjusted, or explicitly skipped by the user).
607
+ > **CHECKPOINT**: Each review item requires the full present → approve → log cycle (unless `finding_gate_mode: auto`). Do not batch multiple items together. Do not proceed to the next item until the current one is resolved (approved, adjusted, or explicitly skipped by the user).
539
608
 
540
609
  For potential gaps (items not in source material), you're asking questions rather than proposing content. If the user wants to address a gap, discuss it, then present what you'd add for approval.
541
610
 
@@ -554,7 +623,7 @@ When you've:
554
623
  - Surfaced any potential gaps not covered by sources (and resolved them)
555
624
  - Updated the tracking file with all resolutions
556
625
 
557
- **Delete the Phase 1 tracking file** (`{topic}-review-input-tracking.md`) - it has served its purpose.
626
+ **Mark the Phase 1 tracking file as complete** — Set `status: complete` in `review-input-tracking-c{N}.md`. Do not delete it; it persists as analysis history.
558
627
 
559
628
  Inform the user Phase 1 is complete and proceed to Phase 2: Gap Analysis.
560
629
 
@@ -624,7 +693,7 @@ Review the specification systematically for gaps *within what's specified*:
624
693
  - **Important**: Would require implementer to guess or make design decisions
625
694
  - **Minor**: Polish or clarification that improves understanding
626
695
 
627
- 5. **Create the tracking file** - Write findings to `{topic}-review-gap-analysis-tracking.md`
696
+ 5. **Create the tracking file** - Write findings to `review-gap-analysis-tracking-c{N}.md` in the specification topic directory (where N is the current review cycle)
628
697
 
629
698
  6. **Commit the tracking file** - Ensures it survives context refresh
630
699
 
@@ -634,7 +703,10 @@ Follow the same two-stage presentation as Phase 1:
634
703
 
635
704
  **Stage 1: Summary**
636
705
 
637
- "I've completed the gap analysis of the specification. I found [N] items:
706
+ > *Output the next fenced block as markdown (not a code block):*
707
+
708
+ ```
709
+ I've completed the gap analysis of the specification. I found [N] items:
638
710
 
639
711
  1. **[Brief title]** (Critical/Important/Minor)
640
712
  [2-4 line explanation: what the gap is, why it matters for implementation]
@@ -642,19 +714,37 @@ Follow the same two-stage presentation as Phase 1:
642
714
  2. **[Brief title]** (Critical/Important/Minor)
643
715
  [2-4 line explanation]
644
716
 
645
- Let's work through these one at a time, starting with #1."
717
+ Let's work through these one at a time, starting with #1.
718
+ ```
646
719
 
647
720
  **Stage 2: Process One Item at a Time**
648
721
 
649
- For each item:
722
+ For each item, present what's missing or unclear, what questions an implementer would have, and what you propose to add.
723
+
724
+ > *Output the next fenced block as markdown (not a code block):*
725
+
726
+ ```
727
+ {proposed content for this review item}
728
+ ```
729
+
730
+ Check `finding_gate_mode` in the specification frontmatter.
731
+
732
+ #### If `finding_gate_mode: auto`
733
+
734
+ Auto-approve: log verbatim, update tracking file (Resolution: Approved), commit.
735
+
736
+ > *Output the next fenced block as a code block:*
650
737
 
651
- 1. **Present** the gap in detail - what's missing or unclear, what questions an implementer would have
652
- 2. **Discuss** - work with the user to determine the correct specification content
653
- 3. **Present for approval** - show as rendered markdown (not a code block) exactly what will be written. Then, separately, show the choices:
738
+ ```
739
+ Item {N} of {total}: {Brief Title} approved. Added to specification.
740
+ ```
654
741
 
655
- "Here's what I'll add to the specification:
742
+ Proceed to the next item. After all items processed, continue to **Completing Phase 2**.
656
743
 
657
- [content as rendered markdown]
744
+ #### If `finding_gate_mode: gated`
745
+
746
+ 1. **Discuss** - work with the user to determine the correct specification content
747
+ 2. **Present for approval** - show as rendered markdown (not a code block) exactly what will be written. Then, separately, show the choices:
658
748
 
659
749
  > *Output the next fenced block as markdown (not a code block):*
660
750
 
@@ -662,18 +752,20 @@ For each item:
662
752
  · · · · · · · · · · · ·
663
753
  **To proceed:**
664
754
  - **`y`/`yes`** — Approved. I'll add the above to the specification **verbatim**.
755
+ - **`a`/`auto`** — Approve this and all remaining findings automatically
665
756
  - **Or tell me what to change.**
666
757
  · · · · · · · · · · · ·
667
758
  ```
668
759
 
669
760
  Content and choices must be visually distinct.
670
761
 
671
- 4. **Wait for explicit approval**
672
- 5. **Log verbatim** when approved
673
- 6. **Update tracking file** - Mark resolution and add notes
762
+ 3. **Wait for explicit approval**
763
+ 4. **Log verbatim** when approved
764
+ 5. **Update tracking file** - Mark resolution and add notes
765
+ 6. **If user chose `auto`**: update `finding_gate_mode: auto` in the spec frontmatter, then process all remaining items using the auto-mode flow above → After all processed, continue to **Completing Phase 2**.
674
766
  7. **Move to next item**
675
767
 
676
- > **CHECKPOINT**: Same rules apply - each item requires explicit approval before logging. No batching.
768
+ > **CHECKPOINT**: Same rules apply - each item requires explicit approval before logging (unless `finding_gate_mode: auto`). No batching.
677
769
 
678
770
  #### What You're NOT Doing in Phase 2
679
771
 
@@ -689,9 +781,73 @@ When you've:
689
781
  - Addressed all critical and important gaps with the user
690
782
  - Updated the tracking file with all resolutions
691
783
 
692
- **Delete the Phase 2 tracking file** (`{topic}-review-gap-analysis-tracking.md`).
784
+ **Mark the Phase 2 tracking file as complete** — Set `status: complete` in `review-gap-analysis-tracking-c{N}.md`. Do not delete it; it persists as analysis history.
785
+
786
+ Both review phases for this cycle are now complete.
787
+
788
+ ---
789
+
790
+ ### Re-Loop Prompt
791
+
792
+ After Phase 2 completes, check whether either phase surfaced findings in this cycle.
793
+
794
+ #### If no findings were surfaced in either phase of this cycle
795
+
796
+ → Skip the re-loop prompt and proceed directly to **Completion** (nothing to re-analyse).
797
+
798
+ #### If findings were surfaced
799
+
800
+ Do not skip review autonomously — present the choice and let the user decide.
801
+
802
+ > *Output the next fenced block as a code block:*
803
+
804
+ ```
805
+ Review cycle {N}
806
+
807
+ Review has run {N-1} times so far.
808
+ @if(finding_gate_mode = auto and review_cycle >= 5)
809
+ Auto-review has not converged after 5 cycles — escalating for human review.
810
+ @endif
811
+ ```
812
+
813
+ Check `finding_gate_mode` and `review_cycle` in the specification frontmatter.
814
+
815
+ #### If `finding_gate_mode: auto` and `review_cycle < 5`
816
+
817
+ > *Output the next fenced block as a code block:*
818
+
819
+ ```
820
+ Review cycle {N} complete — findings applied. Running follow-up cycle.
821
+ ```
822
+
823
+ → Return to the **Review Cycle Gate**.
824
+
825
+ #### If `finding_gate_mode: auto` and `review_cycle >= 5`
693
826
 
694
- Both review phases are now complete. Proceed to Completion.
827
+ Present the re-loop prompt below.
828
+
829
+ #### If `finding_gate_mode: gated`
830
+
831
+ > *Output the next fenced block as markdown (not a code block):*
832
+
833
+ ```
834
+ · · · · · · · · · · · ·
835
+ - **`r`/`reanalyse`** — Run another review cycle (Phase 1 + Phase 2)
836
+ - **`p`/`proceed`** — Proceed to completion
837
+ · · · · · · · · · · · ·
838
+ ```
839
+
840
+ **STOP.** Wait for user response.
841
+
842
+ #### If reanalyse
843
+
844
+ → Return to the **Review Cycle Gate** to begin a fresh cycle.
845
+
846
+ #### If proceed
847
+
848
+ → Continue to **Completion**.
849
+
850
+ ---
695
851
 
696
852
  ## Completion
697
853
 
@@ -711,40 +867,54 @@ Before asking for sign-off, assess whether this is a **feature** or **cross-cutt
711
867
 
712
868
  Present your assessment to the user:
713
869
 
714
- "This specification appears to be a **[feature/cross-cutting]** specification.
870
+ > *Output the next fenced block as markdown (not a code block):*
871
+
872
+ ```
873
+ This specification appears to be a **[feature/cross-cutting]** specification.
715
874
 
716
875
  [Brief rationale - e.g., "It defines a caching strategy that will inform how multiple features handle data retrieval, rather than being a standalone piece of functionality to build."]
717
876
 
718
877
  - **Feature specs** proceed to planning and implementation
719
878
  - **Cross-cutting specs** are referenced by feature plans but don't have their own implementation plan
720
879
 
721
- Does this assessment seem correct?"
880
+ Does this assessment seem correct?
881
+ ```
722
882
 
723
883
  Wait for user confirmation before proceeding.
724
884
 
725
- ### Step 2: Verify Tracking Files Removed
885
+ ### Step 2: Verify Tracking Files Complete
726
886
 
727
- Before proceeding to sign-off, confirm that all review tracking files have been deleted:
887
+ Before proceeding to sign-off, confirm that all review tracking files across all cycles have `status: complete`:
728
888
 
729
- - `{topic}-review-input-tracking.md` - should have been deleted after Phase 1
730
- - `{topic}-review-gap-analysis-tracking.md` - should have been deleted after Phase 2
889
+ - `review-input-tracking-c{N}.md` should be marked complete after each Phase 1
890
+ - `review-gap-analysis-tracking-c{N}.md` should be marked complete after each Phase 2
731
891
 
732
- If either file still exists, delete it now. These are temporary working files that should not persist after the review is complete.
892
+ If any tracking file still shows `status: in-progress`, mark it complete now.
733
893
 
734
- > **CHECKPOINT**: Do not proceed to sign-off if tracking files still exist. They indicate incomplete review work.
894
+ > **CHECKPOINT**: Do not proceed to sign-off if any tracking files still show `status: in-progress`. They indicate incomplete review work.
735
895
 
736
896
  ### Step 3: Sign-Off
737
897
 
738
- Once the type is confirmed and tracking files are removed, ask for final sign-off:
898
+ Once the type is confirmed and tracking files are complete:
899
+
900
+ > *Output the next fenced block as markdown (not a code block):*
901
+
902
+ ```
903
+ · · · · · · · · · · · ·
904
+ - **`y`/`yes`** — Conclude specification and mark as concluded
905
+ - **Comment** — Add context before concluding
906
+ · · · · · · · · · · · ·
907
+ ```
908
+
909
+ **STOP.** Wait for user response.
910
+
911
+ #### If comment
739
912
 
740
- "The specification is ready for sign-off:
741
- - **Type**: [feature/cross-cutting]
742
- - **Status**: Complete
913
+ Discuss the user's context, apply any changes, then re-present the sign-off prompt above.
743
914
 
744
- [If feature]: This specification can proceed to planning
745
- [If cross-cutting]: This specification will be surfaced as reference context when planning features
915
+ #### If yes
746
916
 
747
- Ready to mark as complete?"
917
+ Proceed to **Step 4**.
748
918
 
749
919
  ### Step 4: Update Frontmatter
750
920
 
@@ -756,13 +926,15 @@ topic: {topic-name}
756
926
  status: concluded
757
927
  type: feature # or cross-cutting
758
928
  date: YYYY-MM-DD # Use today's actual date
929
+ review_cycle: {N}
930
+ finding_gate_mode: gated
759
931
  ---
760
932
  ```
761
933
 
762
934
  Specification is complete when:
763
935
  - All topics/phases have validated content
764
- - Both review phases (Input Review and Gap Analysis) completed
765
- - All review tracking files have been deleted
936
+ - At least one review cycle completed with no findings, OR user explicitly chose to proceed past the re-loop prompt
937
+ - All review tracking files marked `status: complete`
766
938
  - Type has been determined and confirmed
767
939
  - User confirms the specification is complete
768
940
  - No blocking gaps remain
@@ -18,7 +18,7 @@ Ask the user which plan to view.
18
18
 
19
19
  ## Step 2: Read the Plan Index
20
20
 
21
- Read the plan file from `docs/workflow/planning/{topic}.md` and check the `format:` field in the frontmatter.
21
+ Read the plan file from `docs/workflow/planning/{topic}/plan.md` and check the `format:` field in the frontmatter.
22
22
 
23
23
  ## Step 3: Load Format Reading Reference
24
24
 
@@ -1,72 +0,0 @@
1
- # Author Tasks
2
-
3
- *Reference for **[technical-planning](../../SKILL.md)***
4
-
5
- ---
6
-
7
- This step uses the `planning-task-author` agent (`../../../../agents/planning-task-author.md`) to write full detail for a single task. You invoke the agent, present its output, and handle the approval gate.
8
-
9
- ---
10
-
11
- ## Author the Task
12
-
13
- ### Invoke the Agent
14
-
15
- Invoke `planning-task-author` with these file paths:
16
-
17
- 1. **read-specification.md**: `../read-specification.md`
18
- 2. **Specification**: path from the Plan Index File's `specification:` field
19
- 3. **Cross-cutting specs**: paths from the Plan Index File's `cross_cutting_specs:` field (if any)
20
- 4. **task-design.md**: `../task-design.md`
21
- 5. **All approved phases**: the complete phase structure from the Plan Index File body
22
- 6. **Task list for current phase**: the approved task table
23
- 7. **Target task**: the task name, edge cases, and ID from the table
24
- 8. **Output format authoring reference**: path to the format's `authoring.md` (e.g., `../output-formats/{format}/authoring.md`)
25
-
26
- ### Present the Output
27
-
28
- The agent returns complete task detail following the task template from task-design.md. Present it to the user as rendered markdown (not in a code block) **exactly as it will be written** — what the user sees is what gets logged.
29
-
30
- After presenting, ask:
31
-
32
- **Task {M} of {total}: {Task Name}**
33
-
34
- > *Output the next fenced block as markdown (not a code block):*
35
-
36
- ```
37
- · · · · · · · · · · · ·
38
- **To proceed:**
39
- - **`y`/`yes`** — Approved. I'll log it to the plan.
40
- - **Or tell me what to change.**
41
- - **Or navigate** — a different phase or task, or the leading edge.
42
- · · · · · · · · · · · ·
43
- ```
44
-
45
- **STOP.** Wait for the user's response.
46
-
47
- #### If the user provides feedback
48
-
49
- Re-invoke `planning-task-author` with all original inputs PLUS:
50
- - **Previous output**: the current task detail
51
- - **User feedback**: what the user wants changed
52
-
53
- Present the revised task in full. Ask the same choice again. Repeat until approved.
54
-
55
- #### If the user navigates
56
-
57
- → Return to **Plan Construction**.
58
-
59
- #### If approved (`y`/`yes`)
60
-
61
- > **CHECKPOINT**: Before logging, verify: (1) You presented this exact content, (2) The user explicitly approved with `y`/`yes` or equivalent — not a question, comment, or "okay" in passing, (3) You are writing exactly what was approved with no modifications.
62
-
63
- 1. Write the task to the output format (format-specific — see authoring.md)
64
- 2. Update the task table in the Plan Index File: set `status: authored`
65
- 3. Advance the `planning:` block in frontmatter to the next pending task (or next phase if this was the last task)
66
- 4. Commit: `planning({topic}): author task {task-id} ({task name})`
67
-
68
- Confirm:
69
-
70
- "Task {M} of {total}: {Task Name} — authored."
71
-
72
- → Return to **Plan Construction**.
@@ -1,94 +0,0 @@
1
- # Plan Review
2
-
3
- *Reference for **[technical-planning](../../SKILL.md)***
4
-
5
- ---
6
-
7
- After completing the plan, perform a comprehensive two-part review before handing off to implementation.
8
-
9
- **Why this matters**: The plan is what gets built. If content was hallucinated into the plan, it will be implemented — building something that was never discussed or validated. If specification content was missed, it won't be built. The entire purpose of this workflow is that artifacts carry validated decisions through to implementation. The plan is the final gate before code is written.
10
-
11
- ## Review Tracking Files
12
-
13
- To ensure analysis isn't lost during context refresh, create tracking files that capture findings. These files persist analysis so work can continue across sessions.
14
-
15
- **Location**: Store tracking files alongside the Plan Index File:
16
- - `{topic}-review-traceability-tracking.md` — Traceability findings
17
- - `{topic}-review-integrity-tracking.md` — Integrity findings
18
-
19
- **Format**:
20
- ```markdown
21
- ---
22
- status: in-progress | complete
23
- created: YYYY-MM-DD # Use today's actual date
24
- phase: Traceability Review | Plan Integrity Review
25
- topic: [Topic Name]
26
- ---
27
-
28
- # Review Tracking: [Topic Name] - [Phase]
29
-
30
- ## Findings
31
-
32
- ### 1. [Brief Title]
33
-
34
- **Type**: Missing from plan | Hallucinated content | Incomplete coverage | Structural issue | Weak criteria | ...
35
- **Spec Reference**: [Section/decision in specification, or "N/A" for integrity findings]
36
- **Plan Reference**: [Phase/task in plan, or "N/A" for missing content]
37
-
38
- **Details**:
39
- [What was found and why it matters]
40
-
41
- **Proposed Fix**:
42
- [What should change in the plan — leave blank until discussed]
43
-
44
- **Resolution**: Pending | Fixed | Adjusted | Skipped
45
- **Notes**: [Discussion notes or adjustments]
46
-
47
- ---
48
-
49
- ### 2. [Next Finding]
50
- ...
51
- ```
52
-
53
- **Why tracking files**: If context refreshes mid-review, you can read the tracking file and continue where you left off. The tracking file shows which items are resolved and which remain.
54
-
55
- ---
56
-
57
- ## Traceability Review
58
-
59
- Compare the plan against the specification in both directions — checking that everything from the spec is in the plan, and everything in the plan traces back to the spec.
60
-
61
- Load **[review-traceability.md](review-traceability.md)** and follow its instructions as written.
62
-
63
- ---
64
-
65
- ## Plan Integrity Review
66
-
67
- Review the plan as a standalone document for structural quality, implementation readiness, and adherence to planning standards.
68
-
69
- Load **[review-integrity.md](review-integrity.md)** and follow its instructions as written.
70
-
71
- ---
72
-
73
- ## Completion
74
-
75
- After both reviews:
76
-
77
- 1. **Verify tracking files are deleted** — Both traceability and integrity tracking files must be gone
78
-
79
- 2. **Final quality confirmation**:
80
- - All specification content has plan coverage (Traceability)
81
- - No hallucinated content remains (Traceability)
82
- - All tasks follow the required template (Integrity)
83
- - Dependencies are documented and ordered (Integrity)
84
- - External dependencies match specification (Integrity)
85
-
86
- 3. **Confirm with the user**:
87
-
88
- "The plan has passed both reviews:
89
- - **Traceability**: All specification content is covered; no hallucinated content
90
- - **Integrity**: Plan structure, tasks, and dependencies are implementation-ready
91
-
92
- Review is complete."
93
-
94
- > **CHECKPOINT**: Do not confirm completion if tracking files still exist. They indicate incomplete review work.