ai-devkit 0.17.0 → 0.19.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.
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/agent.js +13 -1
- package/dist/commands/agent.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +15 -4
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/lint.d.ts.map +1 -1
- package/dist/commands/lint.js +4 -1
- package/dist/commands/lint.js.map +1 -1
- package/dist/commands/phase.d.ts.map +1 -1
- package/dist/commands/phase.js +2 -1
- package/dist/commands/phase.js.map +1 -1
- package/dist/lib/Config.d.ts +2 -0
- package/dist/lib/Config.d.ts.map +1 -1
- package/dist/lib/Config.js +12 -0
- package/dist/lib/Config.js.map +1 -1
- package/dist/lib/InitTemplate.d.ts +3 -0
- package/dist/lib/InitTemplate.d.ts.map +1 -1
- package/dist/lib/InitTemplate.js +13 -1
- package/dist/lib/InitTemplate.js.map +1 -1
- package/dist/lib/SkillManager.d.ts.map +1 -1
- package/dist/lib/SkillManager.js +8 -11
- package/dist/lib/SkillManager.js.map +1 -1
- package/dist/lib/TemplateManager.d.ts +7 -1
- package/dist/lib/TemplateManager.d.ts.map +1 -1
- package/dist/lib/TemplateManager.js +17 -7
- package/dist/lib/TemplateManager.js.map +1 -1
- package/dist/services/install/install.service.d.ts.map +1 -1
- package/dist/services/install/install.service.js +2 -1
- package/dist/services/install/install.service.js.map +1 -1
- package/dist/services/lint/constants.d.ts +0 -1
- package/dist/services/lint/constants.d.ts.map +1 -1
- package/dist/services/lint/constants.js +1 -2
- package/dist/services/lint/constants.js.map +1 -1
- package/dist/services/lint/lint.service.d.ts +1 -1
- package/dist/services/lint/lint.service.d.ts.map +1 -1
- package/dist/services/lint/lint.service.js +6 -5
- package/dist/services/lint/lint.service.js.map +1 -1
- package/dist/services/lint/rules/base-docs.rule.d.ts +1 -1
- package/dist/services/lint/rules/base-docs.rule.d.ts.map +1 -1
- package/dist/services/lint/rules/base-docs.rule.js +2 -2
- package/dist/services/lint/rules/base-docs.rule.js.map +1 -1
- package/dist/services/lint/rules/feature-docs.rule.d.ts +1 -1
- package/dist/services/lint/rules/feature-docs.rule.d.ts.map +1 -1
- package/dist/services/lint/rules/feature-docs.rule.js +2 -2
- package/dist/services/lint/rules/feature-docs.rule.js.map +1 -1
- package/dist/templates/commands/capture-knowledge.md +1 -1
- package/dist/templates/commands/check-implementation.md +1 -1
- package/dist/templates/commands/code-review.md +1 -1
- package/dist/templates/commands/execute-plan.md +2 -2
- package/dist/templates/commands/new-requirement.md +8 -8
- package/dist/templates/commands/review-design.md +5 -2
- package/dist/templates/commands/review-requirements.md +5 -2
- package/dist/templates/commands/update-planning.md +1 -1
- package/dist/templates/commands/writing-test.md +3 -3
- package/dist/templates/templates/commands/capture-knowledge.md +1 -1
- package/dist/templates/templates/commands/check-implementation.md +1 -1
- package/dist/templates/templates/commands/code-review.md +1 -1
- package/dist/templates/templates/commands/execute-plan.md +2 -2
- package/dist/templates/templates/commands/new-requirement.md +8 -8
- package/dist/templates/templates/commands/review-design.md +5 -2
- package/dist/templates/templates/commands/review-requirements.md +5 -2
- package/dist/templates/templates/commands/update-planning.md +1 -1
- package/dist/templates/templates/commands/writing-test.md +3 -3
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -1
- package/dist/types.js.map +1 -1
- package/dist/util/config.d.ts.map +1 -1
- package/dist/util/config.js +3 -0
- package/dist/util/config.js.map +1 -1
- package/package.json +3 -3
- package/templates/commands/capture-knowledge.md +1 -1
- package/templates/commands/check-implementation.md +1 -1
- package/templates/commands/code-review.md +1 -1
- package/templates/commands/execute-plan.md +2 -2
- package/templates/commands/new-requirement.md +8 -8
- package/templates/commands/review-design.md +5 -2
- package/templates/commands/review-requirements.md +5 -2
- package/templates/commands/update-planning.md +1 -1
- package/templates/commands/writing-test.md +3 -3
- package/dist/util/file.d.ts +0 -52
- package/dist/util/file.d.ts.map +0 -1
- package/dist/util/file.js +0 -135
- package/dist/util/file.js.map +0 -1
- package/dist/util/process.d.ts +0 -61
- package/dist/util/process.d.ts.map +0 -1
- package/dist/util/process.js +0 -166
- package/dist/util/process.js.map +0 -1
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Phase, EnvironmentCode } from "../types";
|
|
2
|
+
export interface TemplateManagerOptions {
|
|
3
|
+
targetDir?: string;
|
|
4
|
+
docsDir?: string;
|
|
5
|
+
}
|
|
2
6
|
export declare class TemplateManager {
|
|
3
7
|
private templatesDir;
|
|
4
8
|
private targetDir;
|
|
5
|
-
|
|
9
|
+
private docsDir;
|
|
10
|
+
constructor(options?: TemplateManagerOptions);
|
|
6
11
|
copyPhaseTemplate(phase: Phase): Promise<string>;
|
|
7
12
|
fileExists(phase: Phase): Promise<boolean>;
|
|
8
13
|
setupMultipleEnvironments(environmentIds: EnvironmentCode[]): Promise<string[]>;
|
|
@@ -16,6 +21,7 @@ export declare class TemplateManager {
|
|
|
16
21
|
* Uses triple quotes for multi-line strings.
|
|
17
22
|
*/
|
|
18
23
|
private generateTomlContent;
|
|
24
|
+
private replaceDocsDir;
|
|
19
25
|
/**
|
|
20
26
|
* Copy command templates to the global folder for a specific environment.
|
|
21
27
|
* Global folders are located in the user's home directory.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateManager.d.ts","sourceRoot":"","sources":["../../src/lib/TemplateManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"TemplateManager.d.ts","sourceRoot":"","sources":["../../src/lib/TemplateManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,eAAe,EAA2C,MAAM,UAAU,CAAC;AAG3F,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,GAAE,sBAA2B;IAM1C,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAWhD,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;IAU1C,yBAAyB,CAC7B,cAAc,EAAE,eAAe,EAAE,GAChC,OAAO,CAAC,MAAM,EAAE,CAAC;IAsBd,sBAAsB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;YAaxD,sBAAsB;YA4BtB,YAAY;YAoCZ,uBAAuB;YAoBvB,uBAAuB;IA+BrC;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,cAAc;IAItB;;;OAGG;IACG,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAoCvE;;OAEG;IACG,wBAAwB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;CAgB3E"}
|
|
@@ -41,22 +41,24 @@ const fs = __importStar(require("fs-extra"));
|
|
|
41
41
|
const path = __importStar(require("path"));
|
|
42
42
|
const os = __importStar(require("os"));
|
|
43
43
|
const gray_matter_1 = __importDefault(require("gray-matter"));
|
|
44
|
+
const types_1 = require("../types");
|
|
44
45
|
const env_1 = require("../util/env");
|
|
45
46
|
class TemplateManager {
|
|
46
|
-
constructor(
|
|
47
|
+
constructor(options = {}) {
|
|
47
48
|
this.templatesDir = path.join(__dirname, "../../templates");
|
|
48
|
-
this.targetDir = targetDir;
|
|
49
|
+
this.targetDir = options.targetDir ?? process.cwd();
|
|
50
|
+
this.docsDir = options.docsDir ?? types_1.DEFAULT_DOCS_DIR;
|
|
49
51
|
}
|
|
50
52
|
async copyPhaseTemplate(phase) {
|
|
51
53
|
const sourceFile = path.join(this.templatesDir, "phases", `${phase}.md`);
|
|
52
|
-
const targetDir = path.join(this.targetDir,
|
|
54
|
+
const targetDir = path.join(this.targetDir, this.docsDir, phase);
|
|
53
55
|
const targetFile = path.join(targetDir, "README.md");
|
|
54
56
|
await fs.ensureDir(targetDir);
|
|
55
57
|
await fs.copy(sourceFile, targetFile);
|
|
56
58
|
return targetFile;
|
|
57
59
|
}
|
|
58
60
|
async fileExists(phase) {
|
|
59
|
-
const targetFile = path.join(this.targetDir,
|
|
61
|
+
const targetFile = path.join(this.targetDir, this.docsDir, phase, "README.md");
|
|
60
62
|
return fs.pathExists(targetFile);
|
|
61
63
|
}
|
|
62
64
|
async setupMultipleEnvironments(environmentIds) {
|
|
@@ -121,7 +123,9 @@ class TemplateManager {
|
|
|
121
123
|
.filter((file) => file.endsWith(".md"))
|
|
122
124
|
.map(async (file) => {
|
|
123
125
|
const targetFile = file.replace('.md', commandExtension);
|
|
124
|
-
await fs.
|
|
126
|
+
const content = await fs.readFile(path.join(commandsSourceDir, file), "utf-8");
|
|
127
|
+
const replaced = this.replaceDocsDir(content);
|
|
128
|
+
await fs.writeFile(path.join(commandsTargetDir, targetFile), replaced);
|
|
125
129
|
copiedFiles.push(path.join(commandsTargetDir, targetFile));
|
|
126
130
|
}));
|
|
127
131
|
}
|
|
@@ -149,7 +153,8 @@ class TemplateManager {
|
|
|
149
153
|
.filter((file) => file.endsWith(".md"))
|
|
150
154
|
.map(async (file) => {
|
|
151
155
|
const mdContent = await fs.readFile(path.join(this.templatesDir, "commands", file), "utf-8");
|
|
152
|
-
const
|
|
156
|
+
const replaced = this.replaceDocsDir(mdContent);
|
|
157
|
+
const { data, content } = (0, gray_matter_1.default)(replaced);
|
|
153
158
|
const description = data.description || "";
|
|
154
159
|
const tomlContent = this.generateTomlContent(description, content.trim());
|
|
155
160
|
const tomlFile = file.replace(".md", ".toml");
|
|
@@ -169,6 +174,9 @@ class TemplateManager {
|
|
|
169
174
|
prompt='''${escapedPrompt}'''
|
|
170
175
|
`;
|
|
171
176
|
}
|
|
177
|
+
replaceDocsDir(content) {
|
|
178
|
+
return content.split('{{docsDir}}').join(this.docsDir);
|
|
179
|
+
}
|
|
172
180
|
/**
|
|
173
181
|
* Copy command templates to the global folder for a specific environment.
|
|
174
182
|
* Global folders are located in the user's home directory.
|
|
@@ -190,7 +198,9 @@ prompt='''${escapedPrompt}'''
|
|
|
190
198
|
continue;
|
|
191
199
|
const sourceFile = path.join(commandsSourceDir, file);
|
|
192
200
|
const targetFile = path.join(globalTargetDir, file);
|
|
193
|
-
await fs.
|
|
201
|
+
const content = await fs.readFile(sourceFile, "utf-8");
|
|
202
|
+
const replaced = this.replaceDocsDir(content);
|
|
203
|
+
await fs.writeFile(targetFile, replaced);
|
|
194
204
|
copiedFiles.push(targetFile);
|
|
195
205
|
}
|
|
196
206
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateManager.js","sourceRoot":"","sources":["../../src/lib/TemplateManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,2CAA6B;AAC7B,uCAAyB;AACzB,8DAAiC;
|
|
1
|
+
{"version":3,"file":"TemplateManager.js","sourceRoot":"","sources":["../../src/lib/TemplateManager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,2CAA6B;AAC7B,uCAAyB;AACzB,8DAAiC;AACjC,oCAA2F;AAC3F,qCAA6C;AAO7C,MAAa,eAAe;IAK1B,YAAY,UAAkC,EAAE;QAC9C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAC5D,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,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ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,oBAAoB,CAAC;IACnC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"install.service.d.ts","sourceRoot":"","sources":["../../../src/services/install/install.service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,oBAAoB;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,oBAAoB,CAAC;IACnC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,aAAa,CAAC,CAyFxB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE,iBAAsB,GAAG,MAAM,CASjG"}
|
|
@@ -12,7 +12,8 @@ const SkillManager_1 = require("../../lib/SkillManager");
|
|
|
12
12
|
const TemplateManager_1 = require("../../lib/TemplateManager");
|
|
13
13
|
async function reconcileAndInstall(config, options = {}) {
|
|
14
14
|
const configManager = new Config_1.ConfigManager();
|
|
15
|
-
const
|
|
15
|
+
const docsDir = await configManager.getDocsDir();
|
|
16
|
+
const templateManager = new TemplateManager_1.TemplateManager({ docsDir });
|
|
16
17
|
const skillManager = new SkillManager_1.SkillManager(configManager, new EnvironmentSelector_1.EnvironmentSelector());
|
|
17
18
|
const report = {
|
|
18
19
|
environments: { installed: 0, skipped: 0, failed: 0 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.service.js","sourceRoot":"","sources":["../../../src/services/install/install.service.ts"],"names":[],"mappings":";;;;;AAwBA,
|
|
1
|
+
{"version":3,"file":"install.service.js","sourceRoot":"","sources":["../../../src/services/install/install.service.ts"],"names":[],"mappings":";;;;;AAwBA,kDA4FC;AAED,gDASC;AA/HD,wDAAgC;AAChC,6CAAiD;AACjD,uEAAoE;AACpE,yDAAsD;AACtD,+DAA4D;AAoBrD,KAAK,UAAU,mBAAmB,CACvC,MAAyB,EACzB,UAA6B,EAAE;IAE/B,MAAM,aAAa,GAAG,IAAI,sBAAa,EAAE,CAAC;IAC1C,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,UAAU,EAAE,CAAC;IACjD,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,IAAI,2BAAY,CAAC,aAAa,EAAE,IAAI,yCAAmB,EAAE,CAAC,CAAC;IAEhF,MAAM,MAAM,GAAkB;QAC5B,YAAY,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QACrD,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM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5C,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,KAAK,UAAU,sBAAsB,CACnC,OAA0B,EAC1B,YAAqB;IAErB,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,kBAAQ,CAAC,MAAM,CAAC;QACnC;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,wDAAwD;YACjE,OAAO,EAAE,KAAK;SACf;KACF,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/services/lint/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/services/lint/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,8EAA+E,CAAC;AAC7G,eAAO,MAAM,oBAAoB,QAA+B,CAAC;AAEjE,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LINT_STATUS_LABEL = exports.LINT_LEVEL = exports.FEATURE_NAME_PATTERN = exports.LIFECYCLE_PHASES =
|
|
4
|
-
exports.DOCS_DIR = 'docs/ai';
|
|
3
|
+
exports.LINT_STATUS_LABEL = exports.LINT_LEVEL = exports.FEATURE_NAME_PATTERN = exports.LIFECYCLE_PHASES = void 0;
|
|
5
4
|
exports.LIFECYCLE_PHASES = ['requirements', 'design', 'planning', 'implementation', 'testing'];
|
|
6
5
|
exports.FEATURE_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
7
6
|
exports.LINT_LEVEL = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/lint/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/lint/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,CAAC,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,SAAS,CAAU,CAAC;AAChG,QAAA,oBAAoB,GAAG,4BAA4B,CAAC;AAEpD,QAAA,UAAU,GAAG;IACxB,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;CACJ,CAAC;AAEE,QAAA,iBAAiB,GAAG;IAC/B,CAAC,kBAAU,CAAC,EAAE,CAAC,EAAE,SAAS;IAC1B,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,SAAS;IAC5B,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,SAAS;CACpB,CAAC"}
|
|
@@ -2,5 +2,5 @@ import { normalizeFeatureName } from './rules/feature-name.rule';
|
|
|
2
2
|
import { LintDependencies, LintOptions, LintReport } from './types';
|
|
3
3
|
export { normalizeFeatureName };
|
|
4
4
|
export type { LintOptions, LintLevel, LintCheckResult, LintReport, LintDependencies } from './types';
|
|
5
|
-
export declare function runLintChecks(options: LintOptions, dependencies?: Partial<LintDependencies>): LintReport;
|
|
5
|
+
export declare function runLintChecks(options: LintOptions, docsDir?: string, dependencies?: Partial<LintDependencies>): LintReport;
|
|
6
6
|
//# sourceMappingURL=lint.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.service.d.ts","sourceRoot":"","sources":["../../../src/services/lint/lint.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lint.service.d.ts","sourceRoot":"","sources":["../../../src/services/lint/lint.service.ts"],"names":[],"mappings":"AAMA,OAAO,EAA2B,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,OAAO,EAAkC,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AASpG,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAErG,wBAAgB,aAAa,CAC3B,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,MAAyB,EAClC,YAAY,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAC3C,UAAU,CAgBZ"}
|
|
@@ -37,6 +37,7 @@ exports.normalizeFeatureName = void 0;
|
|
|
37
37
|
exports.runLintChecks = runLintChecks;
|
|
38
38
|
const fs = __importStar(require("fs"));
|
|
39
39
|
const child_process_1 = require("child_process");
|
|
40
|
+
const types_1 = require("../../types");
|
|
40
41
|
const constants_1 = require("./constants");
|
|
41
42
|
const base_docs_rule_1 = require("./rules/base-docs.rule");
|
|
42
43
|
const feature_docs_rule_1 = require("./rules/feature-docs.rule");
|
|
@@ -48,26 +49,26 @@ const defaultDependencies = {
|
|
|
48
49
|
existsSync: (targetPath) => fs.existsSync(targetPath),
|
|
49
50
|
execFileSync: (file, args, options) => (0, child_process_1.execFileSync)(file, args, options)
|
|
50
51
|
};
|
|
51
|
-
function runLintChecks(options, dependencies = {}) {
|
|
52
|
+
function runLintChecks(options, docsDir = types_1.DEFAULT_DOCS_DIR, dependencies = {}) {
|
|
52
53
|
const deps = {
|
|
53
54
|
...defaultDependencies,
|
|
54
55
|
...dependencies
|
|
55
56
|
};
|
|
56
57
|
const cwd = deps.cwd();
|
|
57
58
|
const checks = [];
|
|
58
|
-
checks.push(...(0, base_docs_rule_1.runBaseDocsRules)(cwd, deps));
|
|
59
|
+
checks.push(...(0, base_docs_rule_1.runBaseDocsRules)(cwd, docsDir, deps));
|
|
59
60
|
if (!options.feature) {
|
|
60
61
|
return finalizeReport(cwd, checks);
|
|
61
62
|
}
|
|
62
|
-
return runFeatureChecks(cwd, checks, options.feature, deps);
|
|
63
|
+
return runFeatureChecks(cwd, docsDir, checks, options.feature, deps);
|
|
63
64
|
}
|
|
64
|
-
function runFeatureChecks(cwd, checks, rawFeature, deps) {
|
|
65
|
+
function runFeatureChecks(cwd, docsDir, checks, rawFeature, deps) {
|
|
65
66
|
const featureValidation = (0, feature_name_rule_1.validateFeatureNameRule)(rawFeature);
|
|
66
67
|
if (featureValidation.check) {
|
|
67
68
|
checks.push(featureValidation.check);
|
|
68
69
|
return finalizeReport(cwd, checks, featureValidation.target);
|
|
69
70
|
}
|
|
70
|
-
checks.push(...(0, feature_docs_rule_1.runFeatureDocsRules)(cwd, featureValidation.target.normalizedName, deps));
|
|
71
|
+
checks.push(...(0, feature_docs_rule_1.runFeatureDocsRules)(cwd, docsDir, featureValidation.target.normalizedName, deps));
|
|
71
72
|
checks.push(...(0, git_worktree_rule_1.runGitWorktreeRules)(cwd, featureValidation.target.branchName, deps));
|
|
72
73
|
return finalizeReport(cwd, checks, featureValidation.target);
|
|
73
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.service.js","sourceRoot":"","sources":["../../../src/services/lint/lint.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"lint.service.js","sourceRoot":"","sources":["../../../src/services/lint/lint.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,sCAoBC;AAxCD,uCAAyB;AACzB,iDAA6C;AAC7C,uCAA+C;AAC/C,2CAAyC;AACzC,2DAA0D;AAC1D,iEAAgE;AAChE,iEAA0F;AAWjF,q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C,CAAC;IAE5C,OAAO;QACL,GAAG;QACH,OAAO;QACP,MAAM;QACN,OAAO;QACP,IAAI;QACJ,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KACvB,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LintCheckResult, LintDependencies } from '../types';
|
|
2
|
-
export declare function runBaseDocsRules(cwd: string, deps: LintDependencies): LintCheckResult[];
|
|
2
|
+
export declare function runBaseDocsRules(cwd: string, docsDir: string, deps: LintDependencies): LintCheckResult[];
|
|
3
3
|
//# sourceMappingURL=base-docs.rule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-docs.rule.d.ts","sourceRoot":"","sources":["../../../../src/services/lint/rules/base-docs.rule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG7D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"base-docs.rule.d.ts","sourceRoot":"","sources":["../../../../src/services/lint/rules/base-docs.rule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG7D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,eAAe,EAAE,CAUxG"}
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runBaseDocsRules = runBaseDocsRules;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const phase_docs_rule_1 = require("./phase-docs.rule");
|
|
6
|
-
function runBaseDocsRules(cwd, deps) {
|
|
6
|
+
function runBaseDocsRules(cwd, docsDir, deps) {
|
|
7
7
|
return (0, phase_docs_rule_1.runPhaseDocRules)({
|
|
8
8
|
cwd,
|
|
9
9
|
phases: constants_1.LIFECYCLE_PHASES,
|
|
10
10
|
idPrefix: 'base',
|
|
11
11
|
category: 'base-docs',
|
|
12
|
-
filePathForPhase: (phase) => `${
|
|
12
|
+
filePathForPhase: (phase) => `${docsDir}/${phase}/README.md`,
|
|
13
13
|
missingFix: 'Run: npx ai-devkit@latest init',
|
|
14
14
|
deps
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-docs.rule.js","sourceRoot":"","sources":["../../../../src/services/lint/rules/base-docs.rule.ts"],"names":[],"mappings":";;AAIA,4CAUC;AAdD,
|
|
1
|
+
{"version":3,"file":"base-docs.rule.js","sourceRoot":"","sources":["../../../../src/services/lint/rules/base-docs.rule.ts"],"names":[],"mappings":";;AAIA,4CAUC;AAdD,4CAAgD;AAEhD,uDAAqD;AAErD,SAAgB,gBAAgB,CAAC,GAAW,EAAE,OAAe,EAAE,IAAsB;IACnF,OAAO,IAAA,kCAAgB,EAAC;QACtB,GAAG;QACH,MAAM,EAAE,4BAAgB;QACxB,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,WAAW;QACrB,gBAAgB,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,OAAO,IAAI,KAAK,YAAY;QACpE,UAAU,EAAE,gCAAgC;QAC5C,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { LintCheckResult, LintDependencies } from '../types';
|
|
2
|
-
export declare function runFeatureDocsRules(cwd: string, normalizedName: string, deps: LintDependencies): LintCheckResult[];
|
|
2
|
+
export declare function runFeatureDocsRules(cwd: string, docsDir: string, normalizedName: string, deps: LintDependencies): LintCheckResult[];
|
|
3
3
|
//# sourceMappingURL=feature-docs.rule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-docs.rule.d.ts","sourceRoot":"","sources":["../../../../src/services/lint/rules/feature-docs.rule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG7D,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,gBAAgB,GACrB,eAAe,EAAE,CASnB"}
|
|
1
|
+
{"version":3,"file":"feature-docs.rule.d.ts","sourceRoot":"","sources":["../../../../src/services/lint/rules/feature-docs.rule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG7D,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,gBAAgB,GACrB,eAAe,EAAE,CASnB"}
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runFeatureDocsRules = runFeatureDocsRules;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const phase_docs_rule_1 = require("./phase-docs.rule");
|
|
6
|
-
function runFeatureDocsRules(cwd, normalizedName, deps) {
|
|
6
|
+
function runFeatureDocsRules(cwd, docsDir, normalizedName, deps) {
|
|
7
7
|
return (0, phase_docs_rule_1.runPhaseDocRules)({
|
|
8
8
|
cwd,
|
|
9
9
|
phases: constants_1.LIFECYCLE_PHASES,
|
|
10
10
|
idPrefix: 'feature-doc',
|
|
11
11
|
category: 'feature-docs',
|
|
12
|
-
filePathForPhase: (phase) => `${
|
|
12
|
+
filePathForPhase: (phase) => `${docsDir}/${phase}/feature-${normalizedName}.md`,
|
|
13
13
|
deps
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-docs.rule.js","sourceRoot":"","sources":["../../../../src/services/lint/rules/feature-docs.rule.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"feature-docs.rule.js","sourceRoot":"","sources":["../../../../src/services/lint/rules/feature-docs.rule.ts"],"names":[],"mappings":";;AAIA,kDAcC;AAlBD,4CAAgD;AAEhD,uDAAqD;AAErD,SAAgB,mBAAmB,CACjC,GAAW,EACX,OAAe,EACf,cAAsB,EACtB,IAAsB;IAEtB,OAAO,IAAA,kCAAgB,EAAC;QACtB,GAAG;QACH,MAAM,EAAE,4BAAgB;QACxB,QAAQ,EAAE,aAAa;QACvB,QAAQ,EAAE,cAAc;QACxB,gBAAgB,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,GAAG,OAAO,IAAI,KAAK,YAAY,cAAc,KAAK;QACvF,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -9,6 +9,6 @@ Guide me through creating a structured understanding of a code entry point and s
|
|
|
9
9
|
3. **Collect Source Context** — Read the primary file/module and summarize purpose, exports, key patterns. For folders: list structure, highlight key modules. For functions/APIs: capture signature, parameters, return values, error handling. Extract essential snippets (avoid large dumps).
|
|
10
10
|
4. **Analyze Dependencies** — Build a dependency view up to depth 3, tracking visited nodes to avoid loops. Categorize: imports, function calls, services, external packages. Note external systems or generated code to exclude.
|
|
11
11
|
5. **Synthesize Explanation** — Draft overview (purpose, language, high-level behavior). Detail core logic, execution flow, key patterns. Highlight error handling, performance, security considerations. Identify potential improvements or risks.
|
|
12
|
-
6. **Create Documentation** — Normalize name to kebab-case (`calculateTotalPrice` → `calculate-total-price`). Create `
|
|
12
|
+
6. **Create Documentation** — Normalize name to kebab-case (`calculateTotalPrice` → `calculate-total-price`). Create `{{docsDir}}/implementation/knowledge-{name}.md` with sections: Overview, Implementation Details, Dependencies, Visual Diagrams, Additional Insights, Metadata, Next Steps. Include mermaid diagrams when they clarify flows or relationships. Add metadata (analysis date, depth, files touched).
|
|
13
13
|
7. **Store Reusable Knowledge** — If insights should persist across sessions, store them using `npx ai-devkit@latest memory store ...`.
|
|
14
14
|
8. **Review & Next Actions** — Summarize key insights and open questions. Suggest related areas for deeper dives, confirm file path, and suggest `/remember` for key long-lived rules.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Compare implementation with design and requirements docs to ensure alignment.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Compare the current implementation with the design in `
|
|
5
|
+
Compare the current implementation with the design in `{{docsDir}}/design/` and requirements in `{{docsDir}}/requirements/`.
|
|
6
6
|
|
|
7
7
|
1. If not already provided, ask for: feature/branch description, list of modified files, relevant design doc(s), and any known constraints or assumptions.
|
|
8
8
|
2. **Use Memory for Context** — Search memory for known constraints and prior decisions before assessing mismatches: `npx ai-devkit@latest memory search --query "<feature implementation alignment>"`.
|
|
@@ -4,7 +4,7 @@ description: Pre-push code review against design docs.
|
|
|
4
4
|
|
|
5
5
|
Perform a local code review **before** pushing changes.
|
|
6
6
|
|
|
7
|
-
1. **Gather Context** — If not already provided, ask for: feature/branch description, list of modified files, relevant design doc(s) (e.g., `
|
|
7
|
+
1. **Gather Context** — If not already provided, ask for: feature/branch description, list of modified files, relevant design doc(s) (e.g., `{{docsDir}}/design/feature-{name}.md`), known constraints or risky areas, and which tests have been run. Also review the latest diff via `git status` and `git diff --stat`.
|
|
8
8
|
2. **Use Memory for Context** — Search memory for project review standards and recurring pitfalls: `npx ai-devkit@latest memory search --query "code review checklist project conventions"`.
|
|
9
9
|
3. **Understand Design Alignment** — For each design doc, summarize architectural intent and critical constraints.
|
|
10
10
|
4. **File-by-File Review** — For every modified file: check alignment with design/requirements and flag deviations, spot logic issues/edge cases/redundant code, flag security concerns (input validation, secrets, auth, data handling), check error handling/performance/observability, and identify missing or outdated tests.
|
|
@@ -4,11 +4,11 @@ description: Execute a feature plan task by task.
|
|
|
4
4
|
|
|
5
5
|
Help me work through a feature plan one task at a time.
|
|
6
6
|
|
|
7
|
-
1. **Gather Context** — If not already provided, ask for: feature name (kebab-case, e.g., `user-authentication`), brief feature/branch description, planning doc path (default `
|
|
7
|
+
1. **Gather Context** — If not already provided, ask for: feature name (kebab-case, e.g., `user-authentication`), brief feature/branch description, planning doc path (default `{{docsDir}}/planning/feature-{name}.md`), and any supporting docs (design, requirements, implementation).
|
|
8
8
|
2. **Use Memory for Context** — Search for prior implementation notes/patterns before starting: `npx ai-devkit@latest memory search --query "<feature implementation plan>"`.
|
|
9
9
|
3. **Load & Present Plan** — Read the planning doc and parse task lists (headings + checkboxes). Present an ordered task queue grouped by section, with status: `todo`, `in-progress`, `done`, `blocked`.
|
|
10
10
|
4. **Interactive Task Execution** — For each task in order: display context and full bullet text, reference relevant design/requirements docs, offer to outline sub-steps before starting, prompt for status update (`done`, `in-progress`, `blocked`, `skipped`) with short notes after work, and if blocked record blocker and move to a "Blocked" list.
|
|
11
|
-
5. **Update Planning Doc** — After each completed or status-changed task, run `/update-planning` to keep `
|
|
11
|
+
5. **Update Planning Doc** — After each completed or status-changed task, run `/update-planning` to keep `{{docsDir}}/planning/feature-{name}.md` accurate.
|
|
12
12
|
6. **Store Reusable Knowledge** — Save reusable implementation guidance/decisions with `npx ai-devkit@latest memory store ...`.
|
|
13
13
|
7. **Session Summary** — Produce a summary: Completed, In Progress (with next steps), Blocked (with blockers), Skipped/Deferred, and New Tasks.
|
|
14
14
|
8. **Next Command Guidance** — Continue `/execute-plan` until plan completion; then run `/check-implementation`.
|
|
@@ -7,13 +7,13 @@ Guide me through adding a new feature, from requirements documentation to implem
|
|
|
7
7
|
1. **Capture Requirement** — If not already provided, ask for: feature name (kebab-case, e.g., `user-authentication`), what problem it solves and who will use it, and key user stories.
|
|
8
8
|
2. **Use Memory for Context** — Before asking repetitive clarification questions, search memory for related decisions or conventions via `npx ai-devkit@latest memory search --query "<feature/topic>"` and reuse relevant context.
|
|
9
9
|
3. **Create Feature Documentation Structure** — Copy each template's content (preserving YAML frontmatter and section headings) into feature-specific files:
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `
|
|
15
|
-
4. **Requirements Phase** — Fill out `
|
|
16
|
-
5. **Design Phase** — Fill out `
|
|
17
|
-
6. **Planning Phase** — Fill out `
|
|
10
|
+
- `{{docsDir}}/requirements/README.md` → `{{docsDir}}/requirements/feature-{name}.md`
|
|
11
|
+
- `{{docsDir}}/design/README.md` → `{{docsDir}}/design/feature-{name}.md`
|
|
12
|
+
- `{{docsDir}}/planning/README.md` → `{{docsDir}}/planning/feature-{name}.md`
|
|
13
|
+
- `{{docsDir}}/implementation/README.md` → `{{docsDir}}/implementation/feature-{name}.md`
|
|
14
|
+
- `{{docsDir}}/testing/README.md` → `{{docsDir}}/testing/feature-{name}.md`
|
|
15
|
+
4. **Requirements Phase** — Fill out `{{docsDir}}/requirements/feature-{name}.md`: problem statement, goals/non-goals, user stories, success criteria, constraints, open questions.
|
|
16
|
+
5. **Design Phase** — Fill out `{{docsDir}}/design/feature-{name}.md`: architecture changes, data models, API/interfaces, components, design decisions, security and performance considerations.
|
|
17
|
+
6. **Planning Phase** — Fill out `{{docsDir}}/planning/feature-{name}.md`: task breakdown with subtasks, dependencies, effort estimates, implementation order, risks.
|
|
18
18
|
7. **Store Reusable Knowledge** — When important conventions or decisions are finalized, store them via `npx ai-devkit@latest memory store --title "<title>" --content "<knowledge>" --tags "<tags>"`.
|
|
19
19
|
8. **Next Command Guidance** — Run `/review-requirements` first, then `/review-design`. If both pass, continue with `/execute-plan`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Review feature design for completeness.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Review the design documentation in `
|
|
5
|
+
Review the design documentation in `{{docsDir}}/design/feature-{name}.md` (and the project-level README if relevant).
|
|
6
6
|
|
|
7
7
|
1. **Use Memory for Context** — Search memory for prior architecture constraints/patterns: `npx ai-devkit@latest memory search --query "<feature design architecture>"`.
|
|
8
8
|
2. Summarize:
|
|
@@ -13,6 +13,9 @@ Review the design documentation in `docs/ai/design/feature-{name}.md` (and the p
|
|
|
13
13
|
- API/interface contracts (inputs, outputs, auth)
|
|
14
14
|
- Major design decisions and trade-offs
|
|
15
15
|
- Non-functional requirements that must be preserved
|
|
16
|
-
3.
|
|
16
|
+
3. **Clarify and explore (loop until converged)**:
|
|
17
|
+
- **Ask clarification questions** for every gap, inconsistency, or misalignment between requirements and design. Do not just list issues — actively ask specific questions to resolve them.
|
|
18
|
+
- **Brainstorm and explore options** — For key architecture decisions, trade-offs, or areas with multiple viable approaches, proactively brainstorm alternatives. Present options with pros/cons and trade-offs. Challenge assumptions and surface creative alternatives.
|
|
19
|
+
- **Repeat** — Continue looping until the user is satisfied with the chosen approach and no open questions remain.
|
|
17
20
|
4. **Store Reusable Knowledge** — Persist approved design patterns/constraints with `npx ai-devkit@latest memory store ...` when they will help future work.
|
|
18
21
|
5. **Next Command Guidance** — If requirements gaps are found, return to `/review-requirements`; if design is sound, continue to `/execute-plan`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Review feature requirements for completeness.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Review `
|
|
5
|
+
Review `{{docsDir}}/requirements/feature-{name}.md` and the project-level template `{{docsDir}}/requirements/README.md` to ensure structure and content alignment.
|
|
6
6
|
|
|
7
7
|
1. **Use Memory for Context** — Search memory for related requirements/domain decisions before starting: `npx ai-devkit@latest memory search --query "<feature requirements>"`.
|
|
8
8
|
2. Summarize:
|
|
@@ -11,6 +11,9 @@ Review `docs/ai/requirements/feature-{name}.md` and the project-level template `
|
|
|
11
11
|
- Primary user stories & critical flows
|
|
12
12
|
- Constraints, assumptions, open questions
|
|
13
13
|
- Any missing sections or deviations from the template
|
|
14
|
-
3.
|
|
14
|
+
3. **Clarify and explore (loop until converged)**:
|
|
15
|
+
- **Ask clarification questions** for every gap, contradiction, or ambiguity. Do not just list issues — actively ask specific questions to resolve them.
|
|
16
|
+
- **Brainstorm and explore options** — For key decisions, trade-offs, or areas with multiple viable approaches, proactively brainstorm alternatives. Present options with pros/cons and trade-offs. Challenge assumptions and surface creative alternatives.
|
|
17
|
+
- **Repeat** — Continue looping until the user is satisfied with the chosen approach and no open questions remain.
|
|
15
18
|
4. **Store Reusable Knowledge** — If new reusable requirement conventions are agreed, store them with `npx ai-devkit@latest memory store ...`.
|
|
16
19
|
5. **Next Command Guidance** — If fundamentals are missing, go back to `/new-requirement`; otherwise continue to `/review-design`.
|
|
@@ -4,7 +4,7 @@ description: Update planning docs to reflect implementation progress.
|
|
|
4
4
|
|
|
5
5
|
Help me reconcile current implementation progress with the planning documentation.
|
|
6
6
|
|
|
7
|
-
1. **Gather Context** — If not already provided, ask for: feature/branch name and brief status, tasks completed since last update, new tasks discovered, current blockers or risks, and planning doc path (default `
|
|
7
|
+
1. **Gather Context** — If not already provided, ask for: feature/branch name and brief status, tasks completed since last update, new tasks discovered, current blockers or risks, and planning doc path (default `{{docsDir}}/planning/feature-{name}.md`).
|
|
8
8
|
2. **Use Memory for Context** — Search memory for prior decisions that affect priorities/scope: `npx ai-devkit@latest memory search --query "<feature planning updates>"`.
|
|
9
9
|
3. **Review & Reconcile** — Summarize existing milestones, task breakdowns, and dependencies from the planning doc. For each planned task: mark status (done / in progress / blocked / not started), note scope changes, record blockers, identify skipped or added tasks.
|
|
10
10
|
4. **Produce Updated Task List** — Generate an updated checklist grouped by: Done, In Progress, Blocked, Newly Discovered Work — with short notes per task.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
description: Add tests for a new feature.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Review `
|
|
5
|
+
Review `{{docsDir}}/testing/feature-{name}.md` and ensure it mirrors the base template before writing tests.
|
|
6
6
|
|
|
7
7
|
1. **Gather Context** — If not already provided, ask for: feature name/branch, summary of changes (link to design & requirements docs), target environment, existing test suites, and any flaky/slow tests to avoid.
|
|
8
8
|
2. **Use Memory for Context** — Search memory for existing testing patterns and prior edge cases: `npx ai-devkit@latest memory search --query "<feature testing strategy>"`.
|
|
9
|
-
3. **Analyze Testing Template** — Identify required sections from `
|
|
9
|
+
3. **Analyze Testing Template** — Identify required sections from `{{docsDir}}/testing/feature-{name}.md`. Confirm success criteria and edge cases from requirements & design docs. Note available mocks/stubs/fixtures.
|
|
10
10
|
4. **Unit Tests (aim for 100% coverage)** — For each module/function: list behavior scenarios (happy path, edge cases, error handling), generate test cases with assertions using existing utilities/mocks, and highlight missing branches preventing full coverage.
|
|
11
11
|
5. **Integration Tests** — Identify critical cross-component flows. Define setup/teardown steps and test cases for interaction boundaries, data contracts, and failure modes.
|
|
12
12
|
6. **Coverage Strategy** — Recommend coverage tooling commands. Call out files/functions still needing coverage and suggest additional tests if <100%.
|
|
13
13
|
7. **Store Reusable Knowledge** — Save reusable testing patterns or tricky fixtures with `npx ai-devkit@latest memory store ...`.
|
|
14
|
-
8. **Update Documentation** — Summarize tests added or still missing. Update `
|
|
14
|
+
8. **Update Documentation** — Summarize tests added or still missing. Update `{{docsDir}}/testing/feature-{name}.md` with links to test files and results. Flag deferred tests as follow-up tasks.
|
|
15
15
|
9. **Next Command Guidance** — If tests expose design issues, return to `/review-design`; otherwise continue to `/code-review`.
|
|
@@ -9,6 +9,6 @@ Guide me through creating a structured understanding of a code entry point and s
|
|
|
9
9
|
3. **Collect Source Context** — Read the primary file/module and summarize purpose, exports, key patterns. For folders: list structure, highlight key modules. For functions/APIs: capture signature, parameters, return values, error handling. Extract essential snippets (avoid large dumps).
|
|
10
10
|
4. **Analyze Dependencies** — Build a dependency view up to depth 3, tracking visited nodes to avoid loops. Categorize: imports, function calls, services, external packages. Note external systems or generated code to exclude.
|
|
11
11
|
5. **Synthesize Explanation** — Draft overview (purpose, language, high-level behavior). Detail core logic, execution flow, key patterns. Highlight error handling, performance, security considerations. Identify potential improvements or risks.
|
|
12
|
-
6. **Create Documentation** — Normalize name to kebab-case (`calculateTotalPrice` → `calculate-total-price`). Create `
|
|
12
|
+
6. **Create Documentation** — Normalize name to kebab-case (`calculateTotalPrice` → `calculate-total-price`). Create `{{docsDir}}/implementation/knowledge-{name}.md` with sections: Overview, Implementation Details, Dependencies, Visual Diagrams, Additional Insights, Metadata, Next Steps. Include mermaid diagrams when they clarify flows or relationships. Add metadata (analysis date, depth, files touched).
|
|
13
13
|
7. **Store Reusable Knowledge** — If insights should persist across sessions, store them using `npx ai-devkit@latest memory store ...`.
|
|
14
14
|
8. **Review & Next Actions** — Summarize key insights and open questions. Suggest related areas for deeper dives, confirm file path, and suggest `/remember` for key long-lived rules.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Compare implementation with design and requirements docs to ensure alignment.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Compare the current implementation with the design in `
|
|
5
|
+
Compare the current implementation with the design in `{{docsDir}}/design/` and requirements in `{{docsDir}}/requirements/`.
|
|
6
6
|
|
|
7
7
|
1. If not already provided, ask for: feature/branch description, list of modified files, relevant design doc(s), and any known constraints or assumptions.
|
|
8
8
|
2. **Use Memory for Context** — Search memory for known constraints and prior decisions before assessing mismatches: `npx ai-devkit@latest memory search --query "<feature implementation alignment>"`.
|
|
@@ -4,7 +4,7 @@ description: Pre-push code review against design docs.
|
|
|
4
4
|
|
|
5
5
|
Perform a local code review **before** pushing changes.
|
|
6
6
|
|
|
7
|
-
1. **Gather Context** — If not already provided, ask for: feature/branch description, list of modified files, relevant design doc(s) (e.g., `
|
|
7
|
+
1. **Gather Context** — If not already provided, ask for: feature/branch description, list of modified files, relevant design doc(s) (e.g., `{{docsDir}}/design/feature-{name}.md`), known constraints or risky areas, and which tests have been run. Also review the latest diff via `git status` and `git diff --stat`.
|
|
8
8
|
2. **Use Memory for Context** — Search memory for project review standards and recurring pitfalls: `npx ai-devkit@latest memory search --query "code review checklist project conventions"`.
|
|
9
9
|
3. **Understand Design Alignment** — For each design doc, summarize architectural intent and critical constraints.
|
|
10
10
|
4. **File-by-File Review** — For every modified file: check alignment with design/requirements and flag deviations, spot logic issues/edge cases/redundant code, flag security concerns (input validation, secrets, auth, data handling), check error handling/performance/observability, and identify missing or outdated tests.
|
|
@@ -4,11 +4,11 @@ description: Execute a feature plan task by task.
|
|
|
4
4
|
|
|
5
5
|
Help me work through a feature plan one task at a time.
|
|
6
6
|
|
|
7
|
-
1. **Gather Context** — If not already provided, ask for: feature name (kebab-case, e.g., `user-authentication`), brief feature/branch description, planning doc path (default `
|
|
7
|
+
1. **Gather Context** — If not already provided, ask for: feature name (kebab-case, e.g., `user-authentication`), brief feature/branch description, planning doc path (default `{{docsDir}}/planning/feature-{name}.md`), and any supporting docs (design, requirements, implementation).
|
|
8
8
|
2. **Use Memory for Context** — Search for prior implementation notes/patterns before starting: `npx ai-devkit@latest memory search --query "<feature implementation plan>"`.
|
|
9
9
|
3. **Load & Present Plan** — Read the planning doc and parse task lists (headings + checkboxes). Present an ordered task queue grouped by section, with status: `todo`, `in-progress`, `done`, `blocked`.
|
|
10
10
|
4. **Interactive Task Execution** — For each task in order: display context and full bullet text, reference relevant design/requirements docs, offer to outline sub-steps before starting, prompt for status update (`done`, `in-progress`, `blocked`, `skipped`) with short notes after work, and if blocked record blocker and move to a "Blocked" list.
|
|
11
|
-
5. **Update Planning Doc** — After each completed or status-changed task, run `/update-planning` to keep `
|
|
11
|
+
5. **Update Planning Doc** — After each completed or status-changed task, run `/update-planning` to keep `{{docsDir}}/planning/feature-{name}.md` accurate.
|
|
12
12
|
6. **Store Reusable Knowledge** — Save reusable implementation guidance/decisions with `npx ai-devkit@latest memory store ...`.
|
|
13
13
|
7. **Session Summary** — Produce a summary: Completed, In Progress (with next steps), Blocked (with blockers), Skipped/Deferred, and New Tasks.
|
|
14
14
|
8. **Next Command Guidance** — Continue `/execute-plan` until plan completion; then run `/check-implementation`.
|
|
@@ -7,13 +7,13 @@ Guide me through adding a new feature, from requirements documentation to implem
|
|
|
7
7
|
1. **Capture Requirement** — If not already provided, ask for: feature name (kebab-case, e.g., `user-authentication`), what problem it solves and who will use it, and key user stories.
|
|
8
8
|
2. **Use Memory for Context** — Before asking repetitive clarification questions, search memory for related decisions or conventions via `npx ai-devkit@latest memory search --query "<feature/topic>"` and reuse relevant context.
|
|
9
9
|
3. **Create Feature Documentation Structure** — Copy each template's content (preserving YAML frontmatter and section headings) into feature-specific files:
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `
|
|
15
|
-
4. **Requirements Phase** — Fill out `
|
|
16
|
-
5. **Design Phase** — Fill out `
|
|
17
|
-
6. **Planning Phase** — Fill out `
|
|
10
|
+
- `{{docsDir}}/requirements/README.md` → `{{docsDir}}/requirements/feature-{name}.md`
|
|
11
|
+
- `{{docsDir}}/design/README.md` → `{{docsDir}}/design/feature-{name}.md`
|
|
12
|
+
- `{{docsDir}}/planning/README.md` → `{{docsDir}}/planning/feature-{name}.md`
|
|
13
|
+
- `{{docsDir}}/implementation/README.md` → `{{docsDir}}/implementation/feature-{name}.md`
|
|
14
|
+
- `{{docsDir}}/testing/README.md` → `{{docsDir}}/testing/feature-{name}.md`
|
|
15
|
+
4. **Requirements Phase** — Fill out `{{docsDir}}/requirements/feature-{name}.md`: problem statement, goals/non-goals, user stories, success criteria, constraints, open questions.
|
|
16
|
+
5. **Design Phase** — Fill out `{{docsDir}}/design/feature-{name}.md`: architecture changes, data models, API/interfaces, components, design decisions, security and performance considerations.
|
|
17
|
+
6. **Planning Phase** — Fill out `{{docsDir}}/planning/feature-{name}.md`: task breakdown with subtasks, dependencies, effort estimates, implementation order, risks.
|
|
18
18
|
7. **Store Reusable Knowledge** — When important conventions or decisions are finalized, store them via `npx ai-devkit@latest memory store --title "<title>" --content "<knowledge>" --tags "<tags>"`.
|
|
19
19
|
8. **Next Command Guidance** — Run `/review-requirements` first, then `/review-design`. If both pass, continue with `/execute-plan`.
|