@fernado03/zoo-flow 0.9.0 → 0.10.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.
- package/README.md +113 -81
- package/bin/zoo-flow.js +444 -134
- package/package.json +3 -3
- package/templates/claude-code/.claude/commands/caveman.md +26 -0
- package/templates/claude-code/.claude/commands/commit-and-document.md +27 -0
- package/templates/claude-code/.claude/commands/diagnose.md +27 -0
- package/templates/claude-code/.claude/commands/feature.md +46 -0
- package/templates/claude-code/.claude/commands/fix.md +45 -0
- package/templates/claude-code/.claude/commands/grill-me.md +27 -0
- package/templates/claude-code/.claude/commands/grill-with-docs.md +27 -0
- package/templates/claude-code/.claude/commands/handoff.md +27 -0
- package/templates/claude-code/.claude/commands/improve-codebase-architecture.md +27 -0
- package/templates/claude-code/.claude/commands/prototype.md +27 -0
- package/templates/claude-code/.claude/commands/refactor.md +46 -0
- package/templates/claude-code/.claude/commands/review.md +27 -0
- package/templates/claude-code/.claude/commands/scaffold-context.md +27 -0
- package/templates/claude-code/.claude/commands/setup-matt-pocock-skills.md +27 -0
- package/templates/claude-code/.claude/commands/tdd.md +27 -0
- package/templates/claude-code/.claude/commands/teach.md +27 -0
- package/templates/claude-code/.claude/commands/to-issues.md +27 -0
- package/templates/claude-code/.claude/commands/to-prd.md +27 -0
- package/templates/claude-code/.claude/commands/triage.md +27 -0
- package/templates/claude-code/.claude/commands/tweak.md +27 -0
- package/templates/claude-code/.claude/commands/update-docs.md +27 -0
- package/templates/claude-code/.claude/commands/verify.md +27 -0
- package/templates/claude-code/.claude/commands/write-a-skill.md +27 -0
- package/templates/claude-code/.claude/commands/zoom-out.md +27 -0
- package/templates/claude-code/.claude/skills/engineering/commit-and-document/SKILL.md +37 -0
- package/templates/claude-code/.claude/skills/engineering/diagnose/SKILL.md +102 -0
- package/templates/claude-code/.claude/skills/engineering/explore/SKILL.md +61 -0
- package/templates/claude-code/.claude/skills/engineering/feature/SKILL.md +66 -0
- package/templates/claude-code/.claude/skills/engineering/fix/SKILL.md +59 -0
- package/templates/claude-code/.claude/skills/engineering/grill-with-docs/SKILL.md +35 -0
- package/templates/claude-code/.claude/skills/engineering/improve-codebase-architecture/SKILL.md +39 -0
- package/templates/claude-code/.claude/skills/engineering/prototype/SKILL.md +34 -0
- package/templates/claude-code/.claude/skills/engineering/refactor/SKILL.md +59 -0
- package/templates/claude-code/.claude/skills/engineering/review/SKILL.md +117 -0
- package/templates/claude-code/.claude/skills/engineering/scaffold-context/SKILL.md +44 -0
- package/templates/claude-code/.claude/skills/engineering/setup-matt-pocock-skills/SKILL.md +48 -0
- package/templates/claude-code/.claude/skills/engineering/tdd/SKILL.md +81 -0
- package/templates/claude-code/.claude/skills/engineering/to-issues/SKILL.md +37 -0
- package/templates/claude-code/.claude/skills/engineering/to-prd/SKILL.md +39 -0
- package/templates/claude-code/.claude/skills/engineering/triage/SKILL.md +36 -0
- package/templates/claude-code/.claude/skills/engineering/tweak/SKILL.md +37 -0
- package/templates/claude-code/.claude/skills/engineering/update-docs/SKILL.md +33 -0
- package/templates/claude-code/.claude/skills/engineering/verify/SKILL.md +38 -0
- package/templates/claude-code/.claude/skills/engineering/zoom-out/SKILL.md +34 -0
- package/templates/claude-code/.claude/skills/productivity/caveman/SKILL.md +24 -0
- package/templates/claude-code/.claude/skills/productivity/grill-me/SKILL.md +21 -0
- package/templates/claude-code/.claude/skills/productivity/handoff/SKILL.md +20 -0
- package/templates/claude-code/.claude/skills/productivity/teach/SKILL.md +116 -0
- package/templates/claude-code/.claude/skills/productivity/write-a-skill/SKILL.md +59 -0
- package/templates/claude-code/.zoo-flow/CONTEXT.md +8 -0
- package/templates/claude-code/.zoo-flow/START_HERE.md +28 -0
- package/templates/claude-code/.zoo-flow/docs/adr/0001-record-architecture-decisions.md +22 -0
- package/templates/claude-code/.zoo-flow/evals/no-regression-checklist.md +26 -0
- package/templates/claude-code/.zoo-flow/evals/routing-cases.jsonl +18 -0
- package/templates/claude-code/.zoo-flow/evals/routing-cases.md +211 -0
- package/templates/claude-code/.zoo-flow/project-profile.json +24 -0
- package/templates/claude-code/CLAUDE.md +237 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Review a diff, branch, PR, or work-in-progress change against the requested spec, repo standards, architecture, and likely regressions. Use before committing non-trivial work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review
|
|
7
|
+
|
|
8
|
+
Purpose: answer whether the diff matches the spec, standards, architecture, and project intent.
|
|
9
|
+
|
|
10
|
+
Review only. Do not patch application source. As architect profile, edits are limited to Markdown, `.scratch/`, and `docs/`.
|
|
11
|
+
|
|
12
|
+
## 1. Identify target
|
|
13
|
+
|
|
14
|
+
Use the narrowest target that fits the request:
|
|
15
|
+
|
|
16
|
+
- User-provided base ref, PR, issue, files, or review focus.
|
|
17
|
+
- Staged diff when staged changes exist.
|
|
18
|
+
- Unstaged diff when unstaged changes exist.
|
|
19
|
+
- Branch diff against the likely base (`main`, `master`, or merge-base) when asked to review a branch.
|
|
20
|
+
- Specific files/specs/PRDs when provided.
|
|
21
|
+
|
|
22
|
+
If the target is unclear, ask one short question via `AskUserQuestion` and stop.
|
|
23
|
+
|
|
24
|
+
## 2. Read needed context only
|
|
25
|
+
|
|
26
|
+
Start with:
|
|
27
|
+
|
|
28
|
+
- `git status --short` via `Bash`
|
|
29
|
+
- `git diff --stat` via `Bash`
|
|
30
|
+
- `git diff --cached --stat` via `Bash` when staged changes exist
|
|
31
|
+
|
|
32
|
+
Then read targeted diffs only:
|
|
33
|
+
|
|
34
|
+
- `git diff -- <file>` via `Bash`
|
|
35
|
+
- `git diff --cached -- <file>` via `Bash`
|
|
36
|
+
- `git diff <base>...HEAD -- <file>` via `Bash`
|
|
37
|
+
|
|
38
|
+
Read relevant specs, issues, PRDs, standards, docs, ADRs, security notes, or project conventions only when they affect the changed area or the user requested that axis.
|
|
39
|
+
|
|
40
|
+
## 3. Review axes
|
|
41
|
+
|
|
42
|
+
Standards axis:
|
|
43
|
+
|
|
44
|
+
- style
|
|
45
|
+
- architecture
|
|
46
|
+
- test quality
|
|
47
|
+
- maintainability
|
|
48
|
+
- security
|
|
49
|
+
- project conventions
|
|
50
|
+
|
|
51
|
+
Spec axis:
|
|
52
|
+
|
|
53
|
+
- did it solve the requested problem?
|
|
54
|
+
- did it change public behavior unexpectedly?
|
|
55
|
+
- did it miss edge cases?
|
|
56
|
+
- did it violate PRD, issue, or user intent?
|
|
57
|
+
|
|
58
|
+
Security/Risk axis:
|
|
59
|
+
|
|
60
|
+
- does the change touch auth, payments, PII, session data, or external API contracts?
|
|
61
|
+
- does it introduce new dependencies or entitlements?
|
|
62
|
+
- are there error paths that could leak information?
|
|
63
|
+
- is there a regression path that would be hard to detect?
|
|
64
|
+
- does the change affect audit logs or compliance obligations?
|
|
65
|
+
|
|
66
|
+
For every Security/Risk finding, include the severity and a concrete mitigation suggestion. Omitting this axis is allowed when the change clearly cannot affect security (copy changes, comment fixes, test-only additions, docs-only updates).
|
|
67
|
+
|
|
68
|
+
## 4. Findings
|
|
69
|
+
|
|
70
|
+
Order findings by severity:
|
|
71
|
+
|
|
72
|
+
- Blocker
|
|
73
|
+
- High
|
|
74
|
+
- Medium
|
|
75
|
+
- Low
|
|
76
|
+
- Nit
|
|
77
|
+
|
|
78
|
+
For every finding include:
|
|
79
|
+
|
|
80
|
+
- file/path
|
|
81
|
+
- line or symbol when possible
|
|
82
|
+
- problem
|
|
83
|
+
- why it matters
|
|
84
|
+
- suggested fix
|
|
85
|
+
|
|
86
|
+
Prefer concrete findings over commentary. If no findings exist for a severity, omit that severity.
|
|
87
|
+
|
|
88
|
+
## 5. Result
|
|
89
|
+
|
|
90
|
+
End with exactly one result line:
|
|
91
|
+
|
|
92
|
+
- `Review result: approve`
|
|
93
|
+
- `Review result: approve with nits`
|
|
94
|
+
- `Review result: changes requested`
|
|
95
|
+
- `Review result: blocked`
|
|
96
|
+
|
|
97
|
+
## 6. Save and complete
|
|
98
|
+
|
|
99
|
+
Write the full review (findings, axes, result) to `.scratch/reviews/<date>/review-<slug>.md`.
|
|
100
|
+
|
|
101
|
+
Return completion with:
|
|
102
|
+
- file path where review was saved
|
|
103
|
+
- brief result line (approve / approve with nits / changes requested / blocked)
|
|
104
|
+
- recommended next command
|
|
105
|
+
|
|
106
|
+
## Recommended next command
|
|
107
|
+
|
|
108
|
+
If fixes are needed, recommend one next command only:
|
|
109
|
+
|
|
110
|
+
- small fix -> `/tweak`
|
|
111
|
+
- behavior fix -> `/tdd`
|
|
112
|
+
- unknown cause -> `/fix`
|
|
113
|
+
- design issue -> `/refactor`
|
|
114
|
+
- ready for evidence -> `/verify`
|
|
115
|
+
- ready to commit -> `/commit-and-document`
|
|
116
|
+
|
|
117
|
+
Do not auto-launch any follow-up command.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scaffold-context
|
|
3
|
+
description: Bootstrap or expand the project CONTEXT.md with domain language, key decisions, and conventions. Use when starting a new project, onboarding to an existing one, or when CONTEXT.md is missing/thin.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Scaffold Context
|
|
7
|
+
|
|
8
|
+
RULE: CONTEXT.md is the project's shared vocabulary. Keep it concise, accurate, and useful for both humans and agents.
|
|
9
|
+
|
|
10
|
+
## Procedure
|
|
11
|
+
|
|
12
|
+
1. Check if `.zoo-flow/CONTEXT.md` exists via `Glob`.
|
|
13
|
+
2. If exists and non-empty:
|
|
14
|
+
- Read current content via `Read`.
|
|
15
|
+
- Ask user via `AskUserQuestion`: expand existing or replace entirely.
|
|
16
|
+
3. If missing or thin:
|
|
17
|
+
- Explore codebase via `Glob`, `Grep`, and targeted `Read`.
|
|
18
|
+
- Identify domain language, key abstractions, conventions.
|
|
19
|
+
- Draft CONTEXT.md content.
|
|
20
|
+
4. Structure CONTEXT.md with:
|
|
21
|
+
- Project purpose and scope
|
|
22
|
+
- Domain language and terminology
|
|
23
|
+
- Key architectural decisions
|
|
24
|
+
- Conventions and standards
|
|
25
|
+
- Common patterns
|
|
26
|
+
5. Review with user via `AskUserQuestion`.
|
|
27
|
+
6. Write to `.zoo-flow/CONTEXT.md` via `Write`.
|
|
28
|
+
|
|
29
|
+
## Context economy
|
|
30
|
+
|
|
31
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
32
|
+
|
|
33
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
34
|
+
|
|
35
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
36
|
+
|
|
37
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
38
|
+
|
|
39
|
+
## Complete
|
|
40
|
+
|
|
41
|
+
Return a summary with:
|
|
42
|
+
- CONTEXT.md location
|
|
43
|
+
- sections added/updated
|
|
44
|
+
- recommended next command (typically `/explore` to deepen understanding, or `/feature`/`/refactor` to start work)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-matt-pocock-skills
|
|
3
|
+
description: Configure Matt Pocock's TypeScript/React workflow preferences and conventions. Use when user wants to adopt Matt Pocock's coding style, TypeScript patterns, or React best practices.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Setup Matt Pocock Skills
|
|
7
|
+
|
|
8
|
+
RULE: Apply Matt Pocock's TypeScript and React conventions consistently. These are opinionated but battle-tested patterns.
|
|
9
|
+
|
|
10
|
+
## Procedure
|
|
11
|
+
|
|
12
|
+
1. Read user's current configuration via `Glob` and `Read`:
|
|
13
|
+
- `tsconfig.json`
|
|
14
|
+
- `.eslintrc` or `eslint.config.js`
|
|
15
|
+
- `package.json`
|
|
16
|
+
- Existing `.prettierrc` or similar
|
|
17
|
+
2. Apply TypeScript preferences via `Edit` or `Write`:
|
|
18
|
+
- Strict mode enabled
|
|
19
|
+
- No implicit any
|
|
20
|
+
- Explicit function return types
|
|
21
|
+
- Prefer type inference for locals
|
|
22
|
+
3. Apply React preferences:
|
|
23
|
+
- Functional components only
|
|
24
|
+
- Custom hooks for shared logic
|
|
25
|
+
- Proper prop typing with interfaces
|
|
26
|
+
- Avoid inline object/function definitions in JSX
|
|
27
|
+
4. Apply ESLint preferences:
|
|
28
|
+
- Recommended rulesets
|
|
29
|
+
- Custom rules for common pitfalls
|
|
30
|
+
5. Document conventions in `.zoo-flow/matt-pocock-conventions.md` via `Write`.
|
|
31
|
+
6. Review changes with user via `AskUserQuestion`.
|
|
32
|
+
|
|
33
|
+
## Context economy
|
|
34
|
+
|
|
35
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
36
|
+
|
|
37
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
38
|
+
|
|
39
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
40
|
+
|
|
41
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
42
|
+
|
|
43
|
+
## Complete
|
|
44
|
+
|
|
45
|
+
Return a summary with:
|
|
46
|
+
- configuration files updated
|
|
47
|
+
- conventions document location
|
|
48
|
+
- recommended next command (typically `/verify` to ensure config is valid)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd
|
|
3
|
+
description: Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test-Driven Development
|
|
7
|
+
|
|
8
|
+
RULE: Test observable behaviour through public interfaces. No implementation-detail tests. Use glossary. Respect ADRs.
|
|
9
|
+
|
|
10
|
+
## Planning
|
|
11
|
+
|
|
12
|
+
Before code:
|
|
13
|
+
1. Confirm public interface changes.
|
|
14
|
+
2. Confirm behaviours; prioritise critical paths/complex logic.
|
|
15
|
+
3. Identify deep-module opportunities.
|
|
16
|
+
4. Design for testability.
|
|
17
|
+
5. List behaviours, not implementation steps.
|
|
18
|
+
6. Get user approval via `AskUserQuestion`.
|
|
19
|
+
|
|
20
|
+
Ask: `What should the public interface look like? Which behaviours matter most?`
|
|
21
|
+
|
|
22
|
+
## Loop
|
|
23
|
+
|
|
24
|
+
DO NOT write all tests then all code.
|
|
25
|
+
|
|
26
|
+
For each slice:
|
|
27
|
+
1. RED: write one failing behaviour test.
|
|
28
|
+
2. GREEN: write minimal code to pass.
|
|
29
|
+
3. Repeat next behaviour.
|
|
30
|
+
|
|
31
|
+
Rules:
|
|
32
|
+
- One test at a time.
|
|
33
|
+
- Public interface only.
|
|
34
|
+
- Minimal code only.
|
|
35
|
+
- No speculative features.
|
|
36
|
+
|
|
37
|
+
## Refactor
|
|
38
|
+
|
|
39
|
+
Only after green:
|
|
40
|
+
1. Remove duplication.
|
|
41
|
+
2. Deepen shallow modules.
|
|
42
|
+
3. Apply SOLID where natural.
|
|
43
|
+
4. Refactor problematic existing code revealed.
|
|
44
|
+
5. Run tests after each refactor via `Bash`.
|
|
45
|
+
|
|
46
|
+
Checklist per cycle:
|
|
47
|
+
- [ ] Test describes behaviour.
|
|
48
|
+
- [ ] Test uses public interface.
|
|
49
|
+
- [ ] Test survives internal refactor.
|
|
50
|
+
- [ ] Code minimal.
|
|
51
|
+
- [ ] No speculation.
|
|
52
|
+
|
|
53
|
+
After green, suggest `/verify`, then `/review`, then `/commit-and-document` for non-trivial work. Do not auto-launch follow-up commands.
|
|
54
|
+
|
|
55
|
+
## Complete
|
|
56
|
+
|
|
57
|
+
Return a summary with:
|
|
58
|
+
- what was implemented (behaviours, interfaces)
|
|
59
|
+
- tests written (count, pass/fail)
|
|
60
|
+
- status (complete / blocked with reason)
|
|
61
|
+
- recommended next command
|
|
62
|
+
|
|
63
|
+
## Context economy
|
|
64
|
+
|
|
65
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
66
|
+
|
|
67
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
68
|
+
|
|
69
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
70
|
+
|
|
71
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
72
|
+
|
|
73
|
+
Read the public interface and nearest existing tests first. Avoid reading unrelated implementation until a failing test or search result points there.
|
|
74
|
+
|
|
75
|
+
## References
|
|
76
|
+
|
|
77
|
+
- `tests.md` — what to assert and what not to.
|
|
78
|
+
- `mocking.md` — when (and when not) to mock.
|
|
79
|
+
- `interface-design.md` — designing testable interfaces.
|
|
80
|
+
- `deep-modules.md` — interface vs implementation depth.
|
|
81
|
+
- `refactoring.md` — refactor candidates after green.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-issues
|
|
3
|
+
description: Break down a feature or project into implementable issues/tasks. Use after creating a PRD to plan implementation work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# To Issues
|
|
7
|
+
|
|
8
|
+
RULE: Each issue should be independently implementable and testable. Avoid vague or oversized issues.
|
|
9
|
+
|
|
10
|
+
## Procedure
|
|
11
|
+
|
|
12
|
+
1. Read PRD or requirements from `.scratch/prd/` or user input.
|
|
13
|
+
2. Break down into discrete issues:
|
|
14
|
+
- Each issue has clear scope and acceptance criteria.
|
|
15
|
+
- Issues are sized appropriately (not too large, not too small).
|
|
16
|
+
- Dependencies between issues are identified.
|
|
17
|
+
3. Write issues to `.scratch/issues/<feature-name>/` using `Write`.
|
|
18
|
+
4. Create issue index with dependency graph.
|
|
19
|
+
5. Review with user via `AskUserQuestion`.
|
|
20
|
+
|
|
21
|
+
## Context economy
|
|
22
|
+
|
|
23
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
24
|
+
|
|
25
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
26
|
+
|
|
27
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
28
|
+
|
|
29
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
30
|
+
|
|
31
|
+
## Complete
|
|
32
|
+
|
|
33
|
+
Return completion with:
|
|
34
|
+
- issues directory location
|
|
35
|
+
- issue count and summary
|
|
36
|
+
- dependency graph
|
|
37
|
+
- recommended next command (typically `/tdd` or `/tweak` to start implementing first issue)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-prd
|
|
3
|
+
description: Convert requirements or ideas into a Product Requirements Document. Use when defining what to build before starting implementation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# To PRD
|
|
7
|
+
|
|
8
|
+
RULE: PRD defines what to build, not how to build it. Implementation details belong in design docs.
|
|
9
|
+
|
|
10
|
+
## Procedure
|
|
11
|
+
|
|
12
|
+
1. Gather requirements from user input, discussions, or existing documentation.
|
|
13
|
+
2. Structure PRD with standard sections:
|
|
14
|
+
- Problem statement
|
|
15
|
+
- Goals and objectives
|
|
16
|
+
- User stories or use cases
|
|
17
|
+
- Functional requirements
|
|
18
|
+
- Non-functional requirements
|
|
19
|
+
- Constraints and assumptions
|
|
20
|
+
- Success metrics
|
|
21
|
+
3. Write PRD to `.scratch/prd/<feature-name>.md` using `Write`.
|
|
22
|
+
4. Review with user via `AskUserQuestion`.
|
|
23
|
+
|
|
24
|
+
## Context economy
|
|
25
|
+
|
|
26
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
27
|
+
|
|
28
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
29
|
+
|
|
30
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
31
|
+
|
|
32
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
33
|
+
|
|
34
|
+
## Complete
|
|
35
|
+
|
|
36
|
+
Return completion with:
|
|
37
|
+
- PRD location
|
|
38
|
+
- summary of requirements
|
|
39
|
+
- recommended next command (typically `/to-issues` to break down into tasks)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: triage
|
|
3
|
+
description: Prioritize and categorize issues, bugs, or tasks. Use when managing a backlog or deciding what to work on next.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Triage
|
|
7
|
+
|
|
8
|
+
RULE: Be decisive. Every item needs a clear priority and category.
|
|
9
|
+
|
|
10
|
+
## Procedure
|
|
11
|
+
|
|
12
|
+
1. Review list of issues/bugs/tasks (from user input, issue tracker, etc.).
|
|
13
|
+
2. For each item:
|
|
14
|
+
- Assess severity (critical, high, medium, low).
|
|
15
|
+
- Categorize (bug, feature, tech debt, documentation, etc.).
|
|
16
|
+
- Estimate effort (small, medium, large).
|
|
17
|
+
- Identify dependencies or blockers.
|
|
18
|
+
3. Prioritize based on impact and urgency.
|
|
19
|
+
4. Document triage results in `.scratch/triage/<date>.md` using `Write`.
|
|
20
|
+
|
|
21
|
+
## Context economy
|
|
22
|
+
|
|
23
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
24
|
+
|
|
25
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
26
|
+
|
|
27
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
28
|
+
|
|
29
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
30
|
+
|
|
31
|
+
## Complete
|
|
32
|
+
|
|
33
|
+
Return completion with:
|
|
34
|
+
- triage document location
|
|
35
|
+
- prioritized list summary
|
|
36
|
+
- recommended next command (typically `/fix` for bugs, `/feature` for features, or `/refactor` for tech debt)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tweak
|
|
3
|
+
description: Direct implementation mode for small, known fixes or UI updates. Bypasses heavy diagnosis or PRD creation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tweak
|
|
7
|
+
|
|
8
|
+
Use for small known fixes.
|
|
9
|
+
|
|
10
|
+
1. Locate target files quickly using `Glob` and `Grep`.
|
|
11
|
+
2. Ask only if multiple identical matches.
|
|
12
|
+
3. Implement exact requested fix.
|
|
13
|
+
4. DO NOT rewrite surrounding logic unless requested.
|
|
14
|
+
5. If existing test covers touched area, run it via `Bash`.
|
|
15
|
+
6. DO NOT write new tests unless asked.
|
|
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.
|
|
18
|
+
9. Do not auto-launch follow-up commands.
|
|
19
|
+
|
|
20
|
+
## Complete
|
|
21
|
+
|
|
22
|
+
Return a summary with:
|
|
23
|
+
- what was changed (file paths, line ranges)
|
|
24
|
+
- status (complete / blocked with reason)
|
|
25
|
+
- recommended next command
|
|
26
|
+
|
|
27
|
+
## Context economy
|
|
28
|
+
|
|
29
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
30
|
+
|
|
31
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
32
|
+
|
|
33
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
34
|
+
|
|
35
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
36
|
+
|
|
37
|
+
For small changes, audit only the named files and nearby call sites. Expand search only if the first audit shows hidden dependencies.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-docs
|
|
3
|
+
description: Update documentation to reflect code changes. Use when implementation changes require documentation updates.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Update Docs
|
|
7
|
+
|
|
8
|
+
RULE: Documentation must match the current implementation. Stale docs are worse than no docs.
|
|
9
|
+
|
|
10
|
+
## Procedure
|
|
11
|
+
|
|
12
|
+
1. Identify which documentation needs updating (README, API docs, inline comments, etc.).
|
|
13
|
+
2. Read existing documentation via `Glob` and `Read`.
|
|
14
|
+
3. Read relevant code to understand current behavior.
|
|
15
|
+
4. Update documentation using `Edit` or `Write` to match implementation.
|
|
16
|
+
5. Verify documentation accuracy against code.
|
|
17
|
+
|
|
18
|
+
## Context economy
|
|
19
|
+
|
|
20
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
21
|
+
|
|
22
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
23
|
+
|
|
24
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
25
|
+
|
|
26
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
27
|
+
|
|
28
|
+
## Complete
|
|
29
|
+
|
|
30
|
+
Return completion with:
|
|
31
|
+
- documentation files updated
|
|
32
|
+
- summary of changes
|
|
33
|
+
- recommended next command (typically `/verify` to ensure docs are accurate)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify
|
|
3
|
+
description: Run the smallest meaningful verification suite. Use after implementation to ensure changes work correctly.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verify
|
|
7
|
+
|
|
8
|
+
RULE: Never claim verified unless you actually ran the checks and they passed.
|
|
9
|
+
|
|
10
|
+
## Procedure
|
|
11
|
+
|
|
12
|
+
1. Identify what to verify (changed files, new features, bug fixes).
|
|
13
|
+
2. Determine appropriate verification commands:
|
|
14
|
+
- `Bash` with test commands (pytest, jest, etc.)
|
|
15
|
+
- `Bash` with type checking (mypy, tsc, etc.)
|
|
16
|
+
- `Bash` with linting (ruff, eslint, etc.)
|
|
17
|
+
- `Bash` with build commands if applicable
|
|
18
|
+
3. Run verification commands via `Bash`.
|
|
19
|
+
4. Parse output to determine pass/fail status.
|
|
20
|
+
5. If any check fails, stop and report failures.
|
|
21
|
+
6. If all checks pass, report success.
|
|
22
|
+
|
|
23
|
+
## Context economy
|
|
24
|
+
|
|
25
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
26
|
+
|
|
27
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
28
|
+
|
|
29
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
30
|
+
|
|
31
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
32
|
+
|
|
33
|
+
## Complete
|
|
34
|
+
|
|
35
|
+
Return completion with:
|
|
36
|
+
- verification commands run
|
|
37
|
+
- pass/fail status for each
|
|
38
|
+
- recommended next command (typically `/review` if passed, or `/fix` if failed)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zoom-out
|
|
3
|
+
description: Map the codebase at a high level to understand structure, modules, and relationships. Use when entering an unfamiliar codebase or planning large changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Zoom Out
|
|
7
|
+
|
|
8
|
+
RULE: Produce a high-level map, not detailed code analysis. Focus on structure and relationships.
|
|
9
|
+
|
|
10
|
+
## Procedure
|
|
11
|
+
|
|
12
|
+
1. Use `Glob` to identify directory structure and file organization.
|
|
13
|
+
2. Use `Grep` to find key patterns (entry points, exports, configurations).
|
|
14
|
+
3. Use targeted `Read` on key files (README, package.json, main entry points).
|
|
15
|
+
4. Identify major modules, components, and their relationships.
|
|
16
|
+
5. Document map in `.scratch/zoom-out/<date>.md` using `Write`.
|
|
17
|
+
6. Include text-based diagrams showing structure and dependencies.
|
|
18
|
+
|
|
19
|
+
## Context economy
|
|
20
|
+
|
|
21
|
+
Before broad reads, locate relevant files/symbols with `Glob`, `Grep`, or targeted file reads.
|
|
22
|
+
|
|
23
|
+
Prefer targeted `Read` with line ranges or block reads once the relevant area is known.
|
|
24
|
+
|
|
25
|
+
Read full files only when structure, ordering, or surrounding context is required for correctness.
|
|
26
|
+
|
|
27
|
+
Do not re-read unchanged files; use prior findings unless the file changed.
|
|
28
|
+
|
|
29
|
+
## Complete
|
|
30
|
+
|
|
31
|
+
Return completion with:
|
|
32
|
+
- map document location
|
|
33
|
+
- high-level structure summary
|
|
34
|
+
- recommended next command (typically `/explore` for deeper dive, or `/feature`/`/refactor` if changes needed)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: caveman
|
|
3
|
+
description: Ultra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Caveman
|
|
7
|
+
|
|
8
|
+
ACTIVE until user says stop/normal mode.
|
|
9
|
+
|
|
10
|
+
Rules:
|
|
11
|
+
- Drop articles/filler/pleasantries/hedging.
|
|
12
|
+
- Keep technical accuracy + exact terms.
|
|
13
|
+
- Fragments OK.
|
|
14
|
+
- Use short synonyms.
|
|
15
|
+
- Abbrev: DB/auth/config/req/res/fn/impl.
|
|
16
|
+
- Use arrows for causality.
|
|
17
|
+
- Code blocks unchanged.
|
|
18
|
+
- Quote errors exact.
|
|
19
|
+
|
|
20
|
+
Pattern: `[thing] [action] [reason]. [next step].`
|
|
21
|
+
|
|
22
|
+
Auto-clarity:
|
|
23
|
+
- Use normal clarity briefly for security warnings/irreversible actions/risky multi-step/repeated clarification.
|
|
24
|
+
- Resume caveman after.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grill-me
|
|
3
|
+
description: Interview the user about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Grill Me
|
|
7
|
+
|
|
8
|
+
1. Interview plan/design until shared understanding.
|
|
9
|
+
2. Walk design tree branch-by-branch.
|
|
10
|
+
3. Resolve dependency order between decisions.
|
|
11
|
+
4. Ask one question at a time via `AskUserQuestion`.
|
|
12
|
+
5. Include recommended answer.
|
|
13
|
+
6. Inspect code via `Read` and `Grep` instead of asking when code can answer.
|
|
14
|
+
|
|
15
|
+
## Complete
|
|
16
|
+
|
|
17
|
+
Return a summary with:
|
|
18
|
+
- decision tree branches resolved (count)
|
|
19
|
+
- key decisions made (summary)
|
|
20
|
+
- status (complete / blocked with reason)
|
|
21
|
+
- recommended next command
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handoff
|
|
3
|
+
description: Compact the current conversation into a handoff document for another agent to pick up.
|
|
4
|
+
argument-hint: "What will the next session be used for?"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Handoff
|
|
8
|
+
|
|
9
|
+
1. Write handoff for fresh agent.
|
|
10
|
+
2. Save in OS temp dir via `Bash`, not workspace.
|
|
11
|
+
3. Tailor to user args.
|
|
12
|
+
4. Include suggested skills section.
|
|
13
|
+
5. Reference artifacts by path/URL; do not duplicate.
|
|
14
|
+
6. Redact secrets/API keys/passwords/PII.
|
|
15
|
+
|
|
16
|
+
## Complete
|
|
17
|
+
|
|
18
|
+
Return a summary with:
|
|
19
|
+
- handoff file path (OS temp dir)
|
|
20
|
+
- status (complete / blocked with reason)
|