@theholocron/cli 5.0.0-alpha.5 → 5.0.0-alpha.500

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,129 @@ 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.
38
+
39
+ ```console
40
+ $ holocron
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:
23
52
 
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
24
56
  ```
25
- $ holocron
26
- ? What would you like to do? › dep
27
- ────────────────────────────────────────────────
28
- ❯ deploy Trigger a deployment via the configured `deployment` capability
29
57
 
30
- ? Branch to deploy: › main
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: › ***
31
69
  ```
32
70
 
71
+ Each workflow's label ends with its real flag in parentheses when it has
72
+ one, and a longer caveat ("use only for a package's very first publish")
73
+ shows as helper text under the highlighted choice rather than bloating the
74
+ label itself.
75
+
76
+ A secret option (`--otp`) is masked as you type and delivered to the spawned
77
+ command through its environment, never its argv — `ps` and shell history
78
+ both expose a child's argv, never its env. A time-sensitive one like `--otp`
79
+ is checked off early but not actually typed until right before the real run
80
+ — after the dry-run preview and the "proceed?" question, never before —
81
+ since a dry run never checks it anyway and a code typed any earlier risks
82
+ going stale while something else is still being answered.
83
+
84
+ Whether an option is _checkbox-optional vs. always included_ and _collected
85
+ upfront vs. collected last_ are independent choices. `publish package`'s
86
+ `--otp` is always collected last, but whether it's checkbox-optional depends
87
+ on `HOLOCRON_NPM_ENFORCE_2FA`: unset (the default), it's opt-in like any other
88
+ checkbox pick; set in your own shell profile (never checked into the repo),
89
+ it's always included — for an operator whose own npm account enforces 2FA
90
+ on every publish, so the box doesn't need re-checking every single run.
91
+ Setting it has no effect on anyone else publishing from the same repo.
92
+
33
93
  The picked command spawns as a normal `holocron <command> …` invocation —
34
94
  `--token`, `--org`, `--cwd`, and `--dry-run` on the original invocation carry
35
95
  through. A non-interactive shell (CI, a script, a pipe) gets the old
36
96
  hard-failure message instead of hanging on a prompt.
37
97
 
98
+ For a command whose handler honours `--dry-run` (most of them — everything
99
+ except the token commands and `show config`), the menu always previews it first — a
100
+ dry run doesn't mutate anything, so there's nothing to ask permission for —
101
+ then asks the one real decision:
102
+
103
+ ```console
104
+ ...dry-run output...
105
+ ? Dry run complete — proceed with the real run? › yes
106
+ ```
107
+
108
+ A preview that reports nothing would actually change (e.g. `clone` finding
109
+ every repo already cloned) skips that question too — there'd be nothing for
110
+ the real run to do either. `--skip-dry-run` opts out of the preview
111
+ entirely, straight to the real run, for when you already know what you want.
112
+
38
113
  ## Execution contexts
39
114
 
40
115
  Every command is tagged with how much of a repo it needs:
41
116
 
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` |
117
+ | Context | Needs | Examples |
118
+ | ------------ | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
119
+ | `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` |
120
+ | `repo-aware` | `./holocron.config`, walking up from cwd, no plugins | `run`, `run ci`, `show config`, `sync readme`, `deploy on-release` |
121
+ | `workspace` | the `@theholocron/holocron-plugin-*` packages resolvable | `doctor`, `setup`, `sync`, `cleanup branches`, `sync secrets`, `deploy`, `sync github`, `sync issues`, `sync ideas`, `sync tooling`, `export requests`, `open requests`, `upload coverage` |
47
122
 
48
123
  A `workspace` command run from a bare global install (no plugins next to the
49
124
  CLI) fails with one actionable line — install the plugins as devDependencies or
50
- use `pnpm exec holocron <cmd>`. `auth check` degrades to "token present,
125
+ use `pnpm exec holocron <cmd>`. `check token` degrades to "token present,
51
126
  verification skipped" instead. `holocron --help` prints the grouping; see
52
- [Execution Contexts](https://theholocron.github.io/holocron/execution-contexts).
127
+ [Execution Contexts](https://docs.theholocron.dev/holocron/execution-contexts).
128
+
129
+ ### Viewing the resolved config
130
+
131
+ `holocron show config` prints the resolved config. On a TTY it opens a foldable
132
+ tree by default; piped or redirected, it always emits plain, valid JSON
133
+ (`holocron show config | jq`).
134
+
135
+ ```console
136
+ holocron show config # TTY: foldable tree (↑↓ move, →/⏎ expand, ← collapse, E/C all, q quit)
137
+ holocron show config --depth 2 # static coloured tree, anything nested deeper than 2 levels collapsed
138
+ holocron show config --no-interactive # static coloured tree, fully expanded
139
+ ```
140
+
141
+ Passing `--interactive` explicitly needs a TTY on stdin and stdout and fails
142
+ with a one-line message otherwise; the default falls back to static output. It has no extra dependencies — nothing to install.
53
143
 
54
144
  ## Config file
55
145
 
@@ -101,33 +191,162 @@ in at load time:
101
191
  A minimal config — for repos with a `package.json` and a GitHub remote
102
192
  — only needs `providers`:
103
193
 
194
+ ### The `.holocron/` directory
195
+
196
+ A big declaration can live in a file next to the config instead of inline, so `holocron.config.ts` stays a short index
197
+ of choices. `.holocron/<area>.{ts,js,mjs,cjs,json}` is read by name, and the areas are a closed list (a file not on
198
+ the list is never read):
199
+
200
+ | File | Where it lands |
201
+ | --------------------------- | ---------------------------------------------------------------------------------- |
202
+ | `.holocron/notifications.*` | the `layout` option of the `providers.notifications` entry (which keeps `guildId`) |
203
+ | `.holocron/repo.*` | keys of `repo` (`defaultBranch` stays inline: Sentinel needs it first) |
204
+ | `.holocron/org.*` | provider options the config leaves out (`teamId`, `accountId`), see below |
205
+
206
+ The file's default export is the value (`.ts` keeps its comments; `.json` needs no `import`, for repos with no
207
+ `package.json`). If both exist for one area, `.ts` wins over `.json`. A missing directory changes nothing. Setting the
208
+ same thing inline and in a file is an error that names both (`the notifications layout is set in providers.notifications
209
+ and in .holocron/notifications.ts`, `repo.topics is set in the config and in .holocron/repo.json`): there is no merge and
210
+ no precedence. An area file may `import` a sibling in `.holocron/`. Never put a secret in the directory: it is public in
211
+ a public repo.
212
+
213
+ To type the layout, import the type and use `satisfies` (there is no `defineLayout()` helper; the type-only import keeps
214
+ runtime code out of a file Sentinel evaluates from the default branch):
215
+
216
+ ```ts
217
+ import type { NotificationsLayout } from "@theholocron/cli";
218
+
219
+ export default {
220
+ // comments stay
221
+ testChannel: "holonet",
222
+ } satisfies NotificationsLayout;
223
+ ```
224
+
225
+ This repo's own Discord layout lives in `.holocron/notifications.ts`; `holocron.config.ts` keeps only `guildId`.
226
+
227
+ `RULES.md` and the webhook avatar live in `.holocron/` too (`.holocron/pinned/rules.md`, `.holocron/media/webhook-avatar.png`),
228
+ but they are not areas: the layout names them with an explicit repo-relative path (`pinned: [{ channel, file }]`,
229
+ `webhookAvatar`). `.holocron/projects/<name>.json` is the project-board template folder (SPEC-0020), read by its own
230
+ default and not placed into the config.
231
+
232
+ **Sentinel** reads the directory too, so its PR config check, property sync and role sync see the same merged config as
233
+ the CLI. It lists `.holocron/` at the config's ref and fetches the whole tree (any depth, so an area may import a
234
+ 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,
235
+ the check reports a load error. Only what the config or an area file imports is evaluated. The design and the decisions
236
+ are in `docs/wiki/specifications/tech-holocron-directory.spec.md` (SPEC-0069).
237
+
238
+ **Keys that never move out of `holocron.config.ts`.** `repo.defaultBranch`, because the config is the one file read
239
+ before the directory, and the default branch is what says which branch holds `.holocron/` and the config. Every other
240
+ top-level key (`name`, `org`, `domain`, `providers`, `tasks`) also stays, but only because the closed list of areas has
241
+ no entry for it: Sentinel's `validateConfig()` reads none of them before it fetches `.holocron/` (it needs the config
242
+ file's path and the `ref`, nothing from inside it). Keys that a preset spreads into `repo` (`protection`, `properties`,
243
+ which `syncPropertiesFromConfig()` reads) stay inline too, since a key set both inline and in the file is an error. There
244
+ is no per-key precedence: the loader does not let an inline key win, it refuses the duplicate and names both places. This
245
+ repo's `.holocron/repo.ts` holds `teams`, `topics`, `variables` and `secrets`, names and identifiers only, typed with
246
+ `satisfies RepoConfig` (a type-only import).
247
+
248
+ **The `org` area** (#1820). The organization's constants that are provider options and that CI does not need:
249
+ `.holocron/org.ts` is `{ domain, cloudflare: { accountId }, vercel: { teamId }, checkly: { accountId }, sentry: { org } }` (typed with
250
+ `satisfies OrgConfig`). `domain` is the org's DNS zone: the loader sets `domain` on a config that leaves it out (set in
251
+ 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
252
+ out, so the config can say `deployment: ["vercel", { domain }]`, `monitoring: "checkly"` and `errors: "sentry"`. The same option set inline
253
+ and in the file is an error that names both (`vercel.teamId is set in providers.deployment and in
254
+ .holocron/org.ts`), with no merge and no precedence. A provider key or an option the area does not know is an error; a
255
+ provider the config does not use is ignored. The org area is shared: a config in a subdirectory (`apps/sentinel`)
256
+ also reads the repository root's `.holocron/org.ts` (the nearest ancestor with a `.git`), and its own
257
+ `.holocron/org.ts` wins for a key set in both, option by option; that is not an error, so an identifier written in the
258
+ root file needs no copy in the app. The other areas (`repo`, `notifications`) describe the repository and are not
259
+ shared. Anything CI needs (`HOLOCRON_CLOUDFLARE_ACCOUNT_ID`,
260
+ `HOLOCRON_TURBO_TEAM`, `HOLOCRON_AXIOM_DATASET`) stays out: it lives in 1Password and syncs to a GitHub variable (`repo.variables.sync`),
261
+ and nothing else carries a copy. `.holocron/org.md` (the agent contract the CLI embeds) is not an area: only
262
+ `.ts`, `.js`, `.mjs`, `.cjs` and `.json` are read.
263
+
104
264
  ### repo options
105
265
 
106
266
  Additional `repo` fields recognised by `holocron setup`:
107
267
 
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. |
268
+ | Field | Type | Description |
269
+ | ----------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
270
+ | `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`. |
271
+ | `repo.topics` | `string[]` | GitHub topics set on the repository. |
272
+ | `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. |
273
+ | `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
274
+ | `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. |
275
+ | `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. |
276
+
277
+ ### Custom properties synced to GitHub
278
+
279
+ `holocron setup` and `holocron sync` both call `syncProperties()` with two
280
+ kinds of fields — always one-way (`holocron.config.ts` → resolved →
281
+ properties; properties are never a second editable source of truth):
282
+
283
+ **Manual** — `repo.properties` states these explicitly:
284
+
285
+ | Property | Value |
286
+ | ------------------------ | ---------------------------------------------- |
287
+ | `lifecycle` | `"active" \| "experimental" \| "deprecated"` |
288
+ | `open_source` | `boolean` |
289
+ | `runtime_environment` | `"node" \| "browser" \| "universal" \| "none"` |
290
+ | `uses_external_packages` | `boolean` |
291
+
292
+ **Derived** — computed from resolved config + `package.json`, not a config field:
293
+
294
+ | Property | Value |
295
+ | ---------------------------------- | ---------------------------------------------------------------------------------------- |
296
+ | `monorepo` | `boolean` — whether `pnpm-workspace.yaml` exists |
297
+ | `holocron_branch_protection_level` | the active `repo.protection` preset |
298
+ | `holocron_profile` | repo archetype: `library` / `cli` / `plugin` / `template` / `app` / `docs` / `platform` |
299
+ | `holocron_capabilities` | provider capability keys actually wired in `providers: {}` (`multi_select`) |
300
+ | `holocron_stack` | detected build/framework tooling — `next`, `vite`, `astro`, `tsdown`, … (`multi_select`) |
301
+ | `holocron_compliance` | `"compliant" \| "non-compliant"` against a minimal `source` + `ci` baseline |
302
+
303
+ Field definitions and derivation heuristics:
304
+ `docs/wiki/specifications/tech-holocron-platform.spec.md` → "Custom-properties sync — field
305
+ definitions (#677)".
306
+
307
+ The four derived fields' pure computation —
308
+ `deriveProfile()`/`deriveStack()`/`deriveCapabilities()`/`deriveCompliance()`
309
+ (plus their `HolocronProfile`/`DeriveProfileInput`/`PackageJsonLike` types)
310
+ — is exported from this package's public entry point, separate from the
311
+ local-filesystem reads (`readWorkspacePackageJsons()`) that gather their
312
+ inputs here. `@theholocron/sentinel`'s `syncPropertiesFromConfig()` reuses
313
+ these functions unchanged, gathering the same inputs over the GitHub API
314
+ instead (D8 — one derivation, two input sources, not two
315
+ implementations).
316
+
317
+ A provider's `Errors.describe()` returns `envKeys` (always pushed to repo secrets by `holocron setup`) and an optional
318
+ `frameworkEnvKeys` (`{ next: ["NEXT_PUBLIC_SENTRY_DSN"] }`), keyed by a `StackName` from `deriveStack()` and pushed only when
319
+ the root or a workspace package depends on that framework.
320
+
321
+ `missingCapabilities(capabilities)` is `deriveCompliance()`'s sibling —
322
+ same `REQUIRED_BASELINE` table, but returns _which_ required capabilities
323
+ are absent rather than whether any are. `@theholocron/sentinel`'s
324
+ `postCheckRun()` uses it to name what's missing on the check run it
325
+ posts, instead of reporting pass/fail.
114
326
 
115
327
  ### Required status checks (`protection: "strict"`)
116
328
 
117
329
  `holocron setup` builds the branch-protection required-check list from the
118
330
  manifest, not a hand-maintained array:
119
331
 
120
- - `"DCO"` (hard-prepended), then
332
+ In the repo that holds the reusable workflows (holocron itself) the list is `ci / Required checks` and `DCO`. That is the aggregate
333
+ check (`ci/workflows/ci.yml`, written by `setup` / `sync` as `.github/workflows/ci.ci.yml`): it waits on
334
+ 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
335
+ 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
336
+ repo, which has no `ci` caller yet, the list is:
337
+
338
+ - the DCO check (`validate:dco / Run Developer Certificate of Origin`), then
121
339
  - every `{ required: true }` task's workflow check context (`Lint / Conclusion`,
122
- `Test / Conclusion`, `Typecheck / Conclusion`, `audit / Conclusion`), walked
340
+ `Test / Conclusion`, `Typecheck / Conclusion` while the repo is on the frozen reusables; `test:unit / Conclusion`,
341
+ `typecheck / Run tsc --noEmit`, … once it moves to the flat ones), walked
123
342
  in CI order, then
124
343
  - the top-level `extraRequiredChecks` (codecov gates, a bundle-build check, …).
125
344
 
126
345
  ```ts
127
346
  export default defineConfig({
128
347
  tasks: [
129
- { name: "lint", required: true },
130
- { name: "test", required: true },
348
+ { name: "lint:code", required: true },
349
+ { name: "test:unit", required: true },
131
350
  { name: "typecheck", required: true },
132
351
  ],
133
352
  extraRequiredChecks: ["codecov/patch", "codecov/project"],
@@ -140,11 +359,45 @@ The generated ruleset also sets `require_extra_approval_for_unattributed_changes
140
359
  false` — with `required_approving_review_count: 0` and a single maintainer, the
141
360
  GitHub default (`true`) is an unsatisfiable block on any PR with an
142
361
  unverified/unattributed commit. Repository-admin bypass still covers the real
143
- risk. And the `codecov.yml` `holocron setup` writes carries `if_not_found:
362
+ risk. And the `codecov.yml` `holocron setup` writes (made by the `coverage` provider, not by the CLI) carries `if_not_found:
144
363
  success` on every status default, so an infra-only PR (dep bump, config,
145
364
  lockfile — no coverable change) passes instead of hanging on a `codecov/*`
146
- required check that never posts. A re-run of `holocron setup` backfills both into
147
- an existing repo.
365
+ required check that never posts. It also ignores `**/*.mdx`, so a docs-only PR that
366
+ adds pages is not judged to change testable files and left with an empty upload.
367
+ A re-run of `holocron setup` backfills all of these into an existing repo.
368
+
369
+ ### Default branch (`repo.defaultBranch`)
370
+
371
+ ```ts
372
+ export default defineConfig({
373
+ repo: { protection: "strict", defaultBranch: "alpha" },
374
+ providers: { source: "github" },
375
+ });
376
+ ```
377
+
378
+ `holocron setup` syncs GitHub's repo-level default branch (`HEAD`) — what a
379
+ fresh clone checks out, what `gh pr create`/the compare UI target by default,
380
+ and what Sentinel's `validateConfig()` reads (it only ever reads config from
381
+ the repo's default branch, never a PR ref — a deliberate security boundary).
382
+ Omit this field to leave GitHub's current setting untouched; most repos never
383
+ need it. It exists for a repo using a `main`/`alpha` prerelease-channel split
384
+ where active development happens on a non-`main` branch: set this to that
385
+ branch so Sentinel validates against what's actually being developed, then
386
+ change it back once that branch merges to `main` for a stable cut and stops
387
+ being the active branch.
388
+
389
+ ### Doc-comment coverage
390
+
391
+ ```ts
392
+ export default defineConfig({
393
+ repoValidation: { docsCoverage: "required" }, // "off" (default) | "warn" | "required"
394
+ });
395
+ ```
396
+
397
+ Controls `holocron probe docs patch` (skipped, reports without failing, or fails for an export a PR adds or changes
398
+ without a doc comment) and whether `holocron setup` adds the `documentation` flag and its statuses to
399
+ `codecov.yml`, informational for `"warn"`. It never touches the required checks. See the
400
+ [config docs](https://docs.theholocron.dev/holocron/config/#doc-comment-coverage).
148
401
 
149
402
  ### Git hooks
150
403
 
@@ -156,7 +409,7 @@ export default defineConfig({
156
409
  });
157
410
  ```
158
411
 
159
- `holocron setup` writes `.husky/pre-push` (runs `holocron ci` before every
412
+ `holocron setup` writes `.husky/pre-push` (runs `holocron run ci` before every
160
413
  push) and `.husky/pre-commit` (runs `gitleaks protect --staged` + `lint-staged`
161
414
  before every commit — scoped to staged changes, not the whole history, so a
162
415
  past false positive can't permanently block future commits) and sets
@@ -165,6 +418,16 @@ past false positive can't permanently block future commits) and sets
165
418
  setup --hooks` / `--no-hooks` override per run. Bypass one push with `git push
166
419
  --no-verify`; bypass one commit with `git commit --no-verify`.
167
420
 
421
+ ### Claude Code settings
422
+
423
+ ```ts
424
+ agent: ["claude", { dcg: true }],
425
+ ```
426
+
427
+ 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.
428
+
429
+ 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.
430
+
168
431
  ### Task scripts
169
432
 
170
433
  `holocron sync` reconciles `package.json#scripts` from the `tasks` manifest
@@ -172,15 +435,17 @@ setup --hooks` / `--no-hooks` override per run. Bypass one push with `git push
172
435
 
173
436
  ```ts
174
437
  export default defineConfig({
175
- tasks: ["test", "lint", "typecheck"],
438
+ tasks: ["test:unit", "lint:code", "typecheck"],
176
439
  // syncScripts: false, // disable the step
177
- // holocronScript: "node packages/cli/dist/cli.mjs", // override the "holocron" entry
440
+ // holocronScript: "node cli/cli/dist/cli.mjs", // override the "holocron" entry
178
441
  providers: { source: "github" },
179
442
  });
180
443
  ```
181
444
 
182
- Writes `"holocron": "<holocronScript ?? 'holocron'>"` plus one
183
- `"<task>": "holocron run <task>"` per runnable task. `syncScripts: false`
445
+ Writes `"holocron": "<holocronScript ?? 'holocron'>"` plus one script per runnable task, named by the task id
446
+ (`test:unit`) and one per suite (`test`, `lint`, `scan`): `turbo run <task>` in a pnpm workspace with a `turbo.json`
447
+ (or the tool's own command for a task that runs once at the root), `holocron run <task> --` in a single package.
448
+ `holocron probe generated check` fails on a root script that differs from what is generated. `syncScripts: false`
184
449
  opts out entirely.
185
450
 
186
451
  ### Splitting the task manifest — `astromech.config.ts`
@@ -194,7 +459,7 @@ The `tasks` key (plus `syncScripts` / `holocronScript` / `hooks` /
194
459
  import { defineConfig } from "@theholocron/astromech/config";
195
460
 
196
461
  export default defineConfig({
197
- tasks: [{ name: "audit", required: true, with: { "run-knip": true } }, "wiki"],
462
+ tasks: [{ name: "lint:unused", required: true }, "publish-wiki"],
198
463
  syncScripts: false,
199
464
  });
200
465
  ```
@@ -202,7 +467,7 @@ export default defineConfig({
202
467
  `@theholocron/astromech`'s `loadTasksConfig` merges it over
203
468
  `holocron.config`'s `tasks` — **task arrays concatenate**
204
469
  (`holocron.config` first), the dedicated file **wins on scalars**,
205
- `extraRequiredChecks` concatenate. `holocron run` / `holocron ci` /
470
+ `extraRequiredChecks` concatenate. `holocron run` / `holocron run ci` /
206
471
  `holocron setup` / `holocron sync` all read the merged result, so the
207
472
  split is transparent. Useful for keeping the capability/provider config
208
473
  and the "what this repo runs" manifest in separate files (this repo does).
@@ -210,30 +475,63 @@ and the "what this repo runs" manifest in separate files (this repo does).
210
475
  ### `holocron run`
211
476
 
212
477
  ```bash
213
- holocron run <task> [job] [--required] [--filter <pkg>] [--dry-run] [-- <passthrough>]
478
+ holocron run <task | suite> [qualifier | job] [--check] [--required] [--filter <pkg>] [--dry-run] [-- <passthrough>]
214
479
  ```
215
480
 
216
- Runs one task locally — resolving turbo vs the package manager vs the tool
217
- itself. A `job` argument targets a sub-job of tasks that have them: `holocron
218
- run audit performance` runs Lighthouse CI, `holocron run audit knip` runs Knip,
219
- `holocron run audit` (no job) runs every audit sub-job in declared order. A
220
- sub-job whose tool isn't installed, or that has no local equivalent
221
- (`bundle-size`), is skipped with a note — `--required` makes that a failure. For
222
- a task with no sub-jobs the `job` slot is the first passthrough arg
223
- (`holocron run build src/`).
224
-
225
- **CI runs the identical command.** The reusable `typecheck` / `test` / `audit`
226
- workflows call the `holocron` composite action
481
+ Runs one task, or a suite, locally — resolving turbo vs the package manager vs the tool
482
+ itself. Ids are flat and verb-first: `typecheck`, `build`, `test:unit`, `lint:code`.
483
+ `holocron run test` runs the `test` suite (every `test:*` leaf the repo lists, in registry order, each reported),
484
+ `holocron run test unit` and `holocron run test:unit` run one leaf. The words are joined with `:` and the longest match
485
+ wins, so `deploy preview` is `deploy-preview`; the rest is the `job` argument. A `job` targets a sub-job of the tasks
486
+ that have them (`holocron run lint commit-msg <file>`). A leaf whose tool isn't installed, or that has no local
487
+ 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
488
+ (`holocron run build src/`). `holocron run format` writes (prettier), `holocron run format --check` is read-only.
489
+ `holocron run --help` lists the tasks grouped under the six intent groups. The old dotted names
490
+ (`verification.unitTests`, `sourceQuality.formatting`, …) still work and print a deprecation notice on stderr. <!-- holocron-allow-old-name -->
491
+
492
+ **CI runs the identical command.** The reusable workflows (`typecheck`, `test-unit`,
493
+ `lint-code`, …) call the `holocron` composite action
227
494
  (`theholocron/.github/.github/actions/holocron@main`), whose body is
228
- `holocron run <task> [job]`. So `holocron run test` locally and the `Test` CI
495
+ `holocron run <task> [job]`. So `holocron run test:unit` locally and the `test:unit` CI
229
496
  job execute the same thing — at a turbo root both are
230
- `turbo run test -- --coverage` (the registry's org-default flags flow through
231
- turbo's `--`).
497
+ `turbo run <task>`. `test:unit` always runs with coverage (`vitest run --coverage`); there is no `--coverage` flag.
232
498
 
233
- ### `holocron ci`
499
+ ### `holocron deploy on-release`
234
500
 
235
501
  ```bash
236
- holocron ci [--all] [--filter <pkg>] [--dry-run]
502
+ holocron deploy on-release [--channel <alpha|main>] [--from <commit>] [--to <commit>] [--record-file <file>] [--record] [--dry-run]
503
+ ```
504
+
505
+ Deploys every workspace package whose own `holocron.config` declares
506
+ `{ name: "deploy", with: { on: "release" } }` (holocron#930), when the
507
+ release (`--channel`: its prerelease identifier, or `main`/empty for a stable
508
+ release) is on the task's `channel` (default `main`, the stable release) and changes the package or one of its
509
+ `workspace:*` dependencies between `--from` (the previous release's commit,
510
+ omitted when there is none) and `--to` (default `HEAD`). It waits for npm to
511
+ serve the release's new dependency versions, then runs `pnpm --filter <pkg>
512
+ deploy`. A package that doesn't apply is skipped; a deploy that
513
+ doesn't succeed exits non-zero. The shared `release` workflow runs it as its own
514
+ `deploy` job after the release job (opt in with `deploy-on-release: true`).
515
+
516
+ Each package is compared from the commit it was last deployed at, not only from
517
+ `--from`: a successful deploy is recorded as a `deployed/<package>` tag
518
+ (`@theholocron/sentinel` is `deployed/theholocron-sentinel`) at the release
519
+ commit, so a release whose deploy job failed is made up by the next release,
520
+ even one that touches nothing in the app. A package with no tag yet (or one
521
+ whose tag is not an ancestor of `--to`) falls back to `--from`, and the skip line
522
+ then says `No deploy is recorded for it yet.`
523
+
524
+ The tag is written by a second step, so the deploy script never holds a write
525
+ token. `--record-file <file>` makes the deploy list the packages that deployed
526
+ (failed ones are left out) and write no tag; `--record --record-file <file>` then
527
+ tags and pushes them, reading the token from `GITHUB_TOKEN` and handing it to
528
+ `git push` in that command's environment only. A tag that cannot be pushed fails
529
+ that step, naming the package. `--dry-run` writes nothing.
530
+
531
+ ### `holocron run ci`
532
+
533
+ ```bash
534
+ holocron run ci [--all] [--filter <pkg>] [--dry-run]
237
535
  ```
238
536
 
239
537
  Runs the merge-gating checks locally, in CI order, exiting non-zero on the
@@ -242,26 +540,58 @@ first failure — the "will my PR be green?" pre-flight, and what the
242
540
  (falling back to every `ci: true` task when nothing is marked required).
243
541
  `--all` forces the full set; `--filter` is a `turbo --filter=` passthrough.
244
542
  Order comes from the `CI_ORDER` constant in `@theholocron/astromech`
245
- (`typecheck → lint → test → build → …`). Tasks with no local equivalent
246
- (`codeql`, `deploy`) are reported as enforced-in-CI, never failures; `audit`
247
- expands into its sub-jobs (each under its own `audit / …` check context)
248
- unless the repo ships its own `"audit"` script.
249
-
250
- ### Lint parity
251
-
252
- The `lint` task takes an optional `linters` array — one list that drives
253
- **both** the CI `lint` job (super-linter's `VALIDATE_*` env, baked into the
254
- generated `.github/workflows/lint.yml` thin caller as a `super-linter-env`
255
- input) **and** `holocron run lint` locally. Omitted → auto-detected from the
256
- config files present plus the org always-on set.
543
+ (`typecheck → lint:code → … → test:unit → build → …`). Tasks with no local equivalent
544
+ (`scan:code`, `deploy`) are reported as enforced-in-CI, never failures. `format` runs in its
545
+ read-only `--check` form.
546
+
547
+ ### `holocron deploy`
548
+
549
+ `holocron deploy <branch>` (a Git-linked deployment) and `holocron deploy
550
+ --files <dir>` (a directory of build output, no linked repo) both trigger a
551
+ deployment through the configured `deployment` capability, then **wait for
552
+ it to finish**. The command reports success, exit code 0, only when the
553
+ deployment reaches `ready`. A deployment that ends `error` or `cancelled`,
554
+ or is still building after 10 minutes, is a failure: the exit code is
555
+ non-zero and the output includes the provider's own reason
556
+ (`DeploymentRecord.errorMessage`, e.g. Vercel's `Command "npm install"
557
+ exited with 1`). Providers build asynchronously, so accepting a deployment
558
+ isn't the same as it going live (holocron#911).
559
+
560
+ With `--files`, a deployment that ends `error` because its package install
561
+ failed (`Command "npm install" exited with 1`) is deployed again, twice more,
562
+ after 60 s and then 120 s: right after a release the registry can lag a
563
+ version published seconds earlier (holocron#2406). Each retry is reported, and
564
+ when every try fails the command exits non-zero with the deployment URL, the
565
+ install error and the manual redeploy command. Any other failure (a build
566
+ error, a cancellation, a timeout) is never retried.
567
+
568
+ Provider plugins support this through the `Deployment` capability's
569
+ existing `getDeployment(id)`. They should set `errorMessage` on the
570
+ returned `DeploymentRecord` whenever the provider exposes one.
571
+
572
+ ### `holocron check monitor <url>`
573
+
574
+ Runs every configured `monitoring` check against `<url>` instead of each
575
+ check's own configured `url` — no vendor API call, only a plain HTTP
576
+ request evaluated locally against the exact same `assertions` already in
577
+ `holocron.config.ts`. Built for CI: the `check-preview` task runs
578
+ this against a PR's Vercel preview deployment (triggered by
579
+ `deployment_status`, not `push`/`pull_request`), reusing the production
580
+ check definitions to catch a breaking change before merge instead of
581
+ after (holocron#1010).
257
582
 
258
583
  ```ts
259
584
  export default defineConfig({
260
- tasks: [{ name: "lint", linters: ["eslint", "prettier", "yamllint", "actionlint", "gitleaks"] }],
261
- providers: { source: "github" },
585
+ tasks: ["check-preview"],
586
+ providers: {
587
+ monitoring: ["checkly", { accountId: "...", checks: [/* ... */] }],
588
+ },
262
589
  });
263
590
  ```
264
591
 
592
+ Exits non-zero if any check fails — the job's own pass/fail is what
593
+ posts as the GitHub check, no separate reporting step needed.
594
+
265
595
  ### Skills installer
266
596
 
267
597
  `holocron setup` can install shared skills from `@theholocron/skills` into the local repo:
@@ -325,18 +655,158 @@ export default acmeConfig;
325
655
 
326
656
  ```
327
657
 
658
+ ## Notifications — server as code
659
+
660
+ A `notifications` provider can declare a whole server in `holocron.config.ts`
661
+ (`layout`: categories, channels, roles, access, server settings, welcome screen,
662
+ pinned messages, onboarding, the bot application) and the CLI applies and checks it. The
663
+ commands and the config are provider-neutral; Discord is the first provider.
664
+
665
+ | Command | What it does |
666
+ | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
667
+ | `holocron setup notifications` | Applies the layout; looks everything up by name first, so a re-run changes nothing that matches |
668
+ | `holocron new channel <name>` | Creates one channel (optionally with a webhook whose URL is stored as a secret) |
669
+ | `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) |
670
+ | `holocron link account` | Links your account on the provider to your GitHub account by signing in with the provider (OAuth, nothing secret kept) |
671
+ | `holocron sync roles` | Makes who holds a role match a GitHub team, through the links file (`--keep` only adds; `--provider` picks one) |
672
+ | `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 a green `ci / Required checks` means `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 |
673
+ | `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 |
674
+ | `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. The ruleset's checks are `doctor repo`'s |
675
+ | `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 |
676
+ | `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 |
677
+ | `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 |
678
+ | `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 |
679
+ | `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 |
680
+ | `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 |
681
+ | `holocron doctor environments` | Do the deployment environments exist? The ones `setup` creates (`staging`, `production`, when an `environments` provider is configured) plus every environment `repo.secrets.environments` names. One row. A missing one fails; an extra one is never a problem; no provider with some named is a skip |
682
+ | `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. |
683
+ | `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; labels and security settings are always checked. 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 |
684
+ | `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 |
685
+ | `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 |
686
+ | `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 |
687
+ | `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 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) |
688
+ | `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 |
689
+ | `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 |
690
+ | `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 |
691
+
692
+ 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).
693
+
694
+ 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. 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.
695
+
696
+ `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.
697
+
698
+ `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.
699
+
700
+ `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`.
701
+
702
+ 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`, `waiting`, `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.
703
+
704
+ `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/).
705
+
706
+ 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.
707
+
708
+ Config shape added for role sync and sign-in (all under the provider's `layout`):
709
+
710
+ | Field | Meaning |
711
+ | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
712
+ | `testChannel` | The channel (it must declare a webhook) the doctor posts its one self-removing test message to. |
713
+ | `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. |
714
+ | `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. |
715
+ | `links.localPort` | The port of the local sign-in listener (default `53682`, bound to `127.0.0.1` only). |
716
+ | `links.repo` / `links.path` | Where the links file lives (default `<org>/.github-private` and `notifications/<provider>-links.json`). |
717
+ | `application.intents.members` | Switches the Server Members Intent on or off (needed to list who holds a role). |
718
+ | `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. |
719
+
720
+ The links file is `{ "version": 1, "links": [{ "github": "<id>", "login": "<login>", "member": "<id>" }] }`: two public ids per person.
721
+ It is read and written through the `source` capability with the `github.user-sync` token (fine-grained, **only** the
722
+ private config repo, Contents read and write), so no other token needs Contents on other repositories.
723
+
724
+ Capability surface behind it (all optional, so providers without the concept omit them):
725
+
726
+ - `Source.teamMembers(teamSlug, org?)`, `Source.readFile(path, repo?)` (returns the `version` a later write must present),
727
+ `Source.writeFile(path, content, { message, version?, repo? })` (a changed `version` is refused: a real conflict check).
728
+ - `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.
729
+ - `Notifications.roleMembers(role)`, `addRoleMember(role, memberId)`, `removeRoleMember(role, memberId)`.
730
+ - `Notifications.checkDelivery({ channel, name, category?, text })`: posts through a channel's webhook, reads the post back and removes it, and says which step fails.
731
+ - `Notifications.signIn()` returning `{ authorizeUrl, complete }`: the provider-neutral shape of "prove which account you own".
732
+ - `Notifications.ensureApplication` returns `{ updated, todo? }`; each `todo` is a step only a person can do (a portal setting
733
+ the API ignores) and is reported as a failure until done.
734
+
735
+ Provider credentials for Discord: `discord.holonet` is the **bot token** (Bot → Reset Token), `discord.holonet.oauth` is the
736
+ **OAuth client secret** (OAuth2 → Reset Secret). They are different values; the API can create or read neither.
737
+
738
+ See the [command pages](https://theholocron.dev/holocron/commands/setup-notifications/) for each command's options.
739
+
740
+ ## Ideas
741
+
742
+ - **`holocron sync ideas [--dry-run] [--yes]`** — files the ideas that are ready: it reads them through the `ideas`
743
+ provider (`providers.ideas: ["obsidian", { dir }]`, an Obsidian vault; `HOLOCRON_IDEAS_DIR` overrides `dir`; the older
744
+ `ideas.dir` is deprecated and read as that entry when `providers.ideas` is absent) and, for each one whose status is
745
+ the filing state (`ideas.states.file`, default `in-progress`) with no issue, creates an issue through the `issues`
746
+ provider (title the first `#` heading, body the note plus `Filed from idea: <title>`) and records it with
747
+ `Ideas.markFiled` (an `issue:` property, for Obsidian). Ideas with attachments are skipped. It never deletes, asks first
748
+ unless `--dry-run` or `--yes`, and a second run changes nothing.
749
+ - **`holocron new spec <issue> [--name <topic>] [--dry-run] [--yes]`** — the spec-time step: reads the issue through the
750
+ `issues` provider (`#1234`, `1234` or a Linear key) and writes `.notes/<name>.spec.md` (`tech-` and the title in
751
+ kebab-case, or `--name` as the whole name) with `status: draft`, `issue:`, `blocked-by: []`, no `id`, and the issue's text
752
+ under `## Problem` less the `Filed from idea:` line and the marker. It never overwrites a file, never edits the issue or
753
+ touches the vault, and asks first unless `--dry-run` or `--yes`.
754
+ - **`holocron new issue <title> [--body <text> | --body-file <path|->] [--label <name>]... [--assignee <login>]... [--milestone <value>] [--dry-run] [--yes]`** — files an
755
+ 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
756
+ `--dry-run` or `--yes` (without a terminal it refuses instead) and does not look for a duplicate.
757
+
758
+ ## Syncing tooling
759
+
760
+ <!--alex ignore postman-postwoman-->
761
+
762
+ - **`holocron sync tooling [--dry-run]`** — runs each `tooling` provider's `sync()` (the Postman plugin pushing a
763
+ workspace, its collections and environments) without `setup`'s other steps. It loads only the `tooling` providers and the
764
+ `credentials` provider their tokens may come from, so an unreachable vault or DNS provider cannot fail it. One row per
765
+ provider, a throwing provider is a failing row and the others still run, `--dry-run` calls none, and there is no
766
+ confirmation (like `setup`). Run it with `--cwd <app>` for an app's own config.
767
+
768
+ ## Syncing issues
769
+
770
+ - **`holocron sync issues --from <a> --to <b> [--since <time>] [--yes]`** — one direction of an issue sync between two
771
+ trackers (`github`, `linear:team=ENG`); swap the ends for the other direction. Unlike `holocron migrate` it updates what
772
+ it made: it creates a missing issue, sets title, description, state, priority, labels and assignee when they differ, and
773
+ adds the comments the target lacks (oldest first, never edited or deleted). It writes nothing to the source, and changes
774
+ a target issue only when a migrate or sync made it (the recorded `holocron:migrated-from` marker or attachment). A source
775
+ issue that itself carries such an address is skipped, which stops the two directions echoing each other. The report
776
+ counts created, updated, unchanged, skipped (guard) and left, and ends with the `not carried across` list. A rate limit
777
+ stops the run with a `left` count. A target needs the optional `Issues.sync`; GitHub and Linear have it. `--limit <n>` and
778
+ `--order <oldest|newest>` (also on `migrate issues` and `migrate project`) read only that many issues from the source,
779
+ from the first-created or the last-created end, for a trial run; the source's `Issues.export` honours
780
+ `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`.
781
+
782
+ ## Cleaning up
783
+
784
+ - **`holocron apply properties [--yes]`** — adds the capabilities the organization's `holocron_capabilities`
785
+ custom property does not allow yet (`holocron doctor repo` names them). The allowed values are organization-wide, so it
786
+ asks first (`--yes` skips the question; `--dry-run` only reads). It only adds values: nothing is removed or reordered
787
+ and the rest of the definition is kept. It needs a token with the organization's Custom properties: admin.
788
+ - **`holocron cleanup branches [--local | --remote]`** — lists the branches whose pull request is merged,
789
+ grouped, each saying whether it lives locally, on the remote or both; then asks, and offers a checklist with the
790
+ proven-merged ones ticked. Proven merged means an ancestor of `origin/alpha` or `origin/main`, or the head (or an
791
+ ancestor, or one of the commits) of a merged pull request. Branches with more commits than their merged PR, with
792
+ an open PR, checked out (here or in a worktree), or never merged are listed unticked. `--dry-run` only lists;
793
+ `--yes` deletes every proven-merged branch without asking. Pull requests and remote branches come from the
794
+ `source` provider (`Source.listPullRequests`, `listPullRequestCommits`, `listBranches`, `deleteBranch`).
795
+
328
796
  ## Upgrading
329
797
 
330
798
  - **`holocron upgrade node <to>`** — patches every Node.js version pin
331
799
  (`engines.node`, `.nvmrc`, `.node-version`, `.github/workflows/*`,
332
- `Dockerfile`, `.tool-versions`) to a new major.
800
+ `Dockerfile`, `.tool-versions`) to a new major. The rewrite is
801
+ `runUpgradeNode()` in `@theholocron/astromech/upgrade`; the command only
802
+ binds the logger and reads `upgrade.node.extra`.
333
803
  - **`holocron upgrade deps`** — bumps every `@theholocron/*` pin in
334
804
  `pnpm-workspace.yaml` (`catalog:` and every named `catalogs.*`) to its latest
335
805
  published version, then migrates `holocron.config.ts` from the 7.x preset
336
806
  shape (`const { repo, workflows } = node()` + `repo.requiredChecks` +
337
807
  `workflows:`) to the current composed-preset API (`const preset = node()` +
338
808
  `...preset` + `tasks:` + `extraRequiredChecks:`). Mechanical transforms only —
339
- review the result, then `pnpm install && holocron ci`. `--pins-only` skips
809
+ review the result, then `pnpm install && holocron run ci`. `--pins-only` skips
340
810
  the config migration; `--dry-run` prints without writing.
341
811
 
342
812
  ## Auth — fine-grained tokens
@@ -346,42 +816,74 @@ credential only affects that feature. Store them once in the OS keyring
346
816
  (macOS Keychain, Windows Credential Manager, libsecret on Linux):
347
817
 
348
818
  ```sh
349
- holocron auth set github.read ghp_xxx # clone + CI run listing
350
- holocron auth set github.issues ghp_xxx # issue management
351
- holocron auth set github.sync ghp_xxx # sync-github workflow templates
352
- holocron auth set github.release ghp_xxx # semantic-release
353
- holocron auth set github.admin ghp_xxx # setup, secrets, environments
819
+ holocron new token github.read ghp_xxx # clone + CI run listing
820
+ holocron new token github.issues ghp_xxx # issue management
821
+ holocron new token github.sync ghp_xxx # sync-github workflow templates
822
+ holocron new token github.release ghp_xxx # semantic-release
823
+ holocron new token github.admin ghp_xxx # setup, secrets, environments
824
+ holocron new token github.user-sync ghp_xxx # the files that link GitHub accounts to other services' members
354
825
  ```
355
826
 
356
827
  The resolution chain per capability is:
357
828
 
358
- ```
829
+ ```text
359
830
  --token flag → HOLOCRON_<FEATURE>_TOKEN env var → keyring("github.<feature>")
360
831
  ```
361
832
 
362
833
  See [`docs/tokens.md`](../../docs/tokens.md) for required PAT scopes per feature.
363
834
 
364
- Additional `auth` subcommands:
835
+ A plugin lists the tokens it takes in a `tokens: PluginToken[]` export (each resolver exposes its own as `.token`), as
836
+ `{ envName, vendorEnvName?, keyringKey, verifiable?, optional? }`, so `holocron doctor secrets` (the `local` and `dev` columns, and `--verify`) and
837
+ `export tokens` can find them. Set `optional: true` on a token the plugin only falls back to, such as the Discord
838
+ webhook a post uses when it names no channel: the checks that expect every listed token do not expect it, and
839
+ `export tokens` marks it `(optional)` when it has no value. `verifiable: false` marks a token `verifyToken` does not
840
+ apply to.
841
+
842
+ The token commands:
365
843
 
366
844
  ```sh
367
- holocron auth check github.read # re-verify a stored token
368
- holocron auth unset github.read # remove a stored token
369
- holocron auth list # show all stored providers
845
+ holocron check token github.read # re-verify a stored token
846
+ holocron remove token github.read # remove a stored token
847
+ holocron list tokens # show all stored providers
848
+ holocron list skills # the skills installed in .agents/skills/
849
+ holocron remove skill --all # remove every installed skill (or name some; a bare call asks on a terminal)
850
+ holocron export tokens # tokens as NAME=value lines in a private .credentials, to import into a credentials environment
851
+ holocron export tokens --only HOLOCRON_SENTRY_TOKEN # one token, to the clipboard
852
+ holocron export requests --dry-run # convert the repo's request collections for each tooling provider that can export, writing nothing
853
+ holocron export requests --to bruno --yes # write api/.export/bruno/ (ignored by version control; never inside the source folder)
854
+ holocron open requests --dry-run # which secrets the request workspace reads, from which vault entries; reads and starts nothing
855
+ 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
856
+ 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)
857
+ holocron export tokens --blank --vendor-names --file --only VERCEL_TOKEN --only HOLOCRON_RELEASE_TOKEN # the stored ones filled, the rest empty
858
+ 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
859
+ 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
860
+ holocron list projects # the org's project boards (also: create [template], close <number-or-name>, setup)
861
+ 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
862
+ 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`)
863
+ 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)
864
+ 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)
865
+ holocron doctor project # does each declared board match its template? (read-only; --post shares the failures)
866
+ holocron dev # the app, its vault variables and the tunnel, in one command (settings: `dev` in holocron.config)
370
867
  ```
371
868
 
372
869
  ## Logging
373
870
 
374
871
  Operational output goes through `@theholocron/observability/logger` — separate
375
- from the user-facing `print` surface. Global flags:
872
+ from the user-facing `print` surface. Local/interactive runs are quiet by
873
+ default: no colorized or raw structured console output, regardless of the
874
+ resolved level (Axiom shipping, when configured, is unaffected). CI is
875
+ untouched — its existing stdout output still appears. Global flags:
376
876
 
377
877
  ```sh
378
- holocron doctor --verbose # log level → debug (full structured output)
379
- holocron doctor --quiet # log level → error (suppress info + warn)
878
+ holocron doctor --log debug # show console output at this level (opt back in)
879
+ holocron doctor --verbose # log level → debug, and shows console output
880
+ holocron doctor --quiet # log level → error, and shows console output
380
881
  holocron doctor --debug # print "Run ID: <uuid>" at command end for Axiom lookup
381
882
  ```
382
883
 
383
- Level resolution (highest priority first): `--verbose` / `--quiet` →
384
- `HOLOCRON_LOG_LEVEL` → `log.level` in `holocron.config` → `"info"`.
884
+ Level resolution (highest priority first): `--log <level>` → `--verbose` /
885
+ `--quiet` → `HOLOCRON_LOG_LEVEL` → `log.level` in `holocron.config` →
886
+ `"info"`.
385
887
 
386
888
  ```ts
387
889
  export default defineConfig({
@@ -392,8 +894,18 @@ export default defineConfig({
392
894
  Axiom shipping activates when a token (`HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN`
393
895
  → OS keyring `axiom.<org>` → `axiom`) **and** a dataset
394
896
  (`HOLOCRON_AXIOM_DATASET` / `AXIOM_DATASET` → `log.axiom.dataset` in
395
- `holocron.config`) both resolve; env vars win. The token is never read from a
396
- config file. See the [logging guide](https://docs.theholocron.dev/holocron/logging/).
897
+ `holocron.config` → the credential chain, where the 1Password-synced
898
+ `AXIOM_DATASET` lives) both resolve; env vars win. The token is never read from a
899
+ config file.
900
+
901
+ Each service has one dataset for all its environments (ADR-0019; the CLI's is `holocron`); each line carries `env`
902
+ (`local`, `development`, `ci`, `test`, `production`), so a query filters by it.
903
+ `log.axiom.dataset` is only a per-repo override. The dataset side of the
904
+ resolution is **execution-context-aware** (ADR-0012): a `global`-context command
905
+ (`clone`, `new`, `new token`, `upgrade node`, `plugin create`, …) is not "about"
906
+ any repo, so it skips the repo's `log.axiom.dataset` and uses the CLI's dataset
907
+ from the environment or credential chain. `repo-aware` / `workspace` commands
908
+ (`doctor`, `deploy`, `sync`, …) keep the full chain above. See the [logging guide](https://docs.theholocron.dev/holocron/logging/).
397
909
 
398
910
  ### Telemetry
399
911
 
@@ -422,38 +934,80 @@ export default defineConfig({
422
934
 
423
935
  Each SDK sits behind an interface from `@theholocron/observability` —
424
936
  `ErrorSink` (Sentry) / `AnalyticsSink` (PostHog); the adapters, and the only
425
- `@sentry/node` / `posthog-node` imports, live in that package. `telemetry.ts`
426
- holds the orchestration + the Holocron-specific credential resolution
427
- (`telemetry/resolve.ts`). See the
937
+ `@sentry/node` / `posthog-node` imports, live in that package. the orchestration is `createCliTelemetry` in `@theholocron/kyber/observability`;
938
+ `observability/telemetry.ts` binds it to the Holocron-specific credential resolution
939
+ (`observability/resolve-telemetry.ts`). See the
428
940
  [telemetry guide](https://docs.theholocron.dev/holocron/telemetry/).
429
941
 
942
+ ### ESLint bundle options
943
+
944
+ Most repos need nothing here — `@theholocron/eslint-config`'s `library()`
945
+ bundle resolves with zero committed file (Bucket A: `eslint --config
946
+ <shared path>`, no per-repo `eslint.config.ts` needed). A package with a
947
+ genuine, deliberate exception — e.g. Web Crypto globals a Node-targeted
948
+ package still needs, exempted via `library()`'s own `browserPackages`
949
+ option in that package's own `eslint.config.ts` — should also declare the
950
+ same paths in `holocron.config`'s `eslint.browserPackages`:
951
+
952
+ ```ts
953
+ export default defineConfig({
954
+ eslint: {
955
+ browserPackages: ["clients/github-client/src/app-auth"],
956
+ },
957
+ });
958
+ ```
959
+
960
+ This doesn't replace the package's own `eslint.config.ts` (local/CI linting
961
+ still resolves that file directly) — it's the signal Sentinel's centralized
962
+ static-analysis check (holocron#849/#858) reads instead, since that check
963
+ never reads a PR's own committed config files. Without it, Sentinel flags a
964
+ false-positive `eslint-plugin-n` node-builtins finding on exactly the files
965
+ the local override exists to exempt.
966
+
430
967
  ## What's in here
431
968
 
432
- - `src/capabilities/` — the 14 capability interfaces that providers
433
- implement
969
+ - `src/plugin/capabilities.ts` — the 24 capability interfaces that
970
+ providers implement
434
971
  - `src/config.ts` — config schema, `defineConfig`, `resolveConfig`,
435
972
  `CapabilityConfigPackage`
436
- - `src/config/load-config.ts` — `loadConfig` — reads `holocron.config.*`
437
- (file discovery via [`@theholocron/datapad`](../datapad))
438
- - `src/define-config.ts` — `defineConfig` typed pass-through
439
- - `src/logger.ts` — CLI-side `@theholocron/observability/logger` wiring
973
+ - `src/config/config-system.ts` — `defineConfig`, `loadConfig` (reads `holocron.config.*`;
974
+ file discovery via [`@theholocron/datapad`](../datapad)) and `compose`, all built from
975
+ kyber's `createConfigSystem`; Holocron's own rules sit beside it in `config/config`,
976
+ `compose/{merge-*,task-name}` and `load-config/{derive-defaults,read-package-json-name}`
977
+ - `src/observability/logger.ts` — CLI-side `@theholocron/observability/logger` wiring
440
978
  (`buildCliLogger`, `resolveLogLevel`)
441
- - `src/loader.ts` — `PluginLoader` — dynamic-imports plugins, resolves
442
- capability config packages, builds the capability registry
443
- - `src/cli.ts` — yargs entry, dispatches subcommands. `holocron run` / `ci` are
979
+ - `src/plugin/loader/loader.ts` — `PluginLoader`, a binding of kyber's `createPluginSystem`
980
+ (`@theholocron/kyber/plugins`: dynamic-imports plugins, resolves capability config packages,
981
+ builds the capability registry); Holocron's prefix, plugin options and the credentials / `.env`
982
+ step are passed in
983
+ - `src/cli/cli.ts` — yargs entry, dispatches subcommands. `holocron run` / `ci` are
444
984
  delegated to [`@theholocron/astromech`](../astromech) (`createAstromech`).
445
985
  `holocron sync` / `holocron setup` write each repo's `.github/workflows/*.yml`
446
- thin callers from `astromech.thinCallers()`; `holocron sync-github` pushes the
986
+ thin callers from `astromech.thinCallers()`; `holocron sync github` pushes the
447
987
  reusable `workflow_call` implementations + composite actions from
448
- `astromech.reusableTemplates()` to `theholocron/.github` (a pure sync target —
988
+ `astromech.reusableTemplates()` (written in `ci/`) to `theholocron/.github` (a pure sync target —
449
989
  never hand-edit its `.github/workflows/*`).
450
- - `src/commands/` — `setup`, `sync`, `doctor`, `deploy`, `secret set`,
451
- `secrets sync`, `publish`, `bump-versions`, `sync-github`, `upgrade node`,
452
- `upgrade deps`, `plugin create`, `auth`
453
- - `src/interactive-menu.ts` — the interactive fallback: `COMMAND_REGISTRY`,
454
- `launchMenu` (Layers 1–2, picks + spawns a fresh `holocron <command>`),
455
- `promptForPositionals` (Layer 3, called inline from each leaf command's
456
- `cli.ts` handler)
990
+ - `src/commands/` — `setup`, `sync`, `doctor`, `deploy`,
991
+ `check monitor`, `list secrets`, `new secret`, `sync secrets`, `publish package`,
992
+ `publish bump-versions`, `publish tag`, `sync github`, `upgrade node`,
993
+ `upgrade deps`, `new plugin`, `check token`, `export tokens`, `export requests`, `open requests`, `upload coverage`, `setup notifications`,
994
+ `new channel`, `link account`,
995
+ `sync roles`, `doctor ci`, `doctor dns`, `doctor environments`, `doctor monitoring`, `doctor notifications`, `doctor project`, `doctor repo`, `doctor secrets`
996
+ `sync roles`, `reconcile project`, `doctor ci`, `doctor dns`, `doctor environments`, `doctor monitoring`, `doctor notifications`, `doctor repo`, `doctor secrets`
997
+ - `src/commands/deep-checks/` — `DEEP_CHECKS`, the registry every `doctor <capability>` is
998
+ listed in; the shared row renderer and `declaredVsActual` helper are in `@theholocron/kyber/ui`
999
+ - `src/interactive-menu/` — the interactive fallback's Holocron data: `command-catalog`
1000
+ (`COMMAND_REGISTRY`, built with kyber's `createCommandRegistry`; each entry's `positionals`/`options`), `run-menu-entries`
1001
+ and `probe-menu-entries` (menu entries built at run time), and `menu.ts`,
1002
+ kyber's `createMenu` bound to the `holocron` bin and `HOLOCRON_` env prefix.
1003
+ The engine itself (the picker, argv and secret env, the dry-run preview, the spawn)
1004
+ and the prompting pieces — `promptForPositionals`, `promptForOptions` — live in
1005
+ `@theholocron/kyber` (`/menu`, `/prompts`), which has no knowledge of commands.
1006
+ - `src/plugin/probes/connection-probe/` — the `connectionProbe` a plugin offers, kyber's `connectionProbe` (`@theholocron/kyber/checks`)
1007
+ typed as the plugin system's `Probe` with `verify` returning `VerifyTokenResult`; `check monitor` runs its checks
1008
+ with kyber's `runCheckAgainstUrl`.
1009
+ - `src/commands/move-tag/` — the `publish tag` yargs command, the registry entry and `runMoveTag`, which adds the
1010
+ command-bound logger to kyber's `moveMajorTag` (`@theholocron/kyber/git`).
457
1011
 
458
1012
  ## Status
459
1013