@leeovery/claude-technical-workflows 2.1.40 → 2.1.42

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 (111) hide show
  1. package/README.md +6 -21
  2. package/agents/implementation-analysis-architecture.md +2 -2
  3. package/agents/implementation-analysis-duplication.md +2 -2
  4. package/agents/implementation-analysis-standards.md +2 -2
  5. package/agents/implementation-analysis-synthesizer.md +3 -3
  6. package/agents/implementation-analysis-task-writer.md +1 -1
  7. package/agents/implementation-task-executor.md +3 -0
  8. package/agents/planning-phase-designer.md +8 -6
  9. package/agents/planning-task-designer.md +8 -6
  10. package/agents/review-findings-synthesizer.md +2 -2
  11. package/agents/review-task-verifier.md +1 -1
  12. package/hooks/workflows/compact-recovery.sh +1 -1
  13. package/hooks/workflows/session-cleanup.sh +1 -1
  14. package/hooks/workflows/write-session-state.sh +1 -1
  15. package/package.json +1 -1
  16. package/skills/begin-implementation/SKILL.md +5 -5
  17. package/skills/begin-planning/SKILL.md +2 -1
  18. package/skills/begin-review/SKILL.md +1 -1
  19. package/skills/continue-feature/references/detect-phase.md +5 -5
  20. package/skills/continue-feature/references/invoke-implementation.md +2 -2
  21. package/skills/continue-feature/references/invoke-planning.md +2 -2
  22. package/skills/continue-feature/references/invoke-review.md +2 -2
  23. package/skills/continue-feature/references/invoke-specification.md +3 -3
  24. package/skills/continue-feature/scripts/discovery.sh +5 -5
  25. package/skills/link-dependencies/SKILL.md +5 -5
  26. package/skills/migrate/SKILL.md +1 -1
  27. package/skills/migrate/scripts/migrate.sh +56 -25
  28. package/skills/migrate/scripts/migrations/011-rename-workflow-directory.sh +73 -0
  29. package/skills/migrate/scripts/migrations/012-environment-setup-to-state.sh +23 -0
  30. package/skills/start-discussion/SKILL.md +2 -2
  31. package/skills/start-discussion/references/gather-context-research.md +1 -1
  32. package/skills/start-discussion/references/handle-selection.md +1 -1
  33. package/skills/start-discussion/references/invoke-skill.md +3 -3
  34. package/skills/start-discussion/references/research-analysis.md +3 -3
  35. package/skills/start-discussion/scripts/discovery.sh +3 -3
  36. package/skills/start-feature/SKILL.md +5 -5
  37. package/skills/start-feature/references/phase-bridge.md +1 -1
  38. package/skills/start-implementation/SKILL.md +6 -6
  39. package/skills/start-implementation/scripts/discovery.sh +4 -4
  40. package/skills/start-planning/SKILL.md +5 -3
  41. package/skills/start-planning/references/display-state.md +31 -1
  42. package/skills/start-planning/references/invoke-skill.md +3 -3
  43. package/skills/start-planning/scripts/discovery.sh +32 -3
  44. package/skills/start-research/SKILL.md +1 -1
  45. package/skills/start-research/references/invoke-skill.md +1 -1
  46. package/skills/start-review/SKILL.md +1 -1
  47. package/skills/start-review/references/invoke-skill.md +4 -4
  48. package/skills/start-review/scripts/discovery.sh +5 -5
  49. package/skills/start-specification/SKILL.md +1 -1
  50. package/skills/start-specification/references/analysis-flow.md +2 -2
  51. package/skills/start-specification/references/confirm-continue.md +3 -3
  52. package/skills/start-specification/references/confirm-create.md +2 -2
  53. package/skills/start-specification/references/confirm-refine.md +1 -1
  54. package/skills/start-specification/references/confirm-unify.md +2 -2
  55. package/skills/start-specification/references/display-analyze.md +1 -1
  56. package/skills/start-specification/references/display-groupings.md +3 -3
  57. package/skills/start-specification/references/display-specs-menu.md +1 -1
  58. package/skills/start-specification/references/handoffs/continue-concluded.md +4 -4
  59. package/skills/start-specification/references/handoffs/continue.md +4 -4
  60. package/skills/start-specification/references/handoffs/create-with-incorporation.md +5 -5
  61. package/skills/start-specification/references/handoffs/create.md +4 -4
  62. package/skills/start-specification/references/handoffs/unify-with-incorporation.md +6 -6
  63. package/skills/start-specification/references/handoffs/unify.md +4 -4
  64. package/skills/start-specification/scripts/discovery.sh +3 -3
  65. package/skills/status/SKILL.md +1 -1
  66. package/skills/status/scripts/discovery.sh +5 -5
  67. package/skills/technical-discussion/SKILL.md +3 -3
  68. package/skills/technical-discussion/references/template.md +2 -2
  69. package/skills/technical-implementation/SKILL.md +11 -10
  70. package/skills/technical-implementation/references/analysis-loop.md +45 -9
  71. package/skills/technical-implementation/references/environment-setup.md +3 -3
  72. package/skills/technical-implementation/references/invoke-task-writer.md +1 -1
  73. package/skills/technical-implementation/references/task-loop.md +1 -1
  74. package/skills/technical-planning/SKILL.md +8 -7
  75. package/skills/technical-planning/references/analyze-task-graph.md +1 -1
  76. package/skills/technical-planning/references/author-tasks.md +5 -5
  77. package/skills/technical-planning/references/define-phases.md +5 -2
  78. package/skills/technical-planning/references/define-tasks.md +6 -3
  79. package/skills/technical-planning/references/invoke-review-integrity.md +1 -1
  80. package/skills/technical-planning/references/invoke-review-traceability.md +1 -1
  81. package/skills/technical-planning/references/output-formats/local-markdown/about.md +2 -2
  82. package/skills/technical-planning/references/output-formats/local-markdown/authoring.md +2 -2
  83. package/skills/technical-planning/references/output-formats/local-markdown/reading.md +3 -3
  84. package/skills/technical-planning/references/output-formats/local-markdown/updating.md +1 -1
  85. package/skills/technical-planning/references/output-formats/tick/authoring.md +3 -15
  86. package/skills/technical-planning/references/phase-design/bugfix.md +75 -0
  87. package/skills/technical-planning/references/phase-design/feature.md +77 -0
  88. package/skills/technical-planning/references/phase-design/greenfield.md +75 -0
  89. package/skills/technical-planning/references/phase-design.md +7 -57
  90. package/skills/technical-planning/references/plan-index-schema.md +3 -1
  91. package/skills/technical-planning/references/review-integrity.md +1 -1
  92. package/skills/technical-planning/references/review-traceability.md +1 -1
  93. package/skills/technical-planning/references/task-design/bugfix.md +65 -0
  94. package/skills/technical-planning/references/task-design/feature.md +61 -0
  95. package/skills/technical-planning/references/task-design/greenfield.md +47 -0
  96. package/skills/technical-planning/references/task-design.md +6 -39
  97. package/skills/technical-planning/references/verify-source-material.md +2 -2
  98. package/skills/technical-research/SKILL.md +2 -2
  99. package/skills/technical-research/references/interview.md +2 -2
  100. package/skills/technical-review/SKILL.md +1 -1
  101. package/skills/technical-review/references/invoke-review-synthesizer.md +3 -3
  102. package/skills/technical-review/references/invoke-review-task-writer.md +2 -2
  103. package/skills/technical-review/references/invoke-task-verifiers.md +3 -3
  104. package/skills/technical-review/references/produce-review.md +1 -1
  105. package/skills/technical-review/references/review-actions-loop.md +7 -5
  106. package/skills/technical-specification/SKILL.md +5 -5
  107. package/skills/technical-specification/references/dependencies.md +2 -2
  108. package/skills/technical-specification/references/review-tracking-format.md +1 -1
  109. package/skills/technical-specification/references/specification-format.md +1 -1
  110. package/skills/technical-specification/references/verify-source-material.md +2 -2
  111. package/skills/view-plan/SKILL.md +2 -2
@@ -0,0 +1,75 @@
1
+ # Greenfield Phase Design
2
+
3
+ *Context guidance for **[phase-design.md](../phase-design.md)** — new system builds*
4
+
5
+ ---
6
+
7
+ ## The Walking Skeleton
8
+
9
+ Phase 1 is always a **walking skeleton** — the thinnest possible end-to-end slice that threads through all system layers and proves the architecture works.
10
+
11
+ The walking skeleton:
12
+
13
+ - Touches every architectural component the system needs (database, API, UI, external services)
14
+ - Delivers one complete flow, however minimal
15
+ - Establishes the patterns subsequent phases will follow
16
+ - Is production code, not throwaway — it becomes the foundation
17
+
18
+ **Example** (Slack clone):
19
+
20
+ > Phase 1: "Any unauthenticated person can post messages in a hardcoded #general room. Messages persist through page refreshes."
21
+ >
22
+ > No auth, no accounts, no multiple rooms. Just the thinnest thread through the entire stack.
23
+
24
+ **Example** (Calendar app):
25
+
26
+ > Phase 1: "A single event can be created with title, start, and end time, persisted, and retrieved by ID."
27
+ >
28
+ > No recurrence, no sharing, no notifications. Just one thing working end-to-end.
29
+
30
+ The skeleton validates architecture assumptions at the cheapest possible moment. If the end-to-end flow doesn't work, you discover it in Phase 1 — not after building three phases of isolated components.
31
+
32
+ This is the **steel thread** principle: never have big-bang integration. By threading through all layers immediately, integration is the first thing you solve, not the last.
33
+
34
+ ---
35
+
36
+ ## Greenfield Vertical Phases
37
+
38
+ After the walking skeleton, each subsequent phase adds complete functionality — a vertical slice through the relevant layers.
39
+
40
+ ```
41
+ Phase 1: Walking skeleton — single event CRUD, end-to-end
42
+ Phase 2: Recurring events — rules, instance generation, single-instance editing
43
+ Phase 3: Sharing and permissions — invite users, permission levels, shared calendars
44
+ Phase 4: Notifications — email and push notifications for event changes
45
+ ```
46
+
47
+ Each phase delivers something a user or test suite can validate independently.
48
+
49
+ ### Progression
50
+
51
+ **Skeleton → Core features → Edge cases → Refinement**
52
+
53
+ - **Skeleton** (Phase 1): Thinnest end-to-end slice proving the architecture
54
+ - **Core features**: Each phase adds a complete capability, building on what exists
55
+ - **Edge cases**: Handling boundary conditions, error scenarios, unusual inputs
56
+ - **Refinement**: Performance optimisation, UX polish, hardening
57
+
58
+ This ordering means each phase builds on a working system. The skeleton establishes the pattern; core features flesh it out; edge cases harden it; refinement polishes it.
59
+
60
+ ---
61
+
62
+ ## Cross-Phase Coupling (Greenfield)
63
+
64
+ - **Walking skeleton first** — subsequent phases add to a working system rather than depending on future phases
65
+ - **Shared infrastructure in Phase 1** — if multiple phases need the same foundation, it belongs in the skeleton
66
+
67
+ ---
68
+
69
+ ## Phase 2+ Considerations
70
+
71
+ After Phase 1 is implemented, code exists. When designing subsequent phases:
72
+
73
+ - **Review what Phase 1 established** — understand the patterns, conventions, and architectural decisions that were made. Subsequent phases should build on these consistently.
74
+ - **Extend, don't reinvent** — Phase 2+ should use the infrastructure Phase 1 created. If something is missing, add it — don't create parallel structures.
75
+ - **Watch for drift** — if early decisions could be improved, note them but maintain consistency unless the specification calls for restructuring.
@@ -4,7 +4,9 @@
4
4
 
5
5
  ---
6
6
 
7
- This reference defines the principles for breaking specifications into implementation phases. It is loaded when phases are first proposed and stays in context through phase approval.
7
+ This reference defines generic principles for breaking specifications into implementation phases.
8
+
9
+ A work-type context file (greenfield, feature, or bugfix) is always loaded alongside this file. The context file provides the Phase 1 strategy, progression model, examples, and work-type-specific guidance. These generic principles apply across all work types.
8
10
 
9
11
  ## What Makes a Good Phase
10
12
 
@@ -18,49 +20,9 @@ Each phase should:
18
20
 
19
21
  ---
20
22
 
21
- ## The Walking Skeleton
22
-
23
- Phase 1 is always a **walking skeleton** — the thinnest possible end-to-end slice that threads through all system layers and proves the architecture works.
24
-
25
- The walking skeleton:
26
-
27
- - Touches every architectural component the system needs (database, API, UI, external services)
28
- - Delivers one complete flow, however minimal
29
- - Establishes the patterns subsequent phases will follow
30
- - Is production code, not throwaway — it becomes the foundation
31
-
32
- **Example** (Slack clone):
33
-
34
- > Phase 1: "Any unauthenticated person can post messages in a hardcoded #general room. Messages persist through page refreshes."
35
- >
36
- > No auth, no accounts, no multiple rooms. Just the thinnest thread through the entire stack.
37
-
38
- **Example** (Calendar app):
39
-
40
- > Phase 1: "A single event can be created with title, start, and end time, persisted, and retrieved by ID."
41
- >
42
- > No recurrence, no sharing, no notifications. Just one thing working end-to-end.
43
-
44
- The skeleton validates architecture assumptions at the cheapest possible moment. If the end-to-end flow doesn't work, you discover it in Phase 1 — not after building three phases of isolated components.
45
-
46
- This is the **steel thread** principle: never have big-bang integration. By threading through all layers immediately, integration is the first thing you solve, not the last.
47
-
48
- ---
49
-
50
23
  ## Vertical Phases
51
24
 
52
- After the walking skeleton, each subsequent phase adds complete functionality — a vertical slice through the relevant layers.
53
-
54
- **Vertical (prefer):**
55
-
56
- ```
57
- Phase 1: Walking skeleton — single event CRUD, end-to-end
58
- Phase 2: Recurring events — rules, instance generation, single-instance editing
59
- Phase 3: Sharing and permissions — invite users, permission levels, shared calendars
60
- Phase 4: Notifications — email and push notifications for event changes
61
- ```
62
-
63
- Each phase delivers something a user or test suite can validate independently.
25
+ Each phase adds complete functionality — a vertical slice through the relevant layers.
64
26
 
65
27
  **Horizontal (avoid):**
66
28
 
@@ -76,17 +38,6 @@ Nothing works until Phase 5. No phase is independently testable. Integration ris
76
38
 
77
39
  A phase may touch multiple architectural layers — that's expected. The test is: **does this phase deliver working functionality, or does it deliver infrastructure that only becomes useful later?**
78
40
 
79
- ### Progression
80
-
81
- **Skeleton → Core features → Edge cases → Refinement**
82
-
83
- - **Skeleton** (Phase 1): Thinnest end-to-end slice proving the architecture
84
- - **Core features**: Each phase adds a complete capability, building on what exists
85
- - **Edge cases**: Handling boundary conditions, error scenarios, unusual inputs
86
- - **Refinement**: Performance optimisation, UX polish, hardening
87
-
88
- This ordering means each phase builds on a working system. The skeleton establishes the pattern; core features flesh it out; edge cases harden it; refinement polishes it.
89
-
90
41
  ---
91
42
 
92
43
  ## Phase Boundaries
@@ -122,20 +73,19 @@ If a phase has only 1-2 trivial tasks, it's probably too thin — merge it. If a
122
73
 
123
74
  **Maximize cohesion within a phase, minimize dependencies between phases.**
124
75
 
125
- A well-bounded phase could theoretically be reordered or dropped without cascading failures across other phases. In practice, phases have a natural sequence (the skeleton must come first), but each phase should be as self-contained as possible.
76
+ A well-bounded phase could theoretically be reordered or dropped without cascading failures across other phases. In practice, phases have a natural sequence, but each phase should be as self-contained as possible.
126
77
 
127
78
  Strategies:
128
79
 
129
- - **Walking skeleton first** — subsequent phases add to a working system rather than depending on future phases
80
+ - **Strongest foundation first** — subsequent phases add to a working system rather than depending on future phases
130
81
  - **Clear interfaces between phases** — each phase produces defined contracts (API shapes, data models, test suites) that subsequent phases consume
131
- - **Shared infrastructure in Phase 1** — if multiple phases need the same foundation, it belongs in the skeleton
132
82
  - **No forward references** — a phase should never depend on something that hasn't been built yet
133
83
 
134
84
  ---
135
85
 
136
86
  ## Anti-Patterns
137
87
 
138
- **Horizontal phases** — organising by technical layer ("all models, then all services, then all controllers"). Defers integration risk, produces phases that aren't independently valuable. The walking skeleton eliminates this by integrating from the start.
88
+ **Horizontal phases** — organising by technical layer ("all models, then all services, then all controllers"). Defers integration risk, produces phases that aren't independently valuable. Vertical slicing eliminates this by integrating from the start.
139
89
 
140
90
  **God phase** — one massive phase covering too many concerns. Results in unclear success criteria, inability to track progress, and cognitive overload. If you can't summarise a phase's goal in one sentence, it needs splitting.
141
91
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ---
6
6
 
7
- This file defines the canonical structure for Plan Index Files (`docs/workflow/planning/{topic}/plan.md`). All agents and references that create or update plan index content **must** follow these templates.
7
+ This file defines the canonical structure for Plan Index Files (`.workflows/planning/{topic}/plan.md`). All agents and references that create or update plan index content **must** follow these templates.
8
8
 
9
9
  ---
10
10
 
@@ -15,6 +15,7 @@ This file defines the canonical structure for Plan Index Files (`docs/workflow/p
15
15
  topic: {topic-name}
16
16
  status: {status}
17
17
  format: {chosen-format}
18
+ work_type:
18
19
  ext_id:
19
20
  specification: ../specification/{topic}/specification.md
20
21
  cross_cutting_specs:
@@ -37,6 +38,7 @@ planning:
37
38
  | `topic` | Plan creation (Step 1) |
38
39
  | `status` | Plan creation → `planning`; conclusion → `concluded` |
39
40
  | `format` | Plan creation — user-chosen output format |
41
+ | `work_type` | Plan creation — set by caller if known. Values: `greenfield`, `feature`, `bugfix`. Defaults to `greenfield` when empty. |
40
42
  | `ext_id` | First task authored — external identifier for the plan |
41
43
  | `specification` | Plan creation — relative path to source specification |
42
44
  | `cross_cutting_specs` | Plan creation — relative paths to cross-cutting specs (omit key if none) |
@@ -75,7 +75,7 @@ Read the plan end-to-end — carefully, as if you were about to implement it. Fo
75
75
 
76
76
  ## Tracking File
77
77
 
78
- After completing the analysis, create a tracking file at `docs/workflow/planning/{topic}/review-integrity-tracking-c{N}.md` (where N is the current review cycle).
78
+ After completing the analysis, create a tracking file at `.workflows/planning/{topic}/review-integrity-tracking-c{N}.md` (where N is the current review cycle).
79
79
 
80
80
  Categorize each finding by severity:
81
81
 
@@ -59,7 +59,7 @@ Is everything in the plan actually from the specification? This is the anti-hall
59
59
 
60
60
  ## Tracking File
61
61
 
62
- After completing the analysis, create a tracking file at `docs/workflow/planning/{topic}/review-traceability-tracking-c{N}.md` (where N is the current review cycle).
62
+ After completing the analysis, create a tracking file at `.workflows/planning/{topic}/review-traceability-tracking-c{N}.md` (where N is the current review cycle).
63
63
 
64
64
  Tracking files are **never deleted**. After all findings are processed, the orchestrator marks `status: complete`. Previous cycles' files persist as review history.
65
65
 
@@ -0,0 +1,65 @@
1
+ # Bugfix Task Design
2
+
3
+ *Context guidance for **[task-design.md](../task-design.md)** — bug fixes*
4
+
5
+ ---
6
+
7
+ ## Root-Cause-First Ordering
8
+
9
+ In bugfix work, the first task always reproduces the bug with a failing test, then fixes it. Foundation = the reproduction test and the minimal fix.
10
+
11
+ **Example** ordering within a phase:
12
+
13
+ ```
14
+ Task 1: Failing test for the N+1 query + add eager loading (reproduce + fix)
15
+ Task 2: Verify performance with large dataset (validation)
16
+ Task 3: Regression tests for related query paths (prevention)
17
+ ```
18
+
19
+ The first task proves the bug exists and fixes it. Subsequent tasks harden the fix.
20
+
21
+ ---
22
+
23
+ ## Bugfix Vertical Slicing
24
+
25
+ Each task changes the minimum code needed. A bugfix task is well-scoped when you can describe both the before (broken) and after (fixed) states in one sentence.
26
+
27
+ **Example** (Single root cause):
28
+
29
+ ```
30
+ Task 1: Add failing test demonstrating the race condition + add lock (fix)
31
+ Task 2: Handle lock timeout and retry (error handling)
32
+ Task 3: Concurrent access regression tests (prevention)
33
+ ```
34
+
35
+ **Example** (Multiple related issues):
36
+
37
+ ```
38
+ Task 1: Fix primary null pointer with guard clause + test (core fix)
39
+ Task 2: Fix secondary data truncation at boundary + test (related fix)
40
+ Task 3: Add integration test covering the full workflow (regression)
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Minimal Change Focus
46
+
47
+ Each task changes the minimum code needed:
48
+
49
+ - Don't refactor adjacent code
50
+ - Don't add features while fixing bugs
51
+ - Keep the diff small and reviewable
52
+ - If a task starts growing beyond the fix, it's probably two tasks
53
+
54
+ ---
55
+
56
+ ## Codebase Analysis During Task Design
57
+
58
+ Tasks must be designed with knowledge of the affected code:
59
+
60
+ - **Understand the bug's context** — what code is involved? What tests exist? What are the inputs, outputs, and side effects of the affected code?
61
+ - **Design tasks around existing structure** — bug fixes should work within the existing architecture. Don't design tasks that require restructuring unless the specification explicitly calls for it.
62
+ - **Keep scope surgical** — bugfix tasks should touch as few files as possible. If a task needs to touch many files, question whether the fix is truly minimal.
63
+ - **Leverage existing tests** — if relevant tests exist, tasks can extend them. If not, the reproduction test becomes the foundation.
64
+
65
+ This analysis happens during task design — it informs what needs to change without being documented separately.
@@ -0,0 +1,61 @@
1
+ # Feature Task Design
2
+
3
+ *Context guidance for **[task-design.md](../task-design.md)** — feature additions to existing systems*
4
+
5
+ ---
6
+
7
+ ## Integration-Aware Ordering
8
+
9
+ In feature work, the existing codebase provides the foundation. "Foundation" means whatever the existing codebase doesn't provide yet — new model fields, new routes, service extensions — that other tasks in this phase need.
10
+
11
+ Extend existing code first, then build new behaviour on top.
12
+
13
+ **Example** ordering within a phase:
14
+
15
+ ```
16
+ Task 1: Add OAuth fields to User model + migration (extends existing model)
17
+ Task 2: OAuth callback endpoint + token exchange (new route, uses existing auth middleware)
18
+ Task 3: Session creation from OAuth token (extends existing session logic)
19
+ Task 4: Handle provider errors and token validation failures (error handling)
20
+ ```
21
+
22
+ The first task extends what exists. Later tasks build the new behaviour using both existing and newly-added code.
23
+
24
+ ---
25
+
26
+ ## Feature Vertical Slicing
27
+
28
+ Each task delivers a complete, testable increment that integrates with the existing system. Since infrastructure already exists, tasks can focus on behaviour rather than setup.
29
+
30
+ **Example** (Extending an existing system):
31
+
32
+ ```
33
+ Task 1: Add search index fields to Product model (extends existing)
34
+ Task 2: Search query endpoint returning products (new endpoint, existing model)
35
+ Task 3: Filter results by category and price range (extends search)
36
+ Task 4: Handle empty results and malformed queries (edge cases)
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Follow Existing Patterns
42
+
43
+ Task implementations should match established conventions in the codebase:
44
+
45
+ - Use the same testing patterns (if the project uses factory functions, use factories; if it uses fixtures, use fixtures)
46
+ - Follow the existing file organisation and naming conventions
47
+ - Use established service/repository/controller patterns rather than introducing new ones
48
+ - Match the existing error handling approach
49
+
50
+ ---
51
+
52
+ ## Codebase Analysis During Task Design
53
+
54
+ Tasks must be designed with knowledge of the existing code. Before finalizing task lists:
55
+
56
+ - **Identify similar implementations** — find existing code that does something similar. Tasks should reference this as the pattern to follow. "Follow the same approach as UserController" is more effective than abstract descriptions.
57
+ - **Map what needs to change** — which files, modules, or services does each task touch? Understanding this shapes task scope and ordering.
58
+ - **Prefer addition over modification** — when possible, design tasks that add new code (functions, modules, endpoints) and call it from existing code, rather than tasks that heavily modify existing code. This reduces risk and makes changes easier to review.
59
+ - **Keep tasks focused** — tasks touching existing code should ideally stay within one file or module. Multi-file tasks in existing codebases are significantly harder to get right.
60
+
61
+ This analysis happens during task design — it informs task scope and ordering without being documented separately.
@@ -0,0 +1,47 @@
1
+ # Greenfield Task Design
2
+
3
+ *Context guidance for **[task-design.md](../task-design.md)** — new system builds*
4
+
5
+ ---
6
+
7
+ ## Foundation-First Ordering
8
+
9
+ In greenfield projects, the first tasks establish the pattern that all subsequent tasks follow. Foundation means models, migrations, base configuration, and core abstractions that other tasks need to build on.
10
+
11
+ **Example** ordering within a phase:
12
+
13
+ ```
14
+ Task 1: Create Event model and migration (foundation)
15
+ Task 2: Create event via API endpoint (happy path)
16
+ Task 3: Validate event time ranges (error handling)
17
+ Task 4: Handle overlapping events (edge case)
18
+ ```
19
+
20
+ The first task builds what doesn't exist yet. Later tasks extend it.
21
+
22
+ ---
23
+
24
+ ## Greenfield Vertical Slicing
25
+
26
+ Each task delivers a complete, testable slice of new functionality. Since nothing exists yet, early tasks often establish both the data layer and the first behaviour in a single TDD cycle.
27
+
28
+ **Example** (Building new feature surfaces from scratch):
29
+
30
+ ```
31
+ Task 1: Room model + create room endpoint (establishes the pattern)
32
+ Task 2: Post message to room (builds on room, adds messaging)
33
+ Task 3: List messages with pagination (extends messaging)
34
+ Task 4: Handle empty room and deleted messages (edge cases)
35
+ ```
36
+
37
+ The first task is slightly larger because it establishes the foundation AND the first working behaviour. Subsequent tasks are narrower because the pattern exists.
38
+
39
+ ---
40
+
41
+ ## Phase 2+ Considerations
42
+
43
+ After Phase 1 completes, code exists. When designing tasks for subsequent phases:
44
+
45
+ - **Review what Phase 1 established** — understand the patterns, conventions, and structure that were created. Subsequent tasks should extend these consistently.
46
+ - **Check for drift** — if early implementation decisions could be improved, note them but don't redesign mid-project. Consistency matters more than perfection.
47
+ - **Build on what's there** — subsequent phases have infrastructure to work with. Tasks should use existing models, services, and patterns rather than creating parallel structures.
@@ -4,7 +4,9 @@
4
4
 
5
5
  ---
6
6
 
7
- This reference defines the principles for breaking phases into tasks and writing task detail. It is loaded when tasks are first proposed and stays in context through task detailing.
7
+ This reference defines generic principles for breaking phases into tasks and writing task detail.
8
+
9
+ A work-type context file (greenfield, feature, or bugfix) is always loaded alongside this file. The context file provides task ordering, slicing examples, and work-type-specific guidance. These generic principles apply across all work types.
8
10
 
9
11
  ## One Task = One TDD Cycle
10
12
 
@@ -30,46 +32,11 @@ Cross-cutting references are context, not scope. They shape how tasks are writte
30
32
 
31
33
  Prefer **vertical slices** that deliver complete, testable functionality over horizontal slices that separate by technical layer.
32
34
 
33
- **Horizontal (avoid)**:
34
-
35
- ```
36
- Task 1: Create all database models
37
- Task 2: Create all service classes
38
- Task 3: Wire up integrations
39
- Task 4: Add error handling
40
- ```
41
-
42
- Nothing works until Task 4. No task is independently verifiable.
43
-
44
- **Vertical (prefer)**:
45
-
46
- ```
47
- Task 1: Fetch and store events from provider (happy path)
48
- Task 2: Handle pagination for large result sets
49
- Task 3: Handle authentication token refresh
50
- Task 4: Handle rate limiting
51
- ```
52
-
53
- Each task delivers a complete slice of functionality that can be tested in isolation.
54
-
55
- Within a bounded feature, vertical slicing means each task completes a coherent unit of that feature's functionality — not that it must touch UI/API/database layers. The test is: *can this task be verified independently?*
35
+ The test: *can this task be verified independently?* If yes, it's a good vertical slice. If it only works once other tasks are complete, it's probably a horizontal slice.
56
36
 
57
37
  TDD naturally encourages vertical slicing — when you think "what test can I write?", you frame work as complete, verifiable behaviour rather than technical layers.
58
38
 
59
- ---
60
-
61
- ## Task Ordering
62
-
63
- Within a phase, order tasks by:
64
-
65
- 1. **Foundation / setup** — models, migrations, base configuration needed by other tasks
66
- 2. **Happy path** — the primary expected behaviour, end-to-end
67
- 3. **Error handling** — validation failures, API errors, permission checks
68
- 4. **Edge cases** — boundary conditions, unusual inputs, race conditions
69
-
70
- This ordering means the first tasks establish the pattern and the later tasks extend it. Each task builds on a working foundation rather than building in the dark.
71
-
72
- **Edge cases as separate tasks**: Keep the happy-path task focused. If a task's acceptance criteria start growing beyond 3-4 items, the edge cases probably deserve their own tasks. This keeps each TDD cycle tight and each task independently verifiable.
39
+ The context file provides examples of vertical slicing appropriate to the work type.
73
40
 
74
41
  ---
75
42
 
@@ -140,7 +107,7 @@ Every task should follow this structure:
140
107
  > Relevant details from specification: code examples, architectural decisions,
141
108
  > data models, or constraints that inform implementation.
142
109
 
143
- **Spec Reference**: `docs/workflow/specification/{topic}/specification.md` (if specification was provided)
110
+ **Spec Reference**: `.workflows/specification/{topic}/specification.md` (if specification was provided)
144
111
  ```
145
112
 
146
113
  ### Field Requirements
@@ -15,6 +15,6 @@ Verify that all source material exists and is accessible before entering agent-d
15
15
  ### Example
16
16
 
17
17
  ```bash
18
- ls docs/workflow/specification/{topic}/specification.md
19
- ls docs/workflow/specification/{cross-cutting-spec}/specification.md
18
+ ls .workflows/specification/{topic}/specification.md
19
+ ls .workflows/specification/{cross-cutting-spec}/specification.md
20
20
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: technical-research
3
- description: "Explore ideas, validate concepts, and research broadly across technical, business, and market domains. Use when: (1) User has a new idea to explore, (2) Need to research a topic deeply, (3) Validating feasibility - technical, business, or market, (4) Learning and exploration without necessarily building anything, (5) User says 'research this' or 'explore this idea', (6) Brain dumping early thoughts before formal discussion. Creates research documents in docs/workflow/research/ that may feed into discussion or specification."
3
+ description: "Explore ideas, validate concepts, and research broadly across technical, business, and market domains. Use when: (1) User has a new idea to explore, (2) Need to research a topic deeply, (3) Validating feasibility - technical, business, or market, (4) Learning and exploration without necessarily building anything, (5) User says 'research this' or 'explore this idea', (6) Brain dumping early thoughts before formal discussion. Creates research documents in .workflows/research/ that may feed into discussion or specification."
4
4
  user-invocable: false
5
5
  ---
6
6
 
@@ -151,7 +151,7 @@ Ask one question at a time. Wait for the answer. Document. Then ask the next.
151
151
 
152
152
  ## File Strategy
153
153
 
154
- **Output**: `docs/workflow/research/exploration.md`
154
+ **Output**: `.workflows/research/exploration.md`
155
155
 
156
156
  **Template**: Use `references/template.md` for document structure. All research documents use YAML frontmatter:
157
157
 
@@ -4,7 +4,7 @@ Focused questioning to probe ideas more deeply during research.
4
4
 
5
5
  ## Process
6
6
 
7
- 1. **Check existing context**: Read docs in `docs/workflow/research/` to understand what's already been explored.
7
+ 1. **Check existing context**: Read docs in `.workflows/research/` to understand what's already been explored.
8
8
 
9
9
  2. **Begin interviewing**: Use the AskUserQuestion tool to probe the idea. Focus on:
10
10
  - Non-obvious questions (not things already answered)
@@ -15,7 +15,7 @@ Focused questioning to probe ideas more deeply during research.
15
15
 
16
16
  3. **Go where it leads**: Follow tangents if they reveal something valuable. This isn't a checklist - it's a conversation.
17
17
 
18
- 4. **Document as you go**: Don't defer writing to the end. Capture insights in `docs/workflow/research/` using semantic filenames. Ask before documenting: "Shall I capture that?"
18
+ 4. **Document as you go**: Don't defer writing to the end. Capture insights in `.workflows/research/` using semantic filenames. Ask before documenting: "Shall I capture that?"
19
19
 
20
20
  5. **Commit frequently**: At natural breaks and before context refresh.
21
21
 
@@ -30,7 +30,7 @@ Either way: Verify plan tasks were implemented, tested adequately, and meet qual
30
30
 
31
31
  ```
32
32
  I need the implementation plan to review against. Could you point me to the
33
- plan file (e.g., docs/workflow/planning/{topic}/plan.md)?
33
+ plan file (e.g., .workflows/planning/{topic}/plan.md)?
34
34
  ```
35
35
 
36
36
  **STOP.** Wait for user response.
@@ -10,10 +10,10 @@ This step dispatches a `review-findings-synthesizer` agent to read review findin
10
10
 
11
11
  ## Determine Cycle Number
12
12
 
13
- Count existing `review-tasks-c*.md` files in `docs/workflow/implementation/{primary-topic}/` and add 1.
13
+ Count existing `review-tasks-c*.md` files in `.workflows/implementation/{primary-topic}/` and add 1.
14
14
 
15
15
  ```bash
16
- ls docs/workflow/implementation/{primary-topic}/review-tasks-c*.md 2>/dev/null | wc -l
16
+ ls .workflows/implementation/{primary-topic}/review-tasks-c*.md 2>/dev/null | wc -l
17
17
  ```
18
18
 
19
19
  ---
@@ -61,4 +61,4 @@ TASKS_PROPOSED: {N}
61
61
  SUMMARY: {1-2 sentences}
62
62
  ```
63
63
 
64
- The full report is at `docs/workflow/implementation/{primary-topic}/review-report-c{N}.md`. If tasks were proposed, the staging file is at `docs/workflow/implementation/{primary-topic}/review-tasks-c{N}.md`.
64
+ The full report is at `.workflows/implementation/{primary-topic}/review-report-c{N}.md`. If tasks were proposed, the staging file is at `.workflows/implementation/{primary-topic}/review-tasks-c{N}.md`.
@@ -10,7 +10,7 @@ This step invokes the task writer agent to create plan tasks from approved revie
10
10
 
11
11
  ## Determine Format
12
12
 
13
- Read the `format` field from the plan's frontmatter (`docs/workflow/planning/{topic}/plan.md`). This determines which output format adapters to pass to the agent.
13
+ Read the `format` field from the plan's frontmatter (`.workflows/planning/{topic}/plan.md`). This determines which output format adapters to pass to the agent.
14
14
 
15
15
  ---
16
16
 
@@ -21,7 +21,7 @@ Read the `format` field from the plan's frontmatter (`docs/workflow/planning/{to
21
21
  Pass via the orchestrator's prompt:
22
22
 
23
23
  1. **Topic name** — the implementation topic (scopes tasks to correct plan)
24
- 2. **Staging file path** — `docs/workflow/implementation/{topic}/review-tasks-c{cycle-number}.md`
24
+ 2. **Staging file path** — `.workflows/implementation/{topic}/review-tasks-c{cycle-number}.md`
25
25
  3. **Plan path** — the implementation plan path
26
26
  4. **Plan format reading adapter path** — `../../technical-planning/references/output-formats/{format}/reading.md`
27
27
  5. **Plan format authoring adapter path** — `../../technical-planning/references/output-formats/{format}/authoring.md`
@@ -35,7 +35,7 @@ From each plan in scope, list every task across all phases:
35
35
  Ensure the review output directory exists:
36
36
 
37
37
  ```bash
38
- mkdir -p docs/workflow/review/{topic}/r{N}
38
+ mkdir -p .workflows/review/{topic}/r{N}
39
39
  ```
40
40
 
41
41
  ---
@@ -78,7 +78,7 @@ FINDINGS_COUNT: {N blocking issues}
78
78
  SUMMARY: {1 sentence}
79
79
  ```
80
80
 
81
- Full findings are written to `docs/workflow/review/{topic}/r{N}/qa-task-{index}.md`.
81
+ Full findings are written to `.workflows/review/{topic}/r{N}/qa-task-{index}.md`.
82
82
 
83
83
  ---
84
84
 
@@ -86,7 +86,7 @@ Full findings are written to `docs/workflow/review/{topic}/r{N}/qa-task-{index}.
86
86
 
87
87
  Once all batches have completed:
88
88
 
89
- 1. Read all `docs/workflow/review/{topic}/r{N}/qa-task-*.md` files
89
+ 1. Read all `.workflows/review/{topic}/r{N}/qa-task-*.md` files
90
90
  2. Synthesize findings from file contents:
91
91
  - Collect all tasks with `STATUS: Incomplete` or `STATUS: Issues Found` as blocking issues
92
92
  - Collect all test issues (under/over-tested)
@@ -6,7 +6,7 @@
6
6
 
7
7
  Aggregate QA findings into a review document using the **[template.md](template.md)**.
8
8
 
9
- Write the review to `docs/workflow/review/{topic}/r{N}/review.md`. The review is always per-plan. The review number `r{N}` is passed in from the entry point.
9
+ Write the review to `.workflows/review/{topic}/r{N}/review.md`. The review is always per-plan. The review number `r{N}` is passed in from the entry point.
10
10
 
11
11
  **QA Verdict** (from Step 3):
12
12
  - **Approve** — All acceptance criteria met, no blocking issues
@@ -122,7 +122,7 @@ No actionable tasks synthesized.
122
122
 
123
123
  ## C. Approval Gate
124
124
 
125
- Read the staging file from `docs/workflow/implementation/{topic}/review-tasks-c{cycle-number}.md`.
125
+ Read the staging file from `.workflows/implementation/{topic}/review-tasks-c{cycle-number}.md`.
126
126
 
127
127
  Check `gate_mode` in the staging file frontmatter (`gated` or `auto`).
128
128
 
@@ -165,8 +165,10 @@ Sources: {sources}
165
165
 
166
166
  ```
167
167
  · · · · · · · · · · · ·
168
- - **`a`/`approve`** — Approve this task
169
- - **`auto`** — Approve this and all remaining tasks automatically
168
+ Approve this task?
169
+
170
+ - **`y`/`yes`** — Approve this task
171
+ - **`a`/`auto`** — Approve this and all remaining tasks automatically
170
172
  - **`s`/`skip`** — Skip this task
171
173
  - **Comment** — Revise based on feedback
172
174
  · · · · · · · · · · · ·
@@ -188,7 +190,7 @@ Task {current} of {total}: {title} — approved (auto).
188
190
 
189
191
  Process user input:
190
192
 
191
- #### If `approve`
193
+ #### If `yes`
192
194
 
193
195
  Update `status: approved` in the staging file.
194
196
 
@@ -252,7 +254,7 @@ review({topic}): add review remediation ({K} tasks)
252
254
 
253
255
  For each plan that received new tasks:
254
256
 
255
- 1. Read the implementation tracking file at `docs/workflow/implementation/{topic}/tracking.md`
257
+ 1. Read the implementation tracking file at `.workflows/implementation/{topic}/tracking.md`
256
258
  2. Update frontmatter:
257
259
  - `status: in-progress`
258
260
  - Remove `completed` field (if present)