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,352 +0,0 @@
1
- ---
2
- description: Generate and run automated tests with coverage analysis
3
- argument-hint: [optional: specific file or feature to test]
4
- ---
5
-
6
- ## Command: /ai-sprint-test
7
-
8
- Generate comprehensive test suites and run them with coverage analysis. Ensures >80% code coverage with focus on critical paths.
9
-
10
- ## Usage
11
-
12
- ```
13
- /ai-sprint-test
14
- /ai-sprint-test src/auth/
15
- /ai-sprint-test "payment processing"
16
- ```
17
-
18
- ## Workflow
19
-
20
- ### 1. Analyze Codebase
21
- - Identify untested code
22
- - Find critical paths (auth, payments, data mutations)
23
- - Check existing test patterns
24
-
25
- ### 2. Generate Tests
26
- - **Unit tests** (70% of suite)
27
- - **Integration tests** (20%)
28
- - **E2E tests** (10%)
29
-
30
- ### 3. Run Test Suite
31
- - Execute all tests
32
- - Generate coverage report
33
- - Identify gaps
34
-
35
- ### 4. Security Tests
36
- - SQL injection prevention
37
- - XSS prevention
38
- - Auth bypass attempts
39
- - CSRF protection
40
- - Rate limiting
41
-
42
- ## Test Generation
43
-
44
- ### Unit Tests
45
- ```typescript
46
- // Generated for: calculateDiscount function
47
- describe('calculateDiscount', () => {
48
- it('calculates 10% discount correctly', () => {
49
- expect(calculateDiscount(100, 10)).toBe(90);
50
- });
51
-
52
- it('handles zero discount', () => {
53
- expect(calculateDiscount(100, 0)).toBe(100);
54
- });
55
-
56
- it('throws on invalid percentage', () => {
57
- expect(() => calculateDiscount(100, 150)).toThrow();
58
- });
59
-
60
- it('handles decimal prices', () => {
61
- expect(calculateDiscount(99.99, 20)).toBeCloseTo(79.99, 2);
62
- });
63
- });
64
- ```
65
-
66
- ### Integration Tests
67
- ```typescript
68
- // Generated for: POST /api/users endpoint
69
- describe('POST /api/users', () => {
70
- it('creates user with valid data', async () => {
71
- const response = await request(app)
72
- .post('/api/users')
73
- .send({
74
- email: 'test@example.com',
75
- password: 'SecurePass123!'
76
- });
77
-
78
- expect(response.status).toBe(201);
79
- expect(response.body).toHaveProperty('id');
80
- expect(response.body.email).toBe('test@example.com');
81
- });
82
-
83
- it('rejects invalid email', async () => {
84
- const response = await request(app)
85
- .post('/api/users')
86
- .send({
87
- email: 'invalid-email',
88
- password: 'SecurePass123!'
89
- });
90
-
91
- expect(response.status).toBe(400);
92
- expect(response.body.error).toContain('email');
93
- });
94
-
95
- it('requires strong password', async () => {
96
- const response = await request(app)
97
- .post('/api/users')
98
- .send({
99
- email: 'test@example.com',
100
- password: '123'
101
- });
102
-
103
- expect(response.status).toBe(400);
104
- });
105
- });
106
- ```
107
-
108
- ### Security Tests
109
- ```typescript
110
- describe('Security: SQL Injection', () => {
111
- it('prevents SQL injection in search', async () => {
112
- const malicious = "'; DROP TABLE users; --";
113
-
114
- const response = await request(app)
115
- .get(`/api/search?q=${encodeURIComponent(malicious)}`);
116
-
117
- expect(response.status).toBe(200);
118
-
119
- // Verify database still intact
120
- const users = await db.users.count();
121
- expect(users).toBeGreaterThan(0);
122
- });
123
- });
124
-
125
- describe('Security: XSS Prevention', () => {
126
- it('sanitizes HTML input', async () => {
127
- const xss = '<script>alert("xss")</script>';
128
-
129
- const response = await request(app)
130
- .post('/api/comments')
131
- .send({ text: xss });
132
-
133
- const comment = await db.comments.findUnique({
134
- where: { id: response.body.id }
135
- });
136
-
137
- expect(comment.text).not.toContain('<script>');
138
- });
139
- });
140
-
141
- describe('Security: Authentication', () => {
142
- it('rejects unauthenticated requests', async () => {
143
- const response = await request(app)
144
- .get('/api/private-data');
145
-
146
- expect(response.status).toBe(401);
147
- });
148
-
149
- it('rejects expired tokens', async () => {
150
- const expiredToken = generateExpiredToken();
151
-
152
- const response = await request(app)
153
- .get('/api/private-data')
154
- .set('Authorization', `Bearer ${expiredToken}`);
155
-
156
- expect(response.status).toBe(401);
157
- });
158
- });
159
- ```
160
-
161
- ### E2E Tests
162
- ```typescript
163
- // Generated with Playwright
164
- test('complete checkout flow', async ({ page }) => {
165
- // Login
166
- await page.goto('/login');
167
- await page.fill('[name="email"]', 'test@example.com');
168
- await page.fill('[name="password"]', 'password');
169
- await page.click('button[type="submit"]');
170
-
171
- // Add to cart
172
- await page.goto('/products');
173
- await page.click('[data-testid="add-to-cart-1"]');
174
-
175
- // Checkout
176
- await page.goto('/checkout');
177
- await page.fill('[name="cardNumber"]', '4242424242424242');
178
- await page.fill('[name="expiry"]', '12/25');
179
- await page.fill('[name="cvc"]', '123');
180
- await page.click('button[type="submit"]');
181
-
182
- // Verify success
183
- await expect(page).toHaveURL('/order-confirmation');
184
- await expect(page.locator('h1')).toContainText('Order Confirmed');
185
- });
186
- ```
187
-
188
- ## Running Tests
189
-
190
- ### Commands
191
- ```bash
192
- # Run all tests
193
- npm test
194
-
195
- # Run with coverage
196
- npm test -- --coverage
197
-
198
- # Run specific file
199
- npm test -- users.test.ts
200
-
201
- # Watch mode
202
- npm test -- --watch
203
-
204
- # Run E2E
205
- npm run test:e2e
206
- ```
207
-
208
- ## Coverage Report
209
-
210
- ```
211
- ## Test Coverage Report
212
-
213
- **Overall Coverage: 87.3%** ✅
214
-
215
- ### By Category
216
- - Statements: 88.1%
217
- - Branches: 82.4%
218
- - Functions: 91.2%
219
- - Lines: 87.3%
220
-
221
- ### Critical Paths (100% Required)
222
- ✅ Authentication: 100%
223
- ✅ Payment Processing: 100%
224
- ✅ Data Mutations: 98.5%
225
-
226
- ### Areas Needing Attention
227
- ⚠️ utils/legacy.ts: 45% (below threshold)
228
- ⚠️ api/webhooks.ts: 67% (below threshold)
229
-
230
- ### Security Tests
231
- ✅ SQL Injection: 15 tests passing
232
- ✅ XSS Prevention: 12 tests passing
233
- ✅ Auth Bypass: 8 tests passing
234
- ✅ CSRF Protection: 6 tests passing
235
-
236
- ### Test Execution
237
- - Total tests: 1,247
238
- - Passed: 1,245
239
- - Failed: 2
240
- - Duration: 12.3s
241
-
242
- ### Failed Tests
243
- ❌ api/users.test.ts:45 - should handle concurrent requests
244
- ❌ e2e/checkout.test.ts:89 - should process payment
245
-
246
- ### Recommendations
247
- 1. Fix failing tests immediately
248
- 2. Increase coverage in utils/legacy.ts
249
- 3. Add integration tests for webhooks
250
- 4. Consider performance benchmarks
251
- ```
252
-
253
- ## Success Criteria
254
-
255
- Tests are successful when:
256
- - ✅ Overall coverage ≥80%
257
- - ✅ Critical paths 100% covered
258
- - ✅ All tests pass
259
- - ✅ No flaky tests
260
- - ✅ Security tests included
261
- - ✅ Fast execution (<30s)
262
-
263
- ## Integration with Other Commands
264
-
265
- **/ai-sprint-code** → **/ai-sprint-test**
266
- - After generating code, run /ai-sprint-test to create test suite
267
-
268
- **/ai-sprint-test** → **/ai-sprint-review**
269
- - After tests pass, run /ai-sprint-review for quality check
270
-
271
- **/ai-sprint-test** → **/ai-sprint-secure**
272
- - Security tests complement security scanning
273
-
274
- ## Test Quality
275
-
276
- ### Good Tests
277
- - ✅ Fast (<100ms for unit tests)
278
- - ✅ Isolated (no dependencies)
279
- - ✅ Repeatable (same result every time)
280
- - ✅ Clear (obvious what's being tested)
281
- - ✅ Focused (one thing per test)
282
-
283
- ### Bad Tests
284
- - ❌ Slow (wait for timeouts)
285
- - ❌ Flaky (random failures)
286
- - ❌ Testing implementation details
287
- - ❌ Multiple assertions unrelated
288
- - ❌ No clear failure message
289
-
290
- ## Common Test Patterns
291
-
292
- ### API Testing
293
- ```typescript
294
- describe('GET /api/products', () => {
295
- it('returns paginated products', async () => {
296
- const response = await request(app)
297
- .get('/api/products?page=1&limit=10');
298
-
299
- expect(response.status).toBe(200);
300
- expect(response.body.products).toHaveLength(10);
301
- expect(response.body).toHaveProperty('total');
302
- expect(response.body).toHaveProperty('page');
303
- });
304
- });
305
- ```
306
-
307
- ### Database Testing
308
- ```typescript
309
- beforeEach(async () => {
310
- await db.migrate.latest();
311
- await db.seed.run();
312
- });
313
-
314
- afterEach(async () => {
315
- await db.migrate.rollback();
316
- });
317
-
318
- test('creates user in database', async () => {
319
- const user = await createUser({
320
- email: 'test@example.com',
321
- password: 'password'
322
- });
323
-
324
- const found = await db.users.findUnique({
325
- where: { id: user.id }
326
- });
327
-
328
- expect(found.email).toBe('test@example.com');
329
- });
330
- ```
331
-
332
- ### Async Testing
333
- ```typescript
334
- test('async operation succeeds', async () => {
335
- const result = await fetchData();
336
- expect(result).toBeDefined();
337
- });
338
-
339
- test('async operation fails', async () => {
340
- await expect(fetchInvalidData()).rejects.toThrow('Not found');
341
- });
342
- ```
343
-
344
- ## Remember
345
-
346
- **Testing is mandatory:**
347
- - Production code requires tests
348
- - >80% coverage enforced
349
- - Security tests critical
350
- - Regression tests prevent bugs
351
-
352
- **Test early, test often.**
@@ -1,253 +0,0 @@
1
- ---
2
- description: Run comprehensive validation (tests + review + security + coverage)
3
- argument-hint: [optional: path or scope]
4
- ---
5
-
6
- ## Command: /ai-sprint-validate
7
-
8
- Run all validation checks in one command: tests, code review, security scan, and coverage analysis.
9
-
10
- ## Usage
11
-
12
- ```
13
- /ai-sprint-validate
14
- /ai-sprint-validate src/
15
- /ai-sprint-validate --strict
16
- ```
17
-
18
- ## Workflow
19
-
20
- ### 0. Initialize Context
21
- ```bash
22
- # Get real-world timestamp
23
- date "+%y%m%d-%H%M"
24
- ```
25
-
26
- Check `ai_context/memory/learning.md` for known validation issues.
27
-
28
- ### 1. Run Tests
29
- - Execute test suite
30
- - Check coverage >= 80%
31
- - Identify failing tests
32
-
33
- ### 2. Code Quality Review
34
- - Run linter
35
- - Check type safety
36
- - Analyze complexity
37
- - Identify code smells
38
-
39
- ### 2.5. Design Principles Check (Warning)
40
- Run size checker:
41
- ```bash
42
- python3 .claude/skills/quality-assurance/scripts/check-size.py
43
- ```
44
- Flag as warnings (non-blocking):
45
- - Files >500 lines
46
- - Functions >50 lines
47
-
48
- ### 3. Security Scan
49
- - SAST scanning
50
- - Secret detection
51
- - Dependency vulnerabilities
52
- - OWASP Top 10 compliance
53
-
54
- ### 4. Generate Report
55
- Save to: `ai_context/reports/ai-sprint-validate-{timestamp}.md`
56
-
57
- ## Validation Checks
58
-
59
- ### Testing (Tester Agent)
60
- - [ ] All tests pass
61
- - [ ] Coverage >= 80%
62
- - [ ] No flaky tests
63
- - [ ] Critical paths tested
64
- - [ ] Security tests included
65
-
66
- ### Code Quality (Reviewer Agent)
67
- - [ ] No linting errors
68
- - [ ] Types complete
69
- - [ ] No code smells
70
- - [ ] Documentation present
71
-
72
- ### Design Principles (Warning only)
73
- - [ ] Files < 500 lines
74
- - [ ] Functions < 50 lines
75
- - [ ] No YAGNI violations
76
- - [ ] No SRP violations
77
-
78
- ### Security (Security Agent)
79
- - [ ] No hardcoded secrets
80
- - [ ] Input validation present
81
- - [ ] SQL injection prevented
82
- - [ ] XSS prevented
83
- - [ ] Dependencies secure
84
- - [ ] OWASP Top 10 compliant
85
-
86
- ## Report Format
87
-
88
- ```markdown
89
- # Validation Report
90
-
91
- **Date:** {use bash: date "+%Y-%m-%d"}
92
- **Scope:** {files validated}
93
- **Status:** Pass / Fail
94
-
95
- ## Summary
96
-
97
- | Category | Status | Issues |
98
- |----------|--------|--------|
99
- | Tests | ✅/❌ | X |
100
- | Coverage | ✅/❌ | X% |
101
- | Quality | ✅/❌ | X |
102
- | Design | ⚠️/✅ | X |
103
- | Security | ✅/❌ | X |
104
-
105
- ## Test Results
106
-
107
- - Total: X tests
108
- - Passed: X
109
- - Failed: X
110
- - Coverage: X%
111
-
112
- ## Code Quality
113
-
114
- ### Issues Found
115
- - [severity] [file:line] - [description]
116
-
117
- ### Recommendations
118
- - [specific improvements]
119
-
120
- ## Security Scan
121
-
122
- ### Vulnerabilities
123
- - [Critical] X issues
124
- - [High] X issues
125
- - [Medium] X issues
126
- - [Low] X issues
127
-
128
- ### Secrets Detected
129
- - None / [file:line] - [type]
130
-
131
- ### Dependency Vulnerabilities
132
- - [package] - [CVE] - [severity]
133
-
134
- ## Quality Gates
135
-
136
- - [ ] Tests: All passing
137
- - [ ] Coverage: >= 80%
138
- - [ ] Quality: No critical issues
139
- - [ ] Security: No critical vulnerabilities
140
- - [ ] Secrets: None detected
141
-
142
- ## Verdict
143
-
144
- **PASS** - Ready for deployment
145
- or
146
- **FAIL** - Issues must be fixed
147
-
148
- ## Next Steps
149
-
150
- 1. [Required actions]
151
- 2. [Recommended improvements]
152
- ```
153
-
154
- ## Exit Codes
155
-
156
- - `0` - All validations pass
157
- - `1` - Test failures
158
- - `2` - Quality issues (critical)
159
- - `3` - Security vulnerabilities (critical)
160
- - `4` - Coverage below threshold
161
-
162
- ## Options
163
-
164
- ### --strict
165
- Fail on any warning-level issue:
166
- ```
167
- /ai-sprint-validate --strict
168
- ```
169
-
170
- ### --fix
171
- Auto-fix fixable issues:
172
- ```
173
- /ai-sprint-validate --fix
174
- ```
175
-
176
- ### --coverage N
177
- Set custom coverage threshold:
178
- ```
179
- /ai-sprint-validate --coverage 90
180
- ```
181
-
182
- ## Agent Delegation
183
-
184
- `/ai-sprint-validate` orchestrates multiple agents:
185
-
186
- 1. **Tester Agent** - Run tests, check coverage
187
- 2. **Reviewer Agent** - Code quality analysis
188
- 3. **Security Agent** - Security scanning
189
-
190
- Results are aggregated into single report.
191
-
192
- ## Integration
193
-
194
- ### Pre-Commit
195
- ```bash
196
- # Run before each commit
197
- /ai-sprint-validate || exit 1
198
- ```
199
-
200
- ### CI/CD Pipeline
201
- ```yaml
202
- - name: Validate
203
- run: |
204
- /ai-sprint-validate --strict
205
- if [ $? -ne 0 ]; then
206
- echo "Validation failed"
207
- exit 1
208
- fi
209
- ```
210
-
211
- ## Memory Integration
212
-
213
- Before validation:
214
- - Check `ai_context/memory/learning.md` for recurring issues
215
-
216
- After validation:
217
- - Update `ai_context/memory/learning.md` with new patterns
218
- - Save report to `ai_context/reports/ai-sprint-validate-{timestamp}.md`
219
-
220
- ## Common Issues
221
-
222
- ### Low Coverage
223
- - Identify untested code
224
- - Generate missing tests with `/ai-sprint-test`
225
-
226
- ### Security Vulnerabilities
227
- - Fix immediately with `/ai-sprint-code`
228
- - Re-run `/ai-sprint-secure` to verify
229
-
230
- ### Code Quality
231
- - Refactor with `/ai-sprint-code`
232
- - Re-run `/ai-sprint-review` to verify
233
-
234
- ## Success Criteria
235
-
236
- Validation passes when:
237
- - ✅ All tests pass
238
- - ✅ Coverage >= 80%
239
- - ✅ No critical quality issues
240
- - ✅ No critical security vulnerabilities
241
- - ✅ No secrets detected
242
- - ✅ Dependencies secure
243
-
244
- ## Remember
245
-
246
- **Validation is the last gate before deployment.**
247
-
248
- Run `/ai-sprint-validate` before:
249
- - Committing code
250
- - Creating pull requests
251
- - Deploying to any environment
252
-
253
- A passing validation means code is production-ready.
@@ -1,27 +0,0 @@
1
- {
2
- "version": "1.0.0",
3
- "framework": "ai-sprint",
4
- "statusLine": {
5
- "type": "command",
6
- "command": ".claude/statusline.sh",
7
- "padding": 0
8
- },
9
- "security": {
10
- "enableSAST": true,
11
- "enableSecretDetection": true,
12
- "enableDependencyCheck": true
13
- },
14
- "agents": {
15
- "defaultModel": "sonnet",
16
- "plannerModel": "opus"
17
- },
18
- "approvalGates": {
19
- "deployment": true,
20
- "infrastructureChanges": true,
21
- "securityFixes": false
22
- },
23
- "testing": {
24
- "minimumCoverage": 80,
25
- "autoRunTests": true
26
- }
27
- }
@@ -1,68 +0,0 @@
1
- ---
2
- name: codebase-context
3
- description: Efficient codebase understanding using scanned context. Activate when starting work on existing projects or after major code changes. Reads ai_context/ai-sprint-codebase/ documents for project structure and compressed code overview.
4
- license: MIT
5
- ---
6
-
7
- # Codebase Context
8
-
9
- Understand existing codebases efficiently using ai_context/ai-sprint-codebase/ documents.
10
-
11
- ## When to Use
12
-
13
- **Starting work on existing project:**
14
- 1. Check if `ai_context/ai-sprint-codebase/` exists
15
- 2. Read structure.md for project layout
16
- 3. Read overview.md for compressed codebase
17
-
18
- **After major changes:**
19
- - Run `/ai-sprint-scan` to refresh context
20
-
21
- ## Context Files
22
-
23
- Located in `ai_context/ai-sprint-codebase/`:
24
-
25
- | File | Purpose | When to Read |
26
- |------|---------|--------------|
27
- | `structure.md` | Directory tree | First - understand layout |
28
- | `overview.md` | Compressed code | Second - understand patterns |
29
- | `repomix-output.xml` | Token-efficient format | For detailed AI queries |
30
- | `scan-metadata.json` | Scan statistics | Check freshness |
31
-
32
- ## Reading Strategy
33
-
34
- Load: `references/reading-context.md`
35
-
36
- ## Refresh Triggers
37
-
38
- Load: `references/refresh-triggers.md`
39
-
40
- ## Quick Start
41
-
42
- ```bash
43
- # Check if context exists
44
- ls ai_context/ai-sprint-codebase/
45
-
46
- # Read structure first (fast overview)
47
- cat ai_context/ai-sprint-codebase/structure.md
48
-
49
- # Then read overview (comprehensive)
50
- cat ai_context/ai-sprint-codebase/overview.md
51
- ```
52
-
53
- ## Token Efficiency
54
-
55
- | Task | Best Source |
56
- |------|-------------|
57
- | Project structure | structure.md |
58
- | How feature works | overview.md |
59
- | Find all API routes | repomix-output.xml |
60
- | Check specific file | Read file directly |
61
-
62
- ## Integration
63
-
64
- Before planning or implementing:
65
- 1. Check if codebase context exists
66
- 2. Read structure for project layout
67
- 3. Reference patterns from overview
68
- 4. Refresh with `/ai-sprint-scan` if stale (>1 day)