ai-factory 2.8.1 → 2.9.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.
Files changed (43) hide show
  1. package/README.md +12 -2
  2. package/dist/core/transformer.d.ts +1 -0
  3. package/dist/core/transformer.d.ts.map +1 -1
  4. package/dist/core/transformer.js +3 -0
  5. package/dist/core/transformer.js.map +1 -1
  6. package/dist/core/transformers/kilocode.d.ts +3 -0
  7. package/dist/core/transformers/kilocode.d.ts.map +1 -1
  8. package/dist/core/transformers/kilocode.js +45 -4
  9. package/dist/core/transformers/kilocode.js.map +1 -1
  10. package/package.json +1 -1
  11. package/skills/aif/SKILL.md +164 -9
  12. package/skills/aif/references/config-template.yaml +190 -0
  13. package/skills/aif-architecture/SKILL.md +17 -9
  14. package/skills/aif-best-practices/SKILL.md +6 -0
  15. package/skills/aif-build-automation/SKILL.md +6 -0
  16. package/skills/aif-ci/SKILL.md +6 -0
  17. package/skills/aif-commit/SKILL.md +33 -17
  18. package/skills/aif-dockerize/SKILL.md +6 -0
  19. package/skills/aif-docs/SKILL.md +86 -66
  20. package/skills/aif-evolve/SKILL.md +32 -8
  21. package/skills/aif-explore/SKILL.md +36 -24
  22. package/skills/aif-fix/SKILL.md +95 -29
  23. package/skills/aif-grounded/SKILL.md +6 -1
  24. package/skills/aif-implement/SKILL.md +197 -67
  25. package/skills/aif-implement/references/IMPLEMENTATION-GUIDE.md +11 -9
  26. package/skills/aif-improve/SKILL.md +48 -21
  27. package/skills/aif-loop/SKILL.md +22 -12
  28. package/skills/aif-plan/SKILL.md +171 -86
  29. package/skills/aif-plan/references/EXAMPLES.md +6 -5
  30. package/skills/aif-plan/references/TASK-FORMAT.md +3 -0
  31. package/skills/aif-reference/SKILL.md +97 -115
  32. package/skills/aif-review/SKILL.md +16 -4
  33. package/skills/aif-roadmap/SKILL.md +24 -16
  34. package/skills/aif-rules/SKILL.md +142 -33
  35. package/skills/aif-security-checklist/SKILL.md +24 -8
  36. package/skills/aif-skill-generator/SKILL.md +6 -0
  37. package/skills/aif-skill-generator/references/EXAMPLES.md +1 -1
  38. package/skills/aif-verify/SKILL.md +49 -19
  39. package/skills/aif-verify/references/CONTEXT-GATES-AND-OWNERSHIP.md +9 -9
  40. package/subagents/implement-coordinator.md +45 -21
  41. package/subagents/implement-worker.md +4 -0
  42. package/subagents/plan-coordinator.md +22 -1
  43. package/subagents/plan-polisher.md +37 -11
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  </a>
11
11
  </p>
12
12
 
13
- ![logo](https://github.com/lee-to/ai-factory/raw/2.x/art/promo.png)
13
+ ![logo](https://github.com/lee-to/ai-factory/blob/2.x/art/aif1.jpg)
14
14
 
15
15
  # AI Factory
16
16
 
@@ -174,10 +174,20 @@ AI Factory can generate and maintain your project docs with a single command:
174
174
  | [Security](docs/security.md) | Two-level security scanning for external skills |
175
175
  | [Extensions](docs/extensions.md) | Writing and installing extensions — commands, injections, MCP, agents |
176
176
  | [Configuration](docs/configuration.md) | `.ai-factory.json`, MCP servers, project structure, best practices |
177
+ | [Config Reference](docs/config-reference.md) | Full `config.yaml` key reference and skill read/write matrix |
177
178
 
178
179
  ---
179
180
 
180
- ![happy](https://github.com/lee-to/ai-factory/raw/2.x/art/happy.png)
181
+ ![happy](https://github.com/ilhm344/ai-factory/blob/2.x/art/aif2.jpg)
182
+
183
+ ## AIF Handoff
184
+
185
+ Looking for an **Autonomous Kanban board where AI agents plan, implement, and review your tasks**? Check out [aif-handoff](https://github.com/lee-to/aif-handoff) — a visual task management system built on top of AI Factory.
186
+
187
+ ![ui-light](https://github.com/lee-to/aif-handoff/blob/main/art/ui-light.png)
188
+ ![ui-dark](https://github.com/lee-to/aif-handoff/blob/main/art/ui-dark.png)
189
+ ![ui-light-list](https://github.com/lee-to/aif-handoff/blob/main/art/ui-light-list.png)
190
+ ![ui-dark-list](https://github.com/lee-to/aif-handoff/blob/main/art/ui-dark-list.png)
181
191
 
182
192
  ## Links
183
193
 
@@ -20,6 +20,7 @@ export declare function sanitizeName(name: string): string;
20
20
  export declare function extractFrontmatterName(content: string): string | null;
21
21
  export declare function replaceFrontmatterName(content: string, newName: string): string;
22
22
  export declare function simplifyFrontmatter(content: string): string;
23
+ export declare function removeFrontmatter(content: string): string;
23
24
  export declare function rewriteInvocationPrefix(content: string, mapInvocation: (invocation: string) => string): string;
24
25
  export declare function getTransformer(agentId: string): AgentTransformer;
25
26
  export declare function getAgentOnboarding(agentId: string): AgentOnboarding;
@@ -1 +1 @@
1
- {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../src/core/transformer.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe,CAAC;IAC/D,WAAW,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,iBAAiB,IAAI,MAAM,EAAE,CAAC;IAC9B,iBAAiB,CAAC,IAAI,MAAM,CAAC;IAC7B,OAAO,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,eAAe,aAS1B,CAAC;AAEH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGrE;AAED,wBAAgB,sBAAsB,CAAC,OAA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aAS1B,CAAC;AAEH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGrE;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE/E;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAW3D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAID,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAC5C,MAAM,CAKR;AASD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAGhE;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAMnE;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG7G"}
@@ -34,6 +34,9 @@ export function simplifyFrontmatter(content) {
34
34
  const newFrontmatter = `---\ndescription: ${descMatch[1].trim()}\n---`;
35
35
  return content.replace(/^---\n[\s\S]*?\n---/, newFrontmatter);
36
36
  }
37
+ export function removeFrontmatter(content) {
38
+ return content.replace(/^---\n[\s\S]*?\n---\n?/, '');
39
+ }
37
40
  const INVOCATION_PATTERN = /(^|[^A-Za-z0-9_-])\/(aif(?:-[a-z0-9-]+)?)/g;
38
41
  export function rewriteInvocationPrefix(content, mapInvocation) {
39
42
  return content.replace(INVOCATION_PATTERN, (_match, prefix, invocation) => `${prefix}${mapInvocation(invocation)}`);
@@ -1 +1 @@
1
- {"version":3,"file":"transformer.js","sourceRoot":"","sources":["../../src/core/transformer.ts"],"names":[],"mapp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M,UAAU,kBAAkB,CAAC,OAAe;IAChD,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC5C,OAAO;QACL,cAAc,EAAE,WAAW,CAAC,iBAAiB,EAAE;QAC/C,cAAc,EAAE,WAAW,CAAC,iBAAiB,EAAE,EAAE,IAAI,IAAI;KAC1D,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,OAAe,EAAE,UAAkB,EAAE,SAAiB;IAC5F,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC"}
@@ -1,6 +1,9 @@
1
1
  import type { AgentTransformer, TransformResult } from '../transformer.js';
2
2
  export declare class KiloCodeTransformer implements AgentTransformer {
3
3
  transform(skillName: string, content: string): TransformResult;
4
+ postInstall(projectDir: string): Promise<void>;
5
+ cleanup(projectDir: string): Promise<void>;
4
6
  getWelcomeMessage(): string[];
7
+ getInvocationHint(): string;
5
8
  }
6
9
  //# sourceMappingURL=kilocode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kilocode.d.ts","sourceRoot":"","sources":["../../../src/core/transformers/kilocode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAG3E,qBAAa,mBAAoB,YAAW,gBAAgB;IAC1D,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe;IAa9D,iBAAiB,IAAI,MAAM,EAAE;CAQ9B"}
1
+ {"version":3,"file":"kilocode.d.ts","sourceRoot":"","sources":["../../../src/core/transformers/kilocode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAuB3E,qBAAa,mBAAoB,YAAW,gBAAgB;IAC1D,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe;IAsBxD,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU9C,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUhD,iBAAiB,IAAI,MAAM,EAAE;IAU7B,iBAAiB,IAAI,MAAM;CAG5B"}
@@ -1,6 +1,25 @@
1
- import { sanitizeName, extractFrontmatterName, replaceFrontmatterName } from '../transformer.js';
1
+ import path from 'path';
2
+ import { WORKFLOW_SKILLS, sanitizeName, extractFrontmatterName, replaceFrontmatterName, rewriteInvocationPrefix, removeFrontmatter, } from '../transformer.js';
3
+ import { fileExists, removeDirectory, removeFile } from '../../utils/fs.js';
4
+ function toKiloWorkflowInvocation(invocation) {
5
+ if (invocation === 'aif') {
6
+ return '/aif';
7
+ }
8
+ return `/aif:${invocation.slice('aif-'.length)}`;
9
+ }
10
+ function toKiloWorkflowContent(content) {
11
+ return rewriteInvocationPrefix(removeFrontmatter(content), toKiloWorkflowInvocation);
12
+ }
2
13
  export class KiloCodeTransformer {
3
14
  transform(skillName, content) {
15
+ if (WORKFLOW_SKILLS.has(skillName)) {
16
+ return {
17
+ targetDir: 'workflows',
18
+ targetName: `${skillName}.md`,
19
+ content: toKiloWorkflowContent(content),
20
+ flat: true,
21
+ };
22
+ }
4
23
  const name = extractFrontmatterName(content);
5
24
  const sanitized = name ? sanitizeName(name) : skillName;
6
25
  const newContent = name ? replaceFrontmatterName(content, sanitized) : content;
@@ -11,13 +30,35 @@ export class KiloCodeTransformer {
11
30
  flat: false,
12
31
  };
13
32
  }
33
+ async postInstall(projectDir) {
34
+ const skillsDir = path.join(projectDir, '.kilocode', 'skills');
35
+ for (const skillName of WORKFLOW_SKILLS) {
36
+ const legacySkillDir = path.join(skillsDir, skillName);
37
+ if (await fileExists(legacySkillDir)) {
38
+ await removeDirectory(legacySkillDir);
39
+ }
40
+ }
41
+ }
42
+ async cleanup(projectDir) {
43
+ const workflowsDir = path.join(projectDir, '.kilocode', 'workflows');
44
+ for (const skillName of WORKFLOW_SKILLS) {
45
+ const workflowFile = path.join(workflowsDir, `${skillName}.md`);
46
+ if (await fileExists(workflowFile)) {
47
+ await removeFile(workflowFile);
48
+ }
49
+ }
50
+ }
14
51
  getWelcomeMessage() {
15
52
  return [
16
53
  '1. Open Kilo Code in this directory',
17
- '2. Skills installed to .kilocode/skills/ (directory names use hyphens, not dots)',
18
- '3. MCP servers configured in .kilocode/mcp.json (if selected)',
19
- '4. Run /aif to analyze project and generate project-relevant skills',
54
+ '2. Workflow skills installed to .kilocode/workflows/ and display as Kilo commands',
55
+ '3. Knowledge skills installed to .kilocode/skills/ (directory names use hyphens, not dots)',
56
+ '4. MCP servers configured in .kilocode/mcp.json (if selected)',
57
+ '5. Run /aif to analyze project and use /aif:plan, /aif:commit for daily workflow',
20
58
  ];
21
59
  }
60
+ getInvocationHint() {
61
+ return 'Kilo Code: /aif, /aif:plan, /aif:commit';
62
+ }
22
63
  }
23
64
  //# sourceMappingURL=kilocode.js.map
@@ -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,CAAC;AAEjG,MAAM,OAAO,mBAAmB;IAC9B,SAAS,CAAC,SAAiB,EAAE,OAAe;QAC1C,MAAM,IAAI,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QACxD,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,sBAAsB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAE/E,OAAO;YACL,SA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C;IAED,iBAAiB;QACf,OAAO,yCAAyC,CAAC;IACnD,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-factory",
3
- "version": "2.8.1",
3
+ "version": "2.9.1",
4
4
  "type": "module",
5
5
  "description": "CLI tool for automating AI agent context setup in projects",
6
6
  "main": "dist/cli/index.js",
@@ -116,6 +116,145 @@ Check $ARGUMENTS:
116
116
 
117
117
  ---
118
118
 
119
+ ## Language Resolution
120
+
121
+ After creating DESCRIPTION.md, resolve the project language settings.
122
+
123
+ **Resolution order:**
124
+ 1. `.ai-factory/config.yaml` → use `language.ui` and `language.artifacts` if present
125
+ 2. `AGENTS.md` → look for language hints in comments or content
126
+ 3. `CLAUDE.md` → look for language preferences
127
+ 4. `RULES.md` → look for language rules
128
+ 5. Ask user if not found
129
+
130
+ **Questions to ask (if config.yaml doesn't exist):**
131
+
132
+ ```
133
+ AskUserQuestion: What language should I use for communication and artifacts?
134
+
135
+ Options:
136
+ 1. English (en) — Default
137
+ 2. Russian (ru)
138
+ 3. Chinese (zh)
139
+ 4. Other — specify manually
140
+ ```
141
+
142
+ **If user selects a non-English language, ask:**
143
+
144
+ ```
145
+ AskUserQuestion: What should be translated?
146
+
147
+ Options:
148
+ 1. Communication only — AI responds in selected language, artifacts in English
149
+ 2. Communication and artifacts — Both AI responses and generated files in selected language
150
+ 3. Artifacts only — AI responds in English, generates files in selected language
151
+ ```
152
+
153
+ **Git workflow detection (if `config.yaml` is missing or the `git:` section is incomplete):**
154
+
155
+ 1. Check whether the project uses git:
156
+ - If `.git` exists - set `git.enabled: true`
157
+ - If `.git` does not exist - set `git.enabled: false` and `git.create_branches: false`
158
+ 2. If git is enabled, detect the default/base branch from git metadata:
159
+ - Prefer `origin/HEAD`
160
+ - Fallback to remote metadata (`git remote show origin`)
161
+ - Fallback to `main`
162
+ 3. If git is enabled, ask whether `/aif-plan full` should create a new branch:
163
+
164
+ ```
165
+ AskUserQuestion: How should full plans behave in git?
166
+
167
+ Options:
168
+ 1. Create a new branch (Recommended) - /aif-plan full creates a branch and saves the full plan as a branch-scoped file
169
+ 2. Stay on the current branch - /aif-plan full still creates a rich full plan, but without creating a new branch
170
+ ```
171
+
172
+ **Store resolved settings in `.ai-factory/config.yaml`:**
173
+
174
+ - Use `skills/aif/references/config-template.yaml` as the source template.
175
+ - Preserve the inline comments so developers can edit `config.yaml` manually later.
176
+ - Fill in the resolved values; do **not** replace the file with a stripped-down minimal YAML blob.
177
+
178
+ ```yaml
179
+ language:
180
+ ui: <resolved-ui-language>
181
+ artifacts: <resolved-artifacts-language>
182
+ technical_terms: keep
183
+
184
+ paths:
185
+ description: .ai-factory/DESCRIPTION.md
186
+ architecture: .ai-factory/ARCHITECTURE.md
187
+ docs: docs/
188
+ roadmap: .ai-factory/ROADMAP.md
189
+ research: .ai-factory/RESEARCH.md
190
+ rules_file: .ai-factory/RULES.md
191
+ plan: .ai-factory/PLAN.md
192
+ plans: .ai-factory/plans/
193
+ fix_plan: .ai-factory/FIX_PLAN.md
194
+ security: .ai-factory/SECURITY.md
195
+ references: .ai-factory/references/
196
+ patches: .ai-factory/patches/
197
+ evolutions: .ai-factory/evolutions/
198
+ evolution: .ai-factory/evolution/
199
+ specs: .ai-factory/specs/
200
+ rules: .ai-factory/rules/
201
+
202
+ workflow:
203
+ auto_create_dirs: true
204
+ plan_id_format: slug
205
+ analyze_updates_architecture: true
206
+ architecture_updates_roadmap: true
207
+ verify_mode: normal
208
+
209
+ git:
210
+ enabled: <true-if-git-detected-else-false>
211
+ base_branch: <detected-base-branch-or-main>
212
+ create_branches: <true-or-false-based-on-user-choice>
213
+ branch_prefix: feature/
214
+ skip_push_after_commit: false
215
+
216
+ rules:
217
+ base: .ai-factory/rules/base.md
218
+ ```
219
+
220
+ **Create `.ai-factory/rules/base.md` from codebase evidence:**
221
+
222
+ After language resolution, analyze the codebase to detect:
223
+ - Naming conventions (camelCase, snake_case, PascalCase)
224
+ - Module boundaries (src/core/, src/cli/, src/utils/)
225
+ - Error handling patterns (try/catch, error codes)
226
+ - Logging patterns (console.log, winston, pino)
227
+ - Test patterns (jest, mocha, vitest)
228
+
229
+ Create `.ai-factory/rules/base.md` with detected conventions:
230
+
231
+ ```markdown
232
+ # Project Base Rules
233
+
234
+ > Auto-detected conventions from codebase analysis. Edit as needed.
235
+
236
+ ## Naming Conventions
237
+
238
+ - Files: [detected pattern]
239
+ - Variables: [detected pattern]
240
+ - Functions: [detected pattern]
241
+ - Classes: [detected pattern]
242
+
243
+ ## Module Structure
244
+
245
+ - [detected module boundaries]
246
+
247
+ ## Error Handling
248
+
249
+ - [detected error handling pattern]
250
+
251
+ ## Logging
252
+
253
+ - [detected logging pattern]
254
+ ```
255
+
256
+ ---
257
+
119
258
  ### Mode 1: Analyze Existing Project
120
259
 
121
260
  **Trigger:** `/aif` (no arguments) + project has config files
@@ -139,6 +278,10 @@ Based on analysis, create project specification:
139
278
  - Identified patterns
140
279
  - Architecture notes
141
280
 
281
+ **Step 2.5: Language Resolution**
282
+
283
+ After creating DESCRIPTION.md, resolve language settings (see [Language Resolution](#language-resolution)).
284
+
142
285
  **Step 3: Recommend Skills & MCP**
143
286
 
144
287
  | Detection | Skills | MCP |
@@ -180,7 +323,11 @@ Proceed? [Y/n]
180
323
 
181
324
  1. Create directory: `mkdir -p .ai-factory`
182
325
  2. Save `.ai-factory/DESCRIPTION.md`
183
- 3. For each external skill from skills.sh:
326
+ 3. **Create config.yaml and rules/base.md** (from language resolution step):
327
+ - Ensure `.ai-factory/rules/` directory exists
328
+ - Write `.ai-factory/config.yaml` from `skills/aif/references/config-template.yaml`, preserving comments and filling in the resolved values
329
+ - Write `.ai-factory/rules/base.md` with detected conventions
330
+ 4. For each external skill from skills.sh:
184
331
  ```bash
185
332
  npx skills install {{skills_cli_agent_flag}} <name>
186
333
  # AUTO-SCAN: immediately after install
@@ -189,10 +336,10 @@ Proceed? [Y/n]
189
336
  - Exit 1 (BLOCKED) → `rm -rf <path>`, warn user, skip this skill
190
337
  - Exit 2 (WARNINGS) → show to user, ask confirmation
191
338
  - Exit 0 (CLEAN) → read files yourself (Level 2), verify intent, proceed
192
- 4. Generate custom skills via `/aif-skill-generator` (pass URLs for Learn Mode when docs are available)
193
- 5. Configure MCP in `{{settings_file}}`
194
- 6. Generate `AGENTS.md` in project root (see [AGENTS.md Generation](#agentsmd-generation))
195
- 7. Generate architecture document via `/aif-architecture` (see [Architecture Generation](#architecture-generation))
339
+ 5. Generate custom skills via `/aif-skill-generator` (pass URLs for Learn Mode when docs are available)
340
+ 6. Configure MCP in `{{settings_file}}`
341
+ 7. Generate `AGENTS.md` in project root (see [AGENTS.md Generation](#agentsmd-generation))
342
+ 8. Generate architecture document via `/aif-architecture` (see [Architecture Generation](#architecture-generation))
196
343
 
197
344
  ---
198
345
 
@@ -252,6 +399,10 @@ Save to `.ai-factory/DESCRIPTION.md`.
252
399
  mkdir -p .ai-factory
253
400
  ```
254
401
 
402
+ **Step 2.5: Language Resolution**
403
+
404
+ After creating DESCRIPTION.md, resolve language settings (see [Language Resolution](#language-resolution)).
405
+
255
406
  **Step 3: Search & Install Skills**
256
407
 
257
408
  Based on confirmed stack:
@@ -292,6 +443,10 @@ After getting description, proceed with same stack selection as Mode 2:
292
443
 
293
444
  Same as Mode 2.
294
445
 
446
+ **Step 3.5: Language Resolution**
447
+
448
+ After creating DESCRIPTION.md, resolve language settings (see [Language Resolution](#language-resolution)).
449
+
295
450
  **Step 4: Setup Context**
296
451
 
297
452
  Install skills, configure MCP, generate `AGENTS.md`, and generate architecture document via `/aif-architecture` as in Mode 1.
@@ -406,8 +561,8 @@ Install skills, configure MCP, generate `AGENTS.md`, and generate architecture d
406
561
 
407
562
  ## Agent Rules
408
563
  - Never combine shell commands with `&&`, `||`, or `;` — execute each command as a separate Bash tool call. This applies even when a skill, plan, or instruction provides a combined command — always decompose it into individual calls.
409
- - ❌ Wrong: `git checkout main && git pull`
410
- - ✅ Right: Two separate Bash tool calls — first `git checkout main`, then `git pull`
564
+ - ❌ Wrong: `git checkout <configured-base-branch> && git pull`
565
+ - ✅ Right: Two separate Bash tool calls — first `git checkout <configured-base-branch>`, then `git pull origin <configured-base-branch>`
411
566
  ```
412
567
 
413
568
  **Rules for AGENTS.md:**
@@ -430,7 +585,7 @@ Install skills, configure MCP, generate `AGENTS.md`, and generate architecture d
430
585
 
431
586
  - Primary ownership in this command: `.ai-factory/DESCRIPTION.md`, setup-time `AGENTS.md`, installed skills, and MCP configuration.
432
587
  - Delegated ownership: invoke `/aif-architecture` to create/update `.ai-factory/ARCHITECTURE.md`.
433
- - Read-only context in this command by default: `.ai-factory/ROADMAP.md`, `.ai-factory/RULES.md`, `.ai-factory/RESEARCH.md`, and plan files.
588
+ - Read-only context in this command by default: the resolved roadmap, RULES.md, research, and plan artifacts.
434
589
 
435
590
  ## CRITICAL: Do NOT Implement
436
591
 
@@ -455,7 +610,7 @@ MCP configured: [list]
455
610
 
456
611
  To start development:
457
612
  - /aif-roadmap — Create a strategic roadmap with milestones (recommended for new projects)
458
- - /aif-plan <description> — Plan implementation (creates branch + plan, or quick plan)
613
+ - /aif-plan <description> — Plan implementation (fast plan or full plan with optional branch/worktree flow)
459
614
  - /aif-implement — Execute existing plan
460
615
 
461
616
  Ready when you are!
@@ -0,0 +1,190 @@
1
+ # AI Factory Configuration
2
+ # This file configures AI Factory behavior for your project.
3
+ # All sections are optional — defaults are used when not specified.
4
+
5
+ # =============================================================================
6
+ # Language Settings
7
+ # =============================================================================
8
+ # Controls the language used in AI-generated content and communication.
9
+
10
+ language:
11
+ # Language for AI-agent communication (prompts, questions, explanations)
12
+ # Options: en, ru, de, fr, es, zh, ja, ko, pt, it
13
+ # Default: en
14
+ ui: en
15
+
16
+ # Language for generated artifacts (plans, specs, documentation)
17
+ # Options: en, ru, de, fr, es, zh, ja, ko, pt, it
18
+ # Default: en (same as ui if not specified)
19
+ artifacts: en
20
+
21
+ # How to handle technical terms in translations
22
+ # Options:
23
+ # - keep: preserve original English terms (API, database, etc.)
24
+ # - translate: translate where common translation exists
25
+ # Default: keep
26
+ technical_terms: keep
27
+
28
+ # =============================================================================
29
+ # Path Configuration
30
+ # =============================================================================
31
+ # Custom paths for AI Factory artifacts.
32
+ # All paths are relative to project root.
33
+
34
+ paths:
35
+ # Project description file
36
+ # Default: .ai-factory/DESCRIPTION.md
37
+ description: .ai-factory/DESCRIPTION.md
38
+
39
+ # Architecture guidelines file
40
+ # Default: .ai-factory/ARCHITECTURE.md
41
+ architecture: .ai-factory/ARCHITECTURE.md
42
+
43
+ # Detailed documentation directory used by /aif-docs
44
+ # README.md remains the landing page in the project root.
45
+ # Change this if you want docs pages under another folder like
46
+ # documentation/, handbook/, or site/docs/.
47
+ # Default: docs/
48
+ docs: docs/
49
+
50
+ # Roadmap file
51
+ # Default: .ai-factory/ROADMAP.md
52
+ roadmap: .ai-factory/ROADMAP.md
53
+
54
+ # Research notes file
55
+ # Default: .ai-factory/RESEARCH.md
56
+ research: .ai-factory/RESEARCH.md
57
+
58
+ # Top-level project rules file (axioms)
59
+ # Default: .ai-factory/RULES.md
60
+ rules_file: .ai-factory/RULES.md
61
+
62
+ # Fast-mode plan file
63
+ # Used by /aif-plan fast for a single quick plan.
64
+ # Keep this separate from paths.plans unless you want fast plans
65
+ # to live next to full named plans.
66
+ # Default: .ai-factory/PLAN.md
67
+ plan: .ai-factory/PLAN.md
68
+
69
+ # Full-mode plans directory
70
+ # /aif-plan full stores named plan files here.
71
+ # In git-aware mode this is typically branch-scoped.
72
+ # In no-git mode it stores slug-based plan files.
73
+ # Default: .ai-factory/plans/
74
+ plans: .ai-factory/plans/
75
+
76
+ # Fix plan file
77
+ # Default: .ai-factory/FIX_PLAN.md
78
+ fix_plan: .ai-factory/FIX_PLAN.md
79
+
80
+ # Security ignore-state file
81
+ # Default: .ai-factory/SECURITY.md
82
+ security: .ai-factory/SECURITY.md
83
+
84
+ # Knowledge references directory
85
+ # Default: .ai-factory/references/
86
+ references: .ai-factory/references/
87
+
88
+ # Self-improvement patches directory
89
+ # Default: .ai-factory/patches/
90
+ patches: .ai-factory/patches/
91
+
92
+ # Evolution logs directory
93
+ # Default: .ai-factory/evolutions/
94
+ evolutions: .ai-factory/evolutions/
95
+
96
+ # Reflex loop state directory
97
+ # Default: .ai-factory/evolution/
98
+ evolution: .ai-factory/evolution/
99
+
100
+ # Specs directory (archived plans)
101
+ # Default: .ai-factory/specs/
102
+ specs: .ai-factory/specs/
103
+
104
+ # Rules directory
105
+ # Default: .ai-factory/rules/
106
+ rules: .ai-factory/rules/
107
+
108
+ # =============================================================================
109
+ # Workflow Settings
110
+ # =============================================================================
111
+ # Controls AI Factory workflow behavior.
112
+
113
+ workflow:
114
+ # Automatically create .ai-factory/ directories when missing
115
+ # Default: true
116
+ auto_create_dirs: true
117
+
118
+ # Plan ID format for new plans
119
+ # Options: slug, timestamp, uuid
120
+ # Default: slug (derived from branch or task description)
121
+ plan_id_format: slug
122
+
123
+ # Whether the setup/analyze flow updates ARCHITECTURE.md
124
+ # Default: true
125
+ analyze_updates_architecture: true
126
+
127
+ # Whether /aif-architecture updates ROADMAP.md
128
+ # Default: true
129
+ architecture_updates_roadmap: true
130
+
131
+ # Default verification mode
132
+ # Options: strict, normal, lenient
133
+ # Default: normal
134
+ verify_mode: normal
135
+
136
+ # =============================================================================
137
+ # Git Settings
138
+ # =============================================================================
139
+
140
+ git:
141
+ # Whether this project uses git-aware workflows
142
+ # If false:
143
+ # - /aif-plan full does not create branches
144
+ # - /aif-review and /aif-verify do not assume a base branch exists
145
+ # - merge/push guidance is skipped
146
+ # Default: auto-detected from the repository (.git presence)
147
+ enabled: true
148
+
149
+ # Default branch for diff/review/merge targets
150
+ # Examples: main, master, develop, trunk, 2.x
151
+ # Default: auto-detected from git metadata, fallback main
152
+ base_branch: main
153
+
154
+ # Automatically create feature branches for plans
155
+ # Applies only when git.enabled = true
156
+ # If false, /aif-plan full still creates a full plan but stays on the
157
+ # current branch (or uses a slug-named full plan in no-git mode)
158
+ # Default: true when git is enabled
159
+ create_branches: true
160
+
161
+ # Branch name prefix for new features
162
+ # Applies only when create_branches = true
163
+ # Default: feature/
164
+ branch_prefix: feature/
165
+
166
+ # Skip push prompt after /aif-commit creates a commit
167
+ # If true:
168
+ # - /aif-commit ends after successful local commit
169
+ # - no "Push to remote?" prompt is shown
170
+ # Default: false
171
+ skip_push_after_commit: false
172
+
173
+ # =============================================================================
174
+ # Rules Configuration
175
+ # =============================================================================
176
+ # Configure the rules hierarchy for this project.
177
+
178
+ rules:
179
+ # Base rules file (project-specific conventions)
180
+ # This file is created by /aif during project setup
181
+ # Default: .ai-factory/rules/base.md
182
+ base: .ai-factory/rules/base.md
183
+
184
+ # Area-specific rules files
185
+ # These are created by /aif-rules when you add area-specific conventions
186
+ # Uncomment and add paths as needed:
187
+ # api: .ai-factory/rules/api.md
188
+ # frontend: .ai-factory/rules/frontend.md
189
+ # backend: .ai-factory/rules/backend.md
190
+ # database: .ai-factory/rules/database.md
@@ -12,9 +12,18 @@ Generate `.ai-factory/ARCHITECTURE.md` with architecture decisions tailored to t
12
12
 
13
13
  ## Workflow
14
14
 
15
- ### Step 0: Load Project Context
15
+ ### Step 0: Load Config & Project Context
16
16
 
17
- **Read `.ai-factory/DESCRIPTION.md`** if it exists to understand:
17
+ **FIRST:** Read `.ai-factory/config.yaml` if it exists to resolve:
18
+ - **Paths:** `paths.description` and `paths.architecture`
19
+ - **Language:** `language.ui` for prompts and `language.artifacts` for generated architecture content
20
+
21
+ If config.yaml doesn't exist, use defaults:
22
+ - DESCRIPTION.md: `.ai-factory/DESCRIPTION.md`
23
+ - ARCHITECTURE.md: `.ai-factory/ARCHITECTURE.md`
24
+ - Language: `en` (English)
25
+
26
+ **THEN:** Read `.ai-factory/DESCRIPTION.md` (use path from config) if it exists to understand:
18
27
  - Tech stack (language, framework, database, ORM)
19
28
  - Project size and complexity
20
29
  - Core features and requirements
@@ -85,13 +94,11 @@ Architecture options:
85
94
  - **Modular Monolith** — single deployment with strong module boundaries, good default for most projects
86
95
  - **Layered Architecture** — simple layers (presentation → business → data), good for smaller projects
87
96
 
88
- ### Step 2: Generate .ai-factory/ARCHITECTURE.md
97
+ ### Step 2: Generate the Architecture Artifact
89
98
 
90
- ```bash
91
- mkdir -p .ai-factory
92
- ```
99
+ Create the parent directory for the resolved architecture path if needed.
93
100
 
94
- Generate `.ai-factory/ARCHITECTURE.md` with the following structure, **adapted to the project's tech stack and language**:
101
+ Generate the resolved architecture artifact (default: `.ai-factory/ARCHITECTURE.md`) with the following structure, **adapted to the project's tech stack and language**:
95
102
 
96
103
  ```markdown
97
104
  # Architecture: [Pattern Name]
@@ -151,11 +158,11 @@ Generate `.ai-factory/ARCHITECTURE.md` with the following structure, **adapted t
151
158
 
152
159
  ### Step 3: Update DESCRIPTION.md
153
160
 
154
- If `.ai-factory/DESCRIPTION.md` exists, add an `## Architecture` section (or update if it already exists):
161
+ If the resolved DESCRIPTION.md path exists, add an `## Architecture` section (or update if it already exists):
155
162
 
156
163
  ```markdown
157
164
  ## Architecture
158
- See `.ai-factory/ARCHITECTURE.md` for detailed architecture guidelines.
165
+ See the configured architecture artifact for detailed architecture guidelines.
159
166
  Pattern: [chosen pattern name]
160
167
  ```
161
168
 
@@ -188,6 +195,7 @@ All workflow skills (/aif-plan, /aif-implement) will now follow these architectu
188
195
  ## Artifact Ownership
189
196
 
190
197
  - Primary ownership: `.ai-factory/ARCHITECTURE.md`.
198
+ - Respect config overrides: write to the resolved architecture path from `config.yaml` when provided.
191
199
  - Allowed companion updates: architecture pointer in `.ai-factory/DESCRIPTION.md`, architecture row in `AGENTS.md` context table.
192
200
  - Read-only context: roadmap, rules, research, and plan artifacts unless user explicitly requests otherwise.
193
201
 
@@ -274,3 +274,9 @@ or using optional chaining: `user?.profile?.name`"
274
274
  | Errors | Specific types, never swallow, log context |
275
275
  | Tests | AAA pattern, test behavior, descriptive names |
276
276
  | Reviews | Be specific, suggest solutions, be kind |
277
+
278
+ ## Artifact Ownership and Config Policy
279
+
280
+ - Primary ownership: none. This skill is advisory and reference-only.
281
+ - Write policy: do not create or modify project artifacts by default.
282
+ - Config policy: config-agnostic by design. Follow repository context, `.ai-factory/ARCHITECTURE.md`, and skill-context overrides instead of reading `config.yaml`.