@fernado03/zoo-flow 0.9.1 → 0.11.0

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 (64) hide show
  1. package/README.md +139 -83
  2. package/bin/zoo-flow.js +444 -134
  3. package/package.json +3 -3
  4. package/templates/claude-code/.claude/commands/caveman.md +26 -0
  5. package/templates/claude-code/.claude/commands/commit-and-document.md +27 -0
  6. package/templates/claude-code/.claude/commands/diagnose.md +27 -0
  7. package/templates/claude-code/.claude/commands/feature.md +46 -0
  8. package/templates/claude-code/.claude/commands/fix.md +45 -0
  9. package/templates/claude-code/.claude/commands/grill-me.md +27 -0
  10. package/templates/claude-code/.claude/commands/grill-with-docs.md +27 -0
  11. package/templates/claude-code/.claude/commands/handoff.md +27 -0
  12. package/templates/claude-code/.claude/commands/improve-codebase-architecture.md +27 -0
  13. package/templates/claude-code/.claude/commands/prototype.md +27 -0
  14. package/templates/claude-code/.claude/commands/refactor.md +46 -0
  15. package/templates/claude-code/.claude/commands/review.md +27 -0
  16. package/templates/claude-code/.claude/commands/scaffold-context.md +27 -0
  17. package/templates/claude-code/.claude/commands/setup-matt-pocock-skills.md +27 -0
  18. package/templates/claude-code/.claude/commands/tdd.md +27 -0
  19. package/templates/claude-code/.claude/commands/teach.md +27 -0
  20. package/templates/claude-code/.claude/commands/to-issues.md +27 -0
  21. package/templates/claude-code/.claude/commands/to-prd.md +27 -0
  22. package/templates/claude-code/.claude/commands/triage.md +27 -0
  23. package/templates/claude-code/.claude/commands/tweak.md +27 -0
  24. package/templates/claude-code/.claude/commands/update-docs.md +27 -0
  25. package/templates/claude-code/.claude/commands/verify.md +27 -0
  26. package/templates/claude-code/.claude/commands/write-a-skill.md +27 -0
  27. package/templates/claude-code/.claude/commands/zoom-out.md +27 -0
  28. package/templates/claude-code/.claude/skills/engineering/commit-and-document/SKILL.md +37 -0
  29. package/templates/claude-code/.claude/skills/engineering/diagnose/SKILL.md +136 -0
  30. package/templates/claude-code/.claude/skills/engineering/explore/SKILL.md +61 -0
  31. package/templates/claude-code/.claude/skills/engineering/feature/SKILL.md +66 -0
  32. package/templates/claude-code/.claude/skills/engineering/fix/SKILL.md +59 -0
  33. package/templates/claude-code/.claude/skills/engineering/grill-with-docs/SKILL.md +35 -0
  34. package/templates/claude-code/.claude/skills/engineering/improve-codebase-architecture/SKILL.md +39 -0
  35. package/templates/claude-code/.claude/skills/engineering/prototype/SKILL.md +34 -0
  36. package/templates/claude-code/.claude/skills/engineering/refactor/SKILL.md +59 -0
  37. package/templates/claude-code/.claude/skills/engineering/review/SKILL.md +144 -0
  38. package/templates/claude-code/.claude/skills/engineering/scaffold-context/SKILL.md +44 -0
  39. package/templates/claude-code/.claude/skills/engineering/setup-matt-pocock-skills/SKILL.md +48 -0
  40. package/templates/claude-code/.claude/skills/engineering/tdd/SKILL.md +81 -0
  41. package/templates/claude-code/.claude/skills/engineering/to-issues/SKILL.md +37 -0
  42. package/templates/claude-code/.claude/skills/engineering/to-prd/SKILL.md +39 -0
  43. package/templates/claude-code/.claude/skills/engineering/triage/SKILL.md +36 -0
  44. package/templates/claude-code/.claude/skills/engineering/tweak/SKILL.md +37 -0
  45. package/templates/claude-code/.claude/skills/engineering/update-docs/SKILL.md +33 -0
  46. package/templates/claude-code/.claude/skills/engineering/verify/SKILL.md +38 -0
  47. package/templates/claude-code/.claude/skills/engineering/zoom-out/SKILL.md +74 -0
  48. package/templates/claude-code/.claude/skills/productivity/caveman/SKILL.md +24 -0
  49. package/templates/claude-code/.claude/skills/productivity/grill-me/SKILL.md +21 -0
  50. package/templates/claude-code/.claude/skills/productivity/handoff/SKILL.md +20 -0
  51. package/templates/claude-code/.claude/skills/productivity/teach/SKILL.md +116 -0
  52. package/templates/claude-code/.claude/skills/productivity/write-a-skill/SKILL.md +59 -0
  53. package/templates/claude-code/.zoo-flow/CONTEXT.md +8 -0
  54. package/templates/claude-code/.zoo-flow/START_HERE.md +28 -0
  55. package/templates/claude-code/.zoo-flow/docs/adr/0001-record-architecture-decisions.md +22 -0
  56. package/templates/claude-code/.zoo-flow/evals/no-regression-checklist.md +26 -0
  57. package/templates/claude-code/.zoo-flow/evals/routing-cases.jsonl +18 -0
  58. package/templates/claude-code/.zoo-flow/evals/routing-cases.md +211 -0
  59. package/templates/claude-code/.zoo-flow/project-profile.json +24 -0
  60. package/templates/claude-code/CLAUDE.md +237 -0
  61. package/templates/full/.roo/rules/07-scratch-working-memory.md +39 -0
  62. package/templates/full/.roo/skills/engineering/diagnose/SKILL.md +44 -10
  63. package/templates/full/.roo/skills/engineering/review/SKILL.md +35 -11
  64. package/templates/full/.roo/skills/engineering/zoom-out/SKILL.md +55 -1
package/README.md CHANGED
@@ -1,64 +1,120 @@
1
1
  # Zoo Flow
2
2
 
3
- > **Workflow control plane for [Zoo Code](https://docs.zoocode.dev/).**
4
-
5
- Zoo Flow is a Zoo Code workflow-control template.
6
-
7
- It does not try to be a giant skills pack. It makes Zoo Code predictable:
8
- free-form requests are routed through Custom Orchestrator, risky work gets
9
- planning gates, implementation stays in Code Tweaker, architecture stays in
10
- System Architect, and every command follows a small command/skill contract.
3
+ > **Workflow control plane for [Zoo Code](https://docs.zoocode.dev/) and [Claude Code](https://docs.anthropic.com/en/docs/claude-code).**
4
+
5
+ Zoo Flow is a workflow-control template that supports both Zoo Code and Claude Code.
6
+
7
+ It does not try to be a giant skills pack. It makes AI coding assistants predictable:
8
+ free-form requests are routed through the appropriate profile, risky work gets
9
+ planning gates, implementation stays in the Implementer profile, architecture stays in
10
+ the Architect profile, and every command follows a small command/skill contract.
11
+
12
+ **Platform support:**
13
+ - **Zoo Code**: Uses `.roomodes`, `.roo/commands/`, `.roo/skills/`, and `.roo/rules/`
14
+ - **Claude Code**: Uses `CLAUDE.md`, `.claude/commands/`, and `.claude/skills/`
11
15
 
12
16
  For the deeper rationale, see [`docs/overview.md`](docs/overview.md)
13
17
  and [`docs/philosophy.md`](docs/philosophy.md).
14
18
 
15
19
  ## Install
16
20
 
17
- Run this from the root of the project where you use Zoo Code:
21
+ Run this from the root of the project where you use Zoo Code or Claude Code:
18
22
 
19
23
  ```bash
20
24
  npx @fernado03/zoo-flow@latest init
21
25
  ```
22
26
 
23
- This copies the runtime template (`.roomodes` and `.roo/`) plus the
24
- `.zoo-flow/` starter docs into your project. It does not copy this
25
- repository's `docs/` folder. Zoo Flow also ensures `.roo/`, `.roomodes`, and `.zoo-flow/` are
26
- listed in `.gitignore` so generated config and local context docs stay
27
- out of normal commits.
27
+ Zoo Flow will prompt you to choose a platform:
28
+
29
+ ```
30
+ ? Which platform would you like to install for?
31
+ 1. Claude Code
32
+ 2. Zoo Code
33
+ ```
28
34
 
29
- If `.roomodes` or `.roo/` already exist, Zoo Flow stops without
30
- overwriting. To back up and overwrite:
35
+ ### Claude Code Installation
36
+
37
+ For Claude Code, this copies:
38
+ - `CLAUDE.md` - Project instructions with behavioral profiles and routing guide
39
+ - `.claude/commands/` - 25 slash commands adapted for Claude Code
40
+ - `.claude/skills/` - Workflow skills with Claude Code tool names
41
+ - `.zoo-flow/` - Starter docs and context files
42
+
43
+ Zoo Flow ensures `.claude/` and `.zoo-flow/` are listed in `.gitignore` so generated config and local context docs stay out of normal commits.
44
+
45
+ If `CLAUDE.md` or `.claude/` already exist, Zoo Flow stops without overwriting. To back up and overwrite:
31
46
 
32
47
  ```bash
33
48
  npx @fernado03/zoo-flow@latest init --force
34
49
  ```
35
50
 
36
- A timestamped backup is always written to `.zoo-flow-backup/` before
37
- overwrite.
51
+ After install, open Claude Code in the project directory. The slash commands (e.g., `/tweak`, `/fix`, `/feature`) will be available immediately.
52
+
53
+ ### Zoo Code Installation
54
+
55
+ For Zoo Code, this copies:
56
+ - `.roomodes` - Mode definitions (Custom Orchestrator, System Architect, Code Tweaker)
57
+ - `.roo/commands/` - Slash commands with routing metadata
58
+ - `.roo/skills/` - Workflow skills with Zoo Code tool names
59
+ - `.roo/rules/` - Global and mode-specific rules
60
+ - `.zoo-flow/` - Starter docs and context files
61
+
62
+ Zoo Flow ensures `.roo/`, `.roomodes`, and `.zoo-flow/` are listed in `.gitignore` so generated config and local context docs stay out of normal commits.
63
+
64
+ If `.roomodes` or `.roo/` already exist, Zoo Flow stops without overwriting. To back up and overwrite:
65
+
66
+ ```bash
67
+ npx @fernado03/zoo-flow@latest init --force
68
+ ```
69
+
70
+ A timestamped backup is always written to `.zoo-flow-backup/` before overwrite.
71
+
72
+ After install, reload VS Code (Command Palette → **Developer: Reload Window**) and open Zoo Code.
73
+
74
+ ## Validate Install
75
+
76
+ Use this inside a project after install or update:
38
77
 
39
- After install, reload VS Code (Command Palette → **Developer: Reload
40
- Window**) and open Zoo Code.
41
-
42
- ## Validate Install
43
-
44
- Use this inside a project after install or update:
45
-
46
- ```bash
47
- npx @fernado03/zoo-flow@latest doctor
48
- ```
78
+ ```bash
79
+ npx @fernado03/zoo-flow@latest doctor
80
+ ```
49
81
 
50
82
  > **Note**: `.roomodes`, `.roo/commands/`, and `.roo/rules-{mode-slug}/`
51
83
  > are kept as-is because they are the official Zoo Code configuration
52
84
  > paths. Zoo Flow does not introduce a `.zoo/` directory.
53
85
 
54
- ## Using Zoo Flow
55
-
56
- First run:
86
+ ## Using Zoo Flow
87
+
88
+ ### First run (both platforms)
57
89
 
58
90
  - Run `/scaffold-context` when the project needs local context docs.
59
- - Run `/setup-matt-pocock-skills` when tracker or triage config is needed.
60
-
61
- Daily use:
91
+ - Run `/setup-matt-pocock-skills` when tracker or triage config is needed.
92
+
93
+ ### Claude Code
94
+
95
+ Claude Code reads `CLAUDE.md` automatically on startup. No mode switching needed.
96
+
97
+ **Daily use:**
98
+
99
+ - Open Claude Code in your project directory
100
+ - Describe tasks naturally: "Fix the login bug" → Claude proposes `/fix` workflow
101
+ - Or use slash commands directly: `/tweak`, `/fix`, `/feature`, `/review`, etc.
102
+ - Claude uses **behavioral profiles** (Architect/Implementer) defined in CLAUDE.md
103
+ - Multi-phase commands (like `/fix`, `/feature`) use the `Agent` tool to delegate between profiles
104
+
105
+ **Example:**
106
+ ```
107
+ You: "Fix the login bug"
108
+ Claude: "I'll use the /fix workflow. The architect will diagnose, then the implementer will fix it. Proceed?"
109
+ You: "Yes"
110
+ Claude: [Runs diagnostic, proposes fix, implements after approval]
111
+ ```
112
+
113
+ ### Zoo Code
114
+
115
+ Zoo Code uses three custom modes defined in `.roomodes`.
116
+
117
+ **Daily use:**
62
118
 
63
119
  - Start in `custom-orchestrator`, describe the task normally.
64
120
  - The orchestrator proposes a plain-language workflow; approve by number.
@@ -66,7 +122,7 @@ Daily use:
66
122
  - Explicit slash commands count as approval. Free-form requests do not.
67
123
  - **Clickable choices must not include slash commands or mode names.**
68
124
 
69
- For team usage, see `docs/team-mode.md`.
125
+ For team usage, see `docs/team-mode.md`.
70
126
 
71
127
  ## Update
72
128
 
@@ -84,11 +140,11 @@ Zoo Flow keeps always-loaded rules small. Domain docs (`.zoo-flow/CONTEXT.md`, `
84
140
 
85
141
  ## Modes
86
142
 
87
- | Slug | Name | Role | Edits allowed | Delegation |
88
- | --------------------- | --------------------- | ---------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------- |
89
- | `custom-orchestrator` | 🪃 Custom Orchestrator | Router. Picks workflow, delegates, waits for the user. | None | `new_task` to Zoo Flow modes only |
90
- | `system-architect` | 🏗️ System Architect | Planning, diagnosis, refactor design, exploration, review. | Markdown, `.scratch/`, `docs/` | `switch_mode` to `code-tweaker` |
91
- | `code-tweaker` | ⚡ Code Tweaker | Implementation, TDD, verify, docs, prototypes, commits. | Full repo edits within the assigned command | `switch_mode` to `system-architect` |
143
+ | Slug | Name | Role | Edits allowed | Delegation |
144
+ | --------------------- | --------------------- | ---------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------- |
145
+ | `custom-orchestrator` | 🪃 Custom Orchestrator | Router. Picks workflow, delegates, waits for the user. | None | `new_task` to Zoo Flow modes only |
146
+ | `system-architect` | 🏗️ System Architect | Planning, diagnosis, refactor design, exploration, review. | Markdown, `.scratch/`, `docs/` | `switch_mode` to `code-tweaker` |
147
+ | `code-tweaker` | ⚡ Code Tweaker | Implementation, TDD, verify, docs, prototypes, commits. | Full repo edits within the assigned command | `switch_mode` to `system-architect` |
92
148
 
93
149
  Modes are defined in
94
150
  [`templates/full/.roomodes`](templates/full/.roomodes). The detailed
@@ -108,14 +164,14 @@ run directly inside `system-architect` or `code-tweaker` when needed.
108
164
  | `/tdd` | `code-tweaker` | Test-first implementation loop. |
109
165
  | `/prototype` | `code-tweaker` | Throwaway prototype to settle a design uncertainty. |
110
166
  | `/update-docs` | `code-tweaker` | Reconcile docs with code reality. |
111
- | `/commit-and-document` | `code-tweaker` | Stage, message, commit, journal — pauses for approval. |
112
- | `/verify` | `code-tweaker` | Run targeted tests, typecheck, lint, or build checks. |
113
- | `/fix` | `system-architect` | Diagnose → implement → post-mortem chain. |
114
- | `/feature` | `system-architect` | Sharpen → optional prototype → PRD → issues → TDD chain. |
115
- | `/refactor` | `system-architect` | Plan and stage architecture changes. |
116
- | `/explore` | `system-architect` | Map unfamiliar code before touching it. |
117
- | `/triage` | `system-architect` | Clean and prioritize an issue queue. |
118
- | `/review` | `system-architect` | Review a diff or branch before commit. |
167
+ | `/commit-and-document` | `code-tweaker` | Stage, message, commit, journal — pauses for approval. |
168
+ | `/verify` | `code-tweaker` | Run targeted tests, typecheck, lint, or build checks. |
169
+ | `/fix` | `system-architect` | Diagnose → implement → post-mortem chain. |
170
+ | `/feature` | `system-architect` | Sharpen → optional prototype → PRD → issues → TDD chain. |
171
+ | `/refactor` | `system-architect` | Plan and stage architecture changes. |
172
+ | `/explore` | `system-architect` | Map unfamiliar code before touching it. |
173
+ | `/triage` | `system-architect` | Clean and prioritize an issue queue. |
174
+ | `/review` | `system-architect` | Review a diff or branch before commit. |
119
175
 
120
176
  ### Helper (run directly when needed)
121
177
 
@@ -127,31 +183,31 @@ run directly inside `system-architect` or `code-tweaker` when needed.
127
183
  | `/to-prd` | `system-architect` | Turn sharpened context into a PRD. |
128
184
  | `/to-issues` | `system-architect` | Slice a PRD into issues. |
129
185
  | `/zoom-out` | `system-architect` | Pull back to architectural altitude. |
130
- | `/handoff` | `system-architect` | Produce a clean handoff package for another agent or human. |
131
- | `/grill-me` | `system-architect` | Adversarial Q&A to sharpen an idea. |
132
- | `/caveman` | modeless | Ultra-compressed communication style utility. |
186
+ | `/handoff` | `system-architect` | Produce a clean handoff package for another agent or human. |
187
+ | `/grill-me` | `system-architect` | Adversarial Q&A to sharpen an idea. |
188
+ | `/caveman` | modeless | Ultra-compressed communication style utility. |
133
189
  | `/write-a-skill` | `code-tweaker` | Author a new skill following the bucket layout. |
134
190
  | `/setup-matt-pocock-skills` | `code-tweaker` | One-shot setup helper for the bundled skill set. |
135
191
 
136
- Command files live in
137
- [`templates/full/.roo/commands/`](templates/full/.roo/commands).
138
- `/caveman` intentionally has no `mode:` because it changes communication style, not workflow authority.
192
+ Command files live in
193
+ [`templates/full/.roo/commands/`](templates/full/.roo/commands).
194
+ `/caveman` intentionally has no `mode:` because it changes communication style, not workflow authority.
139
195
 
140
196
  ## Worked examples
141
197
 
142
- - [`examples/fix-flow.md`](examples/fix-flow.md)
143
- - [`examples/feature-flow.md`](examples/feature-flow.md)
144
- - [`examples/demo-transcripts/`](examples/demo-transcripts/)
198
+ - [`examples/fix-flow.md`](examples/fix-flow.md)
199
+ - [`examples/feature-flow.md`](examples/feature-flow.md)
200
+ - [`examples/demo-transcripts/`](examples/demo-transcripts/)
145
201
 
146
202
  ## How this is different
147
203
 
148
- Zoo Flow is not a methodology and not a giant skills pack. It is a
149
- thin Zoo-native control plane: three modes, a routing matrix, and a
150
- path-safety contract that turn into a predictable workflow. For a
151
- longer comparison with adjacent projects, see
152
- [`docs/comparison.md`](docs/comparison.md).
153
-
154
- For command-addition rules, see [`docs/command-design.md`](docs/command-design.md).
204
+ Zoo Flow is not a methodology and not a giant skills pack. It is a
205
+ thin Zoo-native control plane: three modes, a routing matrix, and a
206
+ path-safety contract that turn into a predictable workflow. For a
207
+ longer comparison with adjacent projects, see
208
+ [`docs/comparison.md`](docs/comparison.md).
209
+
210
+ For command-addition rules, see [`docs/command-design.md`](docs/command-design.md).
155
211
 
156
212
  ## Manual install
157
213
 
@@ -159,25 +215,25 @@ If you would rather copy the template by hand:
159
215
 
160
216
  ```sh
161
217
  git clone https://github.com/Fernado03/zoo-flow.git /tmp/zoo-flow
162
- cp /tmp/zoo-flow/templates/full/.roomodes .
163
- cp -R /tmp/zoo-flow/templates/full/.roo .
164
- cp -R /tmp/zoo-flow/templates/full/.zoo-flow .
165
- touch .gitignore
166
- grep -qxF "# Zoo Flow — generated config (never committed)" .gitignore 2>/dev/null || {
167
- printf "\n# Zoo Flow — generated config (never committed)\n" >> .gitignore
168
- printf ".roomodes\n.roo/\n.zoo-flow/\n" >> .gitignore
169
- }
170
- ```
171
-
172
- Windows uses `git clone ... C:\Temp\zoo-flow` and `Copy-Item` (including `Copy-Item -Recurse` for `.roo\` and `.zoo-flow\`) instead. Add `.roomodes`, `.roo/`, and `.zoo-flow/` to `.gitignore`.
173
-
174
- ## Development
175
-
176
- Before publishing, run:
177
-
178
- ```bash
179
- npm run release:check
180
- ```
218
+ cp /tmp/zoo-flow/templates/full/.roomodes .
219
+ cp -R /tmp/zoo-flow/templates/full/.roo .
220
+ cp -R /tmp/zoo-flow/templates/full/.zoo-flow .
221
+ touch .gitignore
222
+ grep -qxF "# Zoo Flow — generated config (never committed)" .gitignore 2>/dev/null || {
223
+ printf "\n# Zoo Flow — generated config (never committed)\n" >> .gitignore
224
+ printf ".roomodes\n.roo/\n.zoo-flow/\n" >> .gitignore
225
+ }
226
+ ```
227
+
228
+ Windows uses `git clone ... C:\Temp\zoo-flow` and `Copy-Item` (including `Copy-Item -Recurse` for `.roo\` and `.zoo-flow\`) instead. Add `.roomodes`, `.roo/`, and `.zoo-flow/` to `.gitignore`.
229
+
230
+ ## Development
231
+
232
+ Before publishing, run:
233
+
234
+ ```bash
235
+ npm run release:check
236
+ ```
181
237
 
182
238
  ## Migration
183
239