@blamejs/exceptd-skills 0.11.0 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.2 — 2026-05-12
4
+
5
+ **Patch: operator-reported items 58-70 from real CLI use.**
6
+
7
+ ### Bugs
8
+
9
+ - **#58 `ask` non-functional.** Even literal token "secrets" returned `matched: []`. Root cause: tokenizer required length > 3 (dropped "PQC"/"MCP") and the search index covered only `domain.name + attack_class + first sentence of threat_context`. Rewritten with: (a) length >= 2 token filter, (b) synonym map (`credential` → secret/key/token/...; `supply chain` → sbom/dependency/...; `pqc` → post-quantum/ml-kem/...), (c) richer index covering id + name + attack_class + atlas_refs + attack_refs + cwe_refs + frameworks_in_scope + theater_fingerprints.claim + full threat_context + framework_lag_declaration + skill_chain + collection_scope, (d) ID match scores 3× (so `ask secrets` routes to the secrets playbook). Default output now human-readable; `--json` for machine.
10
+ - **#59 `--format` flag was no-op.** Documented values produced standard JSON unconditionally. Wired through: `--format summary` emits a single-line JSON digest; `--format markdown` emits an operator-readable markdown report; `--format csaf-2.0|sarif|openvex` emits the corresponding bundle from `close.evidence_package.bundles_by_format`. Unknown values rejected with a list of valid options.
11
+ - **#60 Default output flipped (partial).** `emit()` now detects `stdout.isTTY` — interactive use gets indented JSON (massively more readable); piped use stays compact. Override via `--pretty` (always indent) or `EXCEPTD_RAW_JSON=1`. Verbs with dedicated human renderers (`discover`, `doctor`, `ask`) still use them.
12
+ - **#61 doctor summary contradicted its findings.** Output said "all checks green" directly above `[!!] private key MISSING`. Now: signing-check severity is `warn` when key absent; summary distinguishes errors vs warnings (`X fail / Y warn`); icon shows `[!! warn]` instead of `[ok]`. Warnings don't force exit 1 (CI still ok) but the visible state matches.
13
+ - **#62 `watch` verb missing.** The deprecation map said `watchlist → watch` but `watch` returned unknown-command. Added `watch` as orchestrator passthrough aliased to `watchlist` (same function).
14
+ - **#63 `discover` vs `ci --scope code` mismatch.** discover recommended 5 playbooks; ci ran 4 (different sets). ci now includes cross-cutting playbooks (`framework`) regardless of scope, and for `--scope code` on a git repo with a lockfile, also includes `sbom` (system-scope but repo-relevant). Aligns with discover's recommendations.
15
+ - **#65 `refresh --no-network` / `--indexes-only` silently no-op.** v0.11.0 deprecation pointers said `prefetch → refresh --no-network` and `build-indexes → refresh --indexes-only`, but the underlying refresh script ignored those flags. Now: CLI translates them at dispatch time — `refresh --no-network` routes to the `prefetch` script; `refresh --indexes-only` routes to `build-indexes`.
16
+ - **#66 `ai-run` shell-pipe unusable.** `echo '{...}' | exceptd ai-run secrets` failed with "stdin closed without an evidence event" because shell heredocs close stdin before the streaming protocol expects the wrapped `{event:evidence}` frame. Fix: when streaming mode hits EOF without a wrapped event, parse the raw stdin as a bare submission object and run with it. Operators no longer need an interactive harness for the common single-shot case.
17
+ - **#64 verified.** `ok:false` from `on_fail: halt` preconditions correctly exits 1 (kernel-on-Windows reproducer). The user's `exceptd run secrets` cases were `on_fail: warn` preconditions where exit 0 is correct (run completed with warning). No regression in v0.11.x; the user's stale install may have shown different behavior.
18
+
19
+ ### Features
20
+
21
+ - **#67** `ask` routing index — same fix as #58.
22
+ - **#68** `--format summary` single-line digest — same fix as #59. Returns: `{ok, playbook, session_id, classification, rwep, blast_radius, matched_cves, feeds_into, jurisdiction_clocks, evidence_hash}`. Useful for GH Actions annotation lines.
23
+ - **#69** `doctor --fix` automatically runs `node lib/sign.js generate-keypair` when the private-key check is the only failing warning. Closes the most-common discovered-issue → manual-fix-recipe loop.
24
+ - **#70** `run --format markdown` emits an operator-readable per-run digest (classification, RWEP, matched CVEs, recommended remediation, notification clocks, feeds_into).
25
+
26
+ ### Already shipped (cross-referenced)
27
+
28
+ - `attest diff <a> --against <b>` (was v0.11.0 #56) — works as documented.
29
+
30
+ ## 0.11.1 — 2026-05-12
31
+
32
+ **Patch: operator-reported items 47-57.**
33
+
34
+ ### Bugs
35
+
36
+ - **#48 report self-describing header.** `report executive` / `technical` / `compliance` previously emitted identical `# exceptd Security Assessment Report` headers — only stderr (`[orchestrator] Generating <X> report`) distinguished them, so a piped-to-file report had no internal provenance. Now: `# exceptd Executive Report` / `Technical Report` / `Compliance Report` + an HTML-comment marker (`<!-- exceptd-report:flavor=<x> version=<v> -->`) inside the body. Saved files are self-describing.
37
+ - **#50 mutex cross-process enforcement.** `_meta.mutex` was documented but only enforced intra-process (in-memory `_activeRuns` Set). Two parallel `exceptd run kernel` + `exceptd run hardening` invocations in separate shells would race. Now: runner writes a `.exceptd/locks/<playbook>.lock` JSON file (pid + started_at) for the duration of the run; preflight rejects with `blocked_by: mutex` when a non-stale lock exists. Stale locks (dead pid) are auto-GC'd. Released in `finally`.
38
+ - **#51 deprecation message version-aware.** The banner used to say "Prefer `brief --all` (v0.11.0)" unconditionally; operators on v0.10.x reading it would find no `brief` command in their install. Now: banner shows the installed version explicitly and conditionally emits "available in this install" vs "upgrade to v0.11.0+ first."
39
+ - **#47 / #49 exit-code + skill-not-found shapes.** Verified still correct in v0.11.0 — exit 1 on `ok:false`, JSON shape for `skill <missing>`. No regression; added regression test coverage.
40
+
41
+ ### Features
42
+
43
+ - **#54 `--json-stdout-only`** — silences ALL stderr emissions (deprecation banners, unsigned-attestation warnings, hook output). Operators piping JSON results through `jq` or scripting exit codes get clean stdout exclusively. Real errors (uncaught exceptions starting with "Error") still pass through.
44
+ - **#55 `report csaf`** — emits a CSAF 2.0 envelope of the full assessment (findings + dispatch plan + skill currency + host context). Pipes directly into VEX downstream tooling.
45
+ - **#57 default-stdin on pipe.** `exceptd run <playbook>` now auto-detects piped stdin (`process.stdin.isTTY === false`) and assumes `--evidence -`. Operators forgetting the flag no longer hit a precondition halt.
46
+
47
+ ### Already-existing surface (cross-referenced in operator report)
48
+
49
+ - #52 brief lands before deprecating look — already shipped in v0.11.0
50
+ - #53 doctor verb — already shipped in v0.11.0
51
+ - #56 cross-session diff — already exists as `attest diff <a-sid> --against <b-sid>` (v0.11.0)
52
+
3
53
  ## 0.11.0 — 2026-05-12
4
54
 
5
55
  **Minor: architectural CLI redesign — 21 verbs collapsed to 11. Plus operator-reported items 31-46.**
package/README.md CHANGED
@@ -32,7 +32,9 @@ This platform surfaces what is actually happening right now. Every skill explici
32
32
 
33
33
  Pre-1.0. Latest release lives on [GitHub Releases](https://github.com/blamejs/exceptd-skills/releases) and on npm as [`@blamejs/exceptd-skills`](https://www.npmjs.com/package/@blamejs/exceptd-skills) (signed npm provenance attestation). 38 skills across kernel LPE, AI attack surface, MCP trust, RAG security, AI-API C2 detection, PQC migration, framework gap analysis, compliance theater, exploit scoring, threat-model currency, zero-day learning, global GRC, policy exception generation, security maturity tiers, skill update loop, attack-surface pen testing, fuzz testing, DLP gap analysis, supply-chain integrity, defensive-countermeasure mapping, identity assurance, OT/ICS security, coordinated vulnerability disclosure, threat-modeling methodology, child-safety age gates, plus sector packs (federal, financial, healthcare, energy) — and a `researcher` triage dispatcher. 10 data catalogs cover CVE / ATLAS / ATT&CK / CWE / D3FEND / DLP / RFC / framework gaps / global frameworks / zero-day lessons. 34 jurisdictions tracked. AI-consumer ergonomics: `data/_indexes/` ships 17 pre-computed indexes (xref / chains / dispatch / DiD ladders / theater fingerprints / recipes / token budget / currency / activity feed) regenerated by `npm run build-indexes`. External-data refresh is automated nightly via `.github/workflows/refresh.yml` — KEV/EPSS/NVD/RFC drift opens an auto-PR with deltas pre-applied; KEV adds new CVEs and IETF discovery auto-imports new RFCs across 48 project-relevant working groups (`_auto_imported` annotation flags entries for human curation); ATLAS/ATT&CK/CWE/D3FEND version bumps open an issue (audit required per AGENTS.md Hard Rule #12). `exceptd verify` prints dual SHA-256 + SHA3-512 public-key fingerprints for out-of-band key pinning. `exceptd scan` probes 22 PQC algorithms across the full NIST + IETF emerging landscape. `exceptd framework-gap <framework> <scenario>` provides a non-AI programmatic runner for the framework-gap skill.
34
34
 
35
- **v0.10.0 introduces the seven-phase playbook contract** — exceptd ships playbooks under `data/playbooks/*.json` that host AIs (Claude Code, Cursor, Gemini CLI, Codex) execute through seven phases: `govern → direct → look → detect → analyze → validate → close`. exceptd owns govern / direct / analyze / validate / close (knowledge + GRC layer); the host AI owns look / detect (artifact collection + indicator evaluation with its native Bash/Read/Grep/Glob). The runner enforces `threat_currency_score` gates, evaluates per-playbook preconditions, honors mutex sets, picks priority-ordered remediation paths, builds CSAF-2.0 evidence bundles (Ed25519-signed by default), computes ISO 8601 notification deadlines from jurisdiction `clock_starts` events, and generates auditor-ready policy-exception language when remediation cannot complete within compliance windows. See `lib/schemas/playbook.schema.json` for the contract and AGENTS.md "Seven-phase playbook contract" for the host-AI invocation guide. Legacy `exceptd scan` remains for non-AI operators with a deprecation banner — to be removed in v1.0.
35
+ **v0.10.0 introduced the seven-phase playbook contract** — exceptd ships playbooks under `data/playbooks/*.json` that host AIs (Claude Code, Cursor, Gemini CLI, Codex) execute through seven phases: `govern → direct → look → detect → analyze → validate → close`. exceptd owns govern / direct / analyze / validate / close (knowledge + GRC layer); the host AI owns look / detect (artifact collection + indicator evaluation with its native Bash/Read/Grep/Glob).
36
+
37
+ **v0.11.0 collapses the 21-verb CLI into 11 canonical verbs** + flips the default output to human-readable. The new surface: `discover` (scan cwd → recommend playbooks), `brief` (unified info doc, replaces plan + govern + direct + look), `run` (phases 4-7, with flat or nested submission shape, auto-detect cwd context), `ai-run` (JSONL streaming variant for AI conversational flow), `attest` (subverbs: list / show / export / verify / diff — replaces reattest + list-attestations), `doctor` (one-shot health check — signatures + currency + cve/rfc validation + signing status), `ci` (one-shot CI gate, exit-2 on detected or rwep ≥ escalate), `ask` (plain-English routing), `lint` (pre-flight submission shape check). Attestation root moved from cwd-relative `.exceptd/` to `~/.exceptd/attestations/<repo-or-host-tag>/`. v0.10.x verbs (`plan`/`govern`/`direct`/`look`/`scan`/`dispatch`/`currency`/`verify`/`validate-cves`/`validate-rfcs`/`watchlist`/`prefetch`/`build-indexes`/`ingest`/`reattest`/`list-attestations`) still work via one-time deprecation banner — removed in v0.12.
36
38
 
37
39
  ---
38
40
 
@@ -174,71 +176,141 @@ Direct invocations also available: `npm run verify`, `node lib/sign.js sign-all`
174
176
 
175
177
  Every command works the same via `npx @blamejs/exceptd-skills`, a global install (`exceptd`), or a local `node bin/exceptd.js`.
176
178
 
177
- ```
178
- exceptd path Print absolute path to the installed package.
179
-
180
- exceptd prefetch [args] Warm local cache of upstream artifacts.
181
- --max-age 24h Skip entries fresher than this.
182
- --source kev,nvd Comma-separated source filter.
183
- --force Ignore freshness; refetch everything.
184
- --no-network Dry-run plan; do not actually fetch.
185
-
186
- exceptd refresh [args] Refresh upstream data; optionally apply upserts.
187
- --apply Write diffs back to data/*.json and rebuild indexes.
188
- --from-cache [<dir>] Read from prefetch cache instead of upstream.
189
- --swarm Fan-out across worker threads.
190
- --source kev,epss,nvd,rfc,pins Scope by source.
191
- --from-fixture <dir> Test mode — read frozen fixtures.
192
- --report-out <path> Redirect refresh-report.json output.
193
-
194
- exceptd build-indexes [args] Rebuild data/_indexes/*.json (17 outputs).
195
- --only <names> Comma-separated subset (auto-pulls in dependencies).
196
- --changed Rebuild only outputs whose deps changed.
197
- --parallel Run independent outputs concurrently.
198
-
199
- exceptd verify Verify Ed25519 signature on every skill.
200
- Prints dual SHA-256 + SHA3-512 fingerprint
201
- of keys/public.pem so operators can pin
202
- the key out-of-band.
203
- exceptd scan Scan environment for findings — includes
204
- a 22-algorithm PQC probe (NIST finalized
205
- ML-KEM/ML-DSA/SLH-DSA, draft FN-DSA + HQC,
206
- Round-4 alternates Frodo/NTRU/McEliece/BIKE,
207
- signature on-ramp Hawk/Mayo/SQIsign/CROSS/
208
- UOV/SDitH/Mirath/FAEST/Perk, stateful
209
- LMS/XMSS/HSS, IETF composite sigs + KEMs).
210
- exceptd dispatch Scan then route findings to skills. Plan
211
- entries surface per-CVE evidence (IDs +
212
- RWEP scores), not aggregate counts.
213
- exceptd skill <name> Show context for a specific skill.
214
- exceptd currency Skill currency report. Score is age-only
215
- (forward_watch count does NOT reduce score
216
- — it's a maintenance signal).
217
- exceptd report [executive|technical|compliance] Generate report. Executive
218
- summary splits currency into named tiers
219
- (critical-stale <50%, stale 50-69%).
220
- exceptd framework-gap <FW> <SCENARIO> [--json]
221
- Programmatic runner for the framework-gap
222
- skill. Lists matching control gaps,
223
- universal gaps, and theater-risk controls.
224
- Examples:
225
- exceptd framework-gap NIST-800-53 CVE-2026-31431
226
- exceptd framework-gap PCI-DSS-4.0 "prompt injection"
227
- exceptd framework-gap all CVE-2025-53773 --json
228
- exceptd validate-cves [args] Cross-check CVE catalog vs NVD/KEV/EPSS.
229
- --offline Local view only; no network.
230
- --from-cache [<dir>] Cache-first lookups with live fallback.
231
- --no-fail Report drift without failing exit code.
232
- exceptd validate-rfcs [args] Cross-check RFC catalog vs IETF Datatracker.
233
- --offline Local view only; no network.
234
- --from-cache [<dir>] Cache-first lookups with live fallback.
235
- --no-fail Report drift without failing exit code.
236
- exceptd watchlist [--by-skill] Forward-watch aggregator across skills.
179
+ ### v0.11.0 canonical verbs
237
180
 
181
+ ```
182
+ exceptd First-run welcome — two ways to start
183
+ (discover / ask) plus common starting
184
+ playbooks for code / Linux / service contexts.
185
+
186
+ exceptd discover Scan cwd → recommend playbooks based on
187
+ detected files (.git, package.json,
188
+ Dockerfile, requirements.txt, etc) + host
189
+ platform. Replaces scan + dispatch.
190
+ --scan-only Also include legacy host scan findings.
191
+ --json | --pretty Machine output (default is human checklist).
192
+
193
+ exceptd brief [playbook] Unified info doc — jurisdictions + threat
194
+ context + RWEP thresholds + preconditions
195
+ + artifacts + indicators. Replaces plan +
196
+ govern + direct + look.
197
+ --all Every playbook (replaces `plan`).
198
+ --scope <type> system | code | service | cross-cutting.
199
+ --directives Expand directive metadata per playbook.
200
+ --phase <name> Emit only one phase (legacy compat).
201
+
202
+ exceptd run [playbook] Phases 4-7. Auto-detects cwd context when
203
+ no playbook positional.
204
+ --evidence <file|-> Submission JSON (flat or nested shape).
205
+ --evidence-dir <dir> Per-playbook submission files (cron-friendly).
206
+ --scope <type> | --all Multi-playbook run.
207
+ --vex <file> CycloneDX / OpenVEX filter (drop not_affected).
208
+ --format <fmt> ... csaf-2.0 | sarif | openvex | markdown | summary.
209
+ Repeatable. CSAF is primary; extras go to
210
+ close.evidence_package.bundles_by_format.
211
+ --diff-from-latest Drift vs prior attestation for same playbook.
212
+ --ci Exit-code gate (use `exceptd ci` instead).
213
+ --operator <name> Bind attestation to identity.
214
+ --ack Explicit jurisdiction-obligation consent.
215
+ --session-id <id> Reuse session id (collision refused).
216
+ --force-overwrite Override session collision refusal.
217
+ --session-key <hex> HMAC sign evidence_package (≥ 16 hex chars).
218
+ --attestation-root <path> Override ~/.exceptd/attestations/ root.
219
+ --explain Dry-run: preconditions + artifacts +
220
+ signal keys + submission skeleton.
221
+ --signal-list Lighter than --explain; enumerate signal
222
+ keys only.
223
+ --force-stale Override threat_currency_score < 50 gate.
224
+ --air-gap Honor air_gap_alternative paths.
225
+
226
+ exceptd ai-run <playbook> JSONL streaming variant of run. AI emits
227
+ evidence events on stdin; runner streams
228
+ phase events on stdout. One pipe, no
229
+ file handoff.
230
+ --no-stream Single-shot mode (emit one combined JSON).
231
+
232
+ exceptd attest <subverb> [<sid>] Auditor-facing operations.
233
+ attest list Inventory all sessions across both
234
+ ~/.exceptd and cwd-legacy roots.
235
+ attest show <sid> Full (unredacted) attestation.
236
+ attest export <sid> Redacted bundle for audit submission.
237
+ Strips raw artifact values; preserves
238
+ evidence_hash + signature + verdict.
239
+ --format csaf wraps in CSAF envelope.
240
+ attest verify <sid> Ed25519 .sig sidecar verification.
241
+ attest diff <sid> Drift replay (= reattest default).
242
+ --against <other-sid> compares two
243
+ sessions side-by-side with per-artifact
244
+ diff (added / removed / changed).
245
+ --playbook <id> Filter (list / diff).
246
+ --since <ISO> Filter list / diff to entries after date.
247
+
248
+ exceptd discover / doctor / ci See above for doctor and ci.
249
+
250
+ exceptd doctor One-shot health check.
251
+ --signatures Only Ed25519 skill verification.
252
+ --currency Only skill currency report.
253
+ --cves Only CVE catalog drift check.
254
+ --rfcs Only RFC catalog drift check.
255
+
256
+ exceptd ci One-shot CI gate. Exits 2 on detected or
257
+ rwep ≥ rwep_threshold.escalate.
258
+ --all | --scope <type> Pick playbooks; auto-detect if neither.
259
+ --max-rwep <n> Cap below playbook default.
260
+ --block-on-jurisdiction-clock Fail when notification clock fires.
261
+ --evidence / --evidence-dir Per-playbook submission files.
262
+
263
+ exceptd ask "<question>" Plain-English routing to playbook(s).
264
+ Returns ranked playbook IDs based on
265
+ keyword overlap with each playbook's
266
+ domain.name + attack_class + threat_context.
267
+
268
+ exceptd lint <pb> <evidence> Pre-flight check submission shape vs
269
+ playbook (preconditions / artifacts /
270
+ indicators) without executing phases 4-7.
271
+
272
+ exceptd refresh Refresh upstream catalogs + indexes.
273
+ Replaces prefetch + refresh + build-indexes.
274
+ --apply Write diffs back + rebuild indexes.
275
+ --from-cache [<dir>] Read from prefetch cache.
276
+ --no-network Dry-run.
277
+ --indexes-only Rebuild data/_indexes/*.json only.
278
+
279
+ exceptd skill <name> Show context for one skill.
280
+ exceptd framework-gap <FW> <ref> One framework + one CVE/scenario, JSON
281
+ or human. (Operates outside the seven-
282
+ phase contract for ad-hoc gap analysis.)
283
+ exceptd path Absolute path to the installed package.
238
284
  exceptd version Package version.
239
285
  exceptd help This help.
286
+ exceptd <verb> --help Per-verb usage with flag descriptions.
240
287
  ```
241
288
 
289
+ ### Legacy v0.10.x verbs (deprecated, removed in v0.12)
290
+
291
+ These still work but emit a one-time deprecation banner per process:
292
+
293
+ | Legacy verb | v0.11.0 replacement |
294
+ |---|---|
295
+ | `plan` | `brief --all` |
296
+ | `govern <pb>` | `brief <pb> --phase govern` |
297
+ | `direct <pb>` | `brief <pb> --phase direct` |
298
+ | `look <pb>` | `brief <pb> --phase look` |
299
+ | `scan` | `discover --scan-only` |
300
+ | `dispatch` | `discover` |
301
+ | `currency` | `doctor --currency` |
302
+ | `verify` | `doctor --signatures` |
303
+ | `validate-cves` | `doctor --cves` |
304
+ | `validate-rfcs` | `doctor --rfcs` |
305
+ | `ingest` | `run` |
306
+ | `reattest <sid>` | `attest diff <sid>` |
307
+ | `list-attestations` | `attest list` |
308
+ | `watchlist` | (no replacement yet — kept) |
309
+ | `prefetch` | `refresh --no-network` |
310
+ | `build-indexes` | `refresh --indexes-only` |
311
+
312
+ Suppress the deprecation banner: `EXCEPTD_DEPRECATION_SHOWN=1`.
313
+
242
314
  ## Invoking a skill from your AI assistant
243
315
 
244
316
  Once your assistant has loaded `AGENTS.md`, type a trigger phrase or skill name: