@dzhechkov/harness-cli 0.4.1 → 0.4.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/.dz-manifest.json +13 -9
- package/README.md +33 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +19 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/sbom.json +18 -8
- package/src/cli.ts +19 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dzhechkov/harness-cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "The dz CLI — install AI skills for Claude Code, Codex, OpenCode, Hermes, OpenClaude, GitHub Copilot. 35 commands, 13 presets, 6 platform targets.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/sbom.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"hashes": [
|
|
26
26
|
{
|
|
27
27
|
"alg": "SHA-256",
|
|
28
|
-
"content": "
|
|
28
|
+
"content": "4e4049b871ded58ff38fc36b60387a2324610db81dedcb623fb9cce6e77b057b"
|
|
29
29
|
}
|
|
30
30
|
]
|
|
31
31
|
},
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"hashes": [
|
|
96
96
|
{
|
|
97
97
|
"alg": "SHA-256",
|
|
98
|
-
"content": "
|
|
98
|
+
"content": "a260f0e8d698ac142b38e33ef4d4ed0a21ccee96b179514bcb01bf81c5dce00f"
|
|
99
99
|
}
|
|
100
100
|
]
|
|
101
101
|
},
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"hashes": [
|
|
106
106
|
{
|
|
107
107
|
"alg": "SHA-256",
|
|
108
|
-
"content": "
|
|
108
|
+
"content": "b8a9c6d50cea7eda1065d76adb83e7c853ed9d82db72e7b24f952598e9dbd9d9"
|
|
109
109
|
}
|
|
110
110
|
]
|
|
111
111
|
},
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"hashes": [
|
|
116
116
|
{
|
|
117
117
|
"alg": "SHA-256",
|
|
118
|
-
"content": "
|
|
118
|
+
"content": "4af214e9233bd8f37ab92b95b90fcf05bd46752ecdc0d9491484ee8a7e55c539"
|
|
119
119
|
}
|
|
120
120
|
]
|
|
121
121
|
},
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"hashes": [
|
|
176
176
|
{
|
|
177
177
|
"alg": "SHA-256",
|
|
178
|
-
"content": "
|
|
178
|
+
"content": "fa591b644f5abda81022a2cfe37996d739a2290ac46e09dcb958faa4e12be9f6"
|
|
179
179
|
}
|
|
180
180
|
]
|
|
181
181
|
},
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"hashes": [
|
|
196
196
|
{
|
|
197
197
|
"alg": "SHA-256",
|
|
198
|
-
"content": "
|
|
198
|
+
"content": "c9847974744f5bfd383866eb1832e97cb856e73d6f65cad19abfb91f22998cae"
|
|
199
199
|
}
|
|
200
200
|
]
|
|
201
201
|
},
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
"hashes": [
|
|
216
216
|
{
|
|
217
217
|
"alg": "SHA-256",
|
|
218
|
-
"content": "
|
|
218
|
+
"content": "c66bdd2fbbe2e0b622e3bc4e0e4521e865cc8088e581bd4b4862c1c550307900"
|
|
219
219
|
}
|
|
220
220
|
]
|
|
221
221
|
},
|
|
@@ -475,7 +475,17 @@
|
|
|
475
475
|
"hashes": [
|
|
476
476
|
{
|
|
477
477
|
"alg": "SHA-256",
|
|
478
|
-
"content": "
|
|
478
|
+
"content": "3dd056f9d05712e45173b0911fc5900f0f52f8deba506d57c0e2b8281eb36a74"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"type": "file",
|
|
484
|
+
"name": "test/statusline-panel.test.ts",
|
|
485
|
+
"hashes": [
|
|
486
|
+
{
|
|
487
|
+
"alg": "SHA-256",
|
|
488
|
+
"content": "b09b42c4ece1a83e5d3f3765629b0756a8f30a7122f3fc30363f93f092a44c0d"
|
|
479
489
|
}
|
|
480
490
|
]
|
|
481
491
|
},
|
package/src/cli.ts
CHANGED
|
@@ -406,7 +406,7 @@ Usage:
|
|
|
406
406
|
dz brain expand <kuId> [--source <slug>] [--json] (full-content lookup for a citation kuId; --json emits the full KU object)
|
|
407
407
|
dz brain init [--project <dir>] [--k <N>] (wire the grounding hook into .claude/settings.json — opt-in)
|
|
408
408
|
dz statusline [--json] [--install] [--project <dir>] (live self-learning panel for Claude Code's status bar; reads the CC JSON payload from STDIN)
|
|
409
|
-
dz statusline --fa-record --slug <s> --step "<label>" [--recalled <n>] [--stored <n>] [--mode <m>] (feature-adr: record live per-run learning state → 📐 panel segment)
|
|
409
|
+
dz statusline --fa-record --slug <s> --step "<label>" [--kind <feature-adr|loop>] [--recalled <n>] [--stored <n>] [--mode <m>] (feature-adr: record live per-run learning state → 📐 panel segment)
|
|
410
410
|
dz usage [--json] [--project <dir>] | dz usage --calibrate --session <pct> --weekly <pct> [--model fable=<pct>] [--project <dir>] (ESTIMATE Claude usage from fixed reset windows; optional per-model weekly binding; exit 0 ALWAYS; pct=null when limits unconfigured)
|
|
411
411
|
dz usage --by-stage [--run <runId> | --slug <slug>] [--epsilon <0..1>] [--write <file.jsonl>] [--json] (per-stage cost ledger for ONE feature-adr run + the reconciliation invariant: accounted + unaccounted = run total; verdict BALANCED | DEFECT | INSUFFICIENT_DATA; local transcript ESTIMATES — catches ATTRIBUTION errors, not pricing errors)
|
|
412
412
|
dz claim-check [paths...] [--json] [--fail-on high|medium|none] [--project <dir>] (enforce the Integrity Rule: flag untagged/overstated accuracy claims; default scan = root README.md + every discovered package's README.md + features/*/08_qe_report.md + docs/**/*.md (historical feature artifacts are NOT scanned — pass paths explicitly); exit 1 only at/above --fail-on, default high)
|
|
@@ -1621,11 +1621,13 @@ function cmdStatuslineInstall(options: Map<string, string>, cwd: string, write:
|
|
|
1621
1621
|
/**
|
|
1622
1622
|
* `dz statusline --fa-record` — the entry point the `/feature-adr` pipeline calls at Steps 0/8/9 to
|
|
1623
1623
|
* record its LIVE learning state (Pattern memory loop: pool / recalled / stored). Unlike the render
|
|
1624
|
-
* path this WRITES `.dz/feature-adr/learning-state
|
|
1625
|
-
* `writeFeatureAdrState`, which itself computes `pool` from the learned-pattern count).
|
|
1624
|
+
* path this WRITES a per-slug `.dz/feature-adr/learning-state/*.json` slot (via harness-core's
|
|
1625
|
+
* best-effort `writeFeatureAdrState`, which itself computes `pool` from the learned-pattern count).
|
|
1626
1626
|
*
|
|
1627
1627
|
* GUARD (feature-adr flag discipline): `--slug` and `--step` are required; a missing one exits 1
|
|
1628
1628
|
* with a copy-paste example. `--recalled`/`--stored` default to 0 and reject non-numeric input.
|
|
1629
|
+
* `--kind <feature-adr|loop>` identifies the producer, defaults to `feature-adr`, and rejects any
|
|
1630
|
+
* other value rather than silently weakening panel arbitration.
|
|
1629
1631
|
*/
|
|
1630
1632
|
function cmdStatuslineFaRecord(options: Map<string, string>, cwd: string, write: Write): number {
|
|
1631
1633
|
const slug = (options.get('slug') ?? '').trim();
|
|
@@ -1655,10 +1657,17 @@ function cmdStatuslineFaRecord(options: Map<string, string>, cwd: string, write:
|
|
|
1655
1657
|
const reinforced = parseCount('reinforced');
|
|
1656
1658
|
if (reinforced === undefined) return 1;
|
|
1657
1659
|
|
|
1660
|
+
const kindRaw = options.get('kind') ?? 'feature-adr';
|
|
1661
|
+
if (kindRaw !== 'feature-adr' && kindRaw !== 'loop') {
|
|
1662
|
+
write(`dz statusline --fa-record: --kind must be feature-adr or loop (got "${kindRaw}")`);
|
|
1663
|
+
write(' Example: dz statusline --fa-record --slug add-user-auth --step "Step 0" --kind feature-adr --recalled 5 --stored 2');
|
|
1664
|
+
return 1;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1658
1667
|
const mode = options.get('mode');
|
|
1659
1668
|
const projectRoot = resolve(cwd, options.get('project') ?? '.');
|
|
1660
1669
|
const state = writeFeatureAdrState(projectRoot, {
|
|
1661
|
-
slug, step, recalled, stored,
|
|
1670
|
+
kind: kindRaw, slug, step, recalled, stored,
|
|
1662
1671
|
...(reinforced > 0 ? { reinforced } : {}),
|
|
1663
1672
|
...(mode !== undefined && mode.trim() !== '' ? { mode: mode.trim() } : {}),
|
|
1664
1673
|
});
|
|
@@ -1709,7 +1718,12 @@ function cmdStatusline(
|
|
|
1709
1718
|
// Live /feature-adr run in flight → PREPEND the pipeline learning segment to the base dz line.
|
|
1710
1719
|
const fa = data.featureAdr;
|
|
1711
1720
|
if (fa !== undefined) {
|
|
1712
|
-
|
|
1721
|
+
// The producer marker reached data and arbitration in a previous round but not this label, so the bar asserted a pipeline that was not running.
|
|
1722
|
+
if (fa.kind === 'loop') {
|
|
1723
|
+
line = `🔁 loop ${fa.step} · ${line}`;
|
|
1724
|
+
} else {
|
|
1725
|
+
line = `📐 feature-adr ${fa.step} · 🎓 ${fa.pool} pool · ↑${fa.recalled} used · +${fa.stored} new · ↻${fa.reinforced ?? 0} reinforced · ${line}`;
|
|
1726
|
+
}
|
|
1713
1727
|
}
|
|
1714
1728
|
|
|
1715
1729
|
write(line);
|