claude-mcp-workflow 0.1.6 → 0.1.7
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/.claude-plugin/plugin.json +1 -1
- package/README.md +48 -6
- package/build/index.js +4 -0
- package/build/index.js.map +1 -1
- package/build/loader.d.ts +12 -0
- package/build/loader.d.ts.map +1 -1
- package/build/loader.js +35 -0
- package/build/loader.js.map +1 -1
- package/package.json +1 -1
- package/templates/bug-fix.yaml +47 -17
- package/templates/code-review.yaml +20 -43
- package/templates/file-review.yaml +64 -7
- package/templates/skills/architecture/SKILL.md +77 -0
- package/templates/skills/aws-lambda/SKILL.md +44 -0
- package/templates/skills/build-cmake/SKILL.md +58 -0
- package/templates/skills/ci-github-actions/SKILL.md +144 -0
- package/templates/skills/claude-code-config/SKILL.md +122 -0
- package/templates/skills/coding-skill-selector/SKILL.md +27 -11
- package/templates/skills/domain-gamedev/SKILL.md +162 -0
- package/templates/skills/domain-pixi/SKILL.md +163 -0
- package/templates/skills/domain-reid/SKILL.md +51 -0
- package/templates/skills/domain-yolo/SKILL.md +23 -0
- package/templates/skills/lang-as3/SKILL.md +22 -0
- package/templates/skills/lang-haxe/SKILL.md +649 -0
- package/templates/skills/mcp-setup/SKILL.md +18 -0
- package/templates/skills/target-openfl-native/SKILL.md +555 -0
- package/templates/skills/target-openfl-native/references/build-and-versions.md +60 -0
- package/templates/skills/task-delegation/SKILL.md +1 -0
package/README.md
CHANGED
|
@@ -23,12 +23,21 @@ A Claude Code plugin that drives agents through YAML-defined state machines. The
|
|
|
23
23
|
- **Action states** — `exec` runs shell commands, `fetch` makes HTTP requests, with auto-routing by exit code or HTTP status
|
|
24
24
|
- **Web dashboard** — real-time session monitoring with DAG graph visualization
|
|
25
25
|
- **18 bundled workflows** — complete agent lifecycle from routing to reflection
|
|
26
|
-
- **
|
|
26
|
+
- **20 bundled skills** — reusable knowledge modules auto-provisioned on first run
|
|
27
27
|
- **SessionStart hook** — auto-provisions missing skills and injects workflow context
|
|
28
28
|
|
|
29
29
|
## Quick Start
|
|
30
30
|
|
|
31
|
-
### From
|
|
31
|
+
### From Community Plugins (recommended)
|
|
32
|
+
|
|
33
|
+
The plugin is listed in the [claude-plugins-community](https://github.com/anthropics/claude-plugins-community/) catalog:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
/plugin marketplace add https://github.com/anthropics/claude-plugins-community
|
|
37
|
+
/plugin install workflow
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### From npm
|
|
32
41
|
|
|
33
42
|
Create a `marketplace.json` and add it as a source, or install directly:
|
|
34
43
|
|
|
@@ -208,19 +217,52 @@ A project workflow named `coding` overrides the bundled `coding` template. Same-
|
|
|
208
217
|
|
|
209
218
|
## Bundled Skills
|
|
210
219
|
|
|
211
|
-
Skills are reusable knowledge modules loaded by workflows via `Skill()`. Auto-provisioned to `~/.claude/skills/` on first run if missing.
|
|
220
|
+
Skills are reusable knowledge modules loaded by workflows via `Skill()`. Auto-provisioned to `~/.claude/skills/` on first run if missing. Edit your local copy to override the bundled version — the hook never overwrites existing files.
|
|
221
|
+
|
|
222
|
+
**Methodology**
|
|
212
223
|
|
|
213
224
|
| Skill | Description |
|
|
214
225
|
|-------|-------------|
|
|
215
|
-
| `preferences` |
|
|
226
|
+
| `preferences` | Template for personal coding preferences (fill in your own) |
|
|
216
227
|
| `architecture` | Simplicity-first architecture decisions |
|
|
217
228
|
| `task-delegation` | When and how to delegate to subagents |
|
|
218
229
|
| `coding-skill-selector` | Select and load coding skills by file extensions and domains |
|
|
219
|
-
| `
|
|
230
|
+
| `workflow-authoring` | Reference for creating workflows with exec/fetch action states |
|
|
231
|
+
|
|
232
|
+
**Languages**
|
|
233
|
+
|
|
234
|
+
| Skill | Description |
|
|
235
|
+
|-------|-------------|
|
|
236
|
+
| `lang-haxe` | Haxe language gotchas (incl. macros, null safety, hxcpp) |
|
|
220
237
|
| `lang-python` | Python language gotchas |
|
|
238
|
+
| `lang-as3` | AS3 / AIR 51 language gotchas |
|
|
239
|
+
|
|
240
|
+
**Domains**
|
|
241
|
+
|
|
242
|
+
| Skill | Description |
|
|
243
|
+
|-------|-------------|
|
|
244
|
+
| `domain-yolo` | YOLO object detection model selection |
|
|
245
|
+
| `domain-pixi` | Pixi.js v8 masking and graphics gotchas |
|
|
246
|
+
| `domain-reid` | Person re-identification ML gotchas |
|
|
247
|
+
| `domain-gamedev` | Game dev precision and physics gotchas |
|
|
248
|
+
|
|
249
|
+
**Platforms & Tooling**
|
|
250
|
+
|
|
251
|
+
| Skill | Description |
|
|
252
|
+
|-------|-------------|
|
|
253
|
+
| `target-openfl-native` | OpenFL/hxcpp native target gotchas |
|
|
254
|
+
| `build-cmake` | CMake build system gotchas |
|
|
255
|
+
| `ci-github-actions` | GitHub Actions workflow gotchas |
|
|
256
|
+
| `aws-lambda` | AWS Lambda .NET deployment gotchas |
|
|
257
|
+
| `mcp-setup` | MCP server setup and troubleshooting |
|
|
258
|
+
| `claude-code-config` | Claude Code configuration gotchas |
|
|
259
|
+
|
|
260
|
+
**Utility**
|
|
261
|
+
|
|
262
|
+
| Skill | Description |
|
|
263
|
+
|-------|-------------|
|
|
221
264
|
| `math` | Math overflow boundary gotchas |
|
|
222
265
|
| `web-reading` | Fetch web content via subagents |
|
|
223
|
-
| `workflow-authoring` | Reference for creating workflows with exec/fetch action states |
|
|
224
266
|
|
|
225
267
|
## MCP Tools
|
|
226
268
|
|
package/build/index.js
CHANGED
|
@@ -34,6 +34,10 @@ const refErrors = loader.validateReferences();
|
|
|
34
34
|
if (refErrors.length > 0) {
|
|
35
35
|
console.error("Workflow reference warnings:", refErrors.join("; "));
|
|
36
36
|
}
|
|
37
|
+
const skillErrors = loader.validateSkillReferences();
|
|
38
|
+
if (skillErrors.length > 0) {
|
|
39
|
+
console.error("Skill reference warnings:", skillErrors.join("; "));
|
|
40
|
+
}
|
|
37
41
|
// Start hot-reload
|
|
38
42
|
loader.startWatching();
|
|
39
43
|
const executor =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;AAClB,CAAC,CAAC,CAAC"}
|
package/build/loader.d.ts
CHANGED
|
@@ -25,5 +25,17 @@ export declare class Loader {
|
|
|
25
25
|
private _loadDir;
|
|
26
26
|
private _validate;
|
|
27
27
|
validateReferences(): string[];
|
|
28
|
+
/**
|
|
29
|
+
* Validate that every required skill referenced in a state's `skills:` list exists
|
|
30
|
+
* in at least one skill directory (plugin bundle, user, or project). Optional skills
|
|
31
|
+
* (`?<name>` prefix) are skipped — they're allowed to be missing.
|
|
32
|
+
*
|
|
33
|
+
* Skill discovery order matches Claude Code's: plugin templates → user (~/.claude/skills/)
|
|
34
|
+
* → project (<cwd>/.claude/skills/). Existence is checked by SKILL.md presence.
|
|
35
|
+
*
|
|
36
|
+
* Returns a flat list of error strings; non-empty result means the workflow set
|
|
37
|
+
* references a non-existent required skill (typo or removed skill).
|
|
38
|
+
*/
|
|
39
|
+
validateSkillReferences(): string[];
|
|
28
40
|
}
|
|
29
41
|
//# sourceMappingURL=loader.d.ts.map
|
package/build/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGrD,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgB;IAC5C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgB;IAC5C,OAAO,CAAC,UAAU,CAA8C;IAChE,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,eAAe,CAA6B;gBAExC,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAS5E,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAIjD,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC;IAIzC,KAAK,IAAI,MAAM,EAAE;IAIxB,kDAAkD;IAC3C,WAAW,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM;IAUxD,oCAAoC;IACpC,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAEM,aAAa,IAAI,IAAI;IAKrB,YAAY,IAAI,IAAI;IAOpB,MAAM,IAAI,IAAI;IAIrB,mCAAmC;IAC5B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM;IAcjE,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,QAAQ;IAehB,OAAO,CAAC,QAAQ;IAwBhB,OAAO,CAAC,SAAS;IAkEV,kBAAkB,IAAI,MAAM,EAAE;IAWrC;;;;;;;;;;OAUG;IACI,uBAAuB,IAAI,MAAM,EAAE;CAuB3C"}
|
package/build/loader.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
+
import os from "node:os";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
import YAML from "yaml";
|
|
4
5
|
import { WorkflowDefinitionSchema } from "./types.js";
|
|
@@ -195,5 +196,39 @@ export class Loader {
|
|
|
195
196
|
}
|
|
196
197
|
return errors;
|
|
197
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Validate that every required skill referenced in a state's `skills:` list exists
|
|
201
|
+
* in at least one skill directory (plugin bundle, user, or project). Optional skills
|
|
202
|
+
* (`?<name>` prefix) are skipped — they're allowed to be missing.
|
|
203
|
+
*
|
|
204
|
+
* Skill discovery order matches Claude Code's: plugin templates → user (~/.claude/skills/)
|
|
205
|
+
* → project (<cwd>/.claude/skills/). Existence is checked by SKILL.md presence.
|
|
206
|
+
*
|
|
207
|
+
* Returns a flat list of error strings; non-empty result means the workflow set
|
|
208
|
+
* references a non-existent required skill (typo or removed skill).
|
|
209
|
+
*/
|
|
210
|
+
validateSkillReferences() {
|
|
211
|
+
const errors = [];
|
|
212
|
+
const skillDirs = [];
|
|
213
|
+
if (this._bundledDir)
|
|
214
|
+
skillDirs.push(path.join(this._bundledDir, "skills"));
|
|
215
|
+
skillDirs.push(path.join(os.homedir(), ".claude", "skills"));
|
|
216
|
+
if (this._projectDir)
|
|
217
|
+
skillDirs.push(path.resolve(this._projectDir, "..", "skills"));
|
|
218
|
+
const exists = (name) => skillDirs.some(d => fs.existsSync(path.join(d, name, "SKILL.md")));
|
|
219
|
+
for (const [wfName, wf] of this._workflows) {
|
|
220
|
+
for (const [stateName, state] of Object.entries(wf.states)) {
|
|
221
|
+
if (!state.skills)
|
|
222
|
+
continue;
|
|
223
|
+
for (const ref of state.skills) {
|
|
224
|
+
if (ref.startsWith("?"))
|
|
225
|
+
continue;
|
|
226
|
+
if (!exists(ref))
|
|
227
|
+
errors.push(`${wfName}/${stateName}: required skill "${ref}" not found`);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return errors;
|
|
232
|
+
}
|
|
198
233
|
}
|
|
199
234
|
//# sourceMappingURL=loader.js.map
|
package/build/loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,OAAO,MAAM;IACA,WAAW,CAAgB;IAC3B,UAAU,CAAS;IACnB,WAAW,CAAgB;IACpC,UAAU,GAAoC,IAAI,GAAG,EAAE,CAAC;IACxD,cAAc,GAAwB,IAA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AC;wBAAE,SAAS;oBAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;wBACd,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI,SAAS,qBAAqB,GAAG,aAAa,CAAC,CAAC;gBAC7E,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
package/package.json
CHANGED
package/templates/bug-fix.yaml
CHANGED
|
@@ -17,9 +17,17 @@ states:
|
|
|
17
17
|
- `visual` → UI/layout bug — requires debug bridge, screenshots, visual reproduction
|
|
18
18
|
- `logic` → data/logic bug — reproducible via unit tests or logs
|
|
19
19
|
transitions:
|
|
20
|
-
visual:
|
|
20
|
+
visual: load_skills_visual
|
|
21
21
|
logic: reproduce_logic
|
|
22
22
|
|
|
23
|
+
load_skills_visual:
|
|
24
|
+
skills:
|
|
25
|
+
- coding-skill-selector
|
|
26
|
+
- ?debug-bridge
|
|
27
|
+
- ?project-skill-selector
|
|
28
|
+
transitions:
|
|
29
|
+
continue: reproduce_visual
|
|
30
|
+
|
|
23
31
|
reproduce_visual:
|
|
24
32
|
task: "Reproduce the bug visually"
|
|
25
33
|
prompt: |
|
|
@@ -28,17 +36,23 @@ states:
|
|
|
28
36
|
DO NOT fix the bug here. You may add trace/log statements to help reproduce,
|
|
29
37
|
but do NOT modify production logic. The fix belongs in the `fix` state.
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
REPRODUCTION TOOLING — find the right tool:
|
|
40
|
+
1. Check available MCP tools for browser/screenshot/debug-bridge capabilities.
|
|
41
|
+
2. Pick the tool matching the platform.
|
|
42
|
+
3. Persist the choice for verify_visual:
|
|
43
|
+
`context_set({ key: "chosen_tool", value: "<short name + how to launch>" })`
|
|
44
|
+
|
|
45
|
+
"No tooling available" is almost never true for a visual app. Verify the MCP
|
|
46
|
+
tool list before choosing `cant_reproduce`. Do NOT `abort()` to escape this
|
|
47
|
+
gate — use `cant_reproduce` if genuinely blocked.
|
|
35
48
|
|
|
36
49
|
MANDATORY STEPS (all required, in order):
|
|
37
50
|
1. Understand the exact user path that triggers the bug (which button, which file, which action)
|
|
38
|
-
2. Build
|
|
39
|
-
3.
|
|
40
|
-
4.
|
|
41
|
-
5.
|
|
51
|
+
2. Build (if applicable — native targets must be built before launch)
|
|
52
|
+
3. Launch the app and connect with the tool chosen above
|
|
53
|
+
4. Follow the SAME path the user described to trigger the bug
|
|
54
|
+
5. Take a screenshot and VERIFY the bug is visible
|
|
55
|
+
6. Describe what you see — compare with the user's report
|
|
42
56
|
|
|
43
57
|
STOP — self-check before transitioning:
|
|
44
58
|
- Did you LAUNCH the app and take a SCREENSHOT? If not, you haven't reproduced.
|
|
@@ -50,7 +64,9 @@ states:
|
|
|
50
64
|
`cant_reproduce` = you tried but can't see it. This leads to asking the user for help.
|
|
51
65
|
NEVER use `reproduced` when you haven't seen the bug yourself.
|
|
52
66
|
|
|
53
|
-
If the bug requires file operations, use the
|
|
67
|
+
If the bug requires simulated input or file operations, use the chosen tool's
|
|
68
|
+
recipes: Playwright `browser_evaluate` / `browser_press_key` for web,
|
|
69
|
+
tm-interactive-debug for native.
|
|
54
70
|
transitions:
|
|
55
71
|
reproduced: diagnose
|
|
56
72
|
cant_reproduce: clarify
|
|
@@ -86,7 +102,7 @@ states:
|
|
|
86
102
|
transition `try_visual` to reproduce via debug bridge instead.
|
|
87
103
|
transitions:
|
|
88
104
|
reproduced: diagnose
|
|
89
|
-
try_visual:
|
|
105
|
+
try_visual: load_skills_visual
|
|
90
106
|
cant_reproduce: clarify
|
|
91
107
|
|
|
92
108
|
diagnose:
|
|
@@ -279,19 +295,33 @@ states:
|
|
|
279
295
|
- Visual bug → `visual` (needs screenshot verification)
|
|
280
296
|
- Logic bug → `logic` (tests already passed in testing workflow)
|
|
281
297
|
transitions:
|
|
282
|
-
visual:
|
|
298
|
+
visual: load_skills_verify
|
|
283
299
|
logic: done
|
|
284
300
|
|
|
301
|
+
load_skills_verify:
|
|
302
|
+
skills:
|
|
303
|
+
- coding-skill-selector
|
|
304
|
+
- ?debug-bridge
|
|
305
|
+
- ?project-skill-selector
|
|
306
|
+
transitions:
|
|
307
|
+
continue: verify_visual
|
|
308
|
+
|
|
285
309
|
verify_visual:
|
|
286
310
|
task: "Verify the fix visually"
|
|
287
311
|
prompt: |
|
|
288
312
|
Verify the original bug is fixed VISUALLY.
|
|
289
313
|
|
|
314
|
+
Tool chosen at reproduction: {{context.chosen_tool}}
|
|
315
|
+
(If empty — context was lost. Re-pick a tool now using the same approach
|
|
316
|
+
as reproduce_visual: check available MCP tools, pick the one matching the
|
|
317
|
+
platform.)
|
|
318
|
+
|
|
290
319
|
MANDATORY STEPS:
|
|
291
|
-
1. Build
|
|
292
|
-
2.
|
|
293
|
-
3.
|
|
294
|
-
4.
|
|
320
|
+
1. Build (if applicable — native targets must be built before launch; rebuild after the fix)
|
|
321
|
+
2. Launch the app using the tool above
|
|
322
|
+
3. Follow the SAME path used during reproduction
|
|
323
|
+
4. Take a screenshot and VERIFY the bug is gone
|
|
324
|
+
5. Compare before/after — describe the visual difference
|
|
295
325
|
|
|
296
326
|
DO NOT transition to `confirmed` without a screenshot proving the fix works.
|
|
297
327
|
transitions:
|
|
@@ -302,7 +332,7 @@ states:
|
|
|
302
332
|
task: "Clarify bug details"
|
|
303
333
|
prompt: "Ask the user for more details about the bug."
|
|
304
334
|
transitions:
|
|
305
|
-
got_info_visual:
|
|
335
|
+
got_info_visual: load_skills_visual
|
|
306
336
|
got_info_logic: reproduce_logic
|
|
307
337
|
|
|
308
338
|
escalate:
|
|
@@ -245,7 +245,7 @@ states:
|
|
|
245
245
|
- No debatable concerns → `all_clear`
|
|
246
246
|
transitions:
|
|
247
247
|
has_concerns: discuss
|
|
248
|
-
all_clear:
|
|
248
|
+
all_clear: done
|
|
249
249
|
|
|
250
250
|
discuss:
|
|
251
251
|
task: "Discuss debatable concerns"
|
|
@@ -269,65 +269,42 @@ states:
|
|
|
269
269
|
transitions:
|
|
270
270
|
plan: plan_changes
|
|
271
271
|
code: code_changes
|
|
272
|
-
skip:
|
|
272
|
+
skip: done
|
|
273
273
|
|
|
274
274
|
plan_changes:
|
|
275
275
|
task: "Plan agreed changes"
|
|
276
276
|
sub_workflow: planning
|
|
277
|
-
on_complete:
|
|
277
|
+
on_complete: done
|
|
278
278
|
on_fail: done
|
|
279
279
|
|
|
280
280
|
code_changes:
|
|
281
281
|
task: "Apply agreed changes"
|
|
282
282
|
sub_workflow: coding
|
|
283
|
-
on_complete:
|
|
283
|
+
on_complete: verify_impact
|
|
284
284
|
on_fail: done
|
|
285
285
|
|
|
286
|
-
|
|
287
|
-
task: "Verify build and
|
|
288
|
-
prompt: |
|
|
289
|
-
Code was changed after discussion — verify correctness.
|
|
290
|
-
|
|
291
|
-
1. Run the project's build/compile command. Check for errors.
|
|
292
|
-
- Build fails → fix errors, rebuild until it passes.
|
|
293
|
-
|
|
294
|
-
2. Check if any agreed changes modified functionality (not just cosmetic).
|
|
295
|
-
If yes → run tests for the changed behavior. Use the project's test
|
|
296
|
-
framework, or if no automated tests cover the change, describe what
|
|
297
|
-
manual testing is needed and ask the user to verify.
|
|
298
|
-
If all changes were cosmetic → build passing is sufficient.
|
|
299
|
-
|
|
300
|
-
After verification:
|
|
301
|
-
- `pass` → proceed to re-review
|
|
302
|
-
- `fail` → changes broke the build beyond repair, skip to re-review without the failed changes
|
|
303
|
-
transitions:
|
|
304
|
-
pass: re_review
|
|
305
|
-
fail: re_review
|
|
306
|
-
|
|
307
|
-
re_review:
|
|
308
|
-
task: "Re-review changed files for cascading issues"
|
|
286
|
+
verify_impact:
|
|
287
|
+
task: "Verify build, tests, and cross-file impact"
|
|
309
288
|
prompt: |
|
|
310
|
-
|
|
311
|
-
Re-review ALL files that were modified in previous phases (apply_fixes, code_changes).
|
|
289
|
+
Code was changed after discussion — verify correctness and impact.
|
|
312
290
|
|
|
313
|
-
1.
|
|
314
|
-
2. If no files were changed (e.g. discussion resulted in no changes) → `clean`.
|
|
315
|
-
3. Spawn file-review agents for changed files with `scope: diff`
|
|
316
|
-
(review only the new changes, not the entire file again).
|
|
317
|
-
Use the same agent spawning pattern as `review_delegate`.
|
|
318
|
-
4. Collect reports.
|
|
291
|
+
1. Run the project's build/compile command. Fix errors and rebuild until green.
|
|
319
292
|
|
|
320
|
-
|
|
321
|
-
|
|
293
|
+
2. Run tests for changed behavior. If no automated tests cover the change,
|
|
294
|
+
describe what manual testing is needed and ask the user to verify.
|
|
295
|
+
Cosmetic-only changes → build passing is sufficient.
|
|
322
296
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
297
|
+
3. Cross-file impact check: for each file modified during discussion,
|
|
298
|
+
identify other files in the original review set that use its changed
|
|
299
|
+
APIs/symbols. Quickly inspect those call sites for compile-time or
|
|
300
|
+
obvious behavior breakage. This is NOT a full re-review — only check
|
|
301
|
+
consumers of what changed.
|
|
326
302
|
|
|
327
|
-
|
|
303
|
+
After verification, transition `complete`. The coding sub-workflow already
|
|
304
|
+
reviewed the files it modified. Planning produces a plan only — review
|
|
305
|
+
happens later when the plan is executed via the coding workflow.
|
|
328
306
|
transitions:
|
|
329
|
-
|
|
330
|
-
clean: done
|
|
307
|
+
complete: done
|
|
331
308
|
|
|
332
309
|
done:
|
|
333
310
|
prompt: "Review complete."
|
|
@@ -26,6 +26,30 @@ states:
|
|
|
26
26
|
Check if similar code already exists elsewhere that could be reused or unified.
|
|
27
27
|
4. Understand what changed and why.
|
|
28
28
|
|
|
29
|
+
Then → transition `done`.
|
|
30
|
+
transitions:
|
|
31
|
+
done: determine_authorship
|
|
32
|
+
|
|
33
|
+
determine_authorship:
|
|
34
|
+
task: "Determine code authorship"
|
|
35
|
+
prompt: |
|
|
36
|
+
Decide whether this file is user-authored or external/forked/vendored —
|
|
37
|
+
this gates which personal rules apply downstream (style + architecture).
|
|
38
|
+
|
|
39
|
+
Strong signals it is external / forked / vendored (set "false"):
|
|
40
|
+
- `git remote -v` points to a third-party upstream the user does not control.
|
|
41
|
+
- README/CLAUDE.md mentions "fork of X", "based on X", "vendored from X".
|
|
42
|
+
- Path lives under `node_modules/`, `vendor/`, `third_party/`, a haxelib
|
|
43
|
+
cache, or similar dependency location.
|
|
44
|
+
|
|
45
|
+
Save the verdict:
|
|
46
|
+
- ANY strong external signal present → `context_set({ key: "is_user_authored", value: "false" })`
|
|
47
|
+
- Otherwise → `context_set({ key: "is_user_authored", value: "true" })`
|
|
48
|
+
|
|
49
|
+
Default to "true" when signals are ambiguous — external markers are reliably
|
|
50
|
+
detectable; user-authored markers are not, so ambiguity falls on the
|
|
51
|
+
personal-rules side. Do not block on user input.
|
|
52
|
+
|
|
29
53
|
Then → transition `done`.
|
|
30
54
|
transitions:
|
|
31
55
|
done: build_checklist
|
|
@@ -33,7 +57,14 @@ states:
|
|
|
33
57
|
build_checklist:
|
|
34
58
|
task: "Build style checklist from skills"
|
|
35
59
|
prompt: |
|
|
36
|
-
|
|
60
|
+
Check `{{context.is_user_authored}}`. Treat empty as `"true"` (default).
|
|
61
|
+
|
|
62
|
+
If `"false"` → personal style rules do not apply. Output:
|
|
63
|
+
"Skipping personal-style checklist — file is external/forked/vendored.
|
|
64
|
+
check_style will use only language-agnostic checks."
|
|
65
|
+
Then → transition `done`.
|
|
66
|
+
|
|
67
|
+
Otherwise (user-authored), build a concrete style checklist from loaded skills:
|
|
37
68
|
|
|
38
69
|
Process each loaded `lang-*` and `preferences-*` skill ONE AT A TIME.
|
|
39
70
|
For each skill:
|
|
@@ -123,27 +154,46 @@ states:
|
|
|
123
154
|
check_style:
|
|
124
155
|
task: "Check code style"
|
|
125
156
|
prompt: |
|
|
157
|
+
Authorship: `{{context.is_user_authored}}` (set in determine_authorship).
|
|
158
|
+
Treat empty as `"true"` (default).
|
|
159
|
+
|
|
160
|
+
If `"false"` (external / forked / vendored):
|
|
161
|
+
Skip the personal-style checklist entirely. Match THAT codebase's existing
|
|
162
|
+
style — a one-line patch into a foreign project should look like it belongs.
|
|
163
|
+
Only flag issues from the language-agnostic checks below.
|
|
164
|
+
|
|
165
|
+
Otherwise (user-authored):
|
|
126
166
|
Go through EVERY item in your style checklist from build_checklist.
|
|
167
|
+
Personal rules are authoritative — a neighboring file violating the same
|
|
168
|
+
rule is a bug replicated in both places, not a valid pattern. Flag it.
|
|
169
|
+
Never dismiss a checklist hit with "the sibling does it this way".
|
|
170
|
+
|
|
127
171
|
Scope: `diff` = scan only lines in the diff; `full` = scan entire file.
|
|
128
172
|
If a line appears in the diff, it is part of the change and must meet
|
|
129
173
|
current style standards. Report with file:line.
|
|
130
174
|
|
|
131
|
-
|
|
175
|
+
Language-agnostic checks (apply regardless of authorship):
|
|
132
176
|
- [ ] Missing type annotations: if a variable/field/parameter has no explicit type
|
|
133
177
|
and adding one would improve clarity, recommend it — but ONLY after you find
|
|
134
178
|
the actual type definition in the codebase (via Grep/Read). Never guess types.
|
|
135
179
|
Use short type names + import, not fully qualified paths (e.g. `MyClass`,
|
|
136
180
|
not `com.package.MyClass`) — unless a name conflict or conditional compilation
|
|
137
181
|
requires the full path (check loaded lang/preferences skills for specifics).
|
|
138
|
-
- [ ] Naming: consistent with conventions
|
|
182
|
+
- [ ] Naming: consistent with the conventions of THIS codebase (the user's own
|
|
183
|
+
for user-authored, the upstream's for external).
|
|
139
184
|
- [ ] Member ordering: new fields and methods must respect class member order
|
|
140
185
|
(constants → public vars → private vars → constructor → instance methods →
|
|
141
186
|
static methods). Check that added code is in the right section, not just
|
|
142
187
|
appended next to related code.
|
|
143
188
|
- [ ] Duplication: does this duplicate existing code? Search the codebase.
|
|
144
|
-
- [ ] Dead code: unused imports, commented-out code (dead guards checked in check_correctness)
|
|
189
|
+
- [ ] Dead code: unused imports, commented-out code (dead guards checked in check_correctness).
|
|
190
|
+
Imports used only inside conditional-compilation blocks are dead in
|
|
191
|
+
the other branches — reference such symbols via fully qualified name
|
|
192
|
+
inside the conditional block instead of adding a top-level import.
|
|
145
193
|
- [ ] Complexity: overly nested logic, functions doing too many things
|
|
146
|
-
- [ ] Consistency: does new code follow patterns in the same module
|
|
194
|
+
- [ ] Consistency: does new code follow patterns in the same module of THIS
|
|
195
|
+
codebase? (For user-authored code, this means the user's own conventions —
|
|
196
|
+
not a license to replicate violations from sibling files.)
|
|
147
197
|
|
|
148
198
|
Then → transition `done`.
|
|
149
199
|
transitions:
|
|
@@ -152,17 +202,24 @@ states:
|
|
|
152
202
|
check_architecture:
|
|
153
203
|
task: "Check architecture"
|
|
154
204
|
prompt: |
|
|
155
|
-
|
|
205
|
+
Authorship: `{{context.is_user_authored}}` (set in determine_authorship).
|
|
206
|
+
Treat empty as `"true"` (default).
|
|
207
|
+
|
|
208
|
+
Check structural quality (scope: `diff` = changed code, `full` = entire file).
|
|
209
|
+
|
|
210
|
+
Language-agnostic checks (apply regardless of authorship):
|
|
156
211
|
- [ ] Unnecessary indirection: wrapper classes/methods that just forward calls
|
|
157
212
|
- [ ] Dead abstractions: interface with one implementation, base class with one subclass
|
|
158
213
|
- [ ] God class: file doing too many unrelated things — should it be split?
|
|
159
214
|
- [ ] Overcomplicated: deep inheritance or nesting that could be flattened
|
|
160
215
|
- [ ] Wrong level: logic placed in the wrong layer (UI doing data work, model doing display)
|
|
161
216
|
- [ ] Stale patterns: old patterns that predate current codebase conventions
|
|
217
|
+
- [ ] Complexity without pain: abstractions, patterns, or layers added for hypothetical future needs
|
|
218
|
+
|
|
219
|
+
Architecture-skill checks (skip ONLY when `is_user_authored` is `"false"`):
|
|
162
220
|
- [ ] Initialization in parent: parent manually triggers component's internal setup — should be inside the component
|
|
163
221
|
- [ ] Serialization in runtime state: serialize/deserialize mixed into state classes — should be separate
|
|
164
222
|
- [ ] Event re-dispatch duplication: re-dispatched event carries fields that duplicate event.target
|
|
165
|
-
- [ ] Complexity without pain: abstractions, patterns, or layers added for hypothetical future needs
|
|
166
223
|
|
|
167
224
|
Only flag real simplification opportunities — don't invent hypothetical improvements.
|
|
168
225
|
|