@allthingsclaude/blueprints 0.3.0-beta.22 → 0.3.0-beta.23
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/content/agents/audit.md +15 -2
- package/content/agents/finalize.md +0 -12
- package/content/agents/implement.md +36 -1
- package/content/agents/parallelize.md +36 -4
- package/content/commands/auto.md +17 -1
- package/content/commands/commit.md +2 -0
- package/content/commands/kickoff.md +8 -5
- package/package.json +1 -1
package/content/agents/audit.md
CHANGED
|
@@ -93,6 +93,20 @@ Go through each change systematically:
|
|
|
93
93
|
- Type coercion bugs
|
|
94
94
|
|
|
95
95
|
#### 🟡 Important Issues (Should Fix)
|
|
96
|
+
- **Convention consistency**
|
|
97
|
+
- Do the changes introduce a different pattern for a concern the codebase already solves? (e.g., different styling method, different error feedback mechanism, different data fetching approach)
|
|
98
|
+
- Scan the codebase to identify authoritative patterns: styling method, error/notification system, state management, data fetching, component structure
|
|
99
|
+
- Flag any new code that uses a parallel approach for the same concern (e.g., inline styles in a CSS modules project, `alert()` in a project with a toast library, raw fetch in a project with custom hooks)
|
|
100
|
+
- Check that all new code is internally consistent (same approach used across all changed files)
|
|
101
|
+
|
|
102
|
+
- **Accessibility** (for changes involving UI — components, pages, modals, forms, dialogs)
|
|
103
|
+
- Labels associated with inputs
|
|
104
|
+
- ARIA roles on overlays, modals, and interactive widgets
|
|
105
|
+
- Keyboard handling (Escape to close, focus trap in modals, Tab order)
|
|
106
|
+
- Visible focus indicators
|
|
107
|
+
- Color contrast (if new colors introduced)
|
|
108
|
+
- Screen reader considerations (meaningful alt text, aria-labels)
|
|
109
|
+
|
|
96
110
|
- **DRY violations**
|
|
97
111
|
- Duplicated code that should be extracted
|
|
98
112
|
- Repeated logic across files
|
|
@@ -112,7 +126,7 @@ Go through each change systematically:
|
|
|
112
126
|
- Missing error logging
|
|
113
127
|
|
|
114
128
|
- **Performance issues**
|
|
115
|
-
- N+1 queries
|
|
129
|
+
- N+1 queries — per-item database calls inside loops or list transformations
|
|
116
130
|
- Missing database indexes
|
|
117
131
|
- Inefficient algorithms
|
|
118
132
|
- Memory leaks
|
|
@@ -136,7 +150,6 @@ Go through each change systematically:
|
|
|
136
150
|
- Missing const/readonly
|
|
137
151
|
- Use of deprecated APIs
|
|
138
152
|
- Suboptimal patterns
|
|
139
|
-
- Missing accessibility (a11y)
|
|
140
153
|
|
|
141
154
|
- **Testing**
|
|
142
155
|
- Missing test coverage for new code
|
|
@@ -227,9 +227,6 @@ Files modified:
|
|
|
227
227
|
- path/to/file.ts - what changed
|
|
228
228
|
- path/to/other.ts - what changed
|
|
229
229
|
|
|
230
|
-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
231
|
-
|
|
232
|
-
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
233
230
|
```
|
|
234
231
|
|
|
235
232
|
**Commit Message Guidelines**:
|
|
@@ -263,9 +260,6 @@ Files modified:
|
|
|
263
260
|
- src/lib/jwt.ts - Token generation and validation
|
|
264
261
|
- src/types/auth.ts - Auth type definitions
|
|
265
262
|
|
|
266
|
-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
267
|
-
|
|
268
|
-
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
269
263
|
```
|
|
270
264
|
|
|
271
265
|
```
|
|
@@ -285,9 +279,6 @@ Files modified:
|
|
|
285
279
|
- src/components/FeaturedProduct.tsx - Now uses ProductCard
|
|
286
280
|
- src/app/[domain]/products/ProductGrid.tsx - Simplified to use ProductCard
|
|
287
281
|
|
|
288
|
-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
289
|
-
|
|
290
|
-
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
291
282
|
```
|
|
292
283
|
|
|
293
284
|
### 8. Create Git Commit
|
|
@@ -317,9 +308,6 @@ Detailed explanation:
|
|
|
317
308
|
Files modified:
|
|
318
309
|
- path/file.ts - what changed
|
|
319
310
|
|
|
320
|
-
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
|
321
|
-
|
|
322
|
-
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
323
311
|
EOF
|
|
324
312
|
)"
|
|
325
313
|
```
|
|
@@ -37,6 +37,31 @@ Extract the plan name from the arguments (first word after /kickoff):
|
|
|
37
37
|
- If file doesn't exist, list available plans and ask user to specify
|
|
38
38
|
- Parse the plan structure (Objective, Phases, Tasks, Files)
|
|
39
39
|
|
|
40
|
+
### 1.5 Discover Codebase Conventions
|
|
41
|
+
|
|
42
|
+
Before writing any code, scan the existing codebase to understand established patterns. This prevents introducing inconsistent approaches (e.g., inline styles in a SCSS project, `alert()` in a project with a toast library).
|
|
43
|
+
|
|
44
|
+
**What to look for:**
|
|
45
|
+
- **Error handling / user feedback**: Search for toast libraries, error boundaries, notification systems, `alert(` usage
|
|
46
|
+
- **Styling method**: Check for CSS modules (`.module.css`), SCSS (`.scss`), Tailwind, styled-components, inline styles — which is dominant?
|
|
47
|
+
- **State management**: Context, stores, reducers, signals — what pattern does the project use?
|
|
48
|
+
- **Component structure**: File naming, export patterns, colocation conventions
|
|
49
|
+
- **Data fetching**: Custom hooks, direct API calls, query libraries — what's the established pattern?
|
|
50
|
+
- **Test infrastructure**: Search for `describe(`, `it(`, `test(`, check for test config files — what framework exists and where do tests live?
|
|
51
|
+
|
|
52
|
+
**Method**: Use Grep/Glob to sample patterns:
|
|
53
|
+
```bash
|
|
54
|
+
# Examples — adapt to the project
|
|
55
|
+
grep -r "toast\|alert(" src/ --include="*.ts" --include="*.tsx" -l
|
|
56
|
+
ls src/**/*.module.css src/**/*.scss 2>/dev/null
|
|
57
|
+
grep -r "describe(\|it(\|test(" --include="*.test.*" -l
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Store findings** as a mental checklist to reference throughout implementation:
|
|
61
|
+
- Note which patterns are **authoritative** (used consistently across the codebase) vs. **one-off** (used in a single file)
|
|
62
|
+
- Authoritative patterns are mandatory to follow; one-offs can be ignored
|
|
63
|
+
- If the project has no established pattern for a concern, note that too — you have freedom to choose
|
|
64
|
+
|
|
40
65
|
### 2. Initial Assessment
|
|
41
66
|
|
|
42
67
|
Before starting implementation:
|
|
@@ -102,6 +127,9 @@ For each task in the current phase:
|
|
|
102
127
|
- Run linter (if applicable, using detected package manager)
|
|
103
128
|
- Check git diff to review changes
|
|
104
129
|
- Verify the change works as expected
|
|
130
|
+
- **Convention adherence**: Does this code follow the patterns discovered in Step 1.5? If the project uses a specific styling method, did you use it? If there's an established feedback/notification system, did you use it instead of a raw alternative? If there's a custom hook or data fetching pattern, did you follow it?
|
|
131
|
+
- **Accessibility basics** (for UI tasks — modals, forms, dialogs, interactive elements): Labels associated with inputs, ARIA roles on overlays/modals, keyboard handling (Escape to close, focus trap in modals), visible focus indicators
|
|
132
|
+
- **Data access patterns** (for tasks involving data fetching or transformation): No per-item queries inside loops or list iterations, batch operations where possible, efficient relationship loading
|
|
105
133
|
|
|
106
134
|
#### D. Update Progress
|
|
107
135
|
- Mark current task as `completed` in TodoWrite
|
|
@@ -133,7 +161,13 @@ At the end of each phase:
|
|
|
133
161
|
1. **Run validation checks** from the plan's "Validation" section
|
|
134
162
|
2. **Review all changes** in the phase: `git diff`
|
|
135
163
|
3. **Run full checks**: typecheck and lint using the detected package manager
|
|
136
|
-
4. **
|
|
164
|
+
4. **Consistency review**: Before presenting to the user, review all code written in this phase as a cohesive whole. Check for:
|
|
165
|
+
- Same error handling approach across all new code
|
|
166
|
+
- Same styling method throughout
|
|
167
|
+
- No unnecessary duplication (e.g., identical handler functions across components that could be shared)
|
|
168
|
+
- Consistent component structure and naming
|
|
169
|
+
- If any inconsistencies are found, fix them before moving on
|
|
170
|
+
5. **Ask user for approval** before moving to next phase:
|
|
137
171
|
|
|
138
172
|
```markdown
|
|
139
173
|
🎯 **Phase 1 Complete**
|
|
@@ -253,6 +287,7 @@ Use Edit tool to update checkboxes in the plan.
|
|
|
253
287
|
- Match existing code style and patterns
|
|
254
288
|
- Use the same libraries and approaches as existing code
|
|
255
289
|
- Check similar implementations in the codebase
|
|
290
|
+
- When you encounter a concern that already has a solved pattern in the codebase (error feedback, styling, data fetching, state management), always use the existing pattern. Never introduce a parallel approach for the same concern — if the project uses a particular styling method, don't use inline styles; if it has a notification system, don't use `alert()`; if it has a data fetching pattern, don't make raw calls
|
|
256
291
|
|
|
257
292
|
### Handle Dependencies
|
|
258
293
|
- If Task B depends on Task A, complete A first
|
|
@@ -65,7 +65,23 @@ Parse the plan and create a comprehensive task list:
|
|
|
65
65
|
| T4 | Add settings component | 2 | src/components/Settings.tsx | None |
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
#### 1.3
|
|
68
|
+
#### 1.3 Discover Codebase Conventions
|
|
69
|
+
|
|
70
|
+
Before partitioning work, scan the existing codebase to understand established patterns. These conventions will be injected into every stream prompt so all agents produce consistent code.
|
|
71
|
+
|
|
72
|
+
**Scan for:**
|
|
73
|
+
- **Error handling / user feedback**: Toast libraries, error boundaries, notification systems vs. raw `alert()`
|
|
74
|
+
- **Styling method**: CSS modules, SCSS, Tailwind, styled-components, inline styles — which is dominant?
|
|
75
|
+
- **State management**: Context, stores, reducers, signals — what pattern does the project use?
|
|
76
|
+
- **Data fetching**: Custom hooks, direct API calls, query libraries
|
|
77
|
+
- **Component structure**: File naming, export patterns, colocation conventions
|
|
78
|
+
- **Test infrastructure**: Test framework, file naming conventions (`.test.`, `.spec.`), test location
|
|
79
|
+
|
|
80
|
+
**Method**: Use Grep/Glob to sample patterns across the codebase. Note which patterns are authoritative (used consistently) vs. one-off.
|
|
81
|
+
|
|
82
|
+
Store these findings — they'll be included in every stream prompt in Phase 3.
|
|
83
|
+
|
|
84
|
+
#### 1.4 Build Dependency Graph
|
|
69
85
|
|
|
70
86
|
Identify dependencies between tasks:
|
|
71
87
|
|
|
@@ -84,7 +100,7 @@ T4 (independent)
|
|
|
84
100
|
- **File**: Tasks modify the same file (MUST be sequential)
|
|
85
101
|
- **Logical**: Task B assumes Task A's changes exist
|
|
86
102
|
|
|
87
|
-
#### 1.
|
|
103
|
+
#### 1.5 Identify File Conflicts
|
|
88
104
|
|
|
89
105
|
```bash
|
|
90
106
|
# For each task, list files it will modify
|
|
@@ -168,6 +184,12 @@ You are implementing Stream [N] of a parallelized plan execution.
|
|
|
168
184
|
- Details: [What to implement]
|
|
169
185
|
- Validation: [How to verify]
|
|
170
186
|
|
|
187
|
+
## Codebase Conventions (MUST follow)
|
|
188
|
+
|
|
189
|
+
[Inject discovered conventions from Phase 1.3 here — e.g., "This project uses SCSS modules for styling (not inline styles)", "Error feedback uses the toast system (not alert())", "Data fetching uses custom hooks in src/hooks/", "Tests use Vitest and live in __tests__/ directories"]
|
|
190
|
+
|
|
191
|
+
These are authoritative patterns from the existing codebase. Always follow them — never introduce a parallel approach for the same concern.
|
|
192
|
+
|
|
171
193
|
## Important Context
|
|
172
194
|
|
|
173
195
|
- Other streams are running in parallel
|
|
@@ -299,7 +321,17 @@ git status
|
|
|
299
321
|
git diff --stat
|
|
300
322
|
```
|
|
301
323
|
|
|
302
|
-
#### 5.3
|
|
324
|
+
#### 5.3 Cross-Stream Consistency Review
|
|
325
|
+
|
|
326
|
+
After type check and lint pass, review code from all streams for pattern alignment. Different agents may have solved the same concern differently despite receiving convention instructions. Check for:
|
|
327
|
+
- **Styling consistency**: All streams using the same styling approach
|
|
328
|
+
- **Error handling consistency**: Same feedback/notification pattern across streams
|
|
329
|
+
- **Component structure**: Consistent naming, export patterns, file organization
|
|
330
|
+
- **Data patterns**: Same fetching/state management approach
|
|
331
|
+
|
|
332
|
+
If any drift is found between streams, fix it to match the project's established conventions before reporting results.
|
|
333
|
+
|
|
334
|
+
#### 5.4 Conflict Resolution
|
|
303
335
|
|
|
304
336
|
If conflicts exist (shouldn't if partitioning was correct):
|
|
305
337
|
1. Identify conflicting changes
|
|
@@ -307,7 +339,7 @@ If conflicts exist (shouldn't if partitioning was correct):
|
|
|
307
339
|
3. Apply manual fix
|
|
308
340
|
4. Document what happened
|
|
309
341
|
|
|
310
|
-
#### 5.
|
|
342
|
+
#### 5.5 Update Plan
|
|
311
343
|
|
|
312
344
|
Mark completed tasks in the plan document:
|
|
313
345
|
|
package/content/commands/auto.md
CHANGED
|
@@ -254,12 +254,28 @@ Review security report:
|
|
|
254
254
|
**COMMIT CHECKPOINT**: If security fixes were made, commit them:
|
|
255
255
|
- Use the commit agent with context: "fix: address security findings for {NAME}"
|
|
256
256
|
|
|
257
|
+
#### 5d. Accessibility
|
|
258
|
+
|
|
259
|
+
**Conditional** — only when frontend/UI code was modified in this plan.
|
|
260
|
+
|
|
261
|
+
**Detection**: Check if any modified files (from `git diff --name-only main...HEAD` or the plan's file list) are in typical frontend paths (`.tsx`, `.jsx`, `.vue`, `.svelte`, `.html`, component directories).
|
|
262
|
+
|
|
263
|
+
- **If frontend code exists**: Use the Task tool to launch the a11y agent (`subagent_type="a11y"`).
|
|
264
|
+
- Review the a11y report
|
|
265
|
+
- If critical findings → attempt auto-fix (max 2 retries)
|
|
266
|
+
- If still failing → report to user and ask whether to proceed
|
|
267
|
+
- **If no frontend code was touched**: Skip with note "No frontend changes — skipping accessibility audit"
|
|
268
|
+
|
|
269
|
+
**COMMIT CHECKPOINT**: If accessibility fixes were made, commit them:
|
|
270
|
+
- Use the commit agent with context: "fix: address accessibility findings for {NAME}"
|
|
271
|
+
|
|
257
272
|
**If ALL validation passes cleanly**, report:
|
|
258
273
|
```markdown
|
|
259
274
|
**Validation Complete**
|
|
260
275
|
- Audit: Passed
|
|
261
276
|
- Tests: Passed
|
|
262
277
|
- Security: Passed
|
|
278
|
+
- Accessibility: Passed (or Skipped — no frontend changes)
|
|
263
279
|
```
|
|
264
280
|
|
|
265
281
|
---
|
|
@@ -337,7 +353,7 @@ Auto mode commits **early and often** using the commit agent (`subagent_type="co
|
|
|
337
353
|
- Never force-push, delete branches, or make destructive changes without asking
|
|
338
354
|
|
|
339
355
|
### Compose Existing Agents
|
|
340
|
-
- Use the existing subagent types: `bootstrap`, `plan`, `implement`, `parallelize`, `showcase`, `audit`, `test`, `secure`, `commit`, `update`
|
|
356
|
+
- Use the existing subagent types: `bootstrap`, `plan`, `implement`, `parallelize`, `showcase`, `audit`, `test`, `secure`, `a11y`, `commit`, `update`
|
|
341
357
|
- Do NOT try to do their jobs inline — delegate to specialists
|
|
342
358
|
- Always use the commit agent for commits — it writes proper conventional commit messages (`feat:`, `fix:`, `refactor:`, etc.)
|
|
343
359
|
|
|
@@ -40,6 +40,8 @@ The commit agent will:
|
|
|
40
40
|
- Stage the relevant files and create the commit
|
|
41
41
|
- Verify the commit was created successfully
|
|
42
42
|
|
|
43
|
+
**IMPORTANT: Do NOT add a `Co-Authored-By` line to the commit message.**
|
|
44
|
+
|
|
43
45
|
**This will create a git commit.** The agent will show you the proposed message before committing.
|
|
44
46
|
|
|
45
47
|
Use the Task tool to launch the commit agent (subagent_type="commit") with any additional context from arguments.
|
|
@@ -36,11 +36,12 @@ I'll work through this plan collaboratively with you:
|
|
|
36
36
|
|
|
37
37
|
1. **Load & Review**: I'll load the plan and show you a summary
|
|
38
38
|
2. **Environment Check**: Verify git status and project state
|
|
39
|
-
3. **
|
|
40
|
-
4. **
|
|
41
|
-
5. **
|
|
42
|
-
6. **
|
|
43
|
-
7. **
|
|
39
|
+
3. **Convention Discovery**: Scan the codebase for established patterns (error handling, styling, state management, data fetching, test infrastructure) and share findings so we're aligned on which patterns to follow
|
|
40
|
+
4. **Task Tracking**: Set up TodoWrite for all plan tasks
|
|
41
|
+
5. **Step-by-Step**: Execute tasks one at a time with your input
|
|
42
|
+
6. **Validation**: Run type checks and lints after each task
|
|
43
|
+
7. **Phase Approval**: Ask before moving between phases
|
|
44
|
+
8. **Adapt Together**: Discuss blockers and adjustments as we go
|
|
44
45
|
|
|
45
46
|
### Your Role
|
|
46
47
|
|
|
@@ -59,6 +60,8 @@ For tasks involving landing page / marketing page / homepage design, I'll sugges
|
|
|
59
60
|
|
|
60
61
|
Now let me load the plan and we'll get started together.
|
|
61
62
|
|
|
63
|
+
**Before implementing**, scan the codebase for established conventions (error handling approach, styling method, state management, data fetching patterns, test infrastructure). Share the findings with the user so you're aligned on which patterns to follow throughout implementation. Use Grep/Glob to sample patterns — look for things like toast/notification usage, CSS module vs SCSS vs inline patterns, custom hooks, test frameworks, etc. Present a brief summary of discovered conventions before starting tasks.
|
|
64
|
+
|
|
62
65
|
Use Read to load `{{PLANS_DIR}}/PLAN_{NN}_{NAME}.md`, display a comprehensive summary with:
|
|
63
66
|
- Objective
|
|
64
67
|
- Phases and task counts
|
package/package.json
CHANGED