harness-everything 0.16.0 → 0.16.1
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +8 -0
- package/README.md +7 -7
- package/VERIFICATION.md +3 -3
- package/ci/invariant-routing.test.js +58 -158
- package/ci/mechanism-2a-rule-of-3.test.js +73 -138
- package/ci/mechanism-2ac-atomic-commit-check.test.js +2 -2
- package/ci/mechanism-2af-worktree-isolation.test.js +38 -196
- package/ci/mechanism-2ah-workflow-lifecycle.test.js +20 -831
- package/ci/mechanism-2ai-workspace-fingerprint-batch.test.js +3 -4
- package/ci/mechanism-2b-boundary-guard.test.js +6 -16
- package/ci/mechanism-2e-scope-guard.test.js +8 -24
- package/ci/mechanism-2f-stop-gate.test.js +21 -75
- package/ci/mechanism-2n-opencode-plugin.test.js +13 -28
- package/ci/openai-plugin-package.test.js +8 -8
- package/ci/openai-plugin-runtime.test.js +2 -2
- package/ci/router-workflow-plan.test.js +6 -6
- package/ci/self-evolve-loop.test.js +4 -1
- package/ci/workflow-execution-contract.test.js +51 -129
- package/ci/workflow-plan-consumers-edge.test.js +1 -1
- package/ci/workflow-plan-consumers.test.js +6 -6
- package/docs/architecture.md +21 -21
- package/docs/enforcement-locks.md +41 -102
- package/docs/mechanism-first-skill-mesh.md +2 -2
- package/docs/philosophy.md +2 -2
- package/docs/platform-capabilities.md +3 -3
- package/docs/routing.md +14 -14
- package/docs/workflow-runtime.md +80 -110
- package/evals/harness-everything/tasks/positive-tier1.yaml +1 -1
- package/evals/harness-everything/tasks/positive-tier2.yaml +1 -1
- package/evals/harness-everything/tasks/positive-tier3.yaml +1 -1
- package/evals/using-git-worktrees/tasks/positive-trigger.yaml +1 -1
- package/fable-mode/SKILL.md +1 -1
- package/fable-mode/execution-guardrails/SKILL.md +1 -1
- package/fable-mode/fable-haiku/SKILL.md +1 -1
- package/fable-mode/fable-opus/SKILL.md +1 -1
- package/fable-mode/fable-sonnet/SKILL.md +1 -1
- package/fable-mode/scripts/workflow-plan-consumer.js +4 -3
- package/harness-everything/SKILL.md +11 -11
- package/harness-everything/references/triage-and-tiers.md +11 -11
- package/harness-everything/scripts/kernel-router-core.js +5 -5
- package/harness-everything/scripts/kernel-router.js +15 -17
- package/harness-everything/scripts/router-contract-core.js +1 -1
- package/hooks/hooks.json +10 -23
- package/hooks/scripts/atomic-commit-check.js +1 -1
- package/hooks/scripts/boundary-guard.js +4 -4
- package/hooks/scripts/contract-test.js +8 -11
- package/hooks/scripts/depth-guard.js +2 -2
- package/hooks/scripts/lib/workflow-runtime.js +24 -402
- package/hooks/scripts/rule-of-3-tracker.js +28 -31
- package/hooks/scripts/rule-of-3.js +4 -28
- package/hooks/scripts/state-persist.js +36 -136
- package/hooks/scripts/stop-gate.js +15 -48
- package/hooks/scripts/subagent-scope-guard.js +8 -8
- package/hooks/scripts/workflow-disposition.js +2 -10
- package/hooks/scripts/workflow-gate.js +33 -84
- package/hooks/scripts/workflow-mutation-denied.js +3 -15
- package/hooks/scripts/workflow-stop-gate.js +23 -38
- package/opencode-plugin/README.md +9 -10
- package/opencode-plugin/index.mjs +14 -30
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/hooks.json +3 -3
- package/plugins/harness-everything/hooks/scripts/atomic-commit-check.js +1 -1
- package/plugins/harness-everything/hooks/scripts/boundary-guard.js +4 -4
- package/plugins/harness-everything/hooks/scripts/contract-test.js +8 -11
- package/plugins/harness-everything/hooks/scripts/depth-guard.js +2 -2
- package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +24 -402
- package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +28 -31
- package/plugins/harness-everything/hooks/scripts/rule-of-3.js +4 -28
- package/plugins/harness-everything/hooks/scripts/state-persist.js +36 -136
- package/plugins/harness-everything/hooks/scripts/stop-gate.js +15 -48
- package/plugins/harness-everything/hooks/scripts/subagent-scope-guard.js +8 -8
- package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +2 -10
- package/plugins/harness-everything/hooks/scripts/workflow-gate.js +33 -84
- package/plugins/harness-everything/hooks/scripts/workflow-mutation-denied.js +3 -15
- package/plugins/harness-everything/hooks/scripts/workflow-stop-gate.js +23 -38
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/advisory-text.js +16 -29
- package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
- package/plugins/harness-everything/skills/fable-mode/scripts/workflow-plan-consumer.js +4 -3
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +11 -11
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +11 -11
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +5 -5
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +15 -17
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +1 -1
- package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +5 -5
- package/scripts/lib/advisory-text.js +16 -29
- package/using-git-worktrees/SKILL.md +5 -5
package/hooks/hooks.json
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/workflow-gate.js\""
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
|
-
"description": "
|
|
37
|
+
"description": "Emit advisory workflow/worktree reminders before mutation",
|
|
38
38
|
"id": "harness:pre:workflow-gate"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"id": "harness:pre:action-gate"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
"matcher": "Bash|PowerShell|Edit|Write",
|
|
52
|
+
"matcher": "Bash|PowerShell|Edit|Write|apply_patch",
|
|
53
53
|
"hooks": [
|
|
54
54
|
{
|
|
55
55
|
"type": "command",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/boundary-guard.js\""
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
|
-
"description": "
|
|
70
|
+
"description": "Warn about expensive broad searches and large file reads",
|
|
71
71
|
"id": "harness:pre:boundary-guard"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/depth-guard.js\""
|
|
79
79
|
}
|
|
80
80
|
],
|
|
81
|
-
"description": "
|
|
81
|
+
"description": "Remind to inspect existing files before editing",
|
|
82
82
|
"id": "harness:pre:depth-guard"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/workflow-stop-gate.js\""
|
|
134
134
|
}
|
|
135
135
|
],
|
|
136
|
-
"description": "
|
|
136
|
+
"description": "Remind when selected workflow evidence is incomplete",
|
|
137
137
|
"id": "harness:stop:workflow-completion-gate"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/stop-gate.js\""
|
|
144
144
|
}
|
|
145
145
|
],
|
|
146
|
-
"description": "
|
|
146
|
+
"description": "Remind when edits have no observed successful verification",
|
|
147
147
|
"id": "harness:stop:stop-gate"
|
|
148
148
|
},
|
|
149
149
|
{
|
|
@@ -157,19 +157,6 @@
|
|
|
157
157
|
"id": "harness:stop:skill-telemetry"
|
|
158
158
|
}
|
|
159
159
|
],
|
|
160
|
-
"PermissionDenied": [
|
|
161
|
-
{
|
|
162
|
-
"matcher": "Bash|PowerShell",
|
|
163
|
-
"hooks": [
|
|
164
|
-
{
|
|
165
|
-
"type": "command",
|
|
166
|
-
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/workflow-mutation-denied.js\""
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"description": "Release reserved mutation capacity when Claude auto mode denies a shell tool call",
|
|
170
|
-
"id": "harness:permission-denied:mutation-probe"
|
|
171
|
-
}
|
|
172
|
-
],
|
|
173
160
|
"PostToolUse": [
|
|
174
161
|
{
|
|
175
162
|
"matcher": "Bash|PowerShell|mcp__.*",
|
|
@@ -183,7 +170,7 @@
|
|
|
183
170
|
"id": "harness:post:action-gate-audit"
|
|
184
171
|
},
|
|
185
172
|
{
|
|
186
|
-
"matcher": "Bash|PowerShell",
|
|
173
|
+
"matcher": "Bash|PowerShell|apply_patch",
|
|
187
174
|
"hooks": [
|
|
188
175
|
{
|
|
189
176
|
"type": "command",
|
|
@@ -194,7 +181,7 @@
|
|
|
194
181
|
"id": "harness:post:rule-of-3-tracker"
|
|
195
182
|
},
|
|
196
183
|
{
|
|
197
|
-
"matcher": "Edit|Write|Bash|PowerShell",
|
|
184
|
+
"matcher": "Edit|Write|Bash|PowerShell|apply_patch",
|
|
198
185
|
"hooks": [
|
|
199
186
|
{
|
|
200
187
|
"type": "command",
|
|
@@ -262,7 +249,7 @@
|
|
|
262
249
|
"id": "harness:post-failure:action-gate-audit"
|
|
263
250
|
},
|
|
264
251
|
{
|
|
265
|
-
"matcher": "Bash|PowerShell",
|
|
252
|
+
"matcher": "Bash|PowerShell|apply_patch",
|
|
266
253
|
"hooks": [
|
|
267
254
|
{
|
|
268
255
|
"type": "command",
|
|
@@ -273,7 +260,7 @@
|
|
|
273
260
|
"id": "harness:post-failure:rule-of-3-tracker"
|
|
274
261
|
},
|
|
275
262
|
{
|
|
276
|
-
"matcher": "Bash|PowerShell",
|
|
263
|
+
"matcher": "Bash|PowerShell|apply_patch",
|
|
277
264
|
"hooks": [
|
|
278
265
|
{
|
|
279
266
|
"type": "command",
|
|
@@ -143,7 +143,7 @@ function main(payload) {
|
|
|
143
143
|
const changedFiles = statusRaw.split('\n').length;
|
|
144
144
|
console.error(`[Atomic Commit Check] ${state.editCount} edits since the last commit (${changedFiles} files currently changed).`);
|
|
145
145
|
console.error('If a logically complete chunk of work is done, commit it now before continuing - large uncommitted diffs are harder to review and harder to recover from.');
|
|
146
|
-
process.exit(
|
|
146
|
+
process.exit(0);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
process.exit(0);
|
|
@@ -25,10 +25,10 @@ process.stdin.on('end', () => {
|
|
|
25
25
|
if (filePath && !input.limit && fs.existsSync(filePath)) {
|
|
26
26
|
const stat = fs.statSync(filePath);
|
|
27
27
|
if (stat.isFile() && stat.size > MAX_BYTES_WITHOUT_LIMIT) {
|
|
28
|
-
console.error(`[Boundary
|
|
28
|
+
console.error(`[Boundary Reminder]: "${filePath}" is ${(stat.size / 1024).toFixed(0)}KB.`);
|
|
29
29
|
console.error(`Reading a file this large in one call risks context bloat and "lost in the middle" degradation.`);
|
|
30
30
|
console.error(`Re-issue the Read with an explicit "offset"/"limit" to pull a targeted slice, or use Grep to locate the relevant section first.`);
|
|
31
|
-
process.exit(
|
|
31
|
+
process.exit(0);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -41,10 +41,10 @@ process.stdin.on('end', () => {
|
|
|
41
41
|
return asPathSegment.test(searchPath) || asPathSegment.test(pattern);
|
|
42
42
|
});
|
|
43
43
|
if (hitsNoiseDir) {
|
|
44
|
-
console.error(`[Boundary
|
|
44
|
+
console.error(`[Boundary Reminder]: search targets a noise directory (${NOISE_DIRS.join(', ')}).`);
|
|
45
45
|
console.error(`These produce huge, low-signal result sets and rarely contain what you're actually looking for.`);
|
|
46
46
|
console.error(`Scope the search to source directories instead, or state explicitly why this directory must be searched.`);
|
|
47
|
-
process.exit(
|
|
47
|
+
process.exit(0);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -22,7 +22,7 @@ const {
|
|
|
22
22
|
listRunContracts,
|
|
23
23
|
getWorkerId,
|
|
24
24
|
} = require('./lib/fable-contracts');
|
|
25
|
-
const { loadWorkflow, matchingRun
|
|
25
|
+
const { loadWorkflow, matchingRun } = require('./lib/workflow-runtime');
|
|
26
26
|
const { createLearningOpportunity } = require('./lib/learning-opportunity');
|
|
27
27
|
|
|
28
28
|
function resultState(payload) {
|
|
@@ -119,7 +119,7 @@ process.stdin.on('end', () => {
|
|
|
119
119
|
if (resolution.ambiguous || !resolution.match) {
|
|
120
120
|
console.error(`[Contract Test] Ambiguous Fable check command matched ${runMatches.length} active run contract(s): ${command}`);
|
|
121
121
|
console.error('No contract was mutated. Correlate the worker/session to one run before accepting this check.');
|
|
122
|
-
process.exit(
|
|
122
|
+
process.exit(0);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
const entry = resolution.match;
|
|
@@ -127,14 +127,14 @@ process.stdin.on('end', () => {
|
|
|
127
127
|
const worker = getWorkerId(payload);
|
|
128
128
|
if (!worker || (entry.contract.workerId && worker !== entry.contract.workerId)) {
|
|
129
129
|
console.error('[Contract Test] Active workflow check lacks a matching observed worker identity.');
|
|
130
|
-
process.exit(
|
|
130
|
+
process.exit(0);
|
|
131
131
|
}
|
|
132
132
|
for (const id of entry.contract.dependsOn || []) {
|
|
133
133
|
const dependency = JSON.parse(fs.readFileSync(path.join(entry.runRoot, 'contracts', `${id}.json`), 'utf8'));
|
|
134
134
|
const escaped = workflowContext.workflow.escapes?.some(item => item.stageId === id && item.runId === entry.contract.runId);
|
|
135
135
|
if (dependency.status !== 'pass' && !escaped) {
|
|
136
136
|
console.error('[Contract Test] Dependency has not passed: ' + id);
|
|
137
|
-
process.exit(
|
|
137
|
+
process.exit(0);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
}
|
|
@@ -164,12 +164,9 @@ process.stdin.on('end', () => {
|
|
|
164
164
|
}
|
|
165
165
|
console.log(`[Contract Test] ${contract.planId}/${contract.runId}/${contract.stageId}: ${contract.status.toUpperCase()} ${contract.checkCommand}`);
|
|
166
166
|
if (contract.status === 'fail') {
|
|
167
|
-
if (workflowContext.workflow?.workflowId) {
|
|
168
|
-
recordBudgetEvent(workflowContext, 'revision', { evidence: `${contract.stageId}:${contract.evidence || 'verification-failed'}` });
|
|
169
|
-
}
|
|
170
167
|
console.error(`Evidence: ${contract.evidence || '(no output captured)'}`);
|
|
171
|
-
console.error(`
|
|
172
|
-
process.exit(
|
|
168
|
+
console.error(`Review this failed stage before relying on its output. Artifact: ${contract.outputPath || '(no path recorded)'}`);
|
|
169
|
+
process.exit(0);
|
|
173
170
|
}
|
|
174
171
|
process.exit(0);
|
|
175
172
|
}
|
|
@@ -179,12 +176,12 @@ process.stdin.on('end', () => {
|
|
|
179
176
|
const legacy = resolveLegacyContract(stateRoot, command, payload);
|
|
180
177
|
if (legacy && legacy.ambiguous) {
|
|
181
178
|
console.error(`[Contract Test] Ambiguous legacy stage contracts matched: ${command}`);
|
|
182
|
-
process.exit(
|
|
179
|
+
process.exit(0);
|
|
183
180
|
}
|
|
184
181
|
if (legacy && legacy.failed) {
|
|
185
182
|
console.error(`[Contract Test] Legacy stage "${legacy.contract.stageId}" FAILED its named check: ${legacy.contract.checkCommand}`);
|
|
186
183
|
console.error(`Evidence: ${legacy.contract.evidence || '(no output captured)'}`);
|
|
187
|
-
process.exit(
|
|
184
|
+
process.exit(0);
|
|
188
185
|
}
|
|
189
186
|
process.exit(0);
|
|
190
187
|
} catch (_) {
|
|
@@ -52,10 +52,10 @@ process.stdin.on('end', () => {
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
if (!wasRead) {
|
|
55
|
-
console.error(`[Depth
|
|
55
|
+
console.error(`[Depth Reminder]: "${filePath}" already exists but hasn't been Read in this session.`);
|
|
56
56
|
console.error(`Write() overwrites the whole file - doing that blind risks destroying content you never looked at.`);
|
|
57
57
|
console.error(`Read the file first (even a quick pass), then retry the Write, or use Edit for a targeted change.`);
|
|
58
|
-
process.exit(
|
|
58
|
+
process.exit(0);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
process.exit(0);
|