harness-everything 0.30.10 → 0.31.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.
Files changed (139) 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 +32 -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/live-host/claude-2026-10-13-issue-306/README.md +44 -0
  9. package/benchmarks/results/pr-303-review-2026-10-13/README.md +81 -0
  10. package/benchmarks/results/pr-303-review-2026-10-13/ci/run.json +1330 -0
  11. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/mechanism-35-clean-env.log +1 -0
  12. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/mechanism-35-inherited-flag.log +34 -0
  13. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/verify-gate-captured.json +46 -0
  14. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/verify-gate-diagnosis.md +13 -0
  15. package/benchmarks/results/pr-303-review-2026-10-13/diagnostics/verify-gate.json +46 -0
  16. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/summary.json +57 -0
  17. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-collision.log +8 -0
  18. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-consistency.log +624 -0
  19. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-docs-capabilities.log +131 -0
  20. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-platform-compatibility.log +9 -0
  21. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-plugin-openai.log +6 -0
  22. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-plugin-submission.log +5 -0
  23. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-references.log +6 -0
  24. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-release.log +73 -0
  25. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-repo-contract.log +5 -0
  26. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-routing-invariants.log +785 -0
  27. package/benchmarks/results/pr-303-review-2026-10-13/gates/contracts/test-routing-skills.log +44 -0
  28. package/benchmarks/results/pr-303-review-2026-10-13/gates/final-fast/summary.json +12 -0
  29. package/benchmarks/results/pr-303-review-2026-10-13/gates/final-fast/test-consistency.log +624 -0
  30. package/benchmarks/results/pr-303-review-2026-10-13/gates/final-fast/test-release.log +73 -0
  31. package/benchmarks/results/pr-303-review-2026-10-13/gates/heavy/summary.json +79 -0
  32. package/benchmarks/results/pr-303-review-2026-10-13/gates/heavy/test-mechanism.log +1737 -0
  33. package/benchmarks/results/pr-303-review-2026-10-13/gates/heavy/test-mutations.log +16 -0
  34. package/benchmarks/results/pr-303-review-2026-10-13/gates/heavy/test.log +3297 -0
  35. package/benchmarks/results/pr-303-review-2026-10-13/manifest.json +319 -0
  36. package/benchmarks/results/pr-303-review-2026-10-13/regression/binding-resolution-green.log +36 -0
  37. package/benchmarks/results/pr-303-review-2026-10-13/regression/determinism.json +174 -0
  38. package/benchmarks/results/pr-303-review-2026-10-13/regression/quality-evidence.json +314 -0
  39. package/benchmarks/results/pr-303-review-2026-10-13/regression/quality-report.json +638 -0
  40. package/benchmarks/results/pr-303-review-2026-10-13/regression/red.log +240 -0
  41. package/benchmarks/results/pr-303-review-2026-10-13/regression/untyped-fable-probe.json +22 -0
  42. package/benchmarks/results/pr-303-review-2026-10-13/regression/workflow-obligations-green.log +254 -0
  43. package/benchmarks/results/pr-303-review-2026-10-13/verification/mechanism-35-clean-env-fixed.log +1 -0
  44. package/benchmarks/results/pr-303-review-2026-10-13/verification/mechanism-35-inherited-flag-fixed.log +1 -0
  45. package/benchmarks/results/pr-303-review-2026-10-13/verification/nested-test.meta.json +8 -0
  46. package/benchmarks/results/pr-303-review-2026-10-13/verification/nested-test.stderr.log +90 -0
  47. package/benchmarks/results/pr-303-review-2026-10-13/verification/nested-test.stdout.log +3186 -0
  48. package/benchmarks/results/pr-303-review-2026-10-13/verification/verify-gate-final.json +46 -0
  49. package/bin/cli.js +1 -1
  50. package/ci/invariant-routing.test.js +7 -4
  51. package/ci/mechanism-2ag-router-worktree-contract.test.js +2 -2
  52. package/ci/mechanism-2ai-workspace-fingerprint-batch.test.js +2 -1
  53. package/ci/mechanism-2an-workflow-obligations.test.js +352 -3
  54. package/ci/mechanism-2aq-fable-stage-bindings.test.js +168 -0
  55. package/ci/mechanism-2ar-binding-resolution.test.js +211 -0
  56. package/ci/mechanism-35-verification-contract.test.js +186 -1
  57. package/ci/mutation-check.js +2 -0
  58. package/ci/mutation-loader.js +4 -0
  59. package/ci/openai-plugin-package.test.js +7 -5
  60. package/ci/prompt-contract-regressions.test.js +7 -6
  61. package/ci/router-workflow-plan.test.js +109 -14
  62. package/ci/skill-routing-check.js +44 -15
  63. package/ci/workflow-plan-consumers.test.js +41 -1
  64. package/docs/architecture.md +10 -10
  65. package/docs/enforcement-locks.md +1 -1
  66. package/docs/mechanism-first-skill-mesh.md +12 -11
  67. package/docs/openai-plugin.md +1 -1
  68. package/docs/philosophy.md +7 -6
  69. package/docs/platform-capabilities.md +7 -5
  70. package/docs/routing.md +16 -17
  71. package/docs/system-one-observations.md +1 -1
  72. package/docs/system-one-routing.md +10 -7
  73. package/docs/system-one-suggestion-gates.md +5 -5
  74. package/docs/workflow-runtime.md +6 -2
  75. package/docs/workflows/harness-everything.md +14 -14
  76. package/evals/harness-everything/tasks/positive-tier1.yaml +1 -1
  77. package/evals/harness-everything/tasks/positive-tier2.yaml +1 -1
  78. package/evals/harness-everything/tasks/positive-tier3.yaml +1 -1
  79. package/fable-mode/CONTRACT-FORMAT.md +4 -1
  80. package/fable-mode/SKILL.md +6 -8
  81. package/fable-mode/agents/fable-orchestrator.md +10 -3
  82. package/fable-mode/execution-guardrails/SKILL.md +1 -1
  83. package/fable-mode/fable-haiku/SKILL.md +1 -1
  84. package/fable-mode/fable-opus/SKILL.md +1 -1
  85. package/fable-mode/fable-sonnet/SKILL.md +1 -1
  86. package/fable-mode/scripts/workflow-plan-consumer.js +101 -2
  87. package/harness-everything/SKILL.md +8 -7
  88. package/harness-everything/references/router-workflow-plan.md +11 -6
  89. package/harness-everything/references/triage-and-tiers.md +21 -23
  90. package/harness-everything/schemas/router-workflow-plan.schema.json +2 -0
  91. package/harness-everything/scripts/kernel-router-core.js +52 -55
  92. package/harness-everything/scripts/kernel-router.js +48 -5
  93. package/harness-everything/scripts/router-contract-core.js +7 -7
  94. package/harness-everything/scripts/router-contract.js +1 -3
  95. package/harness-everything/scripts/routing-keywords.json +417 -121
  96. package/harness-everything/scripts/tier-router.js +64 -113
  97. package/hooks/scripts/contract-test.js +29 -3
  98. package/hooks/scripts/lib/binding-resolver.js +76 -0
  99. package/hooks/scripts/lib/fable-contracts.js +1 -1
  100. package/hooks/scripts/lib/workflow-obligations.js +292 -7
  101. package/hooks/scripts/lib/workflow-runtime.js +8 -1
  102. package/hooks/scripts/state-persist.js +2 -1
  103. package/hooks/scripts/workflow-disposition.js +116 -2
  104. package/opencode-plugin/plugin.json +1 -1
  105. package/package.json +1 -1
  106. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  107. package/plugins/harness-everything/hooks/scripts/contract-test.js +29 -3
  108. package/plugins/harness-everything/hooks/scripts/lib/binding-resolver.js +76 -0
  109. package/plugins/harness-everything/hooks/scripts/lib/fable-contracts.js +1 -1
  110. package/plugins/harness-everything/hooks/scripts/lib/workflow-obligations.js +292 -7
  111. package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +8 -1
  112. package/plugins/harness-everything/hooks/scripts/state-persist.js +2 -1
  113. package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +116 -2
  114. package/plugins/harness-everything/plugin.json +1 -1
  115. package/plugins/harness-everything/scripts/lib/advisory-text.js +2 -2
  116. package/plugins/harness-everything/scripts/lib/generated-skills.js +78 -0
  117. package/plugins/harness-everything/scripts/lib/verification-contract.js +78 -1
  118. package/plugins/harness-everything/skills/fable-mode/CONTRACT-FORMAT.md +4 -1
  119. package/plugins/harness-everything/skills/fable-mode/SKILL.md +6 -8
  120. package/plugins/harness-everything/skills/fable-mode/agents/fable-orchestrator.md +10 -3
  121. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +1 -1
  122. package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
  123. package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +1 -1
  124. package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
  125. package/plugins/harness-everything/skills/fable-mode/scripts/workflow-plan-consumer.js +101 -2
  126. package/plugins/harness-everything/skills/harness-everything/SKILL.md +8 -7
  127. package/plugins/harness-everything/skills/harness-everything/references/router-workflow-plan.md +11 -6
  128. package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +21 -23
  129. package/plugins/harness-everything/skills/harness-everything/schemas/router-workflow-plan.schema.json +2 -0
  130. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +52 -55
  131. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +48 -5
  132. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +7 -7
  133. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +1 -3
  134. package/plugins/harness-everything/skills/harness-everything/scripts/routing-keywords.json +417 -121
  135. package/plugins/harness-everything/skills/harness-everything/scripts/tier-router.js +64 -113
  136. package/sbom.cdx.json +7 -7
  137. package/scripts/lib/advisory-text.js +2 -2
  138. package/scripts/lib/generated-skills.js +78 -0
  139. package/scripts/lib/verification-contract.js +78 -1
@@ -10,7 +10,7 @@
10
10
  "name": "harness-everything",
11
11
  "source": "./",
12
12
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
13
- "version": "0.30.10",
13
+ "version": "0.31.1",
14
14
  "author": {
15
15
  "name": "Miya Daniel"
16
16
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-everything",
3
3
  "description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
4
- "version": "0.30.10",
4
+ "version": "0.31.1",
5
5
  "author": {
6
6
  "name": "Miya Daniel"
7
7
  },
package/AGENTS.md CHANGED
@@ -40,7 +40,7 @@ The retained [OpenCode evidence](benchmarks/results/live-host/opencode-2026-09-1
40
40
  7. **Runtime/workflow claims are generated facts.** `package.json`, `.nvmrc`, Dockerfile, and active workflows feed `scripts/repository-contract.js`; run `npm run docs:sync` after relevant changes.
41
41
  8. **CHANGELOG.md keeps pending human-authored notes under `[Unreleased]`.** Semantic-release owns stable headings/tags/release notes.
42
42
  9. **Conventional Commit type is release input.** Breaking→major; `feat`→minor; `fix`/`perf`/`refactor`/`build`/`revert`→patch; docs/test/ci/style/chore do not release by themselves.
43
- 10. **Selected workflow is a semantic contract; tactics remain flexible.** Suggested skills MUST be read/evaluated before omission; applicable skill core contracts MUST be followed, while not-applicable requires a flow-grounded reason. Selected-topology required obligations MUST resolve. Missing host evidence may produce reminders, not a persistent Harness lock.
43
+ 10. **Selected workflow is a semantic contract; tactics remain flexible.** Compose ordered requirement steps with declared required/optional skill or reference bindings. Load/resolve bindings only when their step (or dependency-ready Fable stage) is active; required bindings MUST resolve before that step passes, and applicable skill core contracts MUST be followed. Unknown/unavailable bindings stay visible and unresolved. Selected-topology obligations MUST resolve; missing host evidence may produce reminders, not a persistent Harness lock.
44
44
  11. **User-visible Harness Status is mandatory for non-trivial work.** Render one readable Markdown block headed `### 🚦 Harness Status`, with bullet-aligned bold `Current`, `Read / Evidence`, `Next`, plus optional `Risk / Blocked`; use nested evidence bullets when useful. Emit it before substantive execution, after major phases, on direction changes, during long work at meaningful boundaries, and before final completion. The routing checkpoint is internal source state, not a second user-facing block. This semantic MUST does not create a hard lock.
45
45
  12. **Tier-3/Fable isolation disposition is mandatory before broad mutation.** Use/reuse a verified linked Git worktree, or record an explicit degraded fallback when isolation is unavailable or the user explicitly chooses to stay in place. Ordinary isolation SHOULD be used when it materially reduces collision/risk. Failure to isolate is a visible semantic gap, not a Harness-owned deadlock. See [workflow-runtime.md](docs/workflow-runtime.md).
46
46
  13. **Use contract strength deliberately.** MUST = required semantic obligation; SHOULD = expected default with an evidence-based exception; MAY = optional optimization. Do not use recommend/prefer/advisory/guidance to weaken a MUST. See [philosophy.md](docs/philosophy.md#contract-strength-must--should--may).
package/CHANGELOG.md CHANGED
@@ -2,19 +2,47 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
- ## [0.30.10](https://github.com/dyphn1/Harness-everything/compare/v0.30.9...v0.30.10) (2026-10-13)
5
+ ## [0.31.1](https://github.com/dyphn1/Harness-everything/compare/v0.31.0...v0.31.1) (2026-10-13)
6
6
 
7
7
  ### Bug Fixes
8
8
 
9
- * **codex:** address observation review findings ([b869cfb](https://github.com/dyphn1/Harness-everything/commit/b869cfbdb44172ee88ad6ae3f76e29c8da6e9da8))
10
- * **codex:** sync hooks and recover turn labels ([d29112e](https://github.com/dyphn1/Harness-everything/commit/d29112e15ac255c5ded6fcf2aab3a21c710b3def)), closes [#304](https://github.com/dyphn1/Harness-everything/issues/304)
11
- * **codex:** validate sources and report import failures ([3f57b8b](https://github.com/dyphn1/Harness-everything/commit/3f57b8b376bfd437c8cff6ddbe4ddbf036380198)), closes [#304](https://github.com/dyphn1/Harness-everything/issues/304)
9
+ * **verify:** pin wrapped checks to stable cd targets and declared cwd ([527b746](https://github.com/dyphn1/Harness-everything/commit/527b746d09db0db1a0b9310f1831bcaf312b1bf0)), closes [#307](https://github.com/dyphn1/Harness-everything/issues/307) [#306](https://github.com/dyphn1/Harness-everything/issues/306)
10
+ * **verify:** recognize safe host cwd wrappers as verification evidence ([de7953f](https://github.com/dyphn1/Harness-everything/commit/de7953f9562bf4d31984cecf053725e1b4219eb2)), closes [#306](https://github.com/dyphn1/Harness-everything/issues/306)
11
+
12
+ ## [0.31.0](https://github.com/dyphn1/Harness-everything/compare/v0.30.10...v0.31.0) (2026-10-13)
13
+
14
+ ### Features
15
+
16
+ * **workflow:** bind knowledge to active steps ([cc673fc](https://github.com/dyphn1/Harness-everything/commit/cc673fc3d580e4e4d6d9017b59846ea85da3c489)), closes [#297](https://github.com/dyphn1/Harness-everything/issues/297)
17
+
18
+ ### Bug Fixes
19
+
20
+ * **workflow:** reject malformed binding arrays ([2faa451](https://github.com/dyphn1/Harness-everything/commit/2faa4514f213afac383ca4bf70ad086e68690216))
21
+ * **workflow:** resolve binding availability against real files ([d65f34d](https://github.com/dyphn1/Harness-everything/commit/d65f34d597f60c9bf01f5feabb9b1b26c754e221)), closes [#303](https://github.com/dyphn1/Harness-everything/issues/303)
22
+ * **workflow:** scope workspace bindings and keep signals on recompose ([8ad41ac](https://github.com/dyphn1/Harness-everything/commit/8ad41ac28aec84ab1373e305aeb35c3bf5423291)), closes [#303](https://github.com/dyphn1/Harness-everything/issues/303)
12
23
 
13
24
  ## [Unreleased]
14
25
 
26
+ ### Changes
27
+
28
+ * **workflow:** replace topology-wide skill/reference pushes with ordered active-step bindings; carry the same contract through dependency-ready Fable stages while keeping hooks and Stop fail-open (#297).
29
+ * **router:** emit normalized knowledge signals as requirement-composition inputs and preserve bounded Fable lookup behavior across #294–#296.
30
+ * **workflow:** resolve step/stage binding availability against real files (workspace references stay workspace-scoped; only recognized Harness bindings search installed plugin layouts); preserve knowledge signals across strategy recomposition; keep self-evolved manifest skills discoverable as metadata-only ids; positive skill evals assert skill-specific candidate bindings (#303 review).
31
+ * **workflow:** reject present non-array required/optional binding declarations before accepting a requirement plan, preserving workflow state on invalid input (#303 review).
32
+ * **test:** isolate verification fixtures from an inherited project-check recursion guard while preserving explicit guard coverage.
33
+
15
34
  ### Bug Fixes
16
35
 
17
36
  * **codex:** keep compatibility hooks and session labels in sync
37
+ * **verify:** recognize a validated in-root host `cd <workspace> && <check>` prelude (Claude Code Windows Bash) as verification evidence for exactly one plain check; chaining, redirection, substitution, and out-of-root targets still never count, and verification evidence now requires a confirmed `PostToolUse` or zero exit (#306). Only CDPATH-stable `cd` targets (absolute or explicit `./`/`../`) are accepted, and a declared `.harness/verify.json` check counts only when run in its declared `cwd` (#307 review).
38
+
39
+ ## [0.30.10](https://github.com/dyphn1/Harness-everything/compare/v0.30.9...v0.30.10) (2026-10-13)
40
+
41
+ ### Bug Fixes
42
+
43
+ * **codex:** address observation review findings ([b869cfb](https://github.com/dyphn1/Harness-everything/commit/b869cfbdb44172ee88ad6ae3f76e29c8da6e9da8))
44
+ * **codex:** sync hooks and recover turn labels ([d29112e](https://github.com/dyphn1/Harness-everything/commit/d29112e15ac255c5ded6fcf2aab3a21c710b3def)), closes [#304](https://github.com/dyphn1/Harness-everything/issues/304)
45
+ * **codex:** validate sources and report import failures ([3f57b8b](https://github.com/dyphn1/Harness-everything/commit/3f57b8b376bfd437c8cff6ddbe4ddbf036380198)), closes [#304](https://github.com/dyphn1/Harness-everything/issues/304)
18
46
 
19
47
  ## [0.30.9](https://github.com/dyphn1/Harness-everything/compare/v0.30.8...v0.30.9) (2026-10-08)
20
48
 
package/README.md CHANGED
@@ -19,7 +19,7 @@ AI coding agents are highly capable, but they struggle with self-regulation, env
19
19
 
20
20
  Harness acts as an automated system supervisor. It remains completely silent and out of the way, intervening only when execution boundaries are violated or failures are detected.
21
21
 
22
- Harness deliberately follows a **minimal rails, maximum freedom** design: semantic obligations are explicit, while runtime observation remains lightweight and mostly fail-open. It does not hard-stop work on iteration/revision/replan/worker counts. The one cognitive hard boundary is Rule of 3: three matching failures pause mutation for a zoom-out reflection. Router suggestions are conditional by applicability, not optional by default: the agent MUST read/evaluate each suggested skill; if applicable, its core contract MUST be followed, and if not applicable a flow-grounded reason MUST be retained. Implementation tactics remain flexible inside those obligations.
22
+ Harness deliberately follows a **minimal rails, maximum freedom** design: semantic obligations are explicit, while runtime observation remains lightweight and mostly fail-open. It does not hard-stop work on iteration/revision/replan/worker counts. The one cognitive hard boundary is Rule of 3: three matching failures pause mutation for a zoom-out reflection. Router keywords are planning signals, not document selectors. Ordered requirement steps declare their required/optional skills and references; only active bindings are exposed, and required bindings resolve before the step passes. Implementation tactics remain flexible inside those obligations.
23
23
 
24
24
  ### Comparison: Prompt vs. Skill vs. Harness
25
25
 
@@ -77,7 +77,7 @@ npx.cmd github:dyphn1/Harness-everything install # Windows PowerShel
77
77
  1. **Use the selected surface's real mechanism:** Claude Code hooks, the local OpenAI plugin lifecycle hooks, OpenCode's plugin API, or advisory instructions depending on what you installed.
78
78
  2. **Preflight / session context where packaged:** Hook-capable surfaces can inject environment/session context automatically; advisory-only surfaces must not be described as if they do.
79
79
  3. **Verification boundary:** Completion claims require objective evidence; whether that boundary is mechanically invoked or explicitly called depends on the host surface.
80
- 4. **Mandatory applicable workflow:** MUST evaluate each suggested skill's complete `SKILL.md`; applicable core contracts MUST be followed, while not-applicable needs a flow-grounded reason. Selected-topology required obligations MUST resolve with objective evidence. Reasoning and implementation remain flexible; escape applies only to declared uncovered scope with evidence. Tier-3/Fable broad mutation MUST resolve isolation: verified linked worktree or explicit degraded fallback. See the [workflow runtime contract](docs/workflow-runtime.md). Harness does not impose one universal TODO/TDD/Fable sequence.
80
+ 4. **Mandatory active workflow:** Ordered steps MUST declare the required/optional skill and reference bindings they need; load/resolve only the active step or dependency-ready Fable stage. Required bindings and objective evidence MUST resolve before step/stage pass. Unknown/unavailable bindings stay visible; hooks and Stop remain fail-open. Reasoning and implementation remain flexible; escape applies only to declared uncovered scope with evidence. Tier-3/Fable broad mutation MUST resolve isolation: verified linked worktree or explicit degraded fallback. See the [workflow runtime contract](docs/workflow-runtime.md). Harness does not impose one universal TODO/TDD/Fable sequence.
81
81
  5. **Unified user-visible status:** For non-trivial software/project work, the agent MUST render one scannable Markdown `### 🚦 Harness Status` block with bold bullet labels for `Current`, `Read / Evidence`, `Next`, plus optional `Risk / Blocked`; multiple evidence items may use nested bullets. Use it at major phase/direction boundaries and before final completion. The routing checkpoint remains internal source state. This is a communication contract, not a hard runtime lock.
82
82
 
83
83
  ### What Gets Installed (and How to Remove It)
@@ -138,10 +138,9 @@ flowchart TD
138
138
  flowchart TD
139
139
  U([User Request]) --> K[Harness Kernel<br/>classify scope + establish invariants]
140
140
  K --> T{Tier classification}
141
- T --> S{Suggested skills?}
142
- S -->|Yes| R[Read each suggested SKILL.md<br/>evaluate flow + applicability]
143
- S -->|No| A[Agent chooses smallest useful tactic / skill set]
144
- R --> A
141
+ T --> D[Decompose ordered requirements]
142
+ D --> B[Bind knowledge per step]
143
+ B --> A[Agent resolves active bindings and chooses tactics]
145
144
  A --> Exec[Execute Code / Run Commands]
146
145
  Exec --> Gate{Objective evidence supports completion?}
147
146
  Gate -->|No| Retry[Diagnose / iterate]
@@ -157,7 +156,7 @@ flowchart TD
157
156
  style Gate fill:#ffcdd2,stroke:#c62828,stroke-width:1px,color:#000000
158
157
  ```
159
158
 
160
- The Tier changes task shape and the set of **suggested skills**, not a universal required order. Tier 2 may suggest `tdd`, `todo-driven-workflow`, or `verification-loop`; Tier 3 may select Fable or multi-agent topologies. Every suggestion is **MUST-evaluate**: if its real flow is applicable, the core contract becomes **MUST-follow**; otherwise retain a flow-grounded not-applicable reason. Tactics inside the resulting contract remain model-controlled.
159
+ The Tier changes task shape and selected topology, not a universal required order. Tier 2 decomposes behavior-change and verification steps so TDD and verification-loop bindings appear only when active; Tier 3 may select Fable or multi-agent topologies, with binding visibility following the existing stage dependencies. Tactics inside the resulting contract remain model-controlled.
161
160
 
162
161
  ---
163
162
 
@@ -165,7 +164,7 @@ The Tier changes task shape and the set of **suggested skills**, not a universal
165
164
 
166
165
  Harness operates through six core cognitive concepts:
167
166
 
168
- 1. **Kernel Router (`kernel-router.js` + `tier-router.js`):** `tier-router.js` remains the classifier, dynamic-skill detector, and knowledge-guide matcher. `kernel-router.js` is the public runtime boundary: it preserves the classifier result, injects baseline MUST invariants, and adds `evaluate-suggestions-before-skip` whenever domain skills are suggested. Suggestions MUST be evaluated from their real `SKILL.md` flow; an applicable skill's core contract MUST be followed, while not-applicable needs evidence. Selected-topology obligations are also semantic MUSTs, but the runtime generally observes/reminds rather than hard-blocking. This preserves agent autonomy over tactics without allowing confidence to erase the lifecycle. If nothing matches at all — including nothing already kept from the open skills ecosystem — `find-skills` checks `npx skills list` live and, if still nothing, searches `skills.sh`/`npx skills` with explicit approval before installation.
167
+ 1. **Kernel Router (`kernel-router.js` + `tier-router.js`):** `tier-router.js` classifies tasks and emits normalized knowledge signals; it does not select skill/reference paths. `kernel-router.js` is the public runtime boundary: it preserves the classifier result, injects baseline MUST invariants, and records ordered active-step bindings after requirement composition. Active required skills MUST be read and followed before their step passes. Selected-topology obligations are semantic MUSTs, but the runtime generally observes/reminds rather than hard-blocking. This preserves agent autonomy over tactics without allowing confidence to erase the lifecycle. If a step needs a skill not already available, `find-skills` checks `npx skills list` and searches `skills.sh`/`npx skills` under its own installation contract.
169
168
  2. **Guard (`rule-of-3.js`):** The fail-safe circuit breaker. Tracks failure signatures across terminal runs on integration surfaces that package the required lifecycle hooks. If a test or command fails 3 times with the same signature, it locks mutating tools and forces a `zoom-out` reflection: re-verify every assumption with read-only tools, write a fact-checked report, then resume on a fresh diagnosis. A companion `Stop` hook (`stop-gate.js`) emits a non-blocking reminder when edits were never followed by successful verification on hosts where that hook is installed.
170
169
  3. **Memory (`state-persist.js`):** Session transaction logging for stateful hook/plugin integrations. Static skills/instructions alone do not create WAL state.
171
170
  4. **Reflection (`self-evolve`):** Long-term workspace immunization. Upon task completion, the agent reflects on the root cause of resolved issues, then judges whether the lesson is a simple rule or a reusable, complex pattern: simple rules are appended to local workspace rules (`RULES.md`); genuinely reusable patterns are instead packaged as a dynamic skill (via `skill-creator`'s Dynamic Skill Generation Contract) and registered in `manifest.json` so the Router picks it up in future sessions. Either path is validated by a hermetic self-regression suite before it's persisted.
@@ -339,7 +338,7 @@ Mechanism tests prove individual packaged mechanisms; only real host/session evi
339
338
 
340
339
  ### Catalog hygiene
341
340
 
342
- `npm run test:consistency` keeps distribution manifests, docs links, skill frontmatter, routing-eval coverage, platform capability claims, and the generated repository runtime/workflow contract in lockstep with what is actually on disk. `npm run test:repo-contract` runs the runtime/workflow drift gate directly, while `npm run docs:sync` regenerates [docs/repository-contract.md](docs/repository-contract.md) after an intentional change. `npm run test:docs:capabilities` runs the platform-doc drift check directly. `npm run test:references` checks every executable/deep-dive path named by `SKILL.md`; `npm run test:release` compares release/catalog evidence; `npm run test:routing:skills` recursively classifies nested skills and executes the real router for every directly-routable skill's positive cases; `npm run test:routing:invariants` guards the invariant-first architecture including read-before-skip; and `harness verify-install` detects stale installed versions or file trees. The installer E2E gate performs install → verify-install → uninstall against seeded user-owned files on Ubuntu, Windows, and macOS so path and ownership symmetry regressions fail CI. `npm run test:collision` fails CI when two skills' descriptions overlap enough to confuse the router.
341
+ `npm run test:consistency` keeps distribution manifests, docs links, skill frontmatter, routing-eval coverage, platform capability claims, and the generated repository runtime/workflow contract in lockstep with what is actually on disk. `npm run test:repo-contract` runs the runtime/workflow drift gate directly, while `npm run docs:sync` regenerates [docs/repository-contract.md](docs/repository-contract.md) after an intentional change. `npm run test:docs:capabilities` runs the platform-doc drift check directly. `npm run test:references` checks every executable/deep-dive path named by `SKILL.md`; `npm run test:release` compares release/catalog evidence; `npm run test:routing:skills` recursively classifies nested skills and executes the real router for every directly-routable skill's positive cases; `npm run test:routing:invariants` guards active-step bindings, disclosure, and the fail-open workflow contract; and `harness verify-install` detects stale installed versions or file trees. The installer E2E gate performs install → verify-install → uninstall against seeded user-owned files on Ubuntu, Windows, and macOS so path and ownership symmetry regressions fail CI. `npm run test:collision` fails CI when two skills' descriptions overlap enough to confuse the router.
343
342
 
344
343
  ---
345
344
 
package/VERIFICATION.md CHANGED
@@ -257,7 +257,7 @@ Check that each `SKILL.md` has precise trigger/use boundaries, expected output,
257
257
 
258
258
  ### 7b. Routing accuracy
259
259
 
260
- Verify `kernel-router.js` / `tier-router.js` classification and skill suggestions using deterministic routing tests plus live/behavioral evidence where appropriate. Heuristic routing should not be graded as a hard workflow scheduler.
260
+ Verify `kernel-router.js` / `tier-router.js` classification and normalized knowledge signals using deterministic routing tests plus live/behavioral evidence where appropriate. Signals are composition inputs, not document selectors; routing should not be graded as a hard workflow scheduler.
261
261
 
262
262
  ### 7c. Test coverage
263
263
 
@@ -0,0 +1,27 @@
1
+ # Claude Code live-host trace for issue #297
2
+
3
+ **Date:** 2026-10-08
4
+
5
+ **Host:** Claude Code 2.1.293 on Windows
6
+
7
+ **Plugin source:** `fix/297-workflow-first` worktree under review
8
+
9
+ **Task workspace:** disposable temporary project; no task files were written to the repository.
10
+
11
+ ## Observed behavior
12
+
13
+ | Stage | Host evidence |
14
+ |---|---|
15
+ | Startup and route | `SessionStart:startup` returned the Harness bootstrap message. `UserPromptSubmit` emitted the selected `iterative-single` workflow and a typed behavior-change step. |
16
+ | Active-step bindings | `workflow-disposition start` returned concrete `binding` and `step` command templates for the current step. The step exposed the required `tdd` binding; the future verification binding was not surfaced until that step became active. |
17
+ | TDD behavior | Claude loaded `harness-everything:tdd`, recorded its binding as `loaded`, observed the focused test fail (`5 !== 6`), changed the implementation, then recorded the behavior-change step as `pass` with evidence of 2 passing tests. |
18
+ | Verification behavior | The next step exposed `verification-loop`; Claude loaded it, recorded the binding as `loaded`, ran the test suite and TDD quality gate, then recorded the verification step as `pass`. The quality gate reported **100% PASS**, with no skipped or flaky tests. |
19
+ | Host boundary | Actual Claude Code hooks, skill-tool calls, controller responses, and Stop hooks were observed in the headless host session. The raw stream is kept outside this repository because it contains private reasoning and machine-specific paths. |
20
+
21
+ ## Stop reminder
22
+
23
+ The final Stop hook emitted the existing soft reminder `verification-after-edit-missing`; the session workflow remained `running` rather than becoming `satisfied`. The trace shows Claude's Windows Bash tool wrapping `npm test` as `cd <workspace> && npm test`. The shared verifier rejects shell control operators before recognizing a verification command, so this wrapped command did not refresh `lastVerifyAt`. This is separate from the typed verification step, which recorded a passing test and quality-gate result. The reminder is fail-open and did not block the session. This host trace therefore proves active-step loading and step-contract execution, but does not claim a clean overall Stop state.
24
+
25
+ ## Evidence boundary
26
+
27
+ This is one live-host observation of the issue #297 contract. It does not establish behavior on other hosts or versions, and it makes no token/cost improvement claim; paired evidence for that belongs to issue #71.
@@ -0,0 +1,44 @@
1
+ # Claude Code live-host replay for issue #306
2
+
3
+ **Date:** 2026-10-13
4
+
5
+ **Host:** Claude Code 2.1.296 on Windows (headless `claude -p`, model haiku)
6
+
7
+ **Plugin source:** `fix/306-verify-cwd-wrapper` worktree loaded with `--plugin-dir` (as `harness-everything@inline`); installed harness-everything plugin disabled via `--settings`. No cached harness-everything plugin appeared in the session's plugin list.
8
+
9
+ **Task workspace:** disposable temporary git project with isolated `HARNESS_STATE_HOME`; no task files were written to this repository.
10
+
11
+ ## Observed behavior
12
+
13
+ Runs 1-2 were made without `--include-hook-events`, so only SessionStart hook events appear in their streams. Runs 3-4 were made with `--include-hook-events`, which also exposes PreToolUse, PostToolUse, UserPromptSubmit and Stop hook events.
14
+
15
+ | Check | Run 1 | Run 2 | Run 3 | Run 4 |
16
+ |---|---|---|---|---|
17
+ | Exit code | 0 | 0 | 0 | 0 |
18
+ | Harness plugin loaded | `harness-everything@inline` at worktree | Same | Same | Same |
19
+ | Bash command | `cd "<workspace>" && npm test` | Same | Same | Same |
20
+ | Bash result | `1 test passed`, `is_error: false` | Same | Same | Same |
21
+ | Edit landed (ws-diff) | yes | yes | yes | yes |
22
+ | `lastEditAt` to `lastVerifyAt` | 88 ms, verify later | 89 ms, verify later | 93 ms, verify later | 126 ms, verify later |
23
+ | `lastVerifyAt >= lastEditAt` | true | true | true | true |
24
+ | `lastVerifyExitCode` | null | null | null | null |
25
+ | `[Verification Reminder]` / `verification-after-edit-missing` | not observed (no Stop events in stream) | not observed | absent | absent |
26
+ | Stop `[Workflow Reminder]` output | not observed | not observed | emitted once; 5 unresolved items, no verification item | emitted once; same |
27
+
28
+ Stop observation in runs 3-4: six `Stop` hooks started and responded per run. Five harness Stop commands are registered in `hooks/hooks.json`, and the codex plugin registers one more (`stop-review-gate-hook.mjs`). One Stop response carried output, with exit code 0:
29
+
30
+ - `"hook_name":"Stop","output":"[Workflow Reminder] Unresolved workflow evidence: decompose:pending, compose:pending, requirements:empty, workflow-selection:unconfirmed, execution:not-started. Resolve/verify before claiming completion.\n","exit_code":0,"outcome":"success"`
31
+
32
+ The text matches `workflow-stop-gate.js`. The stream does not name the command for each `hook_id`, so this attribution is by message text. The other five Stop responses were empty with exit code 0. All nine PostToolUse and all PreToolUse responses in runs 3-4 were empty with exit code 0.
33
+
34
+ ## Evidence boundary
35
+
36
+ - The `cd <workspace> && npm test` command was requested explicitly in the prompt. It matches the shape observed in the #297 trace, but here it was prompt-directed, not spontaneously generated by the host.
37
+ - One host version (Claude Code 2.1.296) on Windows only.
38
+ - Runs 3 and 4 were launched concurrently, not sequentially as instructed. Each used its own workspace and `HARNESS_STATE_HOME`, and both exited 0. This did not appear to affect results, but it was not the requested procedure.
39
+ - The Stop attribution is by message text, not by a logged hook command. The sixth Stop invocation is unattributed.
40
+ - No `[Verification Reminder]` line appears. The state and code are consistent with that absence (`stop-gate.js` returns early when `lastVerifyAt >= lastEditAt`), but the reminder path was not forced to fire, so it is not live-verified here.
41
+ - `lastVerifyExitCode` is `null` in all runs. The Bash tool result reports only `is_error: false`, so the recorded verify event has no exit code.
42
+ - `workflow-state.json` does not exist; `workflow-run.json` was inspected instead.
43
+ - The raw streams and state files are kept outside the repository because they contain machine-specific paths.
44
+ - This is live-host evidence for the #306 fix. It is not a token or behavior-improvement claim. Mechanism coverage lives in `ci/mechanism-35-verification-contract.test.js` and is a separate evidence layer.
@@ -0,0 +1,81 @@
1
+ # PR #303 review-fix evidence — 2026-10-13
2
+
3
+ Retained evidence for [PR #303](https://github.com/dyphn1/Harness-everything/pull/303), collected by delegated **Luna high** workers on Windows with Node.js 24.18.0. This directory packages existing runs; it does not represent a new test execution.
4
+
5
+ The final tested source commit is [`788ea75b7ab69af678734c87ef3cba920b0b892f`](https://github.com/dyphn1/Harness-everything/commit/788ea75b7ab69af678734c87ef3cba920b0b892f), with Git tree `8f6c2c942d3f6c1af6ca4332b8ba1f2529b5cc95`. Evidence-only commits made afterward do not change that attribution.
6
+
7
+ ## Regression evidence
8
+
9
+ | Evidence | Result | Artifact |
10
+ | --- | --- | --- |
11
+ | Binding declaration RED | Exit 1; 40 expected assertion failures before the parser correction | [RED log](regression/red.log) |
12
+ | Workflow obligation GREEN | Exit 0; malformed declarations rejected without changing workflow/obligation state | [GREEN log](regression/workflow-obligations-green.log) |
13
+ | Existing binding resolution coverage | Exit 0 | [Binding resolution log](regression/binding-resolution-green.log) |
14
+ | Same-input repeated rejection | Two scenarios, each executed twice; identical outputs and unchanged session hashes | [Determinism record](regression/determinism.json) |
15
+ | Untyped Fable declarations | Both fields rejected with exit 2 and unchanged session state | [Fable probe](regression/untyped-fable-probe.json) |
16
+ | TDD quality gate | PASS, 100% for the binding declaration requirement | [Evidence input](regression/quality-evidence.json), [quality report](regression/quality-report.json) |
17
+
18
+ The regression suite covers `requiredBindings` and `optionalBindings`, five malformed value classes (`null`, object, string, boolean, number), and typed/untyped fragments: 20 input combinations. Explicit empty arrays and omitted declarations remain supported. The authoritative requirement is [workflow-runtime.md, “Fable and worktrees”](../../../docs/workflow-runtime.md#fable-and-worktrees).
19
+
20
+ ## Repository gates
21
+
22
+ All 14 independently requested gates returned exit 0. The mechanism run reports **76 passed suite files**, with **4 optional model-backend cases skipped** because `torch` or `torch/cua_s1` was unavailable. The mutation run rejected all **11 production mutations**. Passing command exits do not imply those optional cases executed.
23
+
24
+ | Command | Retained log |
25
+ | --- | --- |
26
+ | `npm.cmd test` | [Self-regression](gates/heavy/test.log) |
27
+ | `npm.cmd run test:mutations` | [Mutation checks](gates/heavy/test-mutations.log) |
28
+ | `npm.cmd run test:mechanism` | [Mechanism suites](gates/heavy/test-mechanism.log) |
29
+ | `npm.cmd run test:consistency` | [Consistency](gates/contracts/test-consistency.log) |
30
+ | `npm.cmd run test:repo-contract` | [Repository contract](gates/contracts/test-repo-contract.log) |
31
+ | `npm.cmd run test:docs:capabilities` | [Capability documentation](gates/contracts/test-docs-capabilities.log) |
32
+ | `npm.cmd run test:references` | [References](gates/contracts/test-references.log) |
33
+ | `npm.cmd run test:release` | [Release checks](gates/contracts/test-release.log) |
34
+ | `npm.cmd run test:collision` | [Description collisions](gates/contracts/test-collision.log) |
35
+ | `npm.cmd run test:routing:skills` | [Skill routing](gates/contracts/test-routing-skills.log) |
36
+ | `npm.cmd run test:routing:invariants` | [Routing invariants](gates/contracts/test-routing-invariants.log) |
37
+ | `npm.cmd run test:plugin:openai` | [Local OpenAI package](gates/contracts/test-plugin-openai.log) |
38
+ | `npm.cmd run test:plugin:submission` | [Public submission package](gates/contracts/test-plugin-submission.log) |
39
+ | `npm.cmd run test:platform:compatibility` | [Platform compatibility](gates/contracts/test-platform-compatibility.log) |
40
+
41
+ Machine-readable exit summaries: [heavy gates and diagnostic history](gates/heavy/summary.json), [11 contract gates](gates/contracts/summary.json), and [final consistency/release reruns](gates/final-fast/summary.json).
42
+
43
+ ## Source phases and final verification
44
+
45
+ The records span successive working-tree states; they must not all be attributed to a single final commit.
46
+
47
+ | Phase | Source attribution |
48
+ | --- | --- |
49
+ | Binding RED | PR head `8ad41ac`, with the new regression cases present and the parser correction absent |
50
+ | Binding GREEN / quality | Parser correction that was committed as `2faa451`, before integrating `main` |
51
+ | Independent repository gates / Fable probe | Integrated staged tree `09ff1e72d936ce56d58b1cbde6ae44cd6486fd39`, before the additional verification-fixture correction |
52
+ | Corrected fixture, final consistency/release reruns, final nested self-regression | Final tree `8f6c2c942d3f6c1af6ca4332b8ba1f2529b5cc95`, committed as `788ea75` |
53
+ | GitHub CI | Exact final source commit `788ea75b7ab69af678734c87ef3cba920b0b892f` |
54
+
55
+ The extra fixture change clears an inherited `HARNESS_SKIP_PROJECT_CHECKS` value for ordinary fixture invocations while retaining explicit overrides. Its [inherited-flag GREEN](verification/mechanism-35-inherited-flag-fixed.log) and [clean-environment GREEN](verification/mechanism-35-clean-env-fixed.log) both returned exit 0.
56
+
57
+ The final `node harness-everything/scripts/verify-gate.js --json` returned **`UNCHECKED_DISCOVERED`**, not `PASSED`: its `package-test` check completed successfully with exit 0, while a configured Git-hook candidate remained unexecuted. See the [structured result](verification/verify-gate-final.json), [final child stdout](verification/nested-test.stdout.log), [final child stderr](verification/nested-test.stderr.log), and [child process metadata](verification/nested-test.meta.json).
58
+
59
+ Do not cite the structured gate's overall exit 0 as additional passing-test evidence. The independently executed gates and the successful nested `package-test` supply the test evidence.
60
+
61
+ The logs include deliberately failing fixtures, circuit-breaker alarm text, and Git line-ending warnings. Those fixture messages are recorded test data, not instructions for a reader or evidence that the overall test process failed; use the assertions, process exits, and suite summaries to interpret them.
62
+
63
+ ## Earlier failed attempts
64
+
65
+ The [initial structured result](diagnostics/verify-gate.json) reported exit 1 because the recursion guard leaked into verification fixtures. The [inherited-flag reproduction](diagnostics/mechanism-35-inherited-flag.log), [clean-environment comparison](diagnostics/mechanism-35-clean-env.log), and [diagnosis](diagnostics/verify-gate-diagnosis.md) document that failure.
66
+
67
+ A later [capture attempt](diagnostics/verify-gate-captured.json) also failed: the diagnostic preload propagated into a fixture with intentionally invalid package JSON. The final capture isolated the preload from child processes. Its test passed without further product-runtime changes.
68
+
69
+ The original structured JSON omitted child streams. Later capture attempts reused temporary stream filenames; the archived `verification/nested-test.*` files belong to the **final successful child**, not the earlier failures. Earlier failed child streams were not retained. The historical summaries describe those attempts; they are not substitutes for missing raw streams.
70
+
71
+ ## GitHub CI and evidence boundary
72
+
73
+ [CI run 38355092624](https://github.com/dyphn1/Harness-everything/actions/runs/38355092624) passed all 15 jobs on the exact final source commit, including Ubuntu, Windows, and macOS self-regression. The [retained CI snapshot](ci/run.json) includes the run SHA, job conclusions, timestamps, and links. It describes that historical run, not a later evidence-only commit.
74
+
75
+ These artifacts prove deterministic mechanism/package checks and the recorded CI results. They do not establish a new live-host enforcement claim, behavioral improvement, or token/cost improvement.
76
+
77
+ ## Sanitization and integrity
78
+
79
+ [manifest.json](manifest.json) maps each published file to its retained source filename and phase. It records SHA-256 hashes of both the original bytes and the published bytes. Local workspace, home, and temporary-directory paths are replaced with `<workspace>`, `<repo>`, `<home>`, or `<temp>` placeholders; text is normalized to UTF-8/LF and JSON is reformatted. Captured `.log` files also have trailing spaces/tabs and blank EOF lines removed, retaining internal blank lines. Results, case order, exit codes, session hashes, and optional skips are preserved.
80
+
81
+ The original byte hashes are provenance fingerprints, not copies of unsanitized originals. Published hashes can be checked against the files in this directory. The manifest and this index are packaging metadata created after the runs.