@dzhechkov/harness-cli 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.dz-manifest.json CHANGED
@@ -4,20 +4,12 @@
4
4
  "pack": "harness-cli",
5
5
  "files": [
6
6
  {
7
- "path": "CHANGELOG.md",
8
- "sha256": "fb63e4a05e205a1a2ec6806b61898a4aa5ea19148e4bb0e553e2c9b19e382a5f"
7
+ "path": "LICENSE",
8
+ "sha256": "3b93f7070f6843f37e0cae255f7caff22b466a4017fd2020d7d3216237e5a701"
9
9
  },
10
10
  {
11
11
  "path": "README.md",
12
- "sha256": "e4d839c8ae59d86f2150bb632e0f8794688ccfa117974eb5f2605676912e7176"
13
- },
14
- {
15
- "path": "coverage/coverage-final.json",
16
- "sha256": "d2eef62228d4f2b31f5c7fca703f0f6844cf517d41be9dee516f3489f5babfec"
17
- },
18
- {
19
- "path": "coverage/coverage-summary.json",
20
- "sha256": "981eef381eb1e9a040a31eaa561ea078c6f6711d9908990e796d5213d6ffe89f"
12
+ "sha256": "696aae63a95e8f8726eecc1aa0e68f20d7980e99bb4008b22f2e1058ca67c6c0"
21
13
  },
22
14
  {
23
15
  "path": "dist/bin.d.ts",
@@ -41,19 +33,19 @@
41
33
  },
42
34
  {
43
35
  "path": "dist/cli.d.ts.map",
44
- "sha256": "bc71c42fc8804e71454efde34beee1e4aed2d074ee029edf08fbee3e76cc369a"
36
+ "sha256": "ea26d4cfd1265fc9f2397a17055580425ddf1ee312e0f28a06a214804a58906a"
45
37
  },
46
38
  {
47
39
  "path": "dist/cli.js",
48
- "sha256": "b269e0a6c84ff4069655ee9cd8d264c3be16a12f7de2b849e8d9065d0b6c44b3"
40
+ "sha256": "aa547fee89f14b634fb3b95f95ccbe1bfcc3f29a1c8f11b01a4ecc98ff3e736d"
49
41
  },
50
42
  {
51
43
  "path": "dist/cli.js.map",
52
- "sha256": "8ba4b1bc4d3cc767a686f54a63e38d247fe399ccdbc959951bc788cee52f1eef"
44
+ "sha256": "11c89da8d9b115a70397da792e9b2220e32936ecebcd2e26ab03963c14fc56d8"
53
45
  },
54
46
  {
55
47
  "path": "dist/core-compat.d.ts",
56
- "sha256": "a8a7f048200d1cde46e1c4b9a175734624f86b432e45db13ff69343ef41adee3"
48
+ "sha256": "b735a6c18bfbe5adf17bbcfe6e2eeae71477b877e958c36e0a5e73e59f100d6a"
57
49
  },
58
50
  {
59
51
  "path": "dist/core-compat.d.ts.map",
@@ -61,7 +53,7 @@
61
53
  },
62
54
  {
63
55
  "path": "dist/core-compat.js",
64
- "sha256": "817a16aafa21f9d592e1b74fbc7b393208aa6cbe7a1ce44059b3d57e4897ca48"
56
+ "sha256": "6d052e0a7352e9824bc1d4a319d03b42320f6551210f7dfd360afbdca4e556f0"
65
57
  },
66
58
  {
67
59
  "path": "dist/core-compat.js.map",
@@ -85,11 +77,15 @@
85
77
  },
86
78
  {
87
79
  "path": "keys/README.md",
88
- "sha256": "204deec657a7f147bf3016441082c2f868f6f11051776f4edc13ec6b44745192"
80
+ "sha256": "142fc5d0d59003476b8e7367d6fc21fe40ce9e0bf70159318a05abdb10502b8a"
81
+ },
82
+ {
83
+ "path": "keys/dz.pub",
84
+ "sha256": "353885160582f8e0cfb2a97ef9e51f77997f0120841f92a1ce50d202ebf5dd73"
89
85
  },
90
86
  {
91
87
  "path": "package.json",
92
- "sha256": "82ac146f7d849e1315dafc8ca4536e031d5c8104317da46ab8b52e543a187b17"
88
+ "sha256": "c8e09eb658132733bf3fbd6e4b54eaa0e8084264fddcd279e663e32809a9c485"
93
89
  },
94
90
  {
95
91
  "path": "src/bin.ts",
@@ -97,241 +93,17 @@
97
93
  },
98
94
  {
99
95
  "path": "src/cli.ts",
100
- "sha256": "44be85b04467075bf671bc58572bf294f402b43abc76e23354724a74ea2a6c27"
96
+ "sha256": "b4f400b3e08cb7bb6326f973ca09c87411dd942ae9c8cdcd9d2d27dc562dac1f"
101
97
  },
102
98
  {
103
99
  "path": "src/core-compat.ts",
104
- "sha256": "80b02871db06aa78df70cdc166e46a67fa9335da2f4956d6f937149b7ea69698"
100
+ "sha256": "5fef10b3d968d299eb7463157e8b164413872f7cc8bf5e9ca1c605e63569a9f7"
105
101
  },
106
102
  {
107
103
  "path": "src/index.ts",
108
104
  "sha256": "76c2dc1598e72d11df59319cc64fb2aa39b8c3af4eb3077f66598f4f2a3323c0"
109
- },
110
- {
111
- "path": "test/agents-sync.test.ts",
112
- "sha256": "32606890dc57d58257e6b4a38246acb343eea88b6e4b2f643f061325a34d066a"
113
- },
114
- {
115
- "path": "test/cli.test.ts",
116
- "sha256": "d9adcce84b509e00213bda59a0948eca90d83bdd2fdbbc86aee5ce11d9176940"
117
- },
118
- {
119
- "path": "test/command-count.test.ts",
120
- "sha256": "a637ef30d058fcd95dc18ef6eca45d6ac06e0f2bf54341a0aae68b610180b44d"
121
- },
122
- {
123
- "path": "test/core-compat-guard.test.ts",
124
- "sha256": "98086d0b6bd7ce32cc844e0cbbc710c4dbf009389c1d020aed48ced2de8acd57"
125
- },
126
- {
127
- "path": "test/core-compat.test.ts",
128
- "sha256": "c54d5aa80a2455a396b396ff9fc398c141c3be4ec9c830e0941f830658758866"
129
- },
130
- {
131
- "path": "test/core-import-floor.test.ts",
132
- "sha256": "948ce5017d7b512f7f32c817f8d1f5cbc5ede7d7c3f2788456ec5d24b8983f14"
133
- },
134
- {
135
- "path": "test/discrimination-check-cli.test.ts",
136
- "sha256": "d0ec5796bc526d45cdad9041ea7357afc065917b347cf5421ec7d2696106b08c"
137
- },
138
- {
139
- "path": "test/epoch-replay-cli.test.ts",
140
- "sha256": "a5a48585b565288ca1ea96030b02b2ccb37a621ef7b3cfe54cd7aaa7164d6904"
141
- },
142
- {
143
- "path": "test/fixtures/discrimination-check/fake-runner.sh",
144
- "sha256": "126bbd1ba9c08ef9de826cfa21df3981720e4bc36cd993dff28e0de435cbebae"
145
- },
146
- {
147
- "path": "test/fixtures/discrimination-check/fixture.py",
148
- "sha256": "bb413a8b6e9dc597eb298e7646fb84e23ccd3e117eb61201776ef3e9e27a0e0a"
149
- },
150
- {
151
- "path": "test/fixtures/install-layouts-helpers.ts",
152
- "sha256": "7c1d53c295ec4cb7ee8e3036b663f20d660a1acff35dbcb5c99257aed7268b68"
153
- },
154
- {
155
- "path": "test/fixtures/mutation-gate-undefended/lib/env-guard.js",
156
- "sha256": "922d75852ea37cfc0e0f81f0c49918e20950f4c31d9523798cbd5c7437fdffcc"
157
- },
158
- {
159
- "path": "test/fixtures/mutation-gate-undefended/lib/flaky-load.js",
160
- "sha256": "bb3cda584546c43f22ab46c1c6a27b563f7ede3ed4a66530b6b35ad9f7eefc9e"
161
- },
162
- {
163
- "path": "test/fixtures/mutation-gate-undefended/lib/guard.js",
164
- "sha256": "69182b5c1034eda2fcf072b87847dfd27c12ddf2621f62e8db94b78f55f797cd"
165
- },
166
- {
167
- "path": "test/fixtures/mutation-gate-undefended/lib/tla-mod.mjs",
168
- "sha256": "c0a147f7c2d599b360fa9d1bb72c01be3b6b0a7b167cb7d508340382b3d8d619"
169
- },
170
- {
171
- "path": "test/fixtures/mutation-gate-undefended/package.json",
172
- "sha256": "cdceb0264c7d99c89123365ddfdc2ceb07339c2691e5e604304ee04b433b1c0b"
173
- },
174
- {
175
- "path": "test/fixtures/mutation-gate-undefended/registry-defended.json",
176
- "sha256": "037bcac91dae0acbd8eb81dbb33b79fc7208f6106aed8149dbecdf226a8b0e41"
177
- },
178
- {
179
- "path": "test/fixtures/mutation-gate-undefended/registry-load-fatal-exit.json",
180
- "sha256": "ba5c79298f3f77b6a82c78b6a8da269a98b50aa811ab785ca4a588e1262ded82"
181
- },
182
- {
183
- "path": "test/fixtures/mutation-gate-undefended/registry-load-fatal-nullcount.json",
184
- "sha256": "2bc7bfa3dc56ae6cf0f7986ecccbbbcddbce128c018fbbf1ff40f5a061758da6"
185
- },
186
- {
187
- "path": "test/fixtures/mutation-gate-undefended/registry-load-fatal-throw.json",
188
- "sha256": "fb448430a632dbf4d751947363e862391fb869d5c65d1245c8ddc817c0844649"
189
- },
190
- {
191
- "path": "test/fixtures/mutation-gate-undefended/registry-overbroad.json",
192
- "sha256": "89c445656718c9ad6e573bf728b06d688a85b15a1e73a93cbd4e1579e33a54d9"
193
- },
194
- {
195
- "path": "test/fixtures/mutation-gate-undefended/registry-r6-env-inapplicable.json",
196
- "sha256": "626c3272dfc27ec87da5f60004611940b224d14c7acbc29466b65e6eab268ab3"
197
- },
198
- {
199
- "path": "test/fixtures/mutation-gate-undefended/registry-r6-flaky-load.json",
200
- "sha256": "cbec89506f2696c09cf5c4c3a987d6921fb8b4cacb131de04624fd47f2eef507"
201
- },
202
- {
203
- "path": "test/fixtures/mutation-gate-undefended/registry-r6-tla.json",
204
- "sha256": "353c1b84ad521c04764652464c3ef60c1bf54ffa161006108d1017d57b942dbe"
205
- },
206
- {
207
- "path": "test/fixtures/mutation-gate-undefended/registry-syntax-break.json",
208
- "sha256": "486d313922800edb75520cb2a79a83ce44ea5a7b12050286522ea979df150933"
209
- },
210
- {
211
- "path": "test/fixtures/mutation-gate-undefended/registry-undefended.json",
212
- "sha256": "9aef7b82a305d1ce17ce546c73ecb94ff0e8fb5f6006d450565fcd98cb5f895c"
213
- },
214
- {
215
- "path": "test/fixtures/mutation-gate-undefended/test/env-guard.test.js",
216
- "sha256": "406c387bc6fbe01fa1d4cd2a3754cbb22abcea6380c1471e9eff21ddc8d35424"
217
- },
218
- {
219
- "path": "test/fixtures/mutation-gate-undefended/test/flaky-load.test.js",
220
- "sha256": "7a9555312097c98cb5fccd749cb61ea216a2a3bf2845db5413153eed4b9c8251"
221
- },
222
- {
223
- "path": "test/fixtures/mutation-gate-undefended/test/guard.test.js",
224
- "sha256": "d8e0a34fc79f40c7f89b1987793a8e09570f2a92e9c0937dd9ac1bf4a3cfbcb7"
225
- },
226
- {
227
- "path": "test/fixtures/mutation-gate-undefended/test/tla-mod.test.mjs",
228
- "sha256": "860e54c8bf9c86e4c09853bb862379539d360b32ea6c4b93a69659ed4dc8fe9e"
229
- },
230
- {
231
- "path": "test/guard-change-fact.test.ts",
232
- "sha256": "694b79712dc8902fd9046426c35d21052dbeff417fffb70939f88b31449c6e9a"
233
- },
234
- {
235
- "path": "test/guard-promote-cli.test.ts",
236
- "sha256": "f8e35085106a98be239104394539c3aec350123eed4a115abf14acc2cb6b5bb9"
237
- },
238
- {
239
- "path": "test/install-layouts.test.ts",
240
- "sha256": "43cc6e3251500cd547997ac0916c250c8558f6c3d5c4a60254753e1e80ba24f5"
241
- },
242
- {
243
- "path": "test/install-sync-partial.test.ts",
244
- "sha256": "35824489662dbe9315d78cd20ecf968d416fbe80685d74b6588c8521a08497ea"
245
- },
246
- {
247
- "path": "test/list-partial.test.ts",
248
- "sha256": "fd98385a9b1021cf8341d154abcdf4506a84aaadddd465fcc7e057ba1927fe64"
249
- },
250
- {
251
- "path": "test/mutation-gate-cli.test.ts",
252
- "sha256": "3b33c786713e2dfaa192ea32df8cdcf534170c59d58ce285872a3fde008afbc4"
253
- },
254
- {
255
- "path": "test/mutation-registry.json",
256
- "sha256": "3e6f9bb105154121988da41568ff85573099235857ba25e76c4264c166b414ae"
257
- },
258
- {
259
- "path": "test/parallel-worktree-smoke.test.ts",
260
- "sha256": "0522b12ccdf3db79215c4c42162ef970f4cba0c0af96208426ca0323c367d0ee"
261
- },
262
- {
263
- "path": "test/plan-completeness-gate.test.ts",
264
- "sha256": "fafa2d1ff56bd41a6496b7ce569be671f2f617deac07425f47ad6e87b3ec00ce"
265
- },
266
- {
267
- "path": "test/qe-bridge-cli.test.ts",
268
- "sha256": "336ba7657c55f5b958a0ebed5617f3bc3b1956017b9389bbe7c38137889f8f1b"
269
- },
270
- {
271
- "path": "test/qe-bridge-manifest-drift.test.ts",
272
- "sha256": "b7b4d9e0c1dcee32e972aab97273b04bdde9634433e7c22345793a677dfff300"
273
- },
274
- {
275
- "path": "test/roam-nested-archive.test.ts",
276
- "sha256": "0c078b6e03cc749a64e0ac327885de1eea3c13e940c8e3f231174ab84076d44c"
277
- },
278
- {
279
- "path": "test/skills-verify-static-advisories.test.ts",
280
- "sha256": "b1140c20ec04d1c8ae67f97a42dbcece1e8e63c98a5de2c087f0359d27c25f17"
281
- },
282
- {
283
- "path": "test/statusline-panel.test.ts",
284
- "sha256": "b09b42c4ece1a83e5d3f3765629b0756a8f30a7122f3fc30363f93f092a44c0d"
285
- },
286
- {
287
- "path": "test/target-alias-cli.test.ts",
288
- "sha256": "96df42acb1cc5ada5ca97912d3b7da5b486067e851b9dd395855b1b540ce738c"
289
- },
290
- {
291
- "path": "test/trace-bundle-cli.test.ts",
292
- "sha256": "fdaad63359ca7ce351e505e613b547bbc653e0847403edfae88d22a8a524b7a0"
293
- },
294
- {
295
- "path": "test/version-flag.test.ts",
296
- "sha256": "7acd80deb073fb2987c6d14a028a64c6d44324ac61a05410b7d4b6c87ff5acc6"
297
- },
298
- {
299
- "path": "test/workflow-init-lint-clean.test.ts",
300
- "sha256": "b7a64462983901adca86ecc29e76b3f95885210e5aaba68352356191e6bfac7f"
301
- },
302
- {
303
- "path": "test/workflow-legacy-shim.test.ts",
304
- "sha256": "47d35ec36aa4793ee5d61debf1d345e7d236ad21db27f052aa3e7add03852205"
305
- },
306
- {
307
- "path": "test/workflow-run-cli.test.ts",
308
- "sha256": "ac0468d8e97795602e8b8298f278356a273309674483854cd136b99ddf6e39d4"
309
- },
310
- {
311
- "path": "test/workflow-run-r2.test.ts",
312
- "sha256": "d7f308ac9538b7e9d7dc8dcd0ce7cf8127f26b5aea1f44e9d44ac1500ad733fb"
313
- },
314
- {
315
- "path": "test/workflow-run-read-plane.test.ts",
316
- "sha256": "c56111e578500d690190f9fdb4ec44182a892c7a6c2c289896509c1229d7b06d"
317
- },
318
- {
319
- "path": "test/workflow-trace-attestation-cli.test.ts",
320
- "sha256": "dad2efd147d9186b29989ef36f6e62614c4ded983d7894a7c1f9b1628e621871"
321
- },
322
- {
323
- "path": "test/workflow-trace-cli-surface.test.ts",
324
- "sha256": "28df4b51fff1dc80bb38671d56f548d859949d7a9e2f00e7045e732efc7c2e3d"
325
- },
326
- {
327
- "path": "tsconfig.json",
328
- "sha256": "e80ef2911c3347a713dc3dca6a5f6034d91e938e58e71345ea920dd9833bcdbb"
329
- },
330
- {
331
- "path": "vitest.config.ts",
332
- "sha256": "a6ffc6172b50a3a59010f8f8c66e2204e7d298b62a7f2bc5de33cbf39c99899d"
333
105
  }
334
106
  ]
335
107
  },
336
- "signature": "M4tCszFw3PbwC+QugRixQ3UqQH2YccEO9wMHSjJl8I5GSXRVnP4viiaUT7tSAvuxH+/8RBKDzSA/52R2KEbiDQ=="
108
+ "signature": "6slAUaHVCFomW71+HoDnzbfXrn7eVpZJO/7YI3eqt3cZN1KwhrUZ6gzZC0KVtbNuqZytp+Z+wgS2pTjFVbASAA=="
337
109
  }
package/README.md CHANGED
@@ -1763,9 +1763,9 @@ runs a command that MEASURES the declared artifacts itself. It refuses a null re
1763
1763
  never recorded as done), an absent or partially-present artifact set, and a stage that declares nothing
1764
1764
  to witness — so a stage that did not happen can no longer be recorded, which the old mechanism allowed.
1765
1765
 
1766
- ## All Commands (70)
1766
+ ## All Commands (72)
1767
1767
 
1768
- *(70 MEASURED — reproducer: `grep -c "^ case '" src/cli.ts`, the dispatch cases.)*
1768
+ *(72 MEASURED — reproducer: `grep -c "^ case '" src/cli.ts`, the dispatch cases.)*
1769
1769
 
1770
1770
  ```
1771
1771
  dz setup --target <name> [--preset <name>] [--select id,id,...] [--skills-dir <dir>] [--memory agentdb] [--no-memory] [--no-hooks] [--install-driver] [--force]
@@ -1821,6 +1821,8 @@ dz challenge --plan <plan.md> [--json] [--context-only] [--author <model>] # a
1821
1821
  dz routing [--stage <s>] [--json] # inspect the learned cost-optimal routing store: what `args.models.<stage>='auto-cost'` believes per (stage, complexity-tier, model) — gated attempts/successes/rate (feeds feature-adr model selection)
1822
1822
  dz bto-optimize --split|--plan|--select|--scope-check|--diff [--json] # deterministic engine behind /bto-optimize: hold-out split + hard-capped budget + no-regress-on-holdout winner selection (defeats judge-gaming); prose-only, diff-confirmed, never auto-writes
1823
1823
  dz discrimination-check --test <f[,f]> [--base <ref>] [--name <filter>] [--runner <cmd>] [--timeout <ms>] [--json] # §42 test-discrimination gate for feature-adr Step-8: run the ADR's property test in an isolated git worktree at pre-feature base — it MUST go red without the fix. SEVEN verdicts, each gated on EXECUTION evidence: DISCRIMINATES · DISCRIMINATES_VIA_ERROR · NON_DISCRIMINATING (false green) · TEST_FILE_ABSENT · LOAD_ERROR_AT_BOTH_REVS · FAILS_AT_TIP · CANNOT_ISOLATE (+ typed reason). Advisory, never auto-aborts
1824
+ dz amendment-check --slug <slug> | --feature-dir <dir> | --all [--json] (every AM-N amendment row must resolve to a test found INSIDE the file the row names; the PLAN is authoritative when it carries rows, and an ideation amendment the plan drops is a failure; --all is a census that always exits 0; exit 0 pass/skip, 1 fail, 3 NOT-ESTABLISHED — a section that parsed ZERO rows is never a pass)
1825
+ dz feature-adr-record --kind ledger|training-pair --stage <s> [--slug <s>] [--row|--pair <json>] [--mark <n>] [--once] [--json] (the witnessed writer: payload as an ARGUMENT never as shell, refused before any write, timestamp stamped before serialising, append verified by re-reading the tail; exit 0 written|duplicate|skipped, 2 refused, 3 not-verified, never blocking)
1824
1826
  dz mutation-gate [--package <dir>] [--registry <file>] [--test-cmd "<cmd>"] [--only <id[,id]>] [--timeout <ms>] [--rebaseline per-entry|final] [--keep-scratch] [--json] # the mutation gate: for each NAMED protection in a declarative registry, copy the package to a scratch dir (shadow-repo layout, node_modules symlinked, git-initialized), verify the baseline is green, apply the entry's exact {find, replace} mutation, run the suite, REQUIRE red, restore — and require the red to be ATTRIBUTABLE to the protection: a mutated file that no longer parses is MUTATION_UNPARSEABLE, a failing count far above the entry's bound (maxFailing, default from observed) is OVER_FAILING, and a restored tree that does not reproduce green makes the entry INCONCLUSIVE (flaky suite). A mutation that does not apply, a green suite, or an inconclusive run is a FAILURE — never a skip. exit 0 all proven / 1 gate failed / 2 setup error
1825
1827
  dz delivery-check --slug <slug> [--context-only] [--findings <f.json>] [--strict] [--author <model>] [--json] # portable Step-10 Delivery Gate: the `manual` form that travels to every shell target — prints the 4-plane review brief (regressions ‖ security ‖ code-quality ‖ product-honesty) + artifact probes; --findings classifies a fed-back review into a fail-closed ready|blocked hand-off (only cross-validated BLOCKER/HIGH count) and writes features/<slug>/10_delivery_review.md; --strict exits 1 on blocked
1826
1828
  dz skills-verify [--dir <project>] [--expect a,b] [--static] [--strict] [--timeout <s>] [--json] # does .claude/skills/ actually REGISTER? --static = instant layout scan (CI-safe, no session): flags dirs that can never register; default also starts a real session and reads the authoritative system/init listing. exit 0 pass / 1 fail / 2 inconclusive — an unobservable registration is NEVER a pass
@@ -3297,7 +3299,7 @@ invariants: HARD rules **block** the operation, SOFT rules warn. Zero config nee
3297
3299
  cover the known rakes; `.dz/guard.json` (via `dz guard --init`) exists only if you want to tune a severity
3298
3300
  or disable a rule.
3299
3301
  ```bash
3300
- dz guard check --op publish # no-workspace-star · no-skill-drift · no-secrets · readme-consistency · readme-first · skills-registrable · lockfile-in-sync · no-stubs · licence-hold
3302
+ dz guard check --op publish # no-workspace-star · no-skill-drift · no-secrets · readme-consistency · readme-first · skills-registrable · lockfile-in-sync · no-stubs · review-round · licence-hold
3301
3303
  dz guard check --op teach --text "the fix: export sk-abc..." # → BLOCK (exit 1): looks like a credential
3302
3304
  dz guard log # append-only audit: every verdict + every forced override
3303
3305
  ```
@@ -3332,6 +3334,27 @@ zero specifiers, and then report every real dependency as "not recorded". The ru
3332
3334
  `.dz/guard.json` cannot promote it to HARD, since a parser designed to admit "I may not understand this
3333
3335
  file" must never be able to block a publish.
3334
3336
 
3337
+ **`review-round` (HARD, publish)** — a package that bumps its version AND changes source must bring a
3338
+ GRADED `features/*/08_qe_report.md` in the same change. The gate had eleven rules and not one asked
3339
+ whether anyone but the author had read the code; the cost is on the record (health-advisor slice H:
3340
+ five rounds graded F, thirteen packages published on the author's own verification, and round six
3341
+ found six defects in already-published code).
3342
+
3343
+ Scoped to SOURCE on purpose: a HARD rule that also blocked a docs-only republish is a rule someone
3344
+ switches off. The floor defaults to PRESENCE of a grade — `.dz/guard.json` → `reviewRound.minGrade`
3345
+ sets a letter when you want one.
3346
+
3347
+ It proves a graded report EXISTS in this change. It does **not** prove the review was independent,
3348
+ was competent, covered THIS package, or was taken against this revision — the violation text says all
3349
+ four. And like every change-scoped rule here it reads the WORKING TREE, so it is silent once the
3350
+ change is committed.
3351
+
3352
+ ```
3353
+ [BLOCK] review-round: @dzhechkov/memory: source changed and the version is bumped, but this change
3354
+ brings no GRADED features/*/08_qe_report.md — a publish gate that cannot tell "reviewed" from
3355
+ "not reviewed" treats them alike.
3356
+ ```
3357
+
3335
3358
  **`licence-hold` (HARD, publish)** — the machine side of a licence precondition (ADR-001 of feature
3336
3359
  `hermes-claude-adaptation`, first holder: `@dzhechkov/cloudru-hub`). A pack that declares
3337
3360
  `package.json.licenseHold` is parked behind two belts: while it stays `private:true` the npm layer
@@ -3742,12 +3765,19 @@ dz setup --target claude-code --memory agentdb # enables the vector tier (agen
3742
3765
  dz teach "Used DataLoader to batch DB round-trips" --reward 0.9 --domain performance
3743
3766
  # ↳ mirrored to vector tier (agentdb) # best-effort, AFTER the lexical write
3744
3767
  dz recall "fix N+1 queries" # hybrid: FTS5 + vector (RRF-merged), ⟨both⟩/⟨vector⟩ labels
3745
- dz recall "fix N+1 queries" --semantic # weight the vector leg 2×; exit 1 if no engine (explicit ask)
3768
+ dz recall "fix N+1 queries" --semantic # weight the vector leg 2×; exit 1 if no engine OR nothing ranked (explicit ask)
3746
3769
  dz recall "fix N+1 queries" --no-semantic # force today's pure-lexical ranking
3747
- dz vector status # engine, mirrored vs lexical counts, pending queue
3770
+ dz vector status # engine, writer state, mirrored / pending / not-in-the-mirror
3771
+ dz recall "fix N+1 queries" --json # every hit carries `relevance` — the RRF score it ranked by
3748
3772
  dz consolidate # also BACKFILLS the mirror (heals failed/queued mirrors)
3749
3773
  ```
3750
3774
 
3775
+ - **The TOP lexical match is never displaced by `--semantic`.** It keeps a reserved seat, so a rare identifier, a file name or an error code still surfaces when you weight the vector leg (MEASURED on a live store: survival 2 of 5 → 5 of 5). The seat is taken only under `--semantic`, and never from a hit BOTH legs found. Ties break by evidence — a hit both legs found outranks one only a single leg found.
3776
+ - **Every claim the output makes follows what the run did.** The header says `+ vector (…)` only when a vector actually ranked something; with an empty tier it says `FTS5 only (semantic tier empty — run: dz vector reindex)` instead of promising a ranking that did not happen, and the `dz setup --memory agentdb` hint no longer fires at a tier that is already installed.
3777
+ - **`dz vector status` counts like with like.** `Mirrored vectors (learned patterns)` covers exactly the scope the lexical count covers; vectors of other dz-owned task types (backlog ideas) are reported on their own line, and a true orphan — a pattern vector whose record is gone — is named for the first time. The old single number counted three task types while sitting under a one-task-type lexical count: on this repository it read 547 against 274, which looks like half the index orphaned, and 273 of those were backlog ideas with ZERO real orphans.
3778
+ - **`dz vector status` distinguishes three states, not two:** `Mirror writer: ON/OFF` (whether teach is queueing at all) and `Not in the mirror: N` — mirrorable patterns in neither the mirror nor the pending queue, counted as a SET DIFFERENCE over ids. `Pending mirror queue: 0` no longer stands alone for "no debt": it used to read the same whether the queue was empty or had never been opened.
3779
+ - **`dz teach --from-json` says so when the mirror writer is off** — carrying a brain to a new machine used to land a fully unindexed store that reported zero debt.
3780
+
3751
3781
  - **Optional by design:** no engine installed ⇒ `teach`/`recall`/`consolidate` behave byte-identically to the pre-vector versions; every engine call is time-bounded and failures degrade to lexical with one honest ℹ line.
3752
3782
  - **The lexical store stays the source of truth** — vector hits are pointers; a pattern pruned from the store can never "resurrect" via the mirror.
3753
3783
  - **Two portable forms:** `dz recall --all --json` = the SHARING form (patterns themselves, re-import with `dz teach --from-json`); `dz vector export <path>` = the VECTOR form (a portable `.rvf` checkpoint, opt-in `@ruvector/rvf` engine via `.dz/config.json` → `memory.vector.engine: "rvf"`).
@@ -4021,7 +4051,25 @@ npx @dzhechkov/p-replicator init
4021
4051
 
4022
4052
  ## Status
4023
4053
 
4024
- `v0.6.0` — adds `dz feature-adr-checkpoint`, which writes the pipeline's durable checkpoint line as a
4054
+ `v0.7.0` — `dz recall` and `dz vector status` now say what the RUN did rather than what the config
4055
+ allows. **One breaking change for scripts:** `dz recall --semantic` exits **1** when no vector could
4056
+ serve it — the code the README already documented for the sibling "no engine" case, now applied on
4057
+ every return path including `--json`, which used to report success. Also: the top lexical match keeps
4058
+ its place under `--semantic`; `--json` carries a `relevance` field and parses whole even while the
4059
+ embedder loads; the header names the empty-tier state instead of promising a ranking that did not
4060
+ happen; `dz vector status` counts like with like and distinguishes "not queued" from "queued and
4061
+ failed"; and a `--books` search that finds nothing says where it looked and, when the machine-wide
4062
+ brain holds sources, names the command that searches them.
4063
+
4064
+ `v0.6.1` — two commands that move checks off the model's judgement and onto the disk.
4065
+ `dz amendment-check` resolves every `AM-N` amendment row to a test found INSIDE the file the row names
4066
+ (the plan is authoritative; an amendment it drops or rewords under the same id is a failure; `--all` is
4067
+ a census that never blocks). `dz feature-adr-record` is the witnessed writer for the run-cost ledger
4068
+ and training pairs: the payload arrives as an ARGUMENT rather than baked into a shell pipeline, a
4069
+ malformed or wrong-kind payload is refused before any write, the timestamp is stamped before
4070
+ serialising, and the append is verified by re-reading the tail. `MIN_CORE` moves to `0.6.1`.
4071
+
4072
+ **v0.6.0** — adds `dz feature-adr-checkpoint`, which writes the pipeline's durable checkpoint line as a
4025
4073
  COMMAND instead of leaving a subagent to hand-write state into a file: a security classifier blocked
4026
4074
  NINE consecutive hand-written checkpoint writes in one run, `.fa-state/checkpoints.jsonl` was never
4027
4075
  created, resume was silently dead, and the run still reported success. The command measures every
package/dist/cli.d.ts CHANGED
@@ -52,6 +52,15 @@ export type ReleaseExecRunner = (cmd: string, opts: {
52
52
  stderr: string;
53
53
  timedOut?: boolean;
54
54
  };
55
+ /**
56
+ * Run `fn` with anything written to STDOUT by code we do not own routed to STDERR instead.
57
+ *
58
+ * Used to keep `--json` output parseable: a dependency that greets stdout on first load (currently
59
+ * transformers.js) would otherwise sit in front of the JSON array. Nothing is swallowed — the text
60
+ * still reaches the terminal, on the stream diagnostics belong on. Restoration is in `finally`, so a
61
+ * throwing `fn` cannot leave stdout redirected.
62
+ */
63
+ export declare function withForeignStdoutOnStderr<T>(fn: () => Promise<T>): Promise<T>;
55
64
  export interface CodexHooksSyncInput {
56
65
  readonly codexHome?: string | undefined;
57
66
  readonly project?: string | undefined;
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAA0B,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKtF,OAAO,EA2CL,iBAAiB,EAmBjB,KAAK,oBAAoB,EA6SzB,KAAK,YAAY,EAyBlB,MAAM,yBAAyB,CAAC;AAsIjC,2EAA2E;AAC3E,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAC3C;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACjE;AAED,yFAAyF;AACzF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QA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