@tjdals12/agent-bolt 1.4.0-next.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.ko.md +62 -0
  2. package/README.md +62 -0
  3. package/dist/catalog/commands/skill-install.d.ts +11 -0
  4. package/dist/catalog/commands/skill-install.d.ts.map +1 -0
  5. package/dist/catalog/commands/skill-install.js +22 -0
  6. package/dist/catalog/commands/skill-install.js.map +1 -0
  7. package/dist/catalog/install/adapters/adapter.d.ts +3 -0
  8. package/dist/catalog/install/adapters/adapter.d.ts.map +1 -1
  9. package/dist/catalog/install/adapters/adapter.js +6 -1
  10. package/dist/catalog/install/adapters/adapter.js.map +1 -1
  11. package/dist/catalog/install/adapters/claude.adapter.d.ts +0 -1
  12. package/dist/catalog/install/adapters/claude.adapter.d.ts.map +1 -1
  13. package/dist/catalog/install/adapters/claude.adapter.js +1 -2
  14. package/dist/catalog/install/adapters/claude.adapter.js.map +1 -1
  15. package/dist/catalog/install/adapters/codex.adapter.d.ts +0 -1
  16. package/dist/catalog/install/adapters/codex.adapter.d.ts.map +1 -1
  17. package/dist/catalog/install/adapters/codex.adapter.js +2 -3
  18. package/dist/catalog/install/adapters/codex.adapter.js.map +1 -1
  19. package/dist/catalog/install/adapters/copilot.adapter.d.ts +0 -1
  20. package/dist/catalog/install/adapters/copilot.adapter.d.ts.map +1 -1
  21. package/dist/catalog/install/adapters/copilot.adapter.js +1 -2
  22. package/dist/catalog/install/adapters/copilot.adapter.js.map +1 -1
  23. package/dist/catalog/install/adapters/cursor.adapter.d.ts +0 -1
  24. package/dist/catalog/install/adapters/cursor.adapter.d.ts.map +1 -1
  25. package/dist/catalog/install/adapters/cursor.adapter.js +1 -2
  26. package/dist/catalog/install/adapters/cursor.adapter.js.map +1 -1
  27. package/dist/catalog/install/adapters/opencode.adapter.d.ts +0 -1
  28. package/dist/catalog/install/adapters/opencode.adapter.d.ts.map +1 -1
  29. package/dist/catalog/install/adapters/opencode.adapter.js +2 -3
  30. package/dist/catalog/install/adapters/opencode.adapter.js.map +1 -1
  31. package/dist/catalog/skill/install.d.ts +14 -0
  32. package/dist/catalog/skill/install.d.ts.map +1 -0
  33. package/dist/catalog/skill/install.js +39 -0
  34. package/dist/catalog/skill/install.js.map +1 -0
  35. package/dist/cli/index.js +22 -0
  36. package/dist/cli/index.js.map +1 -1
  37. package/dist/cli/views/shared/banner.d.ts +3 -0
  38. package/dist/cli/views/shared/banner.d.ts.map +1 -1
  39. package/dist/cli/views/shared/banner.js +5 -0
  40. package/dist/cli/views/shared/banner.js.map +1 -1
  41. package/dist/cli/views/skill-install.d.ts +3 -0
  42. package/dist/cli/views/skill-install.d.ts.map +1 -0
  43. package/dist/cli/views/skill-install.js +15 -0
  44. package/dist/cli/views/skill-install.js.map +1 -0
  45. package/package.json +3 -2
  46. package/skills/agent-bolt/SKILL.md +720 -0
  47. package/skills/agent-bolt/references/catalog-config-schema.md +102 -0
  48. package/skills/agent-bolt/references/json-responses.md +387 -0
@@ -0,0 +1,720 @@
1
+ ---
2
+ name: agent-bolt
3
+ description: "Manages a project's AI assets — skills, subagents, and guidelines — through the agent-bolt CLI. Use when the user wants agent-bolt set up in a project, asks what a catalog or pack offers or what an item does, wants items picked, installed, or removed, or asks whether the installed files still match the config. Not for authoring catalog content, and not for doing the installed assets' work: this skill delegates to the agent-bolt CLI."
4
+ compatibility: Requires the agent-bolt CLI.
5
+ ---
6
+
7
+ agent-bolt pulls skills, subagents, and guidelines from a catalog — a local
8
+ directory or a git repository, grouped into packs — records what the project
9
+ wants in `.agent-bolt/catalog-config.yml`, and installs it into every
10
+ configured tool in that tool's own format. Installed files are named
11
+ `bolt-<source>-<pack>-<item>` and belong to the CLI: they are regenerated on
12
+ every sync and are never edited by hand.
13
+
14
+ Run every command from the project root, always in the same shape: `--json`
15
+ plus every selection option spelled out.
16
+
17
+ - For options, flags, and valid values, ask the CLI itself:
18
+ `agent-bolt <command> --help`.
19
+ - With `--json`, a command missing its selections refuses with an error naming
20
+ exactly what is required. Without `--json` it opens an interactive picker
21
+ meant for a human at a terminal — never rely on the picker.
22
+ - Success prints the result object on stdout. Failure prints
23
+ `{"error": {"message": "…"}}` and exits 1, and the message usually names the
24
+ fix or the next command — relay it and act on it. Progress lines go to
25
+ stderr; parse stdout only.
26
+ - `add-*` and `remove-*` edit the config file only. `sync` is the only command
27
+ that writes or deletes project files — run it only after the user approves.
28
+
29
+ Response shapes, exit codes, and command behavior:
30
+ [references/json-responses.md](references/json-responses.md).
31
+
32
+ **Pick a flow**
33
+
34
+ - The user wants agent-bolt in this project → **Set up agent-bolt**
35
+ - The user has a catalog to hook up to an existing setup → **Add a catalog to an existing setup**
36
+ - The user asks what a catalog offers, or what an item is → **Explore the catalog**
37
+ - The user asks what would fit the project → **Recommend items for the project**
38
+ - The user wants items installed → **Install items**
39
+ - The user wants items gone → **Remove items**
40
+ - The user asks whether installs are current, or CI failed on `check` → **Audit the installation**
41
+ - A command failed because agent-bolt is missing → **When agent-bolt is not set up**
42
+
43
+ ## Set up agent-bolt
44
+
45
+ **Steps**
46
+
47
+ 1. **Check for an existing setup.** If `.agent-bolt/catalog-config.yml`
48
+ exists, setup is done — move to the other flows. Re-running `init` on an
49
+ existing config fails and points at `--force`; `--force` replaces the
50
+ whole config — tools, sources, and every pack selection — so use it only
51
+ when the user explicitly wants to start over.
52
+
53
+ 2. **Settle the tools and the catalog with the user.** Valid tool ids and
54
+ the source spec are in `agent-bolt init --help`. `init` refuses to run
55
+ without at least one source, so the catalog comes first. When no catalog
56
+ is connected yet, work through these with the user, in order:
57
+ - **An existing catalog** — a local directory or a git repository the
58
+ user or their team already maintains. Ask where it lives; confirm a
59
+ directory is a catalog with
60
+ `agent-bolt catalog validate --dir=<path> --json`.
61
+ - **The starter catalog** — ready-made content to try agent-bolt with:
62
+ `git:https://github.com/tjdals12/AgentBoltCatalog.git`.
63
+ - **A new catalog** — authoring one is its own workflow, done with the
64
+ `agent-bolt catalog` commands; offer it as a separate task.
65
+
66
+ **A local catalog path is stored and resolved relative to `.agent-bolt/`,
67
+ not the project root**: a catalog directory at
68
+ `<project>/.agent-bolt/catalog` is `local:./catalog`.
69
+
70
+ 3. **Initialize**
71
+
72
+ ```bash
73
+ agent-bolt init --tools=claude,codex --source common=local:./catalog --json
74
+ ```
75
+
76
+ ```json
77
+ {
78
+ "configPath": "/work/acme/.agent-bolt/catalog-config.yml",
79
+ "tools": ["claude", "codex"],
80
+ "sources": {
81
+ "common": { "type": "local", "path": "./catalog" }
82
+ },
83
+ "orphanedSources": []
84
+ }
85
+ ```
86
+
87
+ `orphanedSources` lists pack selections that were dropped because their
88
+ source alias no longer exists — relevant only with `--force` over an old
89
+ config.
90
+
91
+ 4. **Verify the source.** `init` does not check that the catalog is reachable.
92
+ Run `agent-bolt list-packs --json` and confirm `failures` is empty — a
93
+ wrong local path surfaces here, not at `init`:
94
+
95
+ ```json
96
+ {
97
+ "sources": [],
98
+ "failures": [
99
+ "source 'common': catalog path not found: /work/acme/.agent-bolt/catalog (check 'path: ./catalog' in config - relative to .agent-bolt/)"
100
+ ]
101
+ }
102
+ ```
103
+
104
+ ## Add a catalog to an existing setup
105
+
106
+ No CLI command edits `sources` — connecting another catalog to an existing
107
+ config is a hand edit.
108
+
109
+ **Steps**
110
+
111
+ 1. Add the source under `sources` in `.agent-bolt/catalog-config.yml`,
112
+ following
113
+ [references/catalog-config-schema.md](references/catalog-config-schema.md).
114
+ A local `path` is relative to `.agent-bolt/`.
115
+ 2. Verify with `agent-bolt list-packs --json` — the new alias appears under
116
+ `sources` and `failures` stays empty.
117
+ 3. Select and install its content via **Install items**.
118
+
119
+ **Guardrails**
120
+
121
+ - Never use `init --force` to add a source — it replaces the whole config,
122
+ dropping every pack selection.
123
+
124
+ ## Explore the catalog
125
+
126
+ **Steps**
127
+
128
+ 1. **List the packs**
129
+
130
+ ```bash
131
+ agent-bolt list-packs --json
132
+ ```
133
+
134
+ ```json
135
+ {
136
+ "sources": [
137
+ {
138
+ "alias": "common",
139
+ "type": "local",
140
+ "packs": [
141
+ {
142
+ "name": "backend",
143
+ "description": "Skills specialized for NestJS/Prisma backend development.",
144
+ "counts": { "skills": 2, "agents": 2, "guidelines": 6 }
145
+ },
146
+ {
147
+ "name": "common",
148
+ "description": "Core development workflow shared across the team — commit/PR creation, business analysis, and more.",
149
+ "counts": { "skills": 4, "agents": 8, "guidelines": 3 }
150
+ }
151
+ ]
152
+ }
153
+ ],
154
+ "failures": []
155
+ }
156
+ ```
157
+
158
+ A source that cannot be loaded lands in `failures` while the command still
159
+ exits 0 — read `failures` before trusting `sources`.
160
+
161
+ 2. **List the items of the packs that look relevant** — trimmed response:
162
+
163
+ ```bash
164
+ agent-bolt list-items --source=common --packs=common --json
165
+ ```
166
+
167
+ ```json
168
+ {
169
+ "sources": [
170
+ {
171
+ "alias": "common",
172
+ "type": "local",
173
+ "packs": [
174
+ {
175
+ "name": "common",
176
+ "description": "Core development workflow shared across the team — commit/PR creation, business analysis, and more.",
177
+ "items": {
178
+ "skills": [
179
+ {
180
+ "name": "create-commit",
181
+ "description": "Generate Conventional Commits messages, stage changes if needed, and run git commit/amend. Use when the user explicitly asks to commit or amend, or asks to generate a commit message from the current/staged diff."
182
+ }
183
+ ],
184
+ "agents": [
185
+ {
186
+ "name": "code-reviewer",
187
+ "description": "Use after code has been written or modified and needs review for quality, correctness, and adherence to best practices. Trigger this agent after significant code changes are made."
188
+ }
189
+ ],
190
+ "guidelines": [
191
+ {
192
+ "name": "commit-rules",
193
+ "description": "Commit message conventions and granularity for this project.",
194
+ "recommended": { "load": "always" }
195
+ },
196
+ {
197
+ "name": "typescript-standards",
198
+ "description": "Project-wide TypeScript coding standards: typing, naming, imports, function/class design, compiler options, and type performance.",
199
+ "recommended": {
200
+ "load": "conditional",
201
+ "glob": ["**/*.ts", "**/*.tsx"]
202
+ }
203
+ }
204
+ ]
205
+ }
206
+ }
207
+ ]
208
+ }
209
+ ],
210
+ "failures": []
211
+ }
212
+ ```
213
+
214
+ A guideline's `recommended` is the load mode `add-pack`/`add-item` will
215
+ write into the config: `always`, or `conditional` with the globs it applies
216
+ to.
217
+
218
+ 3. **Organize what you found and present it.** Group by pack, and give every
219
+ item the same labeled shape, filled from its description. Present all of
220
+ it — this flow filters nothing.
221
+
222
+ ```text
223
+ common — core development workflow shared across the team
224
+ create-commit · skill
225
+ summary: generates Conventional Commits messages, stages
226
+ changes when needed, and runs git commit
227
+ recommended: you want every commit written in one consistent format
228
+ code-reviewer · agent
229
+ summary: reviews written or modified code for correctness and
230
+ quality, labeled by severity
231
+ recommended: you want changes reviewed before they land
232
+ commit-rules · guideline · load: always
233
+ summary: commit message format and commit granularity rules,
234
+ kept in four lines
235
+ applies: every agent's context, at all times
236
+ ```
237
+
238
+ Every kind renders in this shape; only the second label differs —
239
+ `recommended:` for skills and agents, `applies:` for guidelines.
240
+
241
+ 4. **Show an item the user asks about** — the response carries the whole
242
+ item, body included (trimmed here):
243
+
244
+ ```bash
245
+ agent-bolt show-item --source=common --pack=common --item=create-commit --json
246
+ ```
247
+
248
+ ```json
249
+ {
250
+ "source": "common",
251
+ "pack": "common",
252
+ "items": [
253
+ {
254
+ "type": "skill",
255
+ "name": "create-commit",
256
+ "description": "Generate Conventional Commits messages, stage changes if needed, and run git commit/amend. Use when the user explicitly asks to commit or amend, or asks to generate a commit message from the current/staged diff.",
257
+ "toolConfig": {
258
+ "claude": { "disable-model-invocation": true }
259
+ },
260
+ "instructions": "# Create Commit\n\n## Overview\n\nAnalyze the working tree, stage changes when nothing is staged, …",
261
+ "instructionsPath": "/work/acme/.agent-bolt/catalog/packs/common/skills/create-commit/instructions.md",
262
+ "assets": []
263
+ }
264
+ ]
265
+ }
266
+ ```
267
+
268
+ `instructions` is the exact content the item installs, and the only place
269
+ its real behavior is written down. `assets` are extra files the item ships
270
+ with; `toolConfig` is the per-tool settings it carries.
271
+
272
+ ## Recommend items for the project
273
+
274
+ No command produces a recommendation. This flow assembles one from the catalog
275
+ and the project, settles it with the user, and hands the result to
276
+ **Install items**.
277
+
278
+ **Steps**
279
+
280
+ 1. **Map the catalog.** `--source` and `--packs` are optional filters; leave
281
+ both off.
282
+
283
+ ```bash
284
+ agent-bolt list-items --json
285
+ ```
286
+
287
+ The response holds every pack of every source, each item with its name and
288
+ description — the working set for the rest of the flow. One call is enough:
289
+ `list-packs` only adds counts, which are the lengths of these lists.
290
+
291
+ A source that lands in `failures` is a hole in the map — say so rather than
292
+ recommending over it.
293
+
294
+ 2. **Read the project.** Stay inside the repository; these are the sources:
295
+
296
+ | Source | What to take from it |
297
+ | ------------------------------------------------- | ----------------------------------------------------------------- |
298
+ | dependency manifests and lockfiles | the stack in use |
299
+ | the repository tree | structure, tooling, and the workflows that run — tests, CI, hooks |
300
+ | the README | what the project is for, and any stack it says it is moving to |
301
+ | instruction files (e.g. `CLAUDE.md`, `AGENTS.md`) | conventions the user wrote down |
302
+
303
+ An instruction file may contain a block between `<!-- bolt:start -->` and
304
+ `<!-- bolt:end -->`. Skip it: `sync` wrote that block from the current
305
+ config, so it describes what is already installed, not what the project is.
306
+
307
+ 3. **Decide who settles each item.** Work item by item, not pack by pack. Each
308
+ description says what the item is for, and its assumption follows from that
309
+ — a tool, a framework, a workflow, or a kind of work. Some descriptions
310
+ state it outright.
311
+
312
+ | The item assumes | Settled by |
313
+ | ----------------------------- | ------------------------------------------------ |
314
+ | something step 2 found | the code — carry it forward as a candidate |
315
+ | something step 2 did not find | the user — step 4 asks whether it is planned |
316
+ | nothing | the user — step 4 asks whether that work happens |
317
+
318
+ 4. **Ask about everything step 3 left to the user.** Check the tools available
319
+ in the current environment. If a structured user-question tool is available
320
+ (e.g. `AskUserQuestion` in Claude Code), use it to ask these questions and
321
+ use its selection controls when appropriate. Encode the question and choices
322
+ in the tool call; do not print a Markdown copy of the same choices.
323
+
324
+ If no such tool is available, ask one decision group per assistant message
325
+ and wait for the user's answer before asking the next group. Use a yes-or-no
326
+ question when one shared premise decides every item in the group, or when the
327
+ group contains one standalone item; state what yes selects. When a group has
328
+ two or more independent items, present every item as a numbered choice. The
329
+ user selects independent items with option numbers, separated by commas when
330
+ selecting multiple items. If no item applies, accept a negative natural-
331
+ language reply in the user's language. Do not require the user to repeat the
332
+ question number or an item name.
333
+
334
+ Do not repeat prior answers, ready candidates, or later questions in the
335
+ same message.
336
+
337
+ Number each decision group `(current/total)` — `(1/12)`, `(2/12)` — so the
338
+ user can see how many are coming, including when plain-text questions are
339
+ sent in separate messages.
340
+
341
+ Items that assume something step 2 did not find: group them by the
342
+ assumption, one prompt per assumption, since a single answer decides every
343
+ item in the group. The assumption is the prompt's question; name every
344
+ item the answer brings in and what it does.
345
+
346
+ ```text
347
+ (1/12) Will this project use a pull-request workflow on a hosted remote?
348
+ Answering yes brings in:
349
+ create-pr · skill opens PRs with a standard body
350
+ pr-review · skill reviews a PR by number
351
+ pr-rules · guideline PR structure and review etiquette
352
+
353
+ Reply yes or no.
354
+ ```
355
+
356
+ Items that assume nothing: every one of them gets its own option, since
357
+ each stands alone and takes its own answer. Lead each option with the
358
+ situation the item serves; the name follows. For a structured user-question
359
+ tool, make each item a separate selectable option and preselect items step 2
360
+ found a trace of when the tool supports it; say what the trace was. In plain
361
+ text, number the items and include the trace. When there are more than a few,
362
+ split them across prompts by theme — the theme is the prompt's question,
363
+ never an option that swallows several items.
364
+
365
+ ```text
366
+ (2/12) Reviewing and hardening code — which of these happen here?
367
+
368
+ Reply with selected item numbers separated by commas. If none apply, say so.
369
+
370
+ 1. code-reviewer · subagent
371
+ reviewing changes for correctness after they are written
372
+ trace: CI runs on every pull request
373
+ 2. test-automator · subagent
374
+ building out the automated test setup
375
+ trace: unit and e2e suites are already wired up
376
+ 3. clean-code · skill
377
+ holding the codebase to a written set of code-quality rules
378
+ ```
379
+
380
+ When the assumptions themselves run long, ask which of them the project
381
+ involves before listing items under each. Items that assume nothing are
382
+ never folded together this way — standing alone is what put them here, so
383
+ they take more prompts, not fewer options.
384
+
385
+ ```text
386
+ (1/12) Which of these does the project use, or plan to? I will list the
387
+ items under whatever you pick.
388
+
389
+ Reply with selected item numbers separated by commas. If none apply, say so.
390
+
391
+ 1. database · a database and an ORM
392
+ 2. frontend · a web frontend
393
+ 3. pull-request · a pull-request workflow on a hosted remote
394
+ ```
395
+
396
+ In a non-interactive run, report only candidates supported by project
397
+ evidence. Do not select items that require a user answer or continue to
398
+ installation.
399
+
400
+ 5. **Read the bodies, then report.** The candidate set closes with step 4's
401
+ answers; then one `show-item` call per candidate. `instructions` is what
402
+ the item installs, and a description can understate what the item takes —
403
+ put the body through step 3's test again, and drop any candidate whose body
404
+ assumes something step 2 did not find.
405
+
406
+ Report in two parts: what survived and what the body check removed. Name every
407
+ item `source/pack/item`, and a guideline carries the load mode it would be
408
+ selected with.
409
+
410
+ ```text
411
+ Ready to install
412
+ common/common/create-commit · skill
413
+ summary: writes Conventional Commits messages from the diff
414
+ why: the body needs git and nothing else
415
+ common/common/commit-rules · guideline · load: always
416
+ summary: four lines of commit format rules
417
+ why: a commit hook already enforces this format
418
+
419
+ Removed after reading the body
420
+ common/backend/testing-guidelines · guideline
421
+ the body is written for a layered service layout this repo does not use
422
+
423
+ How would you like to proceed?
424
+ 1. install the ready-to-install list as it stands
425
+ 2. put common/backend/testing-guidelines back and install with it
426
+ ```
427
+
428
+ Close with numbered options, one line each, and take every option from a
429
+ section you just printed — a section with nothing in it offers nothing.
430
+
431
+ **Install items** starts from that list.
432
+
433
+ **Guardrails**
434
+
435
+ - Reserve `show-item` for candidates — reading the catalog's bodies to route
436
+ them costs many times what the descriptions cost.
437
+ - Do not ask a question whose answer would not change what you recommend —
438
+ every prompt is built from items in the working set.
439
+ - Say what a guideline's load mode means when recommending one: `always`
440
+ applies it at all times, `conditional` only to files matching its globs.
441
+
442
+ ## Install items
443
+
444
+ **Steps**
445
+
446
+ 1. **Agree on the set with the user** — via **Explore the catalog** or
447
+ **Recommend items for the project**.
448
+
449
+ 2. **Record the selection.** Whole packs:
450
+
451
+ ```bash
452
+ agent-bolt add-pack --source=common --packs=backend --json
453
+ ```
454
+
455
+ ```json
456
+ {
457
+ "results": [
458
+ {
459
+ "source": "common",
460
+ "added": [
461
+ {
462
+ "name": "backend",
463
+ "skills": ["nestjs-expert", "prisma-expert"],
464
+ "agents": ["architect-reviewer", "developer"],
465
+ "guidelines": {
466
+ "prisma-schema": { "load": "conditional", "glob": ["prisma/**"] },
467
+ "testing-guidelines": { "load": "conditional", "glob": ["src/**/*.ts"] }
468
+ }
469
+ }
470
+ ],
471
+ "skipped": []
472
+ }
473
+ ],
474
+ "failures": []
475
+ }
476
+ ```
477
+
478
+ Specific items:
479
+
480
+ ```bash
481
+ agent-bolt add-item --source=common --pack=common --skills=create-commit --guidelines=commit-rules --json
482
+ ```
483
+
484
+ ```json
485
+ {
486
+ "results": [
487
+ {
488
+ "source": "common",
489
+ "packs": [
490
+ {
491
+ "name": "common",
492
+ "created": true,
493
+ "added": {
494
+ "skills": ["create-commit"],
495
+ "agents": [],
496
+ "guidelines": ["commit-rules"]
497
+ },
498
+ "skipped": { "skills": [], "agents": [], "guidelines": [] }
499
+ }
500
+ ]
501
+ }
502
+ ],
503
+ "failures": []
504
+ }
505
+ ```
506
+
507
+ `created: true` means the pack section was newly added to the config;
508
+ `skipped` holds names that were already selected. Nothing is installed yet
509
+ — these commands edit `.agent-bolt/catalog-config.yml` and stop.
510
+
511
+ 3. **Adjust guideline load modes if the user wants them different.**
512
+ Selections land with the catalog's `recommended` load mode. Changing
513
+ `load`/`glob` afterward is done by editing the config file by hand — see
514
+ [references/catalog-config-schema.md](references/catalog-config-schema.md).
515
+
516
+ 4. **Preflight the shared instructions file.** Some tools install guidelines
517
+ into a shared instructions file, fenced by a marker block the CLI owns
518
+ (e.g. Codex and OpenCode, which share `AGENTS.md`). If guidelines are being
519
+ installed for such a tool, check that file first:
520
+ - The file does not exist → fine; `sync` creates it, markers included.
521
+ - The file exists and has `<!-- bolt:start -->` and `<!-- bolt:end -->` →
522
+ fine.
523
+ - The file exists without markers → **ask the user where the block should
524
+ go** (suggest the end of the file), insert the two marker lines there,
525
+ then sync. Never place the markers without asking: the file is the
526
+ user's, and the position decides how their own instructions and the
527
+ managed block read together.
528
+
529
+ 5. **Sync, with the user's approval**
530
+
531
+ ```bash
532
+ agent-bolt sync --json
533
+ ```
534
+
535
+ ```json
536
+ {
537
+ "tools": [
538
+ {
539
+ "tool": "claude",
540
+ "counts": { "skills": 3, "agents": 2, "guidelines": 7 },
541
+ "changes": [
542
+ { "source": "common", "label": "common/create-commit", "status": "installed" },
543
+ { "source": "common", "label": "common/commit-rules", "status": "installed" }
544
+ ]
545
+ },
546
+ {
547
+ "tool": "codex",
548
+ "counts": { "skills": 3, "agents": 2, "guidelines": 7 },
549
+ "changes": [
550
+ { "source": "common", "label": "common/create-commit", "status": "installed" },
551
+ { "source": null, "label": "AGENTS.md (managed block)", "status": "installed" }
552
+ ]
553
+ }
554
+ ]
555
+ }
556
+ ```
557
+
558
+ Statuses are `installed` (newly written), `updated` (rewritten), `removed`
559
+ (deleted). Report the changes per tool.
560
+
561
+ 6. **If sync fails on the marker block**, it stopped midway — items for other
562
+ targets are already written, only the block is not:
563
+
564
+ ```json
565
+ {
566
+ "error": {
567
+ "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 -->"
568
+ }
569
+ }
570
+ ```
571
+
572
+ Add the markers as in step 4 and run `sync` again; it reconciles the rest.
573
+
574
+ **Guardrails**
575
+
576
+ - Never run `sync` without the user's approval — it writes and deletes files
577
+ across the project.
578
+ - Never report an item as installed while it is only in the config.
579
+ - Do not add items the user has not agreed to, however useful they look.
580
+
581
+ ## Remove items
582
+
583
+ **Steps**
584
+
585
+ 1. **Record the removal.** Specific items:
586
+
587
+ ```bash
588
+ agent-bolt remove-item --source=common --pack=common --guidelines=commit-rules --json
589
+ ```
590
+
591
+ ```json
592
+ {
593
+ "results": [
594
+ {
595
+ "source": "common",
596
+ "packs": [
597
+ {
598
+ "name": "common",
599
+ "pruned": false,
600
+ "removed": { "skills": [], "agents": [], "guidelines": ["commit-rules"] },
601
+ "skipped": { "skills": [], "agents": [], "guidelines": [] }
602
+ }
603
+ ]
604
+ }
605
+ ],
606
+ "failures": []
607
+ }
608
+ ```
609
+
610
+ `pruned: true` means the pack section became empty and was dropped from the
611
+ config. Whole packs:
612
+
613
+ ```bash
614
+ agent-bolt remove-pack --source=common --packs=backend --json
615
+ ```
616
+
617
+ ```json
618
+ {
619
+ "results": [
620
+ {
621
+ "source": "common",
622
+ "removed": [
623
+ {
624
+ "name": "backend",
625
+ "skills": ["nestjs-expert", "prisma-expert"],
626
+ "agents": ["architect-reviewer", "developer"],
627
+ "guidelines": ["prisma-schema", "testing-guidelines"]
628
+ }
629
+ ],
630
+ "skipped": []
631
+ }
632
+ ],
633
+ "failures": []
634
+ }
635
+ ```
636
+
637
+ 2. **Sync, with the user's approval.** The installed files stay on disk until
638
+ then (`check` reports them as `orphaned` in the meantime):
639
+
640
+ ```json
641
+ {
642
+ "tools": [
643
+ {
644
+ "tool": "claude",
645
+ "counts": { "skills": 3, "agents": 2, "guidelines": 6 },
646
+ "changes": [{ "source": null, "label": "common/commit-rules", "status": "removed" }]
647
+ },
648
+ {
649
+ "tool": "codex",
650
+ "counts": { "skills": 3, "agents": 2, "guidelines": 6 },
651
+ "changes": [{ "source": null, "label": "AGENTS.md (managed block)", "status": "updated" }]
652
+ }
653
+ ]
654
+ }
655
+ ```
656
+
657
+ ## Audit the installation
658
+
659
+ **Steps**
660
+
661
+ 1. **Check**
662
+
663
+ ```bash
664
+ agent-bolt check --json
665
+ ```
666
+
667
+ ```json
668
+ {
669
+ "tools": [
670
+ {
671
+ "tool": "claude",
672
+ "counts": { "skills": 3, "agents": 2, "guidelines": 7 },
673
+ "changes": [
674
+ { "source": "common", "label": "frontend/react-dev", "status": "missing" },
675
+ { "source": "common", "label": "common/create-commit", "status": "drifted" },
676
+ { "source": null, "label": "common/commit-rules", "status": "orphaned" }
677
+ ]
678
+ },
679
+ {
680
+ "tool": "codex",
681
+ "counts": { "skills": 3, "agents": 2, "guidelines": 7 },
682
+ "changes": []
683
+ }
684
+ ],
685
+ "drifted": true
686
+ }
687
+ ```
688
+
689
+ When `drifted` is `true` the command exits 1 — that is what fails a CI
690
+ step. Empty `changes` everywhere and `drifted: false` mean the project
691
+ matches the config.
692
+
693
+ 2. **Read the statuses**
694
+
695
+ | Status | Meaning |
696
+ | ---------- | -------------------------------------------------------------------- |
697
+ | `missing` | Selected in the config but not installed yet |
698
+ | `drifted` | Installed, but its content differs from what the catalog renders |
699
+ | `orphaned` | Installed, but no longer selected in the config (`source` is `null`) |
700
+
701
+ 3. **Reconcile with `sync`, with the user's approval** — it installs the
702
+ missing, rewrites the drifted, and deletes the orphaned. Before syncing
703
+ over a `drifted` entry, tell the user the file was changed on disk and
704
+ would be overwritten: if the change is worth keeping, it belongs in the
705
+ catalog, not in the installed copy.
706
+
707
+ **Guardrails**
708
+
709
+ - Never edit installed `bolt-*` files to fix drift — sync regenerates them
710
+ wholesale, and extra files placed inside an installed skill directory are
711
+ deleted on the next sync.
712
+ - `check` never modifies anything; it is always safe to run.
713
+
714
+ ## When agent-bolt is not set up
715
+
716
+ - `agent-bolt: command not found` → install it:
717
+ `npm install -g @tjdals12/agent-bolt`.
718
+ - A command fails saying the config was not found → run **Set up agent-bolt**.
719
+ - Anything else that fails prints `{"error": {"message": "…"}}` — the message
720
+ usually names the fix; relay it and act on it.