@fernado03/zoo-flow 0.11.3 → 0.12.1

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 (106) hide show
  1. package/bin/zoo-flow.js +25 -25
  2. package/docs/architecture.md +380 -0
  3. package/docs/bloat-control.md +49 -0
  4. package/docs/command-design.md +38 -0
  5. package/docs/command-flow.md +133 -0
  6. package/docs/comparison.md +86 -0
  7. package/docs/context-packs.md +35 -0
  8. package/docs/dogfood/01-small-library.md +28 -0
  9. package/docs/dogfood/02-web-app.md +29 -0
  10. package/docs/dogfood/03-mixed-monorepo.md +29 -0
  11. package/docs/mode-rules.md +86 -0
  12. package/docs/npm-publishing.md +79 -0
  13. package/docs/out-of-scope/mainstream-issue-trackers-only.md +25 -0
  14. package/docs/out-of-scope/question-limits.md +18 -0
  15. package/docs/out-of-scope/setup-skill-verify-mode.md +15 -0
  16. package/docs/overview.md +61 -0
  17. package/docs/philosophy.md +73 -0
  18. package/docs/quality-scorecard.md +23 -0
  19. package/docs/skill-maintenance.md +32 -0
  20. package/docs/skills-index.md +64 -0
  21. package/docs/team-mode.md +46 -0
  22. package/docs/token-budget.md +22 -0
  23. package/docs/troubleshooting.md +288 -0
  24. package/examples/demo-transcripts/01-small-tweak.md +37 -0
  25. package/examples/demo-transcripts/02-unknown-bug-fix.md +37 -0
  26. package/examples/demo-transcripts/03-new-feature.md +37 -0
  27. package/examples/demo-transcripts/04-refactor.md +37 -0
  28. package/examples/demo-transcripts/05-review-and-verify.md +37 -0
  29. package/examples/feature-flow.md +117 -0
  30. package/examples/fix-flow.md +139 -0
  31. package/package.json +5 -2
  32. package/scripts/check-package-links.js +1 -1
  33. package/scripts/eval-routing.js +1 -1
  34. package/scripts/score-quality.js +3 -3
  35. package/scripts/test-doctor.js +5 -5
  36. package/templates/full/.roo/commands/{explore.md → zoo-explore.md} +18 -18
  37. package/templates/full/.roo/commands/{scaffold-context.md → zoo-scaffold-context.md} +16 -16
  38. package/templates/full/.roo/commands/{setup-matt-pocock-skills.md → zoo-setup-matt-pocock-skills.md} +7 -7
  39. package/templates/full/.roo/commands/{update-docs.md → zoo-update-docs.md} +22 -22
  40. package/templates/full/.roo/rules-custom-orchestrator/00-routing.md +22 -22
  41. package/templates/full/.roo/skills/engineering/commit-and-document/SKILL.md +163 -163
  42. package/templates/full/.roo/skills/engineering/diagnose/SKILL.md +3 -3
  43. package/templates/full/.roo/skills/engineering/grill-with-docs/SKILL.md +1 -1
  44. package/templates/full/.roo/skills/engineering/improve-codebase-architecture/SKILL.md +1 -1
  45. package/templates/full/.roo/skills/engineering/prototype/SKILL.md +47 -47
  46. package/templates/full/.roo/skills/engineering/review/SKILL.md +7 -7
  47. package/templates/full/.roo/skills/engineering/scaffold-context/SKILL.md +228 -228
  48. package/templates/full/.roo/skills/engineering/setup-matt-pocock-skills/SKILL.md +2 -2
  49. package/templates/full/.roo/skills/engineering/tdd/SKILL.md +1 -1
  50. package/templates/full/.roo/skills/engineering/to-issues/SKILL.md +2 -2
  51. package/templates/full/.roo/skills/engineering/to-prd/SKILL.md +66 -66
  52. package/templates/full/.roo/skills/engineering/triage/SKILL.md +2 -2
  53. package/templates/full/.roo/skills/engineering/tweak/SKILL.md +1 -1
  54. package/templates/full/.roo/skills/engineering/update-docs/SKILL.md +76 -76
  55. package/templates/full/.roo/skills/engineering/verify/SKILL.md +2 -2
  56. package/templates/full/.roo/skills/engineering/zoom-out/SKILL.md +1 -1
  57. package/templates/full/.roo/skills/productivity/caveman/SKILL.md +1 -1
  58. package/templates/full/.roo/skills/productivity/teach/SKILL.md +119 -119
  59. package/templates/full/.roomodes +3 -3
  60. package/tests/fixtures/doctor/helper-not-permitted/fixture.json +1 -1
  61. /package/templates/claude-code/.claude/commands/{caveman.md → zoo-caveman.md} +0 -0
  62. /package/templates/claude-code/.claude/commands/{commit-and-document.md → zoo-commit-and-document.md} +0 -0
  63. /package/templates/claude-code/.claude/commands/{diagnose.md → zoo-diagnose.md} +0 -0
  64. /package/templates/claude-code/.claude/commands/{explore.md → zoo-explore.md} +0 -0
  65. /package/templates/claude-code/.claude/commands/{feature.md → zoo-feature.md} +0 -0
  66. /package/templates/claude-code/.claude/commands/{fix.md → zoo-fix.md} +0 -0
  67. /package/templates/claude-code/.claude/commands/{grill-me.md → zoo-grill-me.md} +0 -0
  68. /package/templates/claude-code/.claude/commands/{grill-with-docs.md → zoo-grill-with-docs.md} +0 -0
  69. /package/templates/claude-code/.claude/commands/{handoff.md → zoo-handoff.md} +0 -0
  70. /package/templates/claude-code/.claude/commands/{improve-codebase-architecture.md → zoo-improve-codebase-architecture.md} +0 -0
  71. /package/templates/claude-code/.claude/commands/{prototype.md → zoo-prototype.md} +0 -0
  72. /package/templates/claude-code/.claude/commands/{refactor.md → zoo-refactor.md} +0 -0
  73. /package/templates/claude-code/.claude/commands/{review.md → zoo-review.md} +0 -0
  74. /package/templates/claude-code/.claude/commands/{scaffold-context.md → zoo-scaffold-context.md} +0 -0
  75. /package/templates/claude-code/.claude/commands/{setup-matt-pocock-skills.md → zoo-setup-matt-pocock-skills.md} +0 -0
  76. /package/templates/claude-code/.claude/commands/{tdd.md → zoo-tdd.md} +0 -0
  77. /package/templates/claude-code/.claude/commands/{teach.md → zoo-teach.md} +0 -0
  78. /package/templates/claude-code/.claude/commands/{to-issues.md → zoo-to-issues.md} +0 -0
  79. /package/templates/claude-code/.claude/commands/{to-prd.md → zoo-to-prd.md} +0 -0
  80. /package/templates/claude-code/.claude/commands/{triage.md → zoo-triage.md} +0 -0
  81. /package/templates/claude-code/.claude/commands/{tweak.md → zoo-tweak.md} +0 -0
  82. /package/templates/claude-code/.claude/commands/{update-docs.md → zoo-update-docs.md} +0 -0
  83. /package/templates/claude-code/.claude/commands/{verify.md → zoo-verify.md} +0 -0
  84. /package/templates/claude-code/.claude/commands/{write-a-skill.md → zoo-write-a-skill.md} +0 -0
  85. /package/templates/claude-code/.claude/commands/{zoom-out.md → zoo-zoom-out.md} +0 -0
  86. /package/templates/full/.roo/commands/{caveman.md → zoo-caveman.md} +0 -0
  87. /package/templates/full/.roo/commands/{commit-and-document.md → zoo-commit-and-document.md} +0 -0
  88. /package/templates/full/.roo/commands/{diagnose.md → zoo-diagnose.md} +0 -0
  89. /package/templates/full/.roo/commands/{feature.md → zoo-feature.md} +0 -0
  90. /package/templates/full/.roo/commands/{fix.md → zoo-fix.md} +0 -0
  91. /package/templates/full/.roo/commands/{grill-me.md → zoo-grill-me.md} +0 -0
  92. /package/templates/full/.roo/commands/{grill-with-docs.md → zoo-grill-with-docs.md} +0 -0
  93. /package/templates/full/.roo/commands/{handoff.md → zoo-handoff.md} +0 -0
  94. /package/templates/full/.roo/commands/{improve-codebase-architecture.md → zoo-improve-codebase-architecture.md} +0 -0
  95. /package/templates/full/.roo/commands/{prototype.md → zoo-prototype.md} +0 -0
  96. /package/templates/full/.roo/commands/{refactor.md → zoo-refactor.md} +0 -0
  97. /package/templates/full/.roo/commands/{review.md → zoo-review.md} +0 -0
  98. /package/templates/full/.roo/commands/{tdd.md → zoo-tdd.md} +0 -0
  99. /package/templates/full/.roo/commands/{teach.md → zoo-teach.md} +0 -0
  100. /package/templates/full/.roo/commands/{to-issues.md → zoo-to-issues.md} +0 -0
  101. /package/templates/full/.roo/commands/{to-prd.md → zoo-to-prd.md} +0 -0
  102. /package/templates/full/.roo/commands/{triage.md → zoo-triage.md} +0 -0
  103. /package/templates/full/.roo/commands/{tweak.md → zoo-tweak.md} +0 -0
  104. /package/templates/full/.roo/commands/{verify.md → zoo-verify.md} +0 -0
  105. /package/templates/full/.roo/commands/{write-a-skill.md → zoo-write-a-skill.md} +0 -0
  106. /package/templates/full/.roo/commands/{zoom-out.md → zoo-zoom-out.md} +0 -0
@@ -0,0 +1,117 @@
1
+ # Example: `/feature` flow
2
+
3
+ The `/feature` chain is the longest one Zoo Flow ships. It exists
4
+ specifically because the most expensive mistakes happen when an agent
5
+ implements a feature it has not properly sharpened. The chain forces
6
+ the slow steps before any code is written.
7
+
8
+ ## Setup
9
+
10
+ - Active mode: `🪃 Custom Orchestrator`.
11
+ - Example feature:
12
+
13
+ > "Add a dark mode toggle to the settings page."
14
+
15
+ ## Phase 1 — orchestrator routes
16
+
17
+ Type:
18
+
19
+ ```
20
+ /feature Add a dark mode toggle to the settings page.
21
+ ```
22
+
23
+ The orchestrator delegates with `new_task` to `system-architect`.
24
+
25
+ ## Phase 2 — architect sharpens
26
+
27
+ The architect runs `grill-with-docs` to sharpen the request. Expect:
28
+
29
+ - Questions about target users and platforms.
30
+ - Questions about existing theming infrastructure.
31
+ - Questions about persistence (per-user, per-device, system-default).
32
+ - Updates to relevant docs.
33
+
34
+ **Hard stop**: the architect halts and asks:
35
+
36
+ > Prototype, or skip to PRD?
37
+
38
+ Answer one or the other. For this example:
39
+
40
+ ```
41
+ Prototype.
42
+ ```
43
+
44
+ ## Phase 3 — prototype handoff (optional)
45
+
46
+ Because you chose Prototype:
47
+
48
+ 1. Architect summarizes the prototype question, constraints, relevant
49
+ context, and the decision the prototype is meant to settle.
50
+ 2. Architect calls `switch_mode` to `code-tweaker` **in the same task
51
+ window**.
52
+ 3. Tweaker executes `/prototype` per the command protocol.
53
+ 4. Tweaker calls `switch_mode` back to `system-architect` with the
54
+ prototype result, run command or URL if any, and the decision needed.
55
+
56
+ **Hard stop**: architect halts and asks for your verdict on the
57
+ prototype.
58
+
59
+ This is the phase that breaks most often if the architect skips the
60
+ `switch_mode`. See
61
+ [`docs/troubleshooting.md`](../docs/troubleshooting.md#prototype-running-in-the-wrong-mode).
62
+
63
+ ## Phase 4 — PRD
64
+
65
+ The architect runs `to-prd`, summarizing the prior phases in three
66
+ bullets and producing a PRD draft.
67
+
68
+ **Hard stop**: "Ready to slice into issues?"
69
+
70
+ Answer:
71
+
72
+ ```
73
+ Yes.
74
+ ```
75
+
76
+ ## Phase 5 — slice into issues
77
+
78
+ The architect runs `to-issues`, producing a list of well-scoped issues.
79
+
80
+ **Hard stop**: wait for your approval of the issue list. Edit, drop,
81
+ or merge issues here. Once approved, the chain continues.
82
+
83
+ ## Phase 6 — implement
84
+
85
+ The architect summarizes the approved issues and `switch_mode`s to
86
+ `code-tweaker`. The tweaker, for each issue:
87
+
88
+ 1. Runs `/tdd` per the command protocol.
89
+ 2. Implements the issue.
90
+ 3. After each issue ships, suggests `/commit-and-document`.
91
+
92
+ The orchestrator does not auto-launch `/commit-and-document`. You run
93
+ it explicitly when you want the commit.
94
+
95
+ ## Phase 7 — return
96
+
97
+ When the chain completes (or hits a blocker), the active mode calls
98
+ `attempt_completion`. The orchestrator summarizes and halts.
99
+
100
+ ## Pass criteria
101
+
102
+ - [ ] Orchestrator delegated to `system-architect`.
103
+ - [ ] Architect halted after sharpening, asked for Prototype or PRD.
104
+ - [ ] If you picked Prototype, the architect used `switch_mode` to
105
+ hand off; the architect did not run the prototype itself.
106
+ - [ ] Architect did not edit application source code at any point.
107
+ - [ ] Architect halted before producing the PRD, after the PRD, and
108
+ after the issue list.
109
+ - [ ] Tweaker ran `/tdd` per issue, not freeform implementation.
110
+ - [ ] Tweaker did not commit without explicit approval.
111
+
112
+ ## Why this chain has so many stops
113
+
114
+ Each hard stop is a place where the cheapest fix is "your input,
115
+ right now". A wrong sharpening assumption is cheap to correct in
116
+ phase 2, expensive after a PRD, and very expensive after an issue
117
+ slice. The hard stops are not friction — they are the design.
@@ -0,0 +1,139 @@
1
+ # Example: `/fix` flow
2
+
3
+ A worked example of the multi-phase `/fix` chain: orchestrator delegates
4
+ to the architect, architect diagnoses, architect switches to the tweaker
5
+ to implement, tweaker switches back, architect runs the post-mortem,
6
+ tweaker prepares the commit. The whole flow has explicit HITL stops.
7
+
8
+ ## Setup
9
+
10
+ - Active mode: `🪃 Custom Orchestrator`.
11
+ - Workspace has a real bug to fix. For this example, assume:
12
+
13
+ > "The login button does nothing on the second click. First click
14
+ > works."
15
+
16
+ ## Phase 1 — orchestrator routes
17
+
18
+ Type:
19
+
20
+ ```
21
+ /fix The login button does nothing on the second click. First click works.
22
+ ```
23
+
24
+ **Expected**
25
+
26
+ Orchestrator looks up the routing matrix and delegates with `new_task`
27
+ targeting `system-architect`. The delegated message includes the
28
+ slash form, user context, proceed policy, command-protocol pointer,
29
+ skills location, and the completion rule.
30
+
31
+ ## Phase 2 — architect diagnoses
32
+
33
+ The new task window opens in `🏗️ System Architect`. The architect:
34
+
35
+ 1. Loads `/fix` per the command protocol.
36
+ 2. Runs the `diagnose` skill, phases 1–3.
37
+ 3. Produces a short list of hypotheses.
38
+ 4. **Halts** and asks you to pick one.
39
+
40
+ **Expected message (paraphrased)**
41
+
42
+ > Hypotheses:
43
+ > 1. Click handler is wired once and never re-bound after a state change.
44
+ > 2. The button enters a disabled state on first click and never resets.
45
+ > 3. A queued network request is canceling the second click's handler.
46
+ >
47
+ > Which would you like to instrument? (1 / 2 / 3)
48
+
49
+ You answer:
50
+
51
+ ```
52
+ 2
53
+ ```
54
+
55
+ ## Phase 3 — architect instruments
56
+
57
+ The architect runs phase 4 of the `diagnose` skill on hypothesis 2.
58
+ This phase may involve reading state-management code, adding a
59
+ console-log or instrumentation suggestion (Markdown only — the architect
60
+ cannot edit source), and producing a confirmed root cause.
61
+
62
+ **Expected**
63
+
64
+ > Root cause confirmed: `LoginButton` sets `disabled` on the first
65
+ > click and the `onSuccess` handler does not reset it. The second
66
+ > click is being absorbed by the disabled state.
67
+
68
+ The architect summarizes the proposed fix and prepares to hand off.
69
+
70
+ ## Phase 4 — architect switches to tweaker
71
+
72
+ The architect calls `switch_mode` to `code-tweaker` **inside the same
73
+ task window** with a summary of:
74
+
75
+ - The root cause.
76
+ - The proposed fix (`onSuccess` resets `disabled`).
77
+ - The files involved.
78
+ - The tests to add or extend.
79
+
80
+ The tweaker takes over without losing context.
81
+
82
+ ## Phase 5 — tweaker implements
83
+
84
+ The tweaker:
85
+
86
+ 1. Edits the `LoginButton` component to reset `disabled` on success
87
+ and on error.
88
+ 2. Adds or extends tests covering the second-click case.
89
+ 3. Runs the test suite.
90
+ 4. Reports back.
91
+
92
+ **HITL stop**: the tweaker does not commit. Per the git rule, it waits
93
+ for your approval.
94
+
95
+ ## Phase 6 — back to architect for post-mortem
96
+
97
+ The tweaker calls `switch_mode` back to `system-architect`. The
98
+ architect runs phase 6 of `diagnose` (post-mortem):
99
+
100
+ - What was the original assumption that masked the bug?
101
+ - Is this an isolated mistake or a pattern?
102
+ - If a pattern, would `/refactor` help?
103
+
104
+ The architect produces a short post-mortem note in `docs/` or
105
+ `.scratch/` (Markdown only) and either drops the matter there or
106
+ suggests `/refactor`.
107
+
108
+ ## Phase 7 — tweaker prepares the commit
109
+
110
+ The architect switches back to the tweaker. The tweaker suggests
111
+ `/commit-and-document`. **The orchestrator does not auto-launch it.**
112
+ That command runs only when you type it.
113
+
114
+ ## Phase 8 — return to orchestrator
115
+
116
+ When the chain is complete (or blocked), the active mode calls
117
+ `attempt_completion`. The orchestrator summarizes for you and halts.
118
+
119
+ ## Pass criteria
120
+
121
+ - [ ] Orchestrator delegated to `system-architect`, not the tweaker.
122
+ - [ ] Architect halted after phase 3 hypotheses, did not instrument
123
+ until you picked one.
124
+ - [ ] Architect did not edit source code at any point.
125
+ - [ ] Architect used `switch_mode` (same window) to hand off, not
126
+ `new_task`.
127
+ - [ ] Tweaker did not run `git commit` or `git push` without your
128
+ explicit approval.
129
+ - [ ] After return, orchestrator halted instead of auto-launching
130
+ `/commit-and-document`.
131
+
132
+ ## Common slips
133
+
134
+ - Architect tries to edit source: see
135
+ [`docs/troubleshooting.md`](../docs/troubleshooting.md#architect-trying-to-edit-source).
136
+ - Tweaker commits without approval: tighten the git rule in the
137
+ tweaker's `customInstructions`.
138
+ - Orchestrator launches `/commit-and-document` automatically: see
139
+ [`docs/troubleshooting.md`](../docs/troubleshooting.md#slash-command-leakage-from-subtask-summaries).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fernado03/zoo-flow",
3
- "version": "0.11.3",
3
+ "version": "0.12.1",
4
4
  "description": "Structured workflow templates for AI coding assistants",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,10 @@
10
10
  "bin/",
11
11
  "templates/",
12
12
  "scripts/",
13
- "tests/"
13
+ "tests/",
14
+ "docs/",
15
+ "examples/",
16
+ "LICENSE"
14
17
  ],
15
18
  "keywords": [
16
19
  "ai",
@@ -12,7 +12,7 @@ const packageJsonPath = path.join(packageRoot, "package.json");
12
12
 
13
13
  const failures = [];
14
14
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
15
- const files = Array.isArray(packageJson.files) ? packageJson.files : [];
15
+ const files = Array.isArray(packageJson.files) ? packageJson.files.map((f) => f.replace(/\/$/, "")) : [];
16
16
  const forbidden = [".git", "node_modules", ".scratch", ".zoo-flow-backup", "*.tgz"];
17
17
 
18
18
  for (const entry of files) {
@@ -105,7 +105,7 @@ if (!fs.existsSync(casesPath)) {
105
105
  fail(lineNumber, "expected_command must start with /");
106
106
  } else {
107
107
  const commandName = record.expected_command.slice(1);
108
- const commandPath = path.join(templateRoot, ".roo", "commands", `${commandName}.md`);
108
+ const commandPath = path.join(templateRoot, ".roo", "commands", `zoo-${commandName}.md`);
109
109
  if (!fs.existsSync(commandPath)) {
110
110
  fail(lineNumber, `missing command file for ${record.expected_command}`);
111
111
  } else {
@@ -37,7 +37,7 @@ function check(condition, description, category) {
37
37
  const files = fs.readdirSync(commandsDir).filter((f) => f.endsWith(".md"));
38
38
  for (const file of files) {
39
39
  const text = fs.readFileSync(path.join(commandsDir, file), "utf8");
40
- const isModeless = file === "caveman.md";
40
+ const isModeless = file === "zoo-caveman.md";
41
41
  r.total++;
42
42
  if (isModeless) {
43
43
  r.pass++; // modeless by design, not a failure
@@ -183,7 +183,7 @@ function check(condition, description, category) {
183
183
  (function () {
184
184
  const r = { pass: 0, total: 0 };
185
185
 
186
- const verifyCmd = path.join(templateRoot, ".roo", "commands", "verify.md");
186
+ const verifyCmd = path.join(templateRoot, ".roo", "commands", "zoo-verify.md");
187
187
  r.total++;
188
188
  r.pass += check(fs.existsSync(verifyCmd), "verify command exists", "verification") ? 1 : 0;
189
189
 
@@ -209,7 +209,7 @@ function check(condition, description, category) {
209
209
  (function () {
210
210
  const r = { pass: 0, total: 0 };
211
211
 
212
- const reviewCmd = path.join(templateRoot, ".roo", "commands", "review.md");
212
+ const reviewCmd = path.join(templateRoot, ".roo", "commands", "zoo-review.md");
213
213
  r.total++;
214
214
  r.pass += check(fs.existsSync(reviewCmd), "review command exists", "review_process") ? 1 : 0;
215
215
 
@@ -42,21 +42,21 @@ function mutate(root, mutation) {
42
42
  if (mutation === "missing-roomodes") {
43
43
  fs.rmSync(path.join(root, ".roomodes"));
44
44
  } else if (mutation === "missing-command") {
45
- fs.rmSync(command("review.md"));
45
+ fs.rmSync(command("zoo-review.md"));
46
46
  } else if (mutation === "missing-skill") {
47
47
  fs.rmSync(skill("engineering", "tweak", "SKILL.md"));
48
48
  } else if (mutation === "bad-skill-wrapper") {
49
- replaceInFile(command("caveman.md"), "Skill:", "Run skill:");
49
+ replaceInFile(command("zoo-caveman.md"), "Skill:", "Run skill:");
50
50
  } else if (mutation === "bad-mode-slug") {
51
- replaceInFile(command("review.md"), "mode: system-architect", "mode: architect");
51
+ replaceInFile(command("zoo-review.md"), "mode: system-architect", "mode: architect");
52
52
  } else if (mutation === "bad-built-in-delegation") {
53
53
  fs.appendFileSync(path.join(root, ".roo", "rules-custom-orchestrator", "00-routing.md"), "\nUse new_task to architect for review.\n");
54
54
  } else if (mutation === "bad-zoo-path") {
55
55
  fs.appendFileSync(path.join(root, ".roo", "rules", "00-paths.md"), "\nBad path: .zoo/commands/example.md\n");
56
56
  } else if (mutation === "helper-missing-mode") {
57
- replaceInFile(command("diagnose.md"), /^mode: system-architect\r?\n/m, "");
57
+ replaceInFile(command("zoo-diagnose.md"), /^mode: system-architect\r?\n/m, "");
58
58
  } else if (mutation === "helper-not-permitted") {
59
- replaceInFile(path.join(root, ".roomodes"), "/diagnose, ", "");
59
+ replaceInFile(path.join(root, ".roomodes"), "/zoo-diagnose, ", "");
60
60
  } else {
61
61
  throw new Error(`Unknown mutation: ${mutation}`);
62
62
  }
@@ -1,18 +1,18 @@
1
- ---
2
- description: "Explore unfamiliar code before /feature, /refactor, or /fix. Produces written map."
3
- argument-hint: <feature or folder to map>
4
- mode: system-architect
5
- ---
6
-
7
- Explore unfamiliar code and produce a written map. Follow the skill exactly.
8
-
9
- Skill: `.roo/skills/engineering/zoom-out/SKILL.md`
10
-
11
- EXECUTION RULES:
12
- 1. READ `.zoo-flow/CONTEXT.md`. If it does not exist, output one line before step 2: "No CONTEXT.md found. Run /scaffold-context to fill, or continue without." Do not invent content.
13
- 2. OUTPUT MAP: Create markdown with sections: Domain language, Modules, Data flow, Seams/callers, ADRs, Open questions. Derive slug from the target area (e.g. "auth module" → `auth-module.md`). Write to `.scratch/explorations/<YYYY-MM-DD>/<slug>.md`.
14
- 3. WRITE POINTER: Write the exact file path to `.scratch/LAST-EXPLORATION.md` so next commands can find it.
15
- 4. NEXT STEPS: Suggest `/scaffold-context`, `/feature`, `/refactor`, or `/fix`. DO NOT auto-launch.
16
- 5. COMPLETION: Call `attempt_completion` with the exact file path, status, and recommended next command. Do NOT use `ask_followup_question` or write results as plain text.
17
-
18
- $ARGUMENTS
1
+ ---
2
+ description: "Explore unfamiliar code before /feature, /refactor, or /fix. Produces written map."
3
+ argument-hint: <feature or folder to map>
4
+ mode: system-architect
5
+ ---
6
+
7
+ Explore unfamiliar code and produce a written map. Follow the skill exactly.
8
+
9
+ Skill: `.roo/skills/engineering/zoom-out/SKILL.md`
10
+
11
+ EXECUTION RULES:
12
+ 1. READ `.zoo-flow/CONTEXT.md`. If it does not exist, output one line before step 2: "No CONTEXT.md found. Run /scaffold-context to fill, or continue without." Do not invent content.
13
+ 2. OUTPUT MAP: Create markdown with sections: Domain language, Modules, Data flow, Seams/callers, ADRs, Open questions. Derive slug from the target area (e.g. "auth module" → `auth-module.md`). Write to `.scratch/explorations/<YYYY-MM-DD>/<slug>.md`.
14
+ 3. WRITE POINTER: Write the exact file path to `.scratch/LAST-EXPLORATION.md` so next commands can find it.
15
+ 4. NEXT STEPS: Suggest `/scaffold-context`, `/feature`, `/refactor`, or `/fix`. DO NOT auto-launch.
16
+ 5. COMPLETION: Call `attempt_completion` with the exact file path, status, and recommended next command. Do NOT use `ask_followup_question` or write results as plain text.
17
+
18
+ $ARGUMENTS
@@ -1,16 +1,16 @@
1
- ---
2
- description: "Bootstrap .zoo-flow/CONTEXT.md (and 0-2 starter ADRs) for an existing project by scanning code for domain terms and cross-cutting decisions. Shows proposed entries inline and asks for confirm before writing. Use when starting Zoo Flow on a project with no CONTEXT.md, or to expand a thin one."
3
- argument-hint: <optional focus area, e.g. "auth", "billing", or empty for whole project>
4
- mode: code-tweaker
5
- ---
6
-
7
- Bootstrap .zoo-flow/CONTEXT.md for an existing project. Follow the skill exactly.
8
-
9
- Skill: `.roo/skills/engineering/scaffold-context/SKILL.md`
10
-
11
- EXECUTION RULES:
12
- 1. APPLY the slot discovery rule from `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to find current CONTEXT.md, ADRs.
13
- 2. IF `.zoo-flow/CONTEXT.md` exists and is non-empty, ASK: skip / merge (default) / replace. Skip = do nothing. Merge = add only new terms, never overwrite. Replace = full rewrite from scan.
14
- 3. DO NOT auto-launch any follow-up commands.
15
-
16
- $ARGUMENTS
1
+ ---
2
+ description: "Bootstrap .zoo-flow/CONTEXT.md (and 0-2 starter ADRs) for an existing project by scanning code for domain terms and cross-cutting decisions. Shows proposed entries inline and asks for confirm before writing. Use when starting Zoo Flow on a project with no CONTEXT.md, or to expand a thin one."
3
+ argument-hint: <optional focus area, e.g. "auth", "billing", or empty for whole project>
4
+ mode: code-tweaker
5
+ ---
6
+
7
+ Bootstrap .zoo-flow/CONTEXT.md for an existing project. Follow the skill exactly.
8
+
9
+ Skill: `.roo/skills/engineering/scaffold-context/SKILL.md`
10
+
11
+ EXECUTION RULES:
12
+ 1. APPLY the slot discovery rule from `.roo/skills/engineering/grill-with-docs/CONTEXT-FORMAT.md` to find current CONTEXT.md, ADRs.
13
+ 2. IF `.zoo-flow/CONTEXT.md` exists and is non-empty, ASK: skip / merge (default) / replace. Skip = do nothing. Merge = add only new terms, never overwrite. Replace = full rewrite from scan.
14
+ 3. DO NOT auto-launch any follow-up commands.
15
+
16
+ $ARGUMENTS
@@ -1,8 +1,8 @@
1
- ---
2
- description: "Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, or `triage` — or if those skills appear to be missing issue tracker, triage label, or domain-doc configuration."
3
- mode: code-tweaker
4
- ---
5
-
1
+ ---
2
+ description: "Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, or `triage` — or if those skills appear to be missing issue tracker, triage label, or domain-doc configuration."
3
+ mode: code-tweaker
4
+ ---
5
+
6
6
  Skill: `.roo/skills/engineering/setup-matt-pocock-skills/SKILL.md`
7
-
8
- $ARGUMENTS
7
+
8
+ $ARGUMENTS
@@ -1,22 +1,22 @@
1
- ---
2
- description: "Update repo documentation so it matches the current code."
3
- argument-hint: <doc or area to update>
4
- mode: code-tweaker
5
- ---
6
-
7
- Update repo documentation so it matches the current code. Surgical edits only — read existing docs first, verify claims against code, never rewrite wholesale unless the existing doc is unsalvageable. Follow the skill exactly.
8
-
9
- Skill: `.roo/skills/engineering/update-docs/SKILL.md`
10
-
11
- Find the target doc in `.zoo-flow/` or `docs/`. If it does not exist, ask once: "No <doc> found. Create a stub at .zoo-flow/<doc>? (yes / pick-existing / skip)".
12
-
13
- Do NOT use this for:
14
-
15
- - Domain glossary terms — use `/grill-with-docs`
16
- - ADRs — use `/grill-with-docs` or `/refactor`
17
- - Local commit journal entries — use `/commit-and-document`
18
- - Read-only understanding — use `/explore`
19
-
20
- If `$ARGUMENTS` is empty, ask once: "Which documentation file or area should I update?"
21
-
22
- $ARGUMENTS
1
+ ---
2
+ description: "Update repo documentation so it matches the current code."
3
+ argument-hint: <doc or area to update>
4
+ mode: code-tweaker
5
+ ---
6
+
7
+ Update repo documentation so it matches the current code. Surgical edits only — read existing docs first, verify claims against code, never rewrite wholesale unless the existing doc is unsalvageable. Follow the skill exactly.
8
+
9
+ Skill: `.roo/skills/engineering/update-docs/SKILL.md`
10
+
11
+ Find the target doc in `.zoo-flow/` or `docs/`. If it does not exist, ask once: "No <doc> found. Create a stub at .zoo-flow/<doc>? (yes / pick-existing / skip)".
12
+
13
+ Do NOT use this for:
14
+
15
+ - Domain glossary terms — use `/grill-with-docs`
16
+ - ADRs — use `/grill-with-docs` or `/refactor`
17
+ - Local commit journal entries — use `/commit-and-document`
18
+ - Read-only understanding — use `/explore`
19
+
20
+ If `$ARGUMENTS` is empty, ask once: "Which documentation file or area should I update?"
21
+
22
+ $ARGUMENTS
@@ -44,25 +44,25 @@ Slash commands are internal routing labels unless the user explicitly typed one
44
44
 
45
45
  ## Routed commands
46
46
 
47
- | Workflow | Command | Mode |
48
- | -------------------- | ---------------------- | ---------------- |
49
- | small implementation | `/tweak` | code-tweaker |
50
- | test-first | `/tdd` | code-tweaker |
51
- | documentation update | `/update-docs` | code-tweaker |
52
- | commit and journal | `/commit-and-document` | code-tweaker |
53
- | prototype | `/prototype` | code-tweaker |
54
- | context scaffolding | `/scaffold-context` | code-tweaker |
55
- | diagnosis | `/fix` | system-architect |
56
- | feature planning | `/feature` | system-architect |
57
- | refactor planning | `/refactor` | system-architect |
58
- | exploration | `/explore` | system-architect |
59
- | issue triage | `/triage` | system-architect |
60
- | review | `/review` | system-architect |
61
- | verification | `/verify` | code-tweaker |
47
+ | Workflow | Command | Mode |
48
+ | -------------------- | ----------------------- | ---------------- |
49
+ | small implementation | `/zoo-tweak` | code-tweaker |
50
+ | test-first | `/zoo-tdd` | code-tweaker |
51
+ | documentation update | `/zoo-update-docs` | code-tweaker |
52
+ | commit and journal | `/zoo-commit-and-document` | code-tweaker |
53
+ | prototype | `/zoo-prototype` | code-tweaker |
54
+ | context scaffolding | `/zoo-scaffold-context` | code-tweaker |
55
+ | diagnosis | `/zoo-fix` | system-architect |
56
+ | feature planning | `/zoo-feature` | system-architect |
57
+ | refactor planning | `/zoo-refactor` | system-architect |
58
+ | exploration | `/zoo-explore` | system-architect |
59
+ | issue triage | `/zoo-triage` | system-architect |
60
+ | review | `/zoo-review` | system-architect |
61
+ | verification | `/zoo-verify` | code-tweaker |
62
62
 
63
63
  ## Routing decision guide
64
64
 
65
- Read intent, not keywords. Top-down: 1. unknown code area or unclear next move → exploration; 2. broken behavior with unknown cause → diagnosis; 3. new capability needing design, PRD, issue slicing, or phase gates → feature planning; 4. working behavior but structure is the problem → refactor planning; 5. small known low-risk change → small implementation; 6. clear behavior and interface, user wants tests first → test-first; 7. throwaway design/state/UI uncertainty → prototype; 8. docs drift from code → documentation update; 9. finished work needs commit/journal → commit and journal; 10. issue creation, sorting, labels, or tracker workflow → issue triage; 11. diff, branch, PR, standards, architecture, or pre-commit inspection → review; 12. check if this passes, run tests for this change, verify the branch, or make sure nothing broke → verification.
65
+ Read intent, not keywords. Top-down: 1. unknown code area or unclear next move → `/zoo-explore`; 2. broken behavior with unknown cause → `/zoo-fix`; 3. new capability needing design, PRD, issue slicing, or phase gates → `/zoo-feature`; 4. working behavior but structure is the problem → `/zoo-refactor`; 5. small known low-risk change → `/zoo-tweak`; 6. clear behavior and interface, user wants tests first → `/zoo-tdd`; 7. throwaway design/state/UI uncertainty → `/zoo-prototype`; 8. docs drift from code → `/zoo-update-docs`; 9. finished work needs commit/journal → `/zoo-commit-and-document`; 10. issue creation, sorting, labels, or tracker workflow → `/zoo-triage`; 11. diff, branch, PR, standards, architecture, or pre-commit inspection → `/zoo-review`; 12. check if this passes, run tests for this change, verify the branch, or make sure nothing broke → `/zoo-verify`.
66
66
 
67
67
  ## Routing weight
68
68
 
@@ -78,7 +78,7 @@ Diagnosis vs small implementation: unknown cause → diagnosis; known cause →
78
78
 
79
79
  ## Confidence and presentation
80
80
 
81
- Explicit slash command from user = approval; route as-is. Clear free-form request = recommend one plain-language workflow plus one safe alternative if useful. Genuine tie = offer numbered plain-language choices. Prefer lighter workflow when safe, but do not skip needed diagnosis, planning, or approval. Follow `.roo/rules/03-manual-reply-protocol.md`: no slash commands, mode names, or executable routing text in selectable options. Good free-form option: 1. Make the small implementation change; 2. Explore the area first. Bad free-form option: 1. `/tweak`; 2. `/explore`.
81
+ Explicit slash command from user = approval; route as-is. Clear free-form request = recommend one plain-language workflow plus one safe alternative if useful. Genuine tie = offer numbered plain-language choices. Prefer lighter workflow when safe, but do not skip needed diagnosis, planning, or approval. Follow `.roo/rules/03-manual-reply-protocol.md`: no slash commands, mode names, or executable routing text in selectable options. Good free-form option: 1. Make the small implementation change; 2. Explore the area first. Bad free-form option: 1. `/zoo-tweak`; 2. `/zoo-explore`.
82
82
 
83
83
  ## Approval gate
84
84
 
@@ -94,8 +94,8 @@ For non-trivial work, suggest the next command chain only after the current comm
94
94
 
95
95
  Recommended chains:
96
96
 
97
- - test-firstverification → review → commit and journal
98
- - diagnosisverification → review → commit and journal
99
- - refactor planning verification → review → commit and journal
100
- - feature planning verification → review → commit and journal
101
- - small implementation verification or review when risk is R3+
97
+ - `/zoo-tdd``/zoo-verify``/zoo-review``/zoo-commit-and-document`
98
+ - `/zoo-fix``/zoo-verify``/zoo-review``/zoo-commit-and-document`
99
+ - `/zoo-refactor``/zoo-verify``/zoo-review``/zoo-commit-and-document`
100
+ - `/zoo-feature``/zoo-verify``/zoo-review``/zoo-commit-and-document`
101
+ - `/zoo-tweak``/zoo-verify` or `/zoo-review` when risk is R3+