ai-sprint-kit 1.3.1 → 2.0.1

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 (64) hide show
  1. package/LICENSE +35 -123
  2. package/README.md +39 -207
  3. package/bin/ai-sprint.js +105 -0
  4. package/lib/auth.js +73 -0
  5. package/lib/installer.js +59 -195
  6. package/lib/messages.js +53 -0
  7. package/package.json +15 -18
  8. package/bin/cli.js +0 -135
  9. package/lib/scanner.js +0 -321
  10. package/templates/.claude/.env.example +0 -13
  11. package/templates/.claude/agents/debugger.md +0 -668
  12. package/templates/.claude/agents/devops.md +0 -728
  13. package/templates/.claude/agents/docs.md +0 -662
  14. package/templates/.claude/agents/implementer.md +0 -288
  15. package/templates/.claude/agents/planner.md +0 -273
  16. package/templates/.claude/agents/researcher.md +0 -454
  17. package/templates/.claude/agents/reviewer.md +0 -644
  18. package/templates/.claude/agents/security.md +0 -203
  19. package/templates/.claude/agents/tester.md +0 -647
  20. package/templates/.claude/commands/ai-sprint-auto.md +0 -150
  21. package/templates/.claude/commands/ai-sprint-code.md +0 -316
  22. package/templates/.claude/commands/ai-sprint-debug.md +0 -453
  23. package/templates/.claude/commands/ai-sprint-deploy.md +0 -475
  24. package/templates/.claude/commands/ai-sprint-docs.md +0 -519
  25. package/templates/.claude/commands/ai-sprint-plan.md +0 -136
  26. package/templates/.claude/commands/ai-sprint-review.md +0 -433
  27. package/templates/.claude/commands/ai-sprint-scan.md +0 -146
  28. package/templates/.claude/commands/ai-sprint-secure.md +0 -88
  29. package/templates/.claude/commands/ai-sprint-test.md +0 -352
  30. package/templates/.claude/commands/ai-sprint-validate.md +0 -253
  31. package/templates/.claude/settings.json +0 -27
  32. package/templates/.claude/skills/codebase-context/SKILL.md +0 -68
  33. package/templates/.claude/skills/codebase-context/references/reading-context.md +0 -68
  34. package/templates/.claude/skills/codebase-context/references/refresh-triggers.md +0 -82
  35. package/templates/.claude/skills/implementation/SKILL.md +0 -70
  36. package/templates/.claude/skills/implementation/references/error-handling.md +0 -106
  37. package/templates/.claude/skills/implementation/references/security-patterns.md +0 -73
  38. package/templates/.claude/skills/implementation/references/validation-patterns.md +0 -107
  39. package/templates/.claude/skills/memory/SKILL.md +0 -67
  40. package/templates/.claude/skills/memory/references/decisions-format.md +0 -68
  41. package/templates/.claude/skills/memory/references/learning-format.md +0 -74
  42. package/templates/.claude/skills/planning/SKILL.md +0 -72
  43. package/templates/.claude/skills/planning/references/plan-templates.md +0 -81
  44. package/templates/.claude/skills/planning/references/research-phase.md +0 -62
  45. package/templates/.claude/skills/planning/references/solution-design.md +0 -66
  46. package/templates/.claude/skills/quality-assurance/SKILL.md +0 -79
  47. package/templates/.claude/skills/quality-assurance/references/review-checklist.md +0 -72
  48. package/templates/.claude/skills/quality-assurance/references/security-checklist.md +0 -70
  49. package/templates/.claude/skills/quality-assurance/references/testing-strategy.md +0 -85
  50. package/templates/.claude/skills/quality-assurance/scripts/check-size.py +0 -333
  51. package/templates/.claude/statusline.sh +0 -126
  52. package/templates/.claude/workflows/development-rules.md +0 -133
  53. package/templates/.claude/workflows/orchestration-protocol.md +0 -194
  54. package/templates/.mcp.json.example +0 -36
  55. package/templates/CLAUDE.md +0 -412
  56. package/templates/README.md +0 -331
  57. package/templates/ai_context/codebase/.gitkeep +0 -0
  58. package/templates/ai_context/memory/active.md +0 -15
  59. package/templates/ai_context/memory/decisions.md +0 -18
  60. package/templates/ai_context/memory/learning.md +0 -22
  61. package/templates/ai_context/plans/.gitkeep +0 -0
  62. package/templates/ai_context/reports/.gitkeep +0 -0
  63. package/templates/docs/user-guide-th.md +0 -454
  64. package/templates/docs/user-guide.md +0 -595
@@ -1,194 +0,0 @@
1
- # Orchestration Protocol
2
-
3
- How agents coordinate and work together.
4
-
5
- ## Agent Hierarchy
6
-
7
- ```
8
- Main Agent (Orchestrator)
9
- ├── planner → Creates implementation plans
10
- ├── implementer → Writes production code
11
- ├── tester → Generates and runs tests
12
- ├── reviewer → Reviews code quality
13
- ├── security → Scans for vulnerabilities
14
- ├── devops → Handles CI/CD and deployment
15
- ├── docs → Creates documentation
16
- ├── debugger → Investigates and fixes bugs
17
- └── researcher → Researches technologies
18
- ```
19
-
20
- ## Delegation Pattern
21
-
22
- ### 1. Task Analysis
23
- Main agent analyzes request to determine:
24
- - Complexity (simple/medium/complex)
25
- - Required agents
26
- - Execution order (sequential/parallel)
27
-
28
- ### 2. Agent Selection
29
- ```
30
- Plan feature → planner
31
- Write code → implementer
32
- Generate tests → tester
33
- Review quality → reviewer
34
- Security scan → security
35
- Deploy → devops
36
- Write docs → docs
37
- Debug issue → debugger
38
- Research topic → researcher
39
- ```
40
-
41
- ### 3. Context Passing
42
- Each agent receives:
43
- - Task description
44
- - Relevant files
45
- - Memory context (`ai_context/memory/learning.md`)
46
- - Quality requirements
47
-
48
- ### 4. Result Collection
49
- Main agent:
50
- - Collects agent outputs
51
- - Validates quality gates passed
52
- - Aggregates reports
53
- - Updates memory
54
-
55
- ## Workflow Patterns
56
-
57
- ### Sequential Workflow (Default)
58
- ```
59
- User Request
60
-
61
- Plan → Code → Test → Review → Secure
62
-
63
- Complete
64
- ```
65
-
66
- ### Parallel Workflow (Independent Tasks)
67
- ```
68
- User Request
69
-
70
- ┌───────────┬───────────┐
71
- │ Research │ Planning │
72
- └─────┬─────┴─────┬─────┘
73
- ↓ ↓
74
- Combine Results
75
- ```
76
-
77
- ### Iterative Workflow (Fix Loop)
78
- ```
79
- Test → Fail → Debug → Fix → Test → Pass
80
- ```
81
-
82
- ## Quality Gates
83
-
84
- Before proceeding to next stage:
85
-
86
- ### After Planning
87
- - [ ] Plan reviewed
88
- - [ ] Risks identified
89
- - [ ] Architecture approved
90
-
91
- ### After Implementation
92
- - [ ] Code follows standards
93
- - [ ] No obvious bugs
94
- - [ ] Error handling present
95
-
96
- ### After Testing
97
- - [ ] All tests pass
98
- - [ ] >80% coverage
99
- - [ ] Edge cases covered
100
-
101
- ### After Review
102
- - [ ] No critical issues
103
- - [ ] Security checks passed
104
- - [ ] Code quality approved
105
-
106
- ### After Security Scan
107
- - [ ] No critical vulnerabilities
108
- - [ ] No secrets exposed
109
- - [ ] Dependencies safe
110
-
111
- ## Error Handling
112
-
113
- ### Agent Failure
114
- 1. Log error to `ai_context/reports/`
115
- 2. Attempt self-correction (up to 3 times)
116
- 3. Escalate to main agent
117
- 4. Report to user if unresolved
118
-
119
- ### Quality Gate Failure
120
- 1. Identify failing checks
121
- 2. Route to appropriate agent (debugger/implementer)
122
- 3. Re-run quality checks
123
- 4. Proceed when passed
124
-
125
- ## Memory Sharing
126
-
127
- All agents share context via:
128
- ```
129
- ai_context/memory/
130
- ├── learning.md # Lessons learned (read before, update after)
131
- ├── decisions.md # Key decisions (append only)
132
- ├── active.md # Current session state
133
- └── summary.md # Session summaries
134
- ```
135
-
136
- ### Before Task
137
- ```
138
- 1. Read learning.md for past mistakes
139
- 2. Read decisions.md for relevant decisions
140
- 3. Check active.md for current context
141
- ```
142
-
143
- ### After Task
144
- ```
145
- 1. Update learning.md with new lessons
146
- 2. Append to decisions.md if made decisions
147
- 3. Update active.md with new state
148
- 4. Write report to reports/ folder
149
- ```
150
-
151
- ## Communication Protocol
152
-
153
- ### Main → Agent
154
- ```markdown
155
- ## Task: [description]
156
-
157
- ## Context
158
- - Files: [relevant files]
159
- - Memory: [past lessons]
160
- - Requirements: [quality gates]
161
-
162
- ## Expected Output
163
- - [specific deliverables]
164
- ```
165
-
166
- ### Agent → Main
167
- ```markdown
168
- ## Result: [success/failure]
169
-
170
- ## Deliverables
171
- - [files created/modified]
172
-
173
- ## Issues Encountered
174
- - [any problems]
175
-
176
- ## Recommendations
177
- - [suggestions for improvement]
178
- ```
179
-
180
- ## Escalation Path
181
-
182
- 1. Agent self-correction (3 attempts)
183
- 2. Alternative approach
184
- 3. Main agent intervention
185
- 4. User consultation
186
-
187
- ## Human-in-the-Loop
188
-
189
- Pause for user approval:
190
- - Before production deployment
191
- - Before infrastructure changes
192
- - Before database migrations
193
- - When critical security issues found
194
- - When blocking issues encountered
@@ -1,36 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "exa": {
4
- "command": "npx",
5
- "args": ["-y", "exa-mcp-server"],
6
- "env": {
7
- "EXA_API_KEY": "YOUR_EXA_API_KEY"
8
- }
9
- },
10
- "context7": {
11
- "command": "npx",
12
- "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_CONTEXT7_API_KEY"]
13
- },
14
- "human-mcp": {
15
- "command": "npx",
16
- "args": ["@goonnguyen/human-mcp"],
17
- "env": {
18
- "GOOGLE_GEMINI_API_KEY": "YOUR_GEMINI_API_KEY"
19
- }
20
- },
21
- "chrome-devtools": {
22
- "command": "npx",
23
- "args": ["-y", "chrome-devtools-mcp@latest"]
24
- },
25
- "sequential-thinking": {
26
- "command": "npx",
27
- "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
28
- },
29
- "time": {
30
- "type": "stdio",
31
- "command": "uvx",
32
- "args": ["mcp-server-time", "--local-timezone=UTC"],
33
- "env": {}
34
- }
35
- }
36
- }
@@ -1,412 +0,0 @@
1
- # CLAUDE.md
2
-
3
- Guidance for Claude Code when using AI Sprint Framework.
4
-
5
- ## Framework Overview
6
-
7
- **AI Sprint** - Security-first, production-grade autonomous development powered by 9 specialized agents and 10 core commands.
8
-
9
- ## Available Agents
10
-
11
- | Agent | Model | Purpose |
12
- |-------|-------|---------|
13
- | planner | opus | Architecture & implementation planning |
14
- | implementer | sonnet | Code generation & refactoring |
15
- | tester | sonnet | Test generation & coverage automation |
16
- | reviewer | sonnet | Code quality & best practices |
17
- | security | sonnet | SAST, secrets, dependencies |
18
- | devops | sonnet | CI/CD pipelines & deployment |
19
- | docs | sonnet | Technical documentation |
20
- | debugger | sonnet | Root cause analysis |
21
- | researcher | sonnet | Technology research & web search |
22
-
23
- ## Core Principles
24
-
25
- - **YAGNI** - You Aren't Gonna Need It (no over-engineering)
26
- - **KISS** - Keep It Simple, Stupid (clarity over cleverness)
27
- - **DRY** - Don't Repeat Yourself (avoid duplication)
28
- - **Security-First** - Every feature scanned and validated
29
-
30
- ## Development Workflows
31
-
32
- ### Full Automation (Recommended)
33
- ```bash
34
- /ai-sprint-auto "implement user registration with email verification"
35
- ```
36
- Executes: plan → code → test → review → security → docs
37
-
38
- ### Manual Workflow
39
- ```bash
40
- /ai-sprint-plan "feature description" # 1. Create architecture
41
- /ai-sprint-code "implement the plan" # 2. Generate code
42
- /ai-sprint-test # 3. Test + coverage
43
- /ai-sprint-review # 4. Code quality
44
- /ai-sprint-secure # 5. Security scan
45
- /ai-sprint-deploy # 6. CI/CD setup
46
- /ai-sprint-docs # 7. Documentation
47
- ```
48
-
49
- ### Quick Validation
50
- ```bash
51
- /ai-sprint-validate # Tests + review + security (before commit)
52
- ```
53
-
54
- ### Debugging Issues
55
- ```bash
56
- /ai-sprint-debug "describe the problem" # Root cause analysis
57
- ```
58
-
59
- ## Mandatory Security Requirements
60
-
61
- ### Code Standards
62
- - ✅ No hardcoded secrets (credentials, tokens, API keys)
63
- - ✅ Input validation on ALL user-facing inputs
64
- - ✅ Proper error handling (no silent failures)
65
- - ✅ OWASP Top 10 compliance
66
- - ✅ Secure defaults (fail-safe configuration)
67
-
68
- ### Testing Standards
69
- - ✅ 80%+ code coverage required
70
- - ✅ All tests must pass before commit
71
- - ✅ Unit tests for business logic
72
- - ✅ Integration tests for APIs
73
- - ✅ Edge case coverage
74
-
75
- ### Pre-Commit Gate
76
- Always run `/ai-sprint-validate` before pushing:
77
- ```bash
78
- /ai-sprint-validate
79
- # Runs: tests + code review + security scan
80
- # Blocks commit if: tests fail | coverage < 80% | security issues found
81
- ```
82
-
83
- ## Quality Assurance
84
-
85
- ### Code Review Checklist
86
- - ✅ Follows framework principles (YAGNI, KISS, DRY)
87
- - ✅ Has test coverage (>80%)
88
- - ✅ No security vulnerabilities
89
- - ✅ No hardcoded secrets
90
- - ✅ Error handling complete
91
- - ✅ Self-documenting code
92
-
93
- ### Security Scanning
94
- - **SAST** - Static analysis for code vulnerabilities
95
- - **Secret Detection** - Hardcoded credentials, API keys
96
- - **Dependency Check** - Vulnerable packages
97
- - **OWASP Top 10** - Common web vulnerabilities
98
-
99
- ### Human-in-the-Loop Gates
100
- Requires explicit approval for:
101
- - Production deployments
102
- - Infrastructure/environment changes
103
- - Critical/high severity vulnerability fixes
104
- - Database schema migrations
105
- - Permission/access changes
106
-
107
- ## File Organization
108
-
109
- ```
110
- project/
111
- ├── .claude/
112
- │ ├── agents/ # 9 specialized agents
113
- │ ├── commands/ # 10 slash commands
114
- │ ├── workflows/ # Development rules
115
- │ ├── skills/ # Python utilities
116
- │ ├── settings.json # Configuration
117
- │ └── .env.example # Environment template
118
- ├── ai_context/ # AI artifacts (not project code)
119
- │ ├── plans/ # Implementation plans
120
- │ ├── docs/ # AI-generated documentation
121
- │ ├── reports/ # Agent outputs (organized by type)
122
- │ │ ├── research/ # Research reports
123
- │ │ ├── review/ # Code review reports
124
- │ │ ├── security/ # Security scan results
125
- │ │ ├── test/ # Test coverage reports
126
- │ │ ├── debug/ # Debugging analysis
127
- │ │ ├── deploy/ # Deployment reports
128
- │ │ └── docs/ # Documentation audit reports
129
- │ └── memory/
130
- │ │ ├── learning.md # Lessons learned
131
- │ │ ├── decisions.md # Key decisions
132
- │ │ └── active.md # Current context
133
- ├── docs/ # User-facing documentation
134
- ├── src/ # Source code
135
- ├── tests/ # Test files
136
- ├── README.md # Framework overview
137
- └── CLAUDE.md # This file
138
- ```
139
-
140
- ## Context Engineering
141
-
142
- Store all AI context under `ai_context/` to:
143
- - **Avoid conflicts** with project-level `docs/` folder
144
- - **Centralize artifacts** for easy discovery
145
- - **Persist memory** across development sessions
146
- - **Track decisions** and lessons learned
147
-
148
- ### Memory System
149
- - **learning.md** - Retrospective lessons (mistakes to avoid)
150
- - **decisions.md** - Key architecture & design decisions
151
- - **active.md** - Current session focus & context
152
- - **reports/** - Timestamped outputs from agents
153
-
154
- ## Configuration
155
-
156
- ### `.claude/settings.json`
157
- Control agent behavior, security settings, approval gates:
158
- ```json
159
- {
160
- "security": {
161
- "enableSAST": true,
162
- "enableSecretDetection": true,
163
- "enableDependencyCheck": true,
164
- "owasp_check": true
165
- },
166
- "testing": {
167
- "minimumCoverage": 80,
168
- "require_all_pass": true
169
- },
170
- "approval_gates": {
171
- "production_deploy": true,
172
- "infrastructure_change": true,
173
- "critical_security_fix": true
174
- }
175
- }
176
- ```
177
-
178
- ### `.env` (Optional)
179
- ```bash
180
- # Security scanning (if using premium versions)
181
- SNYK_TOKEN=your_token
182
- SEMGREP_APP_TOKEN=your_token
183
-
184
- # API overrides (optional)
185
- ANTHROPIC_API_KEY=your_key
186
- ```
187
-
188
- ## MCP Tools (Optional)
189
-
190
- MCP (Model Context Protocol) servers provide enhanced capabilities for agents.
191
-
192
- ### Setup
193
-
194
- 1. Copy the example configuration:
195
- ```bash
196
- cp .mcp.json.example .mcp.json
197
- ```
198
-
199
- 2. Add your API keys:
200
- - **exa**: Get key from https://exa.ai (clean web search, less tokens)
201
- - **context7**: Get key from https://context7.com
202
- - **human-mcp**: Get Gemini key from https://makersuite.google.com/app/apikey
203
-
204
- 3. Install dependencies:
205
- ```bash
206
- # context7 (library docs)
207
- npx -y @upstash/context7-mcp --help
208
-
209
- # chrome-devtools (browser debugging)
210
- npx -y chrome-devtools-mcp@latest --help
211
-
212
- # sequential-thinking (complex reasoning)
213
- npx -y @modelcontextprotocol/server-sequential-thinking --help
214
-
215
- # time (timezone ops)
216
- uvx mcp-server-time --help
217
- ```
218
-
219
- ### Available MCP Tools
220
-
221
- | Server | Tools | Use Case |
222
- |--------|-------|----------|
223
- | **exa** | web_search_exa, get_code_context_exa, deep_search_exa | Web search (clean results, less tokens) |
224
- | **context7** | resolve-library-id, get-library-docs | Library documentation |
225
- | **chrome-devtools** | take_snapshot, list_console_messages, evaluate_script | Browser debugging |
226
- | **sequential-thinking** | sequentialthinking | Complex reasoning |
227
- | **time** | get_current_time, convert_time | Timezone operations |
228
- | **human-mcp** | eyes_analyze, gemini_gen_image, mouth_speak | Multimodal AI |
229
-
230
- ### Agent-MCP Mapping
231
-
232
- | Agent | Primary MCP Tools |
233
- |-------|-------------------|
234
- | researcher | exa, context7, time |
235
- | planner | exa, context7, sequential-thinking |
236
- | implementer | context7, sequential-thinking |
237
- | tester | chrome-devtools |
238
- | reviewer | sequential-thinking |
239
- | security | exa, sequential-thinking |
240
- | devops | time |
241
- | docs | context7 |
242
- | debugger | chrome-devtools, sequential-thinking |
243
-
244
- ### Security Note
245
-
246
- ⚠️ **Never commit `.mcp.json`** - it contains API keys. Only commit `.mcp.json.example` with placeholders.
247
-
248
- ## Codebase Context
249
-
250
- When working on an existing codebase, AI Sprint can scan and index the code for efficient agent understanding.
251
-
252
- ### Scanned Context Location
253
-
254
- ```
255
- ai_context/
256
- └── codebase/
257
- ├── overview.md # Human-readable compressed codebase
258
- ├── structure.md # Directory tree
259
- ├── repomix-output.xml # Token-efficient XML for AI consumption
260
- └── scan-metadata.json # Stats (files, tokens, timestamp)
261
- ```
262
-
263
- ### When to Read Codebase Context
264
-
265
- Before starting work on an existing project, read:
266
- 1. `ai_context/codebase/structure.md` - Understand project layout
267
- 2. `ai_context/codebase/overview.md` - Review compressed code overview
268
-
269
- ### Refreshing Context
270
-
271
- Run `/ai-sprint-scan` after major changes to update the codebase index.
272
-
273
- ## Commands Reference
274
-
275
- All commands have detailed docs in `.claude/commands/`:
276
-
277
- | Command | Purpose | Usage |
278
- |---------|---------|-------|
279
- | `/ai-sprint-plan` | Architecture | `/ai-sprint-plan "implement feature"` |
280
- | `/ai-sprint-code` | Generate | `/ai-sprint-code "write implementation"` |
281
- | `/ai-sprint-test` | Testing | `/ai-sprint-test` (generates & runs) |
282
- | `/ai-sprint-review` | Quality | `/ai-sprint-review` (analyzes code) |
283
- | `/ai-sprint-secure` | Security | `/ai-sprint-secure src/` (scans directory) |
284
- | `/ai-sprint-deploy` | CI/CD | `/ai-sprint-deploy` (sets up pipeline) |
285
- | `/ai-sprint-docs` | Docs | `/ai-sprint-docs` (generates documentation) |
286
- | `/ai-sprint-debug` | Debugging | `/ai-sprint-debug "issue description"` |
287
- | `/ai-sprint-scan` | Codebase | `/ai-sprint-scan` (update AI context) |
288
- | `/ai-sprint-validate` | Gate | `/ai-sprint-validate` (before commit) |
289
- | `/ai-sprint-auto` | Full Cycle | `/ai-sprint-auto "feature description"` |
290
-
291
- ## Workflows Reference
292
-
293
- - **development-rules.md** - Core coding principles & standards
294
- - **orchestration-protocol.md** - How agents coordinate
295
-
296
- ## Date Handling
297
-
298
- **CRITICAL**: Never guess dates. Always use bash:
299
- ```bash
300
- date "+%Y-%m-%d" # ISO format: 2025-12-24
301
- date "+%y%m%d-%H%M" # Filename format: 251224-2153
302
- ```
303
-
304
- Use this in reports and file naming consistently.
305
-
306
- ## Memory Integration
307
-
308
- ### Before Starting a Task
309
- Check learning from past sessions:
310
- ```bash
311
- cat ai_context/memory/learning.md
312
- cat ai_context/memory/decisions.md
313
- ```
314
-
315
- ### After Completing a Task
316
- Update collective knowledge:
317
- 1. Add new lessons to `ai_context/memory/learning.md`
318
- 2. Document key decisions in `ai_context/memory/decisions.md`
319
- 3. Save reports to `ai_context/reports/{timestamp}-{type}.md`
320
- 4. Update `ai_context/memory/active.md` with session summary
321
-
322
- ## Best Practices
323
-
324
- ### When Using Agents
325
- 1. Provide clear, specific descriptions
326
- 2. Include relevant context from `ai_context/`
327
- 3. Review agent outputs before accepting
328
- 4. Ask follow-up questions if needed
329
- 5. Document decisions in memory system
330
-
331
- ### Code Generation
332
- 1. Review generated code before merging
333
- 2. Run `/ai-sprint-test` to validate coverage
334
- 3. Run `/ai-sprint-secure` before commit
335
- 4. Address all security findings
336
- 5. Update docs with changes
337
-
338
- ### Testing & Review
339
- 1. Aim for >80% coverage
340
- 2. Include edge cases
341
- 3. Test error paths
342
- 4. Verify security assumptions
343
- 5. Check performance critical sections
344
-
345
- ### Documentation
346
- 1. Keep docs synchronized with code
347
- 2. Use AI docs agent for auto-generation
348
- 3. Include usage examples
349
- 4. Document security considerations
350
- 5. Maintain decision rationale
351
-
352
- ## Common Patterns
353
-
354
- ### Feature Implementation
355
- ```bash
356
- /ai-sprint-plan "describe feature"
357
- /ai-sprint-code "implement based on plan"
358
- /ai-sprint-test
359
- /ai-sprint-validate
360
- # If passes → merge
361
- # If fails → /ai-sprint-debug "issue" → fix → rerun
362
- ```
363
-
364
- ### Bug Fix
365
- ```bash
366
- /ai-sprint-debug "describe the bug and symptoms"
367
- # Review root cause analysis
368
- /ai-sprint-code "implement the fix"
369
- /ai-sprint-test
370
- /ai-sprint-validate
371
- ```
372
-
373
- ### Security Audit
374
- ```bash
375
- /ai-sprint-secure .
376
- # Review findings in ai_context/reports/security-*.md
377
- /ai-sprint-code "fix high/critical issues"
378
- /ai-sprint-test
379
- ```
380
-
381
- ### Performance Optimization
382
- ```bash
383
- /ai-sprint-plan "performance improvement"
384
- /ai-sprint-code "optimize based on plan"
385
- /ai-sprint-test "ensure no regressions"
386
- /ai-sprint-review "check for best practices"
387
- ```
388
-
389
- ## Customization
390
-
391
- ### Add Custom Agent
392
- Create `.claude/agents/custom-name.md`:
393
- ```markdown
394
- ---
395
- name: custom-name
396
- description: Agent purpose
397
- model: sonnet
398
- ---
399
-
400
- System prompt and instructions...
401
- ```
402
-
403
- ### Add Custom Command
404
- Create `.claude/commands/custom-name.md`:
405
- ```markdown
406
- ---
407
- description: Command description
408
- argument-hint: [optional-args]
409
- ---
410
-
411
- Workflow steps and orchestration...
412
- ```