@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
@@ -121,18 +121,26 @@ impl({topic}): analysis cycle {N} — synthesis
121
121
 
122
122
  ## E. Approval Gate
123
123
 
124
- Read the staging file from `docs/workflow/implementation/{topic}/analysis-tasks-c{cycle-number}.md`.
124
+ Read the staging file from `.workflows/implementation/{topic}/analysis-tasks-c{cycle-number}.md`.
125
+
126
+ Check `analysis_gate_mode` in the implementation tracking file (`gated` or `auto`).
125
127
 
126
128
  Present an overview:
127
129
 
128
- **Analysis cycle {N}: {K} proposed tasks**
130
+ > *Output the next fenced block as a code block:*
131
+
132
+ ```
133
+ Analysis cycle {N}: {K} proposed tasks
129
134
 
130
- 1. {title} ({severity})
131
- 2. {title} ({severity})
132
- ...
135
+ 1. {title} ({severity})
136
+ 2. {title} ({severity})
137
+ ```
133
138
 
134
139
  Then present each task with `status: pending` individually:
135
140
 
141
+ > *Output the next fenced block as markdown (not a code block):*
142
+
143
+ ```
136
144
  **Task {current}/{total}: {title}** ({severity})
137
145
  Sources: {sources}
138
146
 
@@ -148,12 +156,18 @@ Sources: {sources}
148
156
 
149
157
  **Tests**:
150
158
  {tests}
159
+ ```
160
+
161
+ #### If `analysis_gate_mode: gated`
151
162
 
152
163
  > *Output the next fenced block as markdown (not a code block):*
153
164
 
154
165
  ```
155
166
  · · · · · · · · · · · ·
156
- - **`a`/`approve`** — Approve this task
167
+ Approve this task?
168
+
169
+ - **`y`/`yes`** — Approve this task
170
+ - **`a`/`auto`** — Approve this and all remaining tasks automatically
157
171
  - **`s`/`skip`** — Skip this task
158
172
  - **Comment** — Revise based on feedback
159
173
  · · · · · · · · · · · ·
@@ -161,12 +175,34 @@ Sources: {sources}
161
175
 
162
176
  **STOP.** Wait for user input.
163
177
 
164
- #### If `approve`
178
+ #### If `analysis_gate_mode: auto`
179
+
180
+ Update `status: approved` in the staging file. Note that `analysis_gate_mode` should be updated to `auto` in the tracking file during the next commit.
181
+
182
+ > *Output the next fenced block as a code block:*
183
+
184
+ ```
185
+ Task {current} of {total}: {title} — approved (auto).
186
+ ```
187
+
188
+ → Continue to next task without stopping.
189
+
190
+ ---
191
+
192
+ Process user input:
193
+
194
+ #### If `yes`
165
195
 
166
196
  Update `status: approved` in the staging file.
167
197
 
168
198
  → Present the next pending task, or proceed to routing below if all tasks processed.
169
199
 
200
+ #### If `auto`
201
+
202
+ Update `status: approved` in the staging file. Note that `analysis_gate_mode` should be updated to `auto` in the tracking file during the next commit.
203
+
204
+ → Continue processing remaining tasks without stopping.
205
+
170
206
  #### If `skip`
171
207
 
172
208
  Update `status: skipped` in the staging file.
@@ -185,7 +221,7 @@ After all tasks processed:
185
221
 
186
222
  → If all tasks were skipped:
187
223
 
188
- Commit the staging file updates:
224
+ Commit the staging file updates (include tracking file if `analysis_gate_mode` was updated):
189
225
 
190
226
  ```
191
227
  impl({topic}): analysis cycle {N} — tasks skipped
@@ -201,7 +237,7 @@ Load **[invoke-task-writer.md](invoke-task-writer.md)** and follow its instructi
201
237
 
202
238
  **STOP.** Do not proceed until the task writer has returned.
203
239
 
204
- Commit all analysis and plan changes (staging file, plan tasks, Plan Index File):
240
+ Commit all analysis and plan changes (staging file, plan tasks, Plan Index File, and tracking file if `analysis_gate_mode` was updated):
205
241
 
206
242
  ```
207
243
  impl({topic}): add analysis phase {N} ({K} tasks)
@@ -17,7 +17,7 @@ Before starting implementation, ensure the environment is ready. This step runs
17
17
 
18
18
  ## Setup Document Location
19
19
 
20
- Look for: `docs/workflow/environment-setup.md`
20
+ Look for: `.workflows/environment-setup.md`
21
21
 
22
22
  This file contains natural language instructions for setting up the implementation environment. It's project-specific.
23
23
 
@@ -42,9 +42,9 @@ Ask the user:
42
42
 
43
43
  If they provide instructions, offer to save them:
44
44
 
45
- > "Would you like me to save these instructions to `docs/workflow/environment-setup.md` for future sessions?"
45
+ > "Would you like me to save these instructions to `.workflows/environment-setup.md` for future sessions?"
46
46
 
47
- If they say no setup is needed, create `docs/workflow/environment-setup.md` with "No special setup required." and commit. This prevents asking the same question in future sessions.
47
+ If they say no setup is needed, create `.workflows/environment-setup.md` with "No special setup required." and commit. This prevents asking the same question in future sessions.
48
48
 
49
49
  ## No Setup Required
50
50
 
@@ -15,7 +15,7 @@ This step invokes the task writer agent to create plan tasks from approved analy
15
15
  Pass via the orchestrator's prompt:
16
16
 
17
17
  1. **Topic name** — the implementation topic
18
- 2. **Staging file path** — `docs/workflow/implementation/{topic}/analysis-tasks-c{cycle-number}.md`
18
+ 2. **Staging file path** — `.workflows/implementation/{topic}/analysis-tasks-c{cycle-number}.md`
19
19
  3. **Plan path** — the implementation plan path
20
20
  4. **Plan format reading adapter path** — `../../technical-planning/references/output-formats/{format}/reading.md`
21
21
  5. **Plan format authoring adapter path** — `../../technical-planning/references/output-formats/{format}/authoring.md`
@@ -178,7 +178,7 @@ Check the `task_gate_mode` field in the implementation tracking file.
178
178
  - If the format's updating.md includes a **Phase / Parent Status** section, follow its phase completion instructions
179
179
  - Append the phase number to `completed_phases` in the tracking file
180
180
 
181
- **Mirror to implementation tracking file** (`docs/workflow/implementation/{topic}/tracking.md`):
181
+ **Mirror to implementation tracking file** (`.workflows/implementation/{topic}/tracking.md`):
182
182
  - Append the task ID to `completed_tasks`
183
183
  - Update `current_phase` if phase changed
184
184
  - Update `current_task` to the next task (or `~` if done)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: technical-planning
3
- description: "Transform specifications into actionable implementation plans with phases, tasks, and acceptance criteria. Use when: (1) User asks to create/write an implementation plan, (2) User asks to plan implementation from a specification, (3) Converting specifications from docs/workflow/specification/{topic}/specification.md into implementation plans, (4) User says 'plan this' or 'create a plan', (5) Need to structure how to build something with phases and concrete steps. Creates plans in docs/workflow/planning/{topic}/plan.md that can be executed via strict TDD."
3
+ description: "Transform specifications into actionable implementation plans with phases, tasks, and acceptance criteria. Use when: (1) User asks to create/write an implementation plan, (2) User asks to plan implementation from a specification, (3) Converting specifications from .workflows/specification/{topic}/specification.md into implementation plans, (4) User says 'plan this' or 'create a plan', (5) Need to structure how to build something with phases and concrete steps. Creates plans in .workflows/planning/{topic}/plan.md that can be executed via strict TDD."
4
4
  user-invocable: false
5
5
  ---
6
6
 
@@ -24,6 +24,7 @@ Either way: Transform specifications into actionable phases, tasks, and acceptan
24
24
  - **Topic name** (optional) - Will derive from specification if not provided
25
25
  - **Output format preference** (optional) - Will ask if not specified
26
26
  - **Recommended output format** (optional) - A format suggestion for consistency with existing plans
27
+ - **Work type** (optional) — `greenfield`, `feature`, or `bugfix`. Determines which context-specific guidance is loaded during phase and task design. Defaults to `greenfield` when not provided.
27
28
  - **Cross-cutting references** (optional) - Cross-cutting specifications that inform technical decisions in this plan
28
29
 
29
30
  **Before proceeding**, verify the required input is available and unambiguous. If anything is missing or unclear, **STOP** — do not proceed until resolved.
@@ -34,7 +35,7 @@ Either way: Transform specifications into actionable phases, tasks, and acceptan
34
35
 
35
36
  ```
36
37
  I need the specification content to plan from. Could you point me to the
37
- specification file (e.g., docs/workflow/specification/{topic}/specification.md),
38
+ specification file (e.g., .workflows/specification/{topic}/specification.md),
38
39
  or provide the content directly?
39
40
  ```
40
41
 
@@ -59,7 +60,7 @@ this, or is there a more complete version?
59
60
  Context refresh (compaction) summarizes the conversation, losing procedural detail. When you detect a context refresh has occurred — the conversation feels abruptly shorter, you lack memory of recent steps, or a summary precedes this message — follow this recovery protocol:
60
61
 
61
62
  1. **Re-read this skill file completely.** Do not rely on your summary of it. The full process, steps, and rules must be reloaded.
62
- 2. **Read all tracking and state files** for the current topic — plan index files, review tracking files, implementation tracking files, or any working documents this skill creates. These are your source of truth for progress. Check for scratch files at `docs/workflow/.cache/planning/{topic}/`. If a scratch file exists, you are mid-authoring for that phase — resume the approval loop in author-tasks.md.
63
+ 2. **Read all tracking and state files** for the current topic — plan index files, review tracking files, implementation tracking files, or any working documents this skill creates. These are your source of truth for progress. Check for scratch files at `.workflows/.cache/planning/{topic}/`. If a scratch file exists, you are mid-authoring for that phase — resume the approval loop in author-tasks.md.
63
64
  3. **Check git state.** Run `git status` and `git log --oneline -10` to see recent commits. Commit messages follow a conventional pattern that reveals what was completed.
64
65
  4. **Announce your position** to the user before continuing: what step you believe you're at, what's been completed, and what comes next. Wait for confirmation.
65
66
  5. **Check `task_list_gate_mode`, `author_gate_mode`, and `finding_gate_mode`** in the Plan Index File frontmatter — if `auto`, the user previously opted in during this session. Preserve these values.
@@ -72,7 +73,7 @@ Do not guess at progress or continue from memory. The files on disk and git hist
72
73
 
73
74
  This process constructs a plan from a specification. A plan consists of:
74
75
 
75
- - **Plan Index File** — `docs/workflow/planning/{topic}/plan.md`. Contains frontmatter (topic, format, status, progress), phases with acceptance criteria, and task tables tracking status. This is the single source of truth for planning progress.
76
+ - **Plan Index File** — `.workflows/planning/{topic}/plan.md`. Contains frontmatter (topic, format, status, progress), phases with acceptance criteria, and task tables tracking status. This is the single source of truth for planning progress.
76
77
  - **Authored Tasks** — Detailed task files written to the chosen **Output Format** (selected during planning). The output format determines where and how task detail is stored.
77
78
 
78
79
  Follow every step in sequence. No steps are optional.
@@ -85,7 +86,7 @@ When announcing a new step, output `── ── ── ── ──` on its o
85
86
 
86
87
  ## Step 0: Resume Detection
87
88
 
88
- Check if a Plan Index File already exists at `docs/workflow/planning/{topic}/plan.md`.
89
+ Check if a Plan Index File already exists at `.workflows/planning/{topic}/plan.md`.
89
90
 
90
91
  #### If no Plan Index File exists
91
92
 
@@ -126,7 +127,7 @@ Reset `task_list_gate_mode`, `author_gate_mode`, and `finding_gate_mode` to `gat
126
127
 
127
128
  1. Read **[output-formats.md](references/output-formats.md)**, find the entry matching the `format:` field in the Plan Index File, and load the format's **[authoring.md](references/output-formats/{format}/authoring.md)**
128
129
  2. Follow the authoring file's cleanup instructions to remove Authored Tasks for this topic
129
- 3. Delete the scratch directory if it exists: `rm -rf docs/workflow/.cache/planning/{topic}/`
130
+ 3. Delete the scratch directory if it exists: `rm -rf .workflows/.cache/planning/{topic}/`
130
131
  4. Delete the Plan Index File
131
132
  5. Commit: `planning({topic}): restart planning`
132
133
 
@@ -173,7 +174,7 @@ Once selected:
173
174
 
174
175
  1. Read **[output-formats.md](references/output-formats.md)**, find the chosen format entry, and load the format's **[about.md](references/output-formats/{format}/about.md)** and **[authoring.md](references/output-formats/{format}/authoring.md)**
175
176
  2. Capture the current git commit hash: `git rev-parse HEAD`
176
- 3. Create the Plan Index File at `docs/workflow/planning/{topic}/plan.md` using the **Frontmatter** and **Title** templates from **[plan-index-schema.md](references/plan-index-schema.md)**. Set `status: planning`, `spec_commit` to the captured git hash, and today's actual date for `created` and `updated`.
177
+ 3. Create the Plan Index File at `.workflows/planning/{topic}/plan.md` using the **Frontmatter** and **Title** templates from **[plan-index-schema.md](references/plan-index-schema.md)**. Set `status: planning`, `spec_commit` to the captured git hash, today's actual date for `created` and `updated`, and `work_type` to the value provided by the caller (or `greenfield` if not provided).
177
178
 
178
179
  3. Commit: `planning({topic}): initialize plan`
179
180
 
@@ -23,7 +23,7 @@ Read **[output-formats.md](output-formats.md)**, find the entry matching the `fo
23
23
 
24
24
  Invoke `planning-dependency-grapher` with these file paths:
25
25
 
26
- 1. **Plan Index File path**: `docs/workflow/planning/{topic}/plan.md`
26
+ 1. **Plan Index File path**: `.workflows/planning/{topic}/plan.md`
27
27
  2. **reading.md**: the format's reading reference loaded above
28
28
  3. **graph.md**: the format's graph reference loaded above
29
29
 
@@ -10,9 +10,9 @@ This step uses the `planning-task-author` agent (`../../../agents/planning-task-
10
10
 
11
11
  ## Section 1: Prepare the Scratch File
12
12
 
13
- Scratch file path: `docs/workflow/.cache/planning/{topic}/phase-{N}.md`
13
+ Scratch file path: `.workflows/.cache/planning/{topic}/phase-{N}.md`
14
14
 
15
- Create the `docs/workflow/.cache/planning/{topic}/` directory if it does not exist.
15
+ Create the `.workflows/.cache/planning/{topic}/` directory if it does not exist.
16
16
 
17
17
  ---
18
18
 
@@ -32,7 +32,7 @@ Invoke `planning-task-author` with these file paths:
32
32
  4. **task-design.md**: `task-design.md`
33
33
  5. **All approved phases**: the complete phase structure from the Plan Index File body
34
34
  6. **Task list for current phase**: the approved task table (ALL tasks in the phase)
35
- 7. **Scratch file path**: `docs/workflow/.cache/planning/{topic}/phase-{N}.md`
35
+ 7. **Scratch file path**: `.workflows/.cache/planning/{topic}/phase-{N}.md`
36
36
 
37
37
  The agent writes all tasks to the scratch file and returns.
38
38
 
@@ -183,8 +183,8 @@ Repeat for each task.
183
183
 
184
184
  ## Section 7: Cleanup
185
185
 
186
- Delete the scratch file: `rm docs/workflow/.cache/planning/{topic}/phase-{N}.md`
186
+ Delete the scratch file: `rm .workflows/.cache/planning/{topic}/phase-{N}.md`
187
187
 
188
- Remove the `docs/workflow/.cache/planning/{topic}/` directory if empty.
188
+ Remove the `.workflows/.cache/planning/{topic}/` directory if empty.
189
189
 
190
190
  → Return to **Plan Construction**.
@@ -34,14 +34,17 @@ independently testable stages.
34
34
 
35
35
  ### Invoke the Agent
36
36
 
37
+ Read `work_type` from the Plan Index File frontmatter.
38
+
37
39
  Invoke `planning-phase-designer` with these file paths:
38
40
 
39
41
  1. **read-specification.md**: `read-specification.md`
40
42
  2. **Specification**: path from the Plan Index File's `specification:` field
41
43
  3. **Cross-cutting specs**: paths from the Plan Index File's `cross_cutting_specs:` field (if any)
42
44
  4. **phase-design.md**: `phase-design.md`
43
- 5. **task-design.md**: `task-design.md`
44
- 6. **plan-index-schema.md**: `plan-index-schema.md`
45
+ 5. **Context guidance**: `phase-design/{work_type}.md` (default to `greenfield` if `work_type` is empty)
46
+ 6. **task-design.md**: `task-design.md`
47
+ 7. **plan-index-schema.md**: `plan-index-schema.md`
45
48
 
46
49
  The agent returns a complete phase structure. Write it directly to the Plan Index File body.
47
50
 
@@ -20,15 +20,18 @@ propose a task list.
20
20
 
21
21
  ### Invoke the Agent
22
22
 
23
+ Read `work_type` from the Plan Index File frontmatter.
24
+
23
25
  Invoke `planning-task-designer` with these file paths:
24
26
 
25
27
  1. **read-specification.md**: `read-specification.md`
26
28
  2. **Specification**: path from the Plan Index File's `specification:` field
27
29
  3. **Cross-cutting specs**: paths from the Plan Index File's `cross_cutting_specs:` field (if any)
28
30
  4. **task-design.md**: `task-design.md`
29
- 5. **All approved phases**: the complete phase structure from the Plan Index File body
30
- 6. **Target phase number**: the phase being broken into tasks
31
- 7. **plan-index-schema.md**: `plan-index-schema.md`
31
+ 5. **Context guidance**: `task-design/{work_type}.md` (default to `greenfield` if `work_type` is empty)
32
+ 6. **All approved phases**: the complete phase structure from the Plan Index File body
33
+ 7. **Target phase number**: the phase being broken into tasks
34
+ 8. **plan-index-schema.md**: `plan-index-schema.md`
32
35
 
33
36
  ### Present the Output
34
37
 
@@ -13,7 +13,7 @@ This step invokes the `planning-review-integrity` agent (`../../../agents/planni
13
13
  Invoke `planning-review-integrity` with:
14
14
 
15
15
  1. **Review criteria path**: `review-integrity.md` (in this directory)
16
- 2. **Plan path**: `docs/workflow/planning/{topic}/plan.md`
16
+ 2. **Plan path**: `.workflows/planning/{topic}/plan.md`
17
17
  3. **Format reading.md path**: load **[output-formats.md](output-formats.md)**, find the entry matching the plan's `format:` field, and pass the format's `reading.md` path
18
18
  4. **Cycle number**: current `review_cycle` from the Plan Index File frontmatter
19
19
  5. **Topic name**: from the plan's `topic` frontmatter field
@@ -14,7 +14,7 @@ Invoke `planning-review-traceability` with:
14
14
 
15
15
  1. **Review criteria path**: `review-traceability.md` (in this directory)
16
16
  2. **Specification path**: from the plan's `specification` frontmatter field (resolved relative to the plan directory)
17
- 3. **Plan path**: `docs/workflow/planning/{topic}/plan.md`
17
+ 3. **Plan path**: `.workflows/planning/{topic}/plan.md`
18
18
  4. **Format reading.md path**: load **[output-formats.md](output-formats.md)**, find the entry matching the plan's `format:` field, and pass the format's `reading.md` path
19
19
  5. **Cycle number**: current `review_cycle` from the Plan Index File frontmatter
20
20
  6. **Topic name**: from the plan's `topic` frontmatter field
@@ -21,7 +21,7 @@ No external tools required. This format uses plain markdown files stored in the
21
21
 
22
22
  | Concept | Local Markdown Entity |
23
23
  |---------|-----------------------|
24
- | Topic | Directory (`docs/workflow/planning/{topic}/`) |
24
+ | Topic | Directory (`.workflows/planning/{topic}/`) |
25
25
  | Phase | Encoded in task ID (`{topic}-{phase}-{seq}`) |
26
26
  | Task | Markdown file (`{task-id}.md`) |
27
27
  | Dependency | Task ID reference in frontmatter (no native blocking) |
@@ -31,7 +31,7 @@ No external tools required. This format uses plain markdown files stored in the
31
31
  Tasks are stored as individual markdown files in a `tasks/` subdirectory under the topic directory:
32
32
 
33
33
  ```
34
- docs/workflow/planning/{topic}/
34
+ .workflows/planning/{topic}/
35
35
  ├── plan.md # Plan Index File (not a task)
36
36
  └── tasks/ # Task files
37
37
  ├── {topic}-1-1.md # Phase 1, task 1
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Task Storage
4
4
 
5
- Each task is written to `docs/workflow/planning/{topic}/tasks/{task-id}.md` — a markdown file with frontmatter and a description body.
5
+ Each task is written to `.workflows/planning/{topic}/tasks/{task-id}.md` — a markdown file with frontmatter and a description body.
6
6
 
7
7
  ```markdown
8
8
  ---
@@ -60,5 +60,5 @@ In the task file, add a **Needs Clarification** section:
60
60
  Delete the tasks directory — preserves `plan.md` (the Plan Index) and any review tracking files:
61
61
 
62
62
  ```bash
63
- rm -rf docs/workflow/planning/{topic}/tasks/
63
+ rm -rf .workflows/planning/{topic}/tasks/
64
64
  ```
@@ -4,7 +4,7 @@
4
4
 
5
5
  To retrieve all tasks for a plan:
6
6
 
7
- 1. List all `.md` files in `docs/workflow/planning/{topic}/tasks/` — every file in this directory is a task file, no filtering needed
7
+ 1. List all `.md` files in `.workflows/planning/{topic}/tasks/` — every file in this directory is a task file, no filtering needed
8
8
  2. Read each file's frontmatter to extract: `id`, `phase`, `status`, `priority`, `depends_on`
9
9
  3. Read the first heading for the task title
10
10
 
@@ -12,7 +12,7 @@ This provides the summary-level data needed for graphing, progress overview, or
12
12
 
13
13
  ## Extracting a Task
14
14
 
15
- To read a specific task, read the file at `docs/workflow/planning/{topic}/tasks/{task-id}.md`.
15
+ To read a specific task, read the file at `.workflows/planning/{topic}/tasks/{task-id}.md`.
16
16
 
17
17
  The task file is self-contained — frontmatter holds id, phase, and status. The body contains the title and full description.
18
18
 
@@ -20,7 +20,7 @@ The task file is self-contained — frontmatter holds id, phase, and status. The
20
20
 
21
21
  To find the next task to implement:
22
22
 
23
- 1. List all `.md` files in `docs/workflow/planning/{topic}/tasks/`
23
+ 1. List all `.md` files in `.workflows/planning/{topic}/tasks/`
24
24
  2. Filter to tasks where `status` is `pending` or `in-progress` (or missing — treat as `pending`)
25
25
  3. If any tasks have `depends_on`, check each referenced task's `status` — exclude the task unless all dependencies have `status: completed`
26
26
  4. Order by phase number (from task ID: `{topic}-{phase}-{seq}`) — complete all earlier phases first
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Status Transitions
4
4
 
5
- Update the `status` field in the task file frontmatter at `docs/workflow/planning/{topic}/tasks/{task-id}.md`:
5
+ Update the `status` field in the task file frontmatter at `.workflows/planning/{topic}/tasks/{task-id}.md`:
6
6
 
7
7
  | Transition | Value |
8
8
  |------------|-------|
@@ -103,22 +103,10 @@ tick create "[NEEDS INFO] Rate limiting strategy" \
103
103
 
104
104
  ## Cleanup (Restart)
105
105
 
106
- Cancel the topic task and all its descendants. First, list the tasks to collect their IDs:
106
+ Remove the topic task and all its descendants:
107
107
 
108
108
  ```bash
109
- tick list --parent <topic-id>
109
+ tick remove <topic-id> --force
110
110
  ```
111
111
 
112
- Then cancel each task (leaf tasks first, then phases, then the topic):
113
-
114
- ```bash
115
- tick cancel <task-id>
116
- ```
117
-
118
- Cancelled tasks remain in the JSONL history but are excluded from `tick ready` and active listings.
119
-
120
- **Full reset** (removes all tasks across all topics):
121
-
122
- ```bash
123
- rm -rf .tick && tick init
124
- ```
112
+ Removing a parent cascades to all children (phases and tasks). Dependency references to removed tasks are auto-cleaned from surviving tasks.
@@ -0,0 +1,75 @@
1
+ # Bugfix Phase Design
2
+
3
+ *Context guidance for **[phase-design.md](../phase-design.md)** — bug fixes*
4
+
5
+ ---
6
+
7
+ ## Phase 1 Strategy
8
+
9
+ Reproduce the bug and implement the fix. Start with a failing test that demonstrates the bug, then fix it.
10
+
11
+ Phase 1 should:
12
+
13
+ - Include a test that reliably reproduces the bug (the test fails before the fix, passes after)
14
+ - Fix the root cause, not symptoms
15
+ - Verify that existing tests still pass (no regressions)
16
+ - Be as minimal as possible — change only what's necessary
17
+
18
+ ---
19
+
20
+ ## Single vs Multi-Phase Bugs
21
+
22
+ Most bugs are **single-phase**: reproduce → fix → regression tests. One phase is sufficient when the bug has a single root cause and the fix is contained.
23
+
24
+ Multiple phases are warranted when:
25
+
26
+ - **Multiple root causes** — the bug manifests in one place but originates in different subsystems that need independent fixes
27
+ - **Incremental refactoring required** — the fix requires restructuring code that can't be safely changed in one step
28
+ - **Large impact area** — the fix touches enough code that dedicated regression verification in a separate phase reduces risk
29
+
30
+ **Example** (Single-phase — N+1 query):
31
+
32
+ ```
33
+ Phase 1: Add eager loading to order query, verify performance, regression tests
34
+ ```
35
+
36
+ **Example** (Multi-phase — Race condition in payment processing):
37
+
38
+ ```
39
+ Phase 1: Add locking mechanism, fix the core race condition, verify with concurrent test
40
+ Phase 2: Add idempotency keys, handle edge cases (duplicate submissions, timeout recovery)
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Minimal Change Principle
46
+
47
+ Fix the root cause, don't redesign. The goal is surgical correction:
48
+
49
+ - Change the minimum code needed to resolve the issue
50
+ - Don't expand scope beyond what the specification defines
51
+ - Resist the temptation to "improve" surrounding code
52
+ - The fix should be easy to review — a reviewer should immediately see what changed and why
53
+
54
+ ---
55
+
56
+ ## Regression Prevention
57
+
58
+ Regression tests are first-class deliverables, not afterthoughts:
59
+
60
+ - Every fix includes tests that would have caught the original bug
61
+ - Tests verify the fix doesn't break existing behaviour
62
+ - Edge cases related to the bug get their own test cases
63
+ - If the bug was in a poorly-tested area, the fix improves coverage for that specific area (not a general testing campaign)
64
+
65
+ ---
66
+
67
+ ## Codebase Awareness
68
+
69
+ Before designing bugfix phases, understand the affected area:
70
+
71
+ - **Trace the bug's scope** — what code is involved? What calls into it, what does it call? Understanding the boundaries helps design a fix that doesn't cause side effects.
72
+ - **Check existing tests** — what coverage exists? This informs whether the fix needs new test infrastructure or can extend existing tests.
73
+ - **Understand before fixing** — a minimal fix requires knowing exactly what's broken and why. Don't design phases until the root cause is understood.
74
+
75
+ This is targeted analysis, not a general codebase review — focus on the code paths involved in the bug.
@@ -0,0 +1,77 @@
1
+ # Feature Phase Design
2
+
3
+ *Context guidance for **[phase-design.md](../phase-design.md)** — feature additions to existing systems*
4
+
5
+ ---
6
+
7
+ ## Phase 1 Strategy
8
+
9
+ Deliver the most fundamental new capability first. The existing codebase IS the foundation — no need to re-prove architecture. Integration with established patterns is the priority.
10
+
11
+ Phase 1 should:
12
+
13
+ - Add the core new behaviour that all subsequent phases build on
14
+ - Integrate naturally with existing code and conventions
15
+ - Verify both the new functionality AND that existing behaviour isn't broken
16
+ - Follow the project's established architectural patterns
17
+
18
+ ---
19
+
20
+ ## Feature Vertical Phases
21
+
22
+ Each phase adds a complete slice of the new feature, building on the existing system.
23
+
24
+ **Example** (Adding OAuth to existing Express API):
25
+
26
+ ```
27
+ Phase 1: Basic OAuth flow — provider registration, callback, token exchange, session creation
28
+ Phase 2: Permission scoping — granular permissions, role mapping, scope enforcement
29
+ Phase 3: Token lifecycle — refresh tokens, expiry handling, revocation
30
+ Phase 4: Edge cases — concurrent sessions, provider downtime, account linking
31
+ ```
32
+
33
+ **Example** (Adding search to existing e-commerce app):
34
+
35
+ ```
36
+ Phase 1: Basic keyword search — index products, query endpoint, display results
37
+ Phase 2: Filtering and facets — category filters, price ranges, attribute facets
38
+ Phase 3: Relevance tuning — boosting, synonyms, typo tolerance
39
+ ```
40
+
41
+ Each phase delivers functionality that users or tests can validate against the existing system.
42
+
43
+ ### Progression
44
+
45
+ **Core new functionality → Extended capability → Edge cases → Refinement**
46
+
47
+ - **Core new functionality** (Phase 1): The fundamental new behaviour, integrated with existing code
48
+ - **Extended capability**: Richer variations, additional options, deeper integration
49
+ - **Edge cases**: Boundary conditions, failure modes, interaction with existing features
50
+ - **Refinement**: Performance, UX polish, hardening
51
+
52
+ ---
53
+
54
+ ## Integration Considerations
55
+
56
+ - **Follow existing patterns** — if the codebase uses service classes, add service classes. If it uses middleware, add middleware. Don't introduce new architectural patterns unless the specification calls for it.
57
+ - **Tests verify both directions** — new functionality works AND existing behaviour isn't broken
58
+ - **Existing infrastructure is available** — don't rebuild what exists. Use established models, services, and utilities.
59
+
60
+ ---
61
+
62
+ ## Codebase Awareness
63
+
64
+ Before designing phases, understand what exists. You cannot plan feature work without knowing how the feature integrates with the codebase:
65
+
66
+ - **Analyze the relevant areas** — read the code the feature touches. Understand existing patterns, conventions, and structure in those areas.
67
+ - **Identify integration points** — where does this feature connect to existing code? What modules, services, or APIs will it use or extend?
68
+ - **Follow established patterns** — if similar features exist, note how they're structured. New phases should follow the same approach unless the specification explicitly calls for something different.
69
+ - **Understand before designing** — phase boundaries should respect existing architectural seams. Don't design phases that cut across established module boundaries without good reason.
70
+
71
+ This is not a full codebase audit — focus on the specific areas relevant to the feature.
72
+
73
+ ---
74
+
75
+ ## Scope Discipline
76
+
77
+ Implement what the specification defines. Don't refactor surrounding code, even if it could be "improved". If the existing code works and the specification doesn't call for changing it, leave it alone.