ai-factory 2.0.0 → 2.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.
- package/README.md +17 -4
- package/dist/cli/commands/extension.d.ts +4 -0
- package/dist/cli/commands/extension.d.ts.map +1 -0
- package/dist/cli/commands/extension.js +288 -0
- package/dist/cli/commands/extension.js.map +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +31 -35
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +86 -7
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts.map +1 -1
- package/dist/cli/commands/upgrade.js +44 -41
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/index.js +48 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/wizard/prompts.d.ts +2 -1
- package/dist/cli/wizard/prompts.d.ts.map +1 -1
- package/dist/cli/wizard/prompts.js +13 -20
- package/dist/cli/wizard/prompts.js.map +1 -1
- package/dist/core/agents.d.ts.map +1 -1
- package/dist/core/agents.js +9 -0
- package/dist/core/agents.js.map +1 -1
- package/dist/core/config.d.ts +8 -2
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +5 -8
- package/dist/core/config.js.map +1 -1
- package/dist/core/extension-ops.d.ts +32 -0
- package/dist/core/extension-ops.d.ts.map +1 -0
- package/dist/core/extension-ops.js +83 -0
- package/dist/core/extension-ops.js.map +1 -0
- package/dist/core/extensions.d.ts +53 -0
- package/dist/core/extensions.d.ts.map +1 -0
- package/dist/core/extensions.js +141 -0
- package/dist/core/extensions.js.map +1 -0
- package/dist/core/injections.d.ts +10 -0
- package/dist/core/injections.d.ts.map +1 -0
- package/dist/core/injections.js +154 -0
- package/dist/core/injections.js.map +1 -0
- package/dist/core/installer.d.ts +7 -3
- package/dist/core/installer.d.ts.map +1 -1
- package/dist/core/installer.js +68 -26
- package/dist/core/installer.js.map +1 -1
- package/dist/core/mcp.d.ts +12 -0
- package/dist/core/mcp.d.ts.map +1 -1
- package/dist/core/mcp.js +112 -67
- package/dist/core/mcp.js.map +1 -1
- package/dist/core/transformer.d.ts +10 -1
- package/dist/core/transformer.d.ts.map +1 -1
- package/dist/core/transformer.js +19 -1
- package/dist/core/transformer.js.map +1 -1
- package/dist/core/transformers/antigravity.d.ts +1 -0
- package/dist/core/transformers/antigravity.d.ts.map +1 -1
- package/dist/core/transformers/antigravity.js +19 -4
- package/dist/core/transformers/antigravity.js.map +1 -1
- package/dist/core/transformers/codex.d.ts +7 -0
- package/dist/core/transformers/codex.d.ts.map +1 -0
- package/dist/core/transformers/codex.js +24 -0
- package/dist/core/transformers/codex.js.map +1 -0
- package/dist/core/transformers/default.d.ts +1 -0
- package/dist/core/transformers/default.d.ts.map +1 -1
- package/dist/core/transformers/default.js +6 -0
- package/dist/core/transformers/default.js.map +1 -1
- package/dist/core/transformers/kilocode.js +1 -1
- package/dist/core/transformers/kilocode.js.map +1 -1
- package/dist/core/transformers/qwen.d.ts +7 -0
- package/dist/core/transformers/qwen.d.ts.map +1 -0
- package/dist/core/transformers/qwen.js +25 -0
- package/dist/core/transformers/qwen.js.map +1 -0
- package/dist/utils/fs.d.ts +0 -2
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +1 -5
- package/dist/utils/fs.js.map +1 -1
- package/mcp/templates/playwright.json +4 -0
- package/package.json +16 -1
- package/skills/aif/SKILL.md +27 -52
- package/skills/aif-commit/SKILL.md +13 -1
- package/skills/aif-grounded/SKILL.md +90 -0
- package/skills/aif-implement/SKILL.md +39 -2
- package/skills/aif-implement/references/IMPLEMENTATION-GUIDE.md +16 -0
- package/skills/aif-loop/SKILL.md +2 -2
- package/dist/cli/wizard/detector.d.ts +0 -10
- package/dist/cli/wizard/detector.d.ts.map +0 -1
- package/dist/cli/wizard/detector.js +0 -231
- package/dist/cli/wizard/detector.js.map +0 -1
- package/skills/_templates/nextjs/nextjs-patterns/SKILL.md +0 -146
- package/skills/_templates/node-api/api-patterns/SKILL.md +0 -245
- package/skills/_templates/php/php-patterns/SKILL.md +0 -491
- package/skills/_templates/python/python-patterns/SKILL.md +0 -236
- package/skills/_templates/react/react-patterns/SKILL.md +0 -181
- package/skills/aif-deploy/SKILL.md +0 -138
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { rewriteInvocationPrefix } from '../transformer.js';
|
|
2
|
+
function toCodexInvocation(content) {
|
|
3
|
+
return rewriteInvocationPrefix(content, invocation => `$${invocation}`);
|
|
4
|
+
}
|
|
5
|
+
export class CodexTransformer {
|
|
6
|
+
transform(skillName, content) {
|
|
7
|
+
return {
|
|
8
|
+
targetDir: skillName,
|
|
9
|
+
targetName: 'SKILL.md',
|
|
10
|
+
content: toCodexInvocation(content),
|
|
11
|
+
flat: false,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
getWelcomeMessage() {
|
|
15
|
+
return [
|
|
16
|
+
'1. Open Codex CLI in this directory',
|
|
17
|
+
'2. Run $aif to analyze project and generate project-relevant skills',
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
getInvocationHint() {
|
|
21
|
+
return 'Codex CLI: $aif-plan, $aif-commit';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=codex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/core/transformers/codex.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,SAAS,iBAAiB,CAAC,OAAe;IACxC,OAAO,uBAAuB,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,OAAO,gBAAgB;IAC3B,SAAS,CAAC,SAAiB,EAAE,OAAe;QAC1C,OAAO;YACL,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,UAAU;YACtB,OAAO,EAAE,iBAAiB,CAAC,OAAO,CAAC;YACnC,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,OAAO;YACL,qCAAqC;YACrC,qEAAqE;SACtE,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,OAAO,mCAAmC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AgentTransformer, TransformResult } from '../transformer.js';
|
|
2
2
|
export declare class DefaultTransformer implements AgentTransformer {
|
|
3
3
|
transform(skillName: string, content: string): TransformResult;
|
|
4
|
+
getWelcomeMessage(): string[];
|
|
4
5
|
}
|
|
5
6
|
//# sourceMappingURL=default.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/core/transformers/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,qBAAa,kBAAmB,YAAW,gBAAgB;IACzD,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe;
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/core/transformers/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,qBAAa,kBAAmB,YAAW,gBAAgB;IACzD,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe;IAS9D,iBAAiB,IAAI,MAAM,EAAE;CAM9B"}
|
|
@@ -7,5 +7,11 @@ export class DefaultTransformer {
|
|
|
7
7
|
flat: false,
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
+
getWelcomeMessage() {
|
|
11
|
+
return [
|
|
12
|
+
'1. Open the agent in this directory',
|
|
13
|
+
'2. Run /aif to analyze project and generate project-relevant skills',
|
|
14
|
+
];
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
17
|
//# sourceMappingURL=default.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/core/transformers/default.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,kBAAkB;IAC7B,SAAS,CAAC,SAAiB,EAAE,OAAe;QAC1C,OAAO;YACL,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,UAAU;YACtB,OAAO;YACP,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/core/transformers/default.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,kBAAkB;IAC7B,SAAS,CAAC,SAAiB,EAAE,OAAe;QAC1C,OAAO;YACL,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,UAAU;YACtB,OAAO;YACP,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,OAAO;YACL,qCAAqC;YACrC,qEAAqE;SACtE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -16,7 +16,7 @@ export class KiloCodeTransformer {
|
|
|
16
16
|
'1. Open Kilo Code in this directory',
|
|
17
17
|
'2. Skills installed to .kilocode/skills/ (directory names use hyphens, not dots)',
|
|
18
18
|
'3. MCP servers configured in .kilocode/mcp.json (if selected)',
|
|
19
|
-
'4. Run /aif to analyze project and generate
|
|
19
|
+
'4. Run /aif to analyze project and generate project-relevant skills',
|
|
20
20
|
];
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kilocode.js","sourceRoot":"","sources":["../../../src/core/transformers/kilocode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB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qC;YACrC,kFAAkF;YAClF,+DAA+D;YAC/D,qEAAqE;SACtE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentTransformer, TransformResult } from '../transformer.js';
|
|
2
|
+
export declare class QwenTransformer implements AgentTransformer {
|
|
3
|
+
transform(skillName: string, content: string): TransformResult;
|
|
4
|
+
getWelcomeMessage(): string[];
|
|
5
|
+
getInvocationHint(): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=qwen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qwen.d.ts","sourceRoot":"","sources":["../../../src/core/transformers/qwen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAO3E,qBAAa,eAAgB,YAAW,gBAAgB;IACtD,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe;IAS9D,iBAAiB,IAAI,MAAM,EAAE;IAQ7B,iBAAiB,IAAI,MAAM;CAG5B"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { rewriteInvocationPrefix } from '../transformer.js';
|
|
2
|
+
function toQwenInvocation(content) {
|
|
3
|
+
return rewriteInvocationPrefix(content, invocation => `/skills ${invocation}`);
|
|
4
|
+
}
|
|
5
|
+
export class QwenTransformer {
|
|
6
|
+
transform(skillName, content) {
|
|
7
|
+
return {
|
|
8
|
+
targetDir: skillName,
|
|
9
|
+
targetName: 'SKILL.md',
|
|
10
|
+
content: toQwenInvocation(content),
|
|
11
|
+
flat: false,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
getWelcomeMessage() {
|
|
15
|
+
return [
|
|
16
|
+
'1. Open Qwen Code in this directory',
|
|
17
|
+
'2. MCP servers configured in .qwen/settings.json (if selected)',
|
|
18
|
+
'3. Run /skills aif to analyze project and generate project-relevant skills',
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
getInvocationHint() {
|
|
22
|
+
return 'Qwen Code: /skills aif-plan, /skills aif-commit';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=qwen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qwen.js","sourceRoot":"","sources":["../../../src/core/transformers/qwen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,SAAS,gBAAgB,CAAC,OAAe;IACvC,OAAO,uBAAuB,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,WAAW,UAAU,EAAE,CAAC,CAAC;AACjF,CAAC;AAED,MAAM,OAAO,eAAe;IAC1B,SAAS,CAAC,SAAiB,EAAE,OAAe;QAC1C,OAAO;YACL,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,UAAU;YACtB,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC;YAClC,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,OAAO;YACL,qCAAqC;YACrC,gEAAgE;YAChE,4EAA4E;SAC7E,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,OAAO,iDAAiD,CAAC;IAC3D,CAAC;CACF"}
|
package/dist/utils/fs.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export declare function getPackageRoot(): string;
|
|
2
1
|
export declare function getSkillsDir(): string;
|
|
3
2
|
export declare function getMcpDir(): string;
|
|
4
3
|
export declare function copyDirectory(src: string, dest: string): Promise<void>;
|
|
5
|
-
export declare function copyFile(src: string, dest: string): Promise<void>;
|
|
6
4
|
export declare function fileExists(filePath: string): Promise<boolean>;
|
|
7
5
|
export declare function readJsonFile<T>(filePath: string): Promise<T | null>;
|
|
8
6
|
export declare function writeJsonFile(filePath: string, data: unknown): Promise<void>;
|
package/dist/utils/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAWA,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5E;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOnE;AAED,wBAAsB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAOzE;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAGlF;AAED,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAM3E;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CASxE;AAED,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGpF;AAED,wBAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhE"}
|
package/dist/utils/fs.js
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'path';
|
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
const __filename = fileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = path.dirname(__filename);
|
|
6
|
-
|
|
6
|
+
function getPackageRoot() {
|
|
7
7
|
return path.resolve(__dirname, '..', '..');
|
|
8
8
|
}
|
|
9
9
|
export function getSkillsDir() {
|
|
@@ -16,10 +16,6 @@ export async function copyDirectory(src, dest) {
|
|
|
16
16
|
await fs.ensureDir(dest);
|
|
17
17
|
await fs.copy(src, dest, { overwrite: true });
|
|
18
18
|
}
|
|
19
|
-
export async function copyFile(src, dest) {
|
|
20
|
-
await fs.ensureDir(path.dirname(dest));
|
|
21
|
-
await fs.copy(src, dest, { overwrite: true });
|
|
22
|
-
}
|
|
23
19
|
export async function fileExists(filePath) {
|
|
24
20
|
try {
|
|
25
21
|
await fs.access(filePath);
|
package/dist/utils/fs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI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OAAO,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,QAAgB;IAC/C,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-factory",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI tool for automating AI agent context setup in projects",
|
|
6
6
|
"main": "dist/cli/index.js",
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"build": "tsc",
|
|
13
13
|
"watch": "tsc -w",
|
|
14
14
|
"test": "bash scripts/test-skills.sh",
|
|
15
|
+
"lint:unused": "tsc --noEmit --noUnusedLocals --noUnusedParameters",
|
|
16
|
+
"lint:dead": "knip --reporter compact",
|
|
17
|
+
"lint": "npm run lint:unused && npm run lint:dead",
|
|
15
18
|
"clean": "rm -rf dist",
|
|
16
19
|
"prepublishOnly": "npm run clean && npm run build",
|
|
17
20
|
"link": "npm run build && npm link"
|
|
@@ -26,6 +29,8 @@
|
|
|
26
29
|
"warp",
|
|
27
30
|
"zencoder",
|
|
28
31
|
"junie",
|
|
32
|
+
"qwen",
|
|
33
|
+
"qwen-code",
|
|
29
34
|
"gemini",
|
|
30
35
|
"copilot",
|
|
31
36
|
"roocode",
|
|
@@ -44,6 +49,15 @@
|
|
|
44
49
|
"skills",
|
|
45
50
|
"mcp"
|
|
46
51
|
],
|
|
52
|
+
"knip": {
|
|
53
|
+
"ignoreExportsUsedInFile": true,
|
|
54
|
+
"exclude": [
|
|
55
|
+
"types"
|
|
56
|
+
],
|
|
57
|
+
"ignore": [
|
|
58
|
+
"examples/**"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
47
61
|
"engines": {
|
|
48
62
|
"node": ">=18.0.0"
|
|
49
63
|
},
|
|
@@ -57,6 +71,7 @@
|
|
|
57
71
|
"@types/fs-extra": "^11.0.4",
|
|
58
72
|
"@types/inquirer": "^9.0.7",
|
|
59
73
|
"@types/node": "^20.11.0",
|
|
74
|
+
"knip": "^5.85.0",
|
|
60
75
|
"typescript": "^5.3.3"
|
|
61
76
|
}
|
|
62
77
|
}
|
package/skills/aif/SKILL.md
CHANGED
|
@@ -112,9 +112,6 @@ Based on analysis, create project specification:
|
|
|
112
112
|
|
|
113
113
|
| Detection | Skills | MCP |
|
|
114
114
|
|-----------|--------|-----|
|
|
115
|
-
| Next.js/React | `nextjs-patterns` | - |
|
|
116
|
-
| Express/Fastify/Hono | `api-patterns` | - |
|
|
117
|
-
| Laravel/Symfony | `php-patterns` | `postgres` |
|
|
118
115
|
| Prisma/PostgreSQL | `db-migrations` | `postgres` |
|
|
119
116
|
| MongoDB | `mongo-patterns` | - |
|
|
120
117
|
| GitHub repo (.git) | - | `github` |
|
|
@@ -123,8 +120,7 @@ Based on analysis, create project specification:
|
|
|
123
120
|
**Step 4: Search skills.sh**
|
|
124
121
|
|
|
125
122
|
```bash
|
|
126
|
-
npx skills search
|
|
127
|
-
npx skills search prisma
|
|
123
|
+
npx skills search <relevant-keyword>
|
|
128
124
|
```
|
|
129
125
|
|
|
130
126
|
**Step 5: Present Plan & Confirm**
|
|
@@ -132,20 +128,19 @@ npx skills search prisma
|
|
|
132
128
|
```markdown
|
|
133
129
|
## 🏭 Project Analysis
|
|
134
130
|
|
|
135
|
-
**Detected Stack:**
|
|
131
|
+
**Detected Stack:** [language], [framework], [database if any]
|
|
136
132
|
|
|
137
133
|
## Setup Plan
|
|
138
134
|
|
|
139
135
|
### Skills
|
|
140
136
|
**From skills.sh:**
|
|
141
|
-
-
|
|
137
|
+
- [matched skills] ✓
|
|
142
138
|
|
|
143
139
|
**Generate custom:**
|
|
144
|
-
- project-
|
|
140
|
+
- [project-specific skills]
|
|
145
141
|
|
|
146
142
|
### MCP Servers
|
|
147
|
-
- [x]
|
|
148
|
-
- [x] Postgres
|
|
143
|
+
- [x] [relevant MCP servers]
|
|
149
144
|
|
|
150
145
|
Proceed? [Y/n]
|
|
151
146
|
```
|
|
@@ -172,54 +167,22 @@ Proceed? [Y/n]
|
|
|
172
167
|
|
|
173
168
|
### Mode 2: New Project with Description
|
|
174
169
|
|
|
175
|
-
**Trigger:** `/aif
|
|
170
|
+
**Trigger:** `/aif <project description>`
|
|
176
171
|
|
|
177
172
|
**Step 1: Interactive Stack Selection**
|
|
178
173
|
|
|
179
174
|
Based on project description, ask user to confirm stack choices.
|
|
180
|
-
Show YOUR recommendation with "(Recommended)" label.
|
|
175
|
+
Show YOUR recommendation with "(Recommended)" label, tailored to the project type.
|
|
181
176
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
- [ ] JavaScript — simpler, faster start
|
|
188
|
-
- [ ] Python — good for ML/data projects
|
|
189
|
-
- [ ] PHP — Laravel ecosystem
|
|
190
|
-
- [ ] Go — high performance APIs
|
|
191
|
-
- [ ] Other: ___
|
|
192
|
-
|
|
193
|
-
2. Framework:
|
|
194
|
-
- [ ] Next.js (Recommended) — full-stack React, great DX
|
|
195
|
-
- [ ] Express — minimal, flexible
|
|
196
|
-
- [ ] Fastify — fast, schema validation
|
|
197
|
-
- [ ] Hono — edge-ready, lightweight
|
|
198
|
-
- [ ] Laravel — batteries included (PHP)
|
|
199
|
-
- [ ] Django/FastAPI — Python web
|
|
200
|
-
- [ ] Other: ___
|
|
201
|
-
|
|
202
|
-
3. Database:
|
|
203
|
-
- [ ] PostgreSQL (Recommended) — reliable, feature-rich
|
|
204
|
-
- [ ] MySQL — widely supported
|
|
205
|
-
- [ ] MongoDB — flexible schema
|
|
206
|
-
- [ ] SQLite — simple, file-based
|
|
207
|
-
- [ ] Supabase — Postgres + auth + realtime
|
|
208
|
-
- [ ] Other: ___
|
|
209
|
-
|
|
210
|
-
4. ORM/Query Builder:
|
|
211
|
-
- [ ] Prisma (Recommended) — type-safe, great DX
|
|
212
|
-
- [ ] Drizzle — lightweight, SQL-like
|
|
213
|
-
- [ ] TypeORM — decorator-based
|
|
214
|
-
- [ ] Eloquent — Laravel default
|
|
215
|
-
- [ ] None — raw queries
|
|
216
|
-
```
|
|
177
|
+
Ask about:
|
|
178
|
+
1. **Language** — recommend based on project needs (performance, ecosystem, team experience)
|
|
179
|
+
2. **Framework** — recommend based on project type (if applicable — not all projects need one)
|
|
180
|
+
3. **Database** — recommend based on data model (if applicable)
|
|
181
|
+
4. **ORM/Query Builder** — recommend based on language and database (if applicable)
|
|
217
182
|
|
|
218
183
|
**Why these recommendations:**
|
|
219
|
-
- Explain WHY you recommend each choice based on project type
|
|
220
|
-
-
|
|
221
|
-
- API-only → Fastify/Hono, consider Go for high load
|
|
222
|
-
- Startup/MVP → Next.js + Prisma + Supabase (fast iteration)
|
|
184
|
+
- Explain WHY you recommend each choice based on the specific project type
|
|
185
|
+
- Skip categories that don't apply (e.g., no database for a CLI tool, no framework for a library)
|
|
223
186
|
|
|
224
187
|
**Step 2: Create .ai-factory/DESCRIPTION.md**
|
|
225
188
|
|
|
@@ -281,7 +244,7 @@ Install skills, configure MCP, generate `AGENTS.md`, and generate architecture d
|
|
|
281
244
|
I don't see an existing project here. Let's set one up!
|
|
282
245
|
|
|
283
246
|
What kind of project are you building?
|
|
284
|
-
(e.g., "
|
|
247
|
+
(e.g., "CLI tool for file processing", "REST API", "mobile app", "data pipeline")
|
|
285
248
|
|
|
286
249
|
> ___
|
|
287
250
|
```
|
|
@@ -344,6 +307,18 @@ Install skills, configure MCP, generate `AGENTS.md`, and generate architecture d
|
|
|
344
307
|
}
|
|
345
308
|
```
|
|
346
309
|
|
|
310
|
+
### Playwright
|
|
311
|
+
**When:** Needs browser automation, web testing, interaction via accessibility tree
|
|
312
|
+
|
|
313
|
+
```json
|
|
314
|
+
{
|
|
315
|
+
"playwright": {
|
|
316
|
+
"command": "npx",
|
|
317
|
+
"args": ["-y", "@playwright/mcp@latest"]
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
347
322
|
---
|
|
348
323
|
|
|
349
324
|
## AGENTS.md Generation
|
|
@@ -83,6 +83,13 @@ When invoked:
|
|
|
83
83
|
3. Propose a commit message
|
|
84
84
|
4. Ask for confirmation or modifications
|
|
85
85
|
5. Execute `git commit` with the message
|
|
86
|
+
6. After a successful commit, offer to push:
|
|
87
|
+
- Show branch/ahead status: `git status -sb`
|
|
88
|
+
- If the branch has no upstream, use: `git push -u origin <branch>`
|
|
89
|
+
- Otherwise: `git push`
|
|
90
|
+
- User choice:
|
|
91
|
+
- [ ] Push now
|
|
92
|
+
- [ ] Skip push
|
|
86
93
|
|
|
87
94
|
If argument provided (e.g., `/aif-commit auth`):
|
|
88
95
|
- Use it as the scope
|
|
@@ -92,5 +99,10 @@ If argument provided (e.g., `/aif-commit auth`):
|
|
|
92
99
|
|
|
93
100
|
- Never commit secrets or credentials
|
|
94
101
|
- Review large diffs carefully before committing
|
|
95
|
-
-
|
|
102
|
+
- If staged changes contain unrelated work (e.g., a feature + a bugfix, or changes to independent modules), suggest splitting into separate commits:
|
|
103
|
+
1. Show which files/hunks belong to which commit
|
|
104
|
+
2. Ask for confirmation
|
|
105
|
+
3. Unstage all: `git reset HEAD`
|
|
106
|
+
4. Stage and commit each group separately using `git add <files>` + `git commit`
|
|
107
|
+
5. Offer to push only after all commits are done
|
|
96
108
|
- Add Co-Authored-By for pair programming if mentioned
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aif-grounded
|
|
3
|
+
description: Reliability gate for answers. Forces evidence-based reasoning, explicit uncertainty, and “insufficient information” instead of guesses. Use when user says “be 100% sure”, “no hallucinations”, “only if verified”, “grounded answer”, or when stakes are high.
|
|
4
|
+
argument-hint: "[question or task]"
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash AskUserQuestion Questions
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Grounded - Reliability Gate (No Guessing)
|
|
10
|
+
|
|
11
|
+
This skill minimizes random / fabricated answers by enforcing a strict rule:
|
|
12
|
+
|
|
13
|
+
**Only provide the final answer if confidence is 100/100 based on evidence available.**
|
|
14
|
+
|
|
15
|
+
If confidence is not 100, **do not guess** and **do not implement**. Output a short “what’s missing” checklist that explains what would be required to reach 100.
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
Use when:
|
|
20
|
+
- The user requests maximum reliability (“only if you’re sure”, “no assumptions”).
|
|
21
|
+
- The request includes changeable facts (versions, “latest”, policies, prices, schedules).
|
|
22
|
+
- The request is security/finance/legal/medical adjacent (high stakes).
|
|
23
|
+
- You’re resuming after context loss and need to avoid accidental assumptions.
|
|
24
|
+
|
|
25
|
+
## Workflow
|
|
26
|
+
|
|
27
|
+
### Step 1: Classify the request
|
|
28
|
+
|
|
29
|
+
Classify into one of:
|
|
30
|
+
1. **Repo-grounded** — can be answered purely from the local codebase and command outputs.
|
|
31
|
+
2. **Doc-grounded** — requires authoritative docs/specs/logs provided by the user or accessible tooling.
|
|
32
|
+
3. **External-facts** — depends on changeable facts outside the repo (must be verified, otherwise refuse).
|
|
33
|
+
|
|
34
|
+
### Step 2: Define evidence and unknowns
|
|
35
|
+
|
|
36
|
+
Before answering, list:
|
|
37
|
+
- **Evidence sources** you will use (files, command outputs, provided docs).
|
|
38
|
+
- **Unknowns** (anything not present in evidence).
|
|
39
|
+
|
|
40
|
+
Hard rule:
|
|
41
|
+
- If a claim is not supported by evidence, it becomes an **unknown** (not an assumption).
|
|
42
|
+
|
|
43
|
+
### Step 3: Mandatory verification for changeable facts
|
|
44
|
+
|
|
45
|
+
If the request contains any changeable fact (“latest”, “current”, “today”, “default in vX”, “does library Y support Z now”):
|
|
46
|
+
- Verify via authoritative docs/specs, release notes, or logs.
|
|
47
|
+
- If verification is not possible with available tools/context, return **INSUFFICIENT INFORMATION** and ask for the needed source (link excerpt, version, log output).
|
|
48
|
+
|
|
49
|
+
### Step 4: Confidence gate
|
|
50
|
+
|
|
51
|
+
Compute a confidence score 0–100:
|
|
52
|
+
- **100** only if every factual claim is supported by evidence you can point to (repo files, command outputs, provided docs), and there are **no open unknowns**.
|
|
53
|
+
- If any unknown remains → confidence < 100 → do not answer/implement.
|
|
54
|
+
|
|
55
|
+
### Step 5: Output format (strict)
|
|
56
|
+
|
|
57
|
+
If confidence is **100**:
|
|
58
|
+
```
|
|
59
|
+
Answer:
|
|
60
|
+
<final answer or patch summary>
|
|
61
|
+
|
|
62
|
+
Confidence: 100/100
|
|
63
|
+
Evidence:
|
|
64
|
+
- <file/command/doc used>
|
|
65
|
+
|
|
66
|
+
Checks:
|
|
67
|
+
- <3 concrete checks someone can run/inspect to confirm>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If confidence is **< 100**:
|
|
71
|
+
```
|
|
72
|
+
Result: INSUFFICIENT INFORMATION (no guessing)
|
|
73
|
+
Current confidence: <N>/100
|
|
74
|
+
Why not 100:
|
|
75
|
+
- <top reasons>
|
|
76
|
+
|
|
77
|
+
Missing evidence:
|
|
78
|
+
- <what exact file/output/doc is needed>
|
|
79
|
+
|
|
80
|
+
To reach 100:
|
|
81
|
+
- <1–3 concrete asks or commands for the user to run and paste output>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Implementation guardrail
|
|
85
|
+
|
|
86
|
+
If the user asks for code changes:
|
|
87
|
+
- You may explore the repo and propose what evidence is needed.
|
|
88
|
+
- Only apply patches once confidence can be 100 (e.g., requirements are precise + you can verify build/tests or equivalent checks).
|
|
89
|
+
- If the repo lacks a verification path (no build/tests and behavior can’t be validated), do not claim 100; return INSUFFICIENT INFORMATION and propose the minimal validation needed.
|
|
90
|
+
|
|
@@ -22,6 +22,24 @@ Execute tasks from the plan, track progress, and enable session continuation.
|
|
|
22
22
|
3. Check current branch
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
### Step 0.0: Resume / Recovery (after a break or after /clear)
|
|
26
|
+
|
|
27
|
+
If the user is resuming **the next day**, says the session was **abandoned**, or you suspect context was lost (e.g. after `/clear`), rebuild local context from the repo **before** continuing tasks:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
1. git status
|
|
31
|
+
2. git branch --show-current
|
|
32
|
+
3. git log --oneline --decorate -20
|
|
33
|
+
4. (optional) git diff --stat
|
|
34
|
+
5. (optional) git stash list
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Then reconcile plan/task state:
|
|
38
|
+
- Ensure the current plan file matches the current branch (PLAN.md takes priority; otherwise branch-named plan).
|
|
39
|
+
- Compare `TaskList` statuses vs plan checkboxes.
|
|
40
|
+
- If code changes for a task appear already implemented but the task is not marked completed, verify quickly and then `TaskUpdate(..., status: "completed")` and update the plan checkbox.
|
|
41
|
+
- If a task is marked completed but the corresponding code is missing (rebase/reset happened), mark it back to pending and discuss with the user.
|
|
42
|
+
|
|
25
43
|
**If uncommitted changes exist:**
|
|
26
44
|
```
|
|
27
45
|
You have uncommitted changes. Commit them first?
|
|
@@ -30,7 +48,23 @@ You have uncommitted changes. Commit them first?
|
|
|
30
48
|
- [ ] Cancel
|
|
31
49
|
```
|
|
32
50
|
|
|
33
|
-
**If NO plan file exists
|
|
51
|
+
**If NO plan file exists but `.ai-factory/FIX_PLAN.md` exists:**
|
|
52
|
+
|
|
53
|
+
A fix plan was created by `/aif-fix` in plan mode. Redirect to fix workflow:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Found a fix plan (.ai-factory/FIX_PLAN.md).
|
|
57
|
+
|
|
58
|
+
This plan was created by /aif-fix and should be executed through the fix workflow
|
|
59
|
+
(it creates a patch and handles cleanup automatically).
|
|
60
|
+
|
|
61
|
+
Running /aif-fix to execute the plan...
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
→ **Invoke `/aif-fix`** (without arguments — it will detect FIX_PLAN.md and execute it).
|
|
65
|
+
→ **STOP** — do not continue with implement workflow.
|
|
66
|
+
|
|
67
|
+
**If NO plan file exists AND no FIX_PLAN.md (all tasks completed or fresh start):**
|
|
34
68
|
|
|
35
69
|
```
|
|
36
70
|
No active plan found.
|
|
@@ -90,11 +124,14 @@ Based on choice:
|
|
|
90
124
|
2. No .ai-factory/PLAN.md → Check current git branch:
|
|
91
125
|
git branch --show-current
|
|
92
126
|
→ Look for .ai-factory/plans/<branch-name>.md (e.g., .ai-factory/plans/feature-user-auth.md)
|
|
127
|
+
3. No plan files at all → Check .ai-factory/FIX_PLAN.md
|
|
128
|
+
→ If exists: invoke /aif-fix (handles its own workflow with patches) and STOP
|
|
93
129
|
```
|
|
94
130
|
|
|
95
131
|
**Priority:**
|
|
96
132
|
1. `.ai-factory/PLAN.md` - always takes priority (from `/aif-plan fast`)
|
|
97
133
|
2. Branch-named file - if no .ai-factory/PLAN.md (from `/aif-plan full`)
|
|
134
|
+
3. `.ai-factory/FIX_PLAN.md` - redirect to `/aif-fix` (from `/aif-fix` plan mode)
|
|
98
135
|
|
|
99
136
|
**Read the plan file** to understand:
|
|
100
137
|
- Context and settings (testing, logging preferences)
|
|
@@ -458,4 +495,4 @@ For progress display format, blocker handling, session continuity examples, and
|
|
|
458
495
|
|
|
459
496
|
Key rules: log function entry/exit, state changes, external calls, error context. Use structured logging, configurable log levels (LOG_LEVEL env var).
|
|
460
497
|
|
|
461
|
-
**DO NOT skip logging to "keep code clean" - verbose logging is REQUIRED during implementation, but MUST be configurable.**
|
|
498
|
+
**DO NOT skip logging to "keep code clean" - verbose logging is REQUIRED during implementation, but MUST be configurable.**
|
|
@@ -38,6 +38,22 @@ What would you like to do?
|
|
|
38
38
|
|
|
39
39
|
Tasks are persisted in the conversation/project state.
|
|
40
40
|
|
|
41
|
+
### Recovery after a break or after /clear
|
|
42
|
+
|
|
43
|
+
If the user is resuming later and you don't have prior conversational context, rebuild context from git + the plan file before continuing:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
git status
|
|
47
|
+
git branch --show-current
|
|
48
|
+
git log --oneline --decorate -20
|
|
49
|
+
git diff --stat
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Then:
|
|
53
|
+
- Re-open the active plan file and confirm it matches the current branch.
|
|
54
|
+
- Use `TaskList` to find `in_progress` first, otherwise the next pending task.
|
|
55
|
+
- If `TaskList` and plan checkboxes disagree, reconcile (verify code, then update `TaskUpdate` + plan checkbox).
|
|
56
|
+
|
|
41
57
|
**Starting new session:**
|
|
42
58
|
```
|
|
43
59
|
User: /aif-implement
|
package/skills/aif-loop/SKILL.md
CHANGED
|
@@ -141,7 +141,7 @@ Generate:
|
|
|
141
141
|
"phase": "A",
|
|
142
142
|
"current_step": "PLAN",
|
|
143
143
|
"task": {
|
|
144
|
-
"prompt": "OpenAPI 3.1 + DDD notes + JSON examples
|
|
144
|
+
"prompt": "OpenAPI 3.1 spec + DDD notes + JSON examples",
|
|
145
145
|
"ideal_result": "..."
|
|
146
146
|
},
|
|
147
147
|
"criteria": {
|
|
@@ -451,7 +451,7 @@ If `run.json` is missing or unparseable:
|
|
|
451
451
|
## Examples
|
|
452
452
|
|
|
453
453
|
```text
|
|
454
|
-
/aif-loop new OpenAPI 3.1 + DDD notes + JSON examples
|
|
454
|
+
/aif-loop new OpenAPI 3.1 spec + DDD notes + JSON examples
|
|
455
455
|
/aif-loop resume
|
|
456
456
|
/aif-loop resume courses-api-ddd
|
|
457
457
|
/aif-loop status
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface DetectedStack {
|
|
2
|
-
name: string;
|
|
3
|
-
confidence: 'high' | 'medium' | 'low';
|
|
4
|
-
frameworks: string[];
|
|
5
|
-
languages: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare function detectStack(projectDir: string): Promise<DetectedStack | null>;
|
|
8
|
-
export declare function getRecommendedSkills(stack: DetectedStack | null): string[];
|
|
9
|
-
export declare function getRecommendedTemplate(stack: DetectedStack | null): string | null;
|
|
10
|
-
//# sourceMappingURL=detector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../../src/cli/wizard/detector.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACtC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAYD,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CA6CnF;AA2KD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,GAAG,MAAM,EAAE,CAwB1E;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAmBjF"}
|