ai-factory 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -4
- package/dist/cli/commands/init.d.ts +6 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +73 -5
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/wizard/skill-hints.d.ts.map +1 -1
- package/dist/cli/wizard/skill-hints.js +1 -0
- package/dist/cli/wizard/skill-hints.js.map +1 -1
- package/dist/core/agents.d.ts +1 -0
- package/dist/core/agents.d.ts.map +1 -1
- package/dist/core/agents.js +3 -0
- package/dist/core/agents.js.map +1 -1
- package/package.json +1 -1
- package/skills/aif-reference/SKILL.md +270 -0
- package/skills/aif-reference/references/EXAMPLES.md +126 -0
- package/subagents/best-practices-sidecar.md +1 -1
- package/subagents/commit-preparer.md +1 -1
- package/subagents/docs-auditor.md +1 -1
- package/subagents/implement-coordinator.md +11 -0
- package/subagents/plan-coordinator.md +9 -5
- package/subagents/plan-polisher.md +4 -2
- package/subagents/review-sidecar.md +1 -1
- package/subagents/security-sidecar.md +1 -1
package/README.md
CHANGED
|
@@ -54,14 +54,17 @@ mise use -g npm:ai-factory
|
|
|
54
54
|
## Quick Start
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
# In your project directory
|
|
57
|
+
# In your project directory (interactive wizard)
|
|
58
58
|
ai-factory init
|
|
59
|
+
|
|
60
|
+
# Or non-interactive with flags
|
|
61
|
+
ai-factory init --agents claude,codex --mcp playwright,github
|
|
59
62
|
```
|
|
60
63
|
|
|
61
64
|
This will:
|
|
62
|
-
- Ask which AI agent you use
|
|
63
|
-
- Install relevant skills
|
|
64
|
-
- Configure MCP servers (
|
|
65
|
+
- Ask which AI agent you use (or use `--agents` flag)
|
|
66
|
+
- Install relevant skills (or use `--skills` flag)
|
|
67
|
+
- Configure MCP servers (or use `--mcp` flag)
|
|
65
68
|
|
|
66
69
|
Then open your AI agent and start working:
|
|
67
70
|
|
|
@@ -81,6 +84,23 @@ Or running without installation via `npx`:
|
|
|
81
84
|
npx ai-factory init
|
|
82
85
|
```
|
|
83
86
|
|
|
87
|
+
### Non-interactive mode
|
|
88
|
+
|
|
89
|
+
Pass `--agents` to skip the interactive wizard:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Agents + MCP servers
|
|
93
|
+
ai-factory init --agents claude,cursor --mcp github,playwright
|
|
94
|
+
|
|
95
|
+
# With specific skills
|
|
96
|
+
ai-factory init --agents claude --skills commit,plan
|
|
97
|
+
|
|
98
|
+
# Without base skills
|
|
99
|
+
ai-factory init --agents codex --no-skills --mcp github
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Available MCP servers: `github`, `postgres`, `filesystem`, `chrome-devtools`, `playwright`
|
|
103
|
+
|
|
84
104
|
### Upgrading from v1 to v2
|
|
85
105
|
|
|
86
106
|
```bash
|
|
@@ -109,6 +129,9 @@ ai-factory upgrade
|
|
|
109
129
|
# Execute the plan — implements tasks one by one, commits at checkpoints
|
|
110
130
|
/aif-implement
|
|
111
131
|
|
|
132
|
+
# Create a knowledge reference from docs AI doesn't know about
|
|
133
|
+
/aif-reference https://docs.example.com/api-reference --name example-api
|
|
134
|
+
|
|
112
135
|
# Fix a bug — AI learns from every fix and gets smarter over time
|
|
113
136
|
/aif-fix TypeError: Cannot read property 'name' of undefined
|
|
114
137
|
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface InitOptions {
|
|
2
|
+
agents?: string;
|
|
3
|
+
mcp?: string;
|
|
4
|
+
skills?: string | boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function initCommand(options?: InitOptions): Promise<void>;
|
|
2
7
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AA+ED,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgL1E"}
|
|
@@ -1,14 +1,69 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { runWizard } from '../wizard/prompts.js';
|
|
4
|
-
import { buildManagedSkillsState, buildManagedSubagentsState, installSkills, installSubagents } from '../../core/installer.js';
|
|
4
|
+
import { buildManagedSkillsState, buildManagedSubagentsState, installSkills, installSubagents, getAvailableSkills } from '../../core/installer.js';
|
|
5
5
|
import { saveConfig, configExists, loadConfig, getCurrentVersion } from '../../core/config.js';
|
|
6
6
|
import { configureMcp, getMcpInstructions } from '../../core/mcp.js';
|
|
7
|
-
import { getAgentConfig } from '../../core/agents.js';
|
|
7
|
+
import { getAgentConfig, getAvailableAgentIds } from '../../core/agents.js';
|
|
8
8
|
import { cleanupAgentSetup, getAgentOnboarding } from '../../core/transformer.js';
|
|
9
9
|
import { removeDirectory, removeFile } from '../../utils/fs.js';
|
|
10
10
|
import { applyExtensionInjections } from '../../core/injections.js';
|
|
11
11
|
import { collectReplacedSkills } from '../../core/extension-ops.js';
|
|
12
|
+
const VALID_MCP_KEYS = {
|
|
13
|
+
github: 'mcpGithub',
|
|
14
|
+
postgres: 'mcpPostgres',
|
|
15
|
+
filesystem: 'mcpFilesystem',
|
|
16
|
+
'chrome-devtools': 'mcpChromeDevtools',
|
|
17
|
+
playwright: 'mcpPlaywright',
|
|
18
|
+
};
|
|
19
|
+
function buildAnswersFromFlags(options, availableSkills) {
|
|
20
|
+
const availableAgentIds = getAvailableAgentIds();
|
|
21
|
+
// Parse agents
|
|
22
|
+
const agentIds = options.agents.split(',').map(s => s.trim()).filter(Boolean);
|
|
23
|
+
const unknownAgents = agentIds.filter(id => !availableAgentIds.includes(id));
|
|
24
|
+
if (unknownAgents.length > 0) {
|
|
25
|
+
throw new Error(`Unknown agent(s): ${unknownAgents.join(', ')}. Available: ${availableAgentIds.join(', ')}`);
|
|
26
|
+
}
|
|
27
|
+
if (agentIds.length === 0) {
|
|
28
|
+
throw new Error(`At least one agent is required. Available: ${availableAgentIds.join(', ')}`);
|
|
29
|
+
}
|
|
30
|
+
// Parse MCP servers
|
|
31
|
+
const mcpKeys = options.mcp
|
|
32
|
+
? options.mcp.split(',').map(s => s.trim()).filter(Boolean)
|
|
33
|
+
: [];
|
|
34
|
+
const unknownMcp = mcpKeys.filter(k => !(k in VALID_MCP_KEYS));
|
|
35
|
+
if (unknownMcp.length > 0) {
|
|
36
|
+
throw new Error(`Unknown MCP server(s): ${unknownMcp.join(', ')}. Available: ${Object.keys(VALID_MCP_KEYS).join(', ')}`);
|
|
37
|
+
}
|
|
38
|
+
// Parse skills
|
|
39
|
+
let selectedSkills;
|
|
40
|
+
if (options.skills === false) {
|
|
41
|
+
selectedSkills = [];
|
|
42
|
+
}
|
|
43
|
+
else if (typeof options.skills === 'string' && options.skills !== 'all') {
|
|
44
|
+
const skillIds = options.skills.split(',').map(s => s.trim()).filter(Boolean);
|
|
45
|
+
const unknownSkills = skillIds.filter(s => !availableSkills.includes(s));
|
|
46
|
+
if (unknownSkills.length > 0) {
|
|
47
|
+
const available = availableSkills.length > 0 ? availableSkills.join(', ') : '(none found — run without --skills to use all)';
|
|
48
|
+
throw new Error(`Unknown skill(s): ${unknownSkills.join(', ')}. Available: ${available}`);
|
|
49
|
+
}
|
|
50
|
+
selectedSkills = skillIds;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
selectedSkills = availableSkills;
|
|
54
|
+
}
|
|
55
|
+
// Build agent selections with MCP flags
|
|
56
|
+
const mcpSet = new Set(mcpKeys);
|
|
57
|
+
const agents = agentIds.map(id => ({
|
|
58
|
+
id,
|
|
59
|
+
mcpGithub: mcpSet.has('github'),
|
|
60
|
+
mcpFilesystem: mcpSet.has('filesystem'),
|
|
61
|
+
mcpPostgres: mcpSet.has('postgres'),
|
|
62
|
+
mcpChromeDevtools: mcpSet.has('chrome-devtools'),
|
|
63
|
+
mcpPlaywright: mcpSet.has('playwright'),
|
|
64
|
+
}));
|
|
65
|
+
return { selectedSkills, agents };
|
|
66
|
+
}
|
|
12
67
|
async function removeAgentSetup(projectDir, agent) {
|
|
13
68
|
const agentConfig = getAgentConfig(agent.id);
|
|
14
69
|
await removeDirectory(path.join(projectDir, agent.skillsDir));
|
|
@@ -23,8 +78,9 @@ async function removeAgentSetup(projectDir, agent) {
|
|
|
23
78
|
}
|
|
24
79
|
await cleanupAgentSetup(agent.id, projectDir, agent.skillsDir);
|
|
25
80
|
}
|
|
26
|
-
export async function initCommand() {
|
|
81
|
+
export async function initCommand(options = {}) {
|
|
27
82
|
const projectDir = process.cwd();
|
|
83
|
+
const nonInteractive = !!options.agents;
|
|
28
84
|
console.log(chalk.bold.blue('\n🏭 AI Factory - Project Setup\n'));
|
|
29
85
|
const hasExistingConfig = await configExists(projectDir);
|
|
30
86
|
const existingConfig = hasExistingConfig ? await loadConfig(projectDir) : null;
|
|
@@ -34,7 +90,14 @@ export async function initCommand() {
|
|
|
34
90
|
}
|
|
35
91
|
try {
|
|
36
92
|
const existingAgentIds = existingConfig?.agents.map(agent => agent.id) ?? [];
|
|
37
|
-
|
|
93
|
+
let answers;
|
|
94
|
+
if (nonInteractive) {
|
|
95
|
+
const availableSkills = await getAvailableSkills();
|
|
96
|
+
answers = buildAnswersFromFlags(options, availableSkills);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
answers = await runWizard(existingAgentIds);
|
|
100
|
+
}
|
|
38
101
|
const selectedAgentIds = new Set(answers.agents.map(agent => agent.id));
|
|
39
102
|
const removedAgents = (existingConfig?.agents ?? []).filter(agent => !selectedAgentIds.has(agent.id));
|
|
40
103
|
if (removedAgents.length > 0) {
|
|
@@ -153,10 +216,15 @@ export async function initCommand() {
|
|
|
153
216
|
console.log('');
|
|
154
217
|
}
|
|
155
218
|
catch (error) {
|
|
156
|
-
|
|
219
|
+
const message = error.message ?? '';
|
|
220
|
+
if (message.includes('User force closed')) {
|
|
157
221
|
console.log(chalk.yellow('\nSetup cancelled.'));
|
|
158
222
|
return;
|
|
159
223
|
}
|
|
224
|
+
if (nonInteractive && (message.startsWith('Unknown ') || message.startsWith('At least one '))) {
|
|
225
|
+
console.error(chalk.red(`\nError: ${message}`));
|
|
226
|
+
process.exit(1);
|
|
227
|
+
}
|
|
160
228
|
throw error;
|
|
161
229
|
}
|
|
162
230
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/H,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAA0B,MAAM,sBAAsB,CAAC;AACvH,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE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oBAAoB,CAAC,CAAC,CAAC;YAChD,OAAO;QACT,CAAC;QACD,IAAI,cAAc,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC;YAC9F,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,OAAO,EAAE,CAAC,CAAC,CAAC;YAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -13,6 +13,10 @@ program
|
|
|
13
13
|
program
|
|
14
14
|
.command('init')
|
|
15
15
|
.description('Initialize ai-factory in current project')
|
|
16
|
+
.option('--agents <agents>', 'Comma-separated list of agents (e.g. claude,codex,cursor)')
|
|
17
|
+
.option('--mcp <servers>', 'Comma-separated list of MCP servers (e.g. github,playwright,postgres,filesystem,chrome-devtools)')
|
|
18
|
+
.option('--skills <skills>', 'Comma-separated list of skills or "all" for all skills (default: all)')
|
|
19
|
+
.option('--no-skills', 'Skip installing base skills')
|
|
16
20
|
.action(initCommand);
|
|
17
21
|
program
|
|
18
22
|
.command('update')
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACpI,OAAO,EAAE,iBAAiB,EAAE,UA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;gBAAE,SAAS;YACzC,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACpC,IAAI,CAAC;oBACH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,UAAU,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC;oBAC/D,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;oBACrC,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;wBACvC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBACxB,CAAC;gBACH,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,OAAO,CAAC,KAAK,CAAC,oCAAoC,GAAG,CAAC,IAAI,qBAAqB,QAAQ,CAAC,IAAI,MAAO,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC9H,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,+CAAgD,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;AACH,CAAC;AAED,MAAM,qBAAqB,EAAE,CAAC;AAC9B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-hints.d.ts","sourceRoot":"","sources":["../../../src/cli/wizard/skill-hints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skill-hints.d.ts","sourceRoot":"","sources":["../../../src/cli/wizard/skill-hints.ts"],"names":[],"mappings":"AAsCA,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,qBAAqB,CACjC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EACpC,aAAa,GAAE,MAAgC,GAChD,MAAM,CAGR"}
|
|
@@ -15,6 +15,7 @@ const SKILL_HINTS = {
|
|
|
15
15
|
'aif-improve': 'Improve existing plan quality',
|
|
16
16
|
'aif-loop': 'Iterative quality refinement loop',
|
|
17
17
|
'aif-plan': 'Plan tasks for feature',
|
|
18
|
+
'aif-reference': 'Create knowledge refs from URLs/docs',
|
|
18
19
|
'aif-review': 'Review staged changes/PR',
|
|
19
20
|
'aif-roadmap': 'Roadmap and milestones',
|
|
20
21
|
'aif-rules': 'Project rules and conventions',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-hints.js","sourceRoot":"","sources":["../../../src/cli/wizard/skill-hints.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAA2B;IACxC,KAAK,EAAE,mBAAmB;IAC1B,kBAAkB,EAAE,6BAA6B;IACjD,oBAAoB,EAAE,uBAAuB;IAC7C,sBAAsB,EAAE,uBAAuB;IAC/C,QAAQ,EAAE,sBAAsB;IAChC,YAAY,EAAE,4BAA4B;IAC1C,eAAe,EAAE,0BAA0B;IAC3C,UAAU,EAAE,iCAAiC;IAC7C,YAAY,EAAE,4BAA4B;IAC1C,aAAa,EAAE,2BAA2B;IAC1C,SAAS,EAAE,2BAA2B;IACtC,cAAc,EAAE,+BAA+B;IAC/C,eAAe,EAAE,4BAA4B;IAC7C,aAAa,EAAE,+BAA+B;IAC9C,UAAU,EAAE,mCAAmC;IAC/C,UAAU,EAAE,wBAAwB;IACpC,YAAY,EAAE,0BAA0B;IACxC,aAAa,EAAE,wBAAwB;IACvC,WAAW,EAAE,+BAA+B;IAC5C,wBAAwB,EAAE,0BAA0B;IACpD,qBAAqB,EAAE,2BAA2B;IAClD,YAAY,EAAE,oCAAoC;CACrD,CAAC;AAEF,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AACrD,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC,SAAS,YAAY,CAAC,IAAY,EAAE,SAAiB;IACjD,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE,CAA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AAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AA6ID,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,CAMtD;AAED,wBAAgB,eAAe,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAKnE"}
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/core/agents.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AA6ID,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,CAMtD;AAED,wBAAgB,eAAe,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,CAKnE;AAED,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C"}
|
package/dist/core/agents.js
CHANGED
package/dist/core/agents.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/core/agents.ts"],"names":[],"mappings":"AAWA,MAAM,cAAc,GAAgC;IAClD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,gBAAgB;QAC3B,YAAY,EAAE,gBAAgB;QAC9B,YAAY,EAAE,WAAW;QACzB,WAAW,EAAE,IAAI;QACjB,cAAc,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cAAc,EAAE,UAAU;KAC3B;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,WAAW,EAAE,mBAAmB;QAChC,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,gBAAgB;QAC3B,YAAY,EAAE,IAAI;QAClB,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,MAAM,MAAM,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,kBAAkB,EAAE,gBAAgB,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACjD,IAAI,EAAE,GAAG,KAAK,CAAC,WAAW,KAAK,KAAK,CAAC,SAAS,IAAI;QAClD,KAAK,EAAE,KAAK,CAAC,EAAE;KAChB,CAAC,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AACrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: aif-reference
|
|
3
|
+
description: >-
|
|
4
|
+
Create knowledge references from URLs, documents, or files for use by AI agents.
|
|
5
|
+
Fetches, processes, and stores structured references in .ai-factory/references/.
|
|
6
|
+
Use when the AI needs information it doesn't have — API docs, library guides,
|
|
7
|
+
specifications, internal wikis, or any external knowledge source.
|
|
8
|
+
argument-hint: "<url|path> [url2|path2] [--name <ref-name>] [--update]"
|
|
9
|
+
allowed-tools: Read Write Edit Glob Grep Bash(mkdir *) Bash(ls *) Bash(wc *) WebFetch WebSearch AskUserQuestion
|
|
10
|
+
disable-model-invocation: false
|
|
11
|
+
metadata:
|
|
12
|
+
author: ai-factory
|
|
13
|
+
version: "1.0"
|
|
14
|
+
category: knowledge-management
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Reference Creator
|
|
18
|
+
|
|
19
|
+
You create structured knowledge references from external sources (URLs, documents, files) and store them in `.ai-factory/references/` so that AI agents can use this knowledge in future conversations.
|
|
20
|
+
|
|
21
|
+
### Project Context
|
|
22
|
+
|
|
23
|
+
**Read `.ai-factory/skill-context/aif-reference/SKILL.md`** — MANDATORY if the file exists.
|
|
24
|
+
|
|
25
|
+
This file contains project-specific rules accumulated by `/aif-evolve` from patches,
|
|
26
|
+
codebase conventions, and tech-stack analysis. These rules are tailored to the current project.
|
|
27
|
+
|
|
28
|
+
**How to apply skill-context rules:**
|
|
29
|
+
- Treat them as **project-level overrides** for this skill's general instructions
|
|
30
|
+
- When a skill-context rule conflicts with a general rule written in this SKILL.md,
|
|
31
|
+
**the skill-context rule wins**
|
|
32
|
+
- When there is no conflict, apply both
|
|
33
|
+
- **CRITICAL:** skill-context rules apply to ALL outputs of this skill — including the generated
|
|
34
|
+
reference files. If a skill-context rule says "references MUST include X" — you MUST comply.
|
|
35
|
+
|
|
36
|
+
**Enforcement:** After generating any output artifact, verify it against all skill-context rules.
|
|
37
|
+
If any rule is violated — fix the output before presenting it to the user.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## When To Use
|
|
42
|
+
|
|
43
|
+
- You need AI to know about a library/API/framework it wasn't trained on or has outdated knowledge of
|
|
44
|
+
- You want to ground AI responses in specific documentation rather than general knowledge
|
|
45
|
+
- You want to capture internal docs, wikis, or guides for AI use
|
|
46
|
+
- You're preparing context for `/aif-plan` or `/aif-implement` that requires domain knowledge
|
|
47
|
+
- You want a persistent, reusable knowledge artifact (not just a one-off conversation)
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Argument Detection
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Check $ARGUMENTS:
|
|
55
|
+
├── Contains "--update" → Update Mode: refresh existing reference
|
|
56
|
+
├── Contains URLs (http/https) → URL Mode: fetch and process web sources
|
|
57
|
+
├── Contains file paths → File Mode: process local documents
|
|
58
|
+
├── "list" → List existing references
|
|
59
|
+
├── "show <name>" → Show reference content
|
|
60
|
+
├── "delete <name>" → Delete a reference (with confirmation)
|
|
61
|
+
└── Empty → Interactive: ask what to create
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Workflow
|
|
67
|
+
|
|
68
|
+
### Step 0: Setup
|
|
69
|
+
|
|
70
|
+
Ensure `.ai-factory/references/` exists:
|
|
71
|
+
```bash
|
|
72
|
+
mkdir -p .ai-factory/references
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Check for existing references to avoid duplicates:
|
|
76
|
+
```bash
|
|
77
|
+
ls .ai-factory/references/
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If `--name <ref-name>` is provided in arguments, use that as the reference name.
|
|
81
|
+
If `--update` is provided, find and update the existing reference instead of creating new.
|
|
82
|
+
|
|
83
|
+
### Step 1: Collect Sources
|
|
84
|
+
|
|
85
|
+
**For URLs:**
|
|
86
|
+
|
|
87
|
+
For EACH URL provided:
|
|
88
|
+
|
|
89
|
+
1. **Fetch the page** using `WebFetch`:
|
|
90
|
+
```
|
|
91
|
+
WebFetch(url, "Extract ALL key information from this page:
|
|
92
|
+
- Main topic and purpose
|
|
93
|
+
- Key concepts, terms, and definitions
|
|
94
|
+
- Code examples and patterns (preserve exactly)
|
|
95
|
+
- API methods, parameters, return types, signatures
|
|
96
|
+
- Configuration options with defaults
|
|
97
|
+
- Best practices and recommendations
|
|
98
|
+
- Error handling and edge cases
|
|
99
|
+
- Version information and compatibility notes
|
|
100
|
+
- Links to critical sub-pages
|
|
101
|
+
Provide a comprehensive, structured extraction. Preserve code examples verbatim.")
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
2. **Assess depth** — if the page references critical sub-pages (API reference, detailed guides, changelogs), fetch those too (up to 8 additional pages per source URL, prioritize by relevance to the core topic).
|
|
105
|
+
|
|
106
|
+
3. **Search for gaps** — run 1-2 targeted `WebSearch` queries if the fetched content has obvious gaps:
|
|
107
|
+
- `"<topic> API reference complete"` — for API docs
|
|
108
|
+
- `"<topic> migration guide"` or `"<topic> changelog"` — for version-specific info
|
|
109
|
+
|
|
110
|
+
**For local files:**
|
|
111
|
+
|
|
112
|
+
1. Read each file with the `Read` tool
|
|
113
|
+
2. If the file references other local files, read those too (up to 5 levels of includes)
|
|
114
|
+
3. Identify the file format (markdown, HTML, JSON, YAML, plain text) and extract accordingly
|
|
115
|
+
|
|
116
|
+
**For interactive mode (no arguments):**
|
|
117
|
+
|
|
118
|
+
Ask the user:
|
|
119
|
+
1. What topic/technology do you want to create a reference for?
|
|
120
|
+
2. Do you have URLs or local files, or should I search?
|
|
121
|
+
3. What aspects are most important for your use case?
|
|
122
|
+
|
|
123
|
+
If the user wants you to search, use `WebSearch` to find authoritative sources, then proceed with URL mode.
|
|
124
|
+
|
|
125
|
+
### Step 2: Synthesize Reference
|
|
126
|
+
|
|
127
|
+
Transform collected material into a structured reference document.
|
|
128
|
+
|
|
129
|
+
**Reference file format:**
|
|
130
|
+
|
|
131
|
+
```markdown
|
|
132
|
+
# <Topic> Reference
|
|
133
|
+
|
|
134
|
+
> Source: <list of source URLs or file paths>
|
|
135
|
+
> Created: YYYY-MM-DD
|
|
136
|
+
> Updated: YYYY-MM-DD
|
|
137
|
+
|
|
138
|
+
## Overview
|
|
139
|
+
|
|
140
|
+
<1-3 paragraph summary: what this is, when to use it, key characteristics>
|
|
141
|
+
|
|
142
|
+
## Core Concepts
|
|
143
|
+
|
|
144
|
+
<Concept 1>: <clear explanation>
|
|
145
|
+
<Concept 2>: <clear explanation>
|
|
146
|
+
...
|
|
147
|
+
|
|
148
|
+
## API / Interface
|
|
149
|
+
|
|
150
|
+
<Only if applicable. Method signatures, parameters, return types.>
|
|
151
|
+
<Preserve exact signatures and types from source docs.>
|
|
152
|
+
|
|
153
|
+
## Usage Patterns
|
|
154
|
+
|
|
155
|
+
<Practical code examples organized by use case.>
|
|
156
|
+
<Every example must be complete enough to be useful — not just fragments.>
|
|
157
|
+
|
|
158
|
+
## Configuration
|
|
159
|
+
|
|
160
|
+
<Options, defaults, valid values. Table format preferred.>
|
|
161
|
+
|
|
162
|
+
## Best Practices
|
|
163
|
+
|
|
164
|
+
<Numbered list with reasoning — not just "do X" but "do X because Y">
|
|
165
|
+
|
|
166
|
+
## Common Pitfalls
|
|
167
|
+
|
|
168
|
+
<What goes wrong and how to avoid it>
|
|
169
|
+
|
|
170
|
+
## Version Notes
|
|
171
|
+
|
|
172
|
+
<Only if relevant. Breaking changes, migration notes, deprecations.>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Quality rules:**
|
|
176
|
+
- **No hallucination** — only include information actually found in sources. If a topic wasn't covered, omit the section rather than guessing.
|
|
177
|
+
- **Preserve code verbatim** — code examples from docs must be exact, not paraphrased.
|
|
178
|
+
- **Actionable over academic** — write "Use X when..." not "X is a feature that..."
|
|
179
|
+
- **Dense** — pack maximum useful information per line. This is a reference, not a tutorial.
|
|
180
|
+
- **Complete signatures** — for APIs, include ALL parameters, types, and return types.
|
|
181
|
+
- **Source attribution** — always include source URLs at the top.
|
|
182
|
+
|
|
183
|
+
### Step 3: Name and Save
|
|
184
|
+
|
|
185
|
+
**Naming convention:**
|
|
186
|
+
- Derive from topic: `react-hooks.md`, `fastapi-endpoints.md`, `docker-compose.md`
|
|
187
|
+
- Use lowercase, hyphens, `.md` extension
|
|
188
|
+
- If `--name` was provided, use that (with `.md` extension if missing)
|
|
189
|
+
- Avoid generic names like `reference.md` or `docs.md`
|
|
190
|
+
|
|
191
|
+
**Save to:** `.ai-factory/references/<name>.md`
|
|
192
|
+
|
|
193
|
+
### Step 4: Register in Index
|
|
194
|
+
|
|
195
|
+
Check if `.ai-factory/references/INDEX.md` exists. Create or update it:
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
# References Index
|
|
199
|
+
|
|
200
|
+
Available knowledge references for AI agents.
|
|
201
|
+
|
|
202
|
+
| Reference | Topic | Sources | Updated |
|
|
203
|
+
|-----------|-------|---------|---------|
|
|
204
|
+
| [react-hooks](react-hooks.md) | React Hooks API and patterns | react.dev | 2026-03-20 |
|
|
205
|
+
| [docker-compose](docker-compose.md) | Docker Compose configuration | docs.docker.com | 2026-03-20 |
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Step 5: Report
|
|
209
|
+
|
|
210
|
+
Show the user:
|
|
211
|
+
- Reference name and path
|
|
212
|
+
- Size (line count)
|
|
213
|
+
- Sections included
|
|
214
|
+
- Source URLs used
|
|
215
|
+
- How to use it: mention that other skills can read `.ai-factory/references/<name>.md`
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Update Mode (`--update`)
|
|
220
|
+
|
|
221
|
+
When `--update` is present:
|
|
222
|
+
|
|
223
|
+
1. Find the existing reference (by `--name` or by matching source URLs in the header)
|
|
224
|
+
2. Re-fetch the source URLs from the reference header
|
|
225
|
+
3. Compare with existing content — only update sections that changed
|
|
226
|
+
4. Preserve the `Created:` date, update `Updated:` date
|
|
227
|
+
5. Report what changed
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## List / Show / Delete
|
|
232
|
+
|
|
233
|
+
**`/aif-reference list`** — read and display `.ai-factory/references/INDEX.md` or list files in the directory.
|
|
234
|
+
|
|
235
|
+
**`/aif-reference show <name>`** — read and display the reference content. Add `.md` if missing.
|
|
236
|
+
|
|
237
|
+
**`/aif-reference delete <name>`** — ask for confirmation, then delete the file and update INDEX.md.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Integration With Other Skills
|
|
242
|
+
|
|
243
|
+
References in `.ai-factory/references/` are available to all AI Factory skills:
|
|
244
|
+
- `/aif-plan` and `/aif-implement` can read them for domain context
|
|
245
|
+
- `/aif-grounded` can use them as evidence sources
|
|
246
|
+
- `/aif-explore` can reference them during research
|
|
247
|
+
|
|
248
|
+
To make a skill aware of a specific reference, mention it in `.ai-factory/RULES.md`:
|
|
249
|
+
```markdown
|
|
250
|
+
## References
|
|
251
|
+
- For <topic> details, see `.ai-factory/references/<name>.md`
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Artifact Ownership
|
|
257
|
+
|
|
258
|
+
- **Primary ownership:** `.ai-factory/references/` (all files)
|
|
259
|
+
- **Shared ownership:** `.ai-factory/references/INDEX.md`
|
|
260
|
+
- **Read-only:** all other `.ai-factory/` files
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## Guardrails
|
|
265
|
+
|
|
266
|
+
- **Max reference size:** aim for under 1000 lines per reference. If larger, split into multiple files and create a directory: `.ai-factory/references/<topic>/` with an `INDEX.md` inside.
|
|
267
|
+
- **No duplication** — before creating, check if a similar reference already exists.
|
|
268
|
+
- **No stale data** — always include source URLs so references can be refreshed with `--update`.
|
|
269
|
+
- **No opinions** — references state facts from sources, not the AI's preferences.
|
|
270
|
+
- **Respect access** — if a URL requires authentication or returns errors, report this to the user instead of guessing content.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Reference Examples
|
|
2
|
+
|
|
3
|
+
Practical examples of `/aif-reference` usage and expected output.
|
|
4
|
+
|
|
5
|
+
## Example 1: Single URL — Library Documentation
|
|
6
|
+
|
|
7
|
+
**Input:**
|
|
8
|
+
```
|
|
9
|
+
/aif-reference https://zod.dev --name zod-validation
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**Result:** `.ai-factory/references/zod-validation.md`
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
# Zod Validation Reference
|
|
16
|
+
|
|
17
|
+
> Source: https://zod.dev
|
|
18
|
+
> Created: 2026-03-20
|
|
19
|
+
> Updated: 2026-03-20
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
Zod is a TypeScript-first schema declaration and validation library.
|
|
24
|
+
Zero dependencies, works in Node.js and browsers. Use for runtime
|
|
25
|
+
type validation, form parsing, API request/response validation.
|
|
26
|
+
|
|
27
|
+
## Core Concepts
|
|
28
|
+
|
|
29
|
+
- **Schema**: a validator object created with `z.<type>()` methods
|
|
30
|
+
- **Parse**: `schema.parse(data)` throws on invalid, `safeParse` returns result object
|
|
31
|
+
- **Infer**: `z.infer<typeof schema>` extracts TypeScript type from schema
|
|
32
|
+
|
|
33
|
+
## API / Interface
|
|
34
|
+
|
|
35
|
+
### Primitive schemas
|
|
36
|
+
| Method | Validates |
|
|
37
|
+
|--------|-----------|
|
|
38
|
+
| `z.string()` | string |
|
|
39
|
+
| `z.number()` | number |
|
|
40
|
+
| `z.boolean()` | boolean |
|
|
41
|
+
| `z.date()` | Date instance |
|
|
42
|
+
| `z.undefined()` | undefined |
|
|
43
|
+
| `z.null()` | null |
|
|
44
|
+
| `z.any()` | any (no validation) |
|
|
45
|
+
|
|
46
|
+
### String validations
|
|
47
|
+
- `z.string().min(n)` — minimum length
|
|
48
|
+
- `z.string().max(n)` — maximum length
|
|
49
|
+
- `z.string().email()` — email format
|
|
50
|
+
- `z.string().url()` — URL format
|
|
51
|
+
- `z.string().regex(re)` — custom regex
|
|
52
|
+
|
|
53
|
+
...
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Example 2: Multiple URLs — Cross-Referencing
|
|
57
|
+
|
|
58
|
+
**Input:**
|
|
59
|
+
```
|
|
60
|
+
/aif-reference https://docs.astro.build/en/getting-started/ https://docs.astro.build/en/guides/content-collections/
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Result:** `.ai-factory/references/astro-framework.md`
|
|
64
|
+
|
|
65
|
+
The skill merges content from both pages into a single coherent reference,
|
|
66
|
+
noting which information came from which source when there are differences.
|
|
67
|
+
|
|
68
|
+
## Example 3: Local File
|
|
69
|
+
|
|
70
|
+
**Input:**
|
|
71
|
+
```
|
|
72
|
+
/aif-reference ./docs/api-spec.yaml --name internal-api
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Result:** `.ai-factory/references/internal-api.md`
|
|
76
|
+
|
|
77
|
+
Reads the OpenAPI/Swagger spec and creates a human-readable reference
|
|
78
|
+
with endpoints, parameters, response types, and example requests.
|
|
79
|
+
|
|
80
|
+
## Example 4: Update Existing
|
|
81
|
+
|
|
82
|
+
**Input:**
|
|
83
|
+
```
|
|
84
|
+
/aif-reference --update --name zod-validation
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Result:** re-fetches https://zod.dev (from the reference header),
|
|
88
|
+
compares with existing content, updates changed sections, preserves
|
|
89
|
+
creation date.
|
|
90
|
+
|
|
91
|
+
## Example 5: Interactive Mode
|
|
92
|
+
|
|
93
|
+
**Input:**
|
|
94
|
+
```
|
|
95
|
+
/aif-reference
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Result:** the skill asks what topic the user needs a reference for,
|
|
99
|
+
whether they have specific URLs or want the AI to search, and what
|
|
100
|
+
aspects matter most. Then proceeds with the standard workflow.
|
|
101
|
+
|
|
102
|
+
## Example 6: Large Topic — Split Into Directory
|
|
103
|
+
|
|
104
|
+
When a single reference exceeds ~1000 lines:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
.ai-factory/references/kubernetes/
|
|
108
|
+
├── INDEX.md # Overview + links to sub-references
|
|
109
|
+
├── pods.md # Pod configuration and lifecycle
|
|
110
|
+
├── services.md # Service types and networking
|
|
111
|
+
├── deployments.md # Deployment strategies
|
|
112
|
+
└── configmaps.md # ConfigMaps and Secrets
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Reference Output Quality Checklist
|
|
116
|
+
|
|
117
|
+
A good reference:
|
|
118
|
+
- [ ] Has source URLs in the header
|
|
119
|
+
- [ ] Has Created/Updated dates
|
|
120
|
+
- [ ] Overview explains what + when to use in 1-3 paragraphs
|
|
121
|
+
- [ ] Code examples are verbatim from source (not paraphrased)
|
|
122
|
+
- [ ] API signatures include all parameters and types
|
|
123
|
+
- [ ] Best practices include reasoning ("because...")
|
|
124
|
+
- [ ] No hallucinated information — gaps are omitted, not filled
|
|
125
|
+
- [ ] Under 1000 lines (or split into directory)
|
|
126
|
+
- [ ] Registered in INDEX.md
|
|
@@ -3,7 +3,7 @@ name: best-practices-sidecar
|
|
|
3
3
|
description: Read-only background best-practices sidecar for the current implementation scope. Use from implement-coordinator after code changes when a concise maintainability review is needed.
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: inherit
|
|
6
|
-
permissionMode:
|
|
6
|
+
permissionMode: acceptEdits
|
|
7
7
|
background: true
|
|
8
8
|
maxTurns: 6
|
|
9
9
|
skills:
|
|
@@ -3,7 +3,7 @@ name: commit-preparer
|
|
|
3
3
|
description: Read-only background commit preparation sidecar for the current implementation scope. Use from implement-coordinator when deciding whether a final /aif-commit step can be streamlined.
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
6
|
-
permissionMode:
|
|
6
|
+
permissionMode: acceptEdits
|
|
7
7
|
background: true
|
|
8
8
|
maxTurns: 6
|
|
9
9
|
skills:
|
|
@@ -3,7 +3,7 @@ name: docs-auditor
|
|
|
3
3
|
description: Read-only background documentation drift sidecar for the current implementation scope. Use from implement-coordinator after code changes when deciding whether /aif-docs should run automatically.
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
6
|
-
permissionMode:
|
|
6
|
+
permissionMode: acceptEdits
|
|
7
7
|
background: true
|
|
8
8
|
maxTurns: 6
|
|
9
9
|
skills:
|
|
@@ -178,6 +178,17 @@ After parallel workers complete:
|
|
|
178
178
|
- If 2 consecutive layers fail, stop the entire run and report.
|
|
179
179
|
- Always verify the merged result before proceeding to the next layer.
|
|
180
180
|
|
|
181
|
+
## Post-implementation rules check
|
|
182
|
+
|
|
183
|
+
After ALL tasks are completed and verified (before final output):
|
|
184
|
+
|
|
185
|
+
1. Check if `.ai-factory/RULES.md` exists.
|
|
186
|
+
2. If it exists — read it and verify that the implemented code satisfies all rules.
|
|
187
|
+
3. If any rule is violated — fix the violation before producing the final summary.
|
|
188
|
+
4. If a fix requires changing files modified by multiple workers, run a verification pass after the fix.
|
|
189
|
+
|
|
190
|
+
This is the last quality gate before the run is considered complete.
|
|
191
|
+
|
|
181
192
|
## Output
|
|
182
193
|
|
|
183
194
|
After each layer, print a progress table:
|
|
@@ -25,12 +25,14 @@ The user provides a planning request — the same input they would give to `/aif
|
|
|
25
25
|
|
|
26
26
|
## Configuration
|
|
27
27
|
|
|
28
|
-
| Parameter
|
|
29
|
-
|
|
30
|
-
| max_iterations | 3
|
|
31
|
-
| mode
|
|
28
|
+
| Parameter | Default | Description |
|
|
29
|
+
|----------------|---------|----------------------------------------------------------------------|
|
|
30
|
+
| max_iterations | 3 | Maximum critique→improve cycles |
|
|
31
|
+
| mode | fast | Planning mode: `fast` or `full` |
|
|
32
|
+
| tests | infer | Include test tasks: `yes`, `no`, or `infer` (auto-detect from project) |
|
|
33
|
+
| docs | infer | Include docs tasks: `yes`, `no`, or `infer` (auto-detect from project) |
|
|
32
34
|
|
|
33
|
-
Override via input: `max_iterations: 5, mode: full`
|
|
35
|
+
Override via input: `max_iterations: 5, mode: full, tests: yes, docs: yes`
|
|
34
36
|
|
|
35
37
|
## Execution algorithm
|
|
36
38
|
|
|
@@ -64,6 +66,8 @@ report summary
|
|
|
64
66
|
- plan file path (after first pass)
|
|
65
67
|
- remaining issues from previous critique
|
|
66
68
|
- `mode: fast` or `mode: full` (from user config or default)
|
|
69
|
+
- `tests: yes/no/infer` (from user config or default `infer`)
|
|
70
|
+
- `docs: yes/no/infer` (from user config or default `infer`)
|
|
67
71
|
- Do NOT pass raw plan content — let plan-polisher read the file itself.
|
|
68
72
|
- On the first dispatch, always include the mode explicitly so plan-polisher uses the correct file location.
|
|
69
73
|
|
|
@@ -26,11 +26,13 @@ Repo-specific rules:
|
|
|
26
26
|
|
|
27
27
|
Default decisions when the caller did not specify them:
|
|
28
28
|
- mode: `fast`
|
|
29
|
-
- tests: no
|
|
29
|
+
- tests: **infer from project** — if the project already has a test suite (e.g. `tests/`, `__tests__/`, `*.test.*`, `*.spec.*`, test config files), default to `yes`; otherwise `no`
|
|
30
30
|
- logging: verbose
|
|
31
|
-
- docs:
|
|
31
|
+
- docs: **infer from project** — if the project already has documentation infrastructure (e.g. `docs/`, `README.md` with structured sections, docstring conventions), default to `yes`; otherwise `no`
|
|
32
32
|
- roadmap linkage: skip unless explicitly requested
|
|
33
33
|
|
|
34
|
+
When the caller explicitly passes `tests` or `docs` values, always use those — never override with inference.
|
|
35
|
+
|
|
34
36
|
**Mode override priority** (CRITICAL — this list wins over injected skill logic):
|
|
35
37
|
- If the caller explicitly said `mode: fast` or `mode: full` → use that.
|
|
36
38
|
- If the caller did NOT specify mode → default to `fast`. Do NOT fall through to the `/aif-plan` interactive mode-selection prompt — you are a subagent and cannot ask the user. Always apply `fast` as the default.
|
|
@@ -3,7 +3,7 @@ name: review-sidecar
|
|
|
3
3
|
description: Read-only background code review sidecar for the current implementation scope. Use from implement-coordinator after code changes when a concise bug-risk review is needed.
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: inherit
|
|
6
|
-
permissionMode:
|
|
6
|
+
permissionMode: acceptEdits
|
|
7
7
|
background: true
|
|
8
8
|
maxTurns: 6
|
|
9
9
|
skills:
|
|
@@ -3,7 +3,7 @@ name: security-sidecar
|
|
|
3
3
|
description: Read-only background security audit sidecar for the current implementation scope. Use from implement-coordinator after code changes when a concise security check is needed.
|
|
4
4
|
tools: Read, Glob, Grep
|
|
5
5
|
model: inherit
|
|
6
|
-
permissionMode:
|
|
6
|
+
permissionMode: acceptEdits
|
|
7
7
|
background: true
|
|
8
8
|
maxTurns: 6
|
|
9
9
|
skills:
|