@tjdals12/agent-bolt 1.3.0 → 1.4.0-next.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 (125) hide show
  1. package/README.ko.md +99 -17
  2. package/README.md +99 -17
  3. package/dist/catalog/commands/add-item.d.ts +14 -0
  4. package/dist/catalog/commands/add-item.d.ts.map +1 -1
  5. package/dist/catalog/commands/add-item.js +23 -0
  6. package/dist/catalog/commands/add-item.js.map +1 -1
  7. package/dist/catalog/commands/add-pack.d.ts +10 -0
  8. package/dist/catalog/commands/add-pack.d.ts.map +1 -1
  9. package/dist/catalog/commands/add-pack.js +16 -0
  10. package/dist/catalog/commands/add-pack.js.map +1 -1
  11. package/dist/catalog/commands/catalog/init-catalog.d.ts +6 -0
  12. package/dist/catalog/commands/catalog/init-catalog.d.ts.map +1 -1
  13. package/dist/catalog/commands/catalog/init-catalog.js +4 -0
  14. package/dist/catalog/commands/catalog/init-catalog.js.map +1 -1
  15. package/dist/catalog/commands/catalog/new/new-item.d.ts +9 -0
  16. package/dist/catalog/commands/catalog/new/new-item.d.ts.map +1 -1
  17. package/dist/catalog/commands/catalog/new/new-item.js +4 -0
  18. package/dist/catalog/commands/catalog/new/new-item.js.map +1 -1
  19. package/dist/catalog/commands/catalog/new-pack.d.ts +6 -0
  20. package/dist/catalog/commands/catalog/new-pack.d.ts.map +1 -1
  21. package/dist/catalog/commands/catalog/new-pack.js +4 -0
  22. package/dist/catalog/commands/catalog/new-pack.js.map +1 -1
  23. package/dist/catalog/commands/catalog/validate-catalog.d.ts +9 -0
  24. package/dist/catalog/commands/catalog/validate-catalog.d.ts.map +1 -1
  25. package/dist/catalog/commands/catalog/validate-catalog.js +10 -0
  26. package/dist/catalog/commands/catalog/validate-catalog.js.map +1 -1
  27. package/dist/catalog/commands/check.d.ts +19 -0
  28. package/dist/catalog/commands/check.d.ts.map +1 -1
  29. package/dist/catalog/commands/check.js +15 -0
  30. package/dist/catalog/commands/check.js.map +1 -1
  31. package/dist/catalog/commands/init.d.ts +16 -0
  32. package/dist/catalog/commands/init.d.ts.map +1 -1
  33. package/dist/catalog/commands/init.js +14 -0
  34. package/dist/catalog/commands/init.js.map +1 -1
  35. package/dist/catalog/commands/list-items.d.ts +9 -0
  36. package/dist/catalog/commands/list-items.d.ts.map +1 -1
  37. package/dist/catalog/commands/list-items.js +7 -0
  38. package/dist/catalog/commands/list-items.js.map +1 -1
  39. package/dist/catalog/commands/list-packs.d.ts +8 -0
  40. package/dist/catalog/commands/list-packs.d.ts.map +1 -1
  41. package/dist/catalog/commands/list-packs.js +7 -0
  42. package/dist/catalog/commands/list-packs.js.map +1 -1
  43. package/dist/catalog/commands/remove-item.d.ts +14 -0
  44. package/dist/catalog/commands/remove-item.d.ts.map +1 -1
  45. package/dist/catalog/commands/remove-item.js +23 -0
  46. package/dist/catalog/commands/remove-item.js.map +1 -1
  47. package/dist/catalog/commands/remove-pack.d.ts +10 -0
  48. package/dist/catalog/commands/remove-pack.d.ts.map +1 -1
  49. package/dist/catalog/commands/remove-pack.js +15 -0
  50. package/dist/catalog/commands/remove-pack.js.map +1 -1
  51. package/dist/catalog/commands/show-item.d.ts +46 -0
  52. package/dist/catalog/commands/show-item.d.ts.map +1 -1
  53. package/dist/catalog/commands/show-item.js +46 -0
  54. package/dist/catalog/commands/show-item.js.map +1 -1
  55. package/dist/catalog/commands/skill-install.d.ts +11 -0
  56. package/dist/catalog/commands/skill-install.d.ts.map +1 -0
  57. package/dist/catalog/commands/skill-install.js +22 -0
  58. package/dist/catalog/commands/skill-install.js.map +1 -0
  59. package/dist/catalog/commands/sync.d.ts +11 -0
  60. package/dist/catalog/commands/sync.d.ts.map +1 -1
  61. package/dist/catalog/commands/sync.js +5 -0
  62. package/dist/catalog/commands/sync.js.map +1 -1
  63. package/dist/catalog/content/item/find-detail.d.ts.map +1 -1
  64. package/dist/catalog/content/item/find-detail.js +3 -0
  65. package/dist/catalog/content/item/find-detail.js.map +1 -1
  66. package/dist/catalog/content/item/model.d.ts +3 -0
  67. package/dist/catalog/content/item/model.d.ts.map +1 -1
  68. package/dist/catalog/install/adapters/adapter.d.ts +3 -0
  69. package/dist/catalog/install/adapters/adapter.d.ts.map +1 -1
  70. package/dist/catalog/install/adapters/adapter.js +6 -1
  71. package/dist/catalog/install/adapters/adapter.js.map +1 -1
  72. package/dist/catalog/install/adapters/claude.adapter.d.ts +0 -1
  73. package/dist/catalog/install/adapters/claude.adapter.d.ts.map +1 -1
  74. package/dist/catalog/install/adapters/claude.adapter.js +4 -2
  75. package/dist/catalog/install/adapters/claude.adapter.js.map +1 -1
  76. package/dist/catalog/install/adapters/codex.adapter.d.ts +0 -1
  77. package/dist/catalog/install/adapters/codex.adapter.d.ts.map +1 -1
  78. package/dist/catalog/install/adapters/codex.adapter.js +5 -3
  79. package/dist/catalog/install/adapters/codex.adapter.js.map +1 -1
  80. package/dist/catalog/install/adapters/copilot.adapter.d.ts +0 -1
  81. package/dist/catalog/install/adapters/copilot.adapter.d.ts.map +1 -1
  82. package/dist/catalog/install/adapters/copilot.adapter.js +4 -2
  83. package/dist/catalog/install/adapters/copilot.adapter.js.map +1 -1
  84. package/dist/catalog/install/adapters/cursor.adapter.d.ts +0 -1
  85. package/dist/catalog/install/adapters/cursor.adapter.d.ts.map +1 -1
  86. package/dist/catalog/install/adapters/cursor.adapter.js +4 -2
  87. package/dist/catalog/install/adapters/cursor.adapter.js.map +1 -1
  88. package/dist/catalog/install/adapters/opencode.adapter.d.ts +0 -1
  89. package/dist/catalog/install/adapters/opencode.adapter.d.ts.map +1 -1
  90. package/dist/catalog/install/adapters/opencode.adapter.js +5 -3
  91. package/dist/catalog/install/adapters/opencode.adapter.js.map +1 -1
  92. package/dist/catalog/install/apply.d.ts.map +1 -1
  93. package/dist/catalog/install/apply.js +12 -6
  94. package/dist/catalog/install/apply.js.map +1 -1
  95. package/dist/catalog/install/diff.d.ts.map +1 -1
  96. package/dist/catalog/install/diff.js +12 -4
  97. package/dist/catalog/install/diff.js.map +1 -1
  98. package/dist/catalog/install/model.d.ts +5 -0
  99. package/dist/catalog/install/model.d.ts.map +1 -1
  100. package/dist/catalog/skill/install.d.ts +14 -0
  101. package/dist/catalog/skill/install.d.ts.map +1 -0
  102. package/dist/catalog/skill/install.js +39 -0
  103. package/dist/catalog/skill/install.js.map +1 -0
  104. package/dist/cli/index.js +182 -159
  105. package/dist/cli/index.js.map +1 -1
  106. package/dist/cli/json.d.ts +3 -0
  107. package/dist/cli/json.d.ts.map +1 -0
  108. package/dist/cli/json.js +8 -0
  109. package/dist/cli/json.js.map +1 -0
  110. package/dist/cli/views/shared/banner.d.ts +3 -0
  111. package/dist/cli/views/shared/banner.d.ts.map +1 -1
  112. package/dist/cli/views/shared/banner.js +5 -0
  113. package/dist/cli/views/shared/banner.js.map +1 -1
  114. package/dist/cli/views/skill-install.d.ts +3 -0
  115. package/dist/cli/views/skill-install.d.ts.map +1 -0
  116. package/dist/cli/views/skill-install.js +15 -0
  117. package/dist/cli/views/skill-install.js.map +1 -0
  118. package/dist/core/progress.d.ts +3 -1
  119. package/dist/core/progress.d.ts.map +1 -1
  120. package/dist/core/progress.js +4 -1
  121. package/dist/core/progress.js.map +1 -1
  122. package/package.json +3 -2
  123. package/skills/agent-bolt/SKILL.md +720 -0
  124. package/skills/agent-bolt/references/catalog-config-schema.md +102 -0
  125. package/skills/agent-bolt/references/json-responses.md +387 -0
@@ -0,0 +1,102 @@
1
+ # catalog-config.yml schema
2
+
3
+ `.agent-bolt/catalog-config.yml` declares which items, from which catalogs,
4
+ get installed for which tools. It is normally managed through the CLI
5
+ (`init`, `add-*`, `remove-*`). Two changes have no command and are made by
6
+ hand: editing `sources` — adding, changing, or removing a catalog after init
7
+ — and changing a guideline's `load`/`glob` (the CLI always writes the
8
+ catalog's recommended value).
9
+
10
+ After any hand edit, run `agent-bolt sync` (with the user's approval) to apply
11
+ it. A malformed config fails the next command with a validation error. The
12
+ config `init` generates begins with a commented template of these shapes.
13
+
14
+ ## Complete example
15
+
16
+ ```yaml
17
+ version: 1
18
+
19
+ # Tools to install items for
20
+ tools:
21
+ - claude
22
+ - codex
23
+
24
+ # Catalogs to pull items from (alias → source)
25
+ sources:
26
+ common:
27
+ type: local
28
+ # Resolved relative to .agent-bolt/, NOT the project root
29
+ path: ./catalog
30
+ team:
31
+ type: git
32
+ url: https://github.com/acme/catalog.git
33
+ # optional — branch or tag (default: the repo's default branch)
34
+ ref: main
35
+ # optional — when the catalog lives in a subdirectory of the repo
36
+ subdir: catalog
37
+
38
+ # Selections (source alias → pack → items by type)
39
+ packs:
40
+ common:
41
+ backend:
42
+ skills:
43
+ - nestjs-expert
44
+ - prisma-expert
45
+ agents:
46
+ - developer
47
+ guidelines:
48
+ # always: applied at all times
49
+ commit-rules:
50
+ load: always
51
+ # conditional: applied only to files matching the globs
52
+ prisma-schema:
53
+ load: conditional
54
+ glob:
55
+ - prisma/**
56
+ ```
57
+
58
+ ## Field reference
59
+
60
+ | Field | Rule |
61
+ | --------- | ------------------------------------------------------------------------------------------- |
62
+ | `version` | Must be `1` |
63
+ | `tools` | Array of tool ids — the ones `agent-bolt init --help` lists for `--tools` |
64
+ | `sources` | Map of alias → source. Local: `{type: local, path}`. Git: `{type: git, url, ref?, subdir?}` |
65
+ | `packs` | Map of source alias → pack name → selection. Optional; defaults to `{}` |
66
+
67
+ Selection per pack:
68
+
69
+ | Field | Rule |
70
+ | ------------ | -------------------------------------------------------- |
71
+ | `skills` | Array of item names. Optional; defaults to `[]` |
72
+ | `agents` | Array of item names. Optional; defaults to `[]` |
73
+ | `guidelines` | Map of item name → load mode. Optional; defaults to `{}` |
74
+
75
+ Guideline load modes (`load` is a discriminator — exactly one shape or the
76
+ other):
77
+
78
+ ```yaml
79
+ # Applied at all times
80
+ some-guideline:
81
+ load: always
82
+
83
+ # Applied only to files matching the globs (at least one glob required)
84
+ other-guideline:
85
+ load: conditional
86
+ glob:
87
+ - src/**/*.tsx
88
+ ```
89
+
90
+ ## Constraints worth knowing
91
+
92
+ - Pack and item names must be kebab-case: lowercase letters, digits, and
93
+ hyphens (`^[a-z0-9]+(?:-[a-z0-9]+)*$`).
94
+ - A local source `path` is resolved relative to the `.agent-bolt/` directory.
95
+ A catalog at `<project>/.agent-bolt/catalog` is `path: ./catalog`.
96
+ - A pack selection whose source alias is missing from `sources` is pruned the
97
+ next time the config is rewritten (reported as `orphanedSources` by `init`).
98
+ - Renaming a source alias or a pack changes every installed file's name
99
+ (`bolt-<source>-<pack>-<item>`), so the next sync removes the old files and
100
+ installs new ones.
101
+ - Git sources are cloned fresh on every command that reads the catalog — no
102
+ cache, so they need network access.
@@ -0,0 +1,387 @@
1
+ # agent-bolt --json responses and exit codes
2
+
3
+ What each command prints with `--json`, what its fields mean, and how it
4
+ exits. Examples are real outputs; arrays may carry more elements than shown,
5
+ and long strings are elided with `…`. For options and flags, run
6
+ `agent-bolt <command> --help`.
7
+
8
+ ## Contract
9
+
10
+ - Success prints the result object on stdout, pretty-printed, with no
11
+ envelope. Failure prints `{"error": {"message": "…"}}` on stdout and exits
12
+ 1 — the presence of a top-level `error` key is the failure signal, and the
13
+ message usually names the fix.
14
+ - Progress and warnings go to stderr. Parse stdout only.
15
+ - With `--json`, commands are strictly non-interactive: a missing selection
16
+ fails with a message naming exactly what is required, instead of opening
17
+ the interactive picker.
18
+ - Exit codes: `0` success; `1` any error; `check` also exits `1` when drift
19
+ was found even though its JSON is a normal result object.
20
+
21
+ ## init
22
+
23
+ ```bash
24
+ agent-bolt init --tools=claude,codex --source common=local:./catalog --json
25
+ ```
26
+
27
+ ```json
28
+ {
29
+ "configPath": "/work/acme/.agent-bolt/catalog-config.yml",
30
+ "tools": ["claude", "codex"],
31
+ "sources": {
32
+ "common": { "type": "local", "path": "./catalog" }
33
+ },
34
+ "orphanedSources": []
35
+ }
36
+ ```
37
+
38
+ - `orphanedSources`: pack selections dropped because their source alias no
39
+ longer exists (only relevant with `--force` over an old config).
40
+ - `init` does not verify that a source is reachable — verify with
41
+ `list-packs` afterward. A local source `path` is resolved relative to
42
+ `.agent-bolt/`, not the project root.
43
+ - Re-running `init` on an existing config fails and points at `--force`,
44
+ which replaces the whole config including every pack selection.
45
+
46
+ ## list-packs
47
+
48
+ ```bash
49
+ agent-bolt list-packs --json
50
+ ```
51
+
52
+ ```json
53
+ {
54
+ "sources": [
55
+ {
56
+ "alias": "common",
57
+ "type": "local",
58
+ "packs": [
59
+ {
60
+ "name": "backend",
61
+ "description": "Skills specialized for NestJS/Prisma backend development.",
62
+ "counts": { "skills": 2, "agents": 2, "guidelines": 6 }
63
+ }
64
+ ]
65
+ }
66
+ ],
67
+ "failures": []
68
+ }
69
+ ```
70
+
71
+ - A source that cannot be loaded is reported in `failures` (one message per
72
+ source) while the command exits 0 and the remaining sources are listed
73
+ normally. Read `failures` before trusting `sources`.
74
+
75
+ ## list-items
76
+
77
+ ```bash
78
+ agent-bolt list-items --source=common --packs=common --json
79
+ ```
80
+
81
+ ```json
82
+ {
83
+ "sources": [
84
+ {
85
+ "alias": "common",
86
+ "type": "local",
87
+ "packs": [
88
+ {
89
+ "name": "common",
90
+ "description": "Core development workflow shared across the team — commit/PR creation, business analysis, and more.",
91
+ "items": {
92
+ "skills": [
93
+ {
94
+ "name": "create-commit",
95
+ "description": "Generate Conventional Commits messages, stage changes if needed, and run git commit/amend. …"
96
+ }
97
+ ],
98
+ "agents": [
99
+ {
100
+ "name": "code-reviewer",
101
+ "description": "Use after code has been written or modified and needs review …"
102
+ }
103
+ ],
104
+ "guidelines": [
105
+ {
106
+ "name": "commit-rules",
107
+ "description": "Commit message conventions and granularity for this project.",
108
+ "recommended": { "load": "always" }
109
+ },
110
+ {
111
+ "name": "typescript-standards",
112
+ "description": "Project-wide TypeScript coding standards: …",
113
+ "recommended": {
114
+ "load": "conditional",
115
+ "glob": ["**/*.ts", "**/*.tsx"]
116
+ }
117
+ }
118
+ ]
119
+ }
120
+ }
121
+ ]
122
+ }
123
+ ],
124
+ "failures": []
125
+ }
126
+ ```
127
+
128
+ - Guidelines carry `recommended` — the load mode `add-pack`/`add-item` will
129
+ write into the config.
130
+ - Unlike `list-packs`, a broken source fails the whole command (top-level
131
+ `error`, exit 1).
132
+
133
+ ## show-item
134
+
135
+ ```bash
136
+ agent-bolt show-item --source=common --pack=common --item=create-commit --json
137
+ ```
138
+
139
+ ```json
140
+ {
141
+ "source": "common",
142
+ "pack": "common",
143
+ "items": [
144
+ {
145
+ "type": "skill",
146
+ "name": "create-commit",
147
+ "description": "Generate Conventional Commits messages, stage changes if needed, and run git commit/amend. …",
148
+ "toolConfig": {
149
+ "claude": { "disable-model-invocation": true }
150
+ },
151
+ "instructions": "# Create Commit\n\n## Overview\n\nAnalyze the working tree, stage changes when nothing is staged, …",
152
+ "instructionsPath": "/work/acme/.agent-bolt/catalog/packs/common/skills/create-commit/instructions.md",
153
+ "assets": []
154
+ }
155
+ ]
156
+ }
157
+ ```
158
+
159
+ - `type` is `skill`, `agent`, or `guideline`. `instructions` is the full body
160
+ — it can be long. `assets` lists extra files a skill ships with.
161
+
162
+ ## add-pack
163
+
164
+ Selects every item of the named packs. Edits the config only.
165
+
166
+ ```bash
167
+ agent-bolt add-pack --source=common --packs=backend --json
168
+ ```
169
+
170
+ ```json
171
+ {
172
+ "results": [
173
+ {
174
+ "source": "common",
175
+ "added": [
176
+ {
177
+ "name": "backend",
178
+ "skills": ["nestjs-expert", "prisma-expert"],
179
+ "agents": ["architect-reviewer", "developer"],
180
+ "guidelines": {
181
+ "prisma-schema": { "load": "conditional", "glob": ["prisma/**"] },
182
+ "testing-guidelines": { "load": "conditional", "glob": ["src/**/*.ts"] }
183
+ }
184
+ }
185
+ ],
186
+ "skipped": []
187
+ }
188
+ ],
189
+ "failures": []
190
+ }
191
+ ```
192
+
193
+ - `skipped` names packs that were already fully selected.
194
+ - Guidelines are written with their catalog-recommended load mode, shown in
195
+ the response.
196
+
197
+ ## add-item
198
+
199
+ Selects specific items of one pack. Creates the pack section in the config if
200
+ missing. Edits the config only.
201
+
202
+ ```bash
203
+ agent-bolt add-item --source=common --pack=common --skills=create-commit --guidelines=commit-rules --json
204
+ ```
205
+
206
+ ```json
207
+ {
208
+ "results": [
209
+ {
210
+ "source": "common",
211
+ "packs": [
212
+ {
213
+ "name": "common",
214
+ "created": true,
215
+ "added": {
216
+ "skills": ["create-commit"],
217
+ "agents": [],
218
+ "guidelines": ["commit-rules"]
219
+ },
220
+ "skipped": { "skills": [], "agents": [], "guidelines": [] }
221
+ }
222
+ ]
223
+ }
224
+ ],
225
+ "failures": []
226
+ }
227
+ ```
228
+
229
+ - `created: true` — the pack section was newly added to the config.
230
+ - `skipped` holds names that were already selected.
231
+
232
+ ## remove-pack
233
+
234
+ Drops whole packs from the config. Edits the config only; installed files
235
+ stay until `sync`.
236
+
237
+ ```bash
238
+ agent-bolt remove-pack --source=common --packs=backend --json
239
+ ```
240
+
241
+ ```json
242
+ {
243
+ "results": [
244
+ {
245
+ "source": "common",
246
+ "removed": [
247
+ {
248
+ "name": "backend",
249
+ "skills": ["nestjs-expert", "prisma-expert"],
250
+ "agents": ["architect-reviewer", "developer"],
251
+ "guidelines": ["prisma-schema", "testing-guidelines"]
252
+ }
253
+ ],
254
+ "skipped": []
255
+ }
256
+ ],
257
+ "failures": []
258
+ }
259
+ ```
260
+
261
+ ## remove-item
262
+
263
+ Drops specific items of one pack from the config. Prunes the pack section if
264
+ it becomes empty. Edits the config only; installed files stay until `sync`.
265
+
266
+ ```bash
267
+ agent-bolt remove-item --source=common --pack=common --guidelines=commit-rules --json
268
+ ```
269
+
270
+ ```json
271
+ {
272
+ "results": [
273
+ {
274
+ "source": "common",
275
+ "packs": [
276
+ {
277
+ "name": "common",
278
+ "pruned": false,
279
+ "removed": { "skills": [], "agents": [], "guidelines": ["commit-rules"] },
280
+ "skipped": { "skills": [], "agents": [], "guidelines": [] }
281
+ }
282
+ ]
283
+ }
284
+ ],
285
+ "failures": []
286
+ }
287
+ ```
288
+
289
+ - `pruned: true` — the pack section became empty and was dropped.
290
+
291
+ ## sync
292
+
293
+ Makes the project match the config: installs, rewrites, and deletes files for
294
+ every configured tool. The only command that writes project files.
295
+
296
+ ```bash
297
+ agent-bolt sync --json
298
+ ```
299
+
300
+ ```json
301
+ {
302
+ "tools": [
303
+ {
304
+ "tool": "claude",
305
+ "counts": { "skills": 3, "agents": 2, "guidelines": 7 },
306
+ "changes": [
307
+ { "source": "common", "label": "common/create-commit", "status": "installed" },
308
+ { "source": "common", "label": "common/commit-rules", "status": "installed" }
309
+ ]
310
+ },
311
+ {
312
+ "tool": "codex",
313
+ "counts": { "skills": 3, "agents": 2, "guidelines": 7 },
314
+ "changes": [
315
+ { "source": "common", "label": "common/create-commit", "status": "installed" },
316
+ { "source": null, "label": "AGENTS.md (managed block)", "status": "installed" }
317
+ ]
318
+ }
319
+ ]
320
+ }
321
+ ```
322
+
323
+ - `counts` is the number of items now selected per type; `changes` holds only
324
+ what this run touched (an up-to-date project yields empty `changes`).
325
+ - `label` is `<pack>/<item>`; the shared instructions file appears as
326
+ `AGENTS.md (managed block)` with `source: null`, as do deletions.
327
+ - Statuses: `installed` (newly written), `updated` (rewritten because content
328
+ differed), `removed` (deleted because no longer selected).
329
+ - Marker failure — the shared instructions file exists without the marker
330
+ block. The sync stopped midway (files written before the block stay
331
+ written); add the markers, then re-run:
332
+
333
+ ```json
334
+ {
335
+ "error": {
336
+ "message": "No bolt managed block markers found. Add the markers below where you want the block, then run `agent-bolt sync` again.\n\n<!-- bolt:start -->\n<!-- bolt:end -->"
337
+ }
338
+ }
339
+ ```
340
+
341
+ ## check
342
+
343
+ Compares config, catalog, and installed files. Never modifies anything.
344
+
345
+ ```bash
346
+ agent-bolt check --json
347
+ ```
348
+
349
+ ```json
350
+ {
351
+ "tools": [
352
+ {
353
+ "tool": "claude",
354
+ "counts": { "skills": 3, "agents": 2, "guidelines": 7 },
355
+ "changes": [
356
+ { "source": "common", "label": "frontend/react-dev", "status": "missing" },
357
+ { "source": "common", "label": "common/create-commit", "status": "drifted" },
358
+ { "source": null, "label": "common/commit-rules", "status": "orphaned" }
359
+ ]
360
+ },
361
+ {
362
+ "tool": "codex",
363
+ "counts": { "skills": 3, "agents": 2, "guidelines": 7 },
364
+ "changes": []
365
+ }
366
+ ],
367
+ "drifted": true
368
+ }
369
+ ```
370
+
371
+ - Exits 1 when `drifted` is `true` (any change anywhere) — suitable as a CI
372
+ gate. The JSON body is still a normal result.
373
+ - Statuses: `missing` (selected but not installed), `drifted` (installed but
374
+ content differs), `orphaned` (installed but no longer selected; `source` is
375
+ `null`).
376
+ - `sync` resolves all three: installs the missing, rewrites the drifted,
377
+ deletes the orphaned.
378
+
379
+ ## Status names across sync and check
380
+
381
+ The same comparison, named from two directions:
382
+
383
+ | State of an item | `check` reports | `sync` does, and reports |
384
+ | ----------------------------- | --------------- | ------------------------ |
385
+ | Selected, not installed | `missing` | writes it → `installed` |
386
+ | Installed, content differs | `drifted` | rewrites it → `updated` |
387
+ | Installed, no longer selected | `orphaned` | deletes it → `removed` |