aiblueprint-cli 1.4.11 → 1.4.13
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/claude-code-config/scripts/.claude/commands/fix-on-my-computer.md +87 -0
- package/claude-code-config/scripts/command-validator/CLAUDE.md +112 -0
- package/claude-code-config/scripts/command-validator/src/__tests__/validator.test.ts +62 -111
- package/claude-code-config/scripts/command-validator/src/cli.ts +5 -3
- package/claude-code-config/scripts/command-validator/src/lib/security-rules.ts +3 -4
- package/claude-code-config/scripts/command-validator/src/lib/types.ts +1 -0
- package/claude-code-config/scripts/command-validator/src/lib/validator.ts +47 -317
- package/claude-code-config/scripts/statusline/CLAUDE.md +29 -7
- package/claude-code-config/scripts/statusline/README.md +89 -1
- package/claude-code-config/scripts/statusline/defaults.json +75 -0
- package/claude-code-config/scripts/statusline/src/index.ts +101 -24
- package/claude-code-config/scripts/statusline/src/lib/config-types.ts +100 -0
- package/claude-code-config/scripts/statusline/src/lib/config.ts +21 -0
- package/claude-code-config/scripts/statusline/src/lib/context.ts +32 -11
- package/claude-code-config/scripts/statusline/src/lib/formatters.ts +360 -22
- package/claude-code-config/scripts/statusline/src/lib/git.ts +100 -0
- package/claude-code-config/scripts/statusline/src/lib/render-pure.ts +177 -0
- package/claude-code-config/scripts/statusline/src/lib/types.ts +11 -0
- package/claude-code-config/scripts/statusline/statusline.config.json +93 -0
- package/claude-code-config/skills/claude-memory/SKILL.md +689 -0
- package/claude-code-config/skills/claude-memory/references/comprehensive-example.md +175 -0
- package/claude-code-config/skills/claude-memory/references/project-patterns.md +334 -0
- package/claude-code-config/skills/claude-memory/references/prompting-techniques.md +411 -0
- package/claude-code-config/skills/claude-memory/references/section-templates.md +347 -0
- package/claude-code-config/skills/create-slash-commands/SKILL.md +1110 -0
- package/claude-code-config/skills/create-slash-commands/references/arguments.md +273 -0
- package/claude-code-config/skills/create-slash-commands/references/patterns.md +947 -0
- package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +656 -0
- package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +389 -0
- package/claude-code-config/skills/create-subagents/SKILL.md +425 -0
- package/claude-code-config/skills/create-subagents/references/context-management.md +567 -0
- package/claude-code-config/skills/create-subagents/references/debugging-agents.md +714 -0
- package/claude-code-config/skills/create-subagents/references/error-handling-and-recovery.md +502 -0
- package/claude-code-config/skills/create-subagents/references/evaluation-and-testing.md +374 -0
- package/claude-code-config/skills/create-subagents/references/orchestration-patterns.md +591 -0
- package/claude-code-config/skills/create-subagents/references/subagents.md +599 -0
- package/claude-code-config/skills/create-subagents/references/writing-subagent-prompts.md +513 -0
- package/dist/cli.js +20 -3
- package/package.json +1 -1
- package/claude-code-config/commands/apex.md +0 -109
- package/claude-code-config/commands/tasks/run-task.md +0 -220
- package/claude-code-config/commands/utils/watch-ci.md +0 -47
- package/claude-code-config/scripts/command-validator/biome.json +0 -29
- package/claude-code-config/scripts/command-validator/bun.lockb +0 -0
- package/claude-code-config/scripts/command-validator/package.json +0 -27
- package/claude-code-config/scripts/command-validator/vitest.config.ts +0 -7
- package/claude-code-config/scripts/hook-post-file.ts +0 -162
- package/claude-code-config/scripts/statusline/biome.json +0 -34
- package/claude-code-config/scripts/statusline/bun.lockb +0 -0
- package/claude-code-config/scripts/statusline/fixtures/test-input.json +0 -25
- package/claude-code-config/scripts/statusline/package.json +0 -19
- package/claude-code-config/scripts/statusline/statusline.config.ts +0 -25
- package/claude-code-config/scripts/statusline/test.ts +0 -20
- package/claude-code-config/scripts/validate-command.js +0 -712
- package/claude-code-config/scripts/validate-command.readme.md +0 -283
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
<prompting_techniques>
|
|
2
|
+
Master guide for writing effective instructions in CLAUDE.md files. These techniques ensure Claude follows your guidance reliably.
|
|
3
|
+
|
|
4
|
+
<core_principle>
|
|
5
|
+
Show your CLAUDE.md to someone with minimal project context. If they're confused about what to do, Claude will be too.
|
|
6
|
+
</core_principle>
|
|
7
|
+
|
|
8
|
+
<emphasis_strategies>
|
|
9
|
+
Claude follows emphasized instructions more reliably. Use these techniques strategically for critical rules.
|
|
10
|
+
|
|
11
|
+
<keyword_emphasis>
|
|
12
|
+
**CRITICAL** - For non-negotiable rules that must never be broken:
|
|
13
|
+
```markdown
|
|
14
|
+
**CRITICAL**: Always run tests before pushing code
|
|
15
|
+
**CRITICAL**: Never commit .env files
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**NEVER** - For absolute prohibitions:
|
|
19
|
+
```markdown
|
|
20
|
+
NEVER: Include API keys in code
|
|
21
|
+
NEVER: Push directly to main branch
|
|
22
|
+
NEVER: Use React Hook Form (use TanStack Form instead)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**ALWAYS** - For mandatory behaviors:
|
|
26
|
+
```markdown
|
|
27
|
+
ALWAYS: Use TypeScript strict mode
|
|
28
|
+
ALWAYS: Run linter before committing
|
|
29
|
+
ALWAYS: Add tests for new features
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**IMPORTANT** - For significant but not critical rules:
|
|
33
|
+
```markdown
|
|
34
|
+
IMPORTANT: Keep components under 300 lines
|
|
35
|
+
IMPORTANT: Use Server Components where possible
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**YOU MUST** - For explicit requirements:
|
|
39
|
+
```markdown
|
|
40
|
+
YOU MUST: Follow the git workflow outlined below
|
|
41
|
+
YOU MUST: Read related files before editing
|
|
42
|
+
```
|
|
43
|
+
</keyword_emphasis>
|
|
44
|
+
|
|
45
|
+
<visual_markers>
|
|
46
|
+
Use symbols for visual emphasis (sparingly):
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
⚠️ WARNING: This affects production data
|
|
50
|
+
🔒 SECURITY: Never commit secrets to git
|
|
51
|
+
❌ FORBIDDEN: Do not use interactive test commands
|
|
52
|
+
✅ REQUIRED: All PRs must pass CI checks
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Reserve visual markers for the most critical items only.
|
|
56
|
+
</visual_markers>
|
|
57
|
+
|
|
58
|
+
<formatting_emphasis>
|
|
59
|
+
**Bold for critical terms:**
|
|
60
|
+
```markdown
|
|
61
|
+
Use **TanStack Form** for all forms (not React Hook Form)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Strikethrough for forbidden options:**
|
|
65
|
+
```markdown
|
|
66
|
+
Commands:
|
|
67
|
+
- `pnpm test:ci` - Run tests
|
|
68
|
+
- ~~`pnpm test`~~ - NEVER use (interactive mode)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Code blocks for exact commands:**
|
|
72
|
+
```markdown
|
|
73
|
+
Before pushing, run:
|
|
74
|
+
```bash
|
|
75
|
+
pnpm lint && pnpm test:ci && pnpm build
|
|
76
|
+
```
|
|
77
|
+
```
|
|
78
|
+
</formatting_emphasis>
|
|
79
|
+
|
|
80
|
+
<placement_strategy>
|
|
81
|
+
Order matters. Claude pays more attention to:
|
|
82
|
+
|
|
83
|
+
1. **First items** in each section
|
|
84
|
+
2. **Repeated items** across sections
|
|
85
|
+
3. **Emphasized items** with CRITICAL/NEVER/ALWAYS
|
|
86
|
+
|
|
87
|
+
Structure your CLAUDE.md with critical rules first:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
## Code Conventions
|
|
91
|
+
|
|
92
|
+
### Critical Rules (Follow These First)
|
|
93
|
+
- **NEVER** commit .env files
|
|
94
|
+
- **ALWAYS** run tests before pushing
|
|
95
|
+
- **CRITICAL**: Use TanStack Form for ALL forms
|
|
96
|
+
|
|
97
|
+
### General Guidelines
|
|
98
|
+
- Prefer Server Components
|
|
99
|
+
- Keep components under 300 lines
|
|
100
|
+
- Use TypeScript strict mode
|
|
101
|
+
```
|
|
102
|
+
</placement_strategy>
|
|
103
|
+
|
|
104
|
+
<repetition_technique>
|
|
105
|
+
For extremely important rules, repeat in multiple contexts:
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
## Forms
|
|
109
|
+
**CRITICAL**: Use TanStack Form for ALL forms
|
|
110
|
+
Import from `@/features/form/tanstack-form`
|
|
111
|
+
|
|
112
|
+
## Before Editing Files
|
|
113
|
+
- Read similar files for patterns
|
|
114
|
+
- **CRITICAL**: Use TanStack Form for forms (see Forms section)
|
|
115
|
+
|
|
116
|
+
## Code Review Checklist
|
|
117
|
+
- [ ] Tests passing
|
|
118
|
+
- [ ] Forms use TanStack Form (**CRITICAL**)
|
|
119
|
+
```
|
|
120
|
+
</repetition_technique>
|
|
121
|
+
</emphasis_strategies>
|
|
122
|
+
|
|
123
|
+
<clarity_techniques>
|
|
124
|
+
<be_specific>
|
|
125
|
+
Vague instructions cause inconsistent behavior. Be explicit:
|
|
126
|
+
|
|
127
|
+
```markdown
|
|
128
|
+
❌ VAGUE:
|
|
129
|
+
- Format code properly
|
|
130
|
+
- Write good tests
|
|
131
|
+
- Follow best practices
|
|
132
|
+
|
|
133
|
+
✅ SPECIFIC:
|
|
134
|
+
- Use 2-space indentation (Prettier configured)
|
|
135
|
+
- Write tests in `__tests__/` using Vitest
|
|
136
|
+
- Use TanStack Form for all forms
|
|
137
|
+
```
|
|
138
|
+
</be_specific>
|
|
139
|
+
|
|
140
|
+
<show_dont_tell>
|
|
141
|
+
When format matters, show examples rather than describing:
|
|
142
|
+
|
|
143
|
+
```markdown
|
|
144
|
+
❌ TELLING:
|
|
145
|
+
Use conventional commits with type, scope, and description.
|
|
146
|
+
|
|
147
|
+
✅ SHOWING:
|
|
148
|
+
## Commit Format
|
|
149
|
+
```
|
|
150
|
+
feat(auth): implement JWT authentication
|
|
151
|
+
|
|
152
|
+
Add login endpoint and token validation middleware
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Types: feat, fix, refactor, docs, test, chore
|
|
156
|
+
```
|
|
157
|
+
</show_dont_tell>
|
|
158
|
+
|
|
159
|
+
<define_edge_cases>
|
|
160
|
+
Anticipate questions and answer them:
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
❌ INCOMPLETE:
|
|
164
|
+
Run tests before pushing.
|
|
165
|
+
|
|
166
|
+
✅ COMPLETE:
|
|
167
|
+
## Testing
|
|
168
|
+
- Run `pnpm test:ci` before pushing
|
|
169
|
+
- If tests fail, fix before committing
|
|
170
|
+
- For new features, add tests in `__tests__/`
|
|
171
|
+
- Minimum 80% coverage for new code
|
|
172
|
+
```
|
|
173
|
+
</define_edge_cases>
|
|
174
|
+
|
|
175
|
+
<eliminate_ambiguity>
|
|
176
|
+
Replace ambiguous phrases with clear directives:
|
|
177
|
+
|
|
178
|
+
```markdown
|
|
179
|
+
❌ AMBIGUOUS PHRASES:
|
|
180
|
+
- "Try to..." → Implies optional
|
|
181
|
+
- "Should probably..." → Unclear obligation
|
|
182
|
+
- "Generally..." → When are exceptions allowed?
|
|
183
|
+
- "Consider..." → Do it or not?
|
|
184
|
+
|
|
185
|
+
✅ CLEAR PHRASES:
|
|
186
|
+
- "Always..." or "Never..." → Clear requirement
|
|
187
|
+
- "Must..." or "May optionally..." → Clear obligation
|
|
188
|
+
- "Always... except when [condition]" → Rule with exception
|
|
189
|
+
- "If [condition], then [action]" → Clear conditional
|
|
190
|
+
```
|
|
191
|
+
</eliminate_ambiguity>
|
|
192
|
+
|
|
193
|
+
<sequential_steps>
|
|
194
|
+
For multi-step processes, use numbered lists:
|
|
195
|
+
|
|
196
|
+
```markdown
|
|
197
|
+
## Before Pushing Code
|
|
198
|
+
|
|
199
|
+
1. Run linter: `pnpm lint`
|
|
200
|
+
2. Run type check: `pnpm ts`
|
|
201
|
+
3. Run tests: `pnpm test:ci`
|
|
202
|
+
4. Verify build: `pnpm build`
|
|
203
|
+
5. If all pass, commit and push
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Sequential steps create clear expectations and prevent skipping.
|
|
207
|
+
</sequential_steps>
|
|
208
|
+
</clarity_techniques>
|
|
209
|
+
|
|
210
|
+
<instruction_structure>
|
|
211
|
+
<must_nice_mustnot>
|
|
212
|
+
Clearly separate obligation levels:
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
## API Development
|
|
216
|
+
|
|
217
|
+
### Must Have
|
|
218
|
+
- Input validation with Zod
|
|
219
|
+
- Error handling for all endpoints
|
|
220
|
+
- TypeScript types for request/response
|
|
221
|
+
|
|
222
|
+
### Nice to Have
|
|
223
|
+
- Pagination for list endpoints
|
|
224
|
+
- Caching headers
|
|
225
|
+
- Rate limiting
|
|
226
|
+
|
|
227
|
+
### Must Not
|
|
228
|
+
- Expose internal errors to clients
|
|
229
|
+
- Log sensitive data
|
|
230
|
+
- Skip authentication checks
|
|
231
|
+
```
|
|
232
|
+
</must_nice_mustnot>
|
|
233
|
+
|
|
234
|
+
<decision_criteria>
|
|
235
|
+
When Claude must make choices, provide criteria:
|
|
236
|
+
|
|
237
|
+
```markdown
|
|
238
|
+
## Component Choice
|
|
239
|
+
|
|
240
|
+
**Use Server Component when:**
|
|
241
|
+
- Data fetching only
|
|
242
|
+
- No user interaction
|
|
243
|
+
- No browser APIs needed
|
|
244
|
+
|
|
245
|
+
**Use Client Component when:**
|
|
246
|
+
- User interaction required (forms, buttons)
|
|
247
|
+
- Browser APIs needed (localStorage, window)
|
|
248
|
+
- Real-time updates needed
|
|
249
|
+
```
|
|
250
|
+
</decision_criteria>
|
|
251
|
+
|
|
252
|
+
<success_criteria>
|
|
253
|
+
Define what success looks like:
|
|
254
|
+
|
|
255
|
+
```markdown
|
|
256
|
+
## Definition of Done
|
|
257
|
+
|
|
258
|
+
A feature is complete when:
|
|
259
|
+
- [ ] All tests pass
|
|
260
|
+
- [ ] Build succeeds
|
|
261
|
+
- [ ] Code reviewed and approved
|
|
262
|
+
- [ ] Documentation updated (if applicable)
|
|
263
|
+
- [ ] No TypeScript errors
|
|
264
|
+
```
|
|
265
|
+
</success_criteria>
|
|
266
|
+
</instruction_structure>
|
|
267
|
+
|
|
268
|
+
<context_provision>
|
|
269
|
+
<give_purpose>
|
|
270
|
+
Explain WHY, not just WHAT:
|
|
271
|
+
|
|
272
|
+
```markdown
|
|
273
|
+
❌ JUST WHAT:
|
|
274
|
+
Use TanStack Form for all forms.
|
|
275
|
+
|
|
276
|
+
✅ WHAT + WHY:
|
|
277
|
+
Use TanStack Form for all forms.
|
|
278
|
+
- Unified validation with Zod schemas
|
|
279
|
+
- Consistent error handling across app
|
|
280
|
+
- Server action integration built-in
|
|
281
|
+
```
|
|
282
|
+
</give_purpose>
|
|
283
|
+
|
|
284
|
+
<provide_examples>
|
|
285
|
+
Input/output examples teach patterns better than descriptions:
|
|
286
|
+
|
|
287
|
+
```markdown
|
|
288
|
+
## File Naming
|
|
289
|
+
|
|
290
|
+
### Server Actions
|
|
291
|
+
```
|
|
292
|
+
user.action.ts ✅ Correct
|
|
293
|
+
userActions.ts ❌ Wrong
|
|
294
|
+
actions/user.ts ❌ Wrong
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### API Routes
|
|
298
|
+
```
|
|
299
|
+
app/api/users/route.ts ✅ Correct
|
|
300
|
+
app/api/users.ts ❌ Wrong
|
|
301
|
+
```
|
|
302
|
+
```
|
|
303
|
+
</provide_examples>
|
|
304
|
+
|
|
305
|
+
<link_to_files>
|
|
306
|
+
Reference actual files for complex patterns:
|
|
307
|
+
|
|
308
|
+
```markdown
|
|
309
|
+
## Patterns
|
|
310
|
+
|
|
311
|
+
For implementation examples:
|
|
312
|
+
- **Forms**: See `src/features/form/tanstack-form.tsx`
|
|
313
|
+
- **Server Actions**: See `src/lib/actions/safe-actions.ts`
|
|
314
|
+
- **API Routes**: See `src/lib/zod-route.ts`
|
|
315
|
+
```
|
|
316
|
+
</link_to_files>
|
|
317
|
+
</context_provision>
|
|
318
|
+
|
|
319
|
+
<constraint_techniques>
|
|
320
|
+
<hard_constraints>
|
|
321
|
+
For absolute limits, use explicit language:
|
|
322
|
+
|
|
323
|
+
```markdown
|
|
324
|
+
## Hard Constraints
|
|
325
|
+
|
|
326
|
+
- Maximum component size: 300 lines
|
|
327
|
+
- Maximum function size: 50 lines
|
|
328
|
+
- Maximum file size: 500 lines
|
|
329
|
+
- **NEVER** exceed these limits
|
|
330
|
+
```
|
|
331
|
+
</hard_constraints>
|
|
332
|
+
|
|
333
|
+
<conditional_constraints>
|
|
334
|
+
For context-dependent rules:
|
|
335
|
+
|
|
336
|
+
```markdown
|
|
337
|
+
## Component Complexity
|
|
338
|
+
|
|
339
|
+
**Simple components (< 100 lines):**
|
|
340
|
+
- Keep in single file
|
|
341
|
+
- No need for separate test file if trivial
|
|
342
|
+
|
|
343
|
+
**Complex components (100-300 lines):**
|
|
344
|
+
- Extract hooks to separate files
|
|
345
|
+
- Require dedicated test file
|
|
346
|
+
|
|
347
|
+
**If approaching 300 lines:**
|
|
348
|
+
- Split into sub-components
|
|
349
|
+
- Extract logic to custom hooks
|
|
350
|
+
```
|
|
351
|
+
</conditional_constraints>
|
|
352
|
+
|
|
353
|
+
<escape_hatches>
|
|
354
|
+
Provide alternatives for edge cases:
|
|
355
|
+
|
|
356
|
+
```markdown
|
|
357
|
+
## Default Patterns
|
|
358
|
+
|
|
359
|
+
Use Server Components for data fetching.
|
|
360
|
+
|
|
361
|
+
**Exception**: Use Client Component with TanStack Query when:
|
|
362
|
+
- Real-time updates needed
|
|
363
|
+
- Optimistic updates required
|
|
364
|
+
- Complex client-side caching needed
|
|
365
|
+
```
|
|
366
|
+
</escape_hatches>
|
|
367
|
+
</constraint_techniques>
|
|
368
|
+
|
|
369
|
+
<testing_your_instructions>
|
|
370
|
+
<clarity_test>
|
|
371
|
+
Ask yourself:
|
|
372
|
+
1. Could a developer unfamiliar with this project follow these instructions?
|
|
373
|
+
2. Are there any ambiguous terms?
|
|
374
|
+
3. Is anything left to interpretation that shouldn't be?
|
|
375
|
+
4. Are the most critical rules emphasized?
|
|
376
|
+
</clarity_test>
|
|
377
|
+
|
|
378
|
+
<effectiveness_test>
|
|
379
|
+
After using for a few sessions:
|
|
380
|
+
1. Did Claude follow the instructions?
|
|
381
|
+
2. Which instructions were ignored?
|
|
382
|
+
3. What did Claude do wrong?
|
|
383
|
+
4. What additional context would help?
|
|
384
|
+
|
|
385
|
+
Iterate based on observed behavior, not assumptions.
|
|
386
|
+
</effectiveness_test>
|
|
387
|
+
|
|
388
|
+
<common_issues>
|
|
389
|
+
| Problem | Solution |
|
|
390
|
+
|---------|----------|
|
|
391
|
+
| Claude ignores instruction | Add emphasis (CRITICAL, NEVER), move to top |
|
|
392
|
+
| Claude does wrong thing | Be more specific, add examples |
|
|
393
|
+
| Claude asks for clarification | Anticipate question, add answer |
|
|
394
|
+
| Inconsistent behavior | Add edge case handling, remove ambiguity |
|
|
395
|
+
</common_issues>
|
|
396
|
+
</testing_your_instructions>
|
|
397
|
+
</prompting_techniques>
|
|
398
|
+
|
|
399
|
+
<writing_checklist>
|
|
400
|
+
Before finalizing your CLAUDE.md:
|
|
401
|
+
|
|
402
|
+
- [ ] Critical rules use CRITICAL/NEVER/ALWAYS emphasis
|
|
403
|
+
- [ ] Most important items appear first in each section
|
|
404
|
+
- [ ] Vague phrases replaced with specific instructions
|
|
405
|
+
- [ ] Edge cases addressed
|
|
406
|
+
- [ ] Examples provided for complex patterns
|
|
407
|
+
- [ ] File references for implementation details
|
|
408
|
+
- [ ] Ambiguous phrases eliminated
|
|
409
|
+
- [ ] Under 200 lines total
|
|
410
|
+
- [ ] Tested with real tasks
|
|
411
|
+
</writing_checklist>
|