@dzhechkov/harness-cli 0.3.234 → 0.3.236
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 +8 -40
- package/README.md +34 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +96 -1
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
- package/sbom.json +7 -87
- package/src/cli.ts +108 -0
package/.dz-manifest.json
CHANGED
|
@@ -3,45 +3,13 @@
|
|
|
3
3
|
"version": 1,
|
|
4
4
|
"pack": "harness-cli",
|
|
5
5
|
"files": [
|
|
6
|
-
{
|
|
7
|
-
"path": ".agentic-qe/brain.rvf",
|
|
8
|
-
"sha256": "8136cd4cc145d3dbe6ed3ae4489946bbc26e3e44172f0e5241ac45dde38bfead"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"path": ".agentic-qe/brain.rvf.lock",
|
|
12
|
-
"sha256": "96c3f61d34c63a8adf2a87cd10abc73b09946223798a543d2c477f6486ceba2b"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"path": ".agentic-qe/memory.db",
|
|
16
|
-
"sha256": "456372cb9a8c12f98ae6378338b8469d9be6df05cbe03a99b412d83d962b3d11"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"path": ".agentic-qe/memory.db-shm",
|
|
20
|
-
"sha256": "613a87ec0ce8a7cc48d1b6939999ac623c144ff5718f04b40b9d26519f517af2"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"path": ".agentic-qe/memory.db-wal",
|
|
24
|
-
"sha256": "8b037ea49fcdf20ebbe02798aaa6b5cdddd5cadd1f7239c629650093afd5ac2f"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"path": ".agentic-qe/patterns.rvf",
|
|
28
|
-
"sha256": "9090b2e6d339eaa183672ac0cf9f625dbd5f9fc76d64afcdb34a3f5871c31c5a"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"path": ".agentic-qe/patterns.rvf.idmap.json",
|
|
32
|
-
"sha256": "c2693f9a7f47a2d2bffe3004188e70ce08411bf8db47d07c60551d18ff7640c4"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"path": ".agentic-qe/patterns.rvf.lock",
|
|
36
|
-
"sha256": "ad77ee665c75491a8700381fb79205d308653e99a15013564c7732eeb6aa1181"
|
|
37
|
-
},
|
|
38
6
|
{
|
|
39
7
|
"path": "CHANGELOG.md",
|
|
40
8
|
"sha256": "9555ead768fef7963e735b0c6af21a64412811531534108be3df61bc65b51021"
|
|
41
9
|
},
|
|
42
10
|
{
|
|
43
11
|
"path": "README.md",
|
|
44
|
-
"sha256": "
|
|
12
|
+
"sha256": "1e36d7e9e6022d412c030975ec686b1ab91c61c64c807ef2e9ff3fa75ac8917c"
|
|
45
13
|
},
|
|
46
14
|
{
|
|
47
15
|
"path": "coverage/coverage-final.json",
|
|
@@ -73,15 +41,15 @@
|
|
|
73
41
|
},
|
|
74
42
|
{
|
|
75
43
|
"path": "dist/cli.d.ts.map",
|
|
76
|
-
"sha256": "
|
|
44
|
+
"sha256": "8a00bf14c3fdd437b7e482da8c4018366041755714ed1791b1c523f9dee5de6c"
|
|
77
45
|
},
|
|
78
46
|
{
|
|
79
47
|
"path": "dist/cli.js",
|
|
80
|
-
"sha256": "
|
|
48
|
+
"sha256": "dea4446db1109285c1fc5f5283d7263462cb446f12b0d9b1e1e821374d0ca57d"
|
|
81
49
|
},
|
|
82
50
|
{
|
|
83
51
|
"path": "dist/cli.js.map",
|
|
84
|
-
"sha256": "
|
|
52
|
+
"sha256": "a253625c94835ef94bbd141b1dd759578433423bd098314fd977c515f140dafe"
|
|
85
53
|
},
|
|
86
54
|
{
|
|
87
55
|
"path": "dist/index.d.ts",
|
|
@@ -105,7 +73,7 @@
|
|
|
105
73
|
},
|
|
106
74
|
{
|
|
107
75
|
"path": "package.json",
|
|
108
|
-
"sha256": "
|
|
76
|
+
"sha256": "543319797d47d599a646c7d695f82aa31491ffd97579edd691b6a9cb99af76ef"
|
|
109
77
|
},
|
|
110
78
|
{
|
|
111
79
|
"path": "src/bin.ts",
|
|
@@ -113,7 +81,7 @@
|
|
|
113
81
|
},
|
|
114
82
|
{
|
|
115
83
|
"path": "src/cli.ts",
|
|
116
|
-
"sha256": "
|
|
84
|
+
"sha256": "c5d4902f9b0c4133318b15e757d07856872177dc92752d5996440524342b7f88"
|
|
117
85
|
},
|
|
118
86
|
{
|
|
119
87
|
"path": "src/index.ts",
|
|
@@ -121,7 +89,7 @@
|
|
|
121
89
|
},
|
|
122
90
|
{
|
|
123
91
|
"path": "test/cli.test.ts",
|
|
124
|
-
"sha256": "
|
|
92
|
+
"sha256": "0538f3cfd8eb880305c08fef05a78601263003c54a6f1b44f97cd7ebd7bd37f9"
|
|
125
93
|
},
|
|
126
94
|
{
|
|
127
95
|
"path": "tsconfig.json",
|
|
@@ -133,5 +101,5 @@
|
|
|
133
101
|
}
|
|
134
102
|
]
|
|
135
103
|
},
|
|
136
|
-
"signature": "
|
|
104
|
+
"signature": "0IDcNO+8RqyABrL7YXlDBQLCTiNktCk/Ktd724vSyxsJ0/rti05jjEudABZo3+ILMok7jLgQs/YRalC77RdOCA=="
|
|
137
105
|
}
|
package/README.md
CHANGED
|
@@ -372,6 +372,33 @@ the release job gets a perfectly attested malicious package.
|
|
|
372
372
|
A ready-to-install workflow is at `features/publish-provenance/07_code_changes/publish.yml`; copy it to
|
|
373
373
|
`.github/workflows/` and add an `NPM_TOKEN` secret.
|
|
374
374
|
|
|
375
|
+
### Target parity — `dz parity` (the honest feature × target map)
|
|
376
|
+
|
|
377
|
+
The harness runs on 10 targets, but not every feature runs everywhere: hooks, MCP (Model Context
|
|
378
|
+
Protocol) and the Workflow runtime exist only on some platforms. `dz parity` answers "what do I
|
|
379
|
+
actually get on X?" from a COMPUTED capability model — the matrix is never hand-written (a
|
|
380
|
+
hand-maintained table is a drift surface; the model lives next to the code, under tests that
|
|
381
|
+
refuse an unclassified 11th target).
|
|
382
|
+
|
|
383
|
+
```bash
|
|
384
|
+
dz parity # the full grid: ✓ full / ◐ manual (via which form) / — absent
|
|
385
|
+
dz parity --target codex # one target in detail: what works, THROUGH what
|
|
386
|
+
dz parity --json # machine contract (targets, capabilities, per-cell level + via)
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
Example (real output, trimmed):
|
|
390
|
+
|
|
391
|
+
```
|
|
392
|
+
dz parity — codex (capabilities: shell, skills, mcp)
|
|
393
|
+
✓ dz CLI (all commands) via shell command
|
|
394
|
+
◐ feature-adr pipeline via interactive skill (plain /feature-adr)
|
|
395
|
+
— Step-10 Delivery Gate not available on this target
|
|
396
|
+
◐ Integrity claim-check via dz claim-check (CLI) + publish gate
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**When to use:** before promising a workflow to a teammate on Cursor/Codex/Hermes; when choosing
|
|
400
|
+
a target for a project; as the requirements input for porting a feature to more targets.
|
|
401
|
+
|
|
375
402
|
### Verified release — `dz release` (4 HARD gates in front of `dz publish`)
|
|
376
403
|
|
|
377
404
|
`dz publish` gates on guard / claim-check / signatures / provenance / files-whitelist — none of which
|
|
@@ -481,7 +508,7 @@ Get the whole set with `dz init --target claude-code --preset meta`, or pick one
|
|
|
481
508
|
|
|
482
509
|
> **A skill and its npx toolkit are not duplicates — they're a graduation.** Several skills (e.g. `feature-adr`, `design-thinking`) exist BOTH as a skill inside a `dz` preset AND as a standalone `npx` package. The preset's SKILL.md is **fully functional on its own** (the whole methodology — modules + references — travels with it, and it auto-activates by description), and it's the only way to compile that capability to the **non-Claude platforms** (Codex/OpenCode/Hermes/OpenClaude) via `dz`. The npx package adds **project-level runtime governance** around the same skill: a slash command, governance rules, a context shard, and (for feature-adr) reward-learning + `/harvest`. So: pick the **skill/preset** for a working capability across platforms; pick the **npx toolkit** when you want it as a governed, command-driven fixture of one project.
|
|
483
510
|
|
|
484
|
-
## All Commands (
|
|
511
|
+
## All Commands (56)
|
|
485
512
|
|
|
486
513
|
```
|
|
487
514
|
dz setup --target <name> [--preset <name>] [--select id,id,...] [--skills-dir <dir>] [--memory agentdb] [--no-memory] [--no-hooks] [--install-driver] [--force]
|
|
@@ -541,6 +568,7 @@ dz sbom --pack <dir> [--out <file>] # emit the CycloneDX 1.5 SBOM for a pack s
|
|
|
541
568
|
dz guard check --op <publish|teach|consolidate|reindex> [--text <s>] [--json] [--force <reason>] # declarative constraint layer before self-mutating ops: HARD violation → block (exit 1), SOFT → warn; zero-config defaults, .dz/guard.json to customise; dz guard --init | dz guard log (append-only audit). dz publish runs it automatically (--no-guard "<reason>" = logged escape hatch)
|
|
542
569
|
dz feature-adr-setup --guards [--loc-cap <n>] [--apply] # P3: scaffold DETERMINISTIC guard tests into the project — guards.config.json + a zero-dependency check.mjs runner (LOC cap, secret scan, frozen-file sha256 pins, waivers-with-reasons); wire `node architecture/guards/check.mjs` into CI
|
|
543
570
|
dz publish [--filter <name>] [--bump-only] [--claim-check <off|warn|error>] (dry-run by default; pass --yes/--confirm to go live; claim-check gate defaults to warn — surfaces README claim findings, never blocks)
|
|
571
|
+
dz parity [--target <name>] [--json] # honest feature×target map COMPUTED from the capability model — full / manual (via which form) / absent, per target
|
|
544
572
|
dz release [--filter <name>] [--affected] [--audit-dev] [--tag] [--publish] [--json] [--dry-run] [--no-issue] # VERIFIED release: 4 HARD gates in front of dz publish — package test suites, pnpm audit --prod >=high (--audit-dev widens), node --check of every dist/bin file (unbuilt package with a build script ⇒ MISSING_DIST fail), bin smoke-boot "node <bin> --help" (temp cwd + timeout); --affected narrows to git-touched packages (fail-open); any red gate STOPS the release (exit 1) + best-effort gh issue; green ⇒ re-sign reminder, then the ready dz publish command (never with --yes injected)
|
|
545
573
|
dz auto-canonicalize --source <github-url> --pack <skills-pack>
|
|
546
574
|
dz sync-upstream [--package <dir>] [--list] [--all]
|
|
@@ -1657,7 +1685,10 @@ dz guard (teach): ✗ BLOCK [checked: no-secrets, store-bloat-cap]
|
|
|
1657
1685
|
hatch `--no-guard "<reason>"` requires a reason and is logged to `.dz/guard-audit.jsonl` — an override is
|
|
1658
1686
|
visible, never silent. Calibrated against false gates: in a pnpm workspace, `workspace:*` in source is
|
|
1659
1687
|
*correct* (pnpm rewrites it at publish), so the rule resolves each workspace dep to the version it would
|
|
1660
|
-
ship as and blocks only a dep that would ship raw.
|
|
1688
|
+
ship as and blocks only a dep that would ship raw. The `readme-consistency` rule also holds the **docs
|
|
1689
|
+
site** in the contour: the command count on the Starlight CLI overview and the front-page tagline must
|
|
1690
|
+
match the cli README (the site once drifted 35→55 silently; now a mismatch is a warning here and a red
|
|
1691
|
+
test in CI). In a repo without the docs site those pairs simply aren't gathered — no false gate.
|
|
1661
1692
|
|
|
1662
1693
|
### `dz feature-adr-setup --guards` — when a project rule should be a TEST, not a reviewer's memory
|
|
1663
1694
|
|
|
@@ -2098,7 +2129,7 @@ npx @dzhechkov/p-replicator init
|
|
|
2098
2129
|
|
|
2099
2130
|
## Status
|
|
2100
2131
|
|
|
2101
|
-
`v0.3.
|
|
2132
|
+
`v0.3.236` — published on npm. Also available as [Claude Plugin](#claude-plugin). Part of [DZ Harness Hub](https://github.com/djd1m/dz-harness-hub).
|
|
2102
2133
|
|
|
2103
2134
|
## Claude Plugin
|
|
2104
2135
|
|
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;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgQH,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;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC;CAC5C;AAED,yFAAyF;AACzF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KACvD;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAs0K9E,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,KAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAgJ5E"}
|
package/dist/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
9
9
|
import { execSync } from 'node:child_process';
|
|
10
10
|
import { homedir, tmpdir } from 'node:os';
|
|
11
11
|
import { createRequire } from 'node:module';
|
|
12
|
-
import { createSkill, getSkillInfo, getWorkflow, isTargetName, listSkills, runDoctor, runInit, benchmarkSkill, benchmarkSkills, scanMcp, reconcileCapabilities, RECONCILE_BANNER, buildRegistry, discoverSkillPackDirs, checkUpstream, compareSkills, checkAllUpstream, sweepSkillDrift, syncCanonicalSkill, checkUpgrades, discoverPackages, discoverSourcePackages, fetchAllDownloads, filterByCategory, pretrain, recommend, generatePlugin, publishPackages, runSetup, runMigrate, searchRegistry, runSync, runVerify, runInitAgentsMd, runInitGeminiMd, TARGET_NAMES, WORKFLOW_NAMES, importEcc, recordPattern, resolveLearningBackend, storeStats, consolidateSessions, pruneNoisePatterns, lessonDeltaReport, removePatternsByIds, snapshotStore, recallHybrid, teachGuard, mirrorPatternsToVector, vectorMirrorEnabled, vectorTierStatus, resolveVectorEngine, reindexVectorStore, harmonizeVectorStore, importRvfCheckpoint, statuslineData, writeFeatureAdrState, computeUsage, deriveUsageCalibration, normalizeClaudeUsageModelKey, readUsageLimits, claimCheck, summarize, queryBookKnowledge, loadStorePatternsSync, patternRecordId, loadStoreRecords, recordToPattern, bundleSkills, brainHome, listBrain, promoteProjectToBrain, updateBrainSource, queryBrain, groundPrompt, expandKu, reindexBrainVectors, buildPrimer, exportBrainSlice, importBrainSlice, registerKusToBrain, RECALL_USAGE_LOG_RELATIVE, RECALL_USAGE_LOG_MAX_BYTES, parseRecallUsageLog, buildRecallUsageReport, buildManifest, buildSbom, resolveTrustRoot, decideVerifyPolicy, generateSigningKeypair, evaluateGuard, resolveRules, auditRecord, guardExitCode, DEFAULT_RULES, decideProvenance, isInsideTree, signManifest, verifyManifest, listSignablePackFiles, assertKeyOutsideTree, decidePublishGate, collectPackageFacts, planReleaseGates, selectAffectedPackages, classifyGateExecutions, buildFailureIssue, buildReleaseNotes, releaseTagName, firstOutputLine, formatPublishError, MANIFEST_NAME, SBOM_NAME, buildArchitectureMap, renderMapHuman, findArchitectureDrift, renderDriftReport, scanWorkspacePackages, loadSubsystemManifest, loadProductVision, checkFeatureAgainstArchitecture, renderArchCheck, planProjectSkills, guidanceForStage, renderInjectionReport, analyzeCorpus, renderRakeReport, renderCriticSection, rakeAsLesson, rakeReward, DEFAULT_RAKE_THRESHOLDS, streamSessionEvents, findLatestTranscript, detectProcessRakes, buildRetro, renderRetro, retroLessonText, PROCESS_SIGNATURES, RETRO_DOMAIN, scanForSetup, buildSetupPlan, scaffoldFromSpec, renderScaffoldPreview, readExistingForScaffold, assembleChallengeContext, buildChallengeBrief, planDiscriminationCheck, classifyDiscrimination, pickAdversaryModel, CHALLENGE_QUESTIONS, loadOutcomes, renderOutcomes, statsForKey, selectAutoCost, recordProvisional, finalizeOutcome, COST_LADDER, splitScenarios, budgetPlan, selectWinner, proseScopeOk, renderProseDiff, readScenarioIds, DEFAULT_MAX_JUDGE_RUNS, } from '@dzhechkov/harness-core';
|
|
12
|
+
import { createSkill, getSkillInfo, getWorkflow, isTargetName, listSkills, runDoctor, runInit, benchmarkSkill, benchmarkSkills, scanMcp, reconcileCapabilities, RECONCILE_BANNER, buildRegistry, discoverSkillPackDirs, checkUpstream, compareSkills, checkAllUpstream, sweepSkillDrift, syncCanonicalSkill, checkUpgrades, discoverPackages, discoverSourcePackages, fetchAllDownloads, filterByCategory, pretrain, recommend, generatePlugin, publishPackages, runSetup, runMigrate, searchRegistry, runSync, runVerify, runInitAgentsMd, runInitGeminiMd, TARGET_NAMES, buildParityMatrix, TARGET_CAPABILITIES, TARGET_SHORT_LABELS, WORKFLOW_NAMES, importEcc, recordPattern, resolveLearningBackend, storeStats, consolidateSessions, pruneNoisePatterns, lessonDeltaReport, removePatternsByIds, snapshotStore, recallHybrid, teachGuard, mirrorPatternsToVector, vectorMirrorEnabled, vectorTierStatus, resolveVectorEngine, reindexVectorStore, harmonizeVectorStore, importRvfCheckpoint, statuslineData, writeFeatureAdrState, computeUsage, deriveUsageCalibration, normalizeClaudeUsageModelKey, readUsageLimits, claimCheck, summarize, queryBookKnowledge, loadStorePatternsSync, patternRecordId, loadStoreRecords, recordToPattern, bundleSkills, brainHome, listBrain, promoteProjectToBrain, updateBrainSource, queryBrain, groundPrompt, expandKu, reindexBrainVectors, buildPrimer, exportBrainSlice, importBrainSlice, registerKusToBrain, RECALL_USAGE_LOG_RELATIVE, RECALL_USAGE_LOG_MAX_BYTES, parseRecallUsageLog, buildRecallUsageReport, buildManifest, buildSbom, resolveTrustRoot, decideVerifyPolicy, generateSigningKeypair, evaluateGuard, resolveRules, auditRecord, guardExitCode, DEFAULT_RULES, decideProvenance, isInsideTree, signManifest, verifyManifest, listSignablePackFiles, assertKeyOutsideTree, decidePublishGate, collectPackageFacts, planReleaseGates, selectAffectedPackages, classifyGateExecutions, buildFailureIssue, buildReleaseNotes, releaseTagName, firstOutputLine, formatPublishError, MANIFEST_NAME, SBOM_NAME, buildArchitectureMap, renderMapHuman, findArchitectureDrift, renderDriftReport, scanWorkspacePackages, loadSubsystemManifest, loadProductVision, checkFeatureAgainstArchitecture, renderArchCheck, planProjectSkills, guidanceForStage, renderInjectionReport, analyzeCorpus, renderRakeReport, renderCriticSection, rakeAsLesson, rakeReward, DEFAULT_RAKE_THRESHOLDS, streamSessionEvents, findLatestTranscript, detectProcessRakes, buildRetro, renderRetro, retroLessonText, PROCESS_SIGNATURES, RETRO_DOMAIN, scanForSetup, buildSetupPlan, scaffoldFromSpec, renderScaffoldPreview, readExistingForScaffold, assembleChallengeContext, buildChallengeBrief, planDiscriminationCheck, classifyDiscrimination, pickAdversaryModel, CHALLENGE_QUESTIONS, loadOutcomes, renderOutcomes, statsForKey, selectAutoCost, recordProvisional, finalizeOutcome, COST_LADDER, splitScenarios, budgetPlan, selectWinner, proseScopeOk, renderProseDiff, readScenarioIds, DEFAULT_MAX_JUDGE_RUNS, } from '@dzhechkov/harness-core';
|
|
13
13
|
import { getPreset, PRESET_NAMES } from '@dzhechkov/harness-presets';
|
|
14
14
|
import { scanGitHub, analyzeRepo, generateReport, deepAnalyze, scanAllSources, ScoutMemory } from '@dzhechkov/scout';
|
|
15
15
|
const USAGE = `dz - DZ cross-platform harness CLI
|
|
@@ -33,6 +33,7 @@ Usage:
|
|
|
33
33
|
dz verify-pack --pack <dir> [--pubkey <path>] (signature check; fail-closed; key from the repo, never the pack)
|
|
34
34
|
dz publish [--filter <name>] [--bump-only] [--claim-check <off|warn|error>] [--require-signing] [--provenance|--no-provenance] (dry-run by default; pass --yes/--confirm/--no-dry-run to go live; claim-check gate default warn — surfaces README claim findings, never blocks; error fails an offending package)
|
|
35
35
|
dz release [--filter <name>] [--tag] [--publish] [--json] [--dry-run] [--no-issue] (VERIFIED release: 4 HARD gates in FRONT of dz publish — full package test suites, audit >=high, node --check of every dist/bin file, bin smoke-boot via "node <bin> --help" — any red gate STOPS the release (exit 1) + best-effort gh issue; all green ⇒ re-sign reminder, then prints the ready dz publish command (or chains with --publish); never duplicates publish's own gates)
|
|
36
|
+
dz parity [--target <name>] [--json] (the honest feature×target map, COMPUTED from the capability model — which harness feature is full / manual / absent on each of the ${TARGET_NAMES.length} targets, and via which form)
|
|
36
37
|
dz setup --target <name> [--preset <name>] [--select id,id,...] [--skills-dir <dir>] [--project <dir>] [--memory agentdb] [--no-memory] [--no-hooks] [--install-driver] [--force] [--enrich]
|
|
37
38
|
dz teach "<pattern>" [--reward <0-1>] [--domain <name>] [--type rule|success-pattern|lesson-learned] [--project <dir>] [--no-mirror] (--project pins the learned store to <dir>/.dz, not the cwd — pin to a canonical brain)
|
|
38
39
|
dz teach --from-json <file> [--project <dir>] [--no-mirror] (bulk-import a 'dz recall --all --json' export — share a learned store across machines)
|
|
@@ -3262,6 +3263,85 @@ function cmdPublish(options, flags, cwd, write) {
|
|
|
3262
3263
|
return report.errors > 0 ? 1 : 0;
|
|
3263
3264
|
}
|
|
3264
3265
|
/* ------------------------------------------------------------------ */
|
|
3266
|
+
/* dz parity — the honest feature×target map (target-parity-matrix, */
|
|
3267
|
+
/* ADR-001): computed from the declarative model, never hand-written */
|
|
3268
|
+
/* ------------------------------------------------------------------ */
|
|
3269
|
+
function cmdParity(options, flags, write) {
|
|
3270
|
+
const json = flags.has('json');
|
|
3271
|
+
if (flags.has('help')) {
|
|
3272
|
+
write('dz parity [--target <name>] [--json] — the computed feature×target map (never hand-written)');
|
|
3273
|
+
write(` targets: ${TARGET_NAMES.join(', ')}`);
|
|
3274
|
+
return 0;
|
|
3275
|
+
}
|
|
3276
|
+
const allowedFlags = new Set(['json', 'help']);
|
|
3277
|
+
const allowedOptions = new Set(['target']);
|
|
3278
|
+
// A stray positional is a typo'd invocation, not something to silently ignore (Codex QE gap 7).
|
|
3279
|
+
if (options.has('_positional_0')) {
|
|
3280
|
+
write(json ? JSON.stringify({ error: `unexpected argument "${options.get('_positional_0')}"`, exitCode: 1 }) : `dz parity: unexpected argument "${options.get('_positional_0')}"\n allowed: --target <name>, --json`);
|
|
3281
|
+
return 1;
|
|
3282
|
+
}
|
|
3283
|
+
for (const flag of flags) {
|
|
3284
|
+
if (!allowedFlags.has(flag)) {
|
|
3285
|
+
write(json ? JSON.stringify({ error: `unknown option --${flag}`, exitCode: 1 }) : `dz parity: unknown option --${flag}\n allowed: --target <name>, --json`);
|
|
3286
|
+
return 1;
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
for (const key of options.keys()) {
|
|
3290
|
+
if (key.startsWith('_positional_'))
|
|
3291
|
+
continue;
|
|
3292
|
+
if (!allowedOptions.has(key)) {
|
|
3293
|
+
write(json ? JSON.stringify({ error: `unknown option --${key}`, exitCode: 1 }) : `dz parity: unknown option --${key}\n allowed: --target <name>, --json`);
|
|
3294
|
+
return 1;
|
|
3295
|
+
}
|
|
3296
|
+
}
|
|
3297
|
+
const matrix = buildParityMatrix();
|
|
3298
|
+
const target = options.get('target');
|
|
3299
|
+
if (target !== undefined && !TARGET_NAMES.includes(target)) {
|
|
3300
|
+
if (json)
|
|
3301
|
+
write(JSON.stringify({ error: `unknown target "${target}"`, targets: TARGET_NAMES, exitCode: 1 }, null, 2));
|
|
3302
|
+
else
|
|
3303
|
+
write(`dz parity: unknown target "${target}" — one of: ${TARGET_NAMES.join(', ')}`);
|
|
3304
|
+
return 1;
|
|
3305
|
+
}
|
|
3306
|
+
if (json) {
|
|
3307
|
+
const rows = matrix.map((r) => ({
|
|
3308
|
+
id: r.feature.id,
|
|
3309
|
+
title: r.feature.title,
|
|
3310
|
+
cells: target !== undefined ? { [target]: r.cells[target] } : r.cells,
|
|
3311
|
+
}));
|
|
3312
|
+
// A filtered response stays internally consistent: capabilities are filtered too (Codex QE gap 9).
|
|
3313
|
+
const caps = target !== undefined ? { [target]: TARGET_CAPABILITIES[target] } : TARGET_CAPABILITIES;
|
|
3314
|
+
write(JSON.stringify({ targets: target !== undefined ? [target] : TARGET_NAMES, capabilities: caps, features: rows }, null, 2));
|
|
3315
|
+
return 0;
|
|
3316
|
+
}
|
|
3317
|
+
if (target !== undefined) {
|
|
3318
|
+
const t = target;
|
|
3319
|
+
write(`\ndz parity — ${t} (capabilities: ${TARGET_CAPABILITIES[t].join(', ')})\n`);
|
|
3320
|
+
for (const r of matrix) {
|
|
3321
|
+
const c = r.cells[t];
|
|
3322
|
+
const icon = c.level === 'full' ? '✓' : c.level === 'manual' ? '◐' : '—';
|
|
3323
|
+
write(` ${icon} ${r.feature.title.padEnd(58)} ${c.level === 'none' ? 'not available on this target' : `via ${c.via ?? ''}`}`);
|
|
3324
|
+
}
|
|
3325
|
+
write('\n ✓ full (the complete experience) ◐ manual (works, you drive it by hand) — not available');
|
|
3326
|
+
return 0;
|
|
3327
|
+
}
|
|
3328
|
+
// Grid: one column per target, short header, one row per feature. Computed, never hand-written;
|
|
3329
|
+
// the labels live NEXT TO the model (a local map here would be a second, unchecked registry).
|
|
3330
|
+
const short = TARGET_SHORT_LABELS;
|
|
3331
|
+
write('\ndz parity — feature × target (computed from the model; dz parity --target <name> for detail)\n');
|
|
3332
|
+
write(` ${'feature'.padEnd(52)} ${TARGET_NAMES.map((t) => (short[t] ?? t).padStart(4)).join('')}`);
|
|
3333
|
+
for (const r of matrix) {
|
|
3334
|
+
const cells = TARGET_NAMES.map((t) => {
|
|
3335
|
+
const c = r.cells[t];
|
|
3336
|
+
return (c.level === 'full' ? '✓' : c.level === 'manual' ? '◐' : '—').padStart(4);
|
|
3337
|
+
}).join('');
|
|
3338
|
+
write(` ${r.feature.title.slice(0, 52).padEnd(52)} ${cells}`);
|
|
3339
|
+
}
|
|
3340
|
+
write('\n ✓ full ◐ manual (available, driven by hand) — not available');
|
|
3341
|
+
write(` columns: ${TARGET_NAMES.map((t) => `${short[t] ?? t}=${t}`).join(' ')}`);
|
|
3342
|
+
return 0;
|
|
3343
|
+
}
|
|
3344
|
+
/* ------------------------------------------------------------------ */
|
|
3265
3345
|
/* dz release — verified-release conveyor (feature release-verified, */
|
|
3266
3346
|
/* ADR-001): 4 HARD gates in FRONT of the untouched dz publish. */
|
|
3267
3347
|
/* ------------------------------------------------------------------ */
|
|
@@ -4240,6 +4320,19 @@ function gatherReadmeCounts(root) {
|
|
|
4240
4320
|
pairs.push({ label: 'commands (root CJM header vs cli All Commands)', a: cjm, b: cliAll });
|
|
4241
4321
|
if (rootAll !== null && cliAll !== null)
|
|
4242
4322
|
pairs.push({ label: 'All Commands (root vs cli)', a: rootAll, b: cliAll });
|
|
4323
|
+
// sitedoc in the readme-first contour (feature sitedoc-readme-first, ADR-001 + Codex QE AM-3/AM-4):
|
|
4324
|
+
// the docs SITE carries the same command count as the cli README. A MISSING file skips its pair
|
|
4325
|
+
// (target repo without sitedoc — missing-evidence contract). But a file that EXISTS and no longer
|
|
4326
|
+
// matches its anchored pattern emits a MISMATCH pair (a: -1) — silent non-extraction is the exact
|
|
4327
|
+
// disease this contour cures (AM-1 applies to the guard path too, not only the CI test).
|
|
4328
|
+
const sitePair = (rel, re, label) => {
|
|
4329
|
+
if (cliAll === null || !existsSync(join(root, rel)))
|
|
4330
|
+
return;
|
|
4331
|
+
const found = num(read(rel), re);
|
|
4332
|
+
pairs.push({ label, a: found ?? -1, b: cliAll });
|
|
4333
|
+
};
|
|
4334
|
+
sitePair('packages/@dzhechkov/sitedoc/src/content/docs/cli/overview.md', /^description: All (\d+) dz commands/m, 'commands (docs-site CLI overview description vs cli All Commands)');
|
|
4335
|
+
sitePair('packages/@dzhechkov/sitedoc/src/content/docs/index.mdx', /^\s*tagline: "[^"]*?(\d+) commands/m, 'commands (docs-site index hero tagline vs cli All Commands)');
|
|
4243
4336
|
return pairs;
|
|
4244
4337
|
}
|
|
4245
4338
|
/** Gather the facts one op needs. All I/O is best-effort — a missing signal skips its rule, never crashes. */
|
|
@@ -5492,6 +5585,8 @@ export async function runCli(argv, io = {}) {
|
|
|
5492
5585
|
return cmdPublish(options, flags, cwd, write);
|
|
5493
5586
|
case 'release':
|
|
5494
5587
|
return cmdRelease(options, flags, cwd, write, io.releaseRunner);
|
|
5588
|
+
case 'parity':
|
|
5589
|
+
return cmdParity(options, flags, write);
|
|
5495
5590
|
case 'registry':
|
|
5496
5591
|
return cmdRegistry(options, cwd, write);
|
|
5497
5592
|
case 'benchmark':
|