ai-devkit 0.2.0 → 0.3.2

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 (33) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/README.md +86 -3
  3. package/dist/cli.js +0 -0
  4. package/dist/commands/init.d.ts.map +1 -1
  5. package/dist/commands/init.js +0 -6
  6. package/dist/commands/init.js.map +1 -1
  7. package/dist/commands/phase.d.ts.map +1 -1
  8. package/dist/commands/phase.js +0 -4
  9. package/dist/commands/phase.js.map +1 -1
  10. package/dist/lib/TemplateManager.d.ts.map +1 -1
  11. package/dist/lib/TemplateManager.js +7 -13
  12. package/dist/lib/TemplateManager.js.map +1 -1
  13. package/package.json +1 -2
  14. package/templates/commands/capture-knowledge.md +46 -0
  15. package/templates/commands/debug.md +45 -0
  16. package/templates/{env/cursor/commands → commands}/new-requirement.md +1 -1
  17. package/templates/env/cursor/rules/base.md +1 -0
  18. package/templates/env/claude/commands/code-review.md +0 -81
  19. package/templates/env/claude/commands/execute-plan.md +0 -71
  20. package/templates/env/claude/commands/new-requirement.md +0 -127
  21. package/templates/env/claude/commands/update-planning.md +0 -61
  22. package/templates/env/cursor/commands/check-implementation.md +0 -21
  23. package/templates/env/cursor/commands/review-design.md +0 -11
  24. package/templates/env/cursor/commands/review-requirements.md +0 -9
  25. package/templates/env/cursor/commands/writing-test.md +0 -44
  26. /package/templates/{env/claude/commands → commands}/check-implementation.md +0 -0
  27. /package/templates/{env/cursor/commands → commands}/code-review.md +0 -0
  28. /package/templates/{env/cursor/commands → commands}/execute-plan.md +0 -0
  29. /package/templates/{env/claude/commands → commands}/review-design.md +0 -0
  30. /package/templates/{env/claude/commands → commands}/review-requirements.md +0 -0
  31. /package/templates/{env/cursor/commands → commands}/update-planning.md +0 -0
  32. /package/templates/{env/claude/commands → commands}/writing-test.md +0 -0
  33. /package/templates/env/cursor/{rules/ai-devkit.md → AGENTS.md} +0 -0
package/CHANGELOG.md CHANGED
@@ -5,7 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [0.3.0] - 2025-10-15
9
+
10
+ ### Added
11
+ - `/debug` - Structured assistant for clarifying issues, analyzing options, and agreeing on a fix plan before coding
12
+ - `/capture-knowledge` - Analyze and explain how code works from any entry point
13
+ - Supports file, folder, function, and API endpoint analysis
14
+ - Recursive dependency analysis with configurable depth (max: 3)
15
+ - Automatic generation of mermaid diagrams (flowcharts, sequence, architecture, class diagrams)
16
+ - Knowledge capture documentation saved to `docs/ai/implementation/knowledge-{feature-name}.md`
17
+ - Visual dependency tree and component relationship mapping
18
+ - Includes error handling, performance considerations, and improvement suggestions
9
19
 
10
20
  ## [0.2.0] - 2025-10-14
11
21
 
package/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  A CLI toolkit for AI-assisted software development with structured phase templates and environment setup for Cursor and Claude Code.
4
4
 
5
+ [![npm version](https://img.shields.io/npm/v/ai-devkit.svg)](https://www.npmjs.com/package/ai-devkit)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
5
8
  ## Features
6
9
 
7
10
  - 🎯 **Phase-based Development**: Structured templates for each stage of the software development lifecycle
@@ -126,7 +129,8 @@ your-project/
126
129
  ├── update-planning.md
127
130
  ├── check-implementation.md
128
131
  ├── review-design.md
129
- └── review-requirements.md
132
+ ├── review-requirements.md
133
+ └── capture-knowledge.md
130
134
  ```
131
135
 
132
136
  ### For Claude Code:
@@ -141,7 +145,8 @@ your-project/
141
145
  ├── update-planning.md
142
146
  ├── check-implementation.md
143
147
  ├── review-design.md
144
- └── review-requirements.md
148
+ ├── review-requirements.md
149
+ └── capture-knowledge.md
145
150
  ```
146
151
 
147
152
  ## Customizing Templates
@@ -195,6 +200,7 @@ Available commands:
195
200
  - `check-implementation` - Compare implementation with design
196
201
  - `review-design` - Review system design and architecture
197
202
  - `review-requirements` - Review and summarize requirements
203
+ - `capture-knowledge` - Analyze and explain code with recursive dependency analysis and Mermaid diagrams
198
204
 
199
205
  Commands can be referenced in Claude Code chats to guide AI assistance through your development phases.
200
206
 
@@ -276,6 +282,83 @@ This workflow creates feature-specific files:
276
282
  - `docs/ai/implementation/feature-{name}.md`
277
283
  - `docs/ai/testing/feature-{name}.md`
278
284
 
285
+ ### Understanding Existing Code
286
+
287
+ **Use the `/capture-knowledge` command to analyze and document code:**
288
+
289
+ The `capture-knowledge` command helps you understand how existing code works by analyzing it from any entry point and generating comprehensive documentation with visual diagrams.
290
+
291
+ **In Cursor:**
292
+ ```
293
+ /capture-knowledge <entry-point> [options]
294
+ ```
295
+
296
+ **In Claude Code:**
297
+ ```
298
+ Use the capture-knowledge command to analyze <entry-point>
299
+ ```
300
+
301
+ **Entry Point Types:**
302
+ - **File**: `/capture-knowledge src/api/users.ts` - Analyzes a specific file
303
+ - **Folder**: `/capture-knowledge src/services/` - Analyzes an entire module
304
+ - **Function**: `/capture-knowledge calculateTotalPrice` - Analyzes a specific function
305
+ - **API Endpoint**: `/capture-knowledge POST:/api/users` - Analyzes an API endpoint flow
306
+
307
+ **Options:**
308
+ - `--depth <n>` - Control recursion depth (default: 3)
309
+ - `--save` - Save output to `docs/ai/knowledge/`
310
+ - `--diagram-only` - Generate only diagrams
311
+
312
+ **What You Get:**
313
+ - 📖 **Detailed Explanation**: Natural language description of how the code works
314
+ - 🔍 **Implementation Details**: Key components, logic flow, and design patterns
315
+ - 🔗 **Recursive Dependency Analysis**: Automatically traces and explains all dependencies
316
+ - 📊 **Mermaid Diagrams**: Visual flowcharts, sequence diagrams, and architecture diagrams
317
+ - 💡 **Insights**: Performance considerations, security notes, potential improvements
318
+
319
+ **Example Outputs:**
320
+
321
+ For functions, you get:
322
+ - Flowchart showing execution path
323
+ - Parameter and return value documentation
324
+ - Called functions and their purposes
325
+ - Error handling strategy
326
+
327
+ For API endpoints, you get:
328
+ - Sequence diagram showing request flow
329
+ - Validation and authentication steps
330
+ - Database operations
331
+ - Response format
332
+
333
+ For modules/folders, you get:
334
+ - Architecture diagram showing component relationships
335
+ - Overview of each file's purpose
336
+ - Module boundaries and dependencies
337
+
338
+ **Use Cases:**
339
+ - 🎯 Onboarding new developers to understand the codebase
340
+ - 📚 Generating documentation for complex systems
341
+ - 🔍 Debugging by understanding complete execution flow
342
+ - 🏗️ Refactoring with full context of dependencies
343
+ - 📖 Creating knowledge base entries
344
+
345
+ **Example Workflow:**
346
+ ```bash
347
+ # Understand a payment function
348
+ /capture-knowledge processPayment --depth 4
349
+
350
+ # Document an entire authentication module
351
+ /capture-knowledge src/auth/ --save
352
+
353
+ # Analyze an API endpoint
354
+ /capture-knowledge POST:/api/checkout
355
+
356
+ # Get just the diagrams for a complex function
357
+ /capture-knowledge handleOrderProcessing --diagram-only
358
+ ```
359
+
360
+ The analysis is saved to `docs/ai/knowledge/` and can be versioned alongside your code.
361
+
279
362
  ## Use Cases
280
363
 
281
364
  - **New Projects**: Scaffold complete development documentation
@@ -354,7 +437,7 @@ MIT
354
437
  | Guided feature workflow | `/new-requirement` (Cursor & Claude) |
355
438
  | Execute feature plan | `/execute-plan` (Cursor & Claude) |
356
439
  | Generate tests | `/writing-test` (Cursor & Claude) |
357
- | **Local code review** | `/code-review` (Cursor & Claude) |
440
+ | Local code review | `/code-review` (Cursor & Claude) |
358
441
  | Help | `npx ai-devkit --help` |
359
442
 
360
443
  | Quick links | Description |
package/dist/cli.js CHANGED
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAgD,MAAM,UAAU,CAAC;AAoCrF,UAAU,WAAW;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,iBAqIrD"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAgD,MAAM,UAAU,CAAC;AAoCrF,UAAU,WAAW;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,iBA+HrD"}
@@ -41,7 +41,6 @@ async function initCommand(options) {
41
41
  const configManager = new Config_1.ConfigManager();
42
42
  const templateManager = new TemplateManager_1.TemplateManager();
43
43
  ensureGitRepository();
44
- // Check if already initialized
45
44
  if (await configManager.exists()) {
46
45
  const { shouldContinue } = await inquirer_1.default.prompt([
47
46
  {
@@ -56,7 +55,6 @@ async function initCommand(options) {
56
55
  return;
57
56
  }
58
57
  }
59
- // Determine environment
60
58
  let environment = options.environment;
61
59
  if (!environment) {
62
60
  const envAnswer = await inquirer_1.default.prompt([
@@ -73,7 +71,6 @@ async function initCommand(options) {
73
71
  ]);
74
72
  environment = envAnswer.environment;
75
73
  }
76
- // Determine which phases to initialize
77
74
  let selectedPhases = [];
78
75
  if (options.all) {
79
76
  selectedPhases = [...types_1.AVAILABLE_PHASES];
@@ -101,10 +98,8 @@ async function initCommand(options) {
101
98
  return;
102
99
  }
103
100
  console.log(chalk_1.default.blue('\nInitializing AI DevKit...\n'));
104
- // Create or update config
105
101
  await configManager.create(environment);
106
102
  console.log(chalk_1.default.green('✓ Created configuration file'));
107
- // Copy environment templates
108
103
  if (environment) {
109
104
  const envExists = await templateManager.environmentFilesExist(environment);
110
105
  let shouldCopyEnv = true;
@@ -129,7 +124,6 @@ async function initCommand(options) {
129
124
  console.log(chalk_1.default.yellow('⊘ Skipped environment configuration'));
130
125
  }
131
126
  }
132
- // Copy phase templates
133
127
  for (const phase of selectedPhases) {
134
128
  const exists = await templateManager.fileExists(phase);
135
129
  let shouldCopy = true;
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":";;;;;AA+CA,kCAqIC;AApLD,iDAAyC;AACzC,wDAAgC;AAChC,kDAA0B;AAC1B,0CAA8C;AAC9C,4DAAyD;AACzD,oCAAqF;AAErF,SAAS,cAAc;IACrB,IAAI,CAAC;QACH,IAAA,wBAAQ,EAAC,eAAe,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB;IAC1B,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;QACtB,OAAO,CAAC,GAAG,CACT,eAAK,CAAC,MAAM,CACV,4FAA4F,CAC7F,CACF,CAAC;QACF,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,IAAA,wBAAQ,EAAC,qCAAqC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,CAAC;YACH,IAAA,wBAAQ,EAAC,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC;QACjE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CACT,eAAK,CAAC,GAAG,CAAC,wCAAwC,CAAC,EACnD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAC/C,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAQM,KAAK,UAAU,WAAW,CA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AAQ,CAAC,MAAM,CAAC;gBAC1C;oBACE,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,GAAG,2BAAmB,CAAC,KAAK,CAAC,6BAA6B;oBACnE,OAAO,EAAE,KAAK;iBACf;aACF,CAAC,CAAC;YACH,UAAU,GAAG,SAAS,CAAC;QACzB,CAAC;QAED,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAC5D,MAAM,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACpC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC;QACvD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,0EAA0E,CAAC,CAAC;IACxF,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;AAC7E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"phase.d.ts","sourceRoot":"","sources":["../../src/commands/phase.ts"],"names":[],"mappings":"AAMA,wBAAsB,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,iBA+EpD"}
1
+ {"version":3,"file":"phase.d.ts","sourceRoot":"","sources":["../../src/commands/phase.ts"],"names":[],"mappings":"AAMA,wBAAsB,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,iBA2EpD"}
@@ -12,12 +12,10 @@ const types_1 = require("../types");
12
12
  async function phaseCommand(phaseName) {
13
13
  const configManager = new Config_1.ConfigManager();
14
14
  const templateManager = new TemplateManager_1.TemplateManager();
15
- // Check if initialized
16
15
  if (!(await configManager.exists())) {
17
16
  console.log(chalk_1.default.red('Error: AI DevKit not initialized. Run `ai-devkit init` first.'));
18
17
  return;
19
18
  }
20
- // Determine which phase to add
21
19
  let phase;
22
20
  if (phaseName && types_1.AVAILABLE_PHASES.includes(phaseName)) {
23
21
  phase = phaseName;
@@ -56,7 +54,6 @@ async function phaseCommand(phaseName) {
56
54
  ]);
57
55
  phase = selectedPhase;
58
56
  }
59
- // Check if phase already exists
60
57
  const exists = await templateManager.fileExists(phase);
61
58
  let shouldCopy = true;
62
59
  if (exists) {
@@ -74,7 +71,6 @@ async function phaseCommand(phaseName) {
74
71
  console.log(chalk_1.default.yellow(`Cancelled adding ${phase} phase.`));
75
72
  return;
76
73
  }
77
- // Copy the template
78
74
  const file = await templateManager.copyPhaseTemplate(phase);
79
75
  await configManager.addPhase(phase);
80
76
  console.log(chalk_1.default.green(`\n✓ ${types_1.PHASE_DISPLAY_NAMES[phase]} created successfully!`));
@@ -1 +1 @@
1
- {"version":3,"file":"phase.js","sourceRoot":"","sources":["../../src/commands/phase.ts"],"names":[],"mappings":";;;;;AAMA,oCA+EC;AArFD,wDAAgC;AAChC,kDAA0B;AAC1B,0CAA8C;AAC9C,4DAAyD;AACzD,oCAAwE;AAEjE,KAAK,UAAU,YAAY,CAAC,SAAkB;IACnD,MAAM,aAAa,GAAG,IAAI,sBAAa,EAAE,CAAC;IAC1C,MAAM,eAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;IAE9C,uBAAuB;IACvB,IAAI,CAAC,CAAC,MAAM,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC,CAAC;QACxF,OAAO;IACT,CAAC;I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AC,CAAC,CAAC;IACpF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC;AACnD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateManager.d.ts","sourceRoot":"","sources":["../../src/lib/TemplateManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE9C,qBAAa,eAAe;IAC1B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,SAAS,CAAS;gBAEd,SAAS,GAAE,MAAsB;IAMvC,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAWhD,wBAAwB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAgB7D,mBAAmB;YA8BnB,mBAAmB;IA0B3B,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1C,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;CAaxE"}
1
+ {"version":3,"file":"TemplateManager.d.ts","sourceRoot":"","sources":["../../src/lib/TemplateManager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE9C,qBAAa,eAAe;IAC1B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,SAAS,CAAS;gBAEd,SAAS,GAAE,MAAsB;IAKvC,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAWhD,wBAAwB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAgB7D,mBAAmB;YA+BnB,mBAAmB;IAqB3B,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;IAK1C,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;CAaxE"}
@@ -38,7 +38,6 @@ const fs = __importStar(require("fs-extra"));
38
38
  const path = __importStar(require("path"));
39
39
  class TemplateManager {
40
40
  constructor(targetDir = process.cwd()) {
41
- // Templates are in the package directory, not the target directory
42
41
  this.templatesDir = path.join(__dirname, '../../templates');
43
42
  this.targetDir = targetDir;
44
43
  }
@@ -64,22 +63,22 @@ class TemplateManager {
64
63
  }
65
64
  async copyCursorTemplates() {
66
65
  const files = [];
67
- // Copy rules to .cursor/rules directory (new format, .cursorrules is deprecated)
66
+ const workspaceSource = path.join(this.templatesDir, 'env', 'cursor', 'AGENTS.md');
67
+ const workspaceTarget = path.join(this.targetDir, 'AGENTS.md');
68
+ await fs.copy(workspaceSource, workspaceTarget);
69
+ files.push(workspaceTarget);
68
70
  const rulesSourceDir = path.join(this.templatesDir, 'env', 'cursor', 'rules');
69
71
  const rulesTargetDir = path.join(this.targetDir, '.cursor', 'rules');
70
72
  await fs.ensureDir(rulesTargetDir);
71
73
  await fs.copy(rulesSourceDir, rulesTargetDir);
72
- // List all rule files for feedback
73
74
  const ruleFiles = await fs.readdir(rulesSourceDir);
74
75
  ruleFiles.forEach(file => {
75
76
  files.push(path.join(rulesTargetDir, file));
76
77
  });
77
- // Copy slash commands to .cursor/commands directory
78
- const commandsSourceDir = path.join(this.templatesDir, 'env', 'cursor', 'commands');
78
+ const commandsSourceDir = path.join(this.templatesDir, 'commands');
79
79
  const commandsTargetDir = path.join(this.targetDir, '.cursor', 'commands');
80
80
  await fs.ensureDir(commandsTargetDir);
81
81
  await fs.copy(commandsSourceDir, commandsTargetDir);
82
- // List all command files for feedback
83
82
  const commandFiles = await fs.readdir(commandsSourceDir);
84
83
  commandFiles.forEach(file => {
85
84
  files.push(path.join(commandsTargetDir, file));
@@ -88,19 +87,14 @@ class TemplateManager {
88
87
  }
89
88
  async copyClaudeTemplates() {
90
89
  const files = [];
91
- // Copy Claude workspace config
92
90
  const workspaceSource = path.join(this.templatesDir, 'env', 'claude', 'CLAUDE.md');
93
- const workspaceDir = path.join(this.targetDir, '.claude');
94
- const workspaceTarget = path.join(workspaceDir, 'CLAUDE.md');
95
- await fs.ensureDir(workspaceDir);
91
+ const workspaceTarget = path.join(this.targetDir, 'CLAUDE.md');
96
92
  await fs.copy(workspaceSource, workspaceTarget);
97
93
  files.push(workspaceTarget);
98
- // Copy Claude commands
99
- const commandsSourceDir = path.join(this.templatesDir, 'env', 'claude', 'commands');
94
+ const commandsSourceDir = path.join(this.templatesDir, 'commands');
100
95
  const commandsTargetDir = path.join(this.targetDir, '.claude', 'commands');
101
96
  await fs.ensureDir(commandsTargetDir);
102
97
  await fs.copy(commandsSourceDir, commandsTargetDir);
103
- // List all command files for feedback
104
98
  const commandFiles = await fs.readdir(commandsSourceDir);
105
99
  commandFiles.forEach(file => {
106
100
  files.push(path.join(commandsTargetDir, file));
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateManager.js","sourceRoot":"","sources":["../../src/lib/TemplateManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,2CAA6B;AAG7B,MAAa,eAAe;IAI1B,YAAY,YAAoB,OAAO,CAAC,GAAG,EAAE;QAC3C,mEAAmE;QACnE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAC5D,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,KAAY;QAClC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC;QACzE,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QACjE,M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MAAM,eAAe,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;YAC/F,IAAI,eAAe;gBAAE,OAAO,IAAI,CAAC;QACnC,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA1GD,0CA0GC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-devkit",
3
- "version": "0.2.0",
3
+ "version": "0.3.2",
4
4
  "description": "A CLI toolkit for AI-assisted software development with phase templates and environment setup",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -43,4 +43,3 @@
43
43
  "node": ">=16.0.0"
44
44
  }
45
45
  }
46
-
@@ -0,0 +1,46 @@
1
+ # Knowledge Capture Assistant
2
+
3
+ Guide me through creating a structured understanding of a code entry point and saving it to the knowledge docs.
4
+
5
+ ## Step 1: Gather Context
6
+ - Entry point (file, folder, function, API)
7
+ - Why this entry point matters (feature, bug, investigation)
8
+ - Relevant requirements/design docs (if any)
9
+ - Desired depth or focus areas (logic, dependencies, data flow)
10
+
11
+ ## Step 2: Validate Entry Point
12
+ - Determine entry point type and confirm it exists
13
+ - Surface ambiguity (multiple matches) and ask for clarification
14
+ - If not found, suggest likely alternatives or spelling fixes
15
+
16
+ ## Step 3: Collect Source Context
17
+ - Read the primary file/module and summarize purpose, exports, key patterns
18
+ - For folders: list structure, highlight key modules
19
+ - For functions/APIs: capture signature, parameters, return values, error handling
20
+ - Extract essential snippets (avoid large dumps)
21
+
22
+ ## Step 4: Analyze Dependencies
23
+ - Build a dependency view up to depth 3
24
+ - Track visited nodes to avoid loops
25
+ - Categorize dependencies (imports, function calls, services, external packages)
26
+ - Note important external systems or generated code that should be excluded
27
+
28
+ ## Step 5: Synthesize Explanation
29
+ - Draft an overview (purpose, language, high-level behavior)
30
+ - Detail core logic, key components, execution flow, patterns
31
+ - Highlight error handling, performance, security considerations
32
+ - Identify potential improvements or risks discovered during analysis
33
+
34
+ ## Step 6: Create Documentation
35
+ - Normalize entry point name to kebab-case (`calculateTotalPrice` → `calculate-total-price`)
36
+ - Create `docs/ai/implementation/knowledge-{name}.md` using the headings implied in Step 5 (Overview, Implementation Details, Dependencies, Visual Diagrams, Additional Insights, Metadata, Next Steps)
37
+ - Populate sections with findings, diagrams, and metadata (analysis date, depth, files touched)
38
+ - Include mermaid diagrams when they clarify flows or relationships
39
+
40
+ ## Step 7: Review & Next Actions
41
+ - Summarize key insights and open questions for follow-up
42
+ - Suggest related areas for deeper dives or refactors
43
+ - Confirm the knowledge file path and remind to commit it
44
+ - Encourage running `/capture-knowledge` again for related entry points if needed
45
+
46
+ Let me know the entry point and goals when you’re ready to begin the knowledge capture.
@@ -0,0 +1,45 @@
1
+ # Local Debugging Assistant
2
+
3
+ Help me debug an issue by clarifying expectations, identifying gaps, and agreeing on a fix plan before changing code.
4
+
5
+ ## Step 1: Gather Context
6
+ Ask me for:
7
+ - Brief issue description (what is happening?)
8
+ - Expected behavior or acceptance criteria (what should happen?)
9
+ - Current behavior and any error messages/logs
10
+ - Recent related changes or deployments
11
+ - Scope of impact (users, services, environments)
12
+
13
+ ## Step 2: Clarify Reality vs Expectation
14
+ - Restate the observed behavior vs the expected outcome
15
+ - Confirm relevant requirements, tickets, or docs that define the expectation
16
+ - Identify acceptance criteria for the fix (how we know it is resolved)
17
+
18
+ ## Step 3: Reproduce & Isolate
19
+ - Determine reproducibility (always, intermittent, environment-specific)
20
+ - Capture reproduction steps or commands
21
+ - Note any available tests that expose the failure
22
+ - List suspected components, services, or modules
23
+
24
+ ## Step 4: Analyze Potential Causes
25
+ - Brainstorm plausible root causes (data, config, code regressions, external dependencies)
26
+ - Gather supporting evidence (logs, metrics, traces, screenshots)
27
+ - Highlight gaps or unknowns that need investigation
28
+
29
+ ## Step 5: Surface Options
30
+ - Present possible resolution paths (quick fix, deeper refactor, rollback, feature flag, etc.)
31
+ - For each option, list pros/cons, risks, and verification steps
32
+ - Consider required approvals or coordination
33
+
34
+ ## Step 6: Confirm Path Forward
35
+ - Ask which option we should pursue
36
+ - Summarize chosen approach, required pre-work, and success criteria
37
+ - Plan validation steps (tests, monitoring, user sign-off)
38
+
39
+ ## Step 7: Next Actions & Tracking
40
+ - Document tasks, owners, and timelines for the selected option
41
+ - Note follow-up actions after deployment (monitoring, comms, postmortem if needed)
42
+ - Encourage updating relevant docs/tests once resolved
43
+
44
+ Let me know when you're ready to walk through the debugging flow.
45
+
@@ -106,7 +106,7 @@ Provide the MR/PR description:
106
106
  ### Testing
107
107
  - Unit tests: [coverage/status]
108
108
  - Integration tests: [status]
109
- - Manual testing: Completed
109
+ - Manual testing: Completed
110
110
  - Test documentation: `docs/ai/testing/feature-{name}.md`
111
111
 
112
112
  ### Checklist
@@ -0,0 +1 @@
1
+ // Your rules
@@ -1,81 +0,0 @@
1
- # Local Code Review Assistant (Claude)
2
-
3
- You are helping me perform a local code review **before** I push changes. Please follow this structured workflow.
4
-
5
- ## Step 1: Gather Context
6
- Ask me for:
7
- - Brief feature/branch description
8
- - List of modified files (with optional summaries)
9
- - Relevant design doc(s) (e.g., `docs/ai/design/feature-{name}.md` or project-level design)
10
- - Any known constraints or risky areas
11
- - Any open bugs or TODOs linked to this work
12
- - Which tests have already been run
13
-
14
- If possible, request the latest diff:
15
- ```bash
16
- git status -sb
17
- git diff --stat
18
- ```
19
-
20
- ## Step 2: Understand Design Alignment
21
- For each provided design doc:
22
- - Summarize the architectural intent
23
- - Note critical requirements, patterns, or constraints the design mandates
24
-
25
- ## Step 3: File-by-File Review
26
- For every modified file:
27
- 1. Highlight deviations from the referenced design or requirements
28
- 2. Spot potential logic or flow issues and edge cases
29
- 3. Identify redundant or duplicate code
30
- 4. Suggest simplifications or refactors (prefer clarity over cleverness)
31
- 5. Flag security concerns (input validation, secrets, auth, data handling)
32
- 6. Check for performance pitfalls or scalability risks
33
- 7. Ensure error handling, logging, and observability are appropriate
34
- 8. Note any missing comments or docs
35
- 9. Flag missing or outdated tests related to this file
36
-
37
- ## Step 4: Cross-Cutting Concerns
38
- - Verify naming consistency and adherence to project conventions
39
- - Confirm documentation/comments are updated where the behavior changed
40
- - Identify missing tests (unit, integration, E2E) needed to cover the changes
41
- - Ensure configuration/migration updates are captured if applicable
42
-
43
- ## Step 5: Summarize Findings
44
- Provide results in this structure:
45
- ```
46
- ### Summary
47
- - Blocking issues: [count]
48
- - Important follow-ups: [count]
49
- - Nice-to-have improvements: [count]
50
-
51
- ### Detailed Notes
52
- 1. **[File or Component]**
53
- - Issue/Observation: ...
54
- - Impact: (e.g., blocking / important / nice-to-have)
55
- - Recommendation: ...
56
- - Design reference: [...]
57
-
58
- 2. ... (repeat per finding)
59
-
60
- ### Recommended Next Steps
61
- - [ ] Address blocking issues
62
- - [ ] Update design/implementation docs if needed
63
- - [ ] Add/adjust tests:
64
- - Unit:
65
- - Integration:
66
- - E2E:
67
- - [ ] Rerun local test suite
68
- - [ ] Re-run code review command after fixes
69
- ```
70
-
71
- ## Step 6: Final Checklist
72
- Confirm whether each item is complete (yes/no/needs follow-up):
73
- - Implementation matches design & requirements
74
- - No obvious logic or edge-case gaps remain
75
- - Redundant code removed or justified
76
- - Security considerations addressed
77
- - Tests cover new/changed behavior
78
- - Documentation/design notes updated
79
-
80
- ---
81
- Let me know when you're ready to begin the review.
@@ -1,71 +0,0 @@
1
- # Feature Plan Execution Assistant (Claude)
2
-
3
- Help me work through a feature plan one task at a time.
4
-
5
- ## Step 1: Gather Context
6
- Ask me for:
7
- - Feature name (kebab-case, e.g., `user-authentication`)
8
- - Brief feature/branch description
9
- - Relevant planning doc path (default `docs/ai/planning/feature-{name}.md`)
10
- - Any supporting design/implementation docs (design, requirements, implementation)
11
- - Current branch and latest diff summary (`git status -sb`, `git diff --stat`)
12
-
13
- ## Step 2: Load the Plan
14
- - Request the planning doc contents or offer commands like:
15
- ```bash
16
- cat docs/ai/planning/feature-<name>.md
17
- ```
18
- - Parse sections that represent task lists (look for headings + checkboxes `[ ]`, `[x]`).
19
- - Build an ordered queue of tasks grouped by section (e.g., Foundation, Core Features, Testing).
20
-
21
- ## Step 3: Present Task Queue
22
- Show an overview:
23
- ```
24
- ### Task Queue: <Feature Name>
25
- 1. [status] Section • Task title
26
- 2. ...
27
- ```
28
- Status legend: `todo`, `in-progress`, `done`, `blocked` (based on checkbox/notes if present).
29
-
30
- ## Step 4: Interactive Task Execution
31
- For each task in order:
32
- 1. Display the section/context, full bullet text, and any existing notes.
33
- 2. Suggest relevant docs to reference (requirements/design/implementation).
34
- 3. Ask: "Plan for this task?" Offer to outline sub-steps using the design doc.
35
- 4. Prompt to mark status (`done`, `in-progress`, `blocked`, `skipped`) and capture short notes/next steps.
36
- 5. Encourage code/document edits inside Claude; offer commands/snippets when useful.
37
- 6. If blocked, record blocker info and move task to the end or into a "Blocked" list.
38
-
39
- ## Step 5: Update Planning Doc
40
- After each status change, generate a Markdown snippet the user can paste back into the planning doc, e.g.:
41
- ```
42
- - [x] Task: Implement auth service (Notes: finished POST /auth/login, tests added)
43
- ```
44
- Remind the user to keep the source doc updated.
45
-
46
- ## Step 6: Check for Newly Discovered Work
47
- After each section, ask if new tasks were discovered. If yes, capture them in a "New Work" list with status `todo` and include in the summary.
48
-
49
- ## Step 7: Session Summary
50
- Produce a summary table:
51
- ```
52
- ### Execution Summary
53
- - Completed: (list)
54
- - In Progress: (list + owners/next steps)
55
- - Blocked: (list + blockers)
56
- - Skipped / Deferred: (list + rationale)
57
- - New Tasks: (list)
58
- ```
59
-
60
- ## Step 8: Next Actions
61
- Remind the user to:
62
- - Update `docs/ai/planning/feature-{name}.md` with the new statuses
63
- - Sync related docs (requirements/design/implementation/testing) if decisions changed
64
- - Run `check-implementation` to validate changes against design docs
65
- - Run `writing-test` to produce unit/integration tests targeting 100% coverage
66
- - Run `update-planning` to reconcile the planning doc with the latest status
67
- - Run the `code-review` command when ready for final review
68
- - Run test suites relevant to completed tasks
69
-
70
- ---
71
- Let me know when you're ready to start executing the plan. Provide the feature name and planning doc first.
@@ -1,127 +0,0 @@
1
- I want to add a new feature/requirement. Please guide me through the complete development workflow:
2
-
3
- ## Step 1: Capture Requirement
4
- First, ask me:
5
- - What is the feature name? (e.g., "user-authentication", "payment-integration")
6
- - What problem does it solve?
7
- - Who will use it?
8
- - What are the key user stories?
9
-
10
- ## Step 2: Create Feature Documentation Structure
11
- Once I provide the requirement, create the following files (copy the existing template content so sections/frontmatter match exactly):
12
- - Start from `docs/ai/requirements/README.md` → save as `docs/ai/requirements/feature-{name}.md`
13
- - Start from `docs/ai/design/README.md` → save as `docs/ai/design/feature-{name}.md`
14
- - Start from `docs/ai/planning/README.md` → save as `docs/ai/planning/feature-{name}.md`
15
- - Start from `docs/ai/implementation/README.md` → save as `docs/ai/implementation/feature-{name}.md`
16
- - Start from `docs/ai/testing/README.md` → save as `docs/ai/testing/feature-{name}.md`
17
-
18
- Ensure the YAML frontmatter and section headings remain identical to the templates before filling in feature-specific content.
19
-
20
- ## Step 3: Requirements Phase
21
- Help me fill out `docs/ai/requirements/feature-{name}.md`:
22
- - Clarify the problem statement
23
- - Define goals and non-goals
24
- - Write detailed user stories
25
- - Establish success criteria
26
- - Identify constraints and assumptions
27
- - List open questions
28
-
29
- ## Step 4: Design Phase
30
- Guide me through `docs/ai/design/feature-{name}.md`:
31
- - Propose system architecture changes needed
32
- - Define data models/schema changes
33
- - Design API endpoints or interfaces
34
- - Identify components to create/modify
35
- - Document key design decisions
36
- - Note security and performance considerations
37
-
38
- ## Step 5: Planning Phase
39
- Help me break down work in `docs/ai/planning/feature-{name}.md`:
40
- - Create task breakdown with subtasks
41
- - Identify dependencies (on other features, APIs, etc.)
42
- - Estimate effort for each task
43
- - Suggest implementation order
44
- - Identify risks and mitigation strategies
45
-
46
- ## Step 6: Documentation Review (Chained Commands)
47
- Once the docs above are drafted, run the following commands to tighten them up:
48
- - `review-requirements` to validate the requirements doc for completeness and clarity
49
- - `review-design` to ensure the design doc aligns with requirements and highlights key decisions
50
-
51
- (If you are in Cursor, use `/review-requirements` and `/review-design`.)
52
-
53
- ## Step 7: Implementation Phase (Deferred)
54
- This command focuses on documentation only. Actual implementation happens later via `execute-plan`.
55
- For each task in the plan:
56
- 1. Review the task requirements and design
57
- 2. Ask me to confirm I'm starting this task
58
- 3. Guide implementation with reference to design docs
59
- 4. Suggest code structure and patterns
60
- 5. Help with error handling and edge cases
61
- 6. Update `docs/ai/implementation/feature-{name}.md` with notes
62
-
63
- ## Step 8: Testing Phase
64
- Guide testing in `docs/ai/testing/feature-{name}.md`:
65
- - Draft unit test cases with `writing-test`
66
- - Draft integration test scenarios with `writing-test`
67
- - Recommend manual testing steps
68
- - Help write test code
69
- - Verify all success criteria are testable
70
-
71
- ## Step 9: Local Testing & Verification
72
- Guide me through:
73
- 1. Running all tests locally
74
- 2. Manual testing checklist
75
- 3. Reviewing against requirements
76
- 4. Checking design compliance
77
- 5. Preparing for code review (diff summary, list of files, design references)
78
-
79
- ## Step 10: Local Code Review (Optional but recommended)
80
- Before pushing, ask me to run the `code-review` command with the modified file list and relevant docs.
81
-
82
- ## Step 11: Implementation Execution Reminder
83
- When ready to implement, run `execute-plan` to work through the planning doc tasks interactively. That command will orchestrate implementation, testing, and follow-up documentation.
84
-
85
- ## Step 12: Create Merge/Pull Request
86
- Provide the MR/PR description:
87
- ```markdown
88
- ## Feature: [Feature Name]
89
-
90
- ### Summary
91
- [Brief description of what this feature does]
92
-
93
- ### Requirements
94
- - Documented in: `docs/ai/requirements/feature-{name}.md`
95
- - Related to: [issue/ticket number if applicable]
96
-
97
- ### Changes
98
- - [List key changes]
99
- - [List new files/components]
100
- - [List modified files]
101
-
102
- ### Design
103
- - Architecture: [Link to design doc section]
104
- - Key decisions: [Brief summary]
105
-
106
- ### Testing
107
- - Unit tests: [coverage/status]
108
- - Integration tests: [status]
109
- - Manual testing: ✓ Completed
110
- - Test documentation: `docs/ai/testing/feature-{name}.md`
111
-
112
- ### Checklist
113
- - [ ] Code follows project standards
114
- - [ ] All tests pass
115
- - [ ] Documentation updated
116
- - [ ] No breaking changes (or documented if any)
117
- - [ ] Ready for review
118
- ```
119
-
120
- Then provide the appropriate command:
121
- - **GitHub**: `gh pr create --title "feat: [feature-name]" --body-file pr-description.md`
122
- - **GitLab**: `glab mr create --title "feat: [feature-name]" --description "$(cat mr-description.md)"`
123
-
124
- ---
125
-
126
- **Let's start! Tell me about the feature you want to build.**
127
-
@@ -1,61 +0,0 @@
1
- # Planning Update Assistant (Claude)
2
-
3
- Please help me reconcile the current implementation progress with our planning documentation.
4
-
5
- ## Step 1: Gather Context
6
- Ask me for:
7
- - Feature/branch name and brief status
8
- - Tasks completed since last update
9
- - Any new tasks discovered
10
- - Current blockers or risks
11
- - Relevant planning docs (e.g., `docs/ai/planning/feature-{name}.md`)
12
-
13
- ## Step 2: Review Planning Doc
14
- If a planning doc exists:
15
- - Summarize existing milestones and task breakdowns
16
- - Note expected sequencing and dependencies
17
- - Identify outstanding tasks in the plan
18
-
19
- ## Step 3: Reconcile Progress
20
- For each planned task:
21
- - Mark status (done / in progress / blocked / not started)
22
- - Note actual work completed vs. planned scope
23
- - Record blockers or changes in approach
24
- - Identify tasks that were skipped or added
25
-
26
- ## Step 4: Update Task List
27
- Help me produce an updated checklist such as:
28
- ```
29
- ### Current Status: [Feature Name]
30
-
31
- #### Done
32
- - [x] Task A - short note on completion or link to commit/pr
33
- - [x] Task B
34
-
35
- #### In Progress
36
- - [ ] Task C - waiting on [dependency]
37
-
38
- #### Blocked
39
- - [ ] Task D - blocked by [issue/owner]
40
-
41
- #### Newly Discovered Work
42
- - [ ] Task E - reason discovered
43
- - [ ] Task F - due by [date]
44
- ```
45
-
46
- ## Step 5: Next Steps & Priorities
47
- - Suggest the next 2-3 actionable tasks
48
- - Highlight risky areas needing attention
49
- - Recommend coordination (design changes, stakeholder sync, etc.)
50
- - List documentation updates needed
51
-
52
- ## Step 6: Summary for Planning Doc
53
- Prepare a summary paragraph to copy into the planning doc, covering:
54
- - Current state and progress
55
- - Major risks/blockers
56
- - Upcoming focus items
57
- - Any changes to scope or timeline
58
-
59
- ---
60
- Let me know when you're ready to begin the planning update.
61
-
@@ -1,21 +0,0 @@
1
- Compare the current implementation with the design in docs/ai/design/ and requirements in docs/ai/requirements/. Please follow this structured review:
2
-
3
- 1. Ask me for:
4
- - Feature/branch description
5
- - List of modified files
6
- - Relevant design doc(s) (feature-specific and/or project-level)
7
- - Any known constraints or assumptions
8
-
9
- 2. For each design doc:
10
- - Summarize key architectural decisions and constraints
11
- - Highlight components, interfaces, and data flows that must be respected
12
-
13
- 3. File-by-file comparison:
14
- - Confirm implementation matches design intent
15
- - Note deviations or missing pieces
16
- - Flag logic gaps, edge cases, or security issues
17
- - Suggest simplifications or refactors
18
- - Identify missing tests or documentation updates
19
-
20
- 4. Summarize findings with recommended next steps.
21
-
@@ -1,11 +0,0 @@
1
- Review the design documentation in docs/ai/design/feature-{name}.md (and the project-level README if relevant). Summarize:
2
- - Architecture overview (ensure mermaid diagram is present and accurate)
3
- - Key components and their responsibilities
4
- - Technology choices and rationale
5
- - Data models and relationships
6
- - API/interface contracts (inputs, outputs, auth)
7
- - Major design decisions and trade-offs
8
- - Non-functional requirements that must be preserved
9
-
10
- Highlight any inconsistencies, missing sections, or diagrams that need updates.
11
-
@@ -1,9 +0,0 @@
1
- Please review `docs/ai/requirements/feature-{name}.md` and the project-level template `docs/ai/requirements/README.md` to ensure structure and content alignment. Summarize:
2
- - Core problem statement and affected users
3
- - Goals, non-goals, and success criteria
4
- - Primary user stories & critical flows
5
- - Constraints, assumptions, open questions
6
- - Any missing sections or deviations from the template
7
-
8
- Identify gaps or contradictions and suggest clarifications.
9
-
@@ -1,44 +0,0 @@
1
- Review `docs/ai/testing/feature-{name}.md` and ensure it mirrors the base template before writing tests.
2
-
3
- ## Step 1: Gather Context
4
- Ask me for:
5
- - Feature name and branch
6
- - Summary of what changed (link to design & requirements docs)
7
- - Target environment (backend, frontend, full-stack)
8
- - Existing automated test suites (unit, integration, E2E)
9
- - Any flaky or slow tests to avoid
10
-
11
- ## Step 2: Analyze Testing Template
12
- - Identify required sections from `docs/ai/testing/feature-{name}.md` (unit, integration, manual verification, coverage targets)
13
- - Confirm success criteria and edge cases from requirements & design docs
14
- - Note any mocks/stubs or fixtures already available
15
-
16
- ## Step 3: Unit Tests (Aim for 100% coverage)
17
- For each module/function:
18
- 1. List behavior scenarios (happy path, edge cases, error handling)
19
- 2. Generate concrete test cases with assertions and inputs
20
- 3. Reference existing utilities/mocks to accelerate implementation
21
- 4. Provide pseudocode or actual test snippets
22
- 5. Highlight potential missing branches preventing full coverage
23
-
24
- ## Step 4: Integration Tests
25
- 1. Identify critical flows that span multiple components/services
26
- 2. Define setup/teardown steps (databases, APIs, queues)
27
- 3. Outline test cases validating interaction boundaries, data contracts, and failure modes
28
- 4. Suggest instrumentation/logging to debug failures
29
-
30
- ## Step 5: Coverage Strategy
31
- - Recommend tooling commands (e.g., `npm run test -- --coverage`)
32
- - Call out files/functions that still need coverage and why
33
- - Suggest additional tests if coverage <100%
34
-
35
- ## Step 6: Manual & Exploratory Testing
36
- - Propose manual test checklist covering UX, accessibility, and error handling
37
- - Identify exploratory scenarios or chaos/failure injection tests if relevant
38
-
39
- ## Step 7: Update Documentation & TODOs
40
- - Summarize which tests were added or still missing
41
- - Update `docs/ai/testing/feature-{name}.md` sections with links to test files and results
42
- - Flag follow-up tasks for deferred tests (with owners/dates)
43
-
44
- Let me know when you have the latest code changes ready; we'll write tests together until we hit 100% coverage.