aiblueprint-cli 1.4.12 → 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.
Files changed (54) hide show
  1. package/claude-code-config/scripts/.claude/commands/fix-on-my-computer.md +87 -0
  2. package/claude-code-config/scripts/command-validator/CLAUDE.md +112 -0
  3. package/claude-code-config/scripts/command-validator/src/__tests__/validator.test.ts +62 -111
  4. package/claude-code-config/scripts/command-validator/src/cli.ts +5 -3
  5. package/claude-code-config/scripts/command-validator/src/lib/security-rules.ts +3 -4
  6. package/claude-code-config/scripts/command-validator/src/lib/types.ts +1 -0
  7. package/claude-code-config/scripts/command-validator/src/lib/validator.ts +47 -317
  8. package/claude-code-config/scripts/statusline/CLAUDE.md +29 -7
  9. package/claude-code-config/scripts/statusline/README.md +89 -1
  10. package/claude-code-config/scripts/statusline/defaults.json +75 -0
  11. package/claude-code-config/scripts/statusline/src/index.ts +101 -24
  12. package/claude-code-config/scripts/statusline/src/lib/config-types.ts +100 -0
  13. package/claude-code-config/scripts/statusline/src/lib/config.ts +21 -0
  14. package/claude-code-config/scripts/statusline/src/lib/context.ts +32 -11
  15. package/claude-code-config/scripts/statusline/src/lib/formatters.ts +360 -22
  16. package/claude-code-config/scripts/statusline/src/lib/git.ts +100 -0
  17. package/claude-code-config/scripts/statusline/src/lib/render-pure.ts +177 -0
  18. package/claude-code-config/scripts/statusline/src/lib/types.ts +11 -0
  19. package/claude-code-config/scripts/statusline/statusline.config.json +93 -0
  20. package/claude-code-config/skills/claude-memory/SKILL.md +689 -0
  21. package/claude-code-config/skills/claude-memory/references/comprehensive-example.md +175 -0
  22. package/claude-code-config/skills/claude-memory/references/project-patterns.md +334 -0
  23. package/claude-code-config/skills/claude-memory/references/prompting-techniques.md +411 -0
  24. package/claude-code-config/skills/claude-memory/references/section-templates.md +347 -0
  25. package/claude-code-config/skills/create-slash-commands/SKILL.md +1110 -0
  26. package/claude-code-config/skills/create-slash-commands/references/arguments.md +273 -0
  27. package/claude-code-config/skills/create-slash-commands/references/patterns.md +947 -0
  28. package/claude-code-config/skills/create-slash-commands/references/prompt-examples.md +656 -0
  29. package/claude-code-config/skills/create-slash-commands/references/tool-restrictions.md +389 -0
  30. package/claude-code-config/skills/create-subagents/SKILL.md +425 -0
  31. package/claude-code-config/skills/create-subagents/references/context-management.md +567 -0
  32. package/claude-code-config/skills/create-subagents/references/debugging-agents.md +714 -0
  33. package/claude-code-config/skills/create-subagents/references/error-handling-and-recovery.md +502 -0
  34. package/claude-code-config/skills/create-subagents/references/evaluation-and-testing.md +374 -0
  35. package/claude-code-config/skills/create-subagents/references/orchestration-patterns.md +591 -0
  36. package/claude-code-config/skills/create-subagents/references/subagents.md +599 -0
  37. package/claude-code-config/skills/create-subagents/references/writing-subagent-prompts.md +513 -0
  38. package/package.json +1 -1
  39. package/claude-code-config/commands/apex.md +0 -109
  40. package/claude-code-config/commands/tasks/run-task.md +0 -220
  41. package/claude-code-config/commands/utils/watch-ci.md +0 -47
  42. package/claude-code-config/scripts/command-validator/biome.json +0 -29
  43. package/claude-code-config/scripts/command-validator/bun.lockb +0 -0
  44. package/claude-code-config/scripts/command-validator/package.json +0 -27
  45. package/claude-code-config/scripts/command-validator/vitest.config.ts +0 -7
  46. package/claude-code-config/scripts/hook-post-file.ts +0 -162
  47. package/claude-code-config/scripts/statusline/biome.json +0 -34
  48. package/claude-code-config/scripts/statusline/bun.lockb +0 -0
  49. package/claude-code-config/scripts/statusline/fixtures/test-input.json +0 -25
  50. package/claude-code-config/scripts/statusline/package.json +0 -19
  51. package/claude-code-config/scripts/statusline/statusline.config.ts +0 -25
  52. package/claude-code-config/scripts/statusline/test.ts +0 -20
  53. package/claude-code-config/scripts/validate-command.js +0 -712
  54. package/claude-code-config/scripts/validate-command.readme.md +0 -283
@@ -0,0 +1,513 @@
1
+ <key_insight>
2
+ Subagent prompts should be task-specific, not generic. They define a specialized role with clear focus areas, workflows, and constraints.
3
+
4
+ **Critical**: Subagent.md files use pure XML structure (no markdown headings). Like skills and slash commands, this improves parsing and token efficiency.
5
+ </key_insight>
6
+
7
+ <xml_structure_rule>
8
+ **Remove ALL markdown headings (##, ###) from subagent body.** Use semantic XML tags instead.
9
+
10
+ Keep markdown formatting WITHIN content (bold, italic, lists, code blocks, links).
11
+
12
+ See @skills/create-agent-skills/references/use-xml-tags.md for XML structure principles - they apply to subagents too.
13
+ </xml_structure_rule>
14
+
15
+ <core_principles>
16
+ <principle name="specificity">
17
+ Define exactly what the subagent does and how it approaches tasks.
18
+
19
+ ❌ Bad: "You are a helpful coding assistant"
20
+ ✅ Good: "You are a React performance optimizer. Analyze components for hooks best practices, unnecessary re-renders, and memoization opportunities."
21
+ </principle>
22
+
23
+ <principle name="clarity">
24
+ State the role, focus areas, and approach explicitly.
25
+
26
+ ❌ Bad: "Help with tests"
27
+ ✅ Good: "You are a test automation specialist. Write comprehensive test suites using the project's testing framework. Focus on edge cases and error conditions."
28
+ </principle>
29
+
30
+ <principle name="constraints">
31
+ Include what the subagent should NOT do. Use strong modal verbs (MUST, SHOULD, NEVER, ALWAYS) to reinforce behavioral guidelines.
32
+
33
+ Example:
34
+ ```markdown
35
+ <constraints>
36
+ - NEVER modify production code, ONLY test files
37
+ - MUST verify tests pass before completing
38
+ - ALWAYS include edge case coverage
39
+ - DO NOT run tests without explicit user request
40
+ </constraints>
41
+ ```
42
+
43
+ **Why strong modals matter**: Reinforces critical boundaries, reduces ambiguity, improves constraint adherence.
44
+ </principle>
45
+ </core_principles>
46
+
47
+ <structure_with_xml>
48
+ Use XML tags to structure subagent prompts for clarity:
49
+
50
+ <example type="security_reviewer">
51
+ ```markdown
52
+ ---
53
+ name: security-reviewer
54
+ description: Reviews code for security vulnerabilities. Use proactively after any code changes involving authentication, data access, or user input.
55
+ tools: Read, Grep, Glob, Bash
56
+ model: sonnet
57
+ ---
58
+
59
+ <role>
60
+ You are a senior security engineer specializing in web application security.
61
+ </role>
62
+
63
+ <focus_areas>
64
+ - SQL injection vulnerabilities
65
+ - XSS (Cross-Site Scripting) attack vectors
66
+ - Authentication and authorization flaws
67
+ - Sensitive data exposure
68
+ - CSRF (Cross-Site Request Forgery)
69
+ - Insecure deserialization
70
+ </focus_areas>
71
+
72
+ <workflow>
73
+ 1. Run git diff to identify recent changes
74
+ 2. Read modified files focusing on data flow
75
+ 3. Identify security risks with severity ratings
76
+ 4. Provide specific remediation steps
77
+ </workflow>
78
+
79
+ <severity_ratings>
80
+ - **Critical**: Immediate exploitation possible, high impact
81
+ - **High**: Exploitation likely, significant impact
82
+ - **Medium**: Exploitation requires conditions, moderate impact
83
+ - **Low**: Limited exploitability or impact
84
+ </severity_ratings>
85
+
86
+ <output_format>
87
+ For each issue found:
88
+ 1. **Severity**: [Critical/High/Medium/Low]
89
+ 2. **Location**: [File:LineNumber]
90
+ 3. **Vulnerability**: [Type and description]
91
+ 4. **Risk**: [What could happen]
92
+ 5. **Fix**: [Specific code changes needed]
93
+ </output_format>
94
+
95
+ <constraints>
96
+ - Focus only on security issues, not code style
97
+ - Provide actionable fixes, not vague warnings
98
+ - If no issues found, confirm the review was completed
99
+ </constraints>
100
+ ```
101
+ </example>
102
+
103
+ <example type="test_writer">
104
+ ```markdown
105
+ ---
106
+ name: test-writer
107
+ description: Creates comprehensive test suites. Use when new code needs tests or test coverage is insufficient.
108
+ tools: Read, Write, Grep, Glob, Bash
109
+ model: sonnet
110
+ ---
111
+
112
+ <role>
113
+ You are a test automation specialist creating thorough, maintainable test suites.
114
+ </role>
115
+
116
+ <testing_philosophy>
117
+ - Test behavior, not implementation
118
+ - One assertion per test when possible
119
+ - Tests should be readable documentation
120
+ - Cover happy path, edge cases, and error conditions
121
+ </testing_philosophy>
122
+
123
+ <workflow>
124
+ 1. Analyze the code to understand functionality
125
+ 2. Identify test cases:
126
+ - Happy path (expected usage)
127
+ - Edge cases (boundary conditions)
128
+ - Error conditions (invalid inputs, failures)
129
+ 3. Write tests using the project's testing framework
130
+ 4. Run tests to verify they pass
131
+ 5. Ensure tests are independent (no shared state)
132
+ </workflow>
133
+
134
+ <test_structure>
135
+ Follow AAA pattern:
136
+ - **Arrange**: Set up test data and conditions
137
+ - **Act**: Execute the functionality being tested
138
+ - **Assert**: Verify the expected outcome
139
+ </test_structure>
140
+
141
+ <quality_criteria>
142
+ - Descriptive test names that explain what's being tested
143
+ - Clear failure messages
144
+ - No test interdependencies
145
+ - Fast execution (mock external dependencies)
146
+ - Clean up after tests (no side effects)
147
+ </quality_criteria>
148
+
149
+ <constraints>
150
+ - Do not modify production code
151
+ - Do not run tests without confirming setup is complete
152
+ - Do not create tests that depend on external services without mocking
153
+ </constraints>
154
+ ```
155
+ </example>
156
+
157
+ <example type="debugger">
158
+ ```markdown
159
+ ---
160
+ name: debugger
161
+ description: Investigates and fixes bugs. Use when errors occur or behavior is unexpected.
162
+ tools: Read, Edit, Bash, Grep, Glob
163
+ model: sonnet
164
+ ---
165
+
166
+ <role>
167
+ You are a debugging specialist skilled at root cause analysis and systematic problem-solving.
168
+ </role>
169
+
170
+ <debugging_methodology>
171
+ 1. **Reproduce**: Understand and reproduce the issue
172
+ 2. **Isolate**: Identify the failing component or function
173
+ 3. **Analyze**: Examine code, logs, error messages, and stack traces
174
+ 4. **Hypothesize**: Form theories about the root cause
175
+ 5. **Test**: Verify hypotheses systematically
176
+ 6. **Fix**: Implement the solution
177
+ 7. **Verify**: Confirm the fix resolves the issue without side effects
178
+ </debugging_methodology>
179
+
180
+ <debugging_techniques>
181
+ - Add logging to trace execution flow
182
+ - Use binary search to isolate the problem (comment out code sections)
183
+ - Check assumptions about inputs, state, and environment
184
+ - Review recent changes that might have introduced the bug
185
+ - Look for similar patterns in the codebase that work correctly
186
+ - Test edge cases and boundary conditions
187
+ </debugging_techniques>
188
+
189
+ <common_bug_patterns>
190
+ - Off-by-one errors in loops
191
+ - Null/undefined reference errors
192
+ - Race conditions in async code
193
+ - Incorrect variable scope
194
+ - Type coercion issues
195
+ - Missing error handling
196
+ </common_bug_patterns>
197
+
198
+ <output_format>
199
+ 1. **Root cause**: Clear explanation of what's wrong
200
+ 2. **Why it happens**: The underlying reason
201
+ 3. **Fix**: Specific code changes
202
+ 4. **Verification**: How to confirm it's fixed
203
+ 5. **Prevention**: How to avoid similar bugs
204
+ </output_format>
205
+
206
+ <constraints>
207
+ - Make minimal changes to fix the issue
208
+ - Preserve existing functionality
209
+ - Add tests to prevent regression
210
+ - Document non-obvious fixes
211
+ </constraints>
212
+ ```
213
+ </example>
214
+ </structure_with_xml>
215
+
216
+ <anti_patterns>
217
+ <anti_pattern name="too_generic">
218
+ ❌ Bad:
219
+ ```markdown
220
+ You are a helpful assistant that helps with code.
221
+ ```
222
+
223
+ This provides no specialization. The subagent won't know what to focus on or how to approach tasks.
224
+ </anti_pattern>
225
+
226
+ <anti_pattern name="no_workflow">
227
+ ❌ Bad:
228
+ ```markdown
229
+ You are a code reviewer. Review code for issues.
230
+ ```
231
+
232
+ Without a workflow, the subagent may skip important steps or review inconsistently.
233
+
234
+ ✅ Good:
235
+ ```markdown
236
+ <workflow>
237
+ 1. Run git diff to see changes
238
+ 2. Read modified files
239
+ 3. Check for: security issues, performance problems, code quality
240
+ 4. Provide specific feedback with examples
241
+ </workflow>
242
+ ```
243
+ </anti_pattern>
244
+
245
+ <anti_pattern name="unclear_trigger">
246
+ The `description` field is critical for automatic invocation. LLM agents use descriptions to make routing decisions.
247
+
248
+ **Description must be specific enough to differentiate from peer agents.**
249
+
250
+ ❌ Bad (too vague):
251
+ ```yaml
252
+ description: Helps with testing
253
+ ```
254
+
255
+ ❌ Bad (not differentiated):
256
+ ```yaml
257
+ description: Billing agent
258
+ ```
259
+
260
+ ✅ Good (specific triggers + differentiation):
261
+ ```yaml
262
+ description: Creates comprehensive test suites. Use when new code needs tests or test coverage is insufficient. Proactively use after implementing new features.
263
+ ```
264
+
265
+ ✅ Good (clear scope):
266
+ ```yaml
267
+ description: Handles current billing statements and payment processing. Use when user asks about invoices, payments, or billing history (not for subscription changes).
268
+ ```
269
+
270
+ **Optimization tips**:
271
+ - Include **trigger keywords** that match common user requests
272
+ - Specify **when to use** (not just what it does)
273
+ - **Differentiate** from similar agents (what this one does vs others)
274
+ - Include **proactive triggers** if agent should be invoked automatically
275
+ </anti_pattern>
276
+
277
+ <anti_pattern name="missing_constraints">
278
+ ❌ Bad: No constraints specified
279
+
280
+ Without constraints, subagents might:
281
+ - Modify code they shouldn't touch
282
+ - Run dangerous commands
283
+ - Skip important steps
284
+
285
+ ✅ Good:
286
+ ```markdown
287
+ <constraints>
288
+ - Only modify test files, never production code
289
+ - Always run tests after writing them
290
+ - Do not commit changes automatically
291
+ </constraints>
292
+ ```
293
+ </anti_pattern>
294
+
295
+ <anti_pattern name="requires_user_interaction">
296
+ ❌ **Critical**: Subagents cannot interact with users.
297
+
298
+ **Bad example:**
299
+ ```markdown
300
+ ---
301
+ name: intake-agent
302
+ description: Gathers requirements from user
303
+ tools: AskUserQuestion
304
+ ---
305
+
306
+ <workflow>
307
+ 1. Ask user about their requirements using AskUserQuestion
308
+ 2. Follow up with clarifying questions
309
+ 3. Return finalized requirements
310
+ </workflow>
311
+ ```
312
+
313
+ **Why this fails:**
314
+ Subagents execute in isolated contexts ("black boxes"). They cannot use AskUserQuestion or any tool requiring user interaction. The user never sees intermediate steps.
315
+
316
+ **Correct approach:**
317
+ ```markdown
318
+ # Main chat handles user interaction
319
+ 1. Main chat: Use AskUserQuestion to gather requirements
320
+ 2. Launch subagent: Research based on requirements (no user interaction)
321
+ 3. Main chat: Present research to user, get confirmation
322
+ 4. Launch subagent: Generate code based on confirmed plan
323
+ 5. Main chat: Present results to user
324
+ ```
325
+
326
+ **Tools that require user interaction (cannot use in subagents):**
327
+ - AskUserQuestion
328
+ - Any workflow expecting user to respond mid-execution
329
+ - Presenting options and waiting for selection
330
+
331
+ **Design principle:**
332
+ If your subagent prompt includes "ask user", "present options", or "wait for confirmation", it's designed incorrectly. Move user interaction to main chat.
333
+ </anti_pattern>
334
+ </anti_patterns>
335
+
336
+ <best_practices>
337
+ <practice name="start_with_role">
338
+ Begin with a clear role statement:
339
+
340
+ ```markdown
341
+ <role>
342
+ You are a [specific expertise] specializing in [specific domain].
343
+ </role>
344
+ ```
345
+ </practice>
346
+
347
+ <practice name="define_focus">
348
+ List specific focus areas to guide attention:
349
+
350
+ ```markdown
351
+ <focus_areas>
352
+ - Specific concern 1
353
+ - Specific concern 2
354
+ - Specific concern 3
355
+ </focus_areas>
356
+ ```
357
+ </practice>
358
+
359
+ <practice name="provide_workflow">
360
+ Give step-by-step workflow for consistency:
361
+
362
+ ```markdown
363
+ <workflow>
364
+ 1. First step
365
+ 2. Second step
366
+ 3. Third step
367
+ </workflow>
368
+ ```
369
+ </practice>
370
+
371
+ <practice name="specify_output">
372
+ Define expected output format:
373
+
374
+ ```markdown
375
+ <output_format>
376
+ Structure:
377
+ 1. Component 1
378
+ 2. Component 2
379
+ 3. Component 3
380
+ </output_format>
381
+ ```
382
+ </practice>
383
+
384
+ <practice name="set_boundaries">
385
+ Clearly state constraints with strong modal verbs:
386
+
387
+ ```markdown
388
+ <constraints>
389
+ - NEVER modify X
390
+ - ALWAYS verify Y before Z
391
+ - MUST include edge case testing
392
+ - DO NOT proceed without validation
393
+ </constraints>
394
+ ```
395
+
396
+ **Security constraints** (when relevant):
397
+ - Environment awareness (production vs development)
398
+ - Safe operation boundaries (what commands are allowed)
399
+ - Data handling rules (sensitive information)
400
+ </practice>
401
+
402
+ <practice name="use_examples">
403
+ Include examples for complex behaviors:
404
+
405
+ ```markdown
406
+ <example>
407
+ Input: [scenario]
408
+ Expected action: [what the subagent should do]
409
+ Output: [what the subagent should produce]
410
+ </example>
411
+ ```
412
+ </practice>
413
+
414
+ <practice name="extended_thinking">
415
+ For complex reasoning tasks, leverage extended thinking:
416
+
417
+ ```markdown
418
+ <thinking_approach>
419
+ Use extended thinking for:
420
+ - Root cause analysis of complex bugs
421
+ - Security vulnerability assessment
422
+ - Architectural design decisions
423
+ - Multi-step logical reasoning
424
+
425
+ Provide high-level guidance rather than prescriptive steps:
426
+ "Analyze the authentication flow for security vulnerabilities, considering common attack vectors and edge cases."
427
+
428
+ Rather than:
429
+ "Step 1: Check for SQL injection. Step 2: Check for XSS. Step 3: ..."
430
+ </thinking_approach>
431
+ ```
432
+
433
+ **When to use extended thinking**:
434
+ - Debugging complex issues
435
+ - Security analysis
436
+ - Code architecture review
437
+ - Performance optimization requiring deep analysis
438
+
439
+ **Minimum thinking budget**: 1024 tokens (increase for more complex tasks)
440
+ </practice>
441
+
442
+ <practice name="success_criteria">
443
+ Define what successful completion looks like:
444
+
445
+ ```markdown
446
+ <success_criteria>
447
+ Task is complete when:
448
+ - All modified files have been reviewed
449
+ - Each issue has severity rating and specific fix
450
+ - Output format is valid JSON
451
+ - No vulnerabilities were missed (cross-check against OWASP Top 10)
452
+ </success_criteria>
453
+ ```
454
+
455
+ **Benefit**: Clear completion criteria reduce ambiguity and partial outputs.
456
+ </practice>
457
+ </best_practices>
458
+
459
+ <testing_subagents>
460
+ <test_checklist>
461
+ 1. **Invoke the subagent** with a representative task
462
+ 2. **Check if it follows the workflow** specified in the prompt
463
+ 3. **Verify output format** matches what you defined
464
+ 4. **Test edge cases** - does it handle unusual inputs well?
465
+ 5. **Check constraints** - does it respect boundaries?
466
+ 6. **Iterate** - refine the prompt based on observed behavior
467
+ </test_checklist>
468
+
469
+ <common_issues>
470
+ - **Subagent too broad**: Narrow the focus areas
471
+ - **Skipping steps**: Make workflow more explicit
472
+ - **Inconsistent output**: Define output format more clearly
473
+ - **Overstepping bounds**: Add or clarify constraints
474
+ - **Not automatically invoked**: Improve description field with trigger keywords
475
+ </common_issues>
476
+ </testing_subagents>
477
+
478
+ <quick_reference>
479
+ ```markdown
480
+ ---
481
+ name: subagent-name
482
+ description: What it does and when to use it. Include trigger keywords.
483
+ tools: Tool1, Tool2, Tool3
484
+ model: sonnet
485
+ ---
486
+
487
+ <role>
488
+ You are a [specific role] specializing in [domain].
489
+ </role>
490
+
491
+ <focus_areas>
492
+ - Focus 1
493
+ - Focus 2
494
+ - Focus 3
495
+ </focus_areas>
496
+
497
+ <workflow>
498
+ 1. Step 1
499
+ 2. Step 2
500
+ 3. Step 3
501
+ </workflow>
502
+
503
+ <output_format>
504
+ Expected output structure
505
+ </output_format>
506
+
507
+ <constraints>
508
+ - Do not X
509
+ - Always Y
510
+ - Never Z
511
+ </constraints>
512
+ ```
513
+ </quick_reference>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiblueprint-cli",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
4
4
  "description": "AIBlueprint CLI for setting up Claude Code configurations",
5
5
  "author": "AIBlueprint",
6
6
  "license": "MIT",
@@ -1,109 +0,0 @@
1
- ---
2
- description: Systematic implementation using APEX methodology (Analyze-Plan-Execute-eXamine)
3
- ---
4
-
5
- <objective>
6
- Implement #$ARGUMENTS using the systematic APEX workflow to ensure thorough analysis, detailed planning, clean execution, and proper verification.
7
-
8
- This methodology helps developers deliver high-quality features by breaking complex tasks into four distinct phases: Analyze (gather context), Plan (create strategy), Execute (implement), and eXamine (verify).
9
- </objective>
10
-
11
- <context>
12
- Current git status: !`git status 2>/dev/null || echo "Not a git repository"`
13
- Current branch: !`git branch --show-current 2>/dev/null || echo "Not a git branch"`
14
- </context>
15
-
16
- <process>
17
-
18
- ## Phase 1: ANALYZE
19
-
20
- **Goal**: Find all relevant files and context for implementation
21
-
22
- 1. **Think deeply** before launching agents - know exactly what to search for
23
- 2. Launch **parallel subagents** to gather context:
24
- - `explore-codebase` agent to search codebase for relevant patterns
25
- - `websearch` agent to gather online information if needed
26
- - `explore-docs` agent to search documentation for API usage
27
- 3. Find files to use as **examples** or **edit targets**
28
- 4. Identify relevant file paths and useful context
29
-
30
- **Output clear heading**: `# 1. ANALYZE`
31
-
32
- ## Phase 2: PLAN
33
-
34
- **Goal**: Create detailed implementation strategy
35
-
36
- 1. Write comprehensive implementation plan including:
37
- - Core functionality changes
38
- - Test coverage requirements
39
- - Lookbook components if needed
40
- - Documentation updates
41
- 2. **STOP and ASK** user if anything remains unclear using `AskUserQuestion` tool
42
- 3. Get user approval before proceeding to execution
43
-
44
- **Output clear heading**: `# 2. PLAN`
45
-
46
- ## Phase 3: EXECUTE
47
-
48
- **Goal**: Implement following existing patterns
49
-
50
- 1. Follow existing codebase style:
51
- - Prefer clear variable/method names over comments
52
- - Match existing patterns and conventions
53
- 2. **CRITICAL RULES**:
54
- - Stay **STRICTLY IN SCOPE** - change only what's needed
55
- - NO comments unless absolutely necessary
56
- - Run autoformatting scripts when done
57
- - Fix reasonable linter warnings
58
- 3. Use parallel execution where possible for speed
59
-
60
- **Output clear heading**: `# 3. EXECUTE`
61
-
62
- ## Phase 4: EXAMINE
63
-
64
- **Goal**: Verify changes work correctly
65
-
66
- 1. **Check package.json** for available scripts (lint, typecheck, test, format, build)
67
- 2. Run relevant validation commands:
68
- - `npm run lint` - Fix any linting issues
69
- - `npm run typecheck` - Ensure type safety
70
- - `npm run format` - Format code consistently
71
- 3. Run **ONLY tests related to your feature** (stay in scope)
72
- 4. For major UX changes:
73
- - Create test checklist for affected features only
74
- - Use browser agent to verify specific functionality if needed
75
- 5. **If tests fail**: Return to PLAN phase and rethink approach
76
-
77
- **Output clear heading**: `# 4. EXAMINE`
78
-
79
- </process>
80
-
81
- <verification>
82
- Before completing each phase:
83
- - **Analyze**: Confirmed all relevant files and patterns found
84
- - **Plan**: User has approved the implementation strategy
85
- - **Execute**: Code follows existing patterns, stays in scope, no unnecessary comments
86
- - **Examine**: All validation scripts pass, tests related to changes pass
87
- </verification>
88
-
89
- <success_criteria>
90
-
91
- - All four phases completed in order with clear headings
92
- - Deep thinking applied at each phase transition
93
- - Implementation stays strictly within task boundaries
94
- - Code passes linting, type checking, and relevant tests
95
- - Follows repository standards for code style and patterns
96
- - No scope creep - only changed what was needed
97
- - Correctness prioritized over speed
98
- </success_criteria>
99
-
100
- <execution_rules>
101
- **Critical principles**:
102
-
103
- - **Always ULTRA THINK** before acting
104
- - Use parallel execution for speed where possible
105
- - Think deeply at each phase transition
106
- - Never exceed task boundaries
107
- - Test ONLY what you changed
108
- - Priority: Correctness > Completeness > Speed
109
- </execution_rules>