@mrciphersmith/keryx 0.3.51 → 0.3.53

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.3.51",
3
+ "version": "0.3.53",
4
4
  "description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -171,9 +171,10 @@ Read three things off it before running for real:
171
171
  the reviewer will cite a rule the project will not have. `differs` means a
172
172
  file already answers that reference with other content.
173
173
 
174
- A dry-run does not run the security gate that a real run applies to every file
175
- it writes, so a `would-…` status can be optimistic: the real run may still block
176
- a package, or report a rule as `unresolved` with `blocked by the security gate`.
174
+ A dry-run runs the same security gate a real run does, on the text that would
175
+ be written, so a `would-…` status already says what the gate would do. A file
176
+ the gate would refuse is `would-refuse`, and a file it would change or flag
177
+ carries the reason on its row (section 3, "The security gate on import").
177
178
 
178
179
  ### 3. The real run, and what it writes
179
180
 
@@ -202,14 +203,14 @@ imported: 3 overwritten: 0 updated: 0 skipped: 1 would-import: 0 would-overwrite
202
203
 
203
204
  A reviewer that cites `<dir>/<name>.mdc` reads `.metaproject/rules/project/<dir>/<name>.mdc` when that file exists,
204
205
  and `.metaproject/rules/<dir>/<name>.mdc` otherwise. `keryx init`, `keryx update` and `keryx skills install` overwrite
205
- rules/core with keryx's own rules and leave rules/project alone. `keryx review reviewers` lists each such reference
206
- under `shadowedRules`.
206
+ rules/core with keryx's own rules (the manifest form of `skills install` skips files it has no record of) and leave
207
+ rules/project alone. `keryx review reviewers` lists each such reference under `shadowedRules`.
207
208
 
208
209
  Reviewers: `keryx review reviewers` must list every imported review/* name. That is the same call review-orchestrator makes.
209
210
  ```
210
211
 
211
- The note's "`keryx skills install` overwrite rules/core" is true of one of its
212
- two forms. **`keryx init`, `keryx update` and the legacy-profile form of
212
+ The note's "`keryx skills install` overwrite rules/core" is true of the legacy
213
+ profile form; the manifest form skips files it has no record of (below). **`keryx init`, `keryx update` and the legacy-profile form of
213
214
  `keryx skills install`** (`--profile minimal|recommended|full|custom` with no
214
215
  manifest flag) copy keryx's rules over `rules/core`. The manifest form with
215
216
  `--target keryx-shell` also writes `rules/core`, but skips an existing file its
@@ -280,7 +281,8 @@ reports one status:
280
281
  and the project has no file for yet; the overlay's goes to
281
282
  `.metaproject/rules/project/core/<name>.mdc` rather than to `rules/core`,
282
283
  because `keryx init`, `keryx update` and the legacy-profile
283
- `keryx skills install` overwrite `rules/core` with keryx's own rules.
284
+ `keryx skills install` overwrite `rules/core` with keryx's own rules (the
285
+ manifest form skips files it has no record of).
284
286
  - `unresolved` — no `rules/` directory beside the source has it. Add the file by
285
287
  hand, or the reviewer keeps citing a rule the project lacks.
286
288
 
@@ -305,6 +307,107 @@ to overwrite`, and the rule rows are re-resolved — `present` for both files
305
307
  written above, the second with `the reviewer reads
306
308
  .metaproject/rules/project/core/error-handling.mdc`.
307
309
 
310
+ **The security gate on import.** `keryx skills import`, `keryx review import`
311
+ and `keryx skills update` pass every `SKILL.md` and rule through the security
312
+ gate on the final text, while planning, so a dry run reports it too. The gate
313
+ does not write silently:
314
+
315
+ - A secret is masked in what is written, and the row says so: `redacted by the
316
+ security gate (…)`. On a dry run, `would be redacted by the security gate (…)`.
317
+ - Any other finding follows the project's security mode and is reported on the
318
+ row as `flagged by the security gate (…)`.
319
+ - A **prompt-injection** finding refuses the file in every security mode. The row
320
+ status is `refused` (`would-refuse` on a dry run), the reason is the gate's own
321
+ leak-safe summary (policy ids and counts, never the matched text), nothing is
322
+ written and no scaffold is left. The other packages and rules go on.
323
+ - **With the security module disabled** the guard reports nothing, so the import
324
+ runs the deterministic prompt-injection detector itself and refuses on a match
325
+ exactly as above; the row reason says `the security module is disabled, so the
326
+ import ran its own injection check`. A secret is still masked by the floor
327
+ redaction; clean text imports as usual.
328
+ - A rule cited **only** by refused (`would-refuse`) packages is not written. Its
329
+ row reads `skipped — cited only by a refused package`, on a dry run and a real
330
+ run alike; a rule an imported package also cites is handled as before.
331
+ - **Exit code.** A real run that produced any `refused` row prints every row (text
332
+ or `--json`) and then exits 1. A dry run, whose rows say `would-refuse`, exits 0.
333
+ - The file is gated once, before anything is written, and the text written is the
334
+ text gated: a refusal leaves no scaffold, registry entry or catalog row, and
335
+ never overwrites an installed `SKILL.md` on `--force` or update.
336
+ - `--allow-flagged` writes a prompt-injection-flagged file anyway, after you have
337
+ read it. The row then reads `flagged by the security gate (…), written because
338
+ --allow-flagged` (`would be written because --allow-flagged` on a dry run). It
339
+ never overrides a block by the project's security mode: under mode `enforced`
340
+ a secret is refused with or without the flag.
341
+
342
+ The flag belongs to all three commands: `keryx skills import … [--allow-flagged]`,
343
+ `keryx review import … [--allow-flagged]`, `keryx skills update … [--allow-flagged]`.
344
+ The summary line gains `refused: N` (`would-refuse: N` on a dry run) only when
345
+ N is above zero, and the note under it names `--allow-flagged` only when a refused
346
+ row carries a prompt-injection finding (the flag cannot change any other
347
+ refusal). This is the output for an overlay with two reviewers, one whose
348
+ body tries to override the agent's instructions and asks it to disclose its
349
+ own context, and one that holds the AWS documentation placeholder access key:
350
+
351
+ ```
352
+ $ keryx review import --from ./ov --only 'review-acme-*' --dry-run
353
+ # skills import
354
+
355
+ from: ./ov
356
+ dry-run: yes
357
+ force: no
358
+ imported: 0 overwritten: 0 updated: 0 skipped: 0 would-import: 1 would-overwrite: 0 would-refuse: 1
359
+ …
360
+ ## packages
361
+
362
+ - review/review-acme-inj: would-refuse — [security] pass: 2 finding(s) (prompt-injection:2)
363
+ - review/review-acme-key: would-import — would be redacted by the security gate ([security] fail: 1 finding(s) (secret:1)) — review-orchestrator will dispatch this after `keryx review reviewers` lists it
364
+
365
+ A refused file was not written. A prompt-injection refusal can be overridden after you read the file: run the command again with --allow-flagged.
366
+ …
367
+
368
+ $ keryx review import --from ./ov --only 'review-acme-*'
369
+ …
370
+ imported: 1 overwritten: 0 updated: 0 skipped: 0 would-import: 0 would-overwrite: 0 refused: 1
371
+
372
+ - review/review-acme-inj: refused — [security] pass: 2 finding(s) (prompt-injection:2)
373
+ - review/review-acme-key: imported — redacted by the security gate ([security] fail: 1 finding(s) (secret:1)) — review-orchestrator will dispatch this after `keryx review reviewers` lists it
374
+ …
375
+
376
+ $ keryx review import --from ./ov --only 'review-acme-inj' --dry-run --allow-flagged
377
+ …
378
+ - review/review-acme-inj: would-import — flagged by the security gate ([security] pass: 2 finding(s) (prompt-injection:2)), would be written because --allow-flagged — review-orchestrator will dispatch this after `keryx review reviewers` lists it
379
+ …
380
+ ```
381
+
382
+ Row statuses, with the gate in them: `imported`, `overwritten`, `updated`,
383
+ `skipped`, `would-import`, `would-overwrite`, `refused`, `would-refuse`.
384
+
385
+ In `--json` a row carries a `security` object when the gate had something to say
386
+ about it, and none otherwise. The refused row above, trimmed:
387
+
388
+ ```json
389
+ {
390
+ "name": "review-acme-inj",
391
+ "module": "review",
392
+ "status": "would-refuse",
393
+ "reason": "[security] pass: 2 finding(s) (prompt-injection:2)",
394
+ "security": {
395
+ "action": "warn",
396
+ "findings": [
397
+ { "policyId": "prompt-injection.ignore-instructions", "category": "prompt-injection", "action": "warn" },
398
+ …
399
+ ],
400
+ "redacted": false,
401
+ "refused": true
402
+ }
403
+ }
404
+ ```
405
+
406
+ `security.redacted` is true when the gate changed the bytes that are, or would
407
+ be, written; `security.refused` is true when the file was not (or would not be)
408
+ written. A caller that used to read `status` alone must now treat `refused` and
409
+ `would-refuse` as failures to import that exit 0.
410
+
308
411
  ### 4. Reading `keryx review reviewers`
309
412
 
310
413
  ```
@@ -572,10 +675,11 @@ $ keryx review reviewers
572
675
  - review-acme-api: `vendor/acme-overlay/skills/review-acme-api/SKILL.md` changed since 2026-09-30T15:49:48.204Z
573
676
  …
574
677
  $ keryx skills update review/review-acme-api --dry-run
678
+ # skills update
575
679
  …
576
- ## would import (1) — dry run, nothing written
680
+ ## would update (1) — dry run, nothing written
577
681
 
578
- - review/review-acme-api (overwrites the existing one)
682
+ - review/review-acme-api
579
683
  …
580
684
  $ keryx skills update review/review-acme-api
581
685
  …
@@ -17,7 +17,6 @@ triggers:
17
17
  - "make a reviewer from this profile"
18
18
  - "создай ревьюера"
19
19
  - "создай нового ревьюера на основании"
20
- - "import vantage reviewers"
21
20
  - "import overlay reviewers"
22
21
  metadata:
23
22
  author: "MrCipherSmith"
@@ -631,7 +631,7 @@ keryx flow complete <id>
631
631
 
632
632
  Completion is allowed only after the PR merge has been confirmed. The merge
633
633
  target must be the base branch captured when the flow was created; do not
634
- silently retarget or close against another branch. Flows created since the owner gate fail completion while no owner is set (`keryx flow owner set <id> --owner "<name>" --reason "<why>"`); `ac confirm` and `flow complete` append a signature — `--signed-by "<name>"` names the signer, otherwise `KERYX_ACTOR` or the local git identity is recorded, as a claim. A flow created with `--require-confirmation` needs one more gate — `--confirm-token <token>` from `keryx flow confirm <id>`, a short-lived single-use token minted by a typed challenge in a terminal; it proves an interactive step ran outside the agent's tool roster, not that a human ran it. A flow left stuck in `completing` by a crash or interrupted attempt (never a normal gate failure) recovers with `keryx flow recover <id> --reason "<why>"`.
634
+ silently retarget or close against another branch. The flow folder is committed in the same PR as the code; the commit at closing is a rule to follow, not one the gate checks. `flow complete` fails the `folder-committed` gate while the flow's `flow.json` is not in `HEAD` (flows created from 0.3.53 on; commit it with `git add .metaproject/flows/<dir> && git commit`, then run `flow complete` again). `flow init` and `flow renumber` avoid numbers used on known remote branches, and `keryx flow check` reports a clash with a remote branch (repair with `keryx flow renumber <dir> --to <free id> --reason "<why>"`) and warns about a folder that is not committed. Flows created since the owner gate fail completion while no owner is set (`keryx flow owner set <id> --owner "<name>" --reason "<why>"`); `ac confirm` and `flow complete` append a signature — `--signed-by "<name>"` names the signer, otherwise `KERYX_ACTOR` or the local git identity is recorded, as a claim. A flow created with `--require-confirmation` needs one more gate — `--confirm-token <token>` from `keryx flow confirm <id>`, a short-lived single-use token minted by a typed challenge in a terminal; it proves an interactive step ran outside the agent's tool roster, not that a human ran it. A flow left stuck in `completing` by a crash or interrupted attempt (never a normal gate failure) recovers with `keryx flow recover <id> --reason "<why>"`.
635
635
 
636
636
  If gates fail, the CLI returns the flow to `in-progress`. Add a journal note,
637
637
  create fix tasks, and repeat Phase 2.
@@ -240,10 +240,9 @@ What to expect from the exit code:
240
240
  skills catalog and gdskills module manifest for the `full` profile. It sets
241
241
  exit 1 only when `.metaproject/` is absent; a destination it will not write
242
242
  through (a symlink, a non-directory) is listed under `Warnings` with exit 0.
243
- - **The dry-run's `Apply this plan:` hint is not the whole command.** It prints
244
- only `--profile` and `--target`, so after a dry-run with
245
- `--with capability:mobx` the hinted command installs the profile without
246
- `code-mobx-store-review`. Re-type the command you dry-ran, minus `--dry-run`.
243
+ - **The dry-run's `Apply this plan:` hint is the whole command.** It repeats
244
+ every plan-shaping flag (`--with`, `--without`, `--include-deprecated`,
245
+ `--target`, `--profile`), so run it as printed.
247
246
 
248
247
  Run `keryx review reviewers --json` again afterwards and dispatch from what it
249
248
  returns.