@fernado03/zoo-flow 0.11.2 → 0.12.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 (97) hide show
  1. package/bin/zoo-flow.js +25 -25
  2. package/package.json +1 -1
  3. package/templates/claude-code/.claude/skills/engineering/commit-and-document/SKILL.md +2 -1
  4. package/templates/claude-code/.claude/skills/engineering/diagnose/SKILL.md +2 -1
  5. package/templates/claude-code/.claude/skills/engineering/explore/SKILL.md +1 -1
  6. package/templates/claude-code/.claude/skills/engineering/feature/SKILL.md +2 -1
  7. package/templates/claude-code/.claude/skills/engineering/fix/SKILL.md +2 -1
  8. package/templates/claude-code/.claude/skills/engineering/grill-with-docs/SKILL.md +2 -1
  9. package/templates/claude-code/.claude/skills/engineering/improve-codebase-architecture/SKILL.md +2 -1
  10. package/templates/claude-code/.claude/skills/engineering/prototype/SKILL.md +2 -1
  11. package/templates/claude-code/.claude/skills/engineering/refactor/SKILL.md +2 -1
  12. package/templates/claude-code/.claude/skills/engineering/review/SKILL.md +2 -1
  13. package/templates/claude-code/.claude/skills/engineering/scaffold-context/SKILL.md +2 -1
  14. package/templates/claude-code/.claude/skills/engineering/setup-matt-pocock-skills/SKILL.md +2 -1
  15. package/templates/claude-code/.claude/skills/engineering/tdd/SKILL.md +2 -1
  16. package/templates/claude-code/.claude/skills/engineering/to-issues/SKILL.md +2 -1
  17. package/templates/claude-code/.claude/skills/engineering/to-prd/SKILL.md +2 -1
  18. package/templates/claude-code/.claude/skills/engineering/triage/SKILL.md +2 -1
  19. package/templates/claude-code/.claude/skills/engineering/tweak/SKILL.md +2 -1
  20. package/templates/claude-code/.claude/skills/engineering/update-docs/SKILL.md +2 -1
  21. package/templates/claude-code/.claude/skills/engineering/verify/SKILL.md +2 -1
  22. package/templates/claude-code/.claude/skills/engineering/zoom-out/SKILL.md +2 -1
  23. package/templates/claude-code/.claude/skills/productivity/grill-me/SKILL.md +2 -1
  24. package/templates/claude-code/.claude/skills/productivity/handoff/SKILL.md +2 -1
  25. package/templates/claude-code/.claude/skills/productivity/teach/SKILL.md +2 -1
  26. package/templates/claude-code/.claude/skills/productivity/write-a-skill/SKILL.md +2 -1
  27. package/templates/claude-code/CLAUDE.md +23 -0
  28. package/templates/full/.roo/commands/{explore.md → zoo-explore.md} +18 -18
  29. package/templates/full/.roo/commands/{scaffold-context.md → zoo-scaffold-context.md} +16 -16
  30. package/templates/full/.roo/commands/{setup-matt-pocock-skills.md → zoo-setup-matt-pocock-skills.md} +7 -7
  31. package/templates/full/.roo/commands/{update-docs.md → zoo-update-docs.md} +22 -22
  32. package/templates/full/.roo/rules-custom-orchestrator/00-routing.md +22 -22
  33. package/templates/full/.roo/skills/engineering/commit-and-document/SKILL.md +163 -163
  34. package/templates/full/.roo/skills/engineering/diagnose/SKILL.md +3 -3
  35. package/templates/full/.roo/skills/engineering/grill-with-docs/SKILL.md +1 -1
  36. package/templates/full/.roo/skills/engineering/improve-codebase-architecture/SKILL.md +1 -1
  37. package/templates/full/.roo/skills/engineering/prototype/SKILL.md +47 -47
  38. package/templates/full/.roo/skills/engineering/review/SKILL.md +7 -7
  39. package/templates/full/.roo/skills/engineering/scaffold-context/SKILL.md +228 -228
  40. package/templates/full/.roo/skills/engineering/setup-matt-pocock-skills/SKILL.md +2 -2
  41. package/templates/full/.roo/skills/engineering/tdd/SKILL.md +1 -1
  42. package/templates/full/.roo/skills/engineering/to-issues/SKILL.md +2 -2
  43. package/templates/full/.roo/skills/engineering/to-prd/SKILL.md +66 -66
  44. package/templates/full/.roo/skills/engineering/triage/SKILL.md +2 -2
  45. package/templates/full/.roo/skills/engineering/tweak/SKILL.md +1 -1
  46. package/templates/full/.roo/skills/engineering/update-docs/SKILL.md +76 -76
  47. package/templates/full/.roo/skills/engineering/verify/SKILL.md +2 -2
  48. package/templates/full/.roo/skills/engineering/zoom-out/SKILL.md +1 -1
  49. package/templates/full/.roo/skills/productivity/caveman/SKILL.md +1 -1
  50. package/templates/full/.roo/skills/productivity/teach/SKILL.md +119 -119
  51. package/templates/full/.roomodes +3 -3
  52. /package/templates/claude-code/.claude/commands/{caveman.md → zoo-caveman.md} +0 -0
  53. /package/templates/claude-code/.claude/commands/{commit-and-document.md → zoo-commit-and-document.md} +0 -0
  54. /package/templates/claude-code/.claude/commands/{diagnose.md → zoo-diagnose.md} +0 -0
  55. /package/templates/claude-code/.claude/commands/{explore.md → zoo-explore.md} +0 -0
  56. /package/templates/claude-code/.claude/commands/{feature.md → zoo-feature.md} +0 -0
  57. /package/templates/claude-code/.claude/commands/{fix.md → zoo-fix.md} +0 -0
  58. /package/templates/claude-code/.claude/commands/{grill-me.md → zoo-grill-me.md} +0 -0
  59. /package/templates/claude-code/.claude/commands/{grill-with-docs.md → zoo-grill-with-docs.md} +0 -0
  60. /package/templates/claude-code/.claude/commands/{handoff.md → zoo-handoff.md} +0 -0
  61. /package/templates/claude-code/.claude/commands/{improve-codebase-architecture.md → zoo-improve-codebase-architecture.md} +0 -0
  62. /package/templates/claude-code/.claude/commands/{prototype.md → zoo-prototype.md} +0 -0
  63. /package/templates/claude-code/.claude/commands/{refactor.md → zoo-refactor.md} +0 -0
  64. /package/templates/claude-code/.claude/commands/{review.md → zoo-review.md} +0 -0
  65. /package/templates/claude-code/.claude/commands/{scaffold-context.md → zoo-scaffold-context.md} +0 -0
  66. /package/templates/claude-code/.claude/commands/{setup-matt-pocock-skills.md → zoo-setup-matt-pocock-skills.md} +0 -0
  67. /package/templates/claude-code/.claude/commands/{tdd.md → zoo-tdd.md} +0 -0
  68. /package/templates/claude-code/.claude/commands/{teach.md → zoo-teach.md} +0 -0
  69. /package/templates/claude-code/.claude/commands/{to-issues.md → zoo-to-issues.md} +0 -0
  70. /package/templates/claude-code/.claude/commands/{to-prd.md → zoo-to-prd.md} +0 -0
  71. /package/templates/claude-code/.claude/commands/{triage.md → zoo-triage.md} +0 -0
  72. /package/templates/claude-code/.claude/commands/{tweak.md → zoo-tweak.md} +0 -0
  73. /package/templates/claude-code/.claude/commands/{update-docs.md → zoo-update-docs.md} +0 -0
  74. /package/templates/claude-code/.claude/commands/{verify.md → zoo-verify.md} +0 -0
  75. /package/templates/claude-code/.claude/commands/{write-a-skill.md → zoo-write-a-skill.md} +0 -0
  76. /package/templates/claude-code/.claude/commands/{zoom-out.md → zoo-zoom-out.md} +0 -0
  77. /package/templates/full/.roo/commands/{caveman.md → zoo-caveman.md} +0 -0
  78. /package/templates/full/.roo/commands/{commit-and-document.md → zoo-commit-and-document.md} +0 -0
  79. /package/templates/full/.roo/commands/{diagnose.md → zoo-diagnose.md} +0 -0
  80. /package/templates/full/.roo/commands/{feature.md → zoo-feature.md} +0 -0
  81. /package/templates/full/.roo/commands/{fix.md → zoo-fix.md} +0 -0
  82. /package/templates/full/.roo/commands/{grill-me.md → zoo-grill-me.md} +0 -0
  83. /package/templates/full/.roo/commands/{grill-with-docs.md → zoo-grill-with-docs.md} +0 -0
  84. /package/templates/full/.roo/commands/{handoff.md → zoo-handoff.md} +0 -0
  85. /package/templates/full/.roo/commands/{improve-codebase-architecture.md → zoo-improve-codebase-architecture.md} +0 -0
  86. /package/templates/full/.roo/commands/{prototype.md → zoo-prototype.md} +0 -0
  87. /package/templates/full/.roo/commands/{refactor.md → zoo-refactor.md} +0 -0
  88. /package/templates/full/.roo/commands/{review.md → zoo-review.md} +0 -0
  89. /package/templates/full/.roo/commands/{tdd.md → zoo-tdd.md} +0 -0
  90. /package/templates/full/.roo/commands/{teach.md → zoo-teach.md} +0 -0
  91. /package/templates/full/.roo/commands/{to-issues.md → zoo-to-issues.md} +0 -0
  92. /package/templates/full/.roo/commands/{to-prd.md → zoo-to-prd.md} +0 -0
  93. /package/templates/full/.roo/commands/{triage.md → zoo-triage.md} +0 -0
  94. /package/templates/full/.roo/commands/{tweak.md → zoo-tweak.md} +0 -0
  95. /package/templates/full/.roo/commands/{verify.md → zoo-verify.md} +0 -0
  96. /package/templates/full/.roo/commands/{write-a-skill.md → zoo-write-a-skill.md} +0 -0
  97. /package/templates/full/.roo/commands/{zoom-out.md → zoo-zoom-out.md} +0 -0
@@ -1,228 +1,228 @@
1
- ---
2
- name: scaffold-context
3
- description: Bootstrap .zoo-flow/CONTEXT.md from an existing codebase by detecting project shape and scanning for domain terms and cross-cutting decisions. Proposes 5-12 terms + 0-2 ADRs, asks for confirm before writing. Use on projects with no CONTEXT.md, or to expand a thin one.
4
- ---
5
-
6
- # Scaffold Context
7
-
8
- ## Loop
9
-
10
- 1. Read existing context via slot discovery rule (see `CONTEXT-FORMAT.md`).
11
- 2. Detect project shape (see Detection).
12
- 3. Scan codebase for terms (see Detection).
13
- 4. Propose 5-12 terms with one-line definitions + evidence (file:line counts).
14
- 5. Show inline, ask: confirm / edit / cancel.
15
- 6. On confirm, write to `.zoo-flow/CONTEXT.md` (preserve any existing entries in merge mode).
16
- 7. If 1-2 cross-cutting decisions are visible in code, propose ADRs (see ADR gate).
17
- 8. Show ADR draft(s) inline, ask confirm per ADR.
18
- 9. On confirm, write to `.zoo-flow/docs/adr/NNNN-slug.md` using `ADR-FORMAT.md` numbering.
19
- 10. Report what was written, with file paths.
20
-
21
- ## Detection
22
-
23
- ### Step 1: Detect project shape
24
-
25
- Inspect (in order):
26
- - `package.json` `keywords`, `name`, `scripts` (Node/JS)
27
- - `pyproject.toml` / `setup.py` / `setup.cfg` (Python)
28
- - `Cargo.toml` (Rust)
29
- - `go.mod` (Go)
30
- - Top-level folder names
31
- - `README.md` first paragraph
32
-
33
- Pick the dominant shape:
34
-
35
- | Signal folders / files | Shape | Priority sources for terms |
36
- |---|---|---|
37
- | `app/`, `pages/`, `routes/`, `controllers/`, `api/` | web app | API routes, page names, URL paths, model types |
38
- | `lib/`, `pkg/`, `src/` (no `app/`) | library | exported types, public API surface |
39
- | `cmd/`, `bin/`, `commands/`, `cli/` | CLI tool | subcommand names, flag names |
40
- | `workers/`, `jobs/`, `tasks/`, `etl/`, `pipelines/` | data pipeline | job/queue/event names |
41
- | `services/`, `lambda/`, `functions/`, `handlers/` | serverless | function names, event sources, triggers |
42
- | `services/` + `web/` + `workers/` | monorepo | treat each top-level as a sub-shape; ask user if unclear |
43
-
44
- If signals are mixed, prefer the shape that owns the entry point (`main.*`, `index.*`, `server.*`).
45
-
46
- ### Step 2: Extract candidate terms
47
-
48
- For the chosen shape, prefer:
49
- - **Web app**: route paths (`/accounts/:id`), controller class names, view/component names
50
- - **Library**: exported type/class/interface names
51
- - **CLI**: subcommand names, top-level argument names
52
- - **Data pipeline**: job names, queue names, event types
53
- - **Serverless**: function names, event source names
54
-
55
- Universal signals (any shape):
56
- - Type/class/struct/interface definitions with noun names
57
- - Database table/model names (migrations, `schema.prisma`, `models/`, SQL files)
58
- - Top-level module/folder names that are nouns
59
- - README/docs that state purpose ("we manage X for Y")
60
-
61
- ### Step 3: Filter
62
-
63
- Drop without showing:
64
- - Generic: `utils`, `helpers`, `common`, `base`, `lib`, `core`, `misc`, `types`, `models`, `helpers`, `shared`, `internal`, `errors`, `tests`
65
- - Single-letter or unexpanded acronym: `T`, `M`, `VM`, `DTO` (unless defined in code)
66
- - Already-defined terms in existing `CONTEXT.md` (merge mode)
67
- - Framework-required boilerplate: `App`, `Server`, `Router`, `Config`
68
-
69
- Keep candidates that:
70
- - Appear in 2+ distinct files OR
71
- - Appear in 1 file but are central (entry point, root config, README)
72
- - Are domain nouns (Account, Order, Tenant, Invoice) over technical nouns (Worker, Queue)
73
-
74
- ### Step 4: Score and rank
75
-
76
- For each kept candidate, count:
77
- - Type/def files where it appears
78
- - Route/file references
79
- - DB schema references
80
-
81
- Take the top 5-12. Show the count in the proposal so the user can judge.
82
-
83
- ## ADR gate
84
-
85
- Propose an ADR only if ALL:
86
- - You can point at code: a single pattern/import/module used across N+ files
87
- - The pattern is not obvious from the framework (e.g. "uses Express" is obvious, "all errors go through `Result<T, AppError>`" is not)
88
- - A reasonable engineer would be surprised to learn it from scratch
89
- - It maps to `ADR-FORMAT.md` "Qualifies" criteria (hard to reverse, real trade-off)
90
-
91
- Do NOT propose ADRs for:
92
- - Framework defaults
93
- - Single-file patterns
94
- - Speculative "this might be a decision" guesses
95
- - Anything where the README doesn't hint at reasoning
96
-
97
- Cap at 0-2 ADRs per scaffold. Zero is fine. Better to ship no ADR than a wrong one.
98
-
99
- ## Context-pack selector
100
-
101
- After detecting project shape and proposing CONTEXT.md terms + ADRs, recommend the smallest useful set of optional context docs.
102
-
103
- Rules:
104
-
105
- - Templates live under `.roo/skills/engineering/scaffold-context/templates/` (candidates only, never installed by default).
106
- - Missing optional docs are **not an error**.
107
- - Recommend a doc only when code evidence shows it would change future agent behavior.
108
- - Prefer one compact doc over many thin docs.
109
- - Better to create zero optional docs than wrong docs.
110
- - Ask for confirmation before writing any optional doc.
111
-
112
- Consider optional docs only with code evidence:
113
-
114
- | Doc | When to recommend |
115
- |---|---|
116
- | `TESTING.md` | unusual verification setup, multiple test layers, important seams |
117
- | `DATA_MODEL.md` | schemas, lifecycle states, ownership, migrations visible in code |
118
- | `API_CONTRACTS.md` | public routes, SDK exports, webhooks, event payloads |
119
- | `RUNBOOK.md` | deploys, jobs, queues, cron, recovery procedures |
120
- | `SECURITY_NOTES.md` | auth, permissions, tenant isolation, secrets, payments |
121
- | `INTEGRATIONS.md` | third-party APIs, OAuth, Stripe, email, queues, LLM providers |
122
- | `MONOREPO_MAP.md` | multiple apps/packages/services with different responsibilities |
123
-
124
- ### Output shape
125
-
126
- ```
127
- ## Suggested context pack
128
-
129
- Detected shape: <shape>
130
-
131
- Recommended:
132
- 1. `.zoo-flow/CONTEXT.md`
133
- Reason: repeated domain terms found.
134
- 2. `.zoo-flow/DATA_MODEL.md`
135
- Reason: schema migration logic found in 4 files.
136
-
137
- Maybe:
138
- 1. `.zoo-flow/SECURITY_NOTES.md`
139
- Reason: auth middleware exists, but permission model appears simple.
140
-
141
- Skipped:
142
- - `RUNBOOK.md` — no deployment or operational recovery surface found.
143
- - `DATA_MODEL.md` — schema is simple; terms fit in CONTEXT.md.
144
-
145
- Choose:
146
- 1. Create recommended only
147
- 2. Choose manually
148
- 3. Cancel
149
- ```
150
-
151
- ### Selection matrix by shape
152
-
153
- | Shape | Likely recommended | Likely maybe | Likely skipped |
154
- |---|---|---|---|
155
- | web app | CONTEXT.md | SECURITY_NOTES.md, INTEGRATIONS.md | RUNBOOK.md, MONOREPO_MAP.md |
156
- | library | CONTEXT.md, API_CONTRACTS.md | TESTING.md | RUNBOOK.md, MONOREPO_MAP.md |
157
- | CLI tool | CONTEXT.md | RUNBOOK.md | DATA_MODEL.md, MONOREPO_MAP.md |
158
- | data pipeline | CONTEXT.md, DATA_MODEL.md | RUNBOOK.md | API_CONTRACTS.md |
159
- | serverless | CONTEXT.md, INTEGRATIONS.md | SECURITY_NOTES.md | MONOREPO_MAP.md |
160
- | monorepo | CONTEXT.md, MONOREPO_MAP.md | INTEGRATIONS.md, API_CONTRACTS.md | RUNBOOK.md |
161
-
162
- Do not let this selector delay the core CONTEXT.md + ADR proposal. Present the pack selection after the main confirm flow.
163
-
164
- ## MUST
165
-
166
- - Ask confirm before writing `CONTEXT.md` (show full proposed list + diff against existing)
167
- - Ask confirm per ADR before writing
168
- - Ask confirm per optional doc before writing
169
- - Never overwrite non-empty `CONTEXT.md` without explicit "replace"
170
- - Never invent cross-cutting decisions; only propose ADRs you can point at code
171
- - Keep `CONTEXT.md` glossary-only; no impl/spec notes
172
- - Use `ADR-FORMAT.md` for any proposed ADR (template + numbering)
173
- - Report file paths and section headers at the end
174
- - In merge mode, append new terms below existing ones; do not reorder
175
-
176
- ## Context economy
177
-
178
- Before broad reads, locate candidates with `list_files`, `search_files`, or `codebase_search`.
179
-
180
- Prefer targeted `read_file` ranges or block reads once the candidate area is known.
181
-
182
- Read full files only when structure, ordering, or surrounding context is required for correctness.
183
-
184
- Do not re-read unchanged files; use prior findings unless the file changed.
185
-
186
- ## Output shape (for the inline confirm step)
187
-
188
- ```
189
- ## Proposed CONTEXT.md entries (N)
190
-
191
- 1. **Account** — a tenant-scoped record of a customer relationship.
192
- Evidence: 12 type defs, 4 routes, 1 DB table.
193
- 2. **Order** — a request to purchase one or more SKUs.
194
- Evidence: 8 type defs, 3 routes, 1 DB table.
195
- ...
196
-
197
- Confirm? (yes / edit / cancel)
198
- ```
199
-
200
- ```
201
- ## Proposed ADR (1 of N)
202
-
203
- # Use Result type for all fallible operations
204
-
205
- We use a Rust-style `Result<T, AppError>` for all operations that can
206
- fail, instead of throwing exceptions. This is enforced by a linter
207
- rule and visible in every service module.
208
-
209
- Considered Options:
210
- - Exceptions
211
- - Error codes (Go-style)
212
- - Result type (chosen)
213
-
214
- Consequences: easier to reason about error paths; verbose for happy
215
- paths.
216
-
217
- Confirm? (yes / edit / cancel)
218
- ```
219
-
220
- ## Complete
221
-
222
- Call `attempt_completion` with:
223
- - file paths written (CONTEXT.md, ADRs, optional docs)
224
- - terms added (count)
225
- - status (complete / blocked with reason)
226
- - recommended next command
227
-
228
- Do NOT use `ask_followup_question` or write results as plain text without calling the tool.
1
+ ---
2
+ name: scaffold-context
3
+ description: Bootstrap .zoo-flow/CONTEXT.md from an existing codebase by detecting project shape and scanning for domain terms and cross-cutting decisions. Proposes 5-12 terms + 0-2 ADRs, asks for confirm before writing. Use on projects with no CONTEXT.md, or to expand a thin one.
4
+ ---
5
+
6
+ # Scaffold Context
7
+
8
+ ## Loop
9
+
10
+ 1. Read existing context via slot discovery rule (see `CONTEXT-FORMAT.md`).
11
+ 2. Detect project shape (see Detection).
12
+ 3. Scan codebase for terms (see Detection).
13
+ 4. Propose 5-12 terms with one-line definitions + evidence (file:line counts).
14
+ 5. Show inline, ask: confirm / edit / cancel.
15
+ 6. On confirm, write to `.zoo-flow/CONTEXT.md` (preserve any existing entries in merge mode).
16
+ 7. If 1-2 cross-cutting decisions are visible in code, propose ADRs (see ADR gate).
17
+ 8. Show ADR draft(s) inline, ask confirm per ADR.
18
+ 9. On confirm, write to `.zoo-flow/docs/adr/NNNN-slug.md` using `ADR-FORMAT.md` numbering.
19
+ 10. Report what was written, with file paths.
20
+
21
+ ## Detection
22
+
23
+ ### Step 1: Detect project shape
24
+
25
+ Inspect (in order):
26
+ - `package.json` `keywords`, `name`, `scripts` (Node/JS)
27
+ - `pyproject.toml` / `setup.py` / `setup.cfg` (Python)
28
+ - `Cargo.toml` (Rust)
29
+ - `go.mod` (Go)
30
+ - Top-level folder names
31
+ - `README.md` first paragraph
32
+
33
+ Pick the dominant shape:
34
+
35
+ | Signal folders / files | Shape | Priority sources for terms |
36
+ |---|---|---|
37
+ | `app/`, `pages/`, `routes/`, `controllers/`, `api/` | web app | API routes, page names, URL paths, model types |
38
+ | `lib/`, `pkg/`, `src/` (no `app/`) | library | exported types, public API surface |
39
+ | `cmd/`, `bin/`, `commands/`, `cli/` | CLI tool | subcommand names, flag names |
40
+ | `workers/`, `jobs/`, `tasks/`, `etl/`, `pipelines/` | data pipeline | job/queue/event names |
41
+ | `services/`, `lambda/`, `functions/`, `handlers/` | serverless | function names, event sources, triggers |
42
+ | `services/` + `web/` + `workers/` | monorepo | treat each top-level as a sub-shape; ask user if unclear |
43
+
44
+ If signals are mixed, prefer the shape that owns the entry point (`main.*`, `index.*`, `server.*`).
45
+
46
+ ### Step 2: Extract candidate terms
47
+
48
+ For the chosen shape, prefer:
49
+ - **Web app**: route paths (`/accounts/:id`), controller class names, view/component names
50
+ - **Library**: exported type/class/interface names
51
+ - **CLI**: subcommand names, top-level argument names
52
+ - **Data pipeline**: job names, queue names, event types
53
+ - **Serverless**: function names, event source names
54
+
55
+ Universal signals (any shape):
56
+ - Type/class/struct/interface definitions with noun names
57
+ - Database table/model names (migrations, `schema.prisma`, `models/`, SQL files)
58
+ - Top-level module/folder names that are nouns
59
+ - README/docs that state purpose ("we manage X for Y")
60
+
61
+ ### Step 3: Filter
62
+
63
+ Drop without showing:
64
+ - Generic: `utils`, `helpers`, `common`, `base`, `lib`, `core`, `misc`, `types`, `models`, `helpers`, `shared`, `internal`, `errors`, `tests`
65
+ - Single-letter or unexpanded acronym: `T`, `M`, `VM`, `DTO` (unless defined in code)
66
+ - Already-defined terms in existing `CONTEXT.md` (merge mode)
67
+ - Framework-required boilerplate: `App`, `Server`, `Router`, `Config`
68
+
69
+ Keep candidates that:
70
+ - Appear in 2+ distinct files OR
71
+ - Appear in 1 file but are central (entry point, root config, README)
72
+ - Are domain nouns (Account, Order, Tenant, Invoice) over technical nouns (Worker, Queue)
73
+
74
+ ### Step 4: Score and rank
75
+
76
+ For each kept candidate, count:
77
+ - Type/def files where it appears
78
+ - Route/file references
79
+ - DB schema references
80
+
81
+ Take the top 5-12. Show the count in the proposal so the user can judge.
82
+
83
+ ## ADR gate
84
+
85
+ Propose an ADR only if ALL:
86
+ - You can point at code: a single pattern/import/module used across N+ files
87
+ - The pattern is not obvious from the framework (e.g. "uses Express" is obvious, "all errors go through `Result<T, AppError>`" is not)
88
+ - A reasonable engineer would be surprised to learn it from scratch
89
+ - It maps to `ADR-FORMAT.md` "Qualifies" criteria (hard to reverse, real trade-off)
90
+
91
+ Do NOT propose ADRs for:
92
+ - Framework defaults
93
+ - Single-file patterns
94
+ - Speculative "this might be a decision" guesses
95
+ - Anything where the README doesn't hint at reasoning
96
+
97
+ Cap at 0-2 ADRs per scaffold. Zero is fine. Better to ship no ADR than a wrong one.
98
+
99
+ ## Context-pack selector
100
+
101
+ After detecting project shape and proposing CONTEXT.md terms + ADRs, recommend the smallest useful set of optional context docs.
102
+
103
+ Rules:
104
+
105
+ - Templates live under `.roo/skills/engineering/zoo-scaffold-context/templates/` (candidates only, never installed by default).
106
+ - Missing optional docs are **not an error**.
107
+ - Recommend a doc only when code evidence shows it would change future agent behavior.
108
+ - Prefer one compact doc over many thin docs.
109
+ - Better to create zero optional docs than wrong docs.
110
+ - Ask for confirmation before writing any optional doc.
111
+
112
+ Consider optional docs only with code evidence:
113
+
114
+ | Doc | When to recommend |
115
+ |---|---|
116
+ | `TESTING.md` | unusual verification setup, multiple test layers, important seams |
117
+ | `DATA_MODEL.md` | schemas, lifecycle states, ownership, migrations visible in code |
118
+ | `API_CONTRACTS.md` | public routes, SDK exports, webhooks, event payloads |
119
+ | `RUNBOOK.md` | deploys, jobs, queues, cron, recovery procedures |
120
+ | `SECURITY_NOTES.md` | auth, permissions, tenant isolation, secrets, payments |
121
+ | `INTEGRATIONS.md` | third-party APIs, OAuth, Stripe, email, queues, LLM providers |
122
+ | `MONOREPO_MAP.md` | multiple apps/packages/services with different responsibilities |
123
+
124
+ ### Output shape
125
+
126
+ ```
127
+ ## Suggested context pack
128
+
129
+ Detected shape: <shape>
130
+
131
+ Recommended:
132
+ 1. `.zoo-flow/CONTEXT.md`
133
+ Reason: repeated domain terms found.
134
+ 2. `.zoo-flow/DATA_MODEL.md`
135
+ Reason: schema migration logic found in 4 files.
136
+
137
+ Maybe:
138
+ 1. `.zoo-flow/SECURITY_NOTES.md`
139
+ Reason: auth middleware exists, but permission model appears simple.
140
+
141
+ Skipped:
142
+ - `RUNBOOK.md` — no deployment or operational recovery surface found.
143
+ - `DATA_MODEL.md` — schema is simple; terms fit in CONTEXT.md.
144
+
145
+ Choose:
146
+ 1. Create recommended only
147
+ 2. Choose manually
148
+ 3. Cancel
149
+ ```
150
+
151
+ ### Selection matrix by shape
152
+
153
+ | Shape | Likely recommended | Likely maybe | Likely skipped |
154
+ |---|---|---|---|
155
+ | web app | CONTEXT.md | SECURITY_NOTES.md, INTEGRATIONS.md | RUNBOOK.md, MONOREPO_MAP.md |
156
+ | library | CONTEXT.md, API_CONTRACTS.md | TESTING.md | RUNBOOK.md, MONOREPO_MAP.md |
157
+ | CLI tool | CONTEXT.md | RUNBOOK.md | DATA_MODEL.md, MONOREPO_MAP.md |
158
+ | data pipeline | CONTEXT.md, DATA_MODEL.md | RUNBOOK.md | API_CONTRACTS.md |
159
+ | serverless | CONTEXT.md, INTEGRATIONS.md | SECURITY_NOTES.md | MONOREPO_MAP.md |
160
+ | monorepo | CONTEXT.md, MONOREPO_MAP.md | INTEGRATIONS.md, API_CONTRACTS.md | RUNBOOK.md |
161
+
162
+ Do not let this selector delay the core CONTEXT.md + ADR proposal. Present the pack selection after the main confirm flow.
163
+
164
+ ## MUST
165
+
166
+ - Ask confirm before writing `CONTEXT.md` (show full proposed list + diff against existing)
167
+ - Ask confirm per ADR before writing
168
+ - Ask confirm per optional doc before writing
169
+ - Never overwrite non-empty `CONTEXT.md` without explicit "replace"
170
+ - Never invent cross-cutting decisions; only propose ADRs you can point at code
171
+ - Keep `CONTEXT.md` glossary-only; no impl/spec notes
172
+ - Use `ADR-FORMAT.md` for any proposed ADR (template + numbering)
173
+ - Report file paths and section headers at the end
174
+ - In merge mode, append new terms below existing ones; do not reorder
175
+
176
+ ## Context economy
177
+
178
+ Before broad reads, locate candidates with `list_files`, `search_files`, or `codebase_search`.
179
+
180
+ Prefer targeted `read_file` ranges or block reads once the candidate area is known.
181
+
182
+ Read full files only when structure, ordering, or surrounding context is required for correctness.
183
+
184
+ Do not re-read unchanged files; use prior findings unless the file changed.
185
+
186
+ ## Output shape (for the inline confirm step)
187
+
188
+ ```
189
+ ## Proposed CONTEXT.md entries (N)
190
+
191
+ 1. **Account** — a tenant-scoped record of a customer relationship.
192
+ Evidence: 12 type defs, 4 routes, 1 DB table.
193
+ 2. **Order** — a request to purchase one or more SKUs.
194
+ Evidence: 8 type defs, 3 routes, 1 DB table.
195
+ ...
196
+
197
+ Confirm? (yes / edit / cancel)
198
+ ```
199
+
200
+ ```
201
+ ## Proposed ADR (1 of N)
202
+
203
+ # Use Result type for all fallible operations
204
+
205
+ We use a Rust-style `Result<T, AppError>` for all operations that can
206
+ fail, instead of throwing exceptions. This is enforced by a linter
207
+ rule and visible in every service module.
208
+
209
+ Considered Options:
210
+ - Exceptions
211
+ - Error codes (Go-style)
212
+ - Result type (chosen)
213
+
214
+ Consequences: easier to reason about error paths; verbose for happy
215
+ paths.
216
+
217
+ Confirm? (yes / edit / cancel)
218
+ ```
219
+
220
+ ## Complete
221
+
222
+ Call `attempt_completion` with:
223
+ - file paths written (CONTEXT.md, ADRs, optional docs)
224
+ - terms added (count)
225
+ - status (complete / blocked with reason)
226
+ - recommended next command
227
+
228
+ Do NOT use `ask_followup_question` or write results as plain text without calling the tool.
@@ -40,7 +40,7 @@ C. Domain docs:
40
40
  Show:
41
41
  1. `## Agent skills` block.
42
42
  2. `docs/agents/issue-tracker.md`.
43
- 3. `docs/agents/triage-labels.md`.
43
+ 3. `docs/agents/zoo-triage-labels.md`.
44
44
  4. `docs/agents/domain.md`.
45
45
 
46
46
  ## Write
@@ -63,7 +63,7 @@ Block:
63
63
 
64
64
  ### Triage labels
65
65
 
66
- [one-line summary]. See `docs/agents/triage-labels.md`.
66
+ [one-line summary]. See `docs/agents/zoo-triage-labels.md`.
67
67
 
68
68
  ### Domain docs
69
69
 
@@ -50,7 +50,7 @@ Checklist per cycle:
50
50
  - [ ] Code minimal.
51
51
  - [ ] No speculation.
52
52
 
53
- After green, suggest `/verify`, then `/review`, then `/commit-and-document` for non-trivial work. Do not auto-launch follow-up commands.
53
+ After green, suggest `/zoo-verify`, then `/zoo-review`, then `/zoo-commit-and-document` for non-trivial work. Do not auto-launch follow-up commands.
54
54
 
55
55
  ## Complete
56
56
 
@@ -5,7 +5,7 @@ description: Break a plan, spec, or PRD into independently-grabbable issues on t
5
5
 
6
6
  # To Issues
7
7
 
8
- Issue tracker + label vocabulary should exist; run `/setup-matt-pocock-skills` if missing.
8
+ Issue tracker + label vocabulary should exist; run `/zoo-setup-matt-pocock-skills` if missing.
9
9
 
10
10
  ## Process
11
11
 
@@ -49,6 +49,6 @@ If no blockers: `None - can start immediately`.
49
49
  Call `attempt_completion` with:
50
50
  - issues created (count and tracker URLs or `.scratch/{feature-slug}/issues/` path)
51
51
  - status (complete / blocked with reason)
52
- - recommended next command (`/tweak` or `/tdd` to start implementing the first issue)
52
+ - recommended next command (`/zoo-tweak` or `/zoo-tdd` to start implementing the first issue)
53
53
 
54
54
  Do NOT use `ask_followup_question` or write results as plain text without calling the tool.
@@ -1,66 +1,66 @@
1
- ---
2
- name: to-prd
3
- description: Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.
4
- ---
5
-
6
- # To PRD
7
-
8
- Issue tracker + label vocabulary should exist; run `/setup-matt-pocock-skills` if missing.
9
-
10
- RULE: Do not interview user. Synthesize current context.
11
-
12
- ## Process
13
-
14
- 1. Explore repo if needed; use glossary; respect ADRs.
15
- 2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can.
16
- 3. Check with the user that these seams match their expectations.
17
- 4. Write PRD.
18
- 5. Publish to issue tracker (or `.scratch/{feature-slug}/PRD.md` for local tracker).
19
- 6. Apply `ready-for-agent`.
20
-
21
- ## PRD template
22
-
23
- ```markdown
24
- ## Problem Statement
25
-
26
- {user-facing problem}
27
-
28
- ## Solution
29
-
30
- {user-facing solution}
31
-
32
- ## User Stories
33
-
34
- 1. As a {actor}, I want {feature}, so that {benefit}
35
-
36
- ## Implementation Decisions
37
-
38
- - Modules/interfaces changed.
39
- - Technical clarifications.
40
- - Architecture/schema/API/contracts/interactions.
41
- - No file paths.
42
- - Prototype snippets allowed only if decision-rich and trimmed.
43
-
44
- ## Testing Decisions
45
-
46
- - Good tests verify external behaviour, not implementation.
47
- - Seams to test; prefer existing/highest seam.
48
- - Similar tests/prior art.
49
-
50
- ## Out of Scope
51
-
52
- {excluded work}
53
-
54
- ## Further Notes
55
-
56
- {other notes}
57
- ```
58
-
59
- ## Complete
60
-
61
- Call `attempt_completion` with:
62
- - PRD location (issue tracker URL or `.scratch/{feature-slug}/PRD.md` path)
63
- - status (complete / blocked with reason)
64
- - recommended next command (`/to-issues` to break it into implementation tickets)
65
-
66
- Do NOT use `ask_followup_question` or write results as plain text without calling the tool.
1
+ ---
2
+ name: to-prd
3
+ description: Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.
4
+ ---
5
+
6
+ # To PRD
7
+
8
+ Issue tracker + label vocabulary should exist; run `/zoo-setup-matt-pocock-skills` if missing.
9
+
10
+ RULE: Do not interview user. Synthesize current context.
11
+
12
+ ## Process
13
+
14
+ 1. Explore repo if needed; use glossary; respect ADRs.
15
+ 2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can.
16
+ 3. Check with the user that these seams match their expectations.
17
+ 4. Write PRD.
18
+ 5. Publish to issue tracker (or `.scratch/{feature-slug}/PRD.md` for local tracker).
19
+ 6. Apply `ready-for-agent`.
20
+
21
+ ## PRD template
22
+
23
+ ```markdown
24
+ ## Problem Statement
25
+
26
+ {user-facing problem}
27
+
28
+ ## Solution
29
+
30
+ {user-facing solution}
31
+
32
+ ## User Stories
33
+
34
+ 1. As a {actor}, I want {feature}, so that {benefit}
35
+
36
+ ## Implementation Decisions
37
+
38
+ - Modules/interfaces changed.
39
+ - Technical clarifications.
40
+ - Architecture/schema/API/contracts/interactions.
41
+ - No file paths.
42
+ - Prototype snippets allowed only if decision-rich and trimmed.
43
+
44
+ ## Testing Decisions
45
+
46
+ - Good tests verify external behaviour, not implementation.
47
+ - Seams to test; prefer existing/highest seam.
48
+ - Similar tests/prior art.
49
+
50
+ ## Out of Scope
51
+
52
+ {excluded work}
53
+
54
+ ## Further Notes
55
+
56
+ {other notes}
57
+ ```
58
+
59
+ ## Complete
60
+
61
+ Call `attempt_completion` with:
62
+ - PRD location (issue tracker URL or `.scratch/{feature-slug}/PRD.md` path)
63
+ - status (complete / blocked with reason)
64
+ - recommended next command (`/zoo-to-issues` to break it into implementation tickets)
65
+
66
+ Do NOT use `ask_followup_question` or write results as plain text without calling the tool.
@@ -5,7 +5,7 @@ description: Triage issues through a state machine driven by triage roles. Use w
5
5
 
6
6
  # Triage
7
7
 
8
- Issue tracker + label mapping should exist; run `/setup-matt-pocock-skills` if missing.
8
+ Issue tracker + label mapping should exist; run `/zoo-setup-matt-pocock-skills` if missing.
9
9
 
10
10
  Every posted issue/comment MUST start:
11
11
 
@@ -40,7 +40,7 @@ Show counts + one-line summaries. Let maintainer pick.
40
40
  2. Recommend category + state with reasoning + codebase summary.
41
41
  3. Wait for direction.
42
42
  4. Bugs: attempt repro before grilling: reporter steps, code trace, tests/commands, repro result.
43
- 5. If underspecified, run `/grill-with-docs`.
43
+ 5. If underspecified, run `/zoo-grill-with-docs`.
44
44
  6. Apply outcome.
45
45
 
46
46
  ## Outcomes
@@ -14,7 +14,7 @@ Use for small known fixes.
14
14
  5. If existing test covers touched area, run it.
15
15
  6. DO NOT write new tests unless asked.
16
16
  7. Confirm change.
17
- 8. For R3+ risk, suggest `/verify` before `/review` before `/commit-and-document`. Do not auto-launch. Otherwise offer `/commit-and-document` only after user satisfied.
17
+ 8. For R3+ risk, suggest `/zoo-verify` before `/zoo-review` before `/zoo-commit-and-document`. Do not auto-launch. Otherwise offer `/zoo-commit-and-document` only after user satisfied.
18
18
  9. Do not auto-launch follow-up commands.
19
19
 
20
20
  ## Complete