ai-factory 2.8.1 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +12 -2
  2. package/package.json +1 -1
  3. package/skills/aif/SKILL.md +164 -9
  4. package/skills/aif/references/config-template.yaml +190 -0
  5. package/skills/aif-architecture/SKILL.md +17 -9
  6. package/skills/aif-best-practices/SKILL.md +6 -0
  7. package/skills/aif-build-automation/SKILL.md +6 -0
  8. package/skills/aif-ci/SKILL.md +6 -0
  9. package/skills/aif-commit/SKILL.md +33 -17
  10. package/skills/aif-dockerize/SKILL.md +6 -0
  11. package/skills/aif-docs/SKILL.md +86 -66
  12. package/skills/aif-evolve/SKILL.md +32 -8
  13. package/skills/aif-explore/SKILL.md +36 -24
  14. package/skills/aif-fix/SKILL.md +95 -29
  15. package/skills/aif-grounded/SKILL.md +6 -1
  16. package/skills/aif-implement/SKILL.md +197 -67
  17. package/skills/aif-implement/references/IMPLEMENTATION-GUIDE.md +11 -9
  18. package/skills/aif-improve/SKILL.md +48 -21
  19. package/skills/aif-loop/SKILL.md +22 -12
  20. package/skills/aif-plan/SKILL.md +171 -86
  21. package/skills/aif-plan/references/EXAMPLES.md +6 -5
  22. package/skills/aif-plan/references/TASK-FORMAT.md +3 -0
  23. package/skills/aif-reference/SKILL.md +97 -115
  24. package/skills/aif-review/SKILL.md +16 -4
  25. package/skills/aif-roadmap/SKILL.md +24 -16
  26. package/skills/aif-rules/SKILL.md +142 -33
  27. package/skills/aif-security-checklist/SKILL.md +24 -8
  28. package/skills/aif-skill-generator/SKILL.md +6 -0
  29. package/skills/aif-skill-generator/references/EXAMPLES.md +1 -1
  30. package/skills/aif-verify/SKILL.md +49 -19
  31. package/skills/aif-verify/references/CONTEXT-GATES-AND-OWNERSHIP.md +9 -9
  32. package/subagents/implement-coordinator.md +45 -21
  33. package/subagents/implement-worker.md +4 -0
  34. package/subagents/plan-coordinator.md +22 -1
  35. 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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-factory",
3
- "version": "2.8.1",
3
+ "version": "2.9.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",
@@ -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`.
@@ -498,3 +498,9 @@ After writing the build file, integrate quick commands into project docs.
498
498
  For detailed integration procedures (README, AGENTS.md, existing markdown) → read `references/DOC-INTEGRATION.md`
499
499
 
500
500
  Brief: scan for existing command sections, update or append quick reference, suggest AGENTS.md creation if missing.
501
+
502
+ ## Artifact Ownership and Config Policy
503
+
504
+ - Primary ownership: generated or enhanced build automation files (`Makefile`, `Taskfile.yml`, `justfile`, `magefile.go`).
505
+ - Allowed companion updates: quick command snippets in existing docs or `AGENTS.md` when directly tied to the generated build workflow.
506
+ - Config policy: config-agnostic by design. This skill uses repository detection and fixed AI Factory context files rather than `config.yaml`.
@@ -498,3 +498,9 @@ Display summary using format from `references/AUDIT-REPORT.md` (Summary Display
498
498
  ### 7.2 Suggest Follow-Up Skills
499
499
 
500
500
  Suggest: `/aif-build-automation` for CI targets in Makefile/Taskfile, `/aif-dockerize` for containerization.
501
+
502
+ ## Artifact Ownership and Config Policy
503
+
504
+ - Primary ownership: CI pipeline artifacts such as `.github/workflows/*` and `.gitlab-ci.yml`.
505
+ - Allowed companion updates: none by default outside CI files.
506
+ - Config policy: config-agnostic by design. This skill relies on repository detection and explicit user choices, not `config.yaml`.
@@ -12,6 +12,17 @@ Generate commit messages following the [Conventional Commits](https://www.conven
12
12
 
13
13
  ## Workflow
14
14
 
15
+ **FIRST:** Read `.ai-factory/config.yaml` if it exists to resolve:
16
+ - **Paths:** `paths.description`, `paths.architecture`, `paths.rules_file`, `paths.roadmap`, and `paths.rules`
17
+ - **Language:** `language.ui` for prompts and commit message conventions
18
+ - **Git preference:** `git.skip_push_after_commit` for post-commit push behavior
19
+ - **Rules hierarchy:** `rules.base` plus any named `rules.<area>` entries
20
+
21
+ If config.yaml doesn't exist, use defaults:
22
+ - Paths: `.ai-factory/` for all artifacts
23
+ - Language: `en` (English)
24
+ - Git preference: `skip_push_after_commit: false`
25
+
15
26
  **Read `.ai-factory/skill-context/aif-commit/SKILL.md`** — MANDATORY if the file exists.
16
27
 
17
28
  This file contains project-specific rules accumulated by `/aif-evolve` from patches,
@@ -38,8 +49,9 @@ If any rule is violated — fix the output before presenting it to the user.
38
49
  - If nothing staged, show warning and suggest staging
39
50
 
40
51
  2. **Run Context Gates (Read-Only)**
41
- - Check `.ai-factory/ARCHITECTURE.md` and `.ai-factory/DESCRIPTION.md` (if present) to catch obvious scope/boundary drift
42
- - Check `.ai-factory/RULES.md` and `.ai-factory/ROADMAP.md` (if present) to catch rule and milestone alignment issues
52
+ - Check the resolved architecture and description artifacts (use paths from config) to catch obvious scope/boundary drift
53
+ - Check the resolved RULES.md and roadmap artifacts (use paths from config) to catch rule and milestone alignment issues
54
+ - Check rules hierarchy (resolved `paths.rules_file` + `rules.base` + named `rules.<area>`) for commit conventions
43
55
  - Missing optional files (`ROADMAP.md`, `RULES.md`) are `WARN`, not blockers
44
56
  - Never modify context artifacts from this command
45
57
 
@@ -128,23 +140,27 @@ When invoked:
128
140
  - **Cancel** → stop, do NOT commit. End the workflow
129
141
 
130
142
  8. Execute `git commit` with the confirmed message
131
- 9. After a successful commit, offer to push:
132
- - Show branch/ahead status: `git status -sb`
133
- - If the branch has no upstream, use: `git push -u origin <branch>`
134
- - Otherwise: `git push`
143
+ 9. Post-commit push handling:
144
+ - If `git.skip_push_after_commit = true` in resolved config:
145
+ - Skip push prompt entirely
146
+ - End workflow after successful local commit
147
+ - Otherwise (default behavior), offer to push:
148
+ - Show branch/ahead status: `git status -sb`
149
+ - If the branch has no upstream, use: `git push -u origin <branch>`
150
+ - Otherwise: `git push`
135
151
 
136
- ```
137
- AskUserQuestion: Push to remote?
152
+ ```
153
+ AskUserQuestion: Push to remote?
138
154
 
139
- Options:
140
- 1. Push now
141
- 2. Skip push
142
- ```
155
+ Options:
156
+ 1. Push now
157
+ 2. Skip push
158
+ ```
143
159
 
144
- - **Push now** → execute push command based on upstream status:
145
- - if branch has no upstream → `git push -u origin <branch>`
146
- - otherwise → `git push`
147
- - **Skip push** → end the workflow
160
+ - **Push now** → execute push command based on upstream status:
161
+ - if branch has no upstream → `git push -u origin <branch>`
162
+ - otherwise → `git push`
163
+ - **Skip push** → end the workflow
148
164
 
149
165
  If argument provided (e.g., `/aif-commit auth`):
150
166
  - Use it as the scope
@@ -155,7 +171,7 @@ If argument provided (e.g., `/aif-commit auth`):
155
171
  - Never commit secrets or credentials
156
172
  - Review large diffs carefully before committing
157
173
  - `/aif-commit` has no implicit strict mode — context gates are warning-first unless user explicitly requests blocking behavior
158
- - Treat `.ai-factory/ARCHITECTURE.md`, `.ai-factory/ROADMAP.md`, `.ai-factory/RULES.md`, and `.ai-factory/DESCRIPTION.md` as read-only context in this command
174
+ - Treat the resolved architecture, roadmap, RULES.md, and description artifacts as read-only context in this command
159
175
  - If staged changes contain unrelated work (e.g., a feature + a bugfix, or changes to independent modules), suggest splitting into separate commits:
160
176
  1. Show which files/hunks belong to which commit
161
177
  2. Confirm split plan with the user:
@@ -517,3 +517,9 @@ Templates: `templates/deploy.sh`, `templates/update.sh`, `templates/logs.sh`, `t
517
517
  Display a summary of all created/updated files using the format from `references/SUMMARY-FORMAT.md`.
518
518
 
519
519
  Suggest follow-up: `/aif-build-automation` for Docker targets, `/aif-docs` for documentation.
520
+
521
+ ## Artifact Ownership and Config Policy
522
+
523
+ - Primary ownership: Docker artifacts (`Dockerfile`, `compose*.yml`, `.dockerignore`, `docker/*`, `deploy/scripts/*`, and related `.env.example` scaffolding when created by this skill).
524
+ - Allowed companion updates: none outside Docker and deployment artifacts by default.
525
+ - Config policy: config-agnostic by design. This skill uses repository detection, explicit infrastructure choices, and fixed AI Factory context files rather than `config.yaml`.