harness-everything 0.54.0 → 0.54.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/CHANGELOG.md +8 -0
- package/ci/action-gate.test.js +1 -1
- package/ci/mechanism-2at-fable-execution-phases.test.js +38 -0
- package/ci/mechanism-codex-hook-results.test.js +145 -0
- package/ci/openai-plugin-runtime.test.js +2 -1
- package/ci/prompt-contract-regressions.test.js +6 -2
- package/docs/platform-capabilities.md +17 -0
- package/fable-mode/SKILL.md +5 -5
- 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/references/execution-phases.md +26 -4
- package/hooks/scripts/action-gate.js +5 -0
- package/hooks/scripts/codex-action-gate-post.js +3 -12
- package/hooks/scripts/contract-test.js +17 -7
- package/hooks/scripts/lib/codex-tool-outcome.js +28 -0
- package/hooks/scripts/rule-of-3-tracker.js +11 -4
- package/hooks/scripts/state-persist.js +15 -9
- package/hooks/scripts/subagent-scope-guard.js +32 -25
- package/hooks/scripts/subagent-start.js +1 -1
- package/hooks/scripts/subagent-stop.js +14 -3
- 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 +6 -6
- package/plugins/harness-everything/hooks/scripts/action-gate.js +5 -0
- package/plugins/harness-everything/hooks/scripts/codex-action-gate-post.js +3 -12
- package/plugins/harness-everything/hooks/scripts/contract-test.js +17 -7
- package/plugins/harness-everything/hooks/scripts/lib/codex-tool-outcome.js +28 -0
- package/plugins/harness-everything/hooks/scripts/rule-of-3-tracker.js +11 -4
- package/plugins/harness-everything/hooks/scripts/state-persist.js +15 -9
- package/plugins/harness-everything/hooks/scripts/subagent-scope-guard.js +32 -25
- package/plugins/harness-everything/hooks/scripts/subagent-start.js +1 -1
- package/plugins/harness-everything/hooks/scripts/subagent-stop.js +14 -3
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/fable-mode/SKILL.md +5 -5
- 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/references/execution-phases.md +26 -4
- package/sbom.cdx.json +7 -7
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* newly changed paths as declared, ambiguous, or out-of-scope. Machine-
|
|
9
9
|
* readable write sets may therefore clear expected changes without weakening
|
|
10
10
|
* the conservative legacy path: when no stage contract exists, any new
|
|
11
|
-
* change still
|
|
11
|
+
* change still emits a reminder and requires explicit review.
|
|
12
12
|
*
|
|
13
13
|
* `writeSet: []` means read-only. Worker attribution is used when the host
|
|
14
14
|
* exposes a worker/subagent id and the stage contract records the same id;
|
|
@@ -106,15 +106,13 @@ function classifyChanges(newlyChanged, declaredContracts, payload) {
|
|
|
106
106
|
return { workerId: workerId || null, expected, ambiguous, outOfScope };
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
process.stdin.on('data', chunk => { inputData += chunk; });
|
|
111
|
-
process.stdin.on('end', () => {
|
|
109
|
+
function inspectScope(inputData, { info, warn }) {
|
|
112
110
|
try {
|
|
113
111
|
const payload = JSON.parse(inputData);
|
|
114
112
|
const event = payload.hook_event_name;
|
|
115
113
|
const toolName = payload.tool_name || payload.tool;
|
|
116
114
|
const isSubagentEvent = event === 'SubagentStart' || event === 'SubagentStop';
|
|
117
|
-
if (!isSubagentEvent && toolName !== 'Task' && toolName !== 'Agent')
|
|
115
|
+
if (!isSubagentEvent && toolName !== 'Task' && toolName !== 'Agent') return;
|
|
118
116
|
|
|
119
117
|
const root = getWorkspaceRoot(payload);
|
|
120
118
|
const sessionId = getSessionId(payload);
|
|
@@ -134,17 +132,17 @@ process.stdin.on('end', () => {
|
|
|
134
132
|
});
|
|
135
133
|
}
|
|
136
134
|
}
|
|
137
|
-
|
|
135
|
+
return;
|
|
138
136
|
}
|
|
139
137
|
|
|
140
138
|
if (event === 'PostToolUse' || event === 'SubagentStop') {
|
|
141
139
|
accountWorker(payload, event);
|
|
142
|
-
if (!fs.existsSync(stateFile))
|
|
140
|
+
if (!fs.existsSync(stateFile)) return;
|
|
143
141
|
|
|
144
142
|
let state;
|
|
145
|
-
try { state = JSON.parse(fs.readFileSync(stateFile, 'utf8')); } catch (_) {
|
|
143
|
+
try { state = JSON.parse(fs.readFileSync(stateFile, 'utf8')); } catch (_) { return; }
|
|
146
144
|
const current = gitStatus(root);
|
|
147
|
-
if (current === null)
|
|
145
|
+
if (current === null) return;
|
|
148
146
|
|
|
149
147
|
const baselineLines = new Set(String(state.baseline || '').split('\n').filter(Boolean));
|
|
150
148
|
const currentLines = current.split('\n').filter(Boolean);
|
|
@@ -161,20 +159,20 @@ process.stdin.on('end', () => {
|
|
|
161
159
|
atomicWriteJson(path.join(sessionDir, 'subagent-scope-last.json'), audit);
|
|
162
160
|
|
|
163
161
|
if (newlyChanged.length === 0) {
|
|
164
|
-
|
|
162
|
+
info('[Subagent Scope Reminder] No new changed files detected during the subagent burst.');
|
|
165
163
|
} else if (declaredContracts.length === 0) {
|
|
166
|
-
|
|
167
|
-
newlyChanged.forEach(line =>
|
|
168
|
-
|
|
164
|
+
warn(`[Subagent Scope Reminder] ${newlyChanged.length} file(s) changed with no machine-readable writeSet contract:`);
|
|
165
|
+
newlyChanged.forEach(line => warn(` ${line}`));
|
|
166
|
+
warn('Semantic MUST: reconcile every changed path against the declared scope before trusting or committing this output.');
|
|
169
167
|
} else {
|
|
170
168
|
for (const entry of classified.expected) {
|
|
171
|
-
|
|
169
|
+
info(`[Subagent Scope Reminder] in-scope ${entry.statusLine} -> ${entry.planId}/${entry.runId}/${entry.stageId}${entry.workerId ? ` worker=${entry.workerId}` : ''}`);
|
|
172
170
|
}
|
|
173
171
|
for (const entry of classified.ambiguous) {
|
|
174
|
-
|
|
172
|
+
warn(`[Subagent Scope Reminder] ambiguous scope ${entry.statusLine}; matches ${entry.stages.map(stage => `${stage.runId}/${stage.stageId}`).join(', ')}`);
|
|
175
173
|
}
|
|
176
174
|
for (const entry of classified.outOfScope) {
|
|
177
|
-
|
|
175
|
+
warn(`[Subagent Scope Reminder] OUT-OF-SCOPE ${entry.statusLine}${entry.workerId ? ` worker=${entry.workerId}` : ''}; MUST reconcile/revert or explicitly re-authorize scope before accepting the result.`);
|
|
178
176
|
}
|
|
179
177
|
}
|
|
180
178
|
|
|
@@ -188,24 +186,33 @@ process.stdin.on('end', () => {
|
|
|
188
186
|
? newlyChanged.length > 0
|
|
189
187
|
: classified.ambiguous.length > 0 || classified.outOfScope.length > 0;
|
|
190
188
|
if (violated) {
|
|
191
|
-
|
|
192
|
-
process.exit(0);
|
|
189
|
+
warn('Do not "git add -A"; stage files explicitly so unexpected paths stay visible.');
|
|
193
190
|
}
|
|
194
|
-
process.exit(0);
|
|
195
191
|
}
|
|
196
|
-
|
|
197
|
-
process.exit(0);
|
|
198
192
|
} catch (error) {
|
|
199
193
|
if (error && error.code === 'HARNESS_WORKFLOW_BUDGET') {
|
|
200
|
-
|
|
201
|
-
|
|
194
|
+
warn(`[Subagent Scope Reminder] ${error.message}`);
|
|
195
|
+
return;
|
|
202
196
|
}
|
|
203
197
|
// This is otherwise a post-execution visibility gate. Runtime errors fail open;
|
|
204
198
|
// actionGate has a stricter fail-ask policy for side effects.
|
|
205
|
-
|
|
199
|
+
return;
|
|
206
200
|
}
|
|
207
|
-
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function run({ info = console.log, warn = console.error, complete = () => {} } = {}) {
|
|
204
|
+
let inputData = '';
|
|
205
|
+
process.stdin.setEncoding('utf8');
|
|
206
|
+
process.stdin.on('data', chunk => { inputData += chunk; });
|
|
207
|
+
process.stdin.on('end', () => {
|
|
208
|
+
inspectScope(inputData, { info, warn });
|
|
209
|
+
complete();
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (require.main === module) run();
|
|
208
214
|
|
|
209
215
|
module.exports = {
|
|
210
216
|
classifyChanges,
|
|
217
|
+
run,
|
|
211
218
|
};
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
const { run } = require('./subagent-scope-guard');
|
|
5
|
+
|
|
6
|
+
// Codex accepts warnings through systemMessage on SubagentStop. Keep the
|
|
7
|
+
// audit advisory and leave stdout empty when there is nothing to reconcile.
|
|
8
|
+
const warnings = [];
|
|
9
|
+
run({
|
|
10
|
+
info() {},
|
|
11
|
+
warn(message) { warnings.push(message); },
|
|
12
|
+
complete() {
|
|
13
|
+
if (warnings.length > 0) {
|
|
14
|
+
process.stdout.write(JSON.stringify({ systemMessage: warnings.join('\n') }) + '\n');
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "harness-everything",
|
|
4
|
-
"version": "0.54.
|
|
4
|
+
"version": "0.54.1",
|
|
5
5
|
"description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Miya Daniel",
|
|
@@ -4,7 +4,7 @@ description: "Stage large tasks through plans, named fable agents, failable chec
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.54.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Fable Mode
|
|
@@ -34,10 +34,10 @@ For explanation/profile-only lookup, read only `<this-skill-dir>/references/prof
|
|
|
34
34
|
## Workflow
|
|
35
35
|
|
|
36
36
|
1. Discover the runtime and lock the authorized file scope before edits.
|
|
37
|
-
2.
|
|
38
|
-
3.
|
|
39
|
-
4. Delegate by profile: orchestrator coordinates, reasoning takes bounded judgment, mechanical takes low-ambiguity work; workers never spawn workers.
|
|
37
|
+
2. Plan via `<this-skill-dir>/references/execution-phases.md`.
|
|
38
|
+
3. Use `model-selector.js`.
|
|
39
|
+
4. Delegate by profile: orchestrator coordinates, reasoning takes bounded judgment, mechanical takes low-ambiguity work; workers never spawn workers. Before Codex dispatch, load/apply `<this-skill-dir>/references/execution-phases.md#verification-and-handoff`.
|
|
40
40
|
5. The host runtime-model floor is advisory; record it, never block on model choice alone.
|
|
41
|
-
6. Run stage checks, cold-review high-stakes artifacts, and audit profile/runtime/fallback fields.
|
|
41
|
+
6. On every Codex handoff or silent stop, load/apply `<this-skill-dir>/references/execution-phases.md#verification-and-handoff` before accepting results or releasing dependent stages. Run stage checks, cold-review high-stakes artifacts, and audit profile/runtime/fallback fields.
|
|
42
42
|
|
|
43
43
|
Deep dive: <this-skill-dir>/references/model-matrix.md
|
|
@@ -17,13 +17,18 @@ flowchart TD
|
|
|
17
17
|
Read relevant files and sources before producing an artifact. Record the
|
|
18
18
|
authorized write scope. Give each stage an objective, dependencies, write set,
|
|
19
19
|
expected output, exact check command, and pass condition. Required and optional
|
|
20
|
-
bindings belong on the stage that needs them.
|
|
21
|
-
three same-signature failures, use Rule-of-3
|
|
20
|
+
bindings belong on the stage that needs them. Replans are advisory and do not
|
|
21
|
+
halt tools or Stop; after three same-signature failures, use Rule-of-3
|
|
22
|
+
`zoom-out`.
|
|
22
23
|
|
|
23
24
|
## Profiles and delegation
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
See the [model matrix](model-matrix.md) for profile details.
|
|
27
|
+
|
|
28
|
+
Resolve a requested behavior profile with Fable's `model-selector.js` and
|
|
29
|
+
record it separately from the runtime choice. `opus`, `sonnet`/`sonnect`, and
|
|
30
|
+
`haiku` are compatibility aliases for behavior profiles, not model bindings.
|
|
31
|
+
`fable-orchestrator`,
|
|
27
32
|
`fable-worker-sonnet`, and `fable-worker-haiku` name coordination,
|
|
28
33
|
reasoning/synthesis, and mechanical-work roles. These are behavior-profile
|
|
29
34
|
aliases; they do not switch the runtime model. Preserve an explicit user or
|
|
@@ -104,3 +109,20 @@ Run each named check and review scope-guard evidence before delivery. When the
|
|
|
104
109
|
selected plan requires independent verification, the verifier is read-only and
|
|
105
110
|
uses a distinct worker identity after all other stages pass. Record a blocker
|
|
106
111
|
or an evidence-backed result; do not discard unresolved requirements.
|
|
112
|
+
|
|
113
|
+
For Codex subagents, the coordinator MUST reconcile scope before accepting a
|
|
114
|
+
result or using it in a dependent stage, even if the stage check passed.
|
|
115
|
+
|
|
116
|
+
1. Before dispatch, capture the worker worktree's starting state, including
|
|
117
|
+
existing local changes. At handoff, compare the committed, staged, unstaged,
|
|
118
|
+
and untracked changes since dispatch with the stage's declared `writeSet`.
|
|
119
|
+
2. For unexpected or ambiguously attributed changes, establish ownership and
|
|
120
|
+
record the disposition. Exclude the changes from the result, revert only
|
|
121
|
+
attributable worker changes when authorized, or obtain explicit approval for
|
|
122
|
+
a scope change and follow the replanning rules. Record a blocker if the
|
|
123
|
+
coordinator cannot reconcile a path.
|
|
124
|
+
|
|
125
|
+
Run this check after every handoff, including silent stops. The Codex warning
|
|
126
|
+
and `subagent-scope-last.json` describe the latest hook observation. A clean
|
|
127
|
+
observation can replace an earlier warning while the corresponding change is
|
|
128
|
+
still present.
|
package/sbom.cdx.json
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
"$schema": "https://cyclonedx.org/schema/bom-1.7.schema.json",
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.7",
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:6ba544c0-8daa-5aff-b49e-eb42f5255dd2",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-20T02:06:23.594Z",
|
|
9
9
|
"tools": [
|
|
10
10
|
{
|
|
11
11
|
"vendor": "Harness Everything",
|
|
12
12
|
"name": "generate-sbom.js",
|
|
13
|
-
"version": "0.54.
|
|
13
|
+
"version": "0.54.1"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "application",
|
|
18
|
-
"bom-ref": "pkg:npm/harness-everything@0.54.
|
|
18
|
+
"bom-ref": "pkg:npm/harness-everything@0.54.1",
|
|
19
19
|
"name": "harness-everything",
|
|
20
|
-
"version": "0.54.
|
|
21
|
-
"purl": "pkg:npm/harness-everything@0.54.
|
|
20
|
+
"version": "0.54.1",
|
|
21
|
+
"purl": "pkg:npm/harness-everything@0.54.1"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [
|
|
@@ -2033,7 +2033,7 @@
|
|
|
2033
2033
|
]
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
2036
|
-
"ref": "pkg:npm/harness-everything@0.54.
|
|
2036
|
+
"ref": "pkg:npm/harness-everything@0.54.1",
|
|
2037
2037
|
"dependsOn": [
|
|
2038
2038
|
"pkg:npm/%40commitlint/cli@19.8.1",
|
|
2039
2039
|
"pkg:npm/%40commitlint/config-conventional@19.8.1",
|