@fitlab-ai/agent-infra 0.3.0 → 0.3.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 (30) hide show
  1. package/README.md +359 -47
  2. package/README.zh-CN.md +360 -48
  3. package/package.json +1 -1
  4. package/templates/.agents/skills/check-task/SKILL.md +108 -94
  5. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +12 -0
  6. package/templates/.agents/skills/commit/SKILL.md +19 -4
  7. package/templates/.agents/skills/commit/SKILL.zh-CN.md +19 -4
  8. package/templates/.agents/skills/complete-task/SKILL.md +11 -1
  9. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +11 -1
  10. package/templates/.agents/skills/create-issue/SKILL.md +257 -0
  11. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +257 -0
  12. package/templates/.agents/skills/create-pr/SKILL.md +102 -4
  13. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +102 -4
  14. package/templates/.agents/skills/implement-task/SKILL.md +11 -3
  15. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +11 -3
  16. package/templates/.agents/skills/refine-task/SKILL.md +147 -137
  17. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +10 -2
  18. package/templates/.agents/skills/review-task/SKILL.md +196 -186
  19. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +13 -4
  20. package/templates/.agents/skills/sync-issue/SKILL.md +2 -1
  21. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +2 -1
  22. package/templates/.agents/skills/sync-pr/SKILL.md +294 -82
  23. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +271 -59
  24. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +1 -1
  25. package/templates/.claude/commands/create-issue.md +8 -0
  26. package/templates/.claude/commands/create-issue.zh-CN.md +8 -0
  27. package/templates/.gemini/commands/_project_/create-issue.toml +8 -0
  28. package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +8 -0
  29. package/templates/.opencode/commands/create-issue.md +11 -0
  30. package/templates/.opencode/commands/create-issue.zh-CN.md +11 -0
package/README.md CHANGED
@@ -5,42 +5,125 @@
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.
62
+
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.
14
82
 
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.
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.
16
84
 
17
- ### Key Features
85
+ Every command above works the same way in Claude Code, Codex, Gemini CLI, and OpenCode. Switch tools mid-task — the workflow state follows.
18
86
 
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
87
+ ### What each skill does behind the scenes
88
+
89
+ These are not thin command aliases. Each skill encapsulates standardized processes that are tedious and error-prone when done by hand:
90
+
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
117
  npx @fitlab-ai/agent-infra init
35
118
  ```
36
119
 
37
- **Option B Shell script**
120
+ **Option B - Shell script**
38
121
 
39
122
  ```bash
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
+ **Option C - Install from source**
44
127
 
45
128
  ```bash
46
129
  git clone https://github.com/fitlab-ai/agent-infra.git
@@ -56,9 +139,9 @@ ai init
56
139
  # or: agent-infra init
57
140
  ```
58
141
 
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`.
142
+ The CLI collects project metadata, installs the `update-agent-infra` seed command for all supported AI TUIs, and generates `.airc.json`.
60
143
 
61
- > **Tip:** `ai` is a shorthand for `agent-infra`. Both commands are equivalent.
144
+ > `ai` is a shorthand for `agent-infra`. Both commands are equivalent.
62
145
 
63
146
  ### 3. Render the full infrastructure
64
147
 
@@ -71,50 +154,186 @@ Open the project in any AI TUI and run `update-agent-infra`:
71
154
  | Gemini CLI | `/{{project}}:update-agent-infra` |
72
155
  | OpenCode | `/update-agent-infra` |
73
156
 
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.
157
+ 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.
158
+
159
+ <a id="architecture-overview"></a>
160
+
161
+ ## Architecture Overview
162
+
163
+ agent-infra is intentionally simple: a bootstrap CLI creates the seed configuration, then AI skills and workflows take over.
164
+
165
+ ### End-to-End Flow
166
+
167
+ 1. **Install** — `npm install -g @fitlab-ai/agent-infra` (or use the shell script)
168
+ 2. **Initialize** — `ai init` in the project root to generate `.airc.json` and install the seed command
169
+ 3. **Render** — run `update-agent-infra` in any AI TUI to pull templates and generate all managed files
170
+ 4. **Develop** — use 28 built-in skills to drive the full lifecycle: `analysis → design → implementation → review → fix → commit`
171
+ 5. **Update** — run `update-agent-infra` again whenever a new template version is available
172
+
173
+ ### Layered Architecture
174
+
175
+ ```mermaid
176
+ block-beta
177
+ columns 4
178
+
179
+ block:tui:4
180
+ columns 4
181
+ claude["Claude Code"] codex["Codex"] gemini["Gemini CLI"] opencode["OpenCode"]
182
+ end
183
+
184
+ space:4
185
+
186
+ block:shared:4
187
+ columns 3
188
+ skills["28 Skills"] workflows["4 Workflows"] templates["Templates"]
189
+ end
190
+
191
+ space:4
192
+
193
+ block:project:4
194
+ columns 4
195
+ agents[".agents/"] config[".airc.json"] workspace[".agent-workspace/"] governance["AGENTS.md"]
196
+ end
197
+
198
+ tui -- "slash commands" --> shared
199
+ shared -- "renders into" --> project
200
+ ```
201
+
202
+ GitHub renders Mermaid diagrams natively. If a downstream renderer does not, the text above still explains the system structure.
203
+
204
+ <a id="what-you-get"></a>
75
205
 
76
206
  ## What You Get
77
207
 
78
208
  After setup, your project gains a complete AI collaboration infrastructure:
79
209
 
80
- ```
210
+ ```text
81
211
  my-project/
82
212
  ├── .agents/ # Shared AI collaboration config
83
- │ ├── skills/ # 30+ built-in AI skills
84
- │ ├── workflows/ # Structured development workflows
85
- │ └── templates/ # Task & artifact templates
213
+ │ ├── skills/ # 28 built-in AI skills
214
+ │ ├── workflows/ # 4 prebuilt workflows
215
+ │ └── templates/ # Task and artifact templates
86
216
  ├── .agent-workspace/ # Task workspace (git-ignored)
87
- ├── .claude/ # Claude Code config & commands
88
- ├── .gemini/ # Gemini CLI config & commands
89
- ├── .opencode/ # OpenCode config & commands
217
+ ├── .claude/ # Claude Code config and commands
218
+ ├── .gemini/ # Gemini CLI config and commands
219
+ ├── .opencode/ # OpenCode config and commands
90
220
  ├── .github/ # PR templates, issue forms, workflows
91
221
  ├── AGENTS.md # Universal AI agent instructions
92
- ├── CONTRIBUTING.md # Development guide
222
+ ├── CONTRIBUTING.md # Contribution guide
93
223
  ├── SECURITY.md # Security policy (English)
94
224
  ├── SECURITY.zh-CN.md # Security policy (Chinese)
95
225
  └── .airc.json # Central configuration
96
226
  ```
97
227
 
98
- ### Built-in AI Skills
228
+ <a id="built-in-ai-skills"></a>
99
229
 
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 |
230
+ ## Built-in AI Skills
108
231
 
109
- > Every skill works across all supported AI TUIs same workflow, any tool.
232
+ 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
233
 
111
- ### Basic Workflow Example
234
+ <a id="task-lifecycle"></a>
112
235
 
113
- The simplest end-to-end development workflow:
236
+ ### Task Lifecycle
114
237
 
115
- ```
238
+ | Skill | Description | Parameters | Recommended use case |
239
+ |-------|-------------|------------|----------------------|
240
+ | `create-task` | Create a task scaffold from a natural-language request. | `description` | Start a new feature, bug-fix, or improvement from scratch. |
241
+ | `import-issue` | Import a GitHub Issue into the local task workspace. | `issue-number` | Convert an existing Issue into an actionable task folder. |
242
+ | `analyze-task` | Produce a requirement analysis artifact for an existing task. | `task-id` | Capture scope, risks, and impacted files before designing. |
243
+ | `plan-task` | Write the technical implementation plan with a review checkpoint. | `task-id` | Define the approach after analysis is complete. |
244
+ | `implement-task` | Implement the approved plan and produce an implementation report. | `task-id` | Write code, tests, and docs after plan approval. |
245
+ | `review-task` | Review the implementation and classify findings by severity. | `task-id` | Run a structured code review before merging. |
246
+ | `refine-task` | Fix review findings in priority order without expanding scope. | `task-id` | Address review feedback and re-validate the task. |
247
+ | `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. |
248
+
249
+ <a id="task-status"></a>
250
+
251
+ ### Task Status
252
+
253
+ | Skill | Description | Parameters | Recommended use case |
254
+ |-------|-------------|------------|----------------------|
255
+ | `check-task` | Inspect the current task status, workflow progress, and next step. | `task-id` | Check progress without modifying task state. |
256
+ | `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. |
257
+
258
+ <a id="issue-and-pr"></a>
259
+
260
+ ### Issue and PR
261
+
262
+ | Skill | Description | Parameters | Recommended use case |
263
+ |-------|-------------|------------|----------------------|
264
+ | `create-issue` | Create a GitHub Issue from a task file. | `task-id` | Push a local task into GitHub tracking. |
265
+ | `sync-issue` | Post task progress updates back to the linked GitHub Issue. | `task-id` or `issue-number` | Keep stakeholders updated as the task evolves. |
266
+ | `create-pr` | Open a Pull Request to an inferred or explicit target branch. | `target-branch` (optional) | Publish reviewed changes for merge. |
267
+ | `sync-pr` | Sync task progress and review metadata into the Pull Request. | `task-id` | Keep PR metadata aligned with the local task record. |
268
+
269
+ <a id="code-quality"></a>
270
+
271
+ ### Code Quality
272
+
273
+ | Skill | Description | Parameters | Recommended use case |
274
+ |-------|-------------|------------|----------------------|
275
+ | `commit` | Create a Git commit with task updates and copyright-year checks. | None | Finalize a coherent change set after tests pass. |
276
+ | `test` | Run the standard project validation flow. | None | Validate compile checks and unit tests after a change. |
277
+ | `test-integration` | Run integration or end-to-end validation. | None | Verify cross-module or workflow-level behavior. |
278
+
279
+ <a id="release-skills"></a>
280
+
281
+ ### Release
282
+
283
+ | Skill | Description | Parameters | Recommended use case |
284
+ |-------|-------------|------------|----------------------|
285
+ | `release` | Execute the version release workflow. | `version` (`X.Y.Z`) | Publish a new project release. |
286
+ | `create-release-note` | Generate release notes from PRs and commits. | `version`, `previous-version` (optional) | Prepare a changelog before shipping. |
287
+
288
+ <a id="security-skills"></a>
289
+
290
+ ### Security
291
+
292
+ | Skill | Description | Parameters | Recommended use case |
293
+ |-------|-------------|------------|----------------------|
294
+ | `import-dependabot` | Import a Dependabot alert and create a remediation task. | `alert-number` | Convert a dependency security alert into a tracked fix. |
295
+ | `close-dependabot` | Close a Dependabot alert with a documented rationale. | `alert-number` | Record why an alert does not require action. |
296
+ | `import-codescan` | Import a Code Scanning alert and create a remediation task. | `alert-number` | Triage CodeQL findings through the normal task workflow. |
297
+ | `close-codescan` | Close a Code Scanning alert with a documented rationale. | `alert-number` | Record why a scanning alert can be safely dismissed. |
298
+
299
+ <a id="project-maintenance"></a>
300
+
301
+ ### Project Maintenance
302
+
303
+ | Skill | Description | Parameters | Recommended use case |
304
+ |-------|-------------|------------|----------------------|
305
+ | `upgrade-dependency` | Upgrade a dependency from one version to another and verify it. | `package`, `old-version`, `new-version` | Perform controlled dependency maintenance. |
306
+ | `refine-title` | Rewrite an Issue or PR title into Conventional Commits format. | `number` | Normalize inconsistent GitHub titles. |
307
+ | `init-labels` | Initialize the repository's standard GitHub label set. | None | Bootstrap labels in a new repository. |
308
+ | `init-milestones` | Initialize the repository's milestone structure. | None | Bootstrap milestone tracking in a new repository. |
309
+ | `update-agent-infra` | Update the project's collaboration infrastructure to the latest template version. | None | Refresh shared AI tooling without rebuilding local conventions. |
310
+
311
+ > Every skill works across supported AI TUIs. The command prefix changes, but the workflow semantics stay the same.
312
+
313
+ <a id="prebuilt-workflows"></a>
314
+
315
+ ## Prebuilt Workflows
316
+
317
+ agent-infra includes **4 prebuilt workflows**. Three of them share the same gated delivery lifecycle:
318
+
319
+ `analysis -> design -> implementation -> review -> fix -> commit`
320
+
321
+ The fourth, `code-review`, is intentionally smaller and optimized for reviewing an existing PR or branch.
322
+
323
+ | Workflow | Best for | Step chain |
324
+ |----------|----------|------------|
325
+ | `feature-development` | Building a new feature or capability | `analysis -> design -> implementation -> review -> fix -> commit` |
326
+ | `bug-fix` | Diagnosing and fixing a defect with regression coverage | `analysis -> design -> implementation -> review -> fix -> commit` |
327
+ | `refactoring` | Structural changes that should preserve behavior | `analysis -> design -> implementation -> review -> fix -> commit` |
328
+ | `code-review` | Reviewing an existing PR or branch | `analysis -> review -> report` |
329
+
330
+ ### Example lifecycle
331
+
332
+ The simplest end-to-end delivery loop looks like this:
333
+
334
+ ```text
116
335
  import-issue #42 Import task from GitHub Issue
117
- (or: create-task "add dark mode") Or create task from description
336
+ (or: create-task "add dark mode") Or create a task from a description
118
337
  |
119
338
  | --> get task ID, e.g. T1
120
339
  v
@@ -124,7 +343,7 @@ import-issue #42 Import task from GitHub Issue
124
343
  plan-task T1 Design solution <-- human review
125
344
  |
126
345
  v
127
- implement-task T1 Write code & tests
346
+ implement-task T1 Write code and tests
128
347
  |
129
348
  v
130
349
  +-> review-task T1 Automated code review
@@ -144,27 +363,120 @@ import-issue #42 Import task from GitHub Issue
144
363
  commit Commit final code
145
364
  |
146
365
  v
147
- complete-task T1 Archive & done
366
+ complete-task T1 Archive and finish
148
367
  ```
149
368
 
369
+ <a id="configuration-reference"></a>
370
+
371
+ ## Configuration Reference
372
+
373
+ The generated `.airc.json` file is the central contract between the bootstrap CLI, templates, and future updates.
374
+
375
+ ### Example `.airc.json`
376
+
377
+ ```json
378
+ {
379
+ "project": "my-project",
380
+ "org": "my-org",
381
+ "language": "en",
382
+ "templateSource": "templates/",
383
+ "templateVersion": "v0.3.1",
384
+ "modules": ["ai", "github"],
385
+ "files": {
386
+ "managed": [
387
+ ".agents/skills/",
388
+ ".agents/templates/",
389
+ ".agents/workflows/",
390
+ ".claude/commands/",
391
+ ".gemini/commands/",
392
+ ".opencode/commands/"
393
+ ],
394
+ "merged": [
395
+ ".agents/README.md",
396
+ ".gitignore",
397
+ "AGENTS.md",
398
+ "CONTRIBUTING.md",
399
+ "SECURITY.md"
400
+ ],
401
+ "ejected": []
402
+ }
403
+ }
404
+ ```
405
+
406
+ ### Field reference
407
+
408
+ | Field | Meaning |
409
+ |-------|---------|
410
+ | `project` | Project name used when rendering commands, paths, and templates. |
411
+ | `org` | GitHub organization or owner used by generated metadata and links. |
412
+ | `language` | Primary project language or locale used by rendered templates. |
413
+ | `templateSource` | Local template root used during rendering. |
414
+ | `templateVersion` | Installed template version for future upgrades and drift tracking. |
415
+ | `modules` | Enabled template bundles. Supported values are `ai` and `github`. |
416
+ | `files` | Per-path update strategy configuration for managed, merged, and ejected files. |
417
+
418
+ ### Module reference
419
+
420
+ | Module | Includes |
421
+ |--------|----------|
422
+ | `ai` | `.agents/`, `.claude/`, `.gemini/`, `.opencode/`, `AGENTS.md`, and related collaboration assets |
423
+ | `github` | `.github/`, contribution templates, release config, and GitHub governance assets |
424
+
425
+ <a id="file-management-strategies"></a>
426
+
150
427
  ## File Management Strategies
151
428
 
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 |
429
+ Each generated path is assigned an update strategy. That strategy determines how `update-agent-infra` treats the file later.
430
+
431
+ | Strategy | Meaning | Update behavior |
432
+ |----------|---------|-----------------|
433
+ | **managed** | agent-infra fully controls the file | Re-rendered and overwritten on update |
434
+ | **merged** | Template content and user customizations coexist | AI-assisted merge preserves local additions where possible |
435
+ | **ejected** | Generated once and then owned by the project | Never touched again by future updates |
436
+
437
+ ### Example strategy configuration
438
+
439
+ ```json
440
+ {
441
+ "files": {
442
+ "managed": [
443
+ ".agents/skills/",
444
+ ".github/workflows/pr-title-check.yml"
445
+ ],
446
+ "merged": [
447
+ ".gitignore",
448
+ "AGENTS.md",
449
+ "CONTRIBUTING.md"
450
+ ],
451
+ "ejected": [
452
+ "SECURITY.md"
453
+ ]
454
+ }
455
+ }
456
+ ```
457
+
458
+ ### Moving a file from `managed` to `ejected`
459
+
460
+ 1. Remove the path from the `managed` array in `.airc.json`.
461
+ 2. Add the same path to the `ejected` array.
462
+ 3. Run `update-agent-infra` again so future updates stop managing that file.
157
463
 
158
- Users can adjust strategies per file in `.airc.json`.
464
+ Use this when a file starts as template-owned but later becomes project-specific enough that automatic updates would create more noise than value.
465
+
466
+ <a id="version-management"></a>
159
467
 
160
468
  ## Version Management
161
469
 
162
- Uses semantic versioning via git tags. Template version is tracked in `.airc.json` as `templateVersion`.
470
+ 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.
471
+
472
+ <a id="contributing"></a>
163
473
 
164
474
  ## Contributing
165
475
 
166
476
  See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
167
477
 
478
+ <a id="license"></a>
479
+
168
480
  ## License
169
481
 
170
482
  [MIT](License.txt)