harness-everything 1.3.1 → 1.3.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.
Files changed (101) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/AGENTS.md +1 -1
  4. package/CHANGELOG.md +8 -0
  5. package/behavioral-evals/ledger-pairs/README.md +53 -0
  6. package/behavioral-evals/ledger-pairs/arm.js +359 -0
  7. package/behavioral-evals/ledger-pairs/fixture.js +138 -0
  8. package/behavioral-evals/ledger-pairs/preflight.js +96 -0
  9. package/behavioral-evals/ledger-pairs/score.js +155 -0
  10. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/README.md +108 -0
  11. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-1-baseline/arm-plan.json +14 -0
  12. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-1-baseline/arm-result.json +35 -0
  13. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-1-treatment/arm-plan.json +14 -0
  14. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-1-treatment/arm-result.json +35 -0
  15. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-2-baseline/arm-plan.json +14 -0
  16. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-2-baseline/arm-result.json +35 -0
  17. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-2-treatment/arm-plan.json +14 -0
  18. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-2-treatment/arm-result.json +35 -0
  19. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-3-baseline/arm-plan.json +14 -0
  20. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-3-baseline/arm-result.json +35 -0
  21. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-3-treatment/arm-plan.json +14 -0
  22. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-3-treatment/arm-result.json +35 -0
  23. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-4-baseline/arm-plan.json +14 -0
  24. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-4-baseline/arm-result.json +28 -0
  25. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-4-treatment/arm-plan.json +14 -0
  26. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/agy/pair-4-treatment/arm-result.json +35 -0
  27. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-1-baseline/arm-plan.json +13 -0
  28. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-1-baseline/arm-result.json +56 -0
  29. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-1-treatment/arm-plan.json +13 -0
  30. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-1-treatment/arm-result.json +56 -0
  31. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-2-baseline/arm-plan.json +13 -0
  32. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-2-baseline/arm-result.json +56 -0
  33. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-2-treatment/arm-plan.json +13 -0
  34. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-2-treatment/arm-result.json +56 -0
  35. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-3-baseline/arm-plan.json +13 -0
  36. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-3-baseline/arm-result.json +49 -0
  37. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-3-treatment/arm-plan.json +13 -0
  38. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-3-treatment/arm-result.json +49 -0
  39. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-4-baseline/arm-plan.json +13 -0
  40. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-4-baseline/arm-result.json +49 -0
  41. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-4-treatment/arm-plan.json +13 -0
  42. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/codex/pair-4-treatment/arm-result.json +56 -0
  43. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-1-baseline/arm-plan.json +14 -0
  44. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-1-baseline/arm-result.json +44 -0
  45. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-1-baseline/receipt.jsonl +17 -0
  46. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-1-treatment/arm-plan.json +14 -0
  47. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-1-treatment/arm-result.json +41 -0
  48. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-1-treatment/receipt.jsonl +58 -0
  49. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-2-baseline/arm-plan.json +14 -0
  50. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-2-baseline/arm-result.json +50 -0
  51. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-2-baseline/receipt.jsonl +101 -0
  52. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-2-treatment/arm-plan.json +14 -0
  53. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-2-treatment/arm-result.json +44 -0
  54. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-2-treatment/receipt.jsonl +29 -0
  55. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-3-baseline/arm-plan.json +14 -0
  56. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-3-baseline/arm-result.json +44 -0
  57. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-3-baseline/receipt.jsonl +23 -0
  58. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-3-treatment/arm-plan.json +14 -0
  59. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-3-treatment/arm-result.json +34 -0
  60. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-3-treatment/receipt.jsonl +24 -0
  61. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-4-baseline/arm-plan.json +14 -0
  62. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-4-baseline/arm-result.json +47 -0
  63. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-4-baseline/receipt.jsonl +69 -0
  64. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-4-treatment/arm-plan.json +14 -0
  65. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-4-treatment/arm-result.json +44 -0
  66. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/opencode/pair-4-treatment/receipt.jsonl +65 -0
  67. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/run-order.sh +18 -0
  68. package/benchmarks/results/live-host/ledger-pairs-2026-11-28/score.json +1032 -0
  69. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/README.md +50 -0
  70. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/collect-rerun.txt +3 -0
  71. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/export-report.json +22 -0
  72. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/host-version.txt +1 -0
  73. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/import-report-1.json +18 -0
  74. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/import-report-2.json +18 -0
  75. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/labels-observed-excerpt.jsonl +2 -0
  76. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/observations-index-excerpt.json +26 -0
  77. package/benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/plugin-load-lines.txt +1 -0
  78. package/benchmarks/results/live-host/opencode-2026-11-28-450-steering-trace/README.md +46 -0
  79. package/benchmarks/results/live-host/opencode-2026-11-28-450-steering-trace/observations-index-excerpt.json +16 -0
  80. package/benchmarks/results/live-host/opencode-2026-11-28-450-steering-trace/plugin-load-lines.txt +2 -0
  81. package/benchmarks/results/live-host/opencode-2026-11-28-450-steering-trace/run-marks.txt +6 -0
  82. package/benchmarks/results/live-host/opencode-2026-11-28-450-steering-trace/steering-probe.js +16 -0
  83. package/benchmarks/results/live-host/opencode-2026-11-28-450-steering-trace/steering-trace.jsonl +167 -0
  84. package/ci/mechanism-332-fable-directive.test.js +180 -0
  85. package/ci/mechanism-552-ledger-pairs.test.js +159 -0
  86. package/ci/router-workflow-plan.test.js +61 -21
  87. package/docs/platform-capabilities.md +28 -11
  88. package/docs/platform-compatibility.json +5 -5
  89. package/harness-everything/SKILL.md +1 -1
  90. package/harness-everything/scripts/routing-keywords.json +0 -2
  91. package/harness-everything/scripts/tier-router.js +105 -11
  92. package/opencode-plugin/plugin.json +1 -1
  93. package/package.json +1 -1
  94. package/plugins/harness-everything/.antigravity-plugin/plugin.json +1 -1
  95. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  96. package/plugins/harness-everything/plugin.json +1 -1
  97. package/plugins/harness-everything/rules/AGENTS.md +1 -1
  98. package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
  99. package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +0 -2
  100. package/plugins/harness-everything/skills/harness-everything/scripts/tier-router.js +105 -11
  101. package/sbom.cdx.json +7 -7
@@ -141,26 +141,120 @@ function isFableProfileLookup(prompt, hasMacroSignal) {
141
141
  return true;
142
142
  }
143
143
 
144
- function detectExplicitStrategy(prompt, requestedFableModel) {
144
+ const FABLE_STRATEGIES = [
145
+ ['fable-multi-agent-workspace', /\bfable[- ]multi[- ]agent[- ]workspace\b|\bmulti[- ]agent workspace\b/i],
146
+ ['fable-parallel', /\bfable[- ]parallel\b|\bparallel fable\b/i],
147
+ ['fable-staged', /\bfable[- ]staged\b|\bstaged fable\b/i],
148
+ ];
149
+ const FABLE_PROHIBITION = /\b(?:no|without|do\s+not|don't|never|cannot|can't|not)\s+(?:use\s+)?fable(?:[- ]mode)?\b|(?:不要|不需要|無需|無須|不必|毋須|不用|別|勿|請勿|避免|停止|不)\s*(?:使用|用|啟用|進入|執行)?\s*fable(?:[- ]mode)?/i;
150
+ const FABLE_REQUEST_PREFIX = /^(?:(?:please|let's|now|could\s+you(?:\s+please)?|would\s+you(?:\s+please)?)\s+|(?:請|幫我|麻煩)\s*)*/i;
151
+ const FABLE_REQUEST_VERB = /^(?:use|run|enter)\s+fable(?:[- ]mode)?\b|^(?:使用|用|啟用|進入|執行|改用)\s*fable(?:[- ]mode)?/i;
152
+ const FABLE_NAMED_REQUEST = /^(?:use|run|enter|改用)\s+(fable[- ](?:multi[- ]agent[- ]workspace|parallel|staged))\b/i;
153
+ const FABLE_PROFILE_REQUEST = /^(?:use|run|enter|改用)\s+fable(?:[- ]mode)?\s+(?:on|with)\s+(haiku|sonnet|sonnect|opus)\b/i;
154
+
155
+ function splitFableDirectiveClauses(prompt) {
156
+ const text = String(prompt || '');
157
+ const parts = [];
158
+ let part = '';
159
+ let quote = null;
160
+ const push = () => {
161
+ if (part.trim()) parts.push(part.trim());
162
+ part = '';
163
+ };
164
+ const wordSeparators = /^(?:and\s+then|and|then|also|plus|afterwards|additionally|but|並且|並|以及|接著|然後|另外)/iu;
165
+
166
+ for (let i = 0; i < text.length; i += 1) {
167
+ const char = text[i];
168
+ if (quote) {
169
+ if (char === quote) quote = null;
170
+ part += char;
171
+ continue;
172
+ }
173
+ if (char === '"' || char === '`' || char === '“' || char === '‘' ||
174
+ (char === "'" && !/[\p{L}\p{N}]/u.test(text[i - 1] || '') && /[\p{L}\p{N}]/u.test(text[i + 1] || ''))) {
175
+ quote = char === '“' ? '”' : char === '‘' ? '’' : char;
176
+ part += char;
177
+ continue;
178
+ }
179
+ if (/[;!??!,,;。、…]/u.test(char) || (char === '.' && (i + 1 === text.length || /\s/u.test(text[i + 1])))) {
180
+ push();
181
+ continue;
182
+ }
183
+ const word = text.slice(i).match(wordSeparators);
184
+ if (word && (i === 0 || /\s/u.test(text[i - 1])) &&
185
+ (i + word[0].length === text.length || /\s/u.test(text[i + word[0].length]))) {
186
+ push();
187
+ i += word[0].length - 1;
188
+ continue;
189
+ }
190
+ part += char;
191
+ }
192
+ push();
193
+ return parts;
194
+ }
195
+
196
+ function detectFableRequest(clause) {
197
+ const directive = String(clause || '').trim().replace(FABLE_REQUEST_PREFIX, '').trim();
198
+ const named = FABLE_STRATEGIES.find(([, pattern]) => new RegExp(`^(?:${pattern.source})`, 'i').test(directive));
199
+ if (named) return { strategy: named[0], profile: null };
200
+ const namedRequest = directive.match(FABLE_NAMED_REQUEST);
201
+ if (namedRequest) {
202
+ const requested = FABLE_STRATEGIES.find(([strategy]) => strategy === namedRequest[1].toLowerCase().replace(/ /g, '-'));
203
+ if (requested) return { strategy: requested[0], profile: null };
204
+ }
205
+ const profile = directive.match(new RegExp(`^(?:${FABLE_PROFILE_INVOCATION.source})`, 'i'));
206
+ if (profile) return { strategy: 'fable-staged', profile: (profile[1] || profile[2]).toLowerCase() };
207
+ const requestedProfile = directive.match(FABLE_PROFILE_REQUEST);
208
+ if (requestedProfile) return { strategy: 'fable-staged', profile: requestedProfile[1].toLowerCase() };
209
+ if (FABLE_REQUEST_VERB.test(directive)) return { strategy: 'fable-staged', profile: null };
210
+ return { strategy: null, profile: null };
211
+ }
212
+
213
+ function detectFableDirective(prompt) {
214
+ const clauses = splitFableDirectiveClauses(prompt);
215
+ let strategy = null;
216
+ let profile = null;
217
+ let prohibited = false;
218
+ for (const clause of clauses) {
219
+ const negated = FABLE_PROHIBITION.test(clause);
220
+ if (negated) prohibited = true;
221
+ if (negated || strategy) continue;
222
+ const request = detectFableRequest(clause);
223
+ if (request.strategy) {
224
+ strategy = request.strategy;
225
+ profile = request.profile;
226
+ }
227
+ }
228
+ if (!strategy) {
229
+ const linkedContinuations = clauses.slice(0, -1).flatMap((clause, index) => {
230
+ if (!isFableProfileLookup(clause, false) || !/^run\s+it\b/i.test(clauses[index + 1])) return [];
231
+ const matches = clause.match(new RegExp(FABLE_PROFILE_INVOCATION.source, 'gi')) || [];
232
+ return matches.length === 1 ? [detectFableModel(clause)] : [];
233
+ });
234
+ if (linkedContinuations.length === 1) {
235
+ strategy = 'fable-staged';
236
+ profile = linkedContinuations[0];
237
+ }
238
+ }
239
+ return { strategy, prohibited, profile };
240
+ }
241
+
242
+ function detectExplicitStrategy(prompt) {
145
243
  if (/\bdirect[- ]single\b/i.test(prompt)) return 'direct-single';
146
244
  if (/\biterative[- ]single\b/i.test(prompt)) return 'iterative-single';
147
- if (/\bfable[- ]multi[- ]agent[- ]workspace\b|\bmulti[- ]agent workspace\b/i.test(prompt)) return 'fable-multi-agent-workspace';
148
- if (/\bfable[- ]parallel\b|\bparallel fable\b/i.test(prompt)) return 'fable-parallel';
149
- if (/\bfable[- ]staged\b|\bstaged fable\b/i.test(prompt)) return 'fable-staged';
150
- if (requestedFableModel || /\b(?:use|run|enter)\s+fable(?:[- ]mode)?\b/i.test(prompt)) return 'fable-staged';
151
- return null;
245
+ return detectFableDirective(prompt).strategy;
152
246
  }
153
247
 
154
248
  function detectProhibitions(prompt) {
249
+ const fableDirective = detectFableDirective(prompt);
155
250
  const rules = [
156
- ['fable', /\b(?:no|without|do not|don't)\s+(?:use\s+)?fable\b/i],
157
251
  ['subagents', /\b(?:no|without|do not|don't)\s+(?:use\s+)?subagents?\b|\bsingle[- ]agent only\b/i],
158
252
  ['parallel', /\b(?:no|without|do not|don't)\s+(?:use\s+)?parallel(?:ism| execution)?\b|\bdo not parallelize\b|\bserial only\b/i],
159
253
  ['workspace', /\b(?:no|without|do not|don't)\s+(?:use\s+)?(?:multi[- ]agent )?workspace\b/i],
160
254
  ['memory', /\b(?:no|without|do not|don't)\s+(?:use\s+)?memory\b/i],
161
255
  ['ensemble', /\b(?:no|without|do not|don't)\s+(?:use\s+)?ensemble\b/i],
162
256
  ];
163
- return rules.filter(([, regex]) => regex.test(prompt)).map(([name]) => name);
257
+ return [...(fableDirective.prohibited ? ['fable'] : []), ...rules.filter(([, regex]) => regex.test(prompt)).map(([name]) => name)];
164
258
  }
165
259
 
166
260
  function detectMemoryPersistenceRequest(prompt) {
@@ -348,7 +442,7 @@ function run(userPrompt, context, options = {}) {
348
442
  const structuralFloor = hasMacroSignal ? 'tier3'
349
443
  : !isTrivialDocsEdit && hasMultipleTasks && hasMultipleSentences ? 'tier2' : null;
350
444
  const routeInput = { prompt: userPrompt, tier: recommendedTier, floor: structuralFloor,
351
- explicit: profileLookup || Boolean(detectExplicitStrategy(userPrompt, detectFableModel(userPrompt))) };
445
+ explicit: profileLookup || Boolean(detectExplicitStrategy(userPrompt)) };
352
446
  const liveMode = process.env.HARNESS_SYSTEM_ONE_MODE === 'live';
353
447
  const semantic = liveMode ? routeLive(routeInput, options.systemOneResult)
354
448
  : selectTier(routeInput, process.env, options.systemOneScorer || undefined);
@@ -369,7 +463,7 @@ function run(userPrompt, context, options = {}) {
369
463
  console.log(`\n=> RECOMMENDED TIER: ${recommendedTier}`);
370
464
  console.log(`=> RATIONALE: ${rationale}`);
371
465
 
372
- const requestedFableModel = detectFableModel(promptLower);
466
+ const requestedFableModel = profileLookup ? detectFableModel(promptLower) : detectFableDirective(userPrompt).profile;
373
467
  if (requestedFableModel) {
374
468
  console.log(`\n=> REQUESTED FABLE PROFILE: ${requestedFableModel}`);
375
469
  console.log(`=> ROUTE: fable-mode/SKILL.md`);
@@ -431,7 +525,7 @@ function run(userPrompt, context, options = {}) {
431
525
  const actionGateReasonCodes = detectActionGateReasons(userPrompt);
432
526
  const irreversibleAction = actionGateReasonCodes.includes('irreversible-action');
433
527
  const externalSideEffect = actionGateReasonCodes.includes('external-side-effect');
434
- const requestedStrategy = profileLookup ? null : detectExplicitStrategy(userPrompt, requestedFableModel);
528
+ const requestedStrategy = profileLookup ? null : detectExplicitStrategy(userPrompt);
435
529
  const prohibitions = detectProhibitions(userPrompt);
436
530
  const plannerInputs = plannerInputsFromContext(context, promptLower);
437
531
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-enforcement",
3
3
  "description": "Repository inventory for the opencode enforcement plugin and its standalone helper",
4
- "version": "1.3.1",
4
+ "version": "1.3.2",
5
5
  "runtime": "index.mjs",
6
6
  "hooks": {
7
7
  "verify": "hooks/verify.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
5
5
  "main": "harness-everything/scripts/bootstrap.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -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": "1.3.1",
4
+ "version": "1.3.2",
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",
@@ -55,7 +55,7 @@ flowchart LR
55
55
  - New features, fixes, tests, and host compatibility work target V2 only. No V1 public entrypoint, V1-only event fallback, V1 hook registration, or compatibility mode may be added.
56
56
  - Retain historical V1 artifacts, but never promote them to current V2 capability evidence.
57
57
  - Reintroducing V1 support requires an explicit owner-approved support-contract change; it is not a routine compatibility fix.
58
- - State the V2 API family as the supported boundary. Tested V2 versions are recorded separately (`2.1.3` server-log load-only; `2.1.4` limited session workspace trace; and one isolated `2.1.4` macOS 26.6.2 [V2 lifecycle trace](benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md) establishing V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded`, and completion → verification → reminder delivery on a long-lived server — standalone `opencode run` exits before verification finishes; router/context injection, observations, ledger lessons, session create/delete reset, cancellation, global scope, npm install, and other versions/OSes were not exercised); none establishes a validated minimum patch version or coverage of every V2 release.
58
+ - State the V2 API family as the supported boundary. Tested V2 versions are recorded separately (`2.1.3` server-log load-only; `2.1.4` limited session workspace trace; one isolated `2.1.4` macOS 26.6.2 [V2 lifecycle trace](benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md) establishing V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded`, and completion → verification → reminder delivery on a long-lived server — standalone `opencode run` exits before verification finishes; and two isolated `2.4.1` macOS 26.7.3 long-lived server runs: [turn → export trace](benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/README.md) establishing observation recording + idempotent training export, with router/context injection indirectly observed (model emitted the injected label contract) rather than a full injection trace, and [steering trace](benchmarks/results/live-host/opencode-2026-11-28-450-steering-trace/README.md) establishing mid-turn live steering delivery shape as witness-only for #450; ledger lessons, session create/delete reset, cancellation, global scope, npm install, and other versions/OSes remain unverified); none establishes a validated minimum patch version or coverage of every V2 release.
59
59
 
60
60
  **Historical / unsupported V1 evidence:** the retained [OpenCode evidence](benchmarks/results/live-host/opencode-2026-09-16/README.md) documents project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS). It is preserved as historical/unsupported evidence only and does not establish current V2 capability:
61
61
 
@@ -4,7 +4,7 @@ description: "Route software/project work through Harness: classify tier/topolog
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 1.2.2
7
+ version: 1.3.2
8
8
  ---
9
9
 
10
10
  # Harness Everything
@@ -28,8 +28,6 @@
28
28
  "subagent",
29
29
  "sub-agent",
30
30
  "multi-agent",
31
- "fable",
32
- "fable-mode",
33
31
  "stage discipline",
34
32
  "multi-stage",
35
33
  "named workers",
@@ -141,26 +141,120 @@ function isFableProfileLookup(prompt, hasMacroSignal) {
141
141
  return true;
142
142
  }
143
143
 
144
- function detectExplicitStrategy(prompt, requestedFableModel) {
144
+ const FABLE_STRATEGIES = [
145
+ ['fable-multi-agent-workspace', /\bfable[- ]multi[- ]agent[- ]workspace\b|\bmulti[- ]agent workspace\b/i],
146
+ ['fable-parallel', /\bfable[- ]parallel\b|\bparallel fable\b/i],
147
+ ['fable-staged', /\bfable[- ]staged\b|\bstaged fable\b/i],
148
+ ];
149
+ const FABLE_PROHIBITION = /\b(?:no|without|do\s+not|don't|never|cannot|can't|not)\s+(?:use\s+)?fable(?:[- ]mode)?\b|(?:不要|不需要|無需|無須|不必|毋須|不用|別|勿|請勿|避免|停止|不)\s*(?:使用|用|啟用|進入|執行)?\s*fable(?:[- ]mode)?/i;
150
+ const FABLE_REQUEST_PREFIX = /^(?:(?:please|let's|now|could\s+you(?:\s+please)?|would\s+you(?:\s+please)?)\s+|(?:請|幫我|麻煩)\s*)*/i;
151
+ const FABLE_REQUEST_VERB = /^(?:use|run|enter)\s+fable(?:[- ]mode)?\b|^(?:使用|用|啟用|進入|執行|改用)\s*fable(?:[- ]mode)?/i;
152
+ const FABLE_NAMED_REQUEST = /^(?:use|run|enter|改用)\s+(fable[- ](?:multi[- ]agent[- ]workspace|parallel|staged))\b/i;
153
+ const FABLE_PROFILE_REQUEST = /^(?:use|run|enter|改用)\s+fable(?:[- ]mode)?\s+(?:on|with)\s+(haiku|sonnet|sonnect|opus)\b/i;
154
+
155
+ function splitFableDirectiveClauses(prompt) {
156
+ const text = String(prompt || '');
157
+ const parts = [];
158
+ let part = '';
159
+ let quote = null;
160
+ const push = () => {
161
+ if (part.trim()) parts.push(part.trim());
162
+ part = '';
163
+ };
164
+ const wordSeparators = /^(?:and\s+then|and|then|also|plus|afterwards|additionally|but|並且|並|以及|接著|然後|另外)/iu;
165
+
166
+ for (let i = 0; i < text.length; i += 1) {
167
+ const char = text[i];
168
+ if (quote) {
169
+ if (char === quote) quote = null;
170
+ part += char;
171
+ continue;
172
+ }
173
+ if (char === '"' || char === '`' || char === '“' || char === '‘' ||
174
+ (char === "'" && !/[\p{L}\p{N}]/u.test(text[i - 1] || '') && /[\p{L}\p{N}]/u.test(text[i + 1] || ''))) {
175
+ quote = char === '“' ? '”' : char === '‘' ? '’' : char;
176
+ part += char;
177
+ continue;
178
+ }
179
+ if (/[;!??!,,;。、…]/u.test(char) || (char === '.' && (i + 1 === text.length || /\s/u.test(text[i + 1])))) {
180
+ push();
181
+ continue;
182
+ }
183
+ const word = text.slice(i).match(wordSeparators);
184
+ if (word && (i === 0 || /\s/u.test(text[i - 1])) &&
185
+ (i + word[0].length === text.length || /\s/u.test(text[i + word[0].length]))) {
186
+ push();
187
+ i += word[0].length - 1;
188
+ continue;
189
+ }
190
+ part += char;
191
+ }
192
+ push();
193
+ return parts;
194
+ }
195
+
196
+ function detectFableRequest(clause) {
197
+ const directive = String(clause || '').trim().replace(FABLE_REQUEST_PREFIX, '').trim();
198
+ const named = FABLE_STRATEGIES.find(([, pattern]) => new RegExp(`^(?:${pattern.source})`, 'i').test(directive));
199
+ if (named) return { strategy: named[0], profile: null };
200
+ const namedRequest = directive.match(FABLE_NAMED_REQUEST);
201
+ if (namedRequest) {
202
+ const requested = FABLE_STRATEGIES.find(([strategy]) => strategy === namedRequest[1].toLowerCase().replace(/ /g, '-'));
203
+ if (requested) return { strategy: requested[0], profile: null };
204
+ }
205
+ const profile = directive.match(new RegExp(`^(?:${FABLE_PROFILE_INVOCATION.source})`, 'i'));
206
+ if (profile) return { strategy: 'fable-staged', profile: (profile[1] || profile[2]).toLowerCase() };
207
+ const requestedProfile = directive.match(FABLE_PROFILE_REQUEST);
208
+ if (requestedProfile) return { strategy: 'fable-staged', profile: requestedProfile[1].toLowerCase() };
209
+ if (FABLE_REQUEST_VERB.test(directive)) return { strategy: 'fable-staged', profile: null };
210
+ return { strategy: null, profile: null };
211
+ }
212
+
213
+ function detectFableDirective(prompt) {
214
+ const clauses = splitFableDirectiveClauses(prompt);
215
+ let strategy = null;
216
+ let profile = null;
217
+ let prohibited = false;
218
+ for (const clause of clauses) {
219
+ const negated = FABLE_PROHIBITION.test(clause);
220
+ if (negated) prohibited = true;
221
+ if (negated || strategy) continue;
222
+ const request = detectFableRequest(clause);
223
+ if (request.strategy) {
224
+ strategy = request.strategy;
225
+ profile = request.profile;
226
+ }
227
+ }
228
+ if (!strategy) {
229
+ const linkedContinuations = clauses.slice(0, -1).flatMap((clause, index) => {
230
+ if (!isFableProfileLookup(clause, false) || !/^run\s+it\b/i.test(clauses[index + 1])) return [];
231
+ const matches = clause.match(new RegExp(FABLE_PROFILE_INVOCATION.source, 'gi')) || [];
232
+ return matches.length === 1 ? [detectFableModel(clause)] : [];
233
+ });
234
+ if (linkedContinuations.length === 1) {
235
+ strategy = 'fable-staged';
236
+ profile = linkedContinuations[0];
237
+ }
238
+ }
239
+ return { strategy, prohibited, profile };
240
+ }
241
+
242
+ function detectExplicitStrategy(prompt) {
145
243
  if (/\bdirect[- ]single\b/i.test(prompt)) return 'direct-single';
146
244
  if (/\biterative[- ]single\b/i.test(prompt)) return 'iterative-single';
147
- if (/\bfable[- ]multi[- ]agent[- ]workspace\b|\bmulti[- ]agent workspace\b/i.test(prompt)) return 'fable-multi-agent-workspace';
148
- if (/\bfable[- ]parallel\b|\bparallel fable\b/i.test(prompt)) return 'fable-parallel';
149
- if (/\bfable[- ]staged\b|\bstaged fable\b/i.test(prompt)) return 'fable-staged';
150
- if (requestedFableModel || /\b(?:use|run|enter)\s+fable(?:[- ]mode)?\b/i.test(prompt)) return 'fable-staged';
151
- return null;
245
+ return detectFableDirective(prompt).strategy;
152
246
  }
153
247
 
154
248
  function detectProhibitions(prompt) {
249
+ const fableDirective = detectFableDirective(prompt);
155
250
  const rules = [
156
- ['fable', /\b(?:no|without|do not|don't)\s+(?:use\s+)?fable\b/i],
157
251
  ['subagents', /\b(?:no|without|do not|don't)\s+(?:use\s+)?subagents?\b|\bsingle[- ]agent only\b/i],
158
252
  ['parallel', /\b(?:no|without|do not|don't)\s+(?:use\s+)?parallel(?:ism| execution)?\b|\bdo not parallelize\b|\bserial only\b/i],
159
253
  ['workspace', /\b(?:no|without|do not|don't)\s+(?:use\s+)?(?:multi[- ]agent )?workspace\b/i],
160
254
  ['memory', /\b(?:no|without|do not|don't)\s+(?:use\s+)?memory\b/i],
161
255
  ['ensemble', /\b(?:no|without|do not|don't)\s+(?:use\s+)?ensemble\b/i],
162
256
  ];
163
- return rules.filter(([, regex]) => regex.test(prompt)).map(([name]) => name);
257
+ return [...(fableDirective.prohibited ? ['fable'] : []), ...rules.filter(([, regex]) => regex.test(prompt)).map(([name]) => name)];
164
258
  }
165
259
 
166
260
  function detectMemoryPersistenceRequest(prompt) {
@@ -348,7 +442,7 @@ function run(userPrompt, context, options = {}) {
348
442
  const structuralFloor = hasMacroSignal ? 'tier3'
349
443
  : !isTrivialDocsEdit && hasMultipleTasks && hasMultipleSentences ? 'tier2' : null;
350
444
  const routeInput = { prompt: userPrompt, tier: recommendedTier, floor: structuralFloor,
351
- explicit: profileLookup || Boolean(detectExplicitStrategy(userPrompt, detectFableModel(userPrompt))) };
445
+ explicit: profileLookup || Boolean(detectExplicitStrategy(userPrompt)) };
352
446
  const liveMode = process.env.HARNESS_SYSTEM_ONE_MODE === 'live';
353
447
  const semantic = liveMode ? routeLive(routeInput, options.systemOneResult)
354
448
  : selectTier(routeInput, process.env, options.systemOneScorer || undefined);
@@ -369,7 +463,7 @@ function run(userPrompt, context, options = {}) {
369
463
  console.log(`\n=> RECOMMENDED TIER: ${recommendedTier}`);
370
464
  console.log(`=> RATIONALE: ${rationale}`);
371
465
 
372
- const requestedFableModel = detectFableModel(promptLower);
466
+ const requestedFableModel = profileLookup ? detectFableModel(promptLower) : detectFableDirective(userPrompt).profile;
373
467
  if (requestedFableModel) {
374
468
  console.log(`\n=> REQUESTED FABLE PROFILE: ${requestedFableModel}`);
375
469
  console.log(`=> ROUTE: fable-mode/SKILL.md`);
@@ -431,7 +525,7 @@ function run(userPrompt, context, options = {}) {
431
525
  const actionGateReasonCodes = detectActionGateReasons(userPrompt);
432
526
  const irreversibleAction = actionGateReasonCodes.includes('irreversible-action');
433
527
  const externalSideEffect = actionGateReasonCodes.includes('external-side-effect');
434
- const requestedStrategy = profileLookup ? null : detectExplicitStrategy(userPrompt, requestedFableModel);
528
+ const requestedStrategy = profileLookup ? null : detectExplicitStrategy(userPrompt);
435
529
  const prohibitions = detectProhibitions(userPrompt);
436
530
  const plannerInputs = plannerInputsFromContext(context, promptLower);
437
531
 
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:4f2e0546-4270-5672-87de-db09e81f50a4",
5
+ "serialNumber": "urn:uuid:ad2dd6b3-4d90-5e3c-9e74-ca74c744a70c",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-11-28T01:10:17.078Z",
8
+ "timestamp": "2026-11-28T07:15:24.159Z",
9
9
  "tools": [
10
10
  {
11
11
  "vendor": "Harness Everything",
12
12
  "name": "generate-sbom.js",
13
- "version": "1.3.1"
13
+ "version": "1.3.2"
14
14
  }
15
15
  ],
16
16
  "component": {
17
17
  "type": "application",
18
- "bom-ref": "pkg:npm/harness-everything@1.3.1",
18
+ "bom-ref": "pkg:npm/harness-everything@1.3.2",
19
19
  "name": "harness-everything",
20
- "version": "1.3.1",
21
- "purl": "pkg:npm/harness-everything@1.3.1"
20
+ "version": "1.3.2",
21
+ "purl": "pkg:npm/harness-everything@1.3.2"
22
22
  }
23
23
  },
24
24
  "components": [
@@ -2033,7 +2033,7 @@
2033
2033
  ]
2034
2034
  },
2035
2035
  {
2036
- "ref": "pkg:npm/harness-everything@1.3.1",
2036
+ "ref": "pkg:npm/harness-everything@1.3.2",
2037
2037
  "dependsOn": [
2038
2038
  "pkg:npm/%40commitlint/cli@19.8.1",
2039
2039
  "pkg:npm/%40commitlint/config-conventional@19.8.1",