ai-sprint-kit 1.3.0 → 1.3.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.
package/lib/installer.js CHANGED
@@ -17,64 +17,72 @@ async function checkExisting(targetDir) {
17
17
  */
18
18
  async function install(targetDir, options = {}) {
19
19
  const { force = false, skipInstall = false } = options;
20
-
21
20
  const templateDir = path.join(__dirname, '../templates');
22
21
  const claudeDir = path.join(targetDir, '.claude');
23
22
 
24
- // Remove existing if force flag
25
- if (force && await fs.pathExists(claudeDir)) {
26
- const spinner = ora('Removing existing .claude/ directory...').start();
27
- await fs.remove(claudeDir);
28
- spinner.succeed('Removed existing .claude/ directory');
29
- }
23
+ await removeExistingIfForce(claudeDir, force);
30
24
 
31
- // Copy template directory
32
25
  const spinner = ora('Installing framework...').start();
33
-
34
26
  try {
35
- // Copy .claude/ directory
36
- await fs.copy(
37
- path.join(templateDir, '.claude'),
38
- claudeDir,
39
- { overwrite: force }
40
- );
41
-
42
- // Copy root files (including MCP config template)
43
- const rootFiles = ['CLAUDE.md', 'README.md', '.mcp.json.example'];
44
- for (const file of rootFiles) {
45
- const srcPath = path.join(templateDir, file);
46
- const destPath = path.join(targetDir, file);
47
-
48
- if (await fs.pathExists(srcPath)) {
49
- // Only copy if doesn't exist or force flag
50
- if (!await fs.pathExists(destPath) || force) {
51
- await fs.copy(srcPath, destPath);
52
- }
53
- }
54
- }
55
-
56
- // Copy docs directory (user guide)
57
- const docsDir = path.join(templateDir, 'docs');
58
- if (await fs.pathExists(docsDir)) {
59
- await fs.copy(docsDir, path.join(targetDir, 'docs'), { overwrite: force });
60
- }
61
-
27
+ await copyTemplateFiles(templateDir, targetDir, claudeDir, force);
62
28
  spinner.succeed('Framework installed');
63
29
 
64
- // Install skill dependencies
65
30
  if (!skipInstall) {
66
31
  await installSkillDependencies(claudeDir);
67
32
  }
68
-
69
- // Create initial directories
70
33
  await createInitialDirs(targetDir);
71
-
72
34
  } catch (error) {
73
35
  spinner.fail('Installation failed');
74
36
  throw error;
75
37
  }
76
38
  }
77
39
 
40
+ /**
41
+ * Remove existing .claude/ directory if force flag is set
42
+ */
43
+ async function removeExistingIfForce(claudeDir, force) {
44
+ if (force && await fs.pathExists(claudeDir)) {
45
+ const spinner = ora('Removing existing .claude/ directory...').start();
46
+ await fs.remove(claudeDir);
47
+ spinner.succeed('Removed existing .claude/ directory');
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Copy template files to target directory
53
+ */
54
+ async function copyTemplateFiles(templateDir, targetDir, claudeDir, force) {
55
+ // Copy .claude/ directory
56
+ await fs.copy(path.join(templateDir, '.claude'), claudeDir, { overwrite: force });
57
+
58
+ // Copy root files
59
+ await copyRootFiles(templateDir, targetDir, force);
60
+
61
+ // Copy user guide to .claude/docs (avoid overwriting user's docs/)
62
+ const docsDir = path.join(templateDir, 'docs');
63
+ if (await fs.pathExists(docsDir)) {
64
+ await fs.copy(docsDir, path.join(claudeDir, 'docs'), { overwrite: force });
65
+ }
66
+ }
67
+
68
+ /**
69
+ * Copy root template files (CLAUDE.md, README.md, etc.)
70
+ */
71
+ async function copyRootFiles(templateDir, targetDir, force) {
72
+ const rootFiles = ['CLAUDE.md', 'README.md', '.mcp.json.example'];
73
+
74
+ for (const file of rootFiles) {
75
+ const srcPath = path.join(templateDir, file);
76
+ const destPath = path.join(targetDir, file);
77
+
78
+ if (await fs.pathExists(srcPath)) {
79
+ if (!await fs.pathExists(destPath) || force) {
80
+ await fs.copy(srcPath, destPath);
81
+ }
82
+ }
83
+ }
84
+ }
85
+
78
86
  /**
79
87
  * Install Python dependencies for skills
80
88
  */
@@ -129,19 +137,42 @@ async function createInitialDirs(targetDir) {
129
137
  'ai_context/plans',
130
138
  'ai_context/docs',
131
139
  'ai_context/reports',
132
- 'ai_context/memory',
133
- 'docs',
134
- 'plans',
135
- 'plans/reports'
140
+ 'ai_context/reports/research',
141
+ 'ai_context/reports/review',
142
+ 'ai_context/reports/security',
143
+ 'ai_context/reports/test',
144
+ 'ai_context/reports/debug',
145
+ 'ai_context/reports/deploy',
146
+ 'ai_context/reports/docs',
147
+ 'ai_context/memory'
136
148
  ];
137
149
 
138
150
  for (const dir of dirs) {
139
- const dirPath = path.join(targetDir, dir);
140
- await fs.ensureDir(dirPath);
151
+ await fs.ensureDir(path.join(targetDir, dir));
152
+ }
153
+
154
+ await createMemoryFiles(targetDir);
155
+ }
156
+
157
+ /**
158
+ * Create initial memory template files
159
+ */
160
+ async function createMemoryFiles(targetDir) {
161
+ const memoryFiles = getMemoryFileTemplates();
162
+
163
+ for (const [file, content] of Object.entries(memoryFiles)) {
164
+ const filePath = path.join(targetDir, file);
165
+ if (!await fs.pathExists(filePath)) {
166
+ await fs.writeFile(filePath, content);
167
+ }
141
168
  }
169
+ }
142
170
 
143
- // Create initial memory files
144
- const memoryFiles = {
171
+ /**
172
+ * Get memory file templates
173
+ */
174
+ function getMemoryFileTemplates() {
175
+ return {
145
176
  'ai_context/memory/learning.md': `# Learning Log
146
177
 
147
178
  Lessons learned from past development sessions.
@@ -190,13 +221,6 @@ _None_
190
221
  _None_
191
222
  `
192
223
  };
193
-
194
- for (const [file, content] of Object.entries(memoryFiles)) {
195
- const filePath = path.join(targetDir, file);
196
- if (!await fs.pathExists(filePath)) {
197
- await fs.writeFile(filePath, content);
198
- }
199
- }
200
224
  }
201
225
 
202
226
  module.exports = {
package/lib/scanner.js CHANGED
@@ -65,60 +65,43 @@ async function checkRepomix() {
65
65
 
66
66
  /**
67
67
  * Run repomix scan on target directory
68
- * @param {string} targetDir - Directory to scan
69
- * @param {string} outputDir - Output directory for scan results
70
- * @param {object} options - Scan options
71
- * @returns {Promise<object>} - Scan results
72
68
  */
73
69
  async function runRepomixScan(targetDir, outputDir, options = {}) {
74
70
  const { useNpx = false } = options;
75
-
76
- // Create output directory
77
71
  await fs.ensureDir(outputDir);
78
72
 
79
73
  const xmlOutput = path.join(outputDir, 'repomix-output.xml');
80
74
  const mdOutput = path.join(outputDir, 'overview.md');
81
75
 
82
- // Build base command
83
- const baseCmd = useNpx ? 'npx' : 'repomix';
84
- const baseArgs = useNpx ? ['repomix'] : [];
76
+ await runRepomixCommand(targetDir, xmlOutput, 'xml', useNpx);
77
+ await runRepomixCommand(targetDir, mdOutput, 'markdown', useNpx);
85
78
 
86
- // Generate XML output (for AI consumption)
87
- const xmlArgs = [
88
- ...baseArgs,
89
- '--compress',
90
- '--style', 'xml',
91
- '-o', xmlOutput
92
- ];
79
+ return parseRepomixStats(xmlOutput);
80
+ }
93
81
 
94
- await execa(baseCmd, xmlArgs, {
95
- cwd: targetDir,
96
- timeout: 300000 // 5 minute timeout
97
- });
82
+ /**
83
+ * Execute repomix command with specified style
84
+ */
85
+ async function runRepomixCommand(targetDir, outputPath, style, useNpx) {
86
+ const baseCmd = useNpx ? 'npx' : 'repomix';
87
+ const baseArgs = useNpx ? ['repomix'] : [];
98
88
 
99
- // Generate Markdown output (for human reading)
100
- const mdArgs = [
101
- ...baseArgs,
102
- '--compress',
103
- '--style', 'markdown',
104
- '-o', mdOutput
105
- ];
89
+ const args = [...baseArgs, '--compress', '--style', style, '-o', outputPath];
106
90
 
107
- await execa(baseCmd, mdArgs, {
91
+ await execa(baseCmd, args, {
108
92
  cwd: targetDir,
109
93
  timeout: 300000
110
94
  });
95
+ }
111
96
 
112
- // Parse XML to get stats
113
- let stats = {
114
- totalFiles: 0,
115
- totalTokens: 0,
116
- compressedTokens: 0
117
- };
97
+ /**
98
+ * Parse repomix XML output for statistics
99
+ */
100
+ async function parseRepomixStats(xmlPath) {
101
+ const stats = { totalFiles: 0, totalTokens: 0, compressedTokens: 0 };
118
102
 
119
103
  try {
120
- const xmlContent = await fs.readFile(xmlOutput, 'utf-8');
121
- // Count file entries in XML
104
+ const xmlContent = await fs.readFile(xmlPath, 'utf-8');
122
105
  const fileMatches = xmlContent.match(/<file path="/g);
123
106
  if (fileMatches) {
124
107
  stats.totalFiles = fileMatches.length;
@@ -256,25 +239,36 @@ async function writeMetadata(outputDir, stats) {
256
239
 
257
240
  /**
258
241
  * Main entry point for codebase scanning
259
- * @param {string} targetDir - Directory to scan
260
- * @param {object} options - Scan options
261
- * @returns {Promise<object>} - Scan results
262
242
  */
263
243
  async function scanCodebase(targetDir, options = {}) {
264
244
  const { silent = false } = options;
265
245
  const outputDir = path.join(targetDir, 'ai_context', 'codebase');
266
- const startTime = Date.now();
267
246
 
268
- // Check for source code
247
+ // Pre-flight checks
248
+ const preflight = await runPreflightChecks(targetDir, silent);
249
+ if (preflight.skipped) return preflight;
250
+
251
+ const spinner = silent ? null : ora('Scanning codebase...').start();
252
+
253
+ try {
254
+ const result = await executeScan(targetDir, outputDir, preflight.command, spinner);
255
+ if (spinner) spinner.succeed(`Codebase scanned (${result.stats.totalFiles} files, ${result.stats.duration}s)`);
256
+ return result;
257
+ } catch (error) {
258
+ return handleScanError(error, spinner, silent);
259
+ }
260
+ }
261
+
262
+ /**
263
+ * Run pre-flight checks before scanning
264
+ */
265
+ async function runPreflightChecks(targetDir, silent) {
269
266
  const hasSource = await detectSourceCode(targetDir);
270
267
  if (!hasSource) {
271
- if (!silent) {
272
- console.log(chalk.gray(' No source code detected. Skipping scan.'));
273
- }
268
+ if (!silent) console.log(chalk.gray(' No source code detected. Skipping scan.'));
274
269
  return { skipped: true, reason: 'no-source' };
275
270
  }
276
271
 
277
- // Check repomix availability
278
272
  const { available, command } = await checkRepomix();
279
273
  if (!available) {
280
274
  if (!silent) {
@@ -284,54 +278,40 @@ async function scanCodebase(targetDir, options = {}) {
284
278
  return { skipped: true, reason: 'no-repomix' };
285
279
  }
286
280
 
287
- const spinner = silent ? null : ora('Scanning codebase...').start();
288
-
289
- try {
290
- // Create output directory
291
- await fs.ensureDir(outputDir);
292
-
293
- // Create default ignore file
294
- await createRepomixIgnore(outputDir);
295
-
296
- // Run repomix scan
297
- const useNpx = command.includes('npx');
298
- const stats = await runRepomixScan(targetDir, outputDir, { useNpx });
299
-
300
- // Generate structure
301
- if (spinner) spinner.text = 'Generating structure...';
302
- await generateStructure(targetDir, outputDir);
281
+ return { skipped: false, command };
282
+ }
303
283
 
304
- // Calculate duration
305
- stats.duration = Math.round((Date.now() - startTime) / 1000 * 10) / 10;
284
+ /**
285
+ * Execute the actual scan operation
286
+ */
287
+ async function executeScan(targetDir, outputDir, command, spinner) {
288
+ const startTime = Date.now();
306
289
 
307
- // Write metadata
308
- const metadata = await writeMetadata(outputDir, stats);
290
+ await fs.ensureDir(outputDir);
291
+ await createRepomixIgnore(outputDir);
309
292
 
310
- if (spinner) {
311
- spinner.succeed(`Codebase scanned (${stats.totalFiles} files, ${stats.duration}s)`);
312
- }
293
+ const useNpx = command.includes('npx');
294
+ const stats = await runRepomixScan(targetDir, outputDir, { useNpx });
313
295
 
314
- return {
315
- success: true,
316
- outputDir,
317
- stats: metadata
318
- };
296
+ if (spinner) spinner.text = 'Generating structure...';
297
+ await generateStructure(targetDir, outputDir);
319
298
 
320
- } catch (error) {
321
- if (spinner) {
322
- spinner.fail('Codebase scan failed');
323
- }
299
+ stats.duration = Math.round((Date.now() - startTime) / 1000 * 10) / 10;
300
+ const metadata = await writeMetadata(outputDir, stats);
324
301
 
325
- if (!silent) {
326
- console.log(chalk.yellow(` ⚠️ ${error.message}`));
327
- console.log(chalk.gray(' Run /scan manually after fixing the issue.'));
328
- }
302
+ return { success: true, outputDir, stats: metadata };
303
+ }
329
304
 
330
- return {
331
- success: false,
332
- error: error.message
333
- };
305
+ /**
306
+ * Handle scan errors
307
+ */
308
+ function handleScanError(error, spinner, silent) {
309
+ if (spinner) spinner.fail('Codebase scan failed');
310
+ if (!silent) {
311
+ console.log(chalk.yellow(` ⚠️ ${error.message}`));
312
+ console.log(chalk.gray(' Run /scan manually after fixing the issue.'));
334
313
  }
314
+ return { success: false, error: error.message };
335
315
  }
336
316
 
337
317
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-sprint-kit",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "CLI installer for autonomous coding agent framework - security-first, production-grade Claude Code setup",
5
5
  "main": "lib/installer.js",
6
6
  "bin": {
@@ -80,7 +80,8 @@ ai_context/
80
80
  │ ├── learning.md # Bug patterns to watch for
81
81
  │ └── decisions.md # Fix decisions log
82
82
  └── reports/
83
- └── debug-251224-login-bug.md
83
+ └── debug/
84
+ └── debug-251224-login-bug.md
84
85
  ```
85
86
 
86
87
  ## Workflow
@@ -111,7 +112,7 @@ ai_context/
111
112
 
112
113
  ### Phase 4: Document
113
114
  ```
114
- 1. Call Write: ai_context/reports/ai-sprint-debug-{timestamp}-{slug}.md
115
+ 1. Call Write: ai_context/reports/debug/ai-sprint-debug-{timestamp}-{slug}.md
115
116
  2. Update ai_context/memory/learning.md with new pattern
116
117
  ```
117
118
 
@@ -76,7 +76,8 @@ ai_context/
76
76
  │ ├── learning.md # DevOps lessons learned
77
77
  │ └── decisions.md # Infrastructure decisions
78
78
  └── reports/
79
- └── deploy-251224.md
79
+ └── deploy/
80
+ └── deploy-251224.md
80
81
  ```
81
82
 
82
83
  ## Workflow
@@ -108,7 +109,7 @@ ai_context/
108
109
 
109
110
  ### Phase 4: Documentation
110
111
  ```
111
- 1. Call Write: ai_context/reports/ai-sprint-deploy-{timestamp}.md
112
+ 1. Call Write: ai_context/reports/deploy/ai-sprint-deploy-{timestamp}.md
112
113
  2. Document rollback procedures
113
114
  3. Update ai_context/memory/decisions.md
114
115
  ```
@@ -77,7 +77,8 @@ ai_context/
77
77
  ├── memory/
78
78
  │ └── learning.md # Documentation lessons
79
79
  └── reports/
80
- └── docs-audit-251224.md
80
+ └── docs/
81
+ └── docs-audit-251224.md
81
82
  ```
82
83
 
83
84
  ## Workflow
@@ -107,7 +108,7 @@ ai_context/
107
108
 
108
109
  ### Phase 4: Report
109
110
  ```
110
- 1. Call Write: ai_context/reports/ai-sprint-docs-audit-{timestamp}.md
111
+ 1. Call Write: ai_context/reports/docs/ai-sprint-docs-audit-{timestamp}.md
111
112
  2. Document what was updated
112
113
  ```
113
114
 
@@ -82,7 +82,8 @@ ai_context/
82
82
  ├── memory/
83
83
  │ └── learning.md # Research lessons learned
84
84
  └── reports/
85
- └── research-{topic}-251224.md
85
+ └── research/
86
+ └── research-{topic}-251224.md
86
87
  ```
87
88
 
88
89
  ## Workflow
@@ -110,7 +111,7 @@ ai_context/
110
111
 
111
112
  ### Phase 4: Report
112
113
  ```
113
- 1. Call Write: ai_context/reports/research-{topic}-{timestamp}.md
114
+ 1. Call Write: ai_context/reports/research/research-{topic}-{timestamp}.md
114
115
  2. Include all citations with links
115
116
  3. Provide actionable recommendations
116
117
  ```
@@ -107,7 +107,8 @@ ai_context/
107
107
  │ ├── learning.md # Review lessons learned
108
108
  │ └── decisions.md # Code decisions log
109
109
  └── reports/
110
- └── review-251224.md
110
+ └── review/
111
+ └── review-251224.md
111
112
  ```
112
113
 
113
114
  ## Workflow
@@ -131,7 +132,7 @@ ai_context/
131
132
 
132
133
  ### Phase 3: Reporting
133
134
  ```
134
- 1. Call Write: ai_context/reports/ai-sprint-review-{timestamp}.md
135
+ 1. Call Write: ai_context/reports/review/ai-sprint-review-{timestamp}.md
135
136
  2. Categorize by severity (Critical/High/Medium/Low)
136
137
  3. Provide before/after code examples
137
138
  4. Include rationale for each suggestion
@@ -77,7 +77,8 @@ ai_context/
77
77
  │ ├── learning.md # Past security issues to watch for
78
78
  │ └── decisions.md # Security decisions log
79
79
  └── reports/
80
- └── security-251224-2115.md # Security scan results
80
+ └── security/
81
+ └── security-251224-2115.md # Security scan results
81
82
  ```
82
83
 
83
84
  ## Workflow
@@ -100,7 +101,7 @@ ai_context/
100
101
 
101
102
  ### Phase 3: Reporting
102
103
  ```
103
- 1. Call Write: ai_context/reports/security-{timestamp}.md
104
+ 1. Call Write: ai_context/reports/security/security-{timestamp}.md
104
105
  2. Include severity ratings and fixes
105
106
  3. Update ai_context/memory/learning.md if new patterns found
106
107
  ```
@@ -119,7 +119,8 @@ ai_context/
119
119
  ├── memory/
120
120
  │ └── learning.md # Testing lessons learned
121
121
  └── reports/
122
- └── test-coverage-251224.md
122
+ └── test/
123
+ └── test-coverage-251224.md
123
124
  ```
124
125
 
125
126
  ## Workflow
@@ -150,7 +151,7 @@ ai_context/
150
151
 
151
152
  ### Phase 4: Reporting
152
153
  ```
153
- 1. Call Write: ai_context/reports/ai-sprint-test-coverage-{timestamp}.md
154
+ 1. Call Write: ai_context/reports/test/ai-sprint-test-coverage-{timestamp}.md
154
155
  2. Document coverage metrics
155
156
  3. Note gaps and recommendations
156
157
  ```
@@ -252,11 +252,11 @@ Before debugging:
252
252
 
253
253
  After debugging:
254
254
  - Update `ai_context/memory/learning.md` with new bug pattern
255
- - Save report to `ai_context/reports/ai-sprint-debug-{timestamp}-{slug}.md`
255
+ - Save report to `ai_context/reports/debug/ai-sprint-debug-{timestamp}-{slug}.md`
256
256
 
257
257
  ## Debug Report
258
258
 
259
- Save to: `ai_context/reports/ai-sprint-debug-YYMMDD-slug.md`
259
+ Save to: `ai_context/reports/debug/ai-sprint-debug-YYMMDD-slug.md`
260
260
 
261
261
  ```markdown
262
262
  # Bug Fix Report
@@ -118,11 +118,14 @@ project/
118
118
  ├── ai_context/ # AI artifacts (not project code)
119
119
  │ ├── plans/ # Implementation plans
120
120
  │ ├── docs/ # AI-generated documentation
121
- │ ├── reports/ # Agent outputs
122
- │ │ ├── review-*.md # Code review reports
123
- │ │ ├── test-*.md # Test coverage reports
124
- │ │ ├── security-*.md # Security scan results
125
- │ │ └── debug-*.md # Debugging analysis
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
126
129
  │ └── memory/
127
130
  │ │ ├── learning.md # Lessons learned
128
131
  │ │ ├── decisions.md # Key decisions
@@ -337,11 +337,11 @@ git commit -m "เพิ่มฟีเจอร์ใหม่"
337
337
 
338
338
  ### 3. อ่านรายงานที่ AI สร้าง
339
339
 
340
- AI จะบันทึกผลการทำงานไว้ใน `ai_context/reports/`
340
+ AI จะบันทึกผลการทำงานไว้ใน `ai_context/reports/` (แยกโฟลเดอร์ตามประเภท)
341
341
 
342
342
  ```bash
343
343
  # ดูรายงานความปลอดภัย
344
- cat ai_context/reports/security-*.md
344
+ cat ai_context/reports/security/
345
345
  ```
346
346
 
347
347
  ### 4. ใช้ /ai-sprint-auto สำหรับงานง่ายๆ
@@ -391,7 +391,7 @@ cat ai_context/reports/security-*.md
391
391
 
392
392
  ```bash
393
393
  # ดูรายงาน
394
- cat ai_context/reports/security-*.md
394
+ cat ai_context/reports/security/
395
395
 
396
396
  # แก้ไข
397
397
  /ai-sprint-code "แก้ไขปัญหาความปลอดภัยตามรายงาน"
@@ -105,7 +105,7 @@ For more control over each phase:
105
105
  ```bash
106
106
  # Step 1: Investigate the issue
107
107
  /ai-sprint-debug "users getting 500 error when submitting registration form"
108
- # Review the analysis in ai_context/reports/
108
+ # Review the analysis in ai_context/reports/debug/
109
109
 
110
110
  # Step 2: Implement the fix
111
111
  /ai-sprint-code "fix the registration error based on debug analysis"
@@ -124,7 +124,7 @@ For more control over each phase:
124
124
  # Scan specific directory
125
125
  /ai-sprint-secure src/auth/
126
126
 
127
- # Review findings in ai_context/reports/security-*.md
127
+ # Review findings in ai_context/reports/security/
128
128
  ```
129
129
 
130
130
  ### Tutorial 5: Pre-Commit Validation
@@ -211,7 +211,7 @@ Generates tests and runs them with coverage.
211
211
  /ai-sprint-test "add integration tests for payment API"
212
212
  ```
213
213
 
214
- **Output:** `ai_context/reports/test-*.md`
214
+ **Output:** `ai_context/reports/test/`
215
215
 
216
216
  **Requirements:** 80%+ coverage required.
217
217
 
@@ -230,7 +230,7 @@ Analyzes code quality and best practices.
230
230
  /ai-sprint-review src/auth/login.ts
231
231
  ```
232
232
 
233
- **Output:** `ai_context/reports/review-*.md`
233
+ **Output:** `ai_context/reports/review/`
234
234
 
235
235
  **Checks:**
236
236
  - Code quality and patterns
@@ -254,7 +254,7 @@ Comprehensive security analysis.
254
254
  /ai-sprint-secure src/auth/
255
255
  ```
256
256
 
257
- **Output:** `ai_context/reports/security-*.md`
257
+ **Output:** `ai_context/reports/security/`
258
258
 
259
259
  **Scans:**
260
260
  - SAST (static analysis)
@@ -310,7 +310,7 @@ Investigates issues and bugs.
310
310
  /ai-sprint-debug "slow API response times on /users endpoint"
311
311
  ```
312
312
 
313
- **Output:** `ai_context/reports/debug-*.md`
313
+ **Output:** `ai_context/reports/debug/`
314
314
 
315
315
  **Provides:**
316
316
  - Root cause analysis
@@ -475,8 +475,8 @@ After every `/ai-sprint-secure` scan:
475
475
 
476
476
  ```bash
477
477
  # Check reports
478
- ls ai_context/reports/security-*.md
479
- cat ai_context/reports/security-latest.md
478
+ ls ai_context/reports/security/
479
+ cat ai_context/reports/security/security-*.md
480
480
  ```
481
481
 
482
482
  ### 5. Configure MCP Tools
@@ -532,7 +532,7 @@ For complex features, maintain control:
532
532
 
533
533
  ```bash
534
534
  # View the report
535
- cat ai_context/reports/security-*.md
535
+ cat ai_context/reports/security/
536
536
 
537
537
  # Fix issues
538
538
  /ai-sprint-code "fix security issues from the security scan"