ai-ops-cli 0.2.6 → 1.0.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 (69) hide show
  1. package/README.ko.md +195 -0
  2. package/README.md +126 -155
  3. package/data/context-layer/AGENTS.md +30 -0
  4. package/data/context-layer/CLAUDE.md +14 -0
  5. package/data/context-layer/GEMINI.md +14 -0
  6. package/data/context-layer/docs/agent/checks/impact-checklist.md +16 -0
  7. package/data/context-layer/docs/agent/checks/review-checklist.md +17 -0
  8. package/data/context-layer/docs/agent/maps/codebase-map.md +16 -0
  9. package/data/context-layer/docs/agent/rules/00-agent-baseline.md +47 -0
  10. package/data/context-layer/docs/agent/rules/doc-update-rules.md +22 -0
  11. package/data/context-layer/docs/agent/rules/routing-rules.md +22 -0
  12. package/data/context-layer/docs/agent/rules/stop-rules.md +20 -0
  13. package/data/context-layer/docs/agent/workflow.md +25 -0
  14. package/data/context-layer/docs/business/business-rules.md +16 -0
  15. package/data/context-layer/docs/docs-status.md +14 -0
  16. package/data/packs/pack-registry.json +8 -0
  17. package/data/packs/spec-lifecycle/docs/specs/README.ko.md +28 -0
  18. package/data/packs/spec-lifecycle/docs/specs/README.md +28 -0
  19. package/data/packs/spec-lifecycle/docs/specs/baseline/.gitkeep +1 -0
  20. package/data/packs/spec-lifecycle/docs/specs/initial-build/.gitkeep +1 -0
  21. package/data/skills/README.ko.md +184 -0
  22. package/data/skills/README.md +29 -2
  23. package/data/skills/skill-registry.json +64 -16
  24. package/data/skills/task-skills/doc-impact-reviewer/SKILL.md +101 -0
  25. package/data/skills/task-skills/doc-impact-reviewer/agents/openai.yaml +6 -0
  26. package/data/skills/task-skills/spec-baseline-sync/SKILL.md +134 -0
  27. package/data/skills/task-skills/spec-baseline-sync/agents/openai.yaml +6 -0
  28. package/data/skills/task-skills/spec-baseline-sync/references/template.md +14 -0
  29. package/data/skills/task-skills/spec-product-01-idea-to-brief/SKILL.md +78 -0
  30. package/data/skills/task-skills/spec-product-01-idea-to-brief/agents/openai.yaml +6 -0
  31. package/data/skills/task-skills/spec-product-01-idea-to-brief/references/template.md +36 -0
  32. package/data/skills/task-skills/spec-product-02-brief-to-technical-context/SKILL.md +91 -0
  33. package/data/skills/task-skills/spec-product-02-brief-to-technical-context/agents/openai.yaml +6 -0
  34. package/data/skills/task-skills/spec-product-02-brief-to-technical-context/references/template.md +58 -0
  35. package/data/skills/task-skills/spec-product-03-brief-to-product-spec/SKILL.md +85 -0
  36. package/data/skills/task-skills/spec-product-03-brief-to-product-spec/agents/openai.yaml +6 -0
  37. package/data/skills/task-skills/spec-product-03-brief-to-product-spec/references/template.md +41 -0
  38. package/data/skills/task-skills/spec-product-04-product-spec-to-ui-spec/SKILL.md +93 -0
  39. package/data/skills/task-skills/spec-product-04-product-spec-to-ui-spec/agents/openai.yaml +6 -0
  40. package/data/skills/task-skills/spec-product-04-product-spec-to-ui-spec/references/stitch-prompt-template.md +41 -0
  41. package/data/skills/task-skills/spec-product-04-product-spec-to-ui-spec/references/ui-spec-template.md +39 -0
  42. package/data/skills/task-skills/spec-product-05-spec-to-work-packets/SKILL.md +157 -0
  43. package/data/skills/task-skills/spec-product-05-spec-to-work-packets/agents/openai.yaml +6 -0
  44. package/data/skills/task-skills/spec-product-05-spec-to-work-packets/references/stitch-html-review.md +25 -0
  45. package/data/skills/task-skills/spec-product-05-spec-to-work-packets/references/work-packet-template.md +67 -0
  46. package/data/skills/task-skills/spec-shared-glossary-sync/SKILL.md +102 -0
  47. package/data/skills/task-skills/spec-shared-glossary-sync/agents/openai.yaml +6 -0
  48. package/data/skills/task-skills/spec-shared-glossary-sync/references/checklist.md +36 -0
  49. package/data/skills/task-skills/spec-shared-glossary-sync/references/template.md +58 -0
  50. package/data/subagents/README.ko.md +49 -0
  51. package/data/subagents/README.md +49 -0
  52. package/data/subagents/security-gate/PROMPT.md +18 -0
  53. package/data/subagents/security-gate/claude.frontmatter.yaml +8 -0
  54. package/data/subagents/security-gate/codex.frontmatter.toml +6 -0
  55. package/data/subagents/security-gate/gemini.frontmatter.yaml +6 -0
  56. package/data/subagents/security-reviewer/PROMPT.md +17 -0
  57. package/data/subagents/security-reviewer/claude.frontmatter.yaml +9 -0
  58. package/data/subagents/security-reviewer/codex.frontmatter.toml +6 -0
  59. package/data/subagents/security-reviewer/gemini.frontmatter.yaml +6 -0
  60. package/data/subagents/subagent-registry.json +14 -0
  61. package/dist/bin/index.js +2103 -1713
  62. package/dist/bin/index.js.map +1 -1
  63. package/package.json +2 -2
  64. package/data/presets.yaml +0 -35
  65. package/data/rules/code-philosophy.yaml +0 -35
  66. package/data/rules/communication.yaml +0 -12
  67. package/data/rules/naming-convention.yaml +0 -10
  68. package/data/rules/plan-mode.yaml +0 -32
  69. package/data/rules/role-persona.yaml +0 -14
package/README.ko.md ADDED
@@ -0,0 +1,195 @@
1
+ # ai-ops-cli
2
+
3
+ [English](./README.md)
4
+
5
+ `ai-ops-cli`는 프로젝트에 AI agent operating layer를 설치하고, 사용자 환경에 agent skills/subagents를 설치하는 CLI입니다.
6
+
7
+ 이 문서는 현재 구현된 breaking model을 설명합니다. old rules + skills scaffolder 모델은 deprecated 문맥으로만 남깁니다.
8
+
9
+ ## Current Breaking Model
10
+
11
+ ```mermaid
12
+ flowchart TD
13
+ init["ai-ops init"] --> layer["Project operating layer 설치"]
14
+ layer --> entry["AGENTS.md canonical entrypoint"]
15
+ layer --> adapters["GEMINI.md / CLAUDE.md adapters"]
16
+ layer --> docs["docs/agent/* / docs/business/*"]
17
+ layer --> state[".ai-ops/manifest.json / context-layer.json"]
18
+
19
+ skill["ai-ops skill ..."] --> globalSkills["Global skills only"]
20
+ subagent["ai-ops subagent ..."] --> globalSubagents["Global subagents only"]
21
+ pack["ai-ops pack ..."] --> docsSpecs["optional docs/specs/ pack"]
22
+ ```
23
+
24
+ 핵심 경계:
25
+
26
+ - project scope는 operating layer 문서만 관리합니다.
27
+ - global scope는 skills/subagents만 관리합니다.
28
+ - `AGENTS.md`가 canonical entrypoint입니다.
29
+ - `GEMINI.md`와 `CLAUDE.md`는 `AGENTS.md`를 기준으로 삼게 하는 adapter입니다.
30
+ - `docs/specs/`는 optional pack 위치입니다.
31
+ - global asset 명령은 `AI_OPS_HOME` 또는 `HOME`이 없으면 cwd fallback 없이 실패합니다.
32
+
33
+ ## 설치 대상
34
+
35
+ Project repo:
36
+
37
+ ```text
38
+ AGENTS.md
39
+ GEMINI.md
40
+ CLAUDE.md
41
+ docs/agent/rules/00-agent-baseline.md
42
+ docs/agent/workflow.md
43
+ docs/agent/rules/routing-rules.md
44
+ docs/agent/rules/doc-update-rules.md
45
+ docs/agent/rules/stop-rules.md
46
+ docs/agent/checks/impact-checklist.md
47
+ docs/agent/checks/review-checklist.md
48
+ docs/agent/maps/codebase-map.md
49
+ docs/business/business-rules.md
50
+ docs/docs-status.md
51
+ .ai-ops/manifest.json
52
+ .ai-ops/context-layer.json
53
+ ```
54
+
55
+ `docs/agent/rules/00-agent-baseline.md`는 기존 `role-persona`, `communication`, `code-philosophy`, `naming-convention`, `plan-mode`의 기본 의도를 새 operating layer 문서로 이관한 Active 규칙입니다. `AGENTS.md` 직후 먼저 읽습니다.
56
+
57
+ Global tool home:
58
+
59
+ ```text
60
+ skills/*
61
+ subagents/*
62
+ ```
63
+
64
+ ## 수정 FAQ
65
+
66
+ ### `ai-ops update`가 덮어쓰는 파일은 무엇인가요?
67
+
68
+ `AGENTS.md`, `GEMINI.md`, `CLAUDE.md`, `docs/agent/rules/*`, `docs/agent/checks/*`, `docs/agent/workflow.md`는 ai-ops managed 문서입니다. 이 파일의 `<!-- ai-ops:start -->`부터 `<!-- ai-ops:end -->`까지는 CLI 템플릿 영역이고, `ai-ops update` 때 현재 CLI 템플릿으로 다시 적용됩니다. 사용자가 이 영역을 직접 수정하면 다음 update에서 유지되지 않습니다.
69
+
70
+ `.ai-ops/manifest.json`과 `.ai-ops/context-layer.json`도 직접 편집 대상이 아닙니다. 각각 설치 상태와 문서 index를 기록하는 CLI 상태 파일입니다.
71
+
72
+ ### 사용자가 직접 수정해야 하는 파일은 무엇인가요?
73
+
74
+ 프로젝트 지식은 project-owned 문서에 적습니다. 기본 project-owned 문서는 `docs/agent/maps/codebase-map.md`, `docs/business/business-rules.md`, `docs/docs-status.md`입니다. `docs/agent/maps/codebase-map.md`와 `docs/business/business-rules.md`는 처음에는 Reserved 템플릿이지만, 프로젝트가 실제 내용을 채운 뒤에는 update가 자동으로 덮어쓰지 않습니다.
75
+
76
+ `docs/docs-status.md`는 project-owned 문서이지만 자유 메모장이 아니라 context-layer registry입니다. 문서 status/frontmatter를 바꿀 때 함께 맞추는 파일이며, update 과정에서 manifest와 실제 문서 frontmatter 기준으로 테이블이 정리될 수 있습니다.
77
+
78
+ ### 프로젝트 고유 agent rule은 어디에 적나요?
79
+
80
+ 현재 기본 layer에는 프로젝트 구조와 비즈니스 규칙을 담는 project-owned 문서가 있지만, 프로젝트별 agent 행동 규칙만을 위한 별도 Active 문서는 아직 first-class 템플릿으로 열려 있지 않습니다. 그래서 `AGENTS.md`의 managed 영역이나 tool adapter에 직접 규칙을 추가하는 방식은 update-safe한 계약이 아닙니다.
81
+
82
+ 프로젝트별 agent rule을 안정적으로 지원하려면 `docs/agent/rules/project-rules.md` 같은 project-owned Active 문서를 추가하고, manifest/context-layer/docs-status가 함께 추적하도록 제품 계약을 확장하는 것이 다음 개선 후보입니다.
83
+
84
+ ## 목표 CLI 표면
85
+
86
+ ```text
87
+ ai-ops [command]
88
+
89
+ Commands:
90
+ init Install or refresh the project agent operating layer
91
+ diff Show drift in the project operating layer
92
+ update Re-apply the project operating layer
93
+ audit Check frontmatter, docs-status, manifest, and context-layer consistency
94
+ uninstall Remove project-managed operating layer files
95
+ skill Manage global agent skills
96
+ subagent Manage global agent subagents
97
+ pack Manage optional project operating layer packs
98
+ ```
99
+
100
+ `--tool`은 유지합니다. Codex, Claude Code, Gemini CLI가 서로 다른 discovery 위치와 adapter 파일을 사용하기 때문입니다.
101
+
102
+ Skill lifecycle 명령:
103
+
104
+ ```bash
105
+ ai-ops skill list
106
+ ai-ops skill install skill-load-check --tool codex
107
+ ai-ops skill install doc-impact-reviewer --tool codex
108
+ ai-ops skill diff
109
+ ai-ops skill update
110
+ ai-ops skill uninstall skill-load-check
111
+ ```
112
+
113
+ `doc-impact-reviewer`는 변경 완료 또는 커밋 직전에 운영 문서 영향도를 확인하는 수동 task skill입니다. `$doc-impact-reviewer`로 호출하면 git status/diff를 보고 `required / recommended / not needed` 문서 후보와 미갱신 리스크를 제안합니다. 사용자 승인 전에는 문서를 수정하지 않고, 직접 staging/commit도 하지 않습니다.
114
+
115
+ Subagent lifecycle 명령:
116
+
117
+ ```bash
118
+ ai-ops subagent list
119
+ ai-ops subagent install security-gate --tool codex
120
+ ai-ops subagent diff
121
+ ai-ops subagent update
122
+ ai-ops subagent uninstall security-gate
123
+ ```
124
+
125
+ Subagent는 항상 global tool home에 설치됩니다. Codex는 `.codex/agents/<id>.toml`, Claude Code는 `.claude/agents/<id>.md`, Gemini CLI는 `.gemini/agents/<id>.md`를 사용하고, 상태는 `.ai-ops/subagents-manifest.json`에만 기록합니다.
126
+
127
+ Pack lifecycle 명령:
128
+
129
+ ```bash
130
+ ai-ops init --tool codex
131
+ ai-ops pack list
132
+ ai-ops pack install spec-lifecycle
133
+ ai-ops pack diff spec-lifecycle
134
+ ai-ops pack update spec-lifecycle
135
+ ai-ops pack uninstall spec-lifecycle
136
+ ```
137
+
138
+ `spec-lifecycle` pack은 `docs/specs/README.md`, `docs/specs/README.ko.md`, `docs/specs/baseline/.gitkeep`, `docs/specs/initial-build/.gitkeep`를 설치합니다. Markdown 문서만 context-layer와 `docs/docs-status.md` 감사 대상이고, `.gitkeep`은 manifest의 일반 pack file로만 기록됩니다.
139
+
140
+ ## Deprecated Old Model
141
+
142
+ 다음 동작은 현재 코드나 과거 README에 남아 있을 수 있지만 새 계약에서는 제거 대상입니다.
143
+
144
+ - preset-first init UX
145
+ - project scope skill 설치
146
+ - `ai-ops skill install --project`
147
+ - project-installed skill metadata
148
+ - `.ai-ops-manifest.json`
149
+ - legacy manifest migration
150
+ - root `specs/`
151
+ - `ai-ops spec init`
152
+
153
+ 기존 프로젝트 자동 마이그레이션은 제공하지 않습니다. 기존 사용자는 old CLI로 `ai-ops uninstall`을 실행한 뒤 새 major CLI로 `ai-ops init`을 다시 실행합니다.
154
+
155
+ ## Old Model Command Notes
156
+
157
+ Deprecated old model 문맥에서만 아래 명령을 과거 project scope skill 설치 예시로 남깁니다. 현재 skill CLI는 global-only이며 `--project`, `--global`, `--scope`를 공개 옵션으로 제공하지 않습니다.
158
+
159
+ ```bash
160
+ ai-ops skill install skill-load-check --project --tool codex
161
+ ```
162
+
163
+ Deprecated old model 문맥에서만 유지되는 항목:
164
+
165
+ - `--project`는 project scope skill 설치용 old option입니다.
166
+ - `--global`, `--scope`는 skill scope를 직접 지정하던 old option입니다.
167
+ - `spec init`은 root `specs/`를 만들던 제거된 old command입니다.
168
+ - `.ai-ops-manifest.json`는 old project manifest입니다.
169
+
170
+ ## 개발
171
+
172
+ 저장소 루트 기준:
173
+
174
+ ```bash
175
+ npm install
176
+ npm run build
177
+ npm run compile
178
+ npm test
179
+ ```
180
+
181
+ CLI workspace만 확인할 때:
182
+
183
+ ```bash
184
+ npm run build --workspace=apps/cli
185
+ npm run test --workspace=apps/cli
186
+ ```
187
+
188
+ 코드와 운영 문서 변경은 `npm run check`를 기본 검증으로 사용합니다. CLI 배포 산출물 확인은 `npm run build`와 `npm run compile`을 함께 사용합니다.
189
+
190
+ Self-dogfood 검증은 `npm run build` 후 이 repo에 `init --tool codex --tool gemini --tool claude-code`를 적용하고, `diff`, `audit`, `update --force`, `uninstall --yes`, 재-`init`, 재-`audit` 순서로 확인합니다. 이 repo에는 `spec-lifecycle` pack을 설치하지 않고 `pack list`에서 `not installed` 상태만 확인합니다.
191
+
192
+ ## 관련 문서
193
+
194
+ - [Master blueprint](../../docs/plan.md)
195
+ - [Implementation playbook](../../docs/implementation-playbook.md)
package/README.md CHANGED
@@ -1,86 +1,85 @@
1
1
  # ai-ops-cli
2
2
 
3
- CLI for managing core AI tool rules and agent skills across projects.
3
+ [Korean](./README.ko.md)
4
4
 
5
- ## Why this exists
5
+ `ai-ops-cli` installs an AI agent operating layer into a project and installs reusable agent skills/subagents into the user's global tool environment.
6
6
 
7
- `ai-ops-cli` reduces configuration drift across AI coding tools.
7
+ This document describes the currently implemented breaking model. The old rules + skills scaffolder model remains only as deprecated context.
8
8
 
9
- - different tools use different file layouts and loading models
10
- - manual sync across tools is error-prone over time
11
- - teams need a deterministic setup for shared core rules and installable skills
9
+ ## Current Breaking Model
12
10
 
13
- The CLI treats these as separate sources of truth:
11
+ ```mermaid
12
+ flowchart TD
13
+ init["ai-ops init"] --> layer["Install project operating layer"]
14
+ layer --> entry["AGENTS.md canonical entrypoint"]
15
+ layer --> adapters["GEMINI.md / CLAUDE.md adapters"]
16
+ layer --> docs["docs/agent/* / docs/business/*"]
17
+ layer --> state[".ai-ops/manifest.json / context-layer.json"]
14
18
 
15
- - `apps/cli/data/rules/*.yaml`: always-loaded core rules only
16
- - `apps/cli/data/skills/skill-registry.json`: install/catalog metadata for skills
17
- - `apps/cli/data/skills/reference-skills/<skill-id>/`: installable reference skills
18
- - `apps/cli/data/skills/task-skills/<skill-id>/`: installable task skills
19
- - `apps/cli/data/presets.yaml`: preset-to-core-rule mapping
19
+ skill["ai-ops skill ..."] --> globalSkills["Global skills only"]
20
+ subagent["ai-ops subagent ..."] --> globalSubagents["Global subagents only"]
21
+ pack["ai-ops pack ..."] --> docsSpecs["optional docs/specs/ pack"]
22
+ ```
20
23
 
21
- ## What this CLI provides
24
+ Core boundaries:
22
25
 
23
- - interactive project initialization (`ai-ops init`)
24
- - skill package installation and lifecycle management (`ai-ops skill ...`)
25
- - spec pipeline directory scaffolding (`ai-ops spec init`)
26
- - source drift checks (`ai-ops diff`)
27
- - deterministic re-apply (`ai-ops update`)
28
- - managed cleanup (`ai-ops uninstall`)
26
+ - Project scope manages only operating-layer documents.
27
+ - Global scope manages only skills/subagents.
28
+ - `AGENTS.md` is the canonical entrypoint.
29
+ - `GEMINI.md` and `CLAUDE.md` are adapters that point tools back to `AGENTS.md`.
30
+ - `docs/specs/` is the optional pack location.
31
+ - Global asset commands require `AI_OPS_HOME` or `HOME`; they fail closed without cwd fallback when neither exists.
29
32
 
30
- ## Supported tools and output layout
33
+ ## Install Targets
31
34
 
32
- | Tool | Project rules output | Skill output |
33
- | --------------------------- | ----------------------------------------------------- | ---------------------------- |
34
- | Claude Code (`claude-code`) | `.claude/rules/<rule-id>.md`, `<workspace>/CLAUDE.md` | `.claude/skills/<skill-id>/` |
35
- | Codex (`codex`) | `AGENTS.md`, `<workspace>/AGENTS.override.md` | `.agents/skills/<skill-id>/` |
36
- | Gemini CLI (`gemini`) | `GEMINI.md`, `<workspace>/GEMINI.md` | `.agents/skills/<skill-id>/` |
35
+ Project repo:
37
36
 
38
- Optional settings files:
37
+ ```text
38
+ AGENTS.md
39
+ GEMINI.md
40
+ CLAUDE.md
41
+ docs/agent/rules/00-agent-baseline.md
42
+ docs/agent/workflow.md
43
+ docs/agent/rules/routing-rules.md
44
+ docs/agent/rules/doc-update-rules.md
45
+ docs/agent/rules/stop-rules.md
46
+ docs/agent/checks/impact-checklist.md
47
+ docs/agent/checks/review-checklist.md
48
+ docs/agent/maps/codebase-map.md
49
+ docs/business/business-rules.md
50
+ docs/docs-status.md
51
+ .ai-ops/manifest.json
52
+ .ai-ops/context-layer.json
53
+ ```
39
54
 
40
- - Claude Code: `.claude/settings.local.json`
41
- - Gemini CLI: `.gemini/settings.json`
42
- - Formatting protection section: `.prettierignore`
55
+ `docs/agent/rules/00-agent-baseline.md` is the Active rule that carries the original intent of the old `role-persona`, `communication`, `code-philosophy`, `naming-convention`, and `plan-mode` rules into the new operating layer. It is read immediately after `AGENTS.md`.
43
56
 
44
- ## Install
57
+ Global tool home:
45
58
 
46
- ```bash
47
- npm install -g ai-ops-cli
59
+ ```text
60
+ skills/*
61
+ subagents/*
48
62
  ```
49
63
 
50
- ## Usage
64
+ ## Editing FAQ
51
65
 
52
- ```bash
53
- # Initialize the current project
54
- ai-ops init
66
+ ### What does `ai-ops update` overwrite?
55
67
 
56
- # Install a skill globally (user scope by default)
57
- ai-ops skill install skill-load-check --tool codex
68
+ `AGENTS.md`, `GEMINI.md`, `CLAUDE.md`, `docs/agent/rules/*`, `docs/agent/checks/*`, and `docs/agent/workflow.md` are ai-ops managed documents. In these files, the region from `<!-- ai-ops:start -->` through `<!-- ai-ops:end -->` is CLI template content. `ai-ops update` reapplies the current CLI template to that region. User edits inside that region are not preserved across update.
58
69
 
59
- # Install a skill only for the current project
60
- ai-ops skill install skill-load-check --project --tool codex
70
+ `.ai-ops/manifest.json` and `.ai-ops/context-layer.json` are also not direct-edit files. They are CLI state files for installation state and document indexing.
61
71
 
62
- # Inspect or update installed skills
63
- ai-ops skill list
64
- ai-ops skill diff
65
- ai-ops skill update
66
- ai-ops skill uninstall skill-load-check
72
+ ### Which files should users edit directly?
67
73
 
68
- # Check project drift
69
- ai-ops diff
74
+ Project knowledge belongs in project-owned documents. The default project-owned documents are `docs/agent/maps/codebase-map.md`, `docs/business/business-rules.md`, and `docs/docs-status.md`. `docs/agent/maps/codebase-map.md` and `docs/business/business-rules.md` start as Reserved templates, but once the project fills them with real content, update does not automatically overwrite them.
70
75
 
71
- # Re-apply current project state
72
- ai-ops update
73
- ai-ops update --force
76
+ `docs/docs-status.md` is project-owned, but it is not a free-form notebook. It is the context-layer registry. Update it together with document status/frontmatter changes; the update flow may also normalize its table from the manifest and current document frontmatter.
74
77
 
75
- # Remove project-managed files
76
- ai-ops uninstall
78
+ ### Where should project-specific agent rules go?
77
79
 
78
- # Initialize spec pipeline directory structure
79
- ai-ops spec init
80
+ The default layer currently has project-owned documents for project structure and business rules, but it does not yet provide a first-class Active template for project-specific agent behavior rules. Because of that, adding rules inside the managed region of `AGENTS.md` or inside a tool adapter is not an update-safe contract.
80
81
 
81
- # Force re-create even if specs/ already exists
82
- ai-ops spec init --force
83
- ```
82
+ To support project-specific agent rules safely, the next product extension should add a project-owned Active document such as `docs/agent/rules/project-rules.md` and have the manifest, context-layer index, and docs-status table track it together.
84
83
 
85
84
  ## CLI Surface
86
85
 
@@ -88,137 +87,109 @@ ai-ops spec init --force
88
87
  ai-ops [command]
89
88
 
90
89
  Commands:
91
- init Initialize AI tool rules for a project
92
- skill Manage agent skills
93
- spec Manage spec pipeline
94
- update Update installed rules
95
- diff Show diff between installed and current rules
96
- uninstall Remove installed rules and manifest
97
-
98
- Options:
99
- --force Force update even when no changes are detected (update only)
100
- -V, --version Output version number
101
- -h, --help Display help
90
+ init Install or refresh the project agent operating layer
91
+ diff Show drift in the project operating layer
92
+ update Re-apply the project operating layer
93
+ audit Check frontmatter, docs-status, manifest, and context-layer consistency
94
+ uninstall Remove project-managed operating layer files
95
+ skill Manage global agent skills
96
+ subagent Manage global agent subagents
97
+ pack Manage optional project operating layer packs
102
98
  ```
103
99
 
104
- ### `ai-ops spec` subcommands
100
+ `--tool` remains because Codex, Claude Code, and Gemini CLI use different discovery locations and adapter files.
105
101
 
106
- ```text
107
- ai-ops spec init [options]
108
-
109
- Initialize the specs/ directory structure for AI-collaborative spec pipelines.
110
- Creates:
111
- specs/README.md — usage guide
112
- specs/baseline/ — baseline spec documents
113
- specs/delta/ — delta (incremental change) spec documents
102
+ Skill lifecycle commands:
114
103
 
115
- Options:
116
- --force Overwrite existing specs/ directory
104
+ ```bash
105
+ ai-ops skill list
106
+ ai-ops skill install skill-load-check --tool codex
107
+ ai-ops skill install doc-impact-reviewer --tool codex
108
+ ai-ops skill diff
109
+ ai-ops skill update
110
+ ai-ops skill uninstall skill-load-check
117
111
  ```
118
112
 
119
- Notes:
120
-
121
- - Project installation state is tracked in `.ai-ops-manifest.json`.
122
- - User-scope skill state is tracked in `~/.ai-ops/skills-manifest.json`.
123
- - `ai-ops skill` defaults to user scope. Use `--project` to keep a skill local to the current repo.
113
+ `doc-impact-reviewer` is a manual task skill for checking operating-document impact near the end of work or before commit. Invoking `$doc-impact-reviewer` reads git status/diff and reports document update candidates as `required / recommended / not needed`. It does not edit documents, stage files, or commit before user approval.
124
114
 
125
- ## Install / Update / Uninstall Behavior
115
+ Subagent lifecycle commands:
126
116
 
127
- - Managed project rule files are wrapped in an `ai-ops` section with metadata (`sourceHash`, `generatedAt`).
128
- - If a rule file already has an `ai-ops` section, only that section is replaced.
129
- - If a rule file has no managed section, generated content is appended and user content is preserved.
130
- - Skill packages are written into dedicated directories and replaced as full package trees on update.
131
- - `uninstall` removes only project-managed rule files and project-installed skill directories.
132
- - User-scope skills are never removed by `ai-ops uninstall`.
117
+ ```bash
118
+ ai-ops subagent list
119
+ ai-ops subagent install security-gate --tool codex
120
+ ai-ops subagent diff
121
+ ai-ops subagent update
122
+ ai-ops subagent uninstall security-gate
123
+ ```
133
124
 
134
- ## Init Flow Summary
125
+ Subagents are always installed into the global tool home. Codex uses `.codex/agents/<id>.toml`, Claude Code uses `.claude/agents/<id>.md`, Gemini CLI uses `.gemini/agents/<id>.md`, and state is recorded only in `.ai-ops/subagents-manifest.json`.
135
126
 
136
- `ai-ops init` prompts for:
127
+ Pack lifecycle commands:
137
128
 
138
- 1. Tool selection (`claude-code`, `codex`, `gemini`)
139
- 2. Monorepo confirmation
140
- 3. Workspace selection for monorepos
141
- 4. Preset selection per workspace
142
- 5. Locked core rules review
143
- 6. Preset-linked `reference` skills only:
144
- - already-installed global skills are shown separately
145
- - only installable skills can be deselected
146
- 7. One shared install scope for selected installable skills (`user` default or `project`)
147
- 8. Optional settings installation
129
+ ```bash
130
+ ai-ops init --tool codex
131
+ ai-ops pack list
132
+ ai-ops pack install spec-lifecycle
133
+ ai-ops pack diff spec-lifecycle
134
+ ai-ops pack update spec-lifecycle
135
+ ai-ops pack uninstall spec-lifecycle
136
+ ```
148
137
 
149
- Important behavior:
138
+ The `spec-lifecycle` pack installs `docs/specs/README.md`, `docs/specs/README.ko.md`, `docs/specs/baseline/.gitkeep`, and `docs/specs/initial-build/.gitkeep`. Only Markdown documents are audited by the context-layer and `docs/docs-status.md`; `.gitkeep` files are tracked only as regular pack files in the manifest.
150
139
 
151
- - core rules come from the preset directly and are not fine-tuned in `init`
152
- - `init` shows only preset-linked `reference` skills
153
- - `task` skills are excluded from `init` and are managed with `ai-ops skill install/uninstall`
154
- - globally available skills are not reinstalled by default
155
- - when `user` scope is chosen, selected skills are written only to the global skill registry
156
- - when `project` scope is chosen, selected skills are recorded in `.ai-ops-manifest.json`
140
+ ## Deprecated Old Model
157
141
 
158
- Skill authoring rules live in `apps/cli/data/skills/README.md`.
142
+ The following behaviors may still appear in current code or older docs, but they are outside the new contract:
159
143
 
160
- ## Local Development
144
+ - preset-first init UX
145
+ - project-scope skill installation
146
+ - `ai-ops skill install --project`
147
+ - project-installed skill metadata
148
+ - `.ai-ops-manifest.json`
149
+ - legacy manifest migration
150
+ - root `specs/`
151
+ - `ai-ops spec init`
161
152
 
162
- From repo root:
153
+ Existing projects are not migrated automatically. Existing users should run `ai-ops uninstall` with the old CLI, then run `ai-ops init` again with the new major CLI.
163
154
 
164
- ```bash
165
- npm install
166
- npm run build
167
- npm run compile
168
- npm test
169
- ```
155
+ ## Old Model Command Notes
170
156
 
171
- From `apps/cli` workspace:
157
+ The command below remains only as a deprecated old-model example for historical project-scope skill installation. The current skill CLI is global-only and does not expose `--project`, `--global`, or `--scope` as public options.
172
158
 
173
159
  ```bash
174
- npm run build --workspace=apps/cli
175
- npm run test --workspace=apps/cli
160
+ ai-ops skill install skill-load-check --project --tool codex
176
161
  ```
177
162
 
178
- ## Local Skill Loading Check
163
+ Deprecated old-model-only items:
164
+
165
+ - `--project` was the old option for project-scope skill installation.
166
+ - `--global` and `--scope` were old options for directly selecting skill scope.
167
+ - `spec init` was the removed old command that created root `specs/`.
168
+ - `.ai-ops-manifest.json` was the old project manifest.
179
169
 
180
- Use the built-in `skill-load-check` task skill before publishing to npm.
170
+ ## Development
181
171
 
182
- Recommended local flow:
172
+ From the repository root:
183
173
 
184
174
  ```bash
185
- # 1. Build the CLI
175
+ npm install
186
176
  npm run build
187
-
188
- # 2. Use an isolated user home so you do not pollute your real ~/.agents or ~/.claude
189
- export AI_OPS_HOME="$(mktemp -d)"
190
-
191
- # 3. Install the sample skill globally
192
- node apps/cli/dist/bin/index.js skill install skill-load-check --tool codex
193
-
194
- # 4. Verify files exist
195
- find "$AI_OPS_HOME/.agents/skills/skill-load-check" -maxdepth 2 -type f | sort
196
-
197
- # 5. Run the sample script manually
198
- node "$AI_OPS_HOME/.agents/skills/skill-load-check/scripts/loaded.js"
199
- ```
200
-
201
- Expected output:
202
-
203
- ```text
204
- A Skill loaded
177
+ npm run compile
178
+ npm test
205
179
  ```
206
180
 
207
- Project-scope verification:
181
+ To check only the CLI workspace:
208
182
 
209
183
  ```bash
210
- node apps/cli/dist/bin/index.js skill install skill-load-check --project --tool codex
211
- find ./.agents/skills/skill-load-check -maxdepth 2 -type f | sort
212
- node ./.agents/skills/skill-load-check/scripts/loaded.js
184
+ npm run build --workspace=apps/cli
185
+ npm run test --workspace=apps/cli
213
186
  ```
214
187
 
215
- After file placement is verified, use a real tool prompt that should trigger `skill-load-check` and confirm the tool discovers the skill metadata. If the tool caches skill discovery, restart that tool session before re-checking.
188
+ Use `npm run check` as the default validation for code and operating-document changes. For CLI release artifacts, run both `npm run build` and `npm run compile`.
216
189
 
217
- ## Related Docs
218
-
219
- - Master blueprint: [`docs/plan.md`](../../docs/plan.md)
220
- - Implementation playbook: [`docs/implementation-playbook.md`](../../docs/implementation-playbook.md)
190
+ Self-dogfood validation runs `npm run build`, applies `init --tool codex --tool gemini --tool claude-code` to this repo, then checks `diff`, `audit`, `update --force`, `uninstall --yes`, re-`init`, and re-`audit`. This repo does not install the `spec-lifecycle` pack during self-dogfood; `pack list` only verifies the `not installed` state.
221
191
 
222
- ## License
192
+ ## Related Docs
223
193
 
224
- MIT
194
+ - [Master blueprint](../../docs/plan.md)
195
+ - [Implementation playbook](../../docs/implementation-playbook.md)
@@ -0,0 +1,30 @@
1
+ ---
2
+ status: Active
3
+ layer: agent
4
+ owner: ai-ops
5
+ read_when:
6
+ - before_task
7
+ update_when:
8
+ - operating_layer_changes
9
+ ---
10
+ # Agent Operating Layer
11
+
12
+ 이 파일은 이 프로젝트의 canonical agent entrypoint다. 도구별 adapter가 있더라도 운영 판단은 이 파일과 `docs/agent/*` 문서를 기준으로 한다.
13
+
14
+ ## 읽기 순서
15
+
16
+ 1. `AGENTS.md`
17
+ 2. `docs/agent/rules/00-agent-baseline.md`
18
+ 3. `docs/agent/workflow.md`
19
+ 4. 나머지 `docs/agent/rules/*.md`
20
+ 5. 작업 성격에 맞는 `docs/agent/checks/*.md`
21
+ 6. `docs/docs-status.md`
22
+
23
+ ## 문서 신뢰도
24
+
25
+ - `Active`: 현재 판단 근거로 사용할 수 있다.
26
+ - `Reserved`: 자리만 만든 문서다. 프로젝트가 보강하기 전까지 현재 판단 근거로 사용하지 않는다.
27
+ - `Draft`: 작성 중인 문서다. 사용 전 검토가 필요하다.
28
+ - `Archived`: 과거 기록이다. 현재 운영 판단에 사용하지 않는다.
29
+
30
+ 문서 상태가 애매하면 `docs/docs-status.md`와 각 문서 frontmatter를 함께 확인한다.
@@ -0,0 +1,14 @@
1
+ ---
2
+ status: Active
3
+ layer: agent
4
+ owner: ai-ops
5
+ read_when:
6
+ - before_task
7
+ update_when:
8
+ - adapter_changes
9
+ ---
10
+ # Claude Code Adapter
11
+
12
+ 이 파일은 Claude Code가 프로젝트 운영 계층을 찾기 위한 adapter다.
13
+
14
+ 작업 전 `AGENTS.md`를 canonical entrypoint로 읽고, 세부 운영 문서는 `docs/agent/*`와 `docs/docs-status.md`를 따른다. 이 파일에는 중복 운영 규칙을 추가하지 않는다.
@@ -0,0 +1,14 @@
1
+ ---
2
+ status: Active
3
+ layer: agent
4
+ owner: ai-ops
5
+ read_when:
6
+ - before_task
7
+ update_when:
8
+ - adapter_changes
9
+ ---
10
+ # Gemini CLI Adapter
11
+
12
+ 이 파일은 Gemini CLI가 프로젝트 운영 계층을 찾기 위한 adapter다.
13
+
14
+ 작업 전 `AGENTS.md`를 canonical entrypoint로 읽고, 세부 운영 문서는 `docs/agent/*`와 `docs/docs-status.md`를 따른다. 이 파일에는 중복 운영 규칙을 추가하지 않는다.
@@ -0,0 +1,16 @@
1
+ ---
2
+ status: Active
3
+ layer: agent
4
+ owner: ai-ops
5
+ read_when:
6
+ - before_finish
7
+ update_when:
8
+ - checklist_changes
9
+ ---
10
+ # Impact Checklist
11
+
12
+ - 공개 CLI 표면이 바뀌었는가?
13
+ - 상태 파일 schema나 경로가 바뀌었는가?
14
+ - 기존 사용자 파일 보존 정책에 영향이 있는가?
15
+ - update/diff/uninstall 동작이 서로 같은 추적 기준을 쓰는가?
16
+ - 실패 시 사용자가 복구할 수 있는 메시지를 받는가?
@@ -0,0 +1,17 @@
1
+ ---
2
+ status: Active
3
+ layer: agent
4
+ owner: ai-ops
5
+ read_when:
6
+ - review
7
+ - before_finish
8
+ update_when:
9
+ - checklist_changes
10
+ ---
11
+ # Review Checklist
12
+
13
+ - 계획 문서의 의도와 실제 diff가 어긋나는 지점이 있는가?
14
+ - 테스트가 잡지 못하는 런타임 회귀 위험이 있는가?
15
+ - create-only 파일과 managed section 파일의 보존 정책이 섞이지 않았는가?
16
+ - manifest, context-layer, 실제 파일 상태가 같은 기준으로 갱신되는가?
17
+ - 검증 명령이 변경 범위에 충분히 직접적인가?