harness-everything 0.30.10 → 0.31.0

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 (134) 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 +24 -4
  5. package/README.md +8 -9
  6. package/VERIFICATION.md +1 -1
  7. package/benchmarks/results/live-host/claude-2026-10-08-issue-297/README.md +27 -0
  8. package/benchmarks/results/pr-303-review-2026-10-13/README.md +81 -0
  9. package/benchmarks/results/pr-303-review-2026-10-13/ci/run.json +1330 -0
  10. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/mechanism-35-clean-env.log +1 -0
  11. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/mechanism-35-inherited-flag.log +34 -0
  12. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/verify-gate-captured.json +46 -0
  13. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/verify-gate-diagnosis.md +13 -0
  14. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/verify-gate.json +46 -0
  15. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/summary.json +57 -0
  16. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-collision.log +8 -0
  17. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-consistency.log +624 -0
  18. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-docs-capabilities.log +131 -0
  19. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-platform-compatibility.log +9 -0
  20. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-plugin-openai.log +6 -0
  21. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-plugin-submission.log +5 -0
  22. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-references.log +6 -0
  23. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-release.log +73 -0
  24. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-repo-contract.log +5 -0
  25. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-routing-invariants.log +785 -0
  26. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-routing-skills.log +44 -0
  27. package/benchmarks/results/pr-303-review-2026-10-13/gates/final-fast/summary.json +12 -0
  28. package/benchmarks/results/pr-303-review-2026-10-13/gates/final-fast/test-consistency.log +624 -0
  29. package/benchmarks/results/pr-303-review-2026-10-13/gates/final-fast/test-release.log +73 -0
  30. package/benchmarks/results/pr-303-review-2026-10-13/gates/heavy/summary.json +79 -0
  31. package/benchmarks/results/pr-303-review-2026-10-13/gates/heavy/test-mechanism.log +1737 -0
  32. package/benchmarks/results/pr-303-review-2026-10-13/gates/heavy/test-mutations.log +16 -0
  33. package/benchmarks/results/pr-303-review-2026-10-13/gates/heavy/test.log +3297 -0
  34. package/benchmarks/results/pr-303-review-2026-10-13/manifest.json +319 -0
  35. package/benchmarks/results/pr-303-review-2026-10-13/regression/binding-resolution-green.log +36 -0
  36. package/benchmarks/results/pr-303-review-2026-10-13/regression/determinism.json +174 -0
  37. package/benchmarks/results/pr-303-review-2026-10-13/regression/quality-evidence.json +314 -0
  38. package/benchmarks/results/pr-303-review-2026-10-13/regression/quality-report.json +638 -0
  39. package/benchmarks/results/pr-303-review-2026-10-13/regression/red.log +240 -0
  40. package/benchmarks/results/pr-303-review-2026-10-13/regression/untyped-fable-probe.json +22 -0
  41. package/benchmarks/results/pr-303-review-2026-10-13/regression/workflow-obligations-green.log +254 -0
  42. package/benchmarks/results/pr-303-review-2026-10-13/verification/mechanism-35-clean-env-fixed.log +1 -0
  43. package/benchmarks/results/pr-303-review-2026-10-13/verification/mechanism-35-inherited-flag-fixed.log +1 -0
  44. package/benchmarks/results/pr-303-review-2026-10-13/verification/nested-test.meta.json +8 -0
  45. package/benchmarks/results/pr-303-review-2026-10-13/verification/nested-test.stderr.log +90 -0
  46. package/benchmarks/results/pr-303-review-2026-10-13/verification/nested-test.stdout.log +3186 -0
  47. package/benchmarks/results/pr-303-review-2026-10-13/verification/verify-gate-final.json +46 -0
  48. package/bin/cli.js +1 -1
  49. package/ci/invariant-routing.test.js +7 -4
  50. package/ci/mechanism-2ag-router-worktree-contract.test.js +2 -2
  51. package/ci/mechanism-2ai-workspace-fingerprint-batch.test.js +2 -1
  52. package/ci/mechanism-2an-workflow-obligations.test.js +352 -3
  53. package/ci/mechanism-2aq-fable-stage-bindings.test.js +168 -0
  54. package/ci/mechanism-2ar-binding-resolution.test.js +211 -0
  55. package/ci/mechanism-35-verification-contract.test.js +1 -1
  56. package/ci/mutation-check.js +2 -0
  57. package/ci/mutation-loader.js +4 -0
  58. package/ci/openai-plugin-package.test.js +7 -5
  59. package/ci/prompt-contract-regressions.test.js +7 -6
  60. package/ci/router-workflow-plan.test.js +109 -14
  61. package/ci/skill-routing-check.js +44 -15
  62. package/ci/workflow-plan-consumers.test.js +41 -1
  63. package/docs/architecture.md +10 -10
  64. package/docs/enforcement-locks.md +1 -1
  65. package/docs/mechanism-first-skill-mesh.md +12 -11
  66. package/docs/openai-plugin.md +1 -1
  67. package/docs/philosophy.md +7 -6
  68. package/docs/platform-capabilities.md +7 -5
  69. package/docs/routing.md +16 -17
  70. package/docs/system-one-observations.md +1 -1
  71. package/docs/system-one-routing.md +10 -7
  72. package/docs/system-one-suggestion-gates.md +5 -5
  73. package/docs/workflow-runtime.md +6 -2
  74. package/docs/workflows/harness-everything.md +14 -14
  75. package/evals/harness-everything/tasks/positive-tier1.yaml +1 -1
  76. package/evals/harness-everything/tasks/positive-tier2.yaml +1 -1
  77. package/evals/harness-everything/tasks/positive-tier3.yaml +1 -1
  78. package/fable-mode/CONTRACT-FORMAT.md +4 -1
  79. package/fable-mode/SKILL.md +6 -8
  80. package/fable-mode/agents/fable-orchestrator.md +10 -3
  81. package/fable-mode/execution-guardrails/SKILL.md +1 -1
  82. package/fable-mode/fable-haiku/SKILL.md +1 -1
  83. package/fable-mode/fable-opus/SKILL.md +1 -1
  84. package/fable-mode/fable-sonnet/SKILL.md +1 -1
  85. package/fable-mode/scripts/workflow-plan-consumer.js +101 -2
  86. package/harness-everything/SKILL.md +8 -7
  87. package/harness-everything/references/router-workflow-plan.md +11 -6
  88. package/harness-everything/references/triage-and-tiers.md +21 -23
  89. package/harness-everything/schemas/router-workflow-plan.schema.json +2 -0
  90. package/harness-everything/scripts/kernel-router-core.js +52 -55
  91. package/harness-everything/scripts/kernel-router.js +48 -5
  92. package/harness-everything/scripts/router-contract-core.js +7 -7
  93. package/harness-everything/scripts/router-contract.js +1 -3
  94. package/harness-everything/scripts/routing-keywords.json +417 -121
  95. package/harness-everything/scripts/tier-router.js +64 -113
  96. package/hooks/scripts/contract-test.js +29 -3
  97. package/hooks/scripts/lib/binding-resolver.js +76 -0
  98. package/hooks/scripts/lib/fable-contracts.js +1 -1
  99. package/hooks/scripts/lib/workflow-obligations.js +292 -7
  100. package/hooks/scripts/lib/workflow-runtime.js +8 -1
  101. package/hooks/scripts/workflow-disposition.js +116 -2
  102. package/opencode-plugin/plugin.json +1 -1
  103. package/package.json +1 -1
  104. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  105. package/plugins/harness-everything/hooks/scripts/contract-test.js +29 -3
  106. package/plugins/harness-everything/hooks/scripts/lib/binding-resolver.js +76 -0
  107. package/plugins/harness-everything/hooks/scripts/lib/fable-contracts.js +1 -1
  108. package/plugins/harness-everything/hooks/scripts/lib/workflow-obligations.js +292 -7
  109. package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +8 -1
  110. package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +116 -2
  111. package/plugins/harness-everything/plugin.json +1 -1
  112. package/plugins/harness-everything/scripts/lib/advisory-text.js +2 -2
  113. package/plugins/harness-everything/scripts/lib/generated-skills.js +78 -0
  114. package/plugins/harness-everything/skills/fable-mode/CONTRACT-FORMAT.md +4 -1
  115. package/plugins/harness-everything/skills/fable-mode/SKILL.md +6 -8
  116. package/plugins/harness-everything/skills/fable-mode/agents/fable-orchestrator.md +10 -3
  117. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +1 -1
  118. package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
  119. package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +1 -1
  120. package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
  121. package/plugins/harness-everything/skills/fable-mode/scripts/workflow-plan-consumer.js +101 -2
  122. package/plugins/harness-everything/skills/harness-everything/SKILL.md +8 -7
  123. package/plugins/harness-everything/skills/harness-everything/references/router-workflow-plan.md +11 -6
  124. package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +21 -23
  125. package/plugins/harness-everything/skills/harness-everything/schemas/router-workflow-plan.schema.json +2 -0
  126. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +52 -55
  127. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +48 -5
  128. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +7 -7
  129. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +1 -3
  130. package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +417 -121
  131. package/plugins/harness-everything/skills/harness-everything/scripts/tier-router.js +64 -113
  132. package/sbom.cdx.json +7 -7
  133. package/scripts/lib/advisory-text.js +2 -2
  134. package/scripts/lib/generated-skills.js +78 -0
@@ -19,9 +19,11 @@ Codex and OpenCode are `Partial` in `liveHostVerification`. The Codex artifact v
19
19
 
20
20
  ### Routing contract vs. host evidence
21
21
 
22
- The repository routing contract uses **guidance-first workflow selection**. Each suggested skill still requires reading its complete `SKILL.md` entry/basic flow before omission; the selected topology is planning guidance and unresolved evidence produces reminders rather than a persistent workflow lock. A name, description, router summary, tier label, or generic “routine task” judgement is not enough skip evidence; unreadable suggestions are `unresolved/unavailable`, not silent skips.
22
+ The workflow plan controller rejects present non-array required/optional binding declarations before recording a requirement plan. This input-validation contract is covered by deterministic mechanism tests and does not change live-host evidence status.
23
23
 
24
- This is a **repository/agent contract**, not an automatic upgrade to any platform row below. A hook can prove that the contract was injected into a session; it does not prove the model actually read every suggested skill. Instruction-only surfaces can carry the same rule without mechanically enforcing it. Promoting this behavior to live-host compliance requires retained host/session evidence under the #82 compatibility program. The Claude and local OpenAI packages carry workflow entry/completion **reminders** plus separate Rule-of-3/permission boundaries, but this package/mechanism change does not upgrade `platform-compatibility.json` live-host status values. See [workflow runtime](workflow-runtime.md) for scope, worktree isolation, and failure behavior. OpenCode and instruction-only/public Skills-only surfaces do not acquire equivalent runtime gating. Shell inspection is not a filesystem sandbox; absent hooks, agent-writable state, and indirect script effects remain limits.
24
+ The repository routing contract uses **step-scoped workflow selection**. Normalized keyword/domain signals help compose ordered requirements but never select or load document paths. Each step/stage declares its required and optional skill/reference bindings; only active bindings are disclosed, and required bindings resolve before the step/stage passes. Unknown or unavailable required bindings stay visible and unresolved; missing evidence produces reminders rather than a persistent workflow lock.
25
+
26
+ This is a **repository/agent contract**, not an automatic upgrade to any platform row below. A hook can prove that the contract was injected and record an agent's binding disposition; neither proves that a live host actually loaded or followed the referenced content. Instruction-only surfaces can carry the same rule without mechanically enforcing it. Promoting behavior to live-host compliance requires retained host/session evidence under the #82 compatibility program. Claude and local OpenAI packages carry workflow entry/completion **reminders** plus separate Rule-of-3/permission boundaries, but this package/mechanism change does not upgrade `platform-compatibility.json` live-host status values. See [workflow runtime](workflow-runtime.md) for scope, worktree isolation, and failure behavior. OpenCode and instruction-only/public Skills-only surfaces do not acquire equivalent runtime gating. Shell inspection is not a filesystem sandbox; absent hooks, agent-writable state, and indirect script effects remain limits.
25
27
 
26
28
  ## Current capability summary
27
29
 
@@ -61,16 +63,16 @@ The general installer’s target paths are tested independently from host discov
61
63
 
62
64
  These targets apply to both default link mode and explicit `--copy` mode. A canonical store is only a deduplication detail; it cannot make an unsupported host path supported. Install/uninstall tests also protect user-owned files and cover Linux, Windows, and macOS round-trip fixtures.
63
65
 
64
- The advisory installer text generated for Codex/Cursor/Copilot/Continue/Hermes carries the same read-before-skip rule. That proves only what Harness writes, not that the host/model complied with it.
66
+ The advisory installer text generated for Codex/Cursor/Copilot/Continue/Hermes carries the same step-scoped binding rule. That proves only what Harness writes, not that the host/model loaded or followed an active binding.
65
67
 
66
68
  ## Codex / local OpenAI plugin boundary
67
69
 
68
70
  Codex has two paths that must not be collapsed:
69
71
 
70
- 1. The general `--codex` installer writes advisory `AGENTS.md` plus repo-scoped skills under `.agents/skills/`. Its generated instructions require reading/evaluating every router-suggested skill before omission, but this remains instruction-governed.
72
+ 1. The general `--codex` installer writes advisory `AGENTS.md` plus repo-scoped skills under `.agents/skills/`. Its generated instructions require resolving bindings declared for the active step, but this remains instruction-governed.
71
73
  2. The local OpenAI plugin at `plugins/harness-everything/` packages the skills plus lifecycle hooks for session start, prompt routing, supported local tool calls, subagent lifecycle, and stop verification. Those hooks are mechanically checked. A separate live run verifies the user-hook compatibility fallback for prompt/stop observation only; native plugin hook mounting remains unverified.
72
74
 
73
- The package remains subject to the host’s hook review/trust flow. The retained Codex CLI session proves that the selected user-level observation hooks were trusted and fired on one Windows setup; it does not prove that the model followed read-before-skip or that another ChatGPT/Codex installation loaded the same hooks.
75
+ The package remains subject to the host’s hook review/trust flow. The retained Codex CLI session proves that the selected user-level observation hooks were trusted and fired on one Windows setup; it does not prove that the model loaded or followed an active binding or that another ChatGPT/Codex installation loaded the same hooks.
74
76
 
75
77
  ### Native plugin install/update synchronization
76
78
 
package/docs/routing.md CHANGED
@@ -6,7 +6,7 @@ The current architecture follows two coupled rules:
6
6
 
7
7
  > **Contract-first lifecycle; flexible reasoning/implementation and execution.**
8
8
  >
9
- > **Skill applicability is explicit: evaluation is mandatory, applicable core contracts are mandatory, and not-applicable dispositions require evidence.**
9
+ > **Knowledge is step-scoped: the active step declares required/optional bindings, and required bindings resolve before that step passes.**
10
10
 
11
11
  A strong model remains free to decide *how* to perform the work. It may not decide that an applicable selected lifecycle can be skipped because the task feels simple or already understood.
12
12
 
@@ -17,7 +17,7 @@ For software/project work, Harness establishes routing context and lightweight r
17
17
  1. **Route before execution** — establish scope/tier and the smallest justified topology.
18
18
  2. **Verify before claim** — completion requires objective evidence appropriate to the change.
19
19
  3. **Re-plan after repeated failure** — after three same-signature failures, stop micro-retrying and use a fresh diagnosis / `zoom-out`.
20
- 4. **Evaluate before omission** — read every suggested skill's complete `SKILL.md` entry before deciding applicability.
20
+ 4. **Bind knowledge by step** — compose ordered requirement steps and declare their required/optional skill or reference bindings before execution.
21
21
  5. **Resolve selected workflow** — satisfy the selected topology's required obligations before completion; tactics MAY adapt, but required lifecycle evidence cannot be silently skipped.
22
22
  6. **Surface status** — non-trivial work MUST keep the user informed through the single Harness Status format at required phase boundaries.
23
23
 
@@ -27,10 +27,11 @@ The model owns tools, implementation technique, reasoning, and decomposition det
27
27
 
28
28
  ```text
29
29
  kernel-router.js
30
- ├─ delegates classification / guide discovery → tier-router.js
31
- ├─ preserves tier + rationale + dynamic-skill suggestions
30
+ ├─ delegates classification / knowledge-signal detection → tier-router.js
31
+ ├─ preserves tier + rationale + normalized knowledge signals
32
32
  ├─ emits required invariants + structured workflow plan
33
- ├─ requires applicability evaluation for suggested skills
33
+ ├─ treats keyword hits as step-composition signals, not document selectors
34
+ ├─ discloses bindings only for the active step / dependency-ready Fable stage
34
35
  ├─ records the selected workflow contract
35
36
  └─ exposes warnings/degraded/escape evidence instead of silently hiding limitations
36
37
  ```
@@ -89,19 +90,17 @@ label appeared on 1 of 4 turns while it sat inside the Harness Status contract
89
90
  (which is scoped to non-trivial work), and on 5 of 6 turns as its own final
90
91
  section.
91
92
 
92
- ## Suggested skills vs. selected workflow
93
+ ## Knowledge signals and active-step bindings
93
94
 
94
- These are intentionally different concepts.
95
+ Router keywords and domain matches are normalized planning inputs. They do not select, load, or print skill/reference paths. Requirement composition assigns needed knowledge to ordered steps:
95
96
 
96
- For **every suggested skill**:
97
+ - Each step declares `requiredBindings` and `optionalBindings` by stable id, with a concrete path when known.
98
+ - Only the active single-agent step or dependency-ready Fable stage exposes its bindings. Retained prompts and notifications keep this active-step view compact; future paths stay hidden.
99
+ - A required binding MUST be loaded and its applicable skill core contract followed before the step can pass. Optional bindings resolve as loaded or not-needed.
100
+ - An unknown/unavailable required binding remains visible and unresolved; it cannot be marked loaded without a declared path and evidence.
101
+ - On Fable plans, the existing stage dependency graph controls readiness. A successful objective check records `binding-unresolved` until bindings resolve; rerun the exact check before the stage passes.
97
102
 
98
- 1. **MUST** resolve/read the complete `SKILL.md` entry.
99
- 2. **MUST** evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules.
100
- 3. Read extra material only when the entry explicitly requires it for applicability.
101
- 4. **MUST** resolve the suggestion as `use`, `not-applicable`, or `unresolved/unavailable`.
102
- 5. If disposition is `use`, the skill's core contract **MUST** be followed. If it is `not-applicable`, a concise flow-grounded reason **MUST** be retained.
103
-
104
- A name, description, router summary, tier label, or generic “routine/common task” judgement is not sufficient evidence for `not-applicable`.
103
+ For every active required skill binding, read its complete `SKILL.md` entry and follow its applicable core contract. If an active requirement does not need a discovered knowledge signal, do not bind or load an unrelated document. This replaces the former global read-every-suggestion rule while preserving per-step obligations.
105
104
 
106
105
  For the **selected workflow topology**:
107
106
 
@@ -135,7 +134,7 @@ Typical triggers: typo/docs correction, narrow local edit, bounded explanation,
135
134
 
136
135
  ### Tier 2 — Standard
137
136
 
138
- Typical triggers: normal feature work, bug fixes, multi-file changes, focused benchmark/review. Usually selects `iterative-single`: bounded reason/act work plus objective verification. Focused skills such as `tdd`, `verification-loop`, `security-review`, `using-git-worktrees`, and `eval-harness` may be surfaced and must be resolved for applicability.
137
+ Typical triggers: normal feature work, bug fixes, multi-file changes, focused benchmark/review. Usually selects `iterative-single`: bounded reason/act work plus objective verification. Compose ordered requirements before execution; bind TDD to behavior-change steps, verification-loop to verification steps, and domain knowledge only where that step needs it.
139
138
 
140
139
  Operation labels such as `audit`, `evaluate`, `benchmark`, or `compare` describe **what** work is being done; they do not by themselves establish macro scope. A focused audit/review remains bounded unless an independent scope/structure signal (for example repository-wide, all files/modules, or multi-workstream structure) elevates it. A structured A/B experiment is different: its explicit control/treatment comparison is itself a multi-lane execution structure, so `A/B test` / `A/B benchmark` remains a macro signal.
141
140
 
@@ -161,7 +160,7 @@ The [workflow runtime contract](workflow-runtime.md) defines the executable boun
161
160
 
162
161
  - `workflow-gate.js` observes shell/direct mutation, Fable correlation, and major-workflow Git isolation and emits reminders.
163
162
  - `workflow-stop-gate.js` reports unresolved stage/verification evidence without rejecting Stop.
164
- - `workflow-disposition.js` starts/replans the run, records a scoped stage escape, or reports `blocked`.
163
+ - `workflow-disposition.js` starts/replans the run, resolves active step/stage bindings, records a scoped stage escape, or reports `blocked`.
165
164
 
166
165
  Follow-up prompts retain useful evidence, but unresolved cognitive workflow state does not lock mutation or completion.
167
166
 
@@ -42,7 +42,7 @@ A turn runs from `UserPromptSubmit` to `Stop`. Its record:
42
42
  | `id`, `sessionId`, `turn`, `host`, `observedAt` | hooks | `id` = hash of session id + turn |
43
43
  | `prompt` | `UserPromptSubmit` | stored in the private text store only (see Storage) |
44
44
  | `previous` | the last assistant message before the prompt | truncated to 2 KB; text store only |
45
- | `router` | kernel-router output | lexical tier, strategy, suggested skills; System One shadow scores when present |
45
+ | `router` | kernel-router output | lexical tier, strategy, normalized knowledge signals, active step/stage bindings; System One shadow scores when present |
46
46
  | `behavior` | `PostToolUse`, `PostToolUseFailure` | counts and categories, never arguments: files written, distinct repositories written, files created, commands by class (git, gh, test, build, package, shell), skills loaded or read, subagents started. Failed attempts are counted separately (`toolFailures`, `failedWrites`, `failedSkillLoads`) and never count as a write or a load. `null` means the capture source did not observe tool events; it is not a zero count. |
47
47
  | `workflow` | `workflow-run.json` / `workflow-disposition` | selected and confirmed strategy |
48
48
  | `selfReport` | label line in the final message | see below; `null` if missing or invalid |
@@ -360,9 +360,9 @@ small model only has to separate a few options at a time.
360
360
  `discuss`, `git`, `fix`, `edit`, `feature`, `refactor`, `review`, `test`,
361
361
  `docs`, `plan`, `investigate` or `unclassified`. A prompt has one primary
362
362
  intent and may have secondary intents.
363
- 3. **Skills**: which canonical skills fit the prompt, scored against skill
364
- descriptions. Only skills above the stage's calibrated threshold are
365
- suggested, and they are suggestions, never required reads.
363
+ 3. **Skill relevance**: candidate signals for requirement composition,
364
+ scored against canonical skill descriptions. These candidates do not select
365
+ paths, trigger loads, or bypass the active-step binding contract.
366
366
 
367
367
  Each stage has its own gates, and a stage ships only when it passes them.
368
368
  The relevance-native plan in
@@ -371,8 +371,10 @@ adds a validity stage first and runs intent before tier, because tier3 is
371
371
  composed from the intent scores. Tier was trained first because the
372
372
  reviewed holdout exists for it. Later stages reuse the
373
373
  same collector, labeler, trainer and evaluator with a different catalog.
374
- Suggestions are advisory: explicit workflow requests, action gates, memory
375
- ownership, the Rule of 3 and deterministic policy always take precedence.
374
+ Relevance candidates are advisory inputs to requirement composition: explicit
375
+ workflow requests, action gates, memory ownership, the Rule of 3 and
376
+ deterministic policy always take precedence. A candidate becomes a skill path
377
+ only when a specific ordered requirement declares it as a binding.
376
378
 
377
379
  ## Rollout gates
378
380
 
@@ -383,8 +385,9 @@ provenance, repeatability and advisory rules below still apply.
383
385
 
384
386
  Phase 4 requires a separately reviewed, family-disjoint holdout of at least 200
385
387
  cases, at least 50 each in English and Traditional Chinese. System One output is
386
- advisory: it informs the agent and suggests skills. It never grants or removes
387
- policy. The owner therefore set the target at accepted precision ≥85% (the
388
+ advisory: it informs requirement composition and provides skill-relevance
389
+ candidates. It never grants, removes policy, or loads paths. The owner therefore
390
+ set the target at accepted precision ≥85% (the
388
391
  80–90% band), coverage ≥80%, and macro-F1 at least the lexical baseline. A
389
392
  probabilistic scorer small enough to ship inside a skills plugin (a few MB, not
390
393
  hundreds) is not expected to reach 98%.
@@ -42,12 +42,12 @@ All stages share the scoring and the calibration. Only the readout differs.
42
42
  | Intent | the 12 intents of [system-one-intent.md](system-one-intent.md) | set: every intent at or above its threshold, highest `p` first, truncated at the cap | 3 |
43
43
  | Tier | `tier1`, `tier2`, `tier3` | composed (see [Tier composition](#tier-composition)): tier3 when `feature` or `refactor` reaches its intent threshold; otherwise the tier scorer's pick; final tier = max(that, structural floor); none → abstain | 1 |
44
44
  | Workflow | the router's strategies (`direct-single`, `iterative-single`, `fable-staged`, `fable-parallel`, `fable-multi-agent-workspace`) | pick one, same rule; an explicit workflow request always wins | 1 |
45
- | Skills | canonical skills, scored against their descriptions | set, same rule | 3 |
45
+ | Skill relevance | canonical skills, scored against their descriptions | candidate signals for requirement composition; never a document path/load decision | 3 |
46
46
 
47
- The cap of 3 for set stages comes from AGENTS.md rule 10: a suggested skill
48
- must be read before it can be dismissed, so each extra suggestion has a
49
- reading cost. The cap is part of the readout, so noise is bounded by
50
- construction; the gates then judge what survives the cap.
47
+ The cap of 3 for set stages bounds scorer output noise in this proposed model;
48
+ it is not a cap on the number of required workflow bindings. Under issue #297,
49
+ any candidate knowledge signal must still be composed onto a specific ordered
50
+ requirement step before a skill/reference path is disclosed or loaded.
51
51
 
52
52
  Stages run in table order: validity, intent, tier, workflow, skills. Tier
53
53
  reads the intent scores, so intent runs before it.
@@ -6,7 +6,7 @@ Harness uses workflow state to **observe, explain, and remind about semantic con
6
6
 
7
7
  The runtime follows **minimal rails, maximum freedom**:
8
8
 
9
- - routing **MUST** establish the selected/deferred topology and suggested-skill applicability set;
9
+ - routing **MUST** establish the selected/deferred topology and normalized knowledge signals for ordered requirement composition;
10
10
  - workflow state records useful evidence and unresolved obligations without becoming a cognitive lock;
11
11
  - selected-topology required obligations and applicable skill core contracts are semantic **MUSTs**;
12
12
  - the agent **MUST** verify before claiming completion and use the single user-visible Harness Status at required phase boundaries for non-trivial work;
@@ -16,7 +16,7 @@ The runtime follows **minimal rails, maximum freedom**:
16
16
 
17
17
  Those cognitive workflow conditions **MUST NOT** trap a session or require a reset command.
18
18
 
19
- A semantic MUST is not the same thing as a hard runtime lock. User-visible status, routing/applicability obligations, and verification-before-claim can remain mandatory agent contracts while host hooks observe or remind on a best-effort basis. Do not downgrade a semantic obligation to optional advice merely because the host cannot block it.
19
+ A semantic MUST is not the same thing as a hard runtime lock. User-visible status, active-binding obligations, and verification-before-claim can remain mandatory agent contracts while host hooks observe or remind on a best-effort basis. Do not downgrade a semantic obligation to optional advice merely because the host cannot block it.
20
20
 
21
21
  The unified status shape uses a visible Markdown hierarchy:
22
22
 
@@ -87,8 +87,12 @@ A workflow may retain `blocked` as a descriptive status recorded by the controll
87
87
 
88
88
  ## Fable and worktrees
89
89
 
90
+ Any present `requiredBindings` or `optionalBindings` declaration MUST be an array. Omitted declarations and empty arrays are supported; `null`, objects, strings, booleans, and numbers are rejected before a requirement plan changes workflow state, including fragments without `stepType`.
91
+
90
92
  When a Fable topology is selected, its stage graphs, dependencies, write sets, objective checks, synthesis barrier, and required verifier are semantic **MUSTs**. `maxWorkers` remains a **MAY** planning hint and no longer chunks ready stages as a hard concurrency cap.
91
93
 
94
+ Requirement steps and Fable stages may declare required/optional skill or reference bindings. Runtime output exposes only the active single-agent step or dependency-ready Fable stages. A successful Fable check with unresolved bindings records `binding-unresolved`; after dispositions resolve, the exact check must be rerun before the stage passes. Unknown/unavailable bindings remain visible, while workflow hooks and Stop remain fail-open reminders. A binding disposition is auditable agent evidence, not proof that a host actually loaded or followed the referenced document.
95
+
92
96
  For Tier-3/Fable broad mutation, isolation disposition is a semantic **MUST**: use/reuse a verified linked worktree, or record an explicit degraded fallback when isolation is unavailable or the user explicitly chooses to stay in place. Missing isolation is surfaced prominently, but Harness-owned cognitive workflow hooks do not turn it into a self-deadlocking runtime state.
93
97
 
94
98
  ## Legacy state
@@ -1,6 +1,6 @@
1
1
  # Workflow: Harness Everything
2
2
 
3
- > Route software/project work through the Harness kernel: classify Tier 1/2/3, establish mandatory invariants, then let the agent choose tactics and domain skills. Not general Q&A or non-software writing.
3
+ > Route software/project work through the Harness kernel: classify Tier 1/2/3, establish mandatory invariants, compose step-scoped knowledge bindings, then let the agent choose tactics. Not general Q&A or non-software writing.
4
4
 
5
5
  Source of truth: `harness-everything/SKILL.md`. Deep dive: `harness-everything/references/triage-and-tiers.md`.
6
6
 
@@ -8,7 +8,7 @@ Source of truth: `harness-everything/SKILL.md`. Deep dive: `harness-everything/r
8
8
 
9
9
  ## 1. Skill Behavior Workflow
10
10
 
11
- The kernel establishes the smallest applicable workflow before mutation. Suggested skills are mandatory to evaluate and advisory to execute; the selected topology is mandatory to resolve.
11
+ The kernel establishes the smallest sufficient workflow before mutation. Normalized keyword signals help compose ordered requirements but never select document paths. Each step declares its required/optional knowledge; the selected topology is mandatory to resolve.
12
12
 
13
13
  ```mermaid
14
14
  graph TD
@@ -22,8 +22,8 @@ graph TD
22
22
  Tier1Route --> Checkpoint["Surface Harness Routing Checkpoint"]
23
23
  Tier2Route --> Checkpoint
24
24
  Tier3Route --> Checkpoint
25
- Checkpoint --> Evaluate["Read each suggested SKILL.md: USE FOR, DO NOT USE FOR, flow, hard rules"]
26
- Evaluate --> Execute["Execute selected topology to resolution"]
25
+ Checkpoint --> Decompose["Compose ordered requirement steps and bindings"]
26
+ Decompose --> Execute["Load/resolve only active-step bindings; execute selected topology"]
27
27
  Execute --> VerifyGate{Objective evidence supports completion?}
28
28
  VerifyGate -->|Yes| Done([Evidence-backed completion])
29
29
  VerifyGate -->|No| Diagnose["Diagnose / bounded re-plan"]
@@ -37,18 +37,18 @@ graph TD
37
37
 
38
38
  ## 2. Triggering and Routing Path
39
39
 
40
- This diagram shows how the `harness-everything` skill is triggered and how it chains with companion skills. Routing suggestions are conditional on applicability; the selected topology is not advisory.
40
+ This diagram shows how the `harness-everything` skill is triggered and how it composes step-scoped knowledge bindings. Keyword signals are not document selectors; the selected topology is not advisory.
41
41
 
42
42
  ```mermaid
43
43
  graph LR
44
44
  UserPrompt([User Input]) --> Router["harness-everything / kernel-router.js + tier-router.js"]
45
45
 
46
- Router -->|Bug / Feature / Refactor| Ch1["tdd + todo-driven-workflow + verification-loop + verify-before-claim"]
47
- Router -->|Commit / History / Isolation| Ch2["git-commit + rewrite-commits + using-git-worktrees + verification-loop"]
48
- Router -->|Large / Multi-source / Multi-session| Ch3["fable-mode + fable-discipline + multi-agent-workspace + using-git-worktrees"]
49
- Router -->|Architecture / Plan review| Ch4["improve-codebase-architecture + grill-me + grill-with-docs + to-spec + to-tickets"]
46
+ Router -->|Behavior change| Ch1["Bind TDD to the behavior-change step"]
47
+ Router -->|Verification| Ch2["Bind verification-loop to the verification step"]
48
+ Router -->|Large / Multi-source / Multi-session| Ch3["Fable stages expose bindings only when dependencies pass"]
49
+ Router -->|Architecture / Plan review| Ch4["Bind domain skills/references only to their consuming step"]
50
50
 
51
- Ch1 --> Invariants["Invariants: route-before-execution, verify-before-claim, re-plan-after-x3, evaluate-before-skip, resolve-selected-workflow"]
51
+ Ch1 --> Invariants["Invariants: route-before-execution, verify-before-claim, re-plan-after-x3, resolve-active-required-bindings, resolve-selected-workflow"]
52
52
  Ch2 --> Invariants
53
53
  Ch3 --> Invariants
54
54
  Ch4 --> Invariants
@@ -65,9 +65,9 @@ graph LR
65
65
  graph TD
66
66
  Input1["User: 'Add a new settings page'"] --> Router1["kernel-router.js executes"]
67
67
  Router1 --> Triage2["Triaged as Tier 2: Standard Task"]
68
- Triage2 --> Checkpoint1["Routing Checkpoint: tdd, todo-driven-workflow, verification-loop suggested"]
69
- Checkpoint1 --> Eval1["Read each suggested SKILL.md; keep applicable, mark not-applicable with flow-grounded reason"]
70
- Eval1 --> Exec1["Execute iterative-single to resolution; verify with tests before claiming done"]
68
+ Triage2 --> Checkpoint1["Planning signals help decompose ordered requirements"]
69
+ Checkpoint1 --> Eval1["Bind TDD to behavior change; verification-loop to verification"]
70
+ Eval1 --> Exec1["Load current-step binding, execute, and verify before claiming done"]
71
71
  Exec1 --> Done1([Feature delivered with objective evidence])
72
72
 
73
73
  Input2["User: 'Refactor DB architecture across services'"] --> Router2["kernel-router.js executes"]
@@ -91,7 +91,7 @@ Escape applies only to genuinely uncovered workflow scope with explicit scope +
91
91
  To ensure that the `harness-everything` skill is operating in strict compliance with Harness OS design laws, verify the following:
92
92
 
93
93
  - [ ] **Route before execution**: scope/tier and smallest applicable workflow established before mutation.
94
- - [ ] **Evaluate before omission**: each suggested skill's complete `SKILL.md` flow evaluated before deciding applicability.
94
+ - [ ] **Bind knowledge by step**: required/optional skills and references are declared per ordered requirement; only active paths are loaded/disclosed.
95
95
  - [ ] **Resolve selected workflow**: the selected topology executed to resolution; escape only for uncovered scope with evidence.
96
96
  - [ ] **Verify before claim**: objective evidence (tests, checks, quoted tool output) supports completion.
97
97
  - [ ] **Re-plan on repetition**: after 3 same-signature failures, `zoom-out` reflection completed before resuming.
@@ -1,6 +1,6 @@
1
1
  id: positive-trivial-tier1-001
2
2
  name: Trivial edit routes to Tier 1
3
- description: "Route software/project work through Harness: classify tier/topology, resolve suggested skills, apply semantic obligations, and keep tactics flexible. Use for software triage/routing/re-routing; not general Q&A or non-software writing."
3
+ description: "Route software/project work through Harness: classify tier/topology, compose active-step knowledge bindings, apply semantic obligations, and keep tactics flexible. Use for software triage/routing/re-routing; not general Q&A or non-software writing."
4
4
  tags:
5
5
  - positive-trigger
6
6
  - tier-1
@@ -1,6 +1,6 @@
1
1
  id: positive-standard-tier2-001
2
2
  name: Standard bug fix routes to Tier 2
3
- description: "Route software/project work through Harness: classify tier/topology, resolve suggested skills, apply semantic obligations, and keep tactics flexible. Use for software triage/routing/re-routing; not general Q&A or non-software writing."
3
+ description: "Route software/project work through Harness: classify tier/topology, compose active-step knowledge bindings, apply semantic obligations, and keep tactics flexible. Use for software triage/routing/re-routing; not general Q&A or non-software writing."
4
4
  tags:
5
5
  - positive-trigger
6
6
  - tier-2
@@ -1,6 +1,6 @@
1
1
  id: positive-macro-tier3-001
2
2
  name: Architectural task routes to Tier 3
3
- description: "Route software/project work through Harness: classify tier/topology, resolve suggested skills, apply semantic obligations, and keep tactics flexible. Use for software triage/routing/re-routing; not general Q&A or non-software writing."
3
+ description: "Route software/project work through Harness: classify tier/topology, compose active-step knowledge bindings, apply semantic obligations, and keep tactics flexible. Use for software triage/routing/re-routing; not general Q&A or non-software writing."
4
4
  tags:
5
5
  - positive-trigger
6
6
  - tier-3
@@ -37,6 +37,8 @@ Every planned stage declares dependency and write scope before dispatch:
37
37
  "outputPath": "path/to/artifact-or-null",
38
38
  "dependsOn": ["stage-1"],
39
39
  "writeSet": ["src/auth", "tests/auth.test.js"],
40
+ "requiredBindings": [{ "id": "tdd", "path": "tdd/SKILL.md" }],
41
+ "optionalBindings": [{ "id": "security-review", "path": "security-review/SKILL.md" }],
40
42
  "checkCommand": "node --test tests/auth.test.js",
41
43
  "passCondition": "exit 0",
42
44
  "failureReturn": "failure summary + evidence + missing prerequisite"
@@ -48,6 +50,7 @@ Rules:
48
50
  - `stageId`, `goal`, `agent`, and `task` are required.
49
51
  - `dependsOn` is always explicit. Use `[]` for a root stage.
50
52
  - `writeSet` is always explicit. Use `[]` for a read-only stage.
53
+ - `requiredBindings` and `optionalBindings` are optional arrays. Each entry is a stable `id` and may declare a concrete repository-relative `path`; paths reject absolute names, globs, and traversal. Availability is `available` only when the path resolves to a readable file: workspace references resolve only under the workspace, while recognized Harness bindings (a registered id at its registered path, or a skill id naming its own `<id>/SKILL.md`) also search installed Harness skill roots (`missing` otherwise; `unverified` when no hook runtime is installed). An id without a path resolves through self-evolved manifest metadata, else remains visible with unknown availability. A binding that does not resolve cannot be recorded as `loaded`.
51
54
  - `writeSet` contains concrete repository-relative path scopes, not globs,
52
55
  absolute paths, or `..` traversal.
53
56
  - a directory scope covers descendants; overlapping scopes cannot run in the
@@ -60,7 +63,7 @@ Rules:
60
63
 
61
64
  ## Workflow-plan consumer
62
65
 
63
- For a session with an active mandatory workflow, write the stage array to the router-displayed `workflow-stages.json` path and invoke its `workflow-disposition.js start --session-id <id>` command. This binds the run to the active `workflowId` and bound workspace even after entering a linked worktree. Every required stage needs an objective check, and an independent plan needs a read-only `fable-verifier` stage depending on all other stages. Stage results need observed worker identities and numeric exit codes; missing metadata is blocked/degraded, not success.
66
+ For a session with an active mandatory workflow, write the stage array to the router-displayed `workflow-stages.json` path and invoke its `workflow-disposition.js start --session-id <id>` command. This binds the run to the active `workflowId` and bound workspace even after entering a linked worktree. The start/check output exposes bindings only for dependency-ready stages; future-stage paths stay undisclosed. Resolve an active binding with `workflow-disposition.js stage-binding --stage-id <id> --binding-id <id> --disposition loaded|not-needed|unavailable --evidence <evidence>`. A successful check with unresolved bindings records `binding-unresolved`; resolve them, then rerun the exact check before the stage can pass. This state is a reminder, not a tool or Stop lock. Every required stage needs an objective check, and an independent plan needs a read-only `fable-verifier` stage depending on all other stages. Stage results need observed worker identities and numeric exit codes; missing metadata is unresolved, not success.
64
67
 
65
68
  For standalone use without an active session contract, write the router contract and stage array to files and run:
66
69
 
@@ -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.30.7
7
+ version: 0.31.0
8
8
  ---
9
9
 
10
10
  # Fable Mode
@@ -29,17 +29,15 @@ metadata:
29
29
 
30
30
  ## Select Operation First
31
31
 
32
- For explanation/profile-only lookup, read only `<this-skill-dir>/references/profile-lookup.md` and answer. No stage state, delegation, or selector source reads. Quoted aliases do not start Fable. Mixed execution retains its topology.
33
-
34
- Execution follows the workflow below.
32
+ For explanation/profile-only lookup, read only `<this-skill-dir>/references/profile-lookup.md` and answer. No stage state, delegation, or selector source reads. Quoted aliases do not start Fable. Mixed execution retains its topology; execution follows the workflow below.
35
33
 
36
34
  ## Workflow
37
35
 
38
36
  1. Discover the runtime and lock the authorized file scope before edits.
39
- 2. Set artifact/check per stage; advisory replans never halt. Rule-of-3 applies to 3 same-signature failures.
37
+ 2. Per stage, set artifact, check, and required/optional bindings; dependency-ready stages disclose them, passing once resolved. Gaps never lock tools or Stop; advisory replans never halt. Rule-of-3 covers same-signature failures.
40
38
  3. Resolve the requested behavior profile with `model-selector.js`; `opus`, `sonnet`/`sonnect`, and `haiku` are compatibility aliases, not model bindings.
41
- 4. Delegate by profile: orchestrator coordinates, reasoning handles bounded judgment, mechanical handles low-ambiguity work, and workers never spawn workers.
42
- 5. Treat the host runtime-model floor as advisory; record its status without blocking Fable solely for model choice.
43
- 6. Run each stage check, cold-review high-stakes artifacts, and audit profile/runtime/fallback fields.
39
+ 4. Delegate by profile: orchestrator coordinates, reasoning takes bounded judgment, mechanical takes low-ambiguity work; workers never spawn workers.
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.
44
42
 
45
43
  Deep dive: <this-skill-dir>/references/model-matrix.md
@@ -45,6 +45,12 @@ first. Every stage declares `stageId`, goal, named agent, self-contained task,
45
45
  expected output, `dependsOn`, and `writeSet` per
46
46
  `fable-mode/CONTRACT-FORMAT.md`. `dependsOn: []` means no prerequisite;
47
47
  `writeSet: []` means read-only. Workers never widen their own write set.
48
+ Declare stage-specific `requiredBindings` and `optionalBindings` in the same
49
+ contract. The consumer/start/check output exposes paths only for dependency-ready
50
+ stages; never preload bindings from future stages. Resolve active bindings with
51
+ `workflow-disposition.js stage-binding` and evidence before passing the stage.
52
+ If its objective check passes while bindings remain unresolved, the contract
53
+ records `binding-unresolved`; resolve the bindings and rerun that exact check.
48
54
 
49
55
  Pass the router contract and stage array through
50
56
  `fable-mode/scripts/workflow-plan-consumer.js` before spawning anything. Use the
@@ -97,10 +103,11 @@ that stage's check before continuing.
97
103
  The run-scoped contract already exists before execution. When its exact
98
104
  `checkCommand` runs, `contract-test.js` correlates it to one
99
105
  `planId/runId/stageId`, updates that contract, and writes
100
- `evidence/<stageId>.json`. If the command is ambiguous across runs, none of the
101
- contracts is updated and the ambiguity must be resolved. Before delivery,
106
+ `evidence/<stageId>.json`. A `pass` requires both an objective check and
107
+ resolved declared bindings. If the command is ambiguous across runs, none of
108
+ the contracts is updated and the ambiguity must be resolved. Before delivery,
102
109
  confirm every check-bearing contract in this run is `pass`; `planned`,
103
- `running`, `pending`, or `fail` is not delivery evidence.
110
+ `running`, `pending`, `fail`, or `binding-unresolved` is not delivery evidence.
104
111
 
105
112
  The subagent scope guard separately compares worker changes to the immutable
106
113
  `writeSet` snapshot captured at burst start. An in-scope change is not proof of
@@ -4,7 +4,7 @@ description: "Reference guardrails for verified warnings and safe replacements;
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.7
7
+ version: 0.31.0
8
8
  ---
9
9
 
10
10
  # Execution Guardrails
@@ -4,7 +4,7 @@ description: "Reference mechanical behavior profile (legacy alias haiku) for bul
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.7
7
+ version: 0.31.0
8
8
  ---
9
9
 
10
10
  # Fable Mode — Haiku
@@ -4,7 +4,7 @@ description: "Reference orchestrator behavior profile (legacy alias opus) for st
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.7
7
+ version: 0.31.0
8
8
  ---
9
9
 
10
10
  # Fable Mode — Opus
@@ -4,7 +4,7 @@ description: "Reference reasoning behavior profile (legacy alias sonnet/sonnect)
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.30.7
7
+ version: 0.31.0
8
8
  ---
9
9
 
10
10
  # Fable Mode — Sonnet