ai-devkit 0.2.0

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 (56) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +364 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +24 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/init.d.ts +9 -0
  8. package/dist/commands/init.d.ts.map +1 -0
  9. package/dist/commands/init.js +162 -0
  10. package/dist/commands/init.js.map +1 -0
  11. package/dist/commands/phase.d.ts +2 -0
  12. package/dist/commands/phase.d.ts.map +1 -0
  13. package/dist/commands/phase.js +83 -0
  14. package/dist/commands/phase.js.map +1 -0
  15. package/dist/index.d.ts +4 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +23 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/lib/Config.d.ts +12 -0
  20. package/dist/lib/Config.d.ts.map +1 -0
  21. package/dist/lib/Config.js +94 -0
  22. package/dist/lib/Config.js.map +1 -0
  23. package/dist/lib/TemplateManager.d.ts +13 -0
  24. package/dist/lib/TemplateManager.d.ts.map +1 -0
  25. package/dist/lib/TemplateManager.js +129 -0
  26. package/dist/lib/TemplateManager.js.map +1 -0
  27. package/dist/types.d.ts +17 -0
  28. package/dist/types.d.ts.map +1 -0
  29. package/dist/types.js +22 -0
  30. package/dist/types.js.map +1 -0
  31. package/package.json +46 -0
  32. package/templates/env/claude/CLAUDE.md +52 -0
  33. package/templates/env/claude/commands/check-implementation.md +21 -0
  34. package/templates/env/claude/commands/code-review.md +81 -0
  35. package/templates/env/claude/commands/execute-plan.md +71 -0
  36. package/templates/env/claude/commands/new-requirement.md +127 -0
  37. package/templates/env/claude/commands/review-design.md +11 -0
  38. package/templates/env/claude/commands/review-requirements.md +9 -0
  39. package/templates/env/claude/commands/update-planning.md +61 -0
  40. package/templates/env/claude/commands/writing-test.md +44 -0
  41. package/templates/env/cursor/commands/check-implementation.md +21 -0
  42. package/templates/env/cursor/commands/code-review.md +81 -0
  43. package/templates/env/cursor/commands/execute-plan.md +71 -0
  44. package/templates/env/cursor/commands/new-requirement.md +127 -0
  45. package/templates/env/cursor/commands/review-design.md +11 -0
  46. package/templates/env/cursor/commands/review-requirements.md +9 -0
  47. package/templates/env/cursor/commands/update-planning.md +61 -0
  48. package/templates/env/cursor/commands/writing-test.md +44 -0
  49. package/templates/env/cursor/rules/ai-devkit.md +51 -0
  50. package/templates/phases/deployment.md +72 -0
  51. package/templates/phases/design.md +60 -0
  52. package/templates/phases/implementation.md +65 -0
  53. package/templates/phases/monitoring.md +80 -0
  54. package/templates/phases/planning.md +60 -0
  55. package/templates/phases/requirements.md +51 -0
  56. package/templates/phases/testing.md +81 -0
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.phaseCommand = phaseCommand;
7
+ const inquirer_1 = __importDefault(require("inquirer"));
8
+ const chalk_1 = __importDefault(require("chalk"));
9
+ const Config_1 = require("../lib/Config");
10
+ const TemplateManager_1 = require("../lib/TemplateManager");
11
+ const types_1 = require("../types");
12
+ async function phaseCommand(phaseName) {
13
+ const configManager = new Config_1.ConfigManager();
14
+ const templateManager = new TemplateManager_1.TemplateManager();
15
+ // Check if initialized
16
+ if (!(await configManager.exists())) {
17
+ console.log(chalk_1.default.red('Error: AI DevKit not initialized. Run `ai-devkit init` first.'));
18
+ return;
19
+ }
20
+ // Determine which phase to add
21
+ let phase;
22
+ if (phaseName && types_1.AVAILABLE_PHASES.includes(phaseName)) {
23
+ phase = phaseName;
24
+ }
25
+ else if (phaseName) {
26
+ console.log(chalk_1.default.red(`Error: Unknown phase "${phaseName}". Available phases: ${types_1.AVAILABLE_PHASES.join(', ')}`));
27
+ return;
28
+ }
29
+ else {
30
+ const config = await configManager.read();
31
+ const availableToAdd = types_1.AVAILABLE_PHASES.filter(p => !config?.initializedPhases.includes(p));
32
+ if (availableToAdd.length === 0) {
33
+ console.log(chalk_1.default.yellow('All phases are already initialized.'));
34
+ const { shouldReinitialize } = await inquirer_1.default.prompt([
35
+ {
36
+ type: 'confirm',
37
+ name: 'shouldReinitialize',
38
+ message: 'Would you like to reinitialize a phase?',
39
+ default: false
40
+ }
41
+ ]);
42
+ if (!shouldReinitialize) {
43
+ return;
44
+ }
45
+ }
46
+ const { selectedPhase } = await inquirer_1.default.prompt([
47
+ {
48
+ type: 'list',
49
+ name: 'selectedPhase',
50
+ message: 'Which phase would you like to add?',
51
+ choices: types_1.AVAILABLE_PHASES.map(p => ({
52
+ name: types_1.PHASE_DISPLAY_NAMES[p],
53
+ value: p
54
+ }))
55
+ }
56
+ ]);
57
+ phase = selectedPhase;
58
+ }
59
+ // Check if phase already exists
60
+ const exists = await templateManager.fileExists(phase);
61
+ let shouldCopy = true;
62
+ if (exists) {
63
+ const { overwrite } = await inquirer_1.default.prompt([
64
+ {
65
+ type: 'confirm',
66
+ name: 'overwrite',
67
+ message: `${types_1.PHASE_DISPLAY_NAMES[phase]} already exists. Overwrite?`,
68
+ default: false
69
+ }
70
+ ]);
71
+ shouldCopy = overwrite;
72
+ }
73
+ if (!shouldCopy) {
74
+ console.log(chalk_1.default.yellow(`Cancelled adding ${phase} phase.`));
75
+ return;
76
+ }
77
+ // Copy the template
78
+ const file = await templateManager.copyPhaseTemplate(phase);
79
+ await configManager.addPhase(phase);
80
+ console.log(chalk_1.default.green(`\n✓ ${types_1.PHASE_DISPLAY_NAMES[phase]} created successfully!`));
81
+ console.log(chalk_1.default.blue(` Location: ${file}\n`));
82
+ }
83
+ //# sourceMappingURL=phase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phase.js","sourceRoot":"","sources":["../../src/commands/phase.ts"],"names":[],"mappings":";;;;;AAMA,oCA+EC;AArFD,wDAAgC;AAChC,kDA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AAC;IAEpC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,OAAO,2BAAmB,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACpF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { ConfigManager } from './lib/Config';
2
+ export { TemplateManager } from './lib/TemplateManager';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.TemplateManager = exports.ConfigManager = void 0;
18
+ var Config_1 = require("./lib/Config");
19
+ Object.defineProperty(exports, "ConfigManager", { enumerable: true, get: function () { return Config_1.ConfigManager; } });
20
+ var TemplateManager_1 = require("./lib/TemplateManager");
21
+ Object.defineProperty(exports, "TemplateManager", { enumerable: true, get: function () { return TemplateManager_1.TemplateManager; } });
22
+ __exportStar(require("./types"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAApC,uGAAA,aAAa,OAAA;AACtB,yDAAwD;AAA/C,kHAAA,eAAe,OAAA;AACxB,0CAAwB"}
@@ -0,0 +1,12 @@
1
+ import { DevKitConfig, Phase, Environment } from '../types';
2
+ export declare class ConfigManager {
3
+ private configPath;
4
+ constructor(targetDir?: string);
5
+ exists(): Promise<boolean>;
6
+ read(): Promise<DevKitConfig | null>;
7
+ create(environment?: Environment): Promise<DevKitConfig>;
8
+ update(updates: Partial<DevKitConfig>): Promise<DevKitConfig>;
9
+ addPhase(phase: Phase): Promise<DevKitConfig>;
10
+ hasPhase(phase: Phase): Promise<boolean>;
11
+ }
12
+ //# sourceMappingURL=Config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/lib/Config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI5D,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAS;gBAEf,SAAS,GAAE,MAAsB;IAIvC,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAI1B,IAAI,IAAI,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAOpC,MAAM,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAaxD,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC;IAgB7D,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC;IAc7C,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;CAI/C"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.ConfigManager = void 0;
37
+ const fs = __importStar(require("fs-extra"));
38
+ const path = __importStar(require("path"));
39
+ const CONFIG_FILE_NAME = '.ai-devkit.json';
40
+ class ConfigManager {
41
+ constructor(targetDir = process.cwd()) {
42
+ this.configPath = path.join(targetDir, CONFIG_FILE_NAME);
43
+ }
44
+ async exists() {
45
+ return fs.pathExists(this.configPath);
46
+ }
47
+ async read() {
48
+ if (await this.exists()) {
49
+ return fs.readJson(this.configPath);
50
+ }
51
+ return null;
52
+ }
53
+ async create(environment) {
54
+ const config = {
55
+ version: '0.1.0',
56
+ environment,
57
+ initializedPhases: [],
58
+ createdAt: new Date().toISOString(),
59
+ updatedAt: new Date().toISOString()
60
+ };
61
+ await fs.writeJson(this.configPath, config, { spaces: 2 });
62
+ return config;
63
+ }
64
+ async update(updates) {
65
+ const config = await this.read();
66
+ if (!config) {
67
+ throw new Error('Config file not found. Run ai-devkit init first.');
68
+ }
69
+ const updated = {
70
+ ...config,
71
+ ...updates,
72
+ updatedAt: new Date().toISOString()
73
+ };
74
+ await fs.writeJson(this.configPath, updated, { spaces: 2 });
75
+ return updated;
76
+ }
77
+ async addPhase(phase) {
78
+ const config = await this.read();
79
+ if (!config) {
80
+ throw new Error('Config file not found. Run ai-devkit init first.');
81
+ }
82
+ if (!config.initializedPhases.includes(phase)) {
83
+ config.initializedPhases.push(phase);
84
+ return this.update({ initializedPhases: config.initializedPhases });
85
+ }
86
+ return config;
87
+ }
88
+ async hasPhase(phase) {
89
+ const config = await this.read();
90
+ return config ? config.initializedPhases.includes(phase) : false;
91
+ }
92
+ }
93
+ exports.ConfigManager = ConfigManager;
94
+ //# sourceMappingURL=Config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/lib/Config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,2CAA6B;AAG7B,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAE3C,MAAa,aAAa;IAGxB,YAAY,YAAoB,OAAO,CAAC,GAAG,EAAE;QAC3C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,IAAI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AAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9C,MAAM,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACrC,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC;QACtE,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,KAAY;QACzB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACnE,CAAC;CACF;AAjED,sCAiEC"}
@@ -0,0 +1,13 @@
1
+ import { Phase, Environment } from '../types';
2
+ export declare class TemplateManager {
3
+ private templatesDir;
4
+ private targetDir;
5
+ constructor(targetDir?: string);
6
+ copyPhaseTemplate(phase: Phase): Promise<string>;
7
+ copyEnvironmentTemplates(environment: Environment): Promise<string[]>;
8
+ private copyCursorTemplates;
9
+ private copyClaudeTemplates;
10
+ fileExists(phase: Phase): Promise<boolean>;
11
+ environmentFilesExist(environment: Environment): Promise<boolean>;
12
+ }
13
+ //# sourceMappingURL=TemplateManager.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.TemplateManager = void 0;
37
+ const fs = __importStar(require("fs-extra"));
38
+ const path = __importStar(require("path"));
39
+ class TemplateManager {
40
+ constructor(targetDir = process.cwd()) {
41
+ // Templates are in the package directory, not the target directory
42
+ this.templatesDir = path.join(__dirname, '../../templates');
43
+ this.targetDir = targetDir;
44
+ }
45
+ async copyPhaseTemplate(phase) {
46
+ const sourceFile = path.join(this.templatesDir, 'phases', `${phase}.md`);
47
+ const targetDir = path.join(this.targetDir, 'docs', 'ai', phase);
48
+ const targetFile = path.join(targetDir, 'README.md');
49
+ await fs.ensureDir(targetDir);
50
+ await fs.copy(sourceFile, targetFile);
51
+ return targetFile;
52
+ }
53
+ async copyEnvironmentTemplates(environment) {
54
+ const copiedFiles = [];
55
+ if (environment === 'cursor' || environment === 'both') {
56
+ const cursorFiles = await this.copyCursorTemplates();
57
+ copiedFiles.push(...cursorFiles);
58
+ }
59
+ if (environment === 'claude' || environment === 'both') {
60
+ const claudeFiles = await this.copyClaudeTemplates();
61
+ copiedFiles.push(...claudeFiles);
62
+ }
63
+ return copiedFiles;
64
+ }
65
+ async copyCursorTemplates() {
66
+ const files = [];
67
+ // Copy rules to .cursor/rules directory (new format, .cursorrules is deprecated)
68
+ const rulesSourceDir = path.join(this.templatesDir, 'env', 'cursor', 'rules');
69
+ const rulesTargetDir = path.join(this.targetDir, '.cursor', 'rules');
70
+ await fs.ensureDir(rulesTargetDir);
71
+ await fs.copy(rulesSourceDir, rulesTargetDir);
72
+ // List all rule files for feedback
73
+ const ruleFiles = await fs.readdir(rulesSourceDir);
74
+ ruleFiles.forEach(file => {
75
+ files.push(path.join(rulesTargetDir, file));
76
+ });
77
+ // Copy slash commands to .cursor/commands directory
78
+ const commandsSourceDir = path.join(this.templatesDir, 'env', 'cursor', 'commands');
79
+ const commandsTargetDir = path.join(this.targetDir, '.cursor', 'commands');
80
+ await fs.ensureDir(commandsTargetDir);
81
+ await fs.copy(commandsSourceDir, commandsTargetDir);
82
+ // List all command files for feedback
83
+ const commandFiles = await fs.readdir(commandsSourceDir);
84
+ commandFiles.forEach(file => {
85
+ files.push(path.join(commandsTargetDir, file));
86
+ });
87
+ return files;
88
+ }
89
+ async copyClaudeTemplates() {
90
+ const files = [];
91
+ // Copy Claude workspace config
92
+ 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);
96
+ await fs.copy(workspaceSource, workspaceTarget);
97
+ files.push(workspaceTarget);
98
+ // Copy Claude commands
99
+ const commandsSourceDir = path.join(this.templatesDir, 'env', 'claude', 'commands');
100
+ const commandsTargetDir = path.join(this.targetDir, '.claude', 'commands');
101
+ await fs.ensureDir(commandsTargetDir);
102
+ await fs.copy(commandsSourceDir, commandsTargetDir);
103
+ // List all command files for feedback
104
+ const commandFiles = await fs.readdir(commandsSourceDir);
105
+ commandFiles.forEach(file => {
106
+ files.push(path.join(commandsTargetDir, file));
107
+ });
108
+ return files;
109
+ }
110
+ async fileExists(phase) {
111
+ const targetFile = path.join(this.targetDir, 'docs', 'ai', phase, 'README.md');
112
+ return fs.pathExists(targetFile);
113
+ }
114
+ async environmentFilesExist(environment) {
115
+ if (environment === 'cursor' || environment === 'both') {
116
+ const rulesExists = await fs.pathExists(path.join(this.targetDir, '.cursor', 'rules'));
117
+ if (rulesExists)
118
+ return true;
119
+ }
120
+ if (environment === 'claude' || environment === 'both') {
121
+ const workspaceExists = await fs.pathExists(path.join(this.targetDir, '.claude', 'CLAUDE.md'));
122
+ if (workspaceExists)
123
+ return true;
124
+ }
125
+ return false;
126
+ }
127
+ }
128
+ exports.TemplateManager = TemplateManager;
129
+ //# sourceMappingURL=TemplateManager.js.map
@@ -0,0 +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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,CAAC,UAAU,CAAC,KAAY;QAC3B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QAC/E,OAAO,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,WAAwB;QAClD,IAAI,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;YACvF,IAAI,WAAW;gBAAE,OAAO,IAAI,CAAC;QAC/B,CAAC;QAED,IAAI,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;YACvD,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;AA/GD,0CA+GC"}
@@ -0,0 +1,17 @@
1
+ export type Phase = 'requirements' | 'design' | 'planning' | 'implementation' | 'testing' | 'deployment' | 'monitoring';
2
+ export type Environment = 'cursor' | 'claude' | 'both';
3
+ export interface DevKitConfig {
4
+ version: string;
5
+ environment?: Environment;
6
+ initializedPhases: Phase[];
7
+ createdAt: string;
8
+ updatedAt: string;
9
+ }
10
+ export interface PhaseMetadata {
11
+ phase: string;
12
+ title: string;
13
+ description: string;
14
+ }
15
+ export declare const AVAILABLE_PHASES: Phase[];
16
+ export declare const PHASE_DISPLAY_NAMES: Record<Phase, string>;
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GACb,cAAc,GACd,QAAQ,GACR,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEvD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,EAAE,KAAK,EAAE,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,EAQnC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAQrD,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PHASE_DISPLAY_NAMES = exports.AVAILABLE_PHASES = void 0;
4
+ exports.AVAILABLE_PHASES = [
5
+ 'requirements',
6
+ 'design',
7
+ 'planning',
8
+ 'implementation',
9
+ 'testing',
10
+ 'deployment',
11
+ 'monitoring'
12
+ ];
13
+ exports.PHASE_DISPLAY_NAMES = {
14
+ requirements: 'Requirements & Problem Understanding',
15
+ design: 'System Design & Architecture',
16
+ planning: 'Project Planning & Task Breakdown',
17
+ implementation: 'Implementation Guide',
18
+ testing: 'Testing Strategy',
19
+ deployment: 'Deployment Strategy',
20
+ monitoring: 'Monitoring & Observability'
21
+ };
22
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAyBa,QAAA,gBAAgB,GAAY;IACvC,cAAc;IACd,QAAQ;IACR,UAAU;IACV,gBAAgB;IAChB,SAAS;IACT,YAAY;IACZ,YAAY;CACb,CAAC;AAEW,QAAA,mBAAmB,GAA0B;IACxD,YAAY,EAAE,sCAAsC;IACpD,MAAM,EAAE,8BAA8B;IACtC,QAAQ,EAAE,mCAAmC;IAC7C,cAAc,EAAE,sBAAsB;IACtC,OAAO,EAAE,kBAAkB;IAC3B,UAAU,EAAE,qBAAqB;IACjC,UAAU,EAAE,4BAA4B;CACzC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "ai-devkit",
3
+ "version": "0.2.0",
4
+ "description": "A CLI toolkit for AI-assisted software development with phase templates and environment setup",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "ai-devkit": "dist/cli.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "dev": "ts-node src/cli.ts",
12
+ "lint": "eslint src --ext .ts",
13
+ "prepublishOnly": "npm run build"
14
+ },
15
+ "keywords": [
16
+ "ai",
17
+ "development",
18
+ "cli",
19
+ "templates",
20
+ "cursor",
21
+ "claude"
22
+ ],
23
+ "author": "",
24
+ "license": "MIT",
25
+ "dependencies": {
26
+ "commander": "^11.1.0",
27
+ "inquirer": "^8.2.6",
28
+ "fs-extra": "^11.2.0",
29
+ "yaml": "^2.3.4",
30
+ "chalk": "^4.1.2"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^20.11.5",
34
+ "@types/inquirer": "^8.2.10",
35
+ "@types/fs-extra": "^11.0.4",
36
+ "ts-node": "^10.9.2",
37
+ "typescript": "^5.3.3",
38
+ "eslint": "^8.56.0",
39
+ "@typescript-eslint/eslint-plugin": "^6.19.1",
40
+ "@typescript-eslint/parser": "^6.19.1"
41
+ },
42
+ "engines": {
43
+ "node": ">=16.0.0"
44
+ }
45
+ }
46
+
@@ -0,0 +1,52 @@
1
+ # Claude Code Workspace Configuration
2
+
3
+ ## Project Context
4
+ This project uses ai-devkit for structured AI-assisted development. Phase documentation is located in `docs/ai/`.
5
+
6
+ ## Documentation Structure
7
+ - `docs/ai/requirements/` - Problem understanding and requirements
8
+ - `docs/ai/design/` - System architecture and design decisions (include mermaid diagrams)
9
+ - `docs/ai/planning/` - Task breakdown and project planning
10
+ - `docs/ai/implementation/` - Implementation guides and notes
11
+ - `docs/ai/testing/` - Testing strategy and test cases
12
+ - `docs/ai/deployment/` - Deployment and infrastructure docs
13
+ - `docs/ai/monitoring/` - Monitoring and observability setup
14
+
15
+ ## Code Style & Standards
16
+ - Follow the project's established code style and conventions
17
+ - Write clear, self-documenting code with meaningful variable names
18
+ - Add comments for complex logic or non-obvious decisions
19
+
20
+ ## Development Workflow
21
+ - Review phase documentation in `docs/ai/` before implementing features
22
+ - Copy the base template (`docs/ai/<phase>/README.md`) before creating feature-specific files
23
+ - Keep requirements, design, and implementation docs updated as the project evolves
24
+ - Reference the planning doc for task breakdown and priorities
25
+ - Copy the testing template before writing feature-specific test plans
26
+
27
+ ## AI Interaction Guidelines
28
+ - When implementing features, first check relevant phase documentation
29
+ - For new features, start with requirements clarification
30
+ - Update phase docs when significant changes or decisions are made
31
+
32
+ ## Testing & Quality
33
+ - Write tests alongside implementation
34
+ - Follow the testing strategy defined in `docs/ai/testing/`
35
+ - Use the `writing-test` command to generate unit/integration tests targeting 100% coverage
36
+ - Ensure code passes all tests before considering it complete
37
+
38
+ ## Documentation
39
+ - Update phase documentation when requirements or design changes
40
+ - Keep inline code comments focused and relevant
41
+ - Document architectural decisions and their rationale
42
+ - Use mermaid diagrams for any architectural or data-flow visuals (update existing diagrams if needed)
43
+ - Record coverage results and outstanding gaps in `docs/ai/testing/`
44
+
45
+ ## Key Commands
46
+ When working on this project, you can run commands to:
47
+ - Understand project requirements and goals (`review-requirements`)
48
+ - Review architectural decisions (`review-design`)
49
+ - Plan and execute tasks (`execute-plan`)
50
+ - Verify implementation against design (`check-implementation`)
51
+ - Suggest missing tests (`suggest-tests`)
52
+ - Perform structured code reviews (`code-review`)
@@ -0,0 +1,21 @@
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
+
@@ -0,0 +1,81 @@
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.