@fitlab-ai/agent-infra 0.3.0 → 0.3.2

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 (51) hide show
  1. package/README.md +368 -51
  2. package/README.zh-CN.md +369 -52
  3. package/bin/cli.js +1 -1
  4. package/lib/version.js +2 -1
  5. package/package.json +1 -1
  6. package/templates/.agents/README.md +12 -0
  7. package/templates/.agents/README.zh-CN.md +12 -0
  8. package/templates/.agents/skills/analyze-task/SKILL.md +106 -105
  9. package/templates/.agents/skills/check-task/SKILL.md +108 -94
  10. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +12 -0
  11. package/templates/.agents/skills/close-codescan/SKILL.md +64 -63
  12. package/templates/.agents/skills/close-dependabot/SKILL.md +71 -70
  13. package/templates/.agents/skills/commit/SKILL.md +19 -4
  14. package/templates/.agents/skills/commit/SKILL.zh-CN.md +19 -4
  15. package/templates/.agents/skills/complete-task/SKILL.md +11 -1
  16. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +11 -1
  17. package/templates/.agents/skills/create-issue/SKILL.md +302 -0
  18. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +302 -0
  19. package/templates/.agents/skills/create-pr/SKILL.md +140 -5
  20. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +140 -5
  21. package/templates/.agents/skills/create-release-note/SKILL.md +18 -11
  22. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +18 -11
  23. package/templates/.agents/skills/create-task/SKILL.md +80 -78
  24. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +7 -6
  25. package/templates/.agents/skills/implement-task/SKILL.md +7 -2
  26. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +7 -2
  27. package/templates/.agents/skills/import-codescan/SKILL.md +54 -53
  28. package/templates/.agents/skills/import-dependabot/SKILL.md +57 -56
  29. package/templates/.agents/skills/import-issue/SKILL.md +58 -58
  30. package/templates/.agents/skills/init-labels/SKILL.md +8 -0
  31. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +8 -0
  32. package/templates/.agents/skills/plan-task/SKILL.md +151 -149
  33. package/templates/.agents/skills/refine-task/SKILL.md +147 -137
  34. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +10 -2
  35. package/templates/.agents/skills/review-task/SKILL.md +196 -186
  36. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +13 -4
  37. package/templates/.agents/skills/sync-issue/SKILL.md +252 -272
  38. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +26 -47
  39. package/templates/.agents/skills/sync-pr/SKILL.md +274 -82
  40. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +251 -59
  41. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +1 -1
  42. package/templates/.claude/CLAUDE.md +13 -0
  43. package/templates/.claude/CLAUDE.zh-CN.md +13 -0
  44. package/templates/.claude/commands/create-issue.md +8 -0
  45. package/templates/.claude/commands/create-issue.zh-CN.md +8 -0
  46. package/templates/.gemini/commands/_project_/create-issue.toml +8 -0
  47. package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +8 -0
  48. package/templates/.opencode/commands/create-issue.md +11 -0
  49. package/templates/.opencode/commands/create-issue.zh-CN.md +11 -0
  50. package/templates/AGENTS.md +13 -0
  51. package/templates/AGENTS.zh-CN.md +13 -0
package/README.md CHANGED
@@ -5,47 +5,135 @@
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](License.txt)
6
6
  [![Node.js >= 18](https://img.shields.io/badge/Node.js-%3E%3D18-brightgreen?logo=node.js)](https://nodejs.org/)
7
7
  [![GitHub release](https://img.shields.io/github/v/release/fitlab-ai/agent-infra)](https://github.com/fitlab-ai/agent-infra/releases)
8
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
8
9
 
9
- A template and skill repository for initializing and maintaining AI multi-tool collaboration infrastructure and project governance across software projects.
10
+ The missing collaboration layer for AI coding agents unified skills and workflows for Claude Code, Codex, Gemini CLI, and OpenCode.
11
+
12
+ **Semi-automated programming, powered by AI agents.** Define a requirement, let AI handle analysis, planning, coding, review, and delivery — you only step in when it matters.
10
13
 
11
14
  [中文版](README.zh-CN.md)
12
15
 
13
- ## What is agent-infra?
16
+ <a id="why-agent-infra"></a>
17
+
18
+ ## Why agent-infra?
19
+
20
+ Teams increasingly mix Claude Code, Codex, Gemini CLI, OpenCode, and other AI TUIs in the same repository, but each tool tends to introduce its own commands, prompts, and local conventions. Without a shared layer, the result is fragmented workflows, duplicated setup, and task history that is difficult to audit.
21
+
22
+ agent-infra standardizes that collaboration surface. It gives every supported AI TUI the same task lifecycle, the same skill vocabulary, the same project governance files, and the same upgrade path, so teams can switch tools without rebuilding process from scratch.
23
+
24
+ <a id="see-it-in-action"></a>
25
+
26
+ ## See it in Action
27
+
28
+ **Scenario**: Issue #42 reports *"Login API returns 500 when email contains a plus sign"*. Here is the full fix lifecycle — AI does the heavy lifting, you stay in control:
29
+
30
+ ```bash
31
+ /import-issue 42
32
+ ```
33
+
34
+ > AI reads the issue, creates `TASK-20260319-100000`, and extracts requirements.
35
+
36
+ ```bash
37
+ /analyze-task TASK-20260319-100000
38
+ ```
39
+
40
+ > AI scans the codebase, identifies `src/auth/login.ts` as the root cause, and writes `analysis.md`.
41
+
42
+ ```bash
43
+ /plan-task TASK-20260319-100000
44
+ ```
45
+
46
+ > AI proposes a fix plan: *"Sanitize the email input in `LoginService.validate()` and add a dedicated unit test."*
47
+ >
48
+ > **You review the plan and reply in natural language:**
49
+
50
+ ```
51
+ The plan looks right, but don't change the DB schema.
52
+ Just fix it at the application layer in LoginService.
53
+ ```
54
+
55
+ > AI updates the plan accordingly and confirms.
56
+
57
+ ```bash
58
+ /implement-task TASK-20260319-100000
59
+ ```
60
+
61
+ > AI writes the fix, adds a test case for `user+tag@example.com`, and runs all tests — green.
14
62
 
15
- agent-infra provides standardized configuration for AI TUI tools (Claude Code, Codex, Gemini CLI, OpenCode) to collaborate effectively on the same project. A lightweight bootstrap CLI seeds the first command; all subsequent operations are AI skill-driven.
63
+ ```bash
64
+ /review-task TASK-20260319-100000
65
+ ```
66
+
67
+ > AI reviews its own implementation: *"Approved. 0 blockers, 0 major, 1 minor (missing JSDoc)."*
68
+
69
+ ```bash
70
+ /refine-task TASK-20260319-100000
71
+ ```
72
+
73
+ > AI fixes the minor issue and re-validates.
74
+
75
+ ```bash
76
+ /commit
77
+ /create-pr
78
+ /complete-task TASK-20260319-100000
79
+ ```
80
+
81
+ > Commit created, PR #43 opened (auto-linked to issue #42), task archived.
82
+
83
+ **9 commands. 1 natural-language correction. From issue to merged PR.** That is the entire SOP — programming can have a standard operating procedure too.
84
+
85
+ Every command above works the same way in Claude Code, Codex, Gemini CLI, and OpenCode. Switch tools mid-task — the workflow state follows.
86
+
87
+ ### What each skill does behind the scenes
16
88
 
17
- ### Key Features
89
+ These are not thin command aliases. Each skill encapsulates standardized processes that are tedious and error-prone when done by hand:
18
90
 
19
- - **Multi-AI Collaboration**: Structured workflows for Claude Code, Codex, Gemini CLI, and OpenCode to work together
20
- - **Bootstrap CLI + Skill-Driven**: One-time CLI init, then all operations are AI skills
21
- - **Bilingual Support**: Every user-facing file is available in English and Chinese
22
- - **Modular Design**: Two independent modules (`ai` and `github`) that can be installed separately
23
- - **Template Source Architecture**: `templates/` mirrors the working tree and is rendered into project files
24
- - **AI Intelligent Merge**: LLMs handle template merging during updates, preserving user customizations
91
+ - **Structured artifacts** every step produces a templated document (`analysis.md`, `plan.md`, `review.md`) with consistent structure, not free-form notes
92
+ - **Multi-round versioning** requirements changed? Run `analyze-task` again to get `analysis-r2.md`; the full revision history is preserved
93
+ - **Severity-classified reviews** `review-task` categorizes findings into Blocker / Major / Minor with file paths and fix suggestions, not a vague "looks good"
94
+ - **Cross-tool state continuity** `task.md` records who did what and when; Claude can analyze, Codex can implement, Gemini can review — context transfers seamlessly
95
+ - **Audit trail and co-authorship** every step appends to the Activity Log; the final commit includes `Co-Authored-By` lines for all participating AI agents
96
+
97
+ <a id="key-features"></a>
98
+
99
+ ## Key Features
100
+
101
+ - **Multi-AI collaboration**: one shared operating model for Claude Code, Codex, Gemini CLI, and OpenCode
102
+ - **Bootstrap CLI + skill-driven execution**: initialize once, then let AI skills drive day-to-day work
103
+ - **Bilingual project docs**: English-first docs with synchronized Chinese translations
104
+ - **Template-source architecture**: `templates/` mirrors the rendered project structure
105
+ - **AI-assisted updates**: template changes can be merged while preserving project-specific customization
106
+
107
+ <a id="quick-start"></a>
25
108
 
26
109
  ## Quick Start
27
110
 
28
111
  ### 1. Install agent-infra
29
112
 
30
- **Option A npm (recommended)**
113
+ **Option A - npm (recommended)**
31
114
 
32
115
  ```bash
33
116
  npm install -g @fitlab-ai/agent-infra
34
- npx @fitlab-ai/agent-infra init
35
117
  ```
36
118
 
37
- **Option B Shell script**
119
+ **Option B - Shell script**
38
120
 
39
121
  ```bash
122
+ # Convenience wrapper — detects Node.js and runs npm install -g internally
40
123
  curl -fsSL https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/install.sh | sh
41
124
  ```
42
125
 
43
- **Option C — Install from source**
126
+ ### Updating agent-infra
44
127
 
45
128
  ```bash
46
- git clone https://github.com/fitlab-ai/agent-infra.git
47
- cd agent-infra
48
- sh install.sh
129
+ npm update -g @fitlab-ai/agent-infra
130
+ ```
131
+
132
+ Check your current version:
133
+
134
+ ```bash
135
+ ai version
136
+ # or: agent-infra version
49
137
  ```
50
138
 
51
139
  ### 2. Initialize a new project
@@ -56,9 +144,9 @@ ai init
56
144
  # or: agent-infra init
57
145
  ```
58
146
 
59
- The CLI will interactively collect project info (name, org, language, etc.), install the `update-agent-infra` seed command for all AI TUIs, and generate `.airc.json`.
147
+ The CLI collects project metadata, installs the `update-agent-infra` seed command for all supported AI TUIs, and generates `.airc.json`.
60
148
 
61
- > **Tip:** `ai` is a shorthand for `agent-infra`. Both commands are equivalent.
149
+ > `ai` is a shorthand for `agent-infra`. Both commands are equivalent.
62
150
 
63
151
  ### 3. Render the full infrastructure
64
152
 
@@ -71,50 +159,186 @@ Open the project in any AI TUI and run `update-agent-infra`:
71
159
  | Gemini CLI | `/{{project}}:update-agent-infra` |
72
160
  | OpenCode | `/update-agent-infra` |
73
161
 
74
- This pulls the latest templates and renders all files. Use the same command for future updates it automatically handles both first-time setup and incremental updates.
162
+ This pulls the latest templates and renders all managed files. The same command is used both for first-time setup and for future template upgrades.
163
+
164
+ <a id="architecture-overview"></a>
165
+
166
+ ## Architecture Overview
167
+
168
+ agent-infra is intentionally simple: a bootstrap CLI creates the seed configuration, then AI skills and workflows take over.
169
+
170
+ ### End-to-End Flow
171
+
172
+ 1. **Install** — `npm install -g @fitlab-ai/agent-infra` (or use the shell script wrapper)
173
+ 2. **Initialize** — `ai init` in the project root to generate `.airc.json` and install the seed command
174
+ 3. **Render** — run `update-agent-infra` in any AI TUI to pull templates and generate all managed files
175
+ 4. **Develop** — use 28 built-in skills to drive the full lifecycle: `analysis → design → implementation → review → fix → commit`
176
+ 5. **Update** — run `update-agent-infra` again whenever a new template version is available
177
+
178
+ ### Layered Architecture
179
+
180
+ ```mermaid
181
+ block-beta
182
+ columns 4
183
+
184
+ block:tui:4
185
+ columns 4
186
+ claude["Claude Code"] codex["Codex"] gemini["Gemini CLI"] opencode["OpenCode"]
187
+ end
188
+
189
+ space:4
190
+
191
+ block:shared:4
192
+ columns 3
193
+ skills["28 Skills"] workflows["4 Workflows"] templates["Templates"]
194
+ end
195
+
196
+ space:4
197
+
198
+ block:project:4
199
+ columns 4
200
+ agents[".agents/"] config[".airc.json"] workspace[".agent-workspace/"] governance["AGENTS.md"]
201
+ end
202
+
203
+ tui -- "slash commands" --> shared
204
+ shared -- "renders into" --> project
205
+ ```
206
+
207
+ GitHub renders Mermaid diagrams natively. If a downstream renderer does not, the text above still explains the system structure.
208
+
209
+ <a id="what-you-get"></a>
75
210
 
76
211
  ## What You Get
77
212
 
78
213
  After setup, your project gains a complete AI collaboration infrastructure:
79
214
 
80
- ```
215
+ ```text
81
216
  my-project/
82
217
  ├── .agents/ # Shared AI collaboration config
83
- │ ├── skills/ # 30+ built-in AI skills
84
- │ ├── workflows/ # Structured development workflows
85
- │ └── templates/ # Task & artifact templates
218
+ │ ├── skills/ # 28 built-in AI skills
219
+ │ ├── workflows/ # 4 prebuilt workflows
220
+ │ └── templates/ # Task and artifact templates
86
221
  ├── .agent-workspace/ # Task workspace (git-ignored)
87
- ├── .claude/ # Claude Code config & commands
88
- ├── .gemini/ # Gemini CLI config & commands
89
- ├── .opencode/ # OpenCode config & commands
222
+ ├── .claude/ # Claude Code config and commands
223
+ ├── .gemini/ # Gemini CLI config and commands
224
+ ├── .opencode/ # OpenCode config and commands
90
225
  ├── .github/ # PR templates, issue forms, workflows
91
226
  ├── AGENTS.md # Universal AI agent instructions
92
- ├── CONTRIBUTING.md # Development guide
227
+ ├── CONTRIBUTING.md # Contribution guide
93
228
  ├── SECURITY.md # Security policy (English)
94
229
  ├── SECURITY.zh-CN.md # Security policy (Chinese)
95
230
  └── .airc.json # Central configuration
96
231
  ```
97
232
 
98
- ### Built-in AI Skills
233
+ <a id="built-in-ai-skills"></a>
99
234
 
100
- | Category | Skills | Description |
101
- |----------|--------|-------------|
102
- | **Task Management** | `create-task`, `analyze-task`, `import-issue`, `plan-task`, `implement-task`, `review-task`, `refine-task`, `complete-task` | Full development lifecycle |
103
- | **Code Quality** | `commit`, `test`, `test-integration` | Commit with co-authorship, run tests |
104
- | **PR & Issues** | `create-pr`, `sync-issue`, `sync-pr` | Create PRs, sync progress |
105
- | **Release** | `release`, `create-release-note` | Version release workflow |
106
- | **Security** | `import-dependabot`, `import-codescan` | Security alert triage |
107
- | **Maintenance** | `upgrade-dependency`, `refine-title` | Dependency updates, title formatting |
235
+ ## Built-in AI Skills
108
236
 
109
- > Every skill works across all supported AI TUIs same workflow, any tool.
237
+ agent-infra ships with **28 built-in AI skills**. They are organized by use case, but they all share the same design goal: every AI TUI should be able to execute the same workflow vocabulary in the same repository.
110
238
 
111
- ### Basic Workflow Example
239
+ <a id="task-lifecycle"></a>
112
240
 
113
- The simplest end-to-end development workflow:
241
+ ### Task Lifecycle
114
242
 
115
- ```
243
+ | Skill | Description | Parameters | Recommended use case |
244
+ |-------|-------------|------------|----------------------|
245
+ | `create-task` | Create a task scaffold from a natural-language request. | `description` | Start a new feature, bug-fix, or improvement from scratch. |
246
+ | `import-issue` | Import a GitHub Issue into the local task workspace. | `issue-number` | Convert an existing Issue into an actionable task folder. |
247
+ | `analyze-task` | Produce a requirement analysis artifact for an existing task. | `task-id` | Capture scope, risks, and impacted files before designing. |
248
+ | `plan-task` | Write the technical implementation plan with a review checkpoint. | `task-id` | Define the approach after analysis is complete. |
249
+ | `implement-task` | Implement the approved plan and produce an implementation report. | `task-id` | Write code, tests, and docs after plan approval. |
250
+ | `review-task` | Review the implementation and classify findings by severity. | `task-id` | Run a structured code review before merging. |
251
+ | `refine-task` | Fix review findings in priority order without expanding scope. | `task-id` | Address review feedback and re-validate the task. |
252
+ | `complete-task` | Mark the task complete and archive it after all gates pass. | `task-id` | Close out a task after review, tests, and commit are done. |
253
+
254
+ <a id="task-status"></a>
255
+
256
+ ### Task Status
257
+
258
+ | Skill | Description | Parameters | Recommended use case |
259
+ |-------|-------------|------------|----------------------|
260
+ | `check-task` | Inspect the current task status, workflow progress, and next step. | `task-id` | Check progress without modifying task state. |
261
+ | `block-task` | Move a task to blocked state and record the blocker reason. | `task-id`, `reason` (optional) | Pause work when an external dependency or decision is missing. |
262
+
263
+ <a id="issue-and-pr"></a>
264
+
265
+ ### Issue and PR
266
+
267
+ | Skill | Description | Parameters | Recommended use case |
268
+ |-------|-------------|------------|----------------------|
269
+ | `create-issue` | Create a GitHub Issue from a task file. | `task-id` | Push a local task into GitHub tracking. |
270
+ | `sync-issue` | Post task progress updates back to the linked GitHub Issue. | `task-id` or `issue-number` | Keep stakeholders updated as the task evolves. |
271
+ | `create-pr` | Open a Pull Request to an inferred or explicit target branch. | `target-branch` (optional) | Publish reviewed changes for merge. |
272
+ | `sync-pr` | Sync task progress and review metadata into the Pull Request. | `task-id` | Keep PR metadata aligned with the local task record. |
273
+
274
+ <a id="code-quality"></a>
275
+
276
+ ### Code Quality
277
+
278
+ | Skill | Description | Parameters | Recommended use case |
279
+ |-------|-------------|------------|----------------------|
280
+ | `commit` | Create a Git commit with task updates and copyright-year checks. | None | Finalize a coherent change set after tests pass. |
281
+ | `test` | Run the standard project validation flow. | None | Validate compile checks and unit tests after a change. |
282
+ | `test-integration` | Run integration or end-to-end validation. | None | Verify cross-module or workflow-level behavior. |
283
+
284
+ <a id="release-skills"></a>
285
+
286
+ ### Release
287
+
288
+ | Skill | Description | Parameters | Recommended use case |
289
+ |-------|-------------|------------|----------------------|
290
+ | `release` | Execute the version release workflow. | `version` (`X.Y.Z`) | Publish a new project release. |
291
+ | `create-release-note` | Generate release notes from PRs and commits. | `version`, `previous-version` (optional) | Prepare a changelog before shipping. |
292
+
293
+ <a id="security-skills"></a>
294
+
295
+ ### Security
296
+
297
+ | Skill | Description | Parameters | Recommended use case |
298
+ |-------|-------------|------------|----------------------|
299
+ | `import-dependabot` | Import a Dependabot alert and create a remediation task. | `alert-number` | Convert a dependency security alert into a tracked fix. |
300
+ | `close-dependabot` | Close a Dependabot alert with a documented rationale. | `alert-number` | Record why an alert does not require action. |
301
+ | `import-codescan` | Import a Code Scanning alert and create a remediation task. | `alert-number` | Triage CodeQL findings through the normal task workflow. |
302
+ | `close-codescan` | Close a Code Scanning alert with a documented rationale. | `alert-number` | Record why a scanning alert can be safely dismissed. |
303
+
304
+ <a id="project-maintenance"></a>
305
+
306
+ ### Project Maintenance
307
+
308
+ | Skill | Description | Parameters | Recommended use case |
309
+ |-------|-------------|------------|----------------------|
310
+ | `upgrade-dependency` | Upgrade a dependency from one version to another and verify it. | `package`, `old-version`, `new-version` | Perform controlled dependency maintenance. |
311
+ | `refine-title` | Rewrite an Issue or PR title into Conventional Commits format. | `number` | Normalize inconsistent GitHub titles. |
312
+ | `init-labels` | Initialize the repository's standard GitHub label set. | None | Bootstrap labels in a new repository. |
313
+ | `init-milestones` | Initialize the repository's milestone structure. | None | Bootstrap milestone tracking in a new repository. |
314
+ | `update-agent-infra` | Update the project's collaboration infrastructure to the latest template version. | None | Refresh shared AI tooling without rebuilding local conventions. |
315
+
316
+ > Every skill works across supported AI TUIs. The command prefix changes, but the workflow semantics stay the same.
317
+
318
+ <a id="prebuilt-workflows"></a>
319
+
320
+ ## Prebuilt Workflows
321
+
322
+ agent-infra includes **4 prebuilt workflows**. Three of them share the same gated delivery lifecycle:
323
+
324
+ `analysis -> design -> implementation -> review -> fix -> commit`
325
+
326
+ The fourth, `code-review`, is intentionally smaller and optimized for reviewing an existing PR or branch.
327
+
328
+ | Workflow | Best for | Step chain |
329
+ |----------|----------|------------|
330
+ | `feature-development` | Building a new feature or capability | `analysis -> design -> implementation -> review -> fix -> commit` |
331
+ | `bug-fix` | Diagnosing and fixing a defect with regression coverage | `analysis -> design -> implementation -> review -> fix -> commit` |
332
+ | `refactoring` | Structural changes that should preserve behavior | `analysis -> design -> implementation -> review -> fix -> commit` |
333
+ | `code-review` | Reviewing an existing PR or branch | `analysis -> review -> report` |
334
+
335
+ ### Example lifecycle
336
+
337
+ The simplest end-to-end delivery loop looks like this:
338
+
339
+ ```text
116
340
  import-issue #42 Import task from GitHub Issue
117
- (or: create-task "add dark mode") Or create task from description
341
+ (or: create-task "add dark mode") Or create a task from a description
118
342
  |
119
343
  | --> get task ID, e.g. T1
120
344
  v
@@ -124,7 +348,7 @@ import-issue #42 Import task from GitHub Issue
124
348
  plan-task T1 Design solution <-- human review
125
349
  |
126
350
  v
127
- implement-task T1 Write code & tests
351
+ implement-task T1 Write code and tests
128
352
  |
129
353
  v
130
354
  +-> review-task T1 Automated code review
@@ -144,27 +368,120 @@ import-issue #42 Import task from GitHub Issue
144
368
  commit Commit final code
145
369
  |
146
370
  v
147
- complete-task T1 Archive & done
371
+ complete-task T1 Archive and finish
148
372
  ```
149
373
 
374
+ <a id="configuration-reference"></a>
375
+
376
+ ## Configuration Reference
377
+
378
+ The generated `.airc.json` file is the central contract between the bootstrap CLI, templates, and future updates.
379
+
380
+ ### Example `.airc.json`
381
+
382
+ ```json
383
+ {
384
+ "project": "my-project",
385
+ "org": "my-org",
386
+ "language": "en",
387
+ "templateSource": "templates/",
388
+ "templateVersion": "v0.3.2",
389
+ "modules": ["ai", "github"],
390
+ "files": {
391
+ "managed": [
392
+ ".agents/skills/",
393
+ ".agents/templates/",
394
+ ".agents/workflows/",
395
+ ".claude/commands/",
396
+ ".gemini/commands/",
397
+ ".opencode/commands/"
398
+ ],
399
+ "merged": [
400
+ ".agents/README.md",
401
+ ".gitignore",
402
+ "AGENTS.md",
403
+ "CONTRIBUTING.md",
404
+ "SECURITY.md"
405
+ ],
406
+ "ejected": []
407
+ }
408
+ }
409
+ ```
410
+
411
+ ### Field reference
412
+
413
+ | Field | Meaning |
414
+ |-------|---------|
415
+ | `project` | Project name used when rendering commands, paths, and templates. |
416
+ | `org` | GitHub organization or owner used by generated metadata and links. |
417
+ | `language` | Primary project language or locale used by rendered templates. |
418
+ | `templateSource` | Local template root used during rendering. |
419
+ | `templateVersion` | Installed template version for future upgrades and drift tracking. |
420
+ | `modules` | Enabled template bundles. Supported values are `ai` and `github`. |
421
+ | `files` | Per-path update strategy configuration for managed, merged, and ejected files. |
422
+
423
+ ### Module reference
424
+
425
+ | Module | Includes |
426
+ |--------|----------|
427
+ | `ai` | `.agents/`, `.claude/`, `.gemini/`, `.opencode/`, `AGENTS.md`, and related collaboration assets |
428
+ | `github` | `.github/`, contribution templates, release config, and GitHub governance assets |
429
+
430
+ <a id="file-management-strategies"></a>
431
+
150
432
  ## File Management Strategies
151
433
 
152
- | Strategy | Meaning | Update Behavior |
153
- |----------|---------|----------------|
154
- | **managed** | agent-infra fully controls | Overwrite on update; users should not modify |
155
- | **merged** | Template + user customizations coexist | AI intelligent merge preserving user additions |
156
- | **ejected** | Generated only on first run | Never updated |
434
+ Each generated path is assigned an update strategy. That strategy determines how `update-agent-infra` treats the file later.
435
+
436
+ | Strategy | Meaning | Update behavior |
437
+ |----------|---------|-----------------|
438
+ | **managed** | agent-infra fully controls the file | Re-rendered and overwritten on update |
439
+ | **merged** | Template content and user customizations coexist | AI-assisted merge preserves local additions where possible |
440
+ | **ejected** | Generated once and then owned by the project | Never touched again by future updates |
441
+
442
+ ### Example strategy configuration
443
+
444
+ ```json
445
+ {
446
+ "files": {
447
+ "managed": [
448
+ ".agents/skills/",
449
+ ".github/workflows/pr-title-check.yml"
450
+ ],
451
+ "merged": [
452
+ ".gitignore",
453
+ "AGENTS.md",
454
+ "CONTRIBUTING.md"
455
+ ],
456
+ "ejected": [
457
+ "SECURITY.md"
458
+ ]
459
+ }
460
+ }
461
+ ```
462
+
463
+ ### Moving a file from `managed` to `ejected`
464
+
465
+ 1. Remove the path from the `managed` array in `.airc.json`.
466
+ 2. Add the same path to the `ejected` array.
467
+ 3. Run `update-agent-infra` again so future updates stop managing that file.
157
468
 
158
- Users can adjust strategies per file in `.airc.json`.
469
+ Use this when a file starts as template-owned but later becomes project-specific enough that automatic updates would create more noise than value.
470
+
471
+ <a id="version-management"></a>
159
472
 
160
473
  ## Version Management
161
474
 
162
- Uses semantic versioning via git tags. Template version is tracked in `.airc.json` as `templateVersion`.
475
+ agent-infra uses semantic versioning through Git tags and GitHub releases. The installed template version is recorded in `.airc.json` as `templateVersion`, which gives both humans and AI tools a stable reference point for upgrades.
476
+
477
+ <a id="contributing"></a>
163
478
 
164
479
  ## Contributing
165
480
 
166
481
  See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
167
482
 
483
+ <a id="license"></a>
484
+
168
485
  ## License
169
486
 
170
487
  [MIT](License.txt)