@leeovery/claude-technical-workflows 2.1.10 → 2.1.12
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.
- package/README.md +5 -22
- package/agents/implementation-analysis-architecture.md +80 -0
- package/agents/implementation-analysis-duplication.md +79 -0
- package/agents/implementation-analysis-standards.md +79 -0
- package/agents/implementation-analysis-synthesizer.md +104 -0
- package/agents/implementation-analysis-task-writer.md +48 -0
- package/agents/implementation-task-executor.md +4 -3
- package/package.json +1 -1
- package/skills/migrate/SKILL.md +2 -2
- package/skills/start-discussion/SKILL.md +9 -5
- package/skills/start-implementation/SKILL.md +9 -5
- package/skills/start-planning/SKILL.md +9 -5
- package/skills/start-review/SKILL.md +9 -5
- package/skills/start-specification/SKILL.md +9 -5
- package/skills/technical-discussion/SKILL.md +15 -8
- package/skills/technical-discussion/references/guidelines.md +8 -3
- package/skills/technical-discussion/references/meeting-assistant.md +6 -7
- package/skills/technical-implementation/SKILL.md +84 -107
- package/skills/technical-implementation/references/linter-setup.md +39 -0
- package/skills/technical-implementation/references/steps/analysis-loop.md +174 -0
- package/skills/technical-implementation/references/steps/invoke-analysis.md +53 -0
- package/skills/technical-implementation/references/steps/invoke-executor.md +3 -2
- package/skills/technical-implementation/references/steps/invoke-synthesizer.md +37 -0
- package/skills/technical-implementation/references/steps/invoke-task-writer.md +36 -0
- package/skills/technical-implementation/references/steps/task-loop.md +4 -6
- package/skills/technical-implementation/references/tdd-workflow.md +12 -1
- package/agents/implementation-polish.md +0 -183
- package/skills/technical-implementation/references/steps/invoke-polish.md +0 -50
|
@@ -6,7 +6,7 @@ user-invocable: false
|
|
|
6
6
|
|
|
7
7
|
# Technical Discussion
|
|
8
8
|
|
|
9
|
-
Act as **expert software architect** participating in discussions AND **documentation assistant** capturing them.
|
|
9
|
+
Act as **expert software architect** participating in discussions AND **documentation assistant** capturing them. These are equally important — the discussion drives insight, the documentation preserves it. Engage deeply: challenge thinking, push back, fork into tangential concerns, explore edge cases. Then capture what emerged.
|
|
10
10
|
|
|
11
11
|
## Purpose in the Workflow
|
|
12
12
|
|
|
@@ -77,16 +77,23 @@ Use **[template.md](references/template.md)** for structure:
|
|
|
77
77
|
|
|
78
78
|
See **[guidelines.md](references/guidelines.md)** for best practices and anti-hallucination techniques.
|
|
79
79
|
|
|
80
|
-
## Commit Frequently
|
|
80
|
+
## Write to Disk and Commit Frequently
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
The discussion file is your memory. Context compaction is lossy — what's not on disk is lost. Don't hold content in conversation waiting for a "complete" answer. Partial, provisional documentation is expected and valuable.
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
- When solutions to problems are identified
|
|
86
|
-
- When discussion branches/forks to new topics
|
|
87
|
-
- Before context refresh (prevents hallucination/memory loss)
|
|
84
|
+
**Write to the file at natural moments:**
|
|
88
85
|
|
|
89
|
-
|
|
86
|
+
- A micro-decision is reached (even if provisional)
|
|
87
|
+
- A piece of the puzzle is solved
|
|
88
|
+
- The discussion is about to branch or fork
|
|
89
|
+
- A question is answered or a new one uncovered
|
|
90
|
+
- Before context refresh
|
|
91
|
+
|
|
92
|
+
These are natural pauses, not every exchange. Document the reasoning and context — not a verbatim transcript.
|
|
93
|
+
|
|
94
|
+
**After writing, git commit.** Commits let you track, backtrack, and recover after compaction. Don't batch — commit each time you write.
|
|
95
|
+
|
|
96
|
+
**Create the file early.** After understanding the topic and initial questions, create the discussion file with frontmatter, context, and the questions list. Don't wait until you have answers.
|
|
90
97
|
|
|
91
98
|
## Quick Reference
|
|
92
99
|
|
|
@@ -55,14 +55,19 @@ Best practices for documenting discussions. For DOCUMENTATION only - no plans or
|
|
|
55
55
|
**False Paths**: What didn't work, why
|
|
56
56
|
**Impact**: Who benefits, what enabled
|
|
57
57
|
|
|
58
|
-
##
|
|
58
|
+
## Write to Disk as Discussing
|
|
59
|
+
|
|
60
|
+
At natural pauses — not every exchange, but when something meaningful has been concluded, explored, or uncovered — update the file on disk:
|
|
59
61
|
|
|
60
62
|
- Check off answered questions
|
|
61
63
|
- Add options as explored
|
|
62
|
-
- Document false paths
|
|
63
|
-
- Record decisions with rationale
|
|
64
|
+
- Document false paths when identified
|
|
65
|
+
- Record decisions (even provisional ones) with rationale
|
|
66
|
+
- Capture new questions as they emerge
|
|
64
67
|
- Keep "Current Thinking" updated
|
|
65
68
|
|
|
69
|
+
Then commit. The file is the source of truth, not the conversation.
|
|
70
|
+
|
|
66
71
|
## Common Pitfalls
|
|
67
72
|
|
|
68
73
|
**Jumping to implementation**: Discussion ends at decisions, not at "here's how to build it"
|
|
@@ -74,16 +74,15 @@ Who affected, problem solved, what enabled.
|
|
|
74
74
|
|
|
75
75
|
Example: "200 enterprise users + sales get performant experience. Enables Q1 renewals."
|
|
76
76
|
|
|
77
|
-
## Commit Often
|
|
77
|
+
## Write and Commit Often
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
The file on disk is the work product. Context compaction will destroy conversation detail — the file is your defense against that.
|
|
80
80
|
|
|
81
|
-
-
|
|
82
|
-
- When problems solved
|
|
83
|
-
- When discussion forks to new topics
|
|
84
|
-
- Before context refresh
|
|
81
|
+
**Write to the file at natural pauses** — when a micro-decision lands, a question is resolved (even provisionally), or the discussion is about to fork. Don't wait for finality. Partial documentation is expected.
|
|
85
82
|
|
|
86
|
-
**
|
|
83
|
+
**Then git commit.** Each write should be followed by a commit. This creates recovery points against context loss.
|
|
84
|
+
|
|
85
|
+
**Don't transcribe** — capture the reasoning, options, and outcome. Keep it contextual, not verbatim.
|
|
87
86
|
|
|
88
87
|
## Principles
|
|
89
88
|
|
|
@@ -49,7 +49,7 @@ Context refresh (compaction) summarizes the conversation, losing procedural deta
|
|
|
49
49
|
|
|
50
50
|
1. **Re-read this skill file completely.** Do not rely on your summary of it. The full process, steps, and rules must be reloaded.
|
|
51
51
|
2. **Check task progress in the plan** — use the plan adapter's instructions to read the plan's current state. Also read the implementation tracking file and any other working documents for additional context.
|
|
52
|
-
3. **Check `task_gate_mode`, `fix_gate_mode`, and `
|
|
52
|
+
3. **Check `task_gate_mode`, `fix_gate_mode`, `fix_attempts`, and `analysis_cycle`** in the tracking file — if gates are `auto`, the user previously opted out. If `fix_attempts` > 0, you're mid-fix-loop for the current task. If `analysis_cycle` > 0, you've completed analysis cycles — check for findings files on disk (`analysis-*.md` in `{topic}/`) to determine mid-analysis state.
|
|
53
53
|
4. **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.
|
|
54
54
|
5. **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.
|
|
55
55
|
|
|
@@ -105,78 +105,36 @@ Save their instructions to `docs/workflow/environment-setup.md` (or "No special
|
|
|
105
105
|
- **reading.md** — how to read tasks from the plan
|
|
106
106
|
- **updating.md** — how to write progress to the plan
|
|
107
107
|
4. If no `format` field exists, ask the user which format the plan uses.
|
|
108
|
-
5. These adapter files apply during Step
|
|
108
|
+
5. These adapter files apply during Step 6 (task loop) and Step 7 (analysis).
|
|
109
|
+
6. Also load the format's **authoring.md** adapter — needed in Step 7 if analysis tasks are created.
|
|
109
110
|
|
|
110
111
|
→ Proceed to **Step 3**.
|
|
111
112
|
|
|
112
113
|
---
|
|
113
114
|
|
|
114
|
-
## Step 3:
|
|
115
|
+
## Step 3: Initialize Implementation Tracking
|
|
115
116
|
|
|
116
|
-
#### If
|
|
117
|
+
#### If `docs/workflow/implementation/{topic}/tracking.md` already exists
|
|
117
118
|
|
|
118
|
-
|
|
119
|
-
No project skills found. Proceeding without project-specific conventions.
|
|
120
|
-
```
|
|
119
|
+
Reset `task_gate_mode` and `fix_gate_mode` to `gated`, `fix_attempts` to `0`, and `analysis_cycle` to `0` (fresh session = fresh gates/cycles).
|
|
121
120
|
|
|
122
121
|
→ Proceed to **Step 4**.
|
|
123
122
|
|
|
124
|
-
#### If project skills exist
|
|
125
|
-
|
|
126
|
-
Scan `.claude/skills/` for project-specific skill directories. Present findings:
|
|
127
|
-
|
|
128
|
-
> Found these project skills that may be relevant to implementation:
|
|
129
|
-
> - `{skill-name}` — {brief description}
|
|
130
|
-
> - `{skill-name}` — {brief description}
|
|
131
|
-
> - ...
|
|
132
|
-
>
|
|
133
|
-
> Which of these should I pass to the implementation agents? (all / list / none)
|
|
134
|
-
|
|
135
|
-
**STOP.** Wait for user to confirm which skills are relevant.
|
|
136
|
-
|
|
137
|
-
Store the selected skill paths — they will be persisted to the tracking file in Step 4.
|
|
138
|
-
|
|
139
|
-
→ Proceed to **Step 4**.
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Step 4: Initialize Implementation Tracking
|
|
144
|
-
|
|
145
|
-
#### If `docs/workflow/implementation/{topic}.md` already exists
|
|
146
|
-
|
|
147
|
-
Reset `task_gate_mode` and `fix_gate_mode` to `gated`, and `fix_attempts` to `0`, in the tracking file before proceeding (fresh session = fresh gates).
|
|
148
|
-
|
|
149
|
-
If `project_skills` is populated in the tracking file, present for confirmation:
|
|
150
|
-
|
|
151
|
-
> "Previous session used these project skills:
|
|
152
|
-
> - `{skill-name}` — {path}
|
|
153
|
-
> - ...
|
|
154
|
-
>
|
|
155
|
-
> · · ·
|
|
156
|
-
>
|
|
157
|
-
> - **`y`/`yes`** — Keep these, proceed
|
|
158
|
-
> - **`c`/`change`** — Add or remove skills"
|
|
159
|
-
|
|
160
|
-
**STOP.** Wait for user choice.
|
|
161
|
-
|
|
162
|
-
- **`y`/`yes`**: Proceed with the persisted paths.
|
|
163
|
-
- **`change`**: Re-run discovery (Step 3), update `project_skills` in the tracking file.
|
|
164
|
-
|
|
165
|
-
→ Proceed to **Step 5**.
|
|
166
|
-
|
|
167
123
|
#### If no tracking file exists
|
|
168
124
|
|
|
169
|
-
Create `docs/workflow/implementation/{topic}.md`:
|
|
125
|
+
Create `docs/workflow/implementation/{topic}/tracking.md`:
|
|
170
126
|
|
|
171
127
|
```yaml
|
|
172
128
|
---
|
|
173
129
|
topic: {topic}
|
|
174
|
-
plan:
|
|
130
|
+
plan: ../../planning/{topic}.md
|
|
175
131
|
format: {format from plan}
|
|
176
132
|
status: in-progress
|
|
177
133
|
task_gate_mode: gated
|
|
178
134
|
fix_gate_mode: gated
|
|
179
135
|
fix_attempts: 0
|
|
136
|
+
linters: []
|
|
137
|
+
analysis_cycle: 0
|
|
180
138
|
project_skills: []
|
|
181
139
|
current_phase: 1
|
|
182
140
|
current_task: ~
|
|
@@ -192,99 +150,114 @@ completed: ~
|
|
|
192
150
|
Implementation started.
|
|
193
151
|
```
|
|
194
152
|
|
|
195
|
-
After creating the file, populate `project_skills` with the paths confirmed in Step 3 (empty array if none).
|
|
196
|
-
|
|
197
153
|
Commit: `impl({topic}): start implementation`
|
|
198
154
|
|
|
199
|
-
→ Proceed to **Step
|
|
155
|
+
→ Proceed to **Step 4**.
|
|
200
156
|
|
|
201
157
|
---
|
|
202
158
|
|
|
203
|
-
## Step
|
|
159
|
+
## Step 4: Project Skills Discovery
|
|
204
160
|
|
|
205
|
-
|
|
161
|
+
#### If `project_skills` is populated in the tracking file
|
|
206
162
|
|
|
207
|
-
|
|
163
|
+
Present the existing configuration for confirmation:
|
|
208
164
|
|
|
209
|
-
|
|
165
|
+
> "Previous session used these project skills:
|
|
166
|
+
> - `{skill-name}` — {path}
|
|
167
|
+
> - ...
|
|
168
|
+
>
|
|
169
|
+
> · · ·
|
|
170
|
+
>
|
|
171
|
+
> - **`y`/`yes`** — Keep these, proceed
|
|
172
|
+
> - **`c`/`change`** — Re-discover and choose skills"
|
|
210
173
|
|
|
211
|
-
|
|
174
|
+
**STOP.** Wait for user choice.
|
|
212
175
|
|
|
213
|
-
|
|
176
|
+
- **`yes`**: → Proceed to **Step 5**.
|
|
177
|
+
- **`change`**: Clear `project_skills` and fall through to discovery below.
|
|
214
178
|
|
|
215
|
-
|
|
179
|
+
#### If `.claude/skills/` does not exist or is empty
|
|
216
180
|
|
|
217
181
|
```
|
|
218
|
-
|
|
182
|
+
No project skills found. Proceeding without project-specific conventions.
|
|
219
183
|
```
|
|
220
184
|
|
|
221
|
-
|
|
185
|
+
→ Proceed to **Step 5**.
|
|
222
186
|
|
|
223
|
-
|
|
187
|
+
#### If project skills exist
|
|
224
188
|
|
|
225
|
-
|
|
226
|
-
2. **STOP.** Do not proceed until the polish agent has returned its result.
|
|
227
|
-
3. Route on STATUS:
|
|
228
|
-
- `blocked` → present SUMMARY to the user, ask how to proceed
|
|
229
|
-
- `complete` → present the report below
|
|
189
|
+
Scan `.claude/skills/` for project-specific skill directories. Present findings:
|
|
230
190
|
|
|
231
|
-
>
|
|
232
|
-
>
|
|
233
|
-
> {
|
|
234
|
-
>
|
|
235
|
-
> Findings:
|
|
236
|
-
> {DISCOVERY}
|
|
237
|
-
>
|
|
238
|
-
> Fixes applied:
|
|
239
|
-
> {FIXES_APPLIED}
|
|
240
|
-
>
|
|
241
|
-
> Integration tests added:
|
|
242
|
-
> {TESTS_ADDED}
|
|
191
|
+
> Found these project skills that may be relevant to implementation:
|
|
192
|
+
> - `{skill-name}` — {brief description}
|
|
193
|
+
> - `{skill-name}` — {brief description}
|
|
194
|
+
> - ...
|
|
243
195
|
>
|
|
244
|
-
>
|
|
245
|
-
|
|
196
|
+
> Which of these should I pass to the implementation agents? (all / list / none)
|
|
197
|
+
|
|
198
|
+
**STOP.** Wait for user to confirm which skills are relevant.
|
|
199
|
+
|
|
200
|
+
Store the selected skill paths in the tracking file.
|
|
201
|
+
|
|
202
|
+
→ Proceed to **Step 5**.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Step 5: Linter Discovery
|
|
207
|
+
|
|
208
|
+
Load **[linter-setup.md](references/linter-setup.md)** and follow its discovery process to identify project linters.
|
|
209
|
+
|
|
210
|
+
If `linters` is already populated in the tracking file, present the existing configuration for confirmation (same pattern as project skills in Step 4). If confirmed, skip discovery and proceed.
|
|
211
|
+
|
|
212
|
+
Otherwise, present discovery findings to the user:
|
|
213
|
+
|
|
214
|
+
> **Linter discovery:**
|
|
215
|
+
> - {tool} — `{command}` (installed / not installed)
|
|
216
|
+
> - ...
|
|
246
217
|
>
|
|
247
|
-
>
|
|
218
|
+
> Recommendations: {any suggested tools with install commands}
|
|
248
219
|
>
|
|
249
220
|
> · · ·
|
|
250
221
|
>
|
|
251
|
-
> - **`y`/`yes`** — Approve
|
|
252
|
-
> - **`
|
|
253
|
-
> -
|
|
222
|
+
> - **`y`/`yes`** — Approve these linter commands
|
|
223
|
+
> - **`c`/`change`** — Modify the linter list
|
|
224
|
+
> - **`s`/`skip`** — Skip linter setup (no linting during TDD)
|
|
254
225
|
|
|
255
|
-
**STOP.** Wait for user
|
|
226
|
+
**STOP.** Wait for user choice.
|
|
256
227
|
|
|
257
|
-
|
|
228
|
+
- **`yes`**: Store the approved linter commands in the tracking file.
|
|
229
|
+
- **`change`**: Adjust based on user input, re-present for confirmation.
|
|
230
|
+
- **`skip`**: Store empty linters array.
|
|
258
231
|
|
|
259
|
-
|
|
232
|
+
→ Proceed to **Step 6**.
|
|
260
233
|
|
|
261
|
-
|
|
262
|
-
impl({topic}): polish — {brief description}
|
|
263
|
-
```
|
|
234
|
+
---
|
|
264
235
|
|
|
265
|
-
|
|
236
|
+
## Step 6: Task Loop
|
|
266
237
|
|
|
267
|
-
|
|
238
|
+
Load **[steps/task-loop.md](references/steps/task-loop.md)** and follow its instructions as written.
|
|
268
239
|
|
|
269
|
-
|
|
240
|
+
After the loop completes:
|
|
270
241
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
242
|
+
→ If the task loop exited early (user chose `stop`), proceed to **Step 8**.
|
|
243
|
+
|
|
244
|
+
→ Otherwise, proceed to **Step 7**.
|
|
245
|
+
|
|
246
|
+
---
|
|
274
247
|
|
|
275
|
-
|
|
248
|
+
## Step 7: Analysis Loop
|
|
276
249
|
|
|
277
|
-
|
|
250
|
+
Load **[steps/analysis-loop.md](references/steps/analysis-loop.md)** and follow its instructions as written.
|
|
278
251
|
|
|
279
|
-
|
|
252
|
+
→ If new tasks were created in the plan, return to **Step 6**.
|
|
280
253
|
|
|
281
|
-
→
|
|
254
|
+
→ If no tasks were created, proceed to **Step 8**.
|
|
282
255
|
|
|
283
256
|
---
|
|
284
257
|
|
|
285
|
-
## Step
|
|
258
|
+
## Step 8: Mark Implementation Complete
|
|
286
259
|
|
|
287
|
-
Update the tracking file (`docs/workflow/implementation/{topic}.md`):
|
|
260
|
+
Update the tracking file (`docs/workflow/implementation/{topic}/tracking.md`):
|
|
288
261
|
- Set `status: completed`
|
|
289
262
|
- Set `completed: YYYY-MM-DD` (use today's actual date)
|
|
290
263
|
- Update `updated` date
|
|
@@ -296,10 +269,14 @@ Commit: `impl({topic}): complete implementation`
|
|
|
296
269
|
## References
|
|
297
270
|
|
|
298
271
|
- **[environment-setup.md](references/environment-setup.md)** — Environment setup before implementation
|
|
272
|
+
- **[linter-setup.md](references/linter-setup.md)** — Linter discovery and configuration
|
|
299
273
|
- **[steps/task-loop.md](references/steps/task-loop.md)** — Task execution loop, task gates, tracking, commits
|
|
274
|
+
- **[steps/analysis-loop.md](references/steps/analysis-loop.md)** — Analysis and refinement cycle
|
|
300
275
|
- **[steps/invoke-executor.md](references/steps/invoke-executor.md)** — How to invoke the executor agent
|
|
301
276
|
- **[steps/invoke-reviewer.md](references/steps/invoke-reviewer.md)** — How to invoke the reviewer agent
|
|
302
|
-
- **[steps/invoke-
|
|
277
|
+
- **[steps/invoke-analysis.md](references/steps/invoke-analysis.md)** — How to invoke analysis agents
|
|
278
|
+
- **[steps/invoke-synthesizer.md](references/steps/invoke-synthesizer.md)** — How to invoke the synthesis agent
|
|
279
|
+
- **[steps/invoke-task-writer.md](references/steps/invoke-task-writer.md)** — How to invoke the task writer agent
|
|
303
280
|
- **[task-normalisation.md](references/task-normalisation.md)** — Normalised task shape for agent invocation
|
|
304
281
|
- **[tdd-workflow.md](references/tdd-workflow.md)** — TDD cycle (passed to executor agent)
|
|
305
282
|
- **[code-quality.md](references/code-quality.md)** — Quality standards (passed to executor agent)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Linter Setup
|
|
2
|
+
|
|
3
|
+
*Reference for **[technical-implementation](../SKILL.md)***
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Discover and configure project linters for use during the TDD cycle's LINT step. Linters run after every REFACTOR to catch mechanical issues (formatting, unused imports, type errors) that are cheaper to fix immediately than in review.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Discovery Process
|
|
12
|
+
|
|
13
|
+
1. **Identify project languages** — check file extensions, package files (`composer.json`, `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, etc.), and project skills in `.claude/skills/`
|
|
14
|
+
2. **Check for existing linter configs** — look for config files in the project root:
|
|
15
|
+
- PHP: `phpstan.neon`, `phpstan.neon.dist`, `pint.json`, `.php-cs-fixer.php`
|
|
16
|
+
- JavaScript/TypeScript: `.eslintrc*`, `eslint.config.*`, `biome.json`
|
|
17
|
+
- Go: `.golangci.yml`, `.golangci.yaml`
|
|
18
|
+
- Python: `pyproject.toml` (ruff/mypy sections), `setup.cfg`, `.flake8`
|
|
19
|
+
- Rust: `rustfmt.toml`, `clippy.toml`
|
|
20
|
+
3. **Verify tools are installed** — run each discovered tool with `--version` or equivalent to confirm it's available
|
|
21
|
+
4. **Recommend if none found** — if a language is detected but no linter is configured, suggest best-practice tools (e.g., PHPStan + Pint for PHP, ESLint for JS/TS, golangci-lint for Go). Include install commands.
|
|
22
|
+
|
|
23
|
+
## Storage
|
|
24
|
+
|
|
25
|
+
Linter commands are stored in the implementation tracking file frontmatter as a `linters` array:
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
linters:
|
|
29
|
+
- name: phpstan
|
|
30
|
+
command: vendor/bin/phpstan analyse --memory-limit=512M
|
|
31
|
+
- name: pint
|
|
32
|
+
command: vendor/bin/pint --test
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Each entry has:
|
|
36
|
+
- **name** — identifier for display
|
|
37
|
+
- **command** — the exact shell command to run (including flags)
|
|
38
|
+
|
|
39
|
+
If the user skips linter setup, store an empty array: `linters: []`
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Analysis Loop
|
|
2
|
+
|
|
3
|
+
*Reference for **[technical-implementation](../../SKILL.md)***
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Each cycle follows stages A through F sequentially. Always start at **A. Cycle Gate**.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
A. Cycle gate (check analysis_cycle, warn if over limit)
|
|
11
|
+
B. Git checkpoint
|
|
12
|
+
C. Dispatch analysis agents → invoke-analysis.md
|
|
13
|
+
D. Dispatch synthesis agent → invoke-synthesizer.md
|
|
14
|
+
E. Approval gate (present tasks, approve/skip/comment)
|
|
15
|
+
F. Create tasks in plan → invoke-task-writer.md
|
|
16
|
+
→ Route on result
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## A. Cycle Gate
|
|
22
|
+
|
|
23
|
+
Increment `analysis_cycle` in the implementation tracking file.
|
|
24
|
+
|
|
25
|
+
If `analysis_cycle > 3`:
|
|
26
|
+
|
|
27
|
+
> **Analysis cycle {N} — this is beyond the standard 3 cycles.**
|
|
28
|
+
>
|
|
29
|
+
> · · ·
|
|
30
|
+
>
|
|
31
|
+
> - **`s`/`skip`** — Skip analysis, proceed to completion
|
|
32
|
+
> - **`p`/`proceed`** — Run analysis anyway
|
|
33
|
+
|
|
34
|
+
**STOP.** Wait for user choice.
|
|
35
|
+
|
|
36
|
+
- **`skip`**: → Return to the skill for **Step 8**.
|
|
37
|
+
- **`proceed`**: → Continue to **B. Git Checkpoint**.
|
|
38
|
+
|
|
39
|
+
→ If `analysis_cycle <= 3`, proceed to **B. Git Checkpoint**.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## B. Git Checkpoint
|
|
44
|
+
|
|
45
|
+
Ensure a clean working tree before analysis. Run `git status`.
|
|
46
|
+
|
|
47
|
+
→ If the working tree is clean, proceed to **C. Dispatch Analysis Agents**.
|
|
48
|
+
|
|
49
|
+
If there are unstaged changes or untracked files, categorize them:
|
|
50
|
+
|
|
51
|
+
- **Implementation files** (files touched by `impl({topic}):` commits) — stage these automatically.
|
|
52
|
+
- **Unexpected files** (files not touched during implementation) — present to the user:
|
|
53
|
+
|
|
54
|
+
> **Pre-analysis checkpoint — unexpected files detected:**
|
|
55
|
+
> - `{file}` ({status: modified/untracked})
|
|
56
|
+
> - ...
|
|
57
|
+
>
|
|
58
|
+
> · · ·
|
|
59
|
+
>
|
|
60
|
+
> - **`y`/`yes`** — Include all in the checkpoint commit
|
|
61
|
+
> - **`s`/`skip`** — Exclude unexpected files, commit only implementation files
|
|
62
|
+
> - **Comment** — Specify which to include
|
|
63
|
+
|
|
64
|
+
**STOP.** Wait for user choice.
|
|
65
|
+
|
|
66
|
+
Commit included files:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
impl({topic}): pre-analysis checkpoint
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
→ Proceed to **C. Dispatch Analysis Agents**.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## C. Dispatch Analysis Agents
|
|
77
|
+
|
|
78
|
+
Load **[invoke-analysis.md](invoke-analysis.md)** and follow its instructions.
|
|
79
|
+
|
|
80
|
+
**STOP.** Do not proceed until all agents have returned.
|
|
81
|
+
|
|
82
|
+
→ Proceed to **D. Dispatch Synthesis Agent**.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## D. Dispatch Synthesis Agent
|
|
87
|
+
|
|
88
|
+
Load **[invoke-synthesizer.md](invoke-synthesizer.md)** and follow its instructions.
|
|
89
|
+
|
|
90
|
+
**STOP.** Do not proceed until the synthesizer has returned.
|
|
91
|
+
|
|
92
|
+
→ If `STATUS: clean`, return to the skill for **Step 8**.
|
|
93
|
+
|
|
94
|
+
→ If `STATUS: tasks_proposed`, proceed to **E. Approval Gate**.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## E. Approval Gate
|
|
99
|
+
|
|
100
|
+
Read the staging file from `docs/workflow/implementation/{topic}/analysis-tasks.md`.
|
|
101
|
+
|
|
102
|
+
Present an overview:
|
|
103
|
+
|
|
104
|
+
> **Analysis cycle {N}: {K} proposed tasks**
|
|
105
|
+
>
|
|
106
|
+
> 1. {title} ({severity})
|
|
107
|
+
> 2. {title} ({severity})
|
|
108
|
+
> ...
|
|
109
|
+
|
|
110
|
+
Then present each task with `status: pending` individually:
|
|
111
|
+
|
|
112
|
+
> **Task {current}/{total}: {title}** ({severity})
|
|
113
|
+
> Sources: {sources}
|
|
114
|
+
>
|
|
115
|
+
> **Problem**: {problem}
|
|
116
|
+
> **Solution**: {solution}
|
|
117
|
+
> **Outcome**: {outcome}
|
|
118
|
+
>
|
|
119
|
+
> **Do**:
|
|
120
|
+
> {steps}
|
|
121
|
+
>
|
|
122
|
+
> **Acceptance Criteria**:
|
|
123
|
+
> {criteria}
|
|
124
|
+
>
|
|
125
|
+
> **Tests**:
|
|
126
|
+
> {tests}
|
|
127
|
+
>
|
|
128
|
+
> · · ·
|
|
129
|
+
>
|
|
130
|
+
> - **`a`/`approve`** — Approve this task
|
|
131
|
+
> - **`s`/`skip`** — Skip this task
|
|
132
|
+
> - **Comment** — Revise based on feedback
|
|
133
|
+
|
|
134
|
+
**STOP.** Wait for user input.
|
|
135
|
+
|
|
136
|
+
#### If `approve`
|
|
137
|
+
|
|
138
|
+
Update `status: approved` in the staging file.
|
|
139
|
+
|
|
140
|
+
→ Present the next pending task, or proceed to routing below if all tasks processed.
|
|
141
|
+
|
|
142
|
+
#### If `skip`
|
|
143
|
+
|
|
144
|
+
Update `status: skipped` in the staging file.
|
|
145
|
+
|
|
146
|
+
→ Present the next pending task, or proceed to routing below if all tasks processed.
|
|
147
|
+
|
|
148
|
+
#### If comment
|
|
149
|
+
|
|
150
|
+
Revise the task content in the staging file based on the user's feedback. Re-present this task.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
After all tasks processed:
|
|
155
|
+
|
|
156
|
+
→ If any tasks have `status: approved`, proceed to **F. Create Tasks in Plan**.
|
|
157
|
+
|
|
158
|
+
→ If all tasks were skipped, return to the skill for **Step 8**.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## F. Create Tasks in Plan
|
|
163
|
+
|
|
164
|
+
Load **[invoke-task-writer.md](invoke-task-writer.md)** and follow its instructions.
|
|
165
|
+
|
|
166
|
+
**STOP.** Do not proceed until the task writer has returned.
|
|
167
|
+
|
|
168
|
+
Commit:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
impl({topic}): add analysis phase {N} ({K} tasks)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
→ Return to the skill. New tasks are now in the plan.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Invoke Analysis Agents
|
|
2
|
+
|
|
3
|
+
*Reference for **[technical-implementation](../../SKILL.md)***
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This step dispatches the three analysis agents in parallel to evaluate the completed implementation from different perspectives: duplication, standards conformance, and architecture.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Identify Scope
|
|
12
|
+
|
|
13
|
+
Build the list of implementation files using git history:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git log --oneline --name-only --pretty=format: --grep="impl({topic}):" | sort -u | grep -v '^$'
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This captures all files touched by implementation commits for the topic.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Dispatch All Three Agents
|
|
24
|
+
|
|
25
|
+
Dispatch **all three in parallel** via the Task tool. Each agent receives the same inputs:
|
|
26
|
+
|
|
27
|
+
1. **Implementation files** — the file list from scope identification
|
|
28
|
+
2. **Specification path** — from the plan's frontmatter (if available)
|
|
29
|
+
3. **Project skill paths** — from `project_skills` in the implementation tracking file
|
|
30
|
+
4. **code-quality.md path** — `../code-quality.md`
|
|
31
|
+
5. **Topic name** — the implementation topic
|
|
32
|
+
|
|
33
|
+
Each agent knows its own output path convention and writes findings independently.
|
|
34
|
+
|
|
35
|
+
### Agent 1: Duplication
|
|
36
|
+
|
|
37
|
+
- **Agent path**: `../../../../agents/implementation-analysis-duplication.md`
|
|
38
|
+
|
|
39
|
+
### Agent 2: Standards
|
|
40
|
+
|
|
41
|
+
- **Agent path**: `../../../../agents/implementation-analysis-standards.md`
|
|
42
|
+
|
|
43
|
+
### Agent 3: Architecture
|
|
44
|
+
|
|
45
|
+
- **Agent path**: `../../../../agents/implementation-analysis-architecture.md`
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Wait for Completion
|
|
50
|
+
|
|
51
|
+
**STOP.** Do not proceed until all three agents have returned.
|
|
52
|
+
|
|
53
|
+
Each agent writes its findings to its own output file and returns a brief status. If any agent fails (error, timeout), record the failure and continue — the synthesizer works with whatever findings files are available.
|
|
@@ -17,10 +17,11 @@ This step invokes the `implementation-task-executor` agent (`../../../../agents/
|
|
|
17
17
|
3. **Specification path**: from the plan's frontmatter (if available)
|
|
18
18
|
4. **Project skill paths**: from `project_skills` in the implementation tracking file
|
|
19
19
|
5. **Task content**: normalised task content (see [task-normalisation.md](../task-normalisation.md))
|
|
20
|
+
6. **Linter commands**: from `linters` in the implementation tracking file (if configured)
|
|
20
21
|
|
|
21
22
|
**Re-attempts after review feedback** additionally include:
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
7. **User-approved review notes**: verbatim or as modified by the user
|
|
24
|
+
8. **Specific issues to address**: the ISSUES from the review
|
|
24
25
|
|
|
25
26
|
The executor is stateless — each invocation starts fresh with no memory of previous attempts. Always pass the full task content so the executor can see what was asked, what was done, and what needs fixing.
|
|
26
27
|
|