@dzhechkov/harness-core 0.3.150 → 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 +410 -62
- package/README.md +81 -3
- package/dist/agentdb-index.d.ts.map +1 -1
- package/dist/agentdb-index.js +10 -2
- package/dist/agentdb-index.js.map +1 -1
- package/dist/backlog-embed.d.ts +94 -0
- package/dist/backlog-embed.d.ts.map +1 -0
- package/dist/backlog-embed.js +138 -0
- package/dist/backlog-embed.js.map +1 -0
- package/dist/backlog.d.ts +180 -7
- package/dist/backlog.d.ts.map +1 -1
- package/dist/backlog.js +429 -26
- package/dist/backlog.js.map +1 -1
- package/dist/challenge-panel.d.ts +3 -0
- package/dist/challenge-panel.d.ts.map +1 -1
- package/dist/challenge-panel.js +3 -0
- package/dist/challenge-panel.js.map +1 -1
- package/dist/export-holdout.d.ts +149 -0
- package/dist/export-holdout.d.ts.map +1 -0
- package/dist/export-holdout.js +198 -0
- package/dist/export-holdout.js.map +1 -0
- package/dist/feature-adr-checkpoints.d.ts +127 -0
- package/dist/feature-adr-checkpoints.d.ts.map +1 -1
- package/dist/feature-adr-checkpoints.js +199 -1
- package/dist/feature-adr-checkpoints.js.map +1 -1
- package/dist/feature-adr-routing.d.ts +3 -0
- package/dist/feature-adr-routing.d.ts.map +1 -1
- package/dist/feature-adr-routing.js +3 -0
- package/dist/feature-adr-routing.js.map +1 -1
- package/dist/guard.d.ts +42 -0
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +73 -1
- package/dist/guard.js.map +1 -1
- package/dist/index.d.ts +16 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/dist/loop-blobs.generated.d.ts +33 -0
- package/dist/loop-blobs.generated.d.ts.map +1 -0
- package/dist/loop-blobs.generated.js +101 -0
- package/dist/loop-blobs.generated.js.map +1 -0
- package/dist/loop-lint.d.ts +63 -0
- package/dist/loop-lint.d.ts.map +1 -0
- package/dist/loop-lint.js +606 -0
- package/dist/loop-lint.js.map +1 -0
- package/dist/loop-plan.d.ts +416 -0
- package/dist/loop-plan.d.ts.map +1 -0
- package/dist/loop-plan.js +1151 -0
- package/dist/loop-plan.js.map +1 -0
- package/dist/loop-render.d.ts +104 -0
- package/dist/loop-render.d.ts.map +1 -0
- package/dist/loop-render.js +1068 -0
- package/dist/loop-render.js.map +1 -0
- package/dist/loop-trace.d.ts +229 -0
- package/dist/loop-trace.d.ts.map +1 -0
- package/dist/loop-trace.js +614 -0
- package/dist/loop-trace.js.map +1 -0
- package/dist/mutation-gate.d.ts +247 -0
- package/dist/mutation-gate.d.ts.map +1 -0
- package/dist/mutation-gate.js +535 -0
- package/dist/mutation-gate.js.map +1 -0
- package/dist/no-stubs.d.ts +53 -0
- package/dist/no-stubs.d.ts.map +1 -0
- package/dist/no-stubs.js +190 -0
- package/dist/no-stubs.js.map +1 -0
- package/dist/package-skill-layouts.d.ts +67 -0
- package/dist/package-skill-layouts.d.ts.map +1 -0
- package/dist/package-skill-layouts.js +81 -0
- package/dist/package-skill-layouts.js.map +1 -0
- package/dist/patterns.d.ts.map +1 -1
- package/dist/patterns.js +156 -75
- package/dist/patterns.js.map +1 -1
- package/dist/recall-domain-boost.d.ts.map +1 -1
- package/dist/recall-domain-boost.js +6 -0
- package/dist/recall-domain-boost.js.map +1 -1
- package/dist/statusline.d.ts +10 -2
- package/dist/statusline.d.ts.map +1 -1
- package/dist/statusline.js +122 -36
- package/dist/statusline.js.map +1 -1
- package/dist/store-lock.d.ts +108 -0
- package/dist/store-lock.d.ts.map +1 -0
- package/dist/store-lock.js +231 -0
- package/dist/store-lock.js.map +1 -0
- package/dist/workflows.d.ts +16 -22
- package/dist/workflows.d.ts.map +1 -1
- package/dist/workflows.js +17 -98
- package/dist/workflows.js.map +1 -1
- package/package.json +6 -4
- package/sbom.json +1073 -203
- package/src/agentdb-index.ts +10 -1
- package/src/backlog-embed.ts +156 -0
- package/src/backlog.ts +536 -28
- package/src/challenge-panel.ts +4 -0
- package/src/export-holdout.ts +235 -0
- package/src/feature-adr-checkpoints.ts +291 -1
- package/src/feature-adr-routing.ts +4 -0
- package/src/guard.ts +106 -1
- package/src/index.ts +62 -2
- package/src/loop-blobs.generated.ts +114 -0
- package/src/loop-lint.ts +643 -0
- package/src/loop-plan.ts +1419 -0
- package/src/loop-render.ts +1126 -0
- package/src/loop-trace.ts +727 -0
- package/src/mutation-gate.ts +701 -0
- package/src/no-stubs.ts +204 -0
- package/src/package-skill-layouts.ts +107 -0
- package/src/patterns.ts +135 -60
- package/src/recall-domain-boost.ts +6 -0
- package/src/statusline.ts +117 -30
- package/src/store-lock.ts +258 -0
- package/src/workflows.ts +18 -117
package/dist/workflows.js
CHANGED
|
@@ -1,103 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* RETIRED — the ADR-005 workflow templates are gone (feature loop-designer, AM-6 / architecture
|
|
3
|
+
* §8.2). They emitted a pre-`meta`/`phases` format (`export default {tasks, maxConcurrency}`) the
|
|
4
|
+
* current Workflow runtime cannot execute — a broken command, not a feature.
|
|
3
5
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
6
|
+
* Replacement: `dz workflow init` (scaffold a `loop-plan/1` plan), `dz workflow validate`,
|
|
7
|
+
* `dz workflow render` (plan → executable region-delimited loop script), plus the sibling gates
|
|
8
|
+
* `dz workflow-lint` and `dz workflow-trace`. See `loop-plan.ts` / `loop-render.ts`.
|
|
7
9
|
*
|
|
8
|
-
*
|
|
10
|
+
* BREAKING (deliberate, channeled): removing `WorkflowTemplate`/`WORKFLOWS`/`getWorkflow` is a
|
|
11
|
+
* public API change for harness-core. harness-core is 0.x, where MINOR is this repo's breaking
|
|
12
|
+
* channel; the removal is named in the CHANGELOG and README — never silent. The only internal
|
|
13
|
+
* importer was `harness-cli`'s `cmdWorkflow` (MEASURED at plan time), rewritten in the same change.
|
|
14
|
+
*
|
|
15
|
+
* This module stays as a deprecation shim so stale imports fail LOUDLY with a pointer, not with a
|
|
16
|
+
* confusing "module not found".
|
|
9
17
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Dynamic Workflow: Coverage Lift
|
|
15
|
-
// Generated for: ${opts.projectRoot}
|
|
16
|
-
// Per ADR-005: orchestration only — no adapter/core changes
|
|
17
|
-
|
|
18
|
-
const tierA = ${JSON.stringify(opts.packages ?? [
|
|
19
|
-
'core', 'memory', 'harness-core', 'harness-cli',
|
|
20
|
-
'harness-presets', 'mcp-server-tools',
|
|
21
|
-
'adapter-claude', 'adapter-codex', 'adapter-opencode', 'adapter-hermes',
|
|
22
|
-
'skills-qe',
|
|
23
|
-
])};
|
|
24
|
-
|
|
25
|
-
const tasks = tierA.map(pkg => ({
|
|
26
|
-
name: \`coverage-\${pkg}\`,
|
|
27
|
-
description: \`Lift @dzhechkov/\${pkg} to ≥95% line coverage. Run: pnpm --filter @dzhechkov/\${pkg} test -- --coverage. Add tests for uncovered lines.\`,
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
// Claude Code dynamic workflow engine will:
|
|
31
|
-
// 1. Spawn one agent per task (up to 16 concurrent)
|
|
32
|
-
// 2. Each agent reads coverage, writes tests, re-runs coverage
|
|
33
|
-
// 3. Results aggregated when all agents complete
|
|
34
|
-
export default { tasks, maxConcurrency: 4${opts.dryRun ? ', dryRun: true' : ''} };
|
|
35
|
-
`.trim(),
|
|
36
|
-
};
|
|
37
|
-
const mutationKill = {
|
|
38
|
-
name: 'mutation-kill',
|
|
39
|
-
description: 'Kill surviving mutants across core packages using parallel Stryker runs.',
|
|
40
|
-
generate: (opts) => `
|
|
41
|
-
// Dynamic Workflow: Mutation Kill
|
|
42
|
-
// Generated for: ${opts.projectRoot}
|
|
43
|
-
|
|
44
|
-
const packages = ${JSON.stringify(opts.packages ?? ['core', 'memory', 'harness-core'])};
|
|
45
|
-
|
|
46
|
-
const tasks = packages.map(pkg => ({
|
|
47
|
-
name: \`mutate-\${pkg}\`,
|
|
48
|
-
description: \`Run Stryker on @dzhechkov/\${pkg}, analyze survivors, write tests to kill them. Target: ≥80% mutation score.\`,
|
|
49
|
-
}));
|
|
50
|
-
|
|
51
|
-
export default { tasks, maxConcurrency: 3${opts.dryRun ? ', dryRun: true' : ''} };
|
|
52
|
-
`.trim(),
|
|
53
|
-
};
|
|
54
|
-
const canonicalize = {
|
|
55
|
-
name: 'canonicalize',
|
|
56
|
-
description: 'Canonicalize packages from vendored directories into @dzhechkov/* namespace.',
|
|
57
|
-
generate: (opts) => `
|
|
58
|
-
// Dynamic Workflow: Canonicalize
|
|
59
|
-
// Generated for: ${opts.projectRoot}
|
|
60
|
-
|
|
61
|
-
const tasks = [
|
|
62
|
-
{ name: 'discover', description: 'Scan vendored directories for un-canonicalized packages.' },
|
|
63
|
-
{ name: 'copy', description: 'Copy discovered packages to packages/@dzhechkov/. Exclude node_modules, .git, runtime state.' },
|
|
64
|
-
{ name: 'metadata', description: 'Add publishConfig, repository, homepage to each package.json.' },
|
|
65
|
-
{ name: 'verify', description: 'Run byte-level diff between source and canonical. 0 missing, 0 changed.' },
|
|
66
|
-
{ name: 'test', description: 'Run canonical-packages structural tests. All must pass.' },
|
|
67
|
-
];
|
|
68
|
-
|
|
69
|
-
export default { tasks, maxConcurrency: 2${opts.dryRun ? ', dryRun: true' : ''} };
|
|
70
|
-
`.trim(),
|
|
71
|
-
};
|
|
72
|
-
const securityAudit = {
|
|
73
|
-
name: 'security-audit',
|
|
74
|
-
description: 'Run adversarial security audit with parallel boundary scanning.',
|
|
75
|
-
generate: (opts) => `
|
|
76
|
-
// Dynamic Workflow: Security Audit
|
|
77
|
-
// Generated for: ${opts.projectRoot}
|
|
78
|
-
|
|
79
|
-
const tasks = [
|
|
80
|
-
{ name: 'npm-audit', description: 'Run pnpm audit, capture baseline.' },
|
|
81
|
-
{ name: 'gitleaks', description: 'Run gitleaks detect, document findings.' },
|
|
82
|
-
{ name: 'boundaries', description: 'Verify all 8 input boundaries have runtime guards.' },
|
|
83
|
-
{ name: 'payloads', description: 'Test aidefence payloads against boundaries.' },
|
|
84
|
-
{ name: 'report', description: 'Generate security-audit.md with 6 H2 sections.' },
|
|
85
|
-
];
|
|
86
|
-
|
|
87
|
-
export default { tasks, maxConcurrency: 3${opts.dryRun ? ', dryRun: true' : ''} };
|
|
88
|
-
`.trim(),
|
|
89
|
-
};
|
|
90
|
-
/** All registered workflow templates. */
|
|
91
|
-
export const WORKFLOWS = {
|
|
92
|
-
'coverage-lift': coverageLift,
|
|
93
|
-
'mutation-kill': mutationKill,
|
|
94
|
-
'canonicalize': canonicalize,
|
|
95
|
-
'security-audit': securityAudit,
|
|
96
|
-
};
|
|
97
|
-
/** Valid workflow names. */
|
|
98
|
-
export const WORKFLOW_NAMES = Object.keys(WORKFLOWS);
|
|
99
|
-
/** Look up a workflow by name. */
|
|
100
|
-
export function getWorkflow(name) {
|
|
101
|
-
return WORKFLOWS[name];
|
|
102
|
-
}
|
|
18
|
+
/** The pinned retirement message the CLI prints (tested by workflow-legacy-shim.test.ts). */
|
|
19
|
+
export const WORKFLOW_TEMPLATES_RETIRED_MESSAGE = 'dz workflow: the ADR-005 templates are retired (they emitted a pre-meta format the runtime cannot run) — use dz workflow init/render';
|
|
20
|
+
/** Empty by design: no legacy template names remain. */
|
|
21
|
+
export const WORKFLOW_NAMES = [];
|
|
103
22
|
//# sourceMappingURL=workflows.js.map
|
package/dist/workflows.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../src/workflows.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../src/workflows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,6FAA6F;AAC7F,MAAM,CAAC,MAAM,kCAAkC,GAC7C,sIAAsI,CAAC;AAEzI,wDAAwD;AACxD,MAAM,CAAC,MAAM,cAAc,GAAa,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dzhechkov/harness-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Shared harness logic - skill loading, additive apply, and the init/sync/verify/doctor operations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,10 +31,11 @@
|
|
|
31
31
|
"@dzhechkov/adapter-hermes": "^0.2.0",
|
|
32
32
|
"@dzhechkov/adapter-openclaude": "^0.1.0",
|
|
33
33
|
"@dzhechkov/adapter-opencode": "^0.2.0",
|
|
34
|
+
"proper-lockfile": "^4.1.2",
|
|
34
35
|
"yaml": "^2.0.0",
|
|
35
36
|
"@dzhechkov/adapter-agents-md": "0.1.1",
|
|
36
|
-
"@dzhechkov/adapter-cursor": "0.1.1",
|
|
37
37
|
"@dzhechkov/adapter-gemini": "0.1.1",
|
|
38
|
+
"@dzhechkov/adapter-cursor": "0.1.1",
|
|
38
39
|
"@dzhechkov/adapter-copilot": "0.1.1",
|
|
39
40
|
"@dzhechkov/adapter-windsurf": "0.1.1",
|
|
40
41
|
"@dzhechkov/core": "0.2.14",
|
|
@@ -46,10 +47,11 @@
|
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
50
|
+
"@ruvector/rvf": "^0.2.3",
|
|
49
51
|
"@types/node": "^25.6.0",
|
|
52
|
+
"@types/proper-lockfile": "^4.1.4",
|
|
50
53
|
"typescript": "^5.7.0",
|
|
51
|
-
"vitest": "^3.0.0"
|
|
52
|
-
"@ruvector/rvf": "^0.2.3"
|
|
54
|
+
"vitest": "^3.0.0"
|
|
53
55
|
},
|
|
54
56
|
"engines": {
|
|
55
57
|
"node": ">=20"
|