@theholocron/cli 5.0.0-alpha.99 → 5.1.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.
package/README.md CHANGED
@@ -17,39 +17,146 @@ holocron --help
17
17
  ## Interactive mode
18
18
 
19
19
  Run `holocron` with no command, a parent command with no subcommand
20
- (`holocron auth`, `holocron skills`, `holocron upgrade`), or a leaf command
21
- missing a required positional (`holocron deploy`, `holocron secret set`), and
22
- you get a prompt instead of a `--help` dead end:
20
+ (`holocron check`, `holocron repo`, `holocron upgrade`, …), or a leaf command
21
+ missing a required positional (`holocron deploy`, `holocron new secret`), and
22
+ you get a prompt instead of a `--help` dead end.
23
+
24
+ The menu mirrors the command tree: each level shows only the next word, and a
25
+ group (marked `›`) opens its own submenu, as deep as the commands nest. Nothing
26
+ is shown as a `<command> <subcommand>` path — `show config` is `show ›` then
27
+ `config`. Every submenu has a `← back` item, and a command that is also a group
28
+ (`sync`, `deploy`) has a `(run it)` item at the top of its submenu. Typing
29
+ searches the whole tree, with
30
+ name matches ranked above description matches.
31
+
32
+ A command's own options are offered too: a required one is always asked, and the
33
+ rest sit behind one "set any options?" checklist, so only the ones you pick are
34
+ prompted. A secret option (`--otp`) is typed masked and handed to the command
35
+ through its environment, never its argument list. Options the menu does not offer
36
+ (flags meant for CI, ones a command asks for itself) are listed as skipped in the
37
+ command's entry, and a test fails when a command has an option that is neither.
23
38
 
24
39
  ```console
25
40
  $ holocron
26
- ? What would you like to do? › dep
27
- ────────────────────────────────────────────────
28
- ❯ deploy Trigger a deployment via the configured `deployment` capability
41
+ ? What would you like to do? › repo
42
+ ❯ repo ›
43
+ ? repo — choose a subcommand: › upgrade
44
+ ? upgrade — choose a subcommand: › node
45
+ ? Target Node.js major version: › 24
46
+ ```
47
+
48
+ For a command that declares options (so far: `publish package` — more are
49
+ rolled out one command group at a time), it also offers those: any required
50
+ option is prompted like a positional, and everything else goes through one
51
+ "Set any options?" checkbox, prompting only what you picked:
29
52
 
30
- ? Branch to deploy: › main
53
+ ```console
54
+ ? Set any options? (space to select, enter to skip) › ◉ npm dist-tag ◯ One-time password (2FA)
55
+ ? npm dist-tag (blank = latest): › beta
31
56
  ```
32
57
 
58
+ `publish package` specifically has three workflows that don't mix — a
59
+ steady-state publish, a one-shot `--initial` bootstrap, and a `--sync-trust`
60
+ maintenance run — so it asks which one first, then only offers that
61
+ workflow's own options; nothing from a different workflow is ever shown:
62
+
63
+ ```console
64
+ ? What would you like to do? › Initial publish (--initial)
65
+ ? Set any options? (space to select, enter to skip) › ◉ One-time password (2FA)
66
+ ...dry-run output...
67
+ ? Dry run complete — proceed with the real run? › yes
68
+ ? One-time password (2FA), if npm requires it for this publish: › ***
69
+ ```
70
+
71
+ **`--initial` with a stage-only token.** With `HOLOCRON_NPM_TOKEN` (or bare `NPM_TOKEN`) set, `publish package --initial`
72
+ runs no `npm login` and publishes nothing: it stages each new package with `npm stage publish` (npm 11.15 or later; an
73
+ older npm stops the command with the version it needs) and prints one `npm stage approve <id>` line per package. You
74
+ approve each, which asks for 2FA (`--otp <code>` can give the code), or use the package's Staged Packages tab on
75
+ npmjs.com. The token is a stage-only granular token made on npmjs.com (`@theholocron` scope, 2FA bypass off, a short
76
+ expiry); it is read through `resolveValue()` (so a 1Password Environment can hold it), handed to `npm` in the child's
77
+ environment for that run only, never written to an `.npmrc` and never printed. `npm whoami` runs first, so an expired
78
+ token is reported as such (E401). With no token the command behaves as before (web login, direct publish).
79
+
80
+ **`publish approve`** approves what `--initial` staged: `holocron publish approve [--otp <code>] [--yes] [--dry-run]`
81
+ runs `npm stage list`, keeps the pending stages (any status but approved, rejected, published, cancelled or expired) of
82
+ this repository's packages (`--group`, `--exclude-group` and `--package` narrow them as for `publish package`), prints
83
+ one row each, asks once (`--yes` skips it; without a terminal it is required), then runs `npm stage approve <id>` for
84
+ each, with `--otp` when given and otherwise letting npm ask. It uses your own npm login, never `HOLOCRON_NPM_TOKEN`; a
85
+ failed approval is a row and the next still runs, with a non-zero exit. It never stages, publishes or logs in, and
86
+ `--dry-run` approves nothing.
87
+
88
+ Each workflow's label ends with its real flag in parentheses when it has
89
+ one, and a longer caveat ("use only for a package's very first publish")
90
+ shows as helper text under the highlighted choice rather than bloating the
91
+ label itself.
92
+
93
+ A secret option (`--otp`) is masked as you type and delivered to the spawned
94
+ command through its environment, never its argv — `ps` and shell history
95
+ both expose a child's argv, never its env. A time-sensitive one like `--otp`
96
+ is checked off early but not actually typed until right before the real run
97
+ — after the dry-run preview and the "proceed?" question, never before —
98
+ since a dry run never checks it anyway and a code typed any earlier risks
99
+ going stale while something else is still being answered.
100
+
101
+ Whether an option is _checkbox-optional vs. always included_ and _collected
102
+ upfront vs. collected last_ are independent choices. `publish package`'s
103
+ `--otp` is always collected last, but whether it's checkbox-optional depends
104
+ on `HOLOCRON_NPM_ENFORCE_2FA`: unset (the default), it's opt-in like any other
105
+ checkbox pick; set in your own shell profile (never checked into the repo),
106
+ it's always included — for an operator whose own npm account enforces 2FA
107
+ on every publish, so the box doesn't need re-checking every single run.
108
+ Setting it has no effect on anyone else publishing from the same repo.
109
+
33
110
  The picked command spawns as a normal `holocron <command> …` invocation —
34
111
  `--token`, `--org`, `--cwd`, and `--dry-run` on the original invocation carry
35
112
  through. A non-interactive shell (CI, a script, a pipe) gets the old
36
113
  hard-failure message instead of hanging on a prompt.
37
114
 
115
+ For a command whose handler honours `--dry-run` (most of them — everything
116
+ except the token commands and `show config`), the menu always previews it first — a
117
+ dry run doesn't mutate anything, so there's nothing to ask permission for —
118
+ then asks the one real decision:
119
+
120
+ ```console
121
+ ...dry-run output...
122
+ ? Dry run complete — proceed with the real run? › yes
123
+ ```
124
+
125
+ A preview that reports nothing would actually change (e.g. `clone` finding
126
+ every repo already cloned) skips that question too — there'd be nothing for
127
+ the real run to do either. `--skip-dry-run` opts out of the preview
128
+ entirely, straight to the real run, for when you already know what you want.
129
+
38
130
  ## Execution contexts
39
131
 
40
132
  Every command is tagged with how much of a repo it needs:
41
133
 
42
- | Context | Needs | Examples |
43
- | ------------ | -------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
44
- | `global` | just the CLI binary | `version`, `clone`, `new`, `upgrade node`, `auth set` / `check`, `plugin create`, `skills …` |
45
- | `repo-aware` | `./holocron.config` in cwd, no plugins | `run`, `ci`, `config show`, `sync-readme` |
46
- | `workspace` | the `@theholocron/holocron-plugin-*` packages resolvable | `doctor`, `setup`, `sync`, `secrets sync`, `deploy` |
134
+ | Context | Needs | Examples |
135
+ | ------------ | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
136
+ | `global` | the CLI binary alone | `version`, `clone`, `new repo` / `plugin` / `token` / `github-app`, `upgrade …`, `check token` / `resolved`, `remove token` / `skill`, `list tokens` / `skills`, `publish …`, `install skills`, `update skills`, `run lint commit-msg` |
137
+ | `repo-aware` | `./holocron.config`, walking up from cwd, no plugins | `run`, `run ci`, `show config`, `sync readme`, `deploy on-release` |
138
+ | `workspace` | the `@theholocron/holocron-plugin-*` packages resolvable | `doctor`, `setup`, `sync`, `cleanup branches`, `cleanup embeds`, `sync secrets`, `deploy`, `sync github`, `sync issues`, `sync ideas`, `sync tooling`, `export requests`, `open requests`, `upload coverage` |
47
139
 
48
140
  A `workspace` command run from a bare global install (no plugins next to the
49
141
  CLI) fails with one actionable line — install the plugins as devDependencies or
50
- use `pnpm exec holocron <cmd>`. `auth check` degrades to "token present,
142
+ use `pnpm exec holocron <cmd>`. `check token` degrades to "token present,
51
143
  verification skipped" instead. `holocron --help` prints the grouping; see
52
- [Execution Contexts](https://theholocron.github.io/holocron/execution-contexts).
144
+ [Execution Contexts](https://docs.theholocron.dev/holocron/execution-contexts).
145
+
146
+ ### Viewing the resolved config
147
+
148
+ `holocron show config` prints the resolved config. On a TTY it opens a foldable
149
+ tree by default; piped or redirected, it always emits plain, valid JSON
150
+ (`holocron show config | jq`).
151
+
152
+ ```console
153
+ holocron show config # TTY: foldable tree (↑↓ move, →/⏎ expand, ← collapse, E/C all, q quit)
154
+ holocron show config --depth 2 # static coloured tree, anything nested deeper than 2 levels collapsed
155
+ holocron show config --no-interactive # static coloured tree, fully expanded
156
+ ```
157
+
158
+ Passing `--interactive` explicitly needs a TTY on stdin and stdout and fails
159
+ with a one-line message otherwise; the default falls back to static output. It has no extra dependencies — nothing to install.
53
160
 
54
161
  ## Config file
55
162
 
@@ -101,16 +208,89 @@ in at load time:
101
208
  A minimal config — for repos with a `package.json` and a GitHub remote
102
209
  — only needs `providers`:
103
210
 
211
+ ### The `.holocron/` directory
212
+
213
+ A big declaration can live in a file next to the config instead of inline, so `holocron.config.ts` stays a short index
214
+ of choices. `.holocron/<area>.{ts,js,mjs,cjs,json}` is read by name, and the areas are a closed list (a file not on
215
+ the list is never read):
216
+
217
+ | File | Where it lands |
218
+ | --------------------------- | ---------------------------------------------------------------------------------- |
219
+ | `.holocron/notifications.*` | the `layout` option of the `providers.notifications` entry (which keeps `guildId`) |
220
+ | `.holocron/repo.*` | keys of `repo` (`defaultBranch` stays inline: Sentinel needs it first) |
221
+ | `.holocron/org.*` | provider options the config leaves out (`teamId`, `accountId`), see below |
222
+
223
+ The file's default export is the value (`.ts` keeps its comments; `.json` needs no `import`, for repos with no
224
+ `package.json`). If both exist for one area, `.ts` wins over `.json`. A missing directory changes nothing. Setting the
225
+ same thing inline and in a file is an error that names both (`the notifications layout is set in providers.notifications
226
+ and in .holocron/notifications.ts`, `repo.topics is set in the config and in .holocron/repo.json`): there is no merge and
227
+ no precedence. An area file may `import` a sibling in `.holocron/`. Never put a secret in the directory: it is public in
228
+ a public repo.
229
+
230
+ To type the layout, import the type and use `satisfies` (there is no `defineLayout()` helper; the type-only import keeps
231
+ runtime code out of a file Sentinel evaluates from the default branch):
232
+
233
+ ```ts
234
+ import type { NotificationsLayout } from "@theholocron/cli";
235
+
236
+ export default {
237
+ // comments stay
238
+ testChannel: "holonet",
239
+ } satisfies NotificationsLayout;
240
+ ```
241
+
242
+ This repo's own Discord layout lives in `.holocron/notifications.ts`; `holocron.config.ts` keeps only `guildId`.
243
+
244
+ `RULES.md` and the webhook avatar live in `.holocron/` too (`.holocron/pinned/rules.md`, `.holocron/media/webhook-avatar.png`),
245
+ but they are not areas: the layout names them with an explicit repo-relative path (`pinned: [{ channel, file }]`,
246
+ `webhookAvatar`). `.holocron/projects/<name>.json` is the project-board template folder (SPEC-0020), read by its own
247
+ default and not placed into the config.
248
+
249
+ **Sentinel** reads the directory too, so its PR config check, property sync and role sync see the same merged config as
250
+ the CLI. It lists `.holocron/` at the config's ref and fetches the whole tree (any depth, so an area may import a
251
+ sibling), within caps: 50 files, 100 KB per file, 512 KB in all. Past a cap, or on an area file that does not load,
252
+ the check reports a load error. Only what the config or an area file imports is evaluated. The design and the decisions
253
+ are in `docs/wiki/specifications/tech-holocron-directory.spec.md` (SPEC-0069).
254
+
255
+ **Keys that never move out of `holocron.config.ts`.** `repo.defaultBranch`, because the config is the one file read
256
+ before the directory, and the default branch is what says which branch holds `.holocron/` and the config. Every other
257
+ top-level key (`name`, `org`, `domain`, `providers`, `tasks`) also stays, but only because the closed list of areas has
258
+ no entry for it: Sentinel's `validateConfig()` reads none of them before it fetches `.holocron/` (it needs the config
259
+ file's path and the `ref`, nothing from inside it). Keys that a preset spreads into `repo` (`protection`, `properties`,
260
+ which `syncPropertiesFromConfig()` reads) stay inline too, since a key set both inline and in the file is an error. There
261
+ is no per-key precedence: the loader does not let an inline key win, it refuses the duplicate and names both places. This
262
+ repo's `.holocron/repo.ts` holds `teams`, `topics`, `variables` and `secrets`, names and identifiers only, typed with
263
+ `satisfies RepoConfig` (a type-only import).
264
+
265
+ **The `org` area** (#1820). The organization's constants that are provider options and that CI does not need:
266
+ `.holocron/org.ts` is `{ domain, cloudflare: { accountId }, vercel: { teamId }, checkly: { accountId }, sentry: { org } }` (typed with
267
+ `satisfies OrgConfig`). `domain` is the org's DNS zone: the loader sets `domain` on a config that leaves it out (set in
268
+ both is an error), and a file that builds a hostname while it is evaluated imports it (`import org from "./org.js"`). The loader fills each of these into every provider entry of that name that leaves the option
269
+ out, so the config can say `deployment: ["vercel", { domain }]`, `monitoring: "checkly"` and `errors: "sentry"`. The same option set inline
270
+ and in the file is an error that names both (`vercel.teamId is set in providers.deployment and in
271
+ .holocron/org.ts`), with no merge and no precedence. A provider key or an option the area does not know is an error; a
272
+ provider the config does not use is ignored. The org area is shared: a config in a subdirectory (`apps/sentinel`)
273
+ also reads the repository root's `.holocron/org.ts` (the nearest ancestor with a `.git`), and its own
274
+ `.holocron/org.ts` wins for a key set in both, option by option; that is not an error, so an identifier written in the
275
+ root file needs no copy in the app. `issueTypes` (#2512) is a top-level list in the same file, `[{ name, description?, color?, enabled?, label?, commit? }]`: the organization's issue Types, which `--type` on `new issue`, `update issue`, `new work`, `update work` and `start work` accepts as lower-case kinds beside `bug`, `feature` and `task` (`commit` is the commit type `start work` uses, `label` the Linear label); it is validated when the config loads and a subdirectory's own list replaces the root's. The other areas (`repo`, `notifications`) describe the repository and are not
276
+ shared. Anything CI needs (`HOLOCRON_CLOUDFLARE_ACCOUNT_ID`,
277
+ `HOLOCRON_TURBO_TEAM`, `HOLOCRON_AXIOM_DATASET`) stays out: it lives in 1Password and syncs to a GitHub variable (`repo.variables.sync`),
278
+ and nothing else carries a copy. `.holocron/org.md` (the agent contract the CLI embeds) is not an area: only
279
+ `.ts`, `.js`, `.mjs`, `.cjs` and `.json` are read.
280
+
104
281
  ### repo options
105
282
 
106
283
  Additional `repo` fields recognised by `holocron setup`:
107
284
 
108
- | Field | Type | Description |
109
- | ----------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
110
- | `repo.teams` | `Array<string \| { slug, permission }>` | GitHub teams granted repo access. String shorthand defaults to `push` (Write). `holocron setup` also writes `.github/CODEOWNERS` for teams with `push`/`maintain`/`admin`. |
111
- | `repo.topics` | `string[]` | GitHub topics set on the repository. |
112
- | `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron setup`. For `"strict"`, the required status checks are derived from the task manifest — see below. |
113
- | `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
285
+ | Field | Type | Description |
286
+ | ----------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
287
+ | `repo.teams` | `Array<string \| { slug, permission }>` | GitHub teams granted repo access. String shorthand defaults to `push` (Write). `holocron setup` also writes `.github/CODEOWNERS` for teams with `push`/`maintain`/`admin`. |
288
+ | `repo.topics` | `string[]` | GitHub topics set on the repository. |
289
+ | `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron setup`. For `"strict"`, the required status checks are derived from the task manifest — see below. |
290
+ | `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
291
+ | `repo.variables` | `{ repo?, org?, sync?, prune? }` | GitHub Actions variables created and updated by `holocron setup`. Undeclared ones are left alone unless `prune` is on. `sync: [{ environment, keys, scope?, visibility? }]` names the vault environment `holocron sync secrets` fills Actions variables from (a separate environment from the secrets one; names only, a blank value is skipped, `doctor secrets` expects the names). A name given as a literal and in `sync`, or `prune` with `sync`, is a config error. |
292
+ | `repo.secrets` | `{ repo?, org?, environments?, sync? }` | Names of the secrets that must exist, checked (never written) by `holocron doctor secrets`. Names only. The notification layout's secrets and a Chromatic project token are expected without being listed. `sync: [{ environment, keys?, scope?, repos? }]` declares the vault environments `sync secrets` fills from (it follows these entries, one step per scope, unless `--github-secret` is given; the `local` and `dev` layers are never synced (a `ConfigError`, and an entry naming them does not load); an environment with no entry and no `--github-secret` is a `ConfigError` before the vault is read, #2104; a blank value is skipped); the doctor expects their keys (every key the `vault` provider lists when `keys` is omitted, names only) at the `scope` (`repo`, `env=<name>`, `org=<name>`). An `org=` scope requires `repos`, the repositories that can read the secrets (visibility `selected`, never `all`); without it the config does not load. `doctor secrets` flags a secret readable by more repositories than its entry lists, and a name held at both repository and organization level. |
293
+ | `repo.views` | `Record<string, { name, filter, description?, icon?, color?, visibility? }>` | Saved views of the Issues page. GitHub has no API for them: `setup` and `doctor repo` print the settings, a link that opens each search and its match count. See the docs. |
114
294
 
115
295
  ### Custom properties synced to GitHub
116
296
 
@@ -139,7 +319,7 @@ properties; properties are never a second editable source of truth):
139
319
  | `holocron_compliance` | `"compliant" \| "non-compliant"` against a minimal `source` + `ci` baseline |
140
320
 
141
321
  Field definitions and derivation heuristics:
142
- `.notes/tech-holocron-platform.spec.md` → "Custom-properties sync — field
322
+ `docs/wiki/specifications/tech-holocron-platform.spec.md` → "Custom-properties sync — field
143
323
  definitions (#677)".
144
324
 
145
325
  The four derived fields' pure computation —
@@ -152,6 +332,10 @@ these functions unchanged, gathering the same inputs over the GitHub API
152
332
  instead (D8 — one derivation, two input sources, not two
153
333
  implementations).
154
334
 
335
+ A provider's `Errors.describe()` returns `envKeys` (always pushed to repo secrets by `holocron setup`) and an optional
336
+ `frameworkEnvKeys` (`{ next: ["NEXT_PUBLIC_SENTRY_DSN"] }`), keyed by a `StackName` from `deriveStack()` and pushed only when
337
+ the root or a workspace package depends on that framework.
338
+
155
339
  `missingCapabilities(capabilities)` is `deriveCompliance()`'s sibling —
156
340
  same `REQUIRED_BASELINE` table, but returns _which_ required capabilities
157
341
  are absent rather than whether any are. `@theholocron/sentinel`'s
@@ -163,17 +347,30 @@ posts, instead of reporting pass/fail.
163
347
  `holocron setup` builds the branch-protection required-check list from the
164
348
  manifest, not a hand-maintained array:
165
349
 
166
- - `"DCO"` (hard-prepended), then
350
+ In the repo that holds the reusable workflows the list is `ci / Required checks` and `DCO` (holocron itself sets `ci.aggregate: none` and writes its list down, below). That is the aggregate
351
+ check (`ci/workflows/ci.yml`, written by `setup` / `sync` as `.github/workflows/ci.ci.yml`): it waits on
352
+ every `{ required: true }` task, the hand-written checks in `extraRequiredChecks` and the coverage statuses (the `coverage` provider's required ones, `Coverage.statusContexts()`; `codecov/*` by default when none is loaded), and its
353
+ job summary lists each of them with a link, failing ones first. The DCO check (`validate:dco / Run Developer Certificate of Origin`, Sentinel's) stays its own required context. In any other
354
+ repo, which has no `ci` caller yet, the list is:
355
+
356
+ - the DCO check (`validate:dco / Run Developer Certificate of Origin`), then
167
357
  - every `{ required: true }` task's workflow check context (`Lint / Conclusion`,
168
- `Test / Conclusion`, `Typecheck / Conclusion`, `audit / Conclusion`), walked
358
+ `Test / Conclusion`, `Typecheck / Conclusion` while the repo is on the frozen reusables; `test:unit / Conclusion`,
359
+ `typecheck / Run tsc --noEmit`, … once it moves to the flat ones), walked
169
360
  in CI order, then
170
361
  - the top-level `extraRequiredChecks` (codecov gates, a bundle-build check, …).
171
362
 
363
+ Two settings change that. `ci: { aggregate: "none" }` drops the aggregate even in the repo that holds the reusables: no
364
+ `ci.ci.yml`, no `ci.yml` reusable, and the list above is the one that applies there. And `repo.requiredChecks`
365
+ (usually in `.holocron/repo.ts`) writes the list down: when it is set it is the whole list, `setup` writes exactly those
366
+ contexts and `doctor repo` compares the ruleset with them, so the DCO check and each task's context are entries like any
367
+ other. It must be a non-empty list of distinct, non-blank contexts, or the config does not load.
368
+
172
369
  ```ts
173
370
  export default defineConfig({
174
371
  tasks: [
175
- { name: "lint", required: true },
176
- { name: "test", required: true },
372
+ { name: "lint:code", required: true },
373
+ { name: "test:unit", required: true },
177
374
  { name: "typecheck", required: true },
178
375
  ],
179
376
  extraRequiredChecks: ["codecov/patch", "codecov/project"],
@@ -186,11 +383,12 @@ The generated ruleset also sets `require_extra_approval_for_unattributed_changes
186
383
  false` — with `required_approving_review_count: 0` and a single maintainer, the
187
384
  GitHub default (`true`) is an unsatisfiable block on any PR with an
188
385
  unverified/unattributed commit. Repository-admin bypass still covers the real
189
- risk. And the `codecov.yml` `holocron setup` writes carries `if_not_found:
386
+ risk. And the `codecov.yml` `holocron setup` writes (made by the `coverage` provider, not by the CLI) carries `if_not_found:
190
387
  success` on every status default, so an infra-only PR (dep bump, config,
191
388
  lockfile — no coverable change) passes instead of hanging on a `codecov/*`
192
- required check that never posts. A re-run of `holocron setup` backfills both into
193
- an existing repo.
389
+ required check that never posts. It also ignores `**/*.mdx`, so a docs-only PR that
390
+ adds pages is not judged to change testable files and left with an empty upload.
391
+ A re-run of `holocron setup` backfills all of these into an existing repo.
194
392
 
195
393
  ### Default branch (`repo.defaultBranch`)
196
394
 
@@ -212,6 +410,19 @@ branch so Sentinel validates against what's actually being developed, then
212
410
  change it back once that branch merges to `main` for a stable cut and stops
213
411
  being the active branch.
214
412
 
413
+ ### Doc-comment coverage
414
+
415
+ ```ts
416
+ export default defineConfig({
417
+ repoValidation: { docsCoverage: "required" }, // "off" (default) | "warn" | "required"
418
+ });
419
+ ```
420
+
421
+ Controls `holocron probe docs patch` (skipped, reports without failing, or fails for an export a PR adds or changes
422
+ without a doc comment) and whether `holocron setup` adds the `documentation` flag and its statuses to
423
+ `codecov.yml`, informational for `"warn"`. It never touches the required checks. See the
424
+ [config docs](https://docs.theholocron.dev/holocron/config/#doc-comment-coverage).
425
+
215
426
  ### Git hooks
216
427
 
217
428
  ```ts
@@ -222,7 +433,7 @@ export default defineConfig({
222
433
  });
223
434
  ```
224
435
 
225
- `holocron setup` writes `.husky/pre-push` (runs `holocron ci` before every
436
+ `holocron setup` writes `.husky/pre-push` (runs `holocron run ci` before every
226
437
  push) and `.husky/pre-commit` (runs `gitleaks protect --staged` + `lint-staged`
227
438
  before every commit — scoped to staged changes, not the whole history, so a
228
439
  past false positive can't permanently block future commits) and sets
@@ -231,6 +442,16 @@ past false positive can't permanently block future commits) and sets
231
442
  setup --hooks` / `--no-hooks` override per run. Bypass one push with `git push
232
443
  --no-verify`; bypass one commit with `git commit --no-verify`.
233
444
 
445
+ ### Claude Code settings
446
+
447
+ ```ts
448
+ agent: ["claude", { dcg: true }],
449
+ ```
450
+
451
+ Opt-in, in the same form a provider takes: `agent` is a name, or a name with its options. With `dcg: true`, `holocron setup` and `holocron sync` merge a `PreToolUse` hook for Bash calls into `.claude/settings.json`, so the [destructive command guard](/holocron/skills/destructive-command-guard/) (`dcg`) checks each command before Claude Code runs it. The file already there is read and merged, so a repo's own `permissions` and hooks stay, and a second run changes nothing. A file that is not valid JSON, or whose `hooks` is not an object, fails the step and is left as it is. `holocron probe generated check` fails when the hook is missing. A repo that sets nothing gets no file.
452
+
453
+ Each machine needs the `dcg` binary on its `PATH`. It is not in Homebrew; `./.humans/setup.sh` checks for it in a repo that wires it in and prints the install command, and `./.humans/setup.sh doctor` fails when it is missing.
454
+
234
455
  ### Task scripts
235
456
 
236
457
  `holocron sync` reconciles `package.json#scripts` from the `tasks` manifest
@@ -238,15 +459,17 @@ setup --hooks` / `--no-hooks` override per run. Bypass one push with `git push
238
459
 
239
460
  ```ts
240
461
  export default defineConfig({
241
- tasks: ["test", "lint", "typecheck"],
462
+ tasks: ["test:unit", "lint:code", "typecheck"],
242
463
  // syncScripts: false, // disable the step
243
- // holocronScript: "node packages/cli/dist/cli.mjs", // override the "holocron" entry
464
+ // holocronScript: "node cli/cli/dist/cli.mjs", // override the "holocron" entry
244
465
  providers: { source: "github" },
245
466
  });
246
467
  ```
247
468
 
248
- Writes `"holocron": "<holocronScript ?? 'holocron'>"` plus one
249
- `"<task>": "holocron run <task>"` per runnable task. `syncScripts: false`
469
+ Writes `"holocron": "<holocronScript ?? 'holocron'>"` plus one script per runnable task, named by the task id
470
+ (`test:unit`) and one per suite (`test`, `lint`, `scan`): `turbo run <task>` in a pnpm workspace with a `turbo.json`
471
+ (or the tool's own command for a task that runs once at the root), `holocron run <task> --` in a single package.
472
+ `holocron probe generated check` fails on a root script that differs from what is generated. `syncScripts: false`
250
473
  opts out entirely.
251
474
 
252
475
  ### Splitting the task manifest — `astromech.config.ts`
@@ -260,7 +483,7 @@ The `tasks` key (plus `syncScripts` / `holocronScript` / `hooks` /
260
483
  import { defineConfig } from "@theholocron/astromech/config";
261
484
 
262
485
  export default defineConfig({
263
- tasks: [{ name: "audit", required: true, with: { "run-knip": true } }, "wiki"],
486
+ tasks: [{ name: "lint:unused", required: true }, "publish-wiki"],
264
487
  syncScripts: false,
265
488
  });
266
489
  ```
@@ -268,7 +491,7 @@ export default defineConfig({
268
491
  `@theholocron/astromech`'s `loadTasksConfig` merges it over
269
492
  `holocron.config`'s `tasks` — **task arrays concatenate**
270
493
  (`holocron.config` first), the dedicated file **wins on scalars**,
271
- `extraRequiredChecks` concatenate. `holocron run` / `holocron ci` /
494
+ `extraRequiredChecks` concatenate. `holocron run` / `holocron run ci` /
272
495
  `holocron setup` / `holocron sync` all read the merged result, so the
273
496
  split is transparent. Useful for keeping the capability/provider config
274
497
  and the "what this repo runs" manifest in separate files (this repo does).
@@ -276,30 +499,94 @@ and the "what this repo runs" manifest in separate files (this repo does).
276
499
  ### `holocron run`
277
500
 
278
501
  ```bash
279
- holocron run <task> [job] [--required] [--filter <pkg>] [--dry-run] [-- <passthrough>]
502
+ holocron run <task | suite> [qualifier | job] [--check] [--required] [--filter <pkg>] [--dry-run] [-- <passthrough>]
280
503
  ```
281
504
 
282
- Runs one task locally — resolving turbo vs the package manager vs the tool
283
- itself. A `job` argument targets a sub-job of tasks that have them: `holocron
284
- run audit performance` runs Lighthouse CI, `holocron run audit knip` runs Knip,
285
- `holocron run audit` (no job) runs every audit sub-job in declared order. A
286
- sub-job whose tool isn't installed, or that has no local equivalent
287
- (`bundle-size`), is skipped with a note — `--required` makes that a failure. For
288
- a task with no sub-jobs the `job` slot is the first passthrough arg
289
- (`holocron run build src/`).
290
-
291
- **CI runs the identical command.** The reusable `typecheck` / `test` / `audit`
292
- workflows call the `holocron` composite action
505
+ Runs one task, or a suite, locally — resolving turbo vs the package manager vs the tool
506
+ itself. Ids are flat and verb-first: `typecheck`, `build`, `test:unit`, `lint:code`.
507
+ `holocron run test` runs the `test` suite (every `test:*` leaf the repo lists, in registry order, each reported),
508
+ `holocron run test unit` and `holocron run test:unit` run one leaf. The words are joined with `:` and the longest match
509
+ wins, so `deploy preview` is `deploy-preview`; the rest is the `job` argument. A `job` targets a sub-job of the tasks
510
+ that have them (`holocron run lint commit-msg <file>`). A leaf whose tool isn't installed, or that has no local
511
+ equivalent, is skipped with a note — `--required` makes that a failure. For a task with no sub-jobs the `job` slot is the first passthrough arg
512
+ (`holocron run build src/`). `holocron run format` writes (prettier), `holocron run format --check` is read-only.
513
+ `holocron run --help` lists the tasks grouped under the six intent groups. The old dotted names
514
+ (`verification.unitTests`, `sourceQuality.formatting`, …) still work and print a deprecation notice on stderr. <!-- holocron-allow-old-name -->
515
+
516
+ **CI runs the identical command.** The reusable workflows (`typecheck`, `test-unit`,
517
+ `lint-code`, …) call the `holocron` composite action
293
518
  (`theholocron/.github/.github/actions/holocron@main`), whose body is
294
- `holocron run <task> [job]`. So `holocron run test` locally and the `Test` CI
519
+ `holocron run <task> [job]`. So `holocron run test:unit` locally and the `test:unit` CI
295
520
  job execute the same thing — at a turbo root both are
296
- `turbo run test -- --coverage` (the registry's org-default flags flow through
297
- turbo's `--`).
521
+ `turbo run <task>`. `test:unit` always runs with coverage (`vitest run --coverage`); there is no `--coverage` flag.
298
522
 
299
- ### `holocron ci`
523
+ ### `holocron sync <app>`
300
524
 
301
525
  ```bash
302
- holocron ci [--all] [--filter <pkg>] [--dry-run]
526
+ holocron sync <app> --env <environment>... [--dry-run]
527
+ ```
528
+
529
+ `sync secrets` with an app's identifiers filled in from its own config (spec `tool-app-deploy-sync`, #2608). The app is
530
+ found like `deploy <app>`'s (`resolveApp()`); `--env` (repeated for more than one; `production`, `preview`) is `parseAppEnv()`'s. An app with a `deployment` provider has its
531
+ secrets sent to the project named like it, after `checkProjectDomain()`; one with a `workers` provider has them set on
532
+ the Worker script named like it; one with neither (Council) reports nothing to sync and exits 0. `runAppSync()` passes
533
+ `runSecretsSync()` the routes and the `repo.secrets.deploy` filter that `sync secrets --env <layer>` would take from the
534
+ app's config, so the fail-closed key allow-list is unchanged; an app with a destination and no `repo.secrets.deploy`
535
+ fails naming it. A first value that is not an app's name is a step, as before.
536
+
537
+ ### `holocron deploy <app>`
538
+
539
+ ```bash
540
+ holocron deploy <app> --env <environment>... [--dry-run]
541
+ ```
542
+
543
+ Deploys a workspace app (a package under `apps/`) by name, from the repository root or, with the name left off, from
544
+ inside the app's folder (spec `tool-app-deploy-sync`, #2608). `--env` (alias `--environment`, repeated for more
545
+ than one) names the standard environments (`parseAppEnv()`, over `environment.normalize()`) to deploy to, `production` and
546
+ `preview`; `local`, `development`, `ci` and `test` are refused. Nothing is
547
+ written into the command: the app is found by its folder's name (`resolveApp()`), the project takes that name, and the
548
+ app's own `holocron.config` names the `deployment` provider and the `domain` the project must serve
549
+ (`checkProjectDomain()`, over `Deployment.listDomains()`; a wrong project stops the run before anything is built). It
550
+ then does what the app's `deploy` script did: `pnpm run build`, `deploy stage`, `deploy --files`. An app with no
551
+ `deployment` provider (Comlink's Worker is made by `setup notifications`, Council is installed by hand) is reported and
552
+ exits 0. A first value that is not an app's name is a branch, as before.
553
+
554
+ ### `holocron deploy on-release`
555
+
556
+ ```bash
557
+ holocron deploy on-release [--channel <alpha|main>] [--from <commit>] [--to <commit>] [--record-file <file>] [--record] [--dry-run]
558
+ ```
559
+
560
+ Deploys every workspace package whose own `holocron.config` declares
561
+ `{ name: "deploy", with: { on: "release" } }` (holocron#930), when the
562
+ release (`--channel`: its prerelease identifier, or `main`/empty for a stable
563
+ release) is on the task's `channel` (default `main`, the stable release) and changes the package or one of its
564
+ `workspace:*` dependencies between `--from` (the previous release's commit,
565
+ omitted when there is none) and `--to` (default `HEAD`). It waits for npm to
566
+ serve the release's new dependency versions, then runs `pnpm --filter <pkg>
567
+ deploy`. A package that doesn't apply is skipped; a deploy that
568
+ doesn't succeed exits non-zero. The shared `release` workflow runs it as its own
569
+ `deploy` job after the release job (opt in with `deploy-on-release: true`).
570
+
571
+ Each package is compared from the commit it was last deployed at, not only from
572
+ `--from`: a successful deploy is recorded as a `deployed/<package>` tag
573
+ (`@theholocron/sentinel` is `deployed/theholocron-sentinel`) at the release
574
+ commit, so a release whose deploy job failed is made up by the next release,
575
+ even one that touches nothing in the app. A package with no tag yet (or one
576
+ whose tag is not an ancestor of `--to`) falls back to `--from`, and the skip line
577
+ then says `No deploy is recorded for it yet.`
578
+
579
+ The tag is written by a second step, so the deploy script never holds a write
580
+ token. `--record-file <file>` makes the deploy list the packages that deployed
581
+ (failed ones are left out) and write no tag; `--record --record-file <file>` then
582
+ tags and pushes them, reading the token from `GITHUB_TOKEN` and handing it to
583
+ `git push` in that command's environment only. A tag that cannot be pushed fails
584
+ that step, naming the package. `--dry-run` writes nothing.
585
+
586
+ ### `holocron run ci`
587
+
588
+ ```bash
589
+ holocron run ci [--all] [--filter <pkg>] [--dry-run]
303
590
  ```
304
591
 
305
592
  Runs the merge-gating checks locally, in CI order, exiting non-zero on the
@@ -308,10 +595,9 @@ first failure — the "will my PR be green?" pre-flight, and what the
308
595
  (falling back to every `ci: true` task when nothing is marked required).
309
596
  `--all` forces the full set; `--filter` is a `turbo --filter=` passthrough.
310
597
  Order comes from the `CI_ORDER` constant in `@theholocron/astromech`
311
- (`typecheck → lint → test → build → …`). Tasks with no local equivalent
312
- (`codeql`, `deploy`) are reported as enforced-in-CI, never failures; `audit`
313
- expands into its sub-jobs (each under its own `audit / …` check context)
314
- unless the repo ships its own `"audit"` script.
598
+ (`typecheck → lint:code → … → test:unit → build → …`). Tasks with no local equivalent
599
+ (`scan:code`, `deploy`) are reported as enforced-in-CI, never failures. `format` runs in its
600
+ read-only `--check` form.
315
601
 
316
602
  ### `holocron deploy`
317
603
 
@@ -326,25 +612,41 @@ non-zero and the output includes the provider's own reason
326
612
  exited with 1`). Providers build asynchronously, so accepting a deployment
327
613
  isn't the same as it going live (holocron#911).
328
614
 
615
+ With `--files`, a deployment that ends `error` because its package install
616
+ failed (`Command "npm install" exited with 1`) is deployed again, twice more,
617
+ after 60 s and then 120 s: right after a release the registry can lag a
618
+ version published seconds earlier (holocron#2406). Each retry is reported, and
619
+ when every try fails the command exits non-zero with the deployment URL, the
620
+ install error and the manual redeploy command. Any other failure (a build
621
+ error, a cancellation, a timeout) is never retried.
622
+
329
623
  Provider plugins support this through the `Deployment` capability's
330
624
  existing `getDeployment(id)`. They should set `errorMessage` on the
331
625
  returned `DeploymentRecord` whenever the provider exposes one.
332
626
 
333
- ### Lint parity
627
+ ### `holocron check monitor <url>`
334
628
 
335
- The `lint` task takes an optional `linters` array — one list that drives
336
- **both** the CI `lint` job (super-linter's `VALIDATE_*` env, baked into the
337
- generated `.github/workflows/lint.yml` thin caller as a `super-linter-env`
338
- input) **and** `holocron run lint` locally. Omitted → auto-detected from the
339
- config files present plus the org always-on set.
629
+ Runs every configured `monitoring` check against `<url>` instead of each
630
+ check's own configured `url` — no vendor API call, only a plain HTTP
631
+ request evaluated locally against the exact same `assertions` already in
632
+ `holocron.config.ts`. Built for CI: the `check-preview` task runs
633
+ this against a PR's Vercel preview deployment (triggered by
634
+ `deployment_status`, not `push`/`pull_request`), reusing the production
635
+ check definitions to catch a breaking change before merge instead of
636
+ after (holocron#1010).
340
637
 
341
638
  ```ts
342
639
  export default defineConfig({
343
- tasks: [{ name: "lint", linters: ["eslint", "prettier", "yamllint", "actionlint", "gitleaks"] }],
344
- providers: { source: "github" },
640
+ tasks: ["check-preview"],
641
+ providers: {
642
+ monitoring: ["checkly", { accountId: "...", checks: [/* ... */] }],
643
+ },
345
644
  });
346
645
  ```
347
646
 
647
+ Exits non-zero if any check fails — the job's own pass/fail is what
648
+ posts as the GitHub check, no separate reporting step needed.
649
+
348
650
  ### Skills installer
349
651
 
350
652
  `holocron setup` can install shared skills from `@theholocron/skills` into the local repo:
@@ -408,18 +710,210 @@ export default acmeConfig;
408
710
 
409
711
  ```
410
712
 
713
+ ## Notifications — server as code
714
+
715
+ A `notifications` provider can declare a whole server in `holocron.config.ts`
716
+ (`layout`: categories, channels, roles, access, server settings, welcome screen,
717
+ pinned messages, onboarding, the bot application) and the CLI applies and checks it. The
718
+ commands and the config are provider-neutral; Discord is the first provider.
719
+
720
+ | Command | What it does |
721
+ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
722
+ | `holocron setup notifications` | Applies the layout; looks everything up by name first, so a re-run changes nothing that matches |
723
+ | `holocron new channel <name>` | Creates one channel (optionally with a webhook whose URL is stored as a secret) |
724
+ | `holocron new server --name <n> --owner <id>` | Creates the server the layout describes, writes its id into the config, applies the layout, invites the owner, waits for them to join and hands the server over (`--resume` finishes an interrupted hand-over; `--force` allows a second server) |
725
+ | `holocron link account` | Links your account on the provider to your GitHub account by signing in with the provider (OAuth, nothing secret kept) |
726
+ | `holocron sync roles` | Makes who holds a role match a GitHub team, through the links file (`--keep` only adds; `--provider` picks one) |
727
+ | `holocron reconcile project [board]` | Sets item statuses where a rule says so: an open blocker means `blocked`, no blocker left means `planned`, closed means `done`, and, from the pull requests that close the item, an open one means `active` and green required checks mean `review` (a failure moves `review` back; GitHub reads them through `closedByPullRequestsReferences`) (status only; `--dry-run` previews; an open item with no status is reported). Runs hourly from `platform.projectReconcile.yml`, which `setup` writes when `providers.projects` declares boards |
728
+ | `holocron reconcile ci [pull-request] [--max-age <minutes>] [--shadow] [--dry-run]` | Makes `ci / Required checks` say what the checks on each open pull request call for (spec `process-sentinel-posts-ci`): reads the head commit's check runs and statuses through `source` and posts the verdict with astromech's `postAggregate()`. A check missing or wrong for longer than `--max-age` (default 10) is a failing row, because a webhook was missed. Posts the real check only where `ci.aggregate` is `sentinel` (under `actions` it does nothing; `--shadow` repairs Sentinel's shadow check) and leaves a commit alone where the Actions job already posts it. The manual recovery path and, run every 15 minutes by the `reconcile-ci` task, the sweep |
729
+ | `holocron doctor notifications [--built-only] [--deliver] [--post]` | Step by step: does the server match the layout, do the secrets exist, and does a person (not the bot) own it. A full run also leaves one `🧪 test:` post in the layout's `testChannel`; `--built-only` posts nothing; `--deliver` posts to every channel and removes each post; `--post [channel]` posts the result as the bot (the failures, or only the summary when none fail). It also reads the Checkly feed (webhook, alert channel, subscriptions), the Comlink relay (Worker, route, bindings, the tracker's integration and rule) and the Notifications workflow (the file, and the secrets it reads), posting nothing, so `--built-only` keeps those steps. The `bot-permissions` row compares what the bot's roles hold server-wide with the permissions it needs (`ServerInspection` `botPermissions`; the owner and Administrator hold all, channel overwrites are left to the forum row) and, when some are missing, fails naming them in plain words with the invite link that asks for them again (not a credential); it is skipped, with the reason, when the roles could not be read |
730
+ | `holocron doctor ci` | Has the repo moved to the flat task vocabulary? One row each for the `tasks:` entries (a deprecated alias, with the id that replaces it), the generated callers (file, workflow and job name equal the task id), the `ci` aggregate's `expected` list (no id missing or stale) and where the callers point (`theholocron/.github` or holocron `ci-v1`). Read-only, no provider needed; exits 1 on a failure. `--shadow [--limit n]` adds a `shadow` row that compares Sentinel's `ci / Required checks (sentinel)` with the Actions `ci / Required checks` on the newest open and merged pull requests (through `source`): a decided pull request where they differ fails the row, and 20 consecutive that agree pass it (SPEC-0099). The ruleset's checks are `doctor repo`'s |
731
+ | `holocron doctor github-app` | Does each GitHub App instance in `githubApps` (`{ name, manifest, environment }`) have what its manifest file (`default_permissions`, `default_events`) declares? Reads the App's id and key from the vault `environment` in memory (never printed), calls `GET /app` and `GET /app/installations` with the App's JWT. Rows per instance: `reachable`, `events` (all subscribed), `permissions` (each granted at least at the manifest's level, `read < write < admin`), `installations` (none lags the App, a pending update fails). Extras on the App are `info` in a row's detail, never a failure. A gap ends with the App's settings page (user- or organization-owned) and, for an installation, its own page. Credentials that cannot be read are a skip; an unreadable manifest or a rejected JWT fails. Read-only |
732
+ | `holocron redeliver webhooks [--since <time>] [--app <name>] [--dry-run] [--yes]` | Asks GitHub to deliver again the webhooks each `githubApps` instance's endpoint did not accept: reads the App's delivery log with its own JWT (id and key from its vault environment, in memory), keeps the deliveries whose latest attempt failed, and redelivers each once, oldest first (spec `process-sentinel-posts-ci`, recovery 2). Asks first unless `--yes` or `--dry-run`. It repairs every Sentinel handler; replaying is safe because each recomputes from the API |
733
+ | `holocron doctor releases` | Did npm receive every release tag? One row per release line (each `release` task group, tags `<group>-v<version>`, and the repo-wide `v<version>`) and channel (`latest`, or a prerelease's first identifier such as `alpha`): the newest tag against what each package serves on that dist-tag. A package behind, or not on npm, fails the row, which names the tag and the `refs/notes/semantic-release-<tag>` note to delete and the two known causes (a sigstore 409, `ENEEDAUTH` fixed by `holocron publish package --sync-trust`). `publish package --skip-already-published` retries a sigstore 409 twice, publishes the rest of the group anyway and ends with every failure listed (and in the job summary), so a package left behind is the case to look for here. A tag under 30 minutes old is a skip. Reads git tags and npm's public registry; no provider or token. Read-only |
734
+ | `holocron doctor logs` | Does each Axiom dataset the setup ships logs to exist, and does the token reach it? Rows: `token is accepted` (a 401 fails), one `dataset for <service>` for the CLI (`HOLOCRON_AXIOM_DATASET`, resolved by the logger's own chain), Sentinel (`SENTINEL_AXIOM_DATASET`) and any other `dev.serve.logging.datasetVar` (a 404 fails and names the fix), `organization` (`HOLOCRON_AXIOM_ORG`, then `AXIOM_ORG`), and an `info` row per dataset with the `retentionDays` Axiom reports (or says it reported none). Reads through the optional `Logs.readDataset` / `Logs.checkToken`; never creates a dataset or prints a token. A name or token that cannot be read is a skip. Read-only |
735
+ | `holocron doctor wiki` | Does the wiki the config declares exist, and does it match the sources? Rows: `organization is set` (`fern/fern.config.json` against the declared `fernOrg`), `docs site is declared` (the `instances:` url and `custom-domain` of `fern/docs.yml`), `docs site answers` and `custom domain answers` (one unauthenticated GET each: a 404 or 5xx fails, a 401/403 passes as restricted, no answer is a skip), `navigation pages exist` (every `path:` of the navigation is on disk), an `info` row for pages under `docs/wiki` the navigation leaves out, and `published pages` (the site's sitemap lists at least as many pages as the navigation; fewer fails and names the wiki workflow). Reads through the optional `Wiki.inspect()`; never publishes, writes or sends a token. A provider that cannot inspect, or a site that cannot be reached, is a skip. Read-only |
736
+ | `holocron doctor errors` | Does the error tracker have the organization, projects, keys and alert rules the config relies on? Rows: `organization exists`, and for each project a notifications layout's `relay.errors.projects` declares, `project <slug> exists` (a 404 fails), `project <slug> has a key` (a client key, so an SDK has a DSN; none fails) and `project <slug> has an alert rule` (at least one enabled rule watches its issues; none fails). The Comlink relay's integration and rule stay in `doctor notifications`. Reads through the optional `Errors.inspect()` and returns counts only, never a DSN or key. A missing token or `org`, or alert rules the token cannot read, is a skip. Read-only |
737
+ | `holocron doctor workers` | Do the Workers and deployment projects the config declares exist, route and deploy healthily? Declared Workers are the relay Worker of a notifications layout that feeds an error tracker and the reverse proxy of a wiki with a custom domain. Rows per Worker: `<name> Worker is deployed and routed` (the script exists with a route for its host), `has its bindings` (by name, a value is never read) and `latest deployment is healthy` (the newest deployment serves all traffic). Rows per deployment project (the preview project, else one named like the repo): `<project> project exists`, `has its custom domain` (when one is declared) and `latest deployment is healthy` (the newest production deployment is ready; one that errored fails, one still building is information). Reads through the optional `Workers.inspectScript` / `latestDeployment` / `proxyScriptName` and `Deployment.listProjects` / `listDomains` / `latestDeployment`; never deploys or prints a token. A missing token, a 401 or 403, or a provider that cannot read it is a skip. Read-only |
738
+ | `holocron doctor agent` | Is the agent setup safe and complete? The Service Account's token file (private, the user's, in a private directory; a machine with none is a skip, not a failure), `op` installed, that the token reads the `agent` Environment and **cannot** read `local`, `dev`, `ci`, `prod` or `preview`, and the agent tokens the plugins declare that the Environment does not hold yet, with where each is made and what it needs. Names, modes and counts only |
739
+ | `holocron doctor environments` | Do the deployment environments exist? The ones `repo.environments` declares (their reviewers, wait timer and self-review rule are compared too) plus every environment `repo.secrets.environments` names; none declared is an ok. One row. A missing one fails; an extra one is never a problem; no provider with some expected is a skip |
740
+ | `holocron doctor project [--post [channel]]` | Does each board `providers.projects.boards` declares exist and match its template? One row per board, status list, field, view and automation rule; the board's extras and the items `reconcile project` would fix (no status, closed but not done, open blocker but not blocked, blocked without a blocker) are `info` rows, never a failure. A template file that does not read fails, naming the file. Read-only; `--post` shares the failing rows through the `notifications` bot. |
741
+ | `holocron doctor repo` | Do the repository settings `setup` writes match the config? One row per group the config declares: description and homepage, default branch and merge settings, topics, custom properties, team access, branch protection (and, for `strict`, a `repo-ci-pin` row comparing the App `ci / Required checks` is pinned to with the opt-in `ci.pin`; skipped, saying the option is off, when unset); labels and security settings are always checked, plus a `repo-area-labels` row when `repo.labels.areas` is declared (a declared area with no `area:<name>` label fails; an undeclared `area:` label is an `info` note). Read-only. Reads through optional `Source` methods (`getRepoInfo`, `getProperties`, `listLabels`, `listTeamAccess`, `getRulesetDetail`, `getSecurity`); a group that cannot be read is a skip, not a failure |
742
+ | `holocron doctor dns` | Do the DNS records the config makes setup write exist, pointing where they should? The preview domain's apex and wildcard CNAMEs (Cloudflare), the docs site a wiki provider asks for, and the relay Worker's proxied placeholder; one row per zone. A missing record, another target or a missing proxy fails; an extra record never does. A record `ensureCustomDomain()` returns is not checked, because asking for it creates the domain |
743
+ | `holocron doctor monitoring` | Do the checks the `monitoring` provider declares exist in its account, matched by name, with the URL, method and (when stated) frequency, locations, tags (a declared tag the check lacks fails; an extra one does not), activated, should-fail, body and assertions the config sets? One row. A check in the account that is not declared is never a problem. A provider that cannot list its checks, could not load or has no token is a skip |
744
+ | `holocron doctor secrets [--env <list>] [--only-secrets \| --only-variables] [--strict] [--name <name>] [--verify] [--shared [--allow NAME]...]` | Prints a matrix of every secret and variable by place (1Password Environments, GitHub, deployments; names only, cells `ok`, `n/a`, `MISSING`, `extra`, `?`) and checks the declared ones. `MISSING` fails; `extra` is info (`--strict` fails; `doctor.manualSecrets` is left out); `--name` explains one name and exits 0 (this and `extra` replace `doctor variable-owners`). `--shared` compares the layers named by `--env` (two or more of `local`, `dev`, `ci`, `prod`; all four by default) for a secret that holds the same value in two of them: it reads each Environment in memory, compares the concealed entries by a salted hash made fresh per run, and prints names only, one row per pair of layers (`info`, shown as skipped; `--strict` fails), plus `info` rows for `ci` variables missing from or different in `dev`; `doctor.sharedVariables` and `--allow` leave out names shared on purpose (the old `doctor secrets`). `--verify` also asks each vendor whether the tokens the plugins take are still accepted (online; fails a rejected token or one with 7 days or fewer left; the old `doctor tokens`). It also checks `repo.variables` (the old `doctor variables`). Do the secrets the config says must exist (`repo.secrets`, plus the notification layout's webhook and role secrets and the Chromatic token) exist? One row for the repository, the organization and each environment, each only when something is expected there. Names only; an undeclared secret is never a problem. `--env` takes a comma-separated or repeated list of `local`, `dev`, `ci`, `test`, `prod` and checks only those (`ci` the GitHub secrets, `prod` the deploy destinations; `local`, `dev` and `test` are a skipped row that says why). A scope that cannot be read is a skip |
745
+ | `holocron doctor tokens` | Does every token a plugin declares for a layer carry the permissions the declaration says, and is it fresh? For each layer (`local`, `dev`, `ci`, `prod`) and each token a configured plugin declares for it (`PluginToken.expect`, read by `tokenExpectations()`), reads that layer's Environment in memory and runs the provider's `token` probe against the token it holds (`environmentTokens()`, `runProbe()`: the same flow as `probe <provider> token --environment <layer>`). One row per token per layer: fails for a permission it must not have, one it lacks, a token the layer should hold and does not, or a token past its rotation age or near its expiry. A layer a token lists in `forbiddenLayers` (#2825) gets a row too: `ok` when its Environment does not hold the token, `fail` when it does, `skip` when it cannot be read. A provider with no declared layers or no `token` probe is a skip. Names, counts and dates only; never a token. Goes online. Read-only (not the old `doctor tokens`, which `doctor secrets --verify` replaced: that asked whether one resolved token is still accepted) |
746
+ | `holocron doctor --all` | Runs every deep check (`doctor notifications`, `doctor secrets`, ...) and prints one row each, then `N ok, N fail, N skipped` counted in checks. Exits 1 when any check fails. A check that cannot run (no provider, no token) is a skip with the reason. Read-only: notifications runs as `--built-only`, so it posts nothing |
747
+ | `holocron provider [<name> [setup\|doctor]] [--with <file or key=value>]... [--dry-run] [--yes]` | Set up or check what only one provider has (a Linear team's labels, project and auto-close/auto-archive), from that provider's own block of `holocron.config`, or, for a provider the config does not name, from `--with` (repeatable: `team=ENG`, or a `.json`/`.ts`/`.js` file holding the provider's options object; it goes over the config entry's options where there is one, never writes the config, and the token still comes from `--token` or the usual chain). A plugin offers it by returning `setup` / `doctor` from `createPlugin`; `doctor` is read-only, `setup` is idempotent, never deletes, supports `--dry-run` and asks first unless `--yes`. Rows are the shared `printCheckRows` ones; nothing secret is printed |
748
+ | `holocron probe [<provider> [<probe>]] [--dry-run] [--yes] [--lcov <path>]` | Poke a live provider on purpose: list the probes, inspect something, or run a proof that cleans up after itself. Plugins offer the probes; nothing secret is printed; one that changes things asks first |
749
+
750
+ Channels fed by another service are declared with `feeds` on the channel: `{ name: "uptime", webhook: true, feeds: { monitoring: true } }` (the object form `{ name?, webhook?, avatar?, alerts? }` overrides the alert channel's name, default `Message to #<channel>`, the dedicated webhook's name, default the provider's, and gives that webhook a picture, a file path or `https://` URL, or `{ url, image }` (the URL is tried first, the file in the repo is the fallback), else the provider's own icon (`Monitoring.icon`, a URL and an embedded `data:` image; Checkly provides one), else the layout's `webhookAvatar`). A channel's own `webhook.avatar` and the layout's `webhookAvatar` take the same forms, a path or `https://` URL, or `{ url, image }` (the URL first, the file in the repo as the fallback); a relative path is read from the repository root. `setup` gives the channel a dedicated webhook and hands its URL straight to the `monitoring` provider through `Monitoring.ensureAlertChannel({ name, format: "discord", url? })`, which finds an alert channel of that name or creates one and subscribes every check; the URL is never stored as a secret. It needs a `monitoring` provider that implements `ensureAlertChannel` (Checkly does). `alerts: { failure?, recovery?, degraded?, sslExpiry?, sslExpiryThreshold? }` (`MonitoringAlertSettings`, passed as `ensureAlertChannel({ ..., alerts })`) sets what the alert channel alerts about: a new channel defaults to failure, recovery and degraded on and `sslExpiry` off, and on an existing channel a setting left out is left alone. A check in the `monitoring` provider's `checks` can route itself with `alertChannels: ["Message to #uptime"]` (`MonitoringCheckInput.alertChannels`, the alert channel names): it is then subscribed to those channels only, and a name no feed declares is refused by `setup`. `inspectAlertChannel` returns the channel's `alerts` and the `misrouted` checks that `doctor notifications` reports. Two feeds may not share an alert channel name, and a feed's webhook may not share the channel's own webhook name (compared without regard to case).
751
+
752
+ Channels fed by the error tracker add `feeds: { errors: true }` and a layout `relay: { host, zone?, script?, code? }`: `setup` makes a dedicated webhook, points `host` at the Comlink Worker (a proxied DNS record via `dns`), and deploys it via `workers.deployScript` with the webhook URL as `COMLINK_<SOURCE>_WEBHOOK`. The URL never leaves the Worker's secret; other secrets on the script are kept. A service other than the error tracker is declared in `relay.sources: { <id>: { capability, provider?, name?, events?, scope?, options? } }` and carried by a channel with `feeds.relay.<id>`: `capability` is `deployment`, `dns`, `vault`, `auth`, `workers` or `source` (the GitHub plugin: one repository as `scope`, or an organization as `options.org`, made with the admin or organization token); `provider` names the plugin for a capability the root config gives to another one (`vercel` for `deployment`; `setup` loads it by name with the options of the config that names it, root or a workspace package's, and refuses, before writing, one that is missing, cannot make a webhook or has no token; `doctor notifications` finds it the same way and skips the `relay-source:<id>` row, with the reason, when it cannot load or read it); `setup` asks the provider of `capability` to make the vendor's webhook (optional `ensureRelaySource`, found again by its URL, never deleted), hands the Worker `COMLINK_<ID>_SECRET` (when the provider made or chose a secret) and `COMLINK_<ID>_WEBHOOK` in the same deploy, and `doctor notifications` adds a `relay-source:<id>` row (optional `inspectRelaySource`). With `relay.errors: { projects, integration?, rule?, frequency? }` it also ensures the tracker's integration and alert rule (`errors.ensureRelay`) and deploys the Worker with the integration's signing secret. Needs `errors`, `workers` and `dns`; only one channel may be fed.
753
+
754
+ `holocron sync secrets --env <environment> --worker <script>` also sets every key of the vault environment on a deployed Worker as a secret, through the optional `Workers.setSecret(script, name, value)` (write-only; the Cloudflare plugin implements it). The Worker must already exist. Sync only adds and updates: it never removes a binding, because a Worker also holds secrets that are not in the vault (for Comlink, the `COMLINK_<SOURCE>_WEBHOOK` that `setup notifications` sets), so a key deleted from the vault must be deleted from the Worker separately. Keys are written one at a time and each is reported; if one fails, the exit code is 1 and re-running finishes the rest, since every write is idempotent.
755
+
756
+ `holocron sync secrets --env <environment>` also writes GitHub Actions **variables** when `repo.variables.sync` has an entry for that environment: each key goes through the `source` provider's `syncVariables` (repo scope) or `syncOrgVariables` (`org=<name>`), one call per key and never pruning, so a name the vault lacks or holds blank is skipped and GitHub keeps its value. Keep these in a vault environment of their own (a vault does not tell a visible value from a secret one, and a variable is readable afterwards). An environment declared only by variable entries pushes nothing to `secrets` or `deployment`. Values are never printed. `doctor secrets` checks that the names exist at their scope.
757
+
758
+ `holocron list secrets [--scope repo|environment|organization] [--env <name>] [--json]` prints the names (never the values; GitHub does not return them) of the secrets at each scope, sorted, under a heading per scope. With no `--scope` it lists the repository, plus the organization (`--org`, `HOLOCRON_ORG` or the config's `org`) and the `--env` environment when they are known; `--scope` lists one. A scope that cannot be listed is reported under its heading and the rest are still listed; the exit code is 1 if any fails. `--json` prints `[{ scope, names, error? }]`. It is read-only, so `--dry-run` does not apply. Comparing the names with what the config expects is `doctor secrets`, which also covers the keys of the vault environments declared in `repo.secrets.sync`.
759
+
760
+ A channel with `kind: "forum"` is a forum, with `tags` (each a `name`, an `emoji` and whether it is `moderated`; the `emoji` is a Unicode character or a server emoji written `":git_merge:"`, which needs a picture declared elsewhere in the layout, in a reaction's `image` or an `emojis` entry, or `setup` refuses the layout, and which must exist on the server before the channel is written); `setup` adds and corrects the tags but never removes one, and a text channel of the same name must be deleted first, since neither kind can become the other. A forum takes no `webhook` and none of the webhook feeds (`monitoring`, `errors`); its one feed is `feeds: { prs: true }`, the pull-request feed, where Sentinel keeps one post per pull request tagged with its state. The object form `feeds: { prs: { exclude: { repos?: ["owner/name"], authors?: ["login"] } } }` leaves some pull requests out. `feeds.prs` belongs to a forum (a text channel with it is refused) and the forum's `tags` must hold all eight states, `draft`, `conflicts`, `failing`, `changes requested`, `ready`, `in review`, `merged` and `closed`, or `setup` refuses the layout. `setup` does nothing more for it; `doctor notifications` checks that the forum exists, has those tags and that the bot can start posts and manage threads in it (`ServerInspection` `botThreads`, filled in by the Discord provider after the forum's own permission overwrites). `defaultReaction` is the emoji Discord offers on every post (its Get Started step "Set a default reaction for posts"); Discord allows only one, so `starterReactions` lists more (`["👍", "👎", "❓"]` for approve, disapprove, question) that the bot adds to the first message of each post `sync specs` makes. Existing posts are left alone, a reaction the bot cannot add is skipped, and `doctor notifications` checks `defaultReaction`. A reaction is a Unicode emoji (`"✅"`) or one of the server's own emoji written between colons (`":git_merge:"`, 2 to 32 letters, digits and underscores); the object form `{ emoji: ":git_merge:", image: ".holocron/media/emoji/git_merge.png" }` also names the file `setup` makes the emoji from when the server has none (PNG, JPEG, GIF, WebP or AVIF, at most 256 KiB, under `.holocron/media/`; checked by its bytes before anything is written; an emoji that exists is left alone unless its picture differs from the file (the Discord plugin compares it with the copy on Discord's CDN, and an emoji it cannot compare is left alone), when it is made again (new id; the old emoji and the reactions made with it are lost) after asking, or with `--yes`; `--dry-run` only previews; the bot then needs Create Guild Expressions, which the invite link asks for only when the layout gives an emoji an `image`). The layout's own `emojis: [{ emoji: ":git_commit:", image }]` declares server emoji no reaction names; `setup` makes them with the others and `doctor notifications` expects them on the server. A word without colons (`git_merge`) is refused, not sent as text. `doctor notifications` has an `emoji` row that fails by name for each server emoji the server lacks, and its `channels` row compares the default reaction in the same spelling. A forum's `autoArchiveMinutes` (`60`, `1440`, `4320` or `10080`, Discord's four values; `60` is the shortest) is its default idle time before a post is archived and leaves the list; `setup` sets it and changes nothing when it already matches, and `doctor notifications` reports a difference in the `channels` row. `feeds: { prs: { retainDays: 30 } }` names how many days after a pull request closes its post may be deleted (a positive whole number, off when absent); it is declared and checked only, and nothing deletes a post until `holocron sync prs` (#2853) is built. The pull-request tag `waiting` is now `in review`: `setup` makes the new tag and never deletes the old one, and `doctor notifications` lists a remaining `waiting` tag as information (`pr-feed-retired-tag`) so a person deletes it in Discord; an existing post is re-tagged on its next event.
761
+
762
+ `holocron sync specs [--channel <forum>] [--files <paths...>] [--pr <number>] [--refresh] [--refresh-origin] [--refresh-titles] [--withdraw] [--notify]` keeps one forum post per ADR and spec in step with the files: it makes the post (titled with the document's own title, tagged with the file's status), writes its address into the file as `discussion.url`, and turns a gatekeeper's retag into an edit of the file's `status:` line in the working tree for a pull request. `--files` syncs only those files and `--pr` names a pull request on their posts, for a pull request that is still open. `--refresh-origin` is a one-off repair: it rewrites the `PR:` line of existing posts to the one the current rule names (the optional `prLine` of `DiscussionPatch`, and of `DiscussionPost`), and nothing else in them. `--refresh-titles` is the same kind of one-off repair for the title: it renames each existing post whose title differs from the current rule's (the optional `title` of `DiscussionPatch`, and of `DiscussionPost`) and changes nothing else; a rate limit stops it cleanly, reports how many documents are left, and the next run continues. The id that opens a post is a link to the file on the default branch (`repo.defaultBranch`, else `HEAD`) once the file is there, and plain text while `--pr` names an open pull request; the normal sync rewrites a post's id line (and only that line) whenever it is not the one the rule gives and no `--pr` is given, which covers a file that moved and a post made while its pull request was open, so it needs no extra request when every post is right and `--refresh` is no longer needed for it. `--refresh` runs the `PR:`, title and id-link repairs in one pass (the id link is the optional `idLine` of `DiscussionPatch`, and of `DiscussionPost`, which changes only the message's first line); `--refresh-origin` and `--refresh-titles` still do only their own. `--withdraw` (with `--files`, on the base branch) tags the posts of a pull request closed unmerged `withdrawn` and closes them; `withdrawn` is a tag only, never a file `status:`, and the next sync puts the file's own status back. It cannot be combined with `--refresh`, `--refresh-origin` or `--refresh-titles`. `--dry-run` previews it. The posts behind it are also usable for other keys, such as a pull request (`owner/repo#123`, the state a tag name): `DiscussionPatch.body` replaces the first message's text (the provider keeps its footer), and the optional `Notifications` methods `postDiscussionMessage(channel, key, content, { quiet })` (a closed post is unarchived, written to and closed again), `readDiscussionMessages(channel, key, limit)` (text, newest first, 50 by default) and `dedupeDiscussion(channel, key)` (keeps the oldest post of the key, deletes the rest, returns how many) append to, read and repair a post, and `duplicateDiscussions(channel)` lists the keys with more than one post without deleting: `holocron cleanup posts [channel] [--provider <name>] [--yes]` uses the two to clear duplicates that are already there (the forum with `feeds.prs` by default; `--dry-run` previews it). See the [`sync specs` page](https://docs.theholocron.dev/holocron/commands/sync-specs/).
763
+
764
+ Pinned messages are declared under the provider's `layout` as `pinned: [{ channel, content }]` or `pinned: [{ channel, file }]` (`channel` is a channel in the layout, `content` up to 2000 characters, `file` a text file in the repository, such as `.holocron/pinned/rules.md`, whose contents are the message and win over a hand edit; `doctor notifications` reports the drift); the layout is the whole set of messages the bot has pinned in those channels.
765
+
766
+ Config shape added for role sync and sign-in (all under the provider's `layout`):
767
+
768
+ | Field | Meaning |
769
+ | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
770
+ | `testChannel` | The channel (it must declare a webhook) the doctor posts its one self-removing test message to. |
771
+ | `roles[].team` | A GitHub team slug. The role follows that team: given to linked members, taken from linked people who left. Never touches holders nobody has linked. |
772
+ | `links.hostedUrl` | A hosted sign-in service (Sentinel). `link` asks `<hostedUrl>/api/link` and uses it when it answers `{ "service": "link" }`; otherwise it signs in locally. |
773
+ | `links.localPort` | The port of the local sign-in listener (default `53682`, bound to `127.0.0.1` only). |
774
+ | `links.repo` / `links.path` | Where the links file lives (default `<org>/.github-private` and `notifications/<provider>-links.json`). |
775
+ | `application.intents.members` | Switches the Server Members Intent on or off (needed to list who holds a role). |
776
+ | `application.intents.messageContent` | Switches the Message Content Intent on or off (needed to read message text and embeds). |
777
+ | `application.redirectUris` | Redirect URIs that must be registered. Check-only: the API cannot set them, so `setup` and the doctor say what to add in the developer portal. |
778
+
779
+ The links file is `{ "version": 1, "links": [{ "github": "<id>", "login": "<login>", "member": "<id>" }] }`: two public ids per person.
780
+ It is read and written through the `source` capability with the `github.user-sync` token (fine-grained, **only** the
781
+ private config repo, Contents read and write), so no other token needs Contents on other repositories.
782
+
783
+ Capability surface behind it (all optional, so providers without the concept omit them):
784
+
785
+ - `Source.teamMembers(teamSlug, org?)`, `Source.readFile(path, repo?)` (returns the `version` a later write must present),
786
+ `Source.writeFile(path, content, { message, version?, repo? })` (a changed `version` is refused: a real conflict check).
787
+ - `Notifications.createServer({ name, force? })`, `inviteLink(channel)`, `hasMember(id)`, `transferServer(id)` and `serverOwner()`: create a server, invite its owner, check they joined, hand it over, and say who owns it.
788
+ - `Notifications.roleMembers(role)`, `addRoleMember(role, memberId)`, `removeRoleMember(role, memberId)`.
789
+ - `Notifications.checkDelivery({ channel, name, category?, text })`: posts through a channel's webhook, reads the post back and removes it, and says which step fails.
790
+ - `Notifications.signIn()` returning `{ authorizeUrl, complete }`: the provider-neutral shape of "prove which account you own".
791
+ - `Notifications.sendWithId(channel, message)`, `findMessage(channel, marker)`, `startThread(message, name)`,
792
+ `postToThread(threadId, lines)` and `readThread(threadId)`: post a message and get it back as a `NotificationsPostedMessage`
793
+ (`id`, `channelId`, `threadId?`), find an earlier post by a marker in its text, start a thread on it, and write and read
794
+ the thread. Looking up and then posting is not atomic; a caller serialises its own runs.
795
+ - `Notifications.ensureApplication` returns `{ updated, todo? }`; each `todo` is a step only a person can do (a portal setting
796
+ the API ignores) and is reported as a failure until done.
797
+
798
+ Provider credentials for Discord: `discord.holonet` is the **bot token** (Bot → Reset Token), `discord.holonet.oauth` is the
799
+ **OAuth client secret** (OAuth2 → Reset Secret). They are different values; the API can create or read neither.
800
+
801
+ See the [command pages](https://theholocron.dev/holocron/commands/setup-notifications/) for each command's options.
802
+
803
+ ## Ideas
804
+
805
+ - **`holocron setup council [--vault <folder>] [--dry-run] [--yes]`** — installs the Council Obsidian plugin: it copies
806
+ the built `apps/council/dist/main.js` and `apps/council/manifest.json` into `<vault>/.obsidian/plugins/holocron-council/`
807
+ (vault from `--vault`, else the folder of the `ideas` provider, through the optional `Ideas.notesDir()`), updates them on a
808
+ second run, changes nothing when they match, never deletes or writes through a link, and ends by naming the step it
809
+ cannot do, turning the plugin on in Obsidian. It does not build.
810
+ - **`holocron sync ideas [--dry-run] [--yes]`** — files the ideas that are ready: it reads them through the `ideas`
811
+ provider (`providers.ideas: ["obsidian", { dir }]`, an Obsidian vault; `HOLOCRON_IDEAS_DIR` overrides `dir`; the older
812
+ `ideas.dir` is deprecated and read as that entry when `providers.ideas` is absent) and, for each one whose status is
813
+ the filing state (`ideas.states.file`, default `in-progress`) with no issue, creates an issue through the `issues`
814
+ provider (title the first `#` heading as a Conventional Commits title, `type(scope): text`, from the note's optional `type:` and
815
+ `scope:` properties, default `feat`; body the note plus a footer with the note's path, the date filed and `Filed from idea: <title>`) and records it with
816
+ `Ideas.markFiled` (an `issue:` property, for Obsidian). Ideas with attachments are skipped. It never deletes, asks first
817
+ unless `--dry-run` or `--yes`, and a second run changes nothing.
818
+ - **`holocron new spec <issue> [--name <topic>] [--dry-run] [--yes]`** — the spec-time step: reads the issue through the
819
+ `issues` provider (`#1234`, `1234` or a Linear key) and writes `.notes/<name>.spec.md` (`tech-` and the title in
820
+ kebab-case, or `--name` as the whole name) with `status: draft`, `issue:`, `blocked-by: []`, no `id`, and the issue's text
821
+ under `## Problem` less the `Filed from idea:` line and the marker. It never overwrites a file, never edits the issue or
822
+ touches the vault, and asks first unless `--dry-run` or `--yes`.
823
+ - **`holocron new issue <title> [--body <text> | --body-file <path|->] [--label <name>]... [--assignee <login>]... [--milestone <value>] [--type <kind>] [--priority <level>] [--effort <size>] [--start-date <date>] [--target-date <date>] [--parent <key>] [--blocked-by <key>]... [--project <board>] [--area <name>]... [--dry-run] [--yes]`** — files an
824
+ issue through the `issues` provider (`Issues.create`: GitHub or Linear) and prints its key; what the tracker cannot hold (a second Linear assignee, an unknown user) is listed as not carried across. It asks first unless
825
+ `--dry-run` or `--yes` (without a terminal it refuses instead) and does not look for a duplicate. The field flags (`Issues.create`'s
826
+ `IssueFields`: Type, Priority, Effort, the dates, parent, blockers) are checked first, a field the tracker refuses is listed and never loses the issue,
827
+ `--project` puts the issue on a board `providers.projects.boards` declares, and `--area` adds `area:<name>` from `repo.labels.areas` (`RepoLabels`).
828
+ - **`holocron update issue <key> [--title <text>] [--body <text> | --body-file <path|->] [--state open|closed [--state-reason completed|not_planned]] [--add-label <name>]... [--remove-label <name>]... [--assignee <login>]... [--milestone <value>] [--unblock <key>]... [--clear <field>]...` plus the `new issue` field flags `[--dry-run] [--yes]`** — changes an issue through the
829
+ optional `Issues.update(key, IssuePatch)`: only what is named is touched, nothing is cleared unless `--clear` names it, what is already as asked is not written, and what the tracker cannot hold is listed as not carried across.
830
+ It edits the tracker's issue only (not a pull request or the board's status). `--state-reason completed|not_planned` (with `--state closed` only; a failing row otherwise) carries `IssuePatch.stateReason`: GitHub closes as completed or not planned, Linear ignores it.
831
+ - **`holocron new work <title> [--spec [name]] [--effort high|medium|low] [--assignee <login>]...` plus every `new issue` flag `[--dry-run] [--yes]`** — files the issue with all its fields (it calls `runIssueCreate()`, so the fields, `--project`, `--area`, the confirmation and `--dry-run` are `new issue`'s) and, with `--spec`, writes the draft spec stub `.notes/<name>.spec.md` from it (`runIdeasPromote()`, the `new spec` path; the name defaults to `tech-<title>`). The assignee defaults to the GitHub login in git's config (`github.user`, else a `users.noreply.github.com` email; never the token's identity), `--assignee` overrides it, and with no login the issue is filed unassigned and a row says so. Effort is asked on a terminal when `--effort` is absent (not with `--yes` or `--dry-run`); an agent passes it. It makes no branch and no commit: the last line names `holocron start work <key> --spec <path>`, which makes the spec the first commit. The spec's name and path are checked before the issue is filed.
832
+ - **`holocron start work <issue> [--name <slug>] [--title <text>] [--base <branch>] [--no-worktree] [--worktree-path <path>] [--spec <file>] [--one-pr] [--type bug|feature|task] [--effort high|medium|low] [--assignee <login>]... [--project <board>] [--no-pr] [--dry-run] [--yes]`** — starts a piece of work (spec `tool-work-commands`, #2429, part 3): reads the issue, sets its start date (and Effort), makes the branch `<type>/<issue>-<slug>` and a worktree under `.claude/worktrees/<name>`, makes the first commit (the spec file, or an empty commit titled like the pull request), pushes, and opens a draft pull request linked to the issue (`Closes`, or `Refs` for a spec-only pull request). It asks first unless `--dry-run` or `--yes`; `--dry-run` runs only the reads and writes nothing, local version control included. Run again, it carries on from the first undone step. The board status is left to the open pull request. See `docs/src/content/docs/commands/start-work.mdx`.
833
+ - **`holocron start agent [--dry-run] -- <command> [args...]`** — starts an agent's program in the foreground with the credentials of the `agent` Environment and nothing else (spec `tech-agent-secrets`, #2711): the Service Account's token is read from an owner-only file (`~/.config/holocron/agent.token`, or `HOLOCRON_AGENT_TOKEN_FILE`), used for one in-memory read of `<org/repo> - agent`, and never given to the program, which gets that Environment's variables and `HOLOCRON_ENVIRONMENT=agent`. See `docs/src/content/docs/commands/start-agent.mdx`.
834
+ - **`holocron update work <issue> [--title <text>] [--issue-title <text>] [--label <name>]... [--remove-label <name>]... [--assignee <login>]... [--milestone <title>] [--unblock <key>]... [--pr <number>] [--start [--name <slug>] [--base <branch>] [--spec <file>] [--one-pr]] [--status <status> [--force] [--board <name>]]` plus the `update issue` field flags `[--dry-run] [--yes]`** — keeps the issue, its pull request and the board in step (spec `tool-work-commands`, part 5). It finds the open pull request by its `<type>/<issue>-<slug>` branch (or `--pr`), updates the issue through `Issues.update` and the pull request's title, labels, assignees, milestone and board through `Source.updatePullRequest`, and adds the `area:<name>` labels the pull request's changed folders earn (`repo.labels.areas`; `Source.listPullRequestFiles`) to both, never removing a label. `--start` runs `start work` first. `--status` is last and refuses In Review, Blocked and Done without `--force` (the board's automation owns them); any hand-set status is temporary. Asks once first unless `--dry-run` or `--yes`.
835
+ - **Protected branches** (`repo.protectedBranches`, #2894, spec `tech-protected-branches`). A list of plain branch names in `.holocron/repo.ts` (none by default; no wildcard, ref, keyword or the default branch; checked when the config loads by `validateRepoProtectedBranches()`). With a `protection` preset, `holocron setup` makes one more ruleset per branch, `holocron-branch-<name>`, from the one `buildRulesetPayload(checks, pins, branch)` (the default branch's rules, required checks and bypass, aimed at `refs/heads/<branch>`; `upsertProtectedBranches()`), never deleting one, and the classic-protection fallback protects the listed branches too. `doctor repo` has a `repo-protected-branch-<name>` row each (present, active, the right ref, the same rules, checks and pins; `SourceRulesetDetail.includes` carries the ref). This repository lists `alpha`.
836
+ - **Area labels** (`repo.labels`, spec `tech-github-area-labels`, #2430 part 2). `repo.labels.areas` (name to folder patterns, `!` excludes) and `repo.labels.scopes` (title scope to area), `kinds` and `fallbackKinds` (kind label to issue Type, for the `issue-types` backfill, #2495) and `repos` (`owner/name` list) are checked when the config loads (`validateRepoLabels()`, a `ConfigError` naming `repo.labels.areas.<name>`). `holocron setup` makes the declared `area:<name>` labels through the optional `Source.ensureLabels()` (create only, `--dry-run` writes nothing; they are never in `CANONICAL_LABELS` or `STALE_LABELS`), and `doctor repo` has a `repo-area-labels` row. The one mapping is exported from `@theholocron/cli` for Sentinel and the backfill probe: `areaLabelsForFiles(files, areas)`, `areaLabelsForTitle(title, scopes)`, `areaForScope(scope, scopes)`, `titleScopes(title)`, `pathMatches(path, pattern)`, `areaLabelDefs(areas)` and `AREA_PREFIX`.
837
+ - **`holocron close work <issue> [--wait [--timeout <minutes>]] [--abandon] [--keep-worktree] [--pr <number>] [--dry-run] [--yes]`** — the end of a piece of work (spec `tool-work-commands`, part 6). It never merges. For an open pull request it asks whether the required checks are green through the optional `Source.getPullRequestChecks` (with `--wait`, polling until green or red or `--timeout` minutes, default 30): the `ci / Required checks` aggregate where the repo posts one, and where `ci.aggregate` is `none` each required check itself (the list is the live ruleset's required contexts, else the config's; an optional check never blocks and a failure of one is listed; a required check that has not posted keeps the wait going until the timeout), stops on anything but green naming the failing checks, and on green asks, marks the pull request ready (`Source.markReady`), adds the area labels through `update work` and takes closed blockers off the issue. Run again after the merge it removes the worktree and the local branch (never forced; `--keep-worktree` leaves them) and checks the remote branch is gone. `--abandon` always asks, stops when the branch holds unpushed commits, closes the pull request, withdraws the spec's post (`sync specs --withdraw`), removes the worktree and branch and asks whether to close the issue as not planned. `--dry-run` writes nothing, local git included.
838
+
839
+ ## Syncing tooling
840
+
841
+ <!--alex ignore postman-postwoman-->
842
+
843
+ - **`holocron sync tooling [--dry-run]`** — runs each `tooling` provider's `sync()` (the Postman plugin pushing a
844
+ workspace, its collections and environments) without `setup`'s other steps. It loads only the `tooling` providers and the
845
+ `credentials` provider their tokens may come from, so an unreachable vault or DNS provider cannot fail it. One row per
846
+ provider, a throwing provider is a failing row and the others still run, `--dry-run` calls none, and there is no
847
+ confirmation (like `setup`). Run it with `--cwd <app>` for an app's own config.
848
+
849
+ ## Keeping pull request posts in step
850
+
851
+ - **`holocron sync prs [--repo <owner/name>]... [--provider <name>] [--yes]`** — reads the open pull requests of every repository that has posts in the forum (`--repo` restricts it; the token must read them all, and a repository it cannot read is one skipped row) (`source`
852
+ `readPullRequestState`) and the forum with `feeds.prs`, and puts each post's tag, title and first message right with the
853
+ same `renderPullRequest()` Sentinel's feed uses, archiving the posts of closed or merged pull requests. A tag changed by
854
+ hand is set back (Discord does not set a pull request's state). Reports a post whose pull request is gone and a key with
855
+ several posts; deletes a closed pull request's post only past `feeds.prs.retainDays` and never one a person wrote in.
856
+ Idempotent; `--dry-run` prints the changes; a rate limit stops it with a `left` count. See the
857
+ [command page](../../docs/src/content/docs/commands/sync-prs.mdx).
858
+
859
+ ## Announcing releases
860
+
861
+ - **`holocron sync releases --from <sha> --to <sha> [--tag <tag>] [--channel releases] [--yes]`** — posts one message
862
+ in `#releases` for the public packages whose `version` differs between the two commits (private packages and apps left
863
+ out), listing up to eight of the release's changes with their ticket links (read from `git log`), ending with a `-# release [<id>]` marker, and a thread on it with a list item per package, each linking to its version on npm. Idempotent: a rerun finds
864
+ the message by its marker, starts a thread only if it has none and posts only the missing lines. `--dry-run` prints
865
+ the post. Needs a `notifications` provider with `sendWithId`, `findMessage`, `startThread`, `postToThread` and
866
+ `readThread` (Discord); the release workflow's `announce` job runs it. See the
867
+ [command page](../../docs/src/content/docs/commands/sync-releases.mdx).
868
+
869
+ ## Syncing issues
870
+
871
+ - **`holocron sync issues --from <a> --to <b> [--since <time>] [--yes]`** — one direction of an issue sync between two
872
+ trackers (`github`, `linear:team=ENG`); swap the ends for the other direction. Unlike `holocron migrate` it updates what
873
+ it made: it creates a missing issue, sets title, description, state, priority, labels, kind (the GitHub Type, the kind
874
+ label on Linear; `IssueRecord.kind`) and assignee when they differ, and
875
+ adds the comments the target lacks (oldest first, never edited or deleted). It writes nothing to the source, and changes
876
+ a target issue only when a migrate or sync made it (the recorded `holocron:migrated-from` marker or attachment). A source
877
+ issue that itself carries such an address is skipped, which stops the two directions echoing each other. The report
878
+ counts created, updated, unchanged, skipped (guard) and left, and ends with the `not carried across` list. A rate limit
879
+ stops the run with a `left` count. A target needs the optional `Issues.sync`; GitHub and Linear have it. `--limit <n>` and
880
+ `--order <oldest|newest>` (also on `migrate issues` and `migrate project`) read only that many issues from the source,
881
+ from the first-created or the last-created end, for a trial run; the source's `Issues.export` honours
882
+ `IssueSelector.limit` and `order`, and the run prints `limited to N of M`. On a terminal, `migrate` and `sync issues` show a spinner with a counter for the read and the write (`Reading issues from github… 12 of 40`, `Writing to linear… 3 of 20`); piped, in CI or with `--quiet` they print nothing extra. A provider feeds it through the optional `onProgress(done, total)` of `ExportInfo` and `ImportOptions`.
883
+
884
+ ## Cleaning up
885
+
886
+ - **`holocron apply properties [--yes]`** — adds the capabilities the organization's `holocron_capabilities`
887
+ custom property does not allow yet (`holocron doctor repo` names them). The allowed values are organization-wide, so it
888
+ asks first (`--yes` skips the question; `--dry-run` only reads). It only adds values: nothing is removed or reordered
889
+ and the rest of the definition is kept. It needs a token with the organization's Custom properties: admin.
890
+ - **`holocron apply issue-types [--update] [--yes]`** — makes the organization's issue Types match the `issueTypes` the
891
+ org area declares: creates the missing ones in declaration order and, with `--update`, sets a differing description or
892
+ colour. It never deletes, renames or turns a Type on or off, asks first (`--yes` skips the question; `--dry-run` only
893
+ reads), refuses to write when existing plus new Types would pass GitHub's 25, and needs the organization permission
894
+ Issue types: write (`HOLOCRON_ORG_TOKEN`) and an organization admin.
895
+ - **`holocron cleanup branches [--local | --remote]`** — lists the branches whose pull request is merged,
896
+ grouped, each saying whether it lives locally, on the remote or both; then asks, and offers a checklist with the
897
+ proven-merged ones ticked. Proven merged means an ancestor of `origin/alpha` or `origin/main`, or the head (or an
898
+ ancestor, or one of the commits) of a merged pull request. Branches with more commits than their merged PR, with
899
+ an open PR, checked out (here or in a worktree), or never merged are listed unticked. `--dry-run` only lists;
900
+ `--yes` deletes every proven-merged branch without asking. Pull requests and remote branches come from the
901
+ `source` provider (`Source.listPullRequests`, `listPullRequestCommits`, `listBranches`, `deleteBranch`).
902
+
411
903
  ## Upgrading
412
904
 
413
905
  - **`holocron upgrade node <to>`** — patches every Node.js version pin
414
906
  (`engines.node`, `.nvmrc`, `.node-version`, `.github/workflows/*`,
415
- `Dockerfile`, `.tool-versions`) to a new major.
907
+ `Dockerfile`, `.tool-versions`) to a new major. The rewrite is
908
+ `runUpgradeNode()` in `@theholocron/astromech/upgrade`; the command only
909
+ binds the logger and reads `upgrade.node.extra`.
416
910
  - **`holocron upgrade deps`** — bumps every `@theholocron/*` pin in
417
911
  `pnpm-workspace.yaml` (`catalog:` and every named `catalogs.*`) to its latest
418
912
  published version, then migrates `holocron.config.ts` from the 7.x preset
419
913
  shape (`const { repo, workflows } = node()` + `repo.requiredChecks` +
420
914
  `workflows:`) to the current composed-preset API (`const preset = node()` +
421
915
  `...preset` + `tasks:` + `extraRequiredChecks:`). Mechanical transforms only —
422
- review the result, then `pnpm install && holocron ci`. `--pins-only` skips
916
+ review the result, then `pnpm install && holocron run ci`. `--pins-only` skips
423
917
  the config migration; `--dry-run` prints without writing.
424
918
 
425
919
  ## Auth — fine-grained tokens
@@ -429,11 +923,13 @@ credential only affects that feature. Store them once in the OS keyring
429
923
  (macOS Keychain, Windows Credential Manager, libsecret on Linux):
430
924
 
431
925
  ```sh
432
- holocron auth set github.read ghp_xxx # clone + CI run listing
433
- holocron auth set github.issues ghp_xxx # issue management
434
- holocron auth set github.sync ghp_xxx # sync-github workflow templates
435
- holocron auth set github.release ghp_xxx # semantic-release
436
- holocron auth set github.admin ghp_xxx # setup, secrets, environments
926
+ holocron new token github.read ghp_xxx # clone + CI run listing
927
+ holocron new token github.issues ghp_xxx # issue management
928
+ holocron new token github.pulls ghp_xxx # open and change pull requests (an agent's; the admin token is the fallback)
929
+ holocron new token github.sync ghp_xxx # sync-github workflow templates
930
+ holocron new token github.release ghp_xxx # semantic-release
931
+ holocron new token github.admin ghp_xxx # setup, secrets, environments
932
+ holocron new token github.user-sync ghp_xxx # the files that link GitHub accounts to other services' members
437
933
  ```
438
934
 
439
935
  The resolution chain per capability is:
@@ -444,27 +940,59 @@ The resolution chain per capability is:
444
940
 
445
941
  See [`docs/tokens.md`](../../docs/tokens.md) for required PAT scopes per feature.
446
942
 
447
- Additional `auth` subcommands:
943
+ A plugin lists the tokens it takes in a `tokens: PluginToken[]` export (each resolver exposes its own as `.token`), as
944
+ `{ envName, vendorEnvName?, keyringKey, verifiable?, optional? }`, so `holocron doctor secrets` (the `local` and `dev` columns, and `--verify`) and
945
+ `export tokens` can find them. Set `optional: true` on a token the plugin only falls back to, such as the Discord
946
+ webhook a post uses when it names no channel: the checks that expect every listed token do not expect it, and
947
+ `export tokens` marks it `(optional)` when it has no value. `verifiable: false` marks a token `verifyToken` does not
948
+ apply to.
949
+
950
+ The token commands:
448
951
 
449
952
  ```sh
450
- holocron auth check github.read # re-verify a stored token
451
- holocron auth unset github.read # remove a stored token
452
- holocron auth list # show all stored providers
953
+ holocron check token github.read # re-verify a stored token
954
+ holocron remove token github.read # remove a stored token
955
+ holocron list tokens # show all stored providers
956
+ holocron list skills # the skills installed in .agents/skills/
957
+ holocron remove skill --all # remove every installed skill (or name some; a bare call asks on a terminal)
958
+ holocron export tokens # tokens as NAME=value lines in a private .credentials, to import into a credentials environment
959
+ holocron export tokens --only HOLOCRON_SENTRY_TOKEN # one token, to the clipboard
960
+ holocron export requests --dry-run # convert the repo's request collections for each tooling provider that can export, writing nothing
961
+ holocron export requests --to bruno --yes # write api/.export/bruno/ (ignored by version control; never inside the source folder)
962
+ holocron open requests --dry-run # which secrets the request workspace reads, from which vault entries; reads and starts nothing
963
+ holocron open requests --environment dev,local # start Bruno with each named layer's signing secrets (default: dev only; prod only when named), a private file until Bruno quits
964
+ holocron upload coverage --uploads '[{"flag":"utils","files":"utils/*/coverage/lcov.info"}]' --allow-empty # upload the coverage reports, one flag per group, through the coverage provider (Codecov: the job's OIDC token, no stored token)
965
+ holocron export tokens --blank --vendor-names --file --only VERCEL_TOKEN --only HOLOCRON_RELEASE_TOKEN # the stored ones filled, the rest empty
966
+ holocron new github-app --name "My App - dev" --webhook-url https://<tunnel>/api/webhook --manifest apps/sentinel/github-app.manifest.json # a GitHub App from a manifest (the flow is in @theholocron/dagobah); its id, key and webhook secret to a private .credentials
967
+ holocron new instance sentinel --env preview # a whole app instance: project, domain, secrets, the GitHub App, deploy; names only the tokens a person creates
968
+ holocron new tunnel --name sentinel-dev --hostname sentinel-dev.example.dev --port 3000 --run # a named tunnel with a stable hostname to a local port
969
+ holocron list projects # the org's project boards (also: create [template], close <number-or-name>, setup)
970
+ holocron migrate project v5 --from github --to github:repo=acme/new --dry-run # preview putting a board's issues on a board of the same name in the target (GitHub; --template picks the template a missing board is made from, default roadmap); a target without boards (Linear) gets a project of that name instead
971
+ holocron migrate issues --all --from github --to linear:team=ENG --limit 20 --order newest --dry-run # a trial run: read only the 20 last-created issues (--order oldest, the default, reads the first created); prints `limited to 20 of M`, and a second run with the same limit selects the same issues (`migrate issues` and `migrate project`, and `sync issues`; not `migrate issue`)
972
+ holocron project status 1234 "In Progress" # set an issue's status on the board by its key (a status of the board's template; --board picks one of several; --dry-run prints the change; asks nothing; the issue must already be on the board)
973
+ holocron move issues v4 v5 --dry-run # preview carrying the open items of one project board to another; without --dry-run it asks first (--yes skips)
974
+ holocron doctor project # does each declared board match its template? (read-only; --post shares the failures)
975
+ holocron dev # the app, its vault variables and the tunnel, in one command (settings: `dev` in holocron.config)
453
976
  ```
454
977
 
455
978
  ## Logging
456
979
 
457
980
  Operational output goes through `@theholocron/observability/logger` — separate
458
- from the user-facing `print` surface. Global flags:
981
+ from the user-facing `print` surface. Local/interactive runs are quiet by
982
+ default: no colorized or raw structured console output, regardless of the
983
+ resolved level (Axiom shipping, when configured, is unaffected). CI is
984
+ untouched — its existing stdout output still appears. Global flags:
459
985
 
460
986
  ```sh
461
- holocron doctor --verbose # log level → debug (full structured output)
462
- holocron doctor --quiet # log level → error (suppress info + warn)
987
+ holocron doctor --log debug # show console output at this level (opt back in)
988
+ holocron doctor --verbose # log level → debug, and shows console output
989
+ holocron doctor --quiet # log level → error, and shows console output
463
990
  holocron doctor --debug # print "Run ID: <uuid>" at command end for Axiom lookup
464
991
  ```
465
992
 
466
- Level resolution (highest priority first): `--verbose` / `--quiet` →
467
- `HOLOCRON_LOG_LEVEL` → `log.level` in `holocron.config` → `"info"`.
993
+ Level resolution (highest priority first): `--log <level>` → `--verbose` /
994
+ `--quiet` → `HOLOCRON_LOG_LEVEL` → `log.level` in `holocron.config` →
995
+ `"info"`.
468
996
 
469
997
  ```ts
470
998
  export default defineConfig({
@@ -475,8 +1003,18 @@ export default defineConfig({
475
1003
  Axiom shipping activates when a token (`HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN`
476
1004
  → OS keyring `axiom.<org>` → `axiom`) **and** a dataset
477
1005
  (`HOLOCRON_AXIOM_DATASET` / `AXIOM_DATASET` → `log.axiom.dataset` in
478
- `holocron.config`) both resolve; env vars win. The token is never read from a
479
- config file. See the [logging guide](https://docs.theholocron.dev/holocron/logging/).
1006
+ `holocron.config` → the credential chain, where the 1Password-synced
1007
+ `AXIOM_DATASET` lives) both resolve; env vars win. The token is never read from a
1008
+ config file.
1009
+
1010
+ Each service has one dataset for all its environments (ADR-0019; the CLI's is `holocron`); each line carries `env`
1011
+ (`local`, `development`, `ci`, `test`, `production`), so a query filters by it.
1012
+ `log.axiom.dataset` is only a per-repo override. The dataset side of the
1013
+ resolution is **execution-context-aware** (ADR-0012): a `global`-context command
1014
+ (`clone`, `new`, `new token`, `upgrade node`, `plugin create`, …) is not "about"
1015
+ any repo, so it skips the repo's `log.axiom.dataset` and uses the CLI's dataset
1016
+ from the environment or credential chain. `repo-aware` / `workspace` commands
1017
+ (`doctor`, `deploy`, `sync`, …) keep the full chain above. See the [logging guide](https://docs.theholocron.dev/holocron/logging/).
480
1018
 
481
1019
  ### Telemetry
482
1020
 
@@ -505,11 +1043,24 @@ export default defineConfig({
505
1043
 
506
1044
  Each SDK sits behind an interface from `@theholocron/observability` —
507
1045
  `ErrorSink` (Sentry) / `AnalyticsSink` (PostHog); the adapters, and the only
508
- `@sentry/node` / `posthog-node` imports, live in that package. `telemetry.ts`
509
- holds the orchestration + the Holocron-specific credential resolution
510
- (`telemetry/resolve.ts`). See the
1046
+ `@sentry/node` / `posthog-node` imports, live in that package. the orchestration is `createCliTelemetry` in `@theholocron/kyber/observability`;
1047
+ `observability/telemetry.ts` binds it to the Holocron-specific credential resolution
1048
+ (`observability/resolve-telemetry.ts`). See the
511
1049
  [telemetry guide](https://docs.theholocron.dev/holocron/telemetry/).
512
1050
 
1051
+ ### Command log
1052
+
1053
+ Every command run is recorded: the command, the flag **names** (never values or positionals), the repository, the exit code,
1054
+ the duration and who ran it (`agent` or `human`). It is one `command_run` event through the logger (Axiom), and an agent's
1055
+ run is also one line in the `#agent-log` Discord channel. `notifications.commandLog` in `holocron.config` picks whose runs are
1056
+ posted: `"agents"` (default), `"all"` or `"off"`. Nothing is recorded in CI or under test. See the
1057
+ [command log guide](https://docs.theholocron.dev/holocron/command-log/).
1058
+
1059
+ With `notifications.commandThreads` (`"off"` by default, `"agents"` or `"all"`) a run also opens a thread in `#agent-log`,
1060
+ named `holocron <command> — <timestamp>`, and streams the CLI logger's lines (`info` and above, the message and the numeric
1061
+ fields only) into it in batches while it runs. The run's `commandLog` line is the thread's last post. It is best effort,
1062
+ bounded by the same two second deadline at the end, and never changes the exit code or the output.
1063
+
513
1064
  ### ESLint bundle options
514
1065
 
515
1066
  Most repos need nothing here — `@theholocron/eslint-config`'s `library()`
@@ -523,7 +1074,7 @@ same paths in `holocron.config`'s `eslint.browserPackages`:
523
1074
  ```ts
524
1075
  export default defineConfig({
525
1076
  eslint: {
526
- browserPackages: ["packages/github-client/src/app-auth"],
1077
+ browserPackages: ["clients/github-client/src/app-auth"],
527
1078
  },
528
1079
  });
529
1080
  ```
@@ -537,31 +1088,48 @@ the local override exists to exempt.
537
1088
 
538
1089
  ## What's in here
539
1090
 
540
- - `src/capabilities/` — the 14 capability interfaces that providers
541
- implement
1091
+ - `src/plugin/capabilities.ts` — the 25 capability interfaces that
1092
+ providers implement
542
1093
  - `src/config.ts` — config schema, `defineConfig`, `resolveConfig`,
543
1094
  `CapabilityConfigPackage`
544
- - `src/config/load-config.ts` — `loadConfig` — reads `holocron.config.*`
545
- (file discovery via [`@theholocron/datapad`](../datapad))
546
- - `src/define-config.ts` — `defineConfig` typed pass-through
547
- - `src/logger.ts` — CLI-side `@theholocron/observability/logger` wiring
1095
+ - `src/config/config-system.ts` — `defineConfig`, `loadConfig` (reads `holocron.config.*`;
1096
+ file discovery via [`@theholocron/datapad`](../datapad)) and `compose`, all built from
1097
+ kyber's `createConfigSystem`; Holocron's own rules sit beside it in `config/config`,
1098
+ `compose/{merge-*,task-name}` and `load-config/{derive-defaults,read-package-json-name}`
1099
+ - `src/observability/logger.ts` — CLI-side `@theholocron/observability/logger` wiring
548
1100
  (`buildCliLogger`, `resolveLogLevel`)
549
- - `src/loader.ts` — `PluginLoader` — dynamic-imports plugins, resolves
550
- capability config packages, builds the capability registry
551
- - `src/cli.ts` — yargs entry, dispatches subcommands. `holocron run` / `ci` are
1101
+ - `src/plugin/loader/loader.ts` — `PluginLoader`, a binding of kyber's `createPluginSystem`
1102
+ (`@theholocron/kyber/plugins`: dynamic-imports plugins, resolves capability config packages,
1103
+ builds the capability registry); Holocron's prefix, plugin options and the credentials / `.env`
1104
+ step are passed in
1105
+ - `src/cli/cli.ts` — yargs entry, dispatches subcommands. `holocron run` / `ci` are
552
1106
  delegated to [`@theholocron/astromech`](../astromech) (`createAstromech`).
553
1107
  `holocron sync` / `holocron setup` write each repo's `.github/workflows/*.yml`
554
- thin callers from `astromech.thinCallers()`; `holocron sync-github` pushes the
1108
+ thin callers from `astromech.thinCallers()`; `holocron sync github` pushes the
555
1109
  reusable `workflow_call` implementations + composite actions from
556
- `astromech.reusableTemplates()` to `theholocron/.github` (a pure sync target —
1110
+ `astromech.reusableTemplates()` (written in `ci/`) to `theholocron/.github` (a pure sync target —
557
1111
  never hand-edit its `.github/workflows/*`).
558
- - `src/commands/` — `setup`, `sync`, `doctor`, `deploy`, `secret set`,
559
- `secrets sync`, `publish`, `bump-versions`, `sync-github`, `upgrade node`,
560
- `upgrade deps`, `plugin create`, `auth`
561
- - `src/interactive-menu.ts` — the interactive fallback: `COMMAND_REGISTRY`,
562
- `launchMenu` (Layers 1–2, picks + spawns a fresh `holocron <command>`),
563
- `promptForPositionals` (Layer 3, called inline from each leaf command's
564
- `cli.ts` handler)
1112
+ - `src/commands/` — `setup`, `sync`, `doctor`, `deploy`,
1113
+ `check monitor`, `list secrets`, `new secret`, `sync secrets`, `publish package`,
1114
+ `publish bump-versions`, `publish tag`, `sync github`, `upgrade node`,
1115
+ `upgrade deps`, `new plugin`, `check token`, `export tokens`, `export requests`, `open requests`, `upload coverage`, `setup notifications`,
1116
+ `new channel`, `link account`,
1117
+ `sync roles`, `doctor agent`, `doctor ci`, `doctor dns`, `doctor environments`, `doctor monitoring`, `doctor notifications`, `doctor project`, `doctor repo`, `doctor secrets`
1118
+ `sync roles`, `reconcile project`, `doctor ci`, `doctor dns`, `doctor environments`, `doctor monitoring`, `doctor notifications`, `doctor repo`, `doctor secrets`
1119
+ - `src/commands/deep-checks/` — `DEEP_CHECKS`, the registry every `doctor <capability>` is
1120
+ listed in; the shared row renderer and `declaredVsActual` helper are in `@theholocron/kyber/ui`
1121
+ - `src/interactive-menu/` — the interactive fallback's Holocron data: `command-catalog`
1122
+ (`COMMAND_REGISTRY`, built with kyber's `createCommandRegistry`; each entry's `positionals`/`options`), `run-menu-entries`
1123
+ and `probe-menu-entries` (menu entries built at run time), and `menu.ts`,
1124
+ kyber's `createMenu` bound to the `holocron` bin and `HOLOCRON_` env prefix.
1125
+ The engine itself (the picker, argv and secret env, the dry-run preview, the spawn)
1126
+ and the prompting pieces — `promptForPositionals`, `promptForOptions` — live in
1127
+ `@theholocron/kyber` (`/menu`, `/prompts`), which has no knowledge of commands.
1128
+ - `src/plugin/probes/connection-probe/` — the `connectionProbe` a plugin offers, kyber's `connectionProbe` (`@theholocron/kyber/checks`)
1129
+ typed as the plugin system's `Probe` with `verify` returning `VerifyTokenResult`; `check monitor` runs its checks
1130
+ with kyber's `runCheckAgainstUrl`.
1131
+ - `src/commands/move-tag/` — the `publish tag` yargs command, the registry entry and `runMoveTag`, which adds the
1132
+ command-bound logger to kyber's `moveMajorTag` (`@theholocron/kyber/git`).
565
1133
 
566
1134
  ## Status
567
1135