harness-everything 0.7.0 → 0.8.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 (75) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.github/workflows/ci.yml +12 -2
  4. package/AGENTS.md +36 -33
  5. package/CHANGELOG.md +23 -0
  6. package/README.md +9 -8
  7. package/benchmarks/results/reviews/pr142-verification.json +95 -0
  8. package/ci/action-gate.test.js +1 -1
  9. package/ci/doc-capability-consistency.test.js +3 -0
  10. package/ci/invariant-routing.test.js +105 -34
  11. package/ci/mechanism-2af-worktree-isolation.test.js +152 -0
  12. package/ci/mechanism-2ag-router-worktree-contract.test.js +44 -0
  13. package/ci/mechanism-2ah-workflow-lifecycle.test.js +140 -0
  14. package/ci/openai-plugin-package.test.js +14 -7
  15. package/ci/workflow-execution-contract.test.js +60 -0
  16. package/docs/architecture.md +112 -106
  17. package/docs/mechanism-first-skill-mesh.md +93 -99
  18. package/docs/openai-plugin.md +1 -1
  19. package/docs/philosophy.md +40 -30
  20. package/docs/platform-capabilities.md +10 -2
  21. package/docs/reviews/pr-142-issue-131.md +89 -0
  22. package/docs/routing.md +68 -103
  23. package/docs/workflow-runtime.md +109 -0
  24. package/fable-mode/CONTRACT-FORMAT.md +3 -1
  25. package/fable-mode/SKILL.md +1 -1
  26. package/fable-mode/execution-guardrails/SKILL.md +1 -1
  27. package/fable-mode/fable-haiku/SKILL.md +1 -1
  28. package/fable-mode/fable-opus/SKILL.md +1 -1
  29. package/fable-mode/fable-sonnet/SKILL.md +1 -1
  30. package/fable-mode/scripts/workflow-plan-consumer.js +3 -1
  31. package/harness-everything/SKILL.md +17 -23
  32. package/harness-everything/references/triage-and-tiers.md +81 -98
  33. package/harness-everything/scripts/kernel-router-core.js +263 -0
  34. package/harness-everything/scripts/kernel-router.js +97 -212
  35. package/harness-everything/scripts/router-contract-core.js +612 -0
  36. package/harness-everything/scripts/router-contract.js +21 -581
  37. package/hooks/hooks.json +22 -1
  38. package/hooks/scripts/contract-test.js +24 -2
  39. package/hooks/scripts/lib/workflow-isolation.js +102 -0
  40. package/hooks/scripts/lib/workflow-runtime.js +102 -0
  41. package/hooks/scripts/state-persist.js +1 -0
  42. package/hooks/scripts/workflow-disposition.js +97 -0
  43. package/hooks/scripts/workflow-gate.js +53 -0
  44. package/hooks/scripts/workflow-stop-gate.js +44 -0
  45. package/opencode-plugin/plugin.json +1 -1
  46. package/package.json +2 -2
  47. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  48. package/plugins/harness-everything/hooks/hooks.json +20 -1
  49. package/plugins/harness-everything/hooks/scripts/contract-test.js +24 -2
  50. package/plugins/harness-everything/hooks/scripts/lib/workflow-isolation.js +102 -0
  51. package/plugins/harness-everything/hooks/scripts/lib/workflow-runtime.js +102 -0
  52. package/plugins/harness-everything/hooks/scripts/state-persist.js +1 -0
  53. package/plugins/harness-everything/hooks/scripts/workflow-disposition.js +97 -0
  54. package/plugins/harness-everything/hooks/scripts/workflow-gate.js +53 -0
  55. package/plugins/harness-everything/hooks/scripts/workflow-stop-gate.js +44 -0
  56. package/plugins/harness-everything/plugin.json +1 -1
  57. package/plugins/harness-everything/scripts/lib/advisory-text.js +53 -54
  58. package/plugins/harness-everything/skills/fable-mode/CONTRACT-FORMAT.md +3 -1
  59. package/plugins/harness-everything/skills/fable-mode/SKILL.md +1 -1
  60. package/plugins/harness-everything/skills/fable-mode/execution-guardrails/SKILL.md +1 -1
  61. package/plugins/harness-everything/skills/fable-mode/fable-haiku/SKILL.md +1 -1
  62. package/plugins/harness-everything/skills/fable-mode/fable-opus/SKILL.md +1 -1
  63. package/plugins/harness-everything/skills/fable-mode/fable-sonnet/SKILL.md +1 -1
  64. package/plugins/harness-everything/skills/fable-mode/scripts/workflow-plan-consumer.js +3 -1
  65. package/plugins/harness-everything/skills/harness-everything/SKILL.md +17 -23
  66. package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +81 -98
  67. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +263 -0
  68. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +97 -212
  69. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +612 -0
  70. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +21 -581
  71. package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +14 -16
  72. package/plugins/harness-everything/skills/using-git-worktrees/references/workflow-details.md +44 -85
  73. package/scripts/lib/advisory-text.js +53 -54
  74. package/using-git-worktrees/SKILL.md +14 -16
  75. package/using-git-worktrees/references/workflow-details.md +44 -85
@@ -7,7 +7,7 @@ description: >-
7
7
  license: Apache-2.0
8
8
  metadata:
9
9
  author: Miya Daniel
10
- version: 0.4.0
10
+ version: 0.8.1
11
11
  ---
12
12
 
13
13
  # Execution Guardrails
@@ -4,7 +4,7 @@ description: "Run staged fable work on Haiku for bulk mechanical tasks with expl
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.4.0
7
+ version: 0.8.1
8
8
  ---
9
9
 
10
10
  # Fable Mode — Haiku
@@ -4,7 +4,7 @@ description: "Run staged fable orchestration on Opus for cross-stage synthesis,
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.4.0
7
+ version: 0.8.1
8
8
  ---
9
9
 
10
10
  # Fable Mode — Opus
@@ -4,7 +4,7 @@ description: "Run staged fable work on Sonnet for non-trivial implementation, re
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.4.0
7
+ version: 0.8.1
8
8
  ---
9
9
 
10
10
  # Fable Mode — Sonnet
@@ -209,7 +209,7 @@ function atomicWriteJson(filePath, value) {
209
209
  fs.renameSync(tempPath, filePath);
210
210
  }
211
211
 
212
- function prepareRun({ routerContract, stages, workspaceRoot, runId, sessionId = null }) {
212
+ function prepareRun({ routerContract, stages, workspaceRoot, runId, sessionId = null, workflowId = null }) {
213
213
  const plan = validateRouterPlan(routerContract);
214
214
  const normalizedStages = validateStageGraph(stages || []);
215
215
  if (normalizedStages.length === 0) throw new Error('at least one stage contract is required');
@@ -237,6 +237,7 @@ function prepareRun({ routerContract, stages, workspaceRoot, runId, sessionId =
237
237
  planId,
238
238
  runId: resolvedRunId,
239
239
  sessionId: sessionId || null,
240
+ workflowId,
240
241
  workspaceRoot: root,
241
242
  ...stage,
242
243
  workerId: null,
@@ -252,6 +253,7 @@ function prepareRun({ routerContract, stages, workspaceRoot, runId, sessionId =
252
253
  planId,
253
254
  runId: resolvedRunId,
254
255
  sessionId: sessionId || null,
256
+ workflowId,
255
257
  workspaceRoot: root,
256
258
  workspaceKey: getWorkspaceKey(root),
257
259
  strategy: plan.strategy,
@@ -4,41 +4,35 @@ description: "Route software/project work through the Harness kernel: classify T
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.7.0
7
+ version: 0.8.1
8
8
  ---
9
9
 
10
10
  # Harness Everything
11
11
 
12
- Public/manual Harness kernel entry. Hook-capable hosts should run the kernel before peer/domain skill selection.
12
+ Kernel routing entry.
13
13
 
14
14
  ## USE FOR:
15
- - Software triage/re-routing, including work that already names or strongly matches another skill.
16
- - Inspecting Tier, invariants, or suggestions.
15
+ - Software/project triage, routing, re-routing, and workflow selection.
16
+ - Work that names or matches another skill.
17
17
 
18
18
  ## DO NOT USE FOR:
19
19
  - General Q&A or non-software writing.
20
20
 
21
21
  ## Invariants
22
-
23
- 1. **Route before execution** — establish scope/tier before mutation.
24
- 2. **Verify before claim** — completion needs objective evidence.
25
- 3. **Re-plan on repetition** — after 3 same-signature failures, stop micro-retrying and use `zoom-out`/fresh diagnosis.
26
-
27
- These rails are mandatory; Tier guidance is not a fixed pipeline.
22
+ 1. **Route before execution** — establish scope/tier and the smallest applicable workflow.
23
+ 2. **Verify before claim** — require objective evidence.
24
+ 3. **Re-plan on repetition** — after 3 same-signature failures, use `zoom-out`.
25
+ 4. **Evaluate before omission** — read each suggested skill's `SKILL.md` before deciding applicability.
26
+ 5. **Resolve selected workflow** — model confidence is not an escape condition.
28
27
 
29
28
  ## Workflow
30
-
31
- 1. Reuse current-turn kernel output, or run `node "<this-skill-dir>/scripts/kernel-router.js" "<prompt summary>"`.
32
- 2. Ensure the emitted **Harness Routing Checkpoint** is user-visible: reuse a host-visible rendering or include it in the first progress/update message.
33
- 3. Preserve the invariants.
34
- 4. Treat suggested skills as advisory: choose, combine, reorder, or omit them as useful. If suggestions are non-empty and you use none, state one brief skip reason with the visible checkpoint/progress update.
35
-
36
- ## Tier Guidance
37
-
38
- - **Tier 1:** Prefer direct execution.
39
- - **Tier 2:** TODO tracking, TDD, and verification are common suggestions.
40
- - **Tier 3:** Fable/multi-agent skills are optional when macro planning or delegation helps.
41
-
42
- **Rule:** enforce checkpoint visibility and workflow invariants, not workflow order; let the agent orchestrate itself inside those rails.
29
+ 1. Reuse kernel output, or run `node "<this-skill-dir>/scripts/kernel-router.js" "<prompt summary>"`.
30
+ 2. Surface the **Harness Routing Checkpoint**.
31
+ 3. Read each suggested `SKILL.md`; evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules. "Simple", "routine", names, or summaries alone cannot justify omission.
32
+ 4. Execute the selected workflow topology to resolution. Suggested skills are conditional on applicability; the selected topology is not advisory.
33
+ 5. If the workflow genuinely cannot represent part of the task, use the explicit escape with uncovered scope + evidence. Covered obligations remain mandatory.
34
+ 6. Complete only after applicable workflow obligations and objective verification resolve.
35
+
36
+ **Rule:** mandatory applicable workflow; flexible reasoning/implementation inside it; evidence-backed escape only for uncovered scope.
43
37
 
44
38
  Deep dive: <this-skill-dir>/references/triage-and-tiers.md
@@ -1,8 +1,8 @@
1
1
  # Task Triage & Tier Details
2
2
 
3
- Harness uses tiers to estimate scope and surface useful capabilities. A tier is **not** a fixed pipeline. The runtime enforces a very small set of cross-cutting invariants and leaves tactics, skill choice, ordering, and delegation to the agent.
3
+ Harness uses tiers to estimate scope and select the smallest sufficient execution topology. A tier is **not** a fixed TODO/TDD/Fable pipeline. Once the router selects an applicable topology, however, that topology becomes the run's execution contract.
4
4
 
5
- > Architecture rule: **Do not enforce workflow order. Enforce workflow invariants.**
5
+ > Architecture rule: **Mandatory applicable workflow; flexible reasoning/implementation inside it; evidence-backed escape only for workflow-uncovered scope.**
6
6
 
7
7
  ## 0. When Harness Routing Applies
8
8
 
@@ -10,51 +10,51 @@ Harness uses tiers to estimate scope and surface useful capabilities. A tier is
10
10
  flowchart TD
11
11
  U([User Prompt]) --> S{Software / project work?}
12
12
  S -- No --> B[Bypass Harness<br/>Answer naturally]
13
- S -- Yes --> K[Harness Kernel<br/>classify scope + inject invariants]
14
- K --> T{Tier recommendation}
15
- T -- Tier 1 --> A1[Prefer direct execution]
16
- T -- Tier 2 --> A2[Agent chooses useful domain skills]
17
- T -- Tier 3 --> A3[Agent chooses planning / delegation if useful]
18
- A1 --> E[Execute with agent-selected tactics]
19
- A2 --> E
20
- A3 --> E
21
- E --> V{Objective evidence supports completion?}
22
- V -- No --> R[Diagnose / iterate]
23
- R --> F{Same-signature failure x3?}
24
- F -- No --> E
25
- F -- Yes --> Z[Zoom out / re-plan]
26
- Z --> E
27
- V -- Yes --> D([Claim completion])
13
+ S -- Yes --> K[Harness Kernel<br/>classify + select topology]
14
+ K --> W{Workflow selected?}
15
+ W -- No / deferred --> D[Preserve invariants<br/>choose smallest justified workflow]
16
+ W -- Yes --> A[ACTIVE workflow contract]
17
+ A --> G{Suggested skills?}
18
+ G -- Yes --> R[Read each suggested SKILL.md<br/>resolve applicability]
19
+ G -- No --> E[Execute selected workflow]
20
+ R --> E
21
+ E --> V{Required checks / stages resolved?}
22
+ V -- Yes --> O([Claim completion])
23
+ V -- No --> P[Diagnose / re-plan]
24
+ P --> X{Workflow covers next step?}
25
+ X -- Yes --> E
26
+ X -- No --> C[Record evidence-backed escape<br/>for uncovered scope only]
28
27
  ```
29
28
 
30
29
  ### Bypass Rules
31
30
 
32
31
  - **Pure chat, translation, general web search, non-software writing:** bypass Harness routing.
33
- - **Software engineering / codebase / project work:** establish the Harness Kernel contract before mutating work, even when the prompt already names a domain skill such as `tdd`, `security-review`, or `repo-docs`.
32
+ - **Software engineering / codebase / project work:** establish the Harness Kernel contract before mutation, even when the prompt already names a domain skill.
34
33
 
35
- A host may auto-select a peer/domain skill. That selection must not be treated as proof that Harness routing already happened.
34
+ Host skill selection is not proof that Harness routing already happened.
36
35
 
37
- ## 1. The Minimal Harness Kernel
36
+ ## 1. Minimal Kernel Contract
38
37
 
39
- The kernel exists to keep strong models free while protecting the few behaviors that should not disappear under autonomous skill selection.
38
+ The kernel protects lifecycle obligations without micromanaging model reasoning.
40
39
 
41
40
  ### Mandatory invariants
42
41
 
43
- 1. **Route before execution** — establish task scope/tier before mutating software work.
44
- 2. **Verify before claim** — completion claims require objective evidence appropriate to the change.
42
+ 1. **Route before execution** — establish task scope/tier and the smallest justified topology.
43
+ 2. **Verify before claim** — completion requires objective evidence appropriate to the change.
45
44
  3. **Re-plan on repetition** — after three same-signature failures, stop micro-retrying and use a fresh diagnosis / `zoom-out`.
45
+ 4. **Evaluate before omission** — when the router suggests a skill, read its complete `SKILL.md` entry/basic flow before deciding applicability.
46
+ 5. **Resolve selected workflow** — once a topology is selected, execute it to a resolved state; "simple", "routine", "already clear", or model confidence are not escape conditions.
46
47
 
47
- These are the rails. Everything else is agent judgment unless the user or an authoritative project document explicitly requires it.
48
+ The model remains free to choose tools, implementation technique, decomposition details, and reasoning inside the workflow.
48
49
 
49
50
  ### What is intentionally *not* mandatory
50
51
 
51
- - Loading `todo-driven-workflow` for every Tier 2/3 task.
52
- - Running TDD for changes where executable behavioral tests do not add value.
53
- - Entering Fable/multi-agent mode merely because the task is Tier 3.
54
- - Following a universal `TODO → TDD → verification-loop` or `Fable → subagent → verification-loop` sequence.
55
- - Loading `install-cognitive-os` as a peer skill before every other skill.
52
+ - One universal `TODO → TDD → verification-loop` sequence for every Tier 2/3 task.
53
+ - Multi-agent execution merely because a task is Tier 3.
54
+ - Every router-suggested skill when its evaluated flow is objectively not applicable.
55
+ - Every optional deep-dive/reference linked from a skill.
56
56
 
57
- `install-cognitive-os` remains the human-readable/manual entry point for the cognitive policy. Supported runtime integrations should establish the kernel invariants without depending on that skill being selected first.
57
+ A suggested skill may resolve as `use`, `not-applicable`, or `unresolved/unavailable`. `not-applicable` needs a flow-grounded reason; a metadata-only or confidence-only judgement is insufficient. The selected **topology** is different: it is mandatory after selection unless an explicit workflow escape records genuinely uncovered scope plus evidence.
58
58
 
59
59
  ## 2. Routing Mechanism
60
60
 
@@ -62,88 +62,67 @@ Use the public kernel entry point:
62
62
 
63
63
  ```bash
64
64
  node "<this-skill-dir>/scripts/kernel-router.js" "<brief prompt summary>"
65
+ # or
66
+ npx github:dyphn1/Harness-everything next "<brief prompt summary>"
65
67
  ```
66
68
 
67
- or:
69
+ `kernel-router.js` delegates classification/guide discovery to `tier-router.js` and emits:
68
70
 
69
- ```bash
70
- npx github:dyphn1/Harness-everything next "<brief prompt summary>"
71
- ```
71
+ - recommended tier + rationale,
72
+ - structured workflow plan,
73
+ - compact **Harness Routing Checkpoint**,
74
+ - required invariants,
75
+ - suggested skills whose applicability must be evaluated,
76
+ - **Workflow Execution Contract** for the selected topology.
77
+
78
+ If `UserPromptSubmit` already ran the kernel this turn, reuse that output. Do not infer a silent Tier 1/direct path from missing or degraded routing.
79
+
80
+ ### Suggestion applicability contract
81
+
82
+ For every router-suggested skill:
83
+
84
+ 1. Read the complete `SKILL.md` entry.
85
+ 2. Evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules.
86
+ 3. Read extra material only when the entry explicitly requires it to decide applicability.
87
+ 4. Resolve the suggestion as `use`, `not-applicable`, or `unresolved/unavailable`.
72
88
 
73
- `kernel-router.js` delegates classification and guide discovery to `tier-router.js`, removes legacy fixed-pipeline instructions, and emits:
89
+ A name, description, router summary, tier label, or generic "routine/common task" judgement is not enough to mark a suggestion not applicable. Using one suggestion does not resolve the others automatically.
74
90
 
75
- - the recommended tier and rationale,
76
- - a compact **Harness Routing Checkpoint**,
77
- - the **required Harness invariants**,
78
- - **suggested skills** marked advisory,
79
- - the policy that the agent may choose the smallest useful skill/tool set.
91
+ ### Workflow escape contract
80
92
 
81
- If a host's `UserPromptSubmit` integration already ran the kernel this turn, reuse that output rather than running it twice. The checkpoint must still become user-visible for software/project work: use the host's visible hook rendering when it has one, otherwise include the checkpoint in the first progress/update message.
93
+ Escape is an exception path, not an alternative default. Use it only when the selected topology genuinely cannot represent part of the task. The permitted reason codes are:
82
94
 
83
- The tier classifier is heuristic. Treat its result as the default route, not an oracle. A clear task reading or explicit user instruction may override it; record the reason when doing so.
95
+ - `workflow-uncovered-scope` — the selected topology cannot represent a bounded part of the task;
96
+ - `host-capability-unavailable` — the host lacks a capability required to execute the selected topology.
97
+
98
+ Every escape must name a declared stage in the correlated run and record the reason code, uncovered scope, and evidence explaining the coverage/capability gap. The entire workflow never becomes escaped; isolation and independent verification cannot be waived. Covered workflow obligations remain mandatory. Host capability loss must be visible as degradation/blocked/escape evidence, never silently converted into optional execution.
84
99
 
85
100
  ## 3. Tier Guidance
86
101
 
87
102
  ### Tier 1 — Trivial
88
103
 
89
- Typical shape:
90
- - typo/small documentation correction,
91
- - simple local code edit,
92
- - narrow explanation,
93
- - straightforward Git operation.
104
+ Typical shape: typo/small docs correction, narrow local edit, bounded explanation, straightforward Git operation.
94
105
 
95
- Default behavior:
96
- - prefer direct execution,
97
- - avoid large plans and unnecessary delegation,
98
- - load a focused skill only when it materially improves the result,
99
- - still verify any completion claim with evidence appropriate to the change.
106
+ Default topology is normally `direct-single`. Keep the lifecycle minimal, but still satisfy applicable scope/safety/verification obligations.
100
107
 
101
108
  ### Tier 2 — Standard
102
109
 
103
- Typical shape:
104
- - a specific feature or bug fix,
105
- - multi-file coordination,
106
- - behavioral changes needing tests,
107
- - focused benchmark/review work.
108
-
109
- Common **suggestions**, not a pipeline:
110
+ Typical shape: specific feature/bug fix, multi-file coordination, behavioral change, focused benchmark/review.
110
111
 
111
- | Need observed in the task | Useful skill |
112
- |---|---|
113
- | Several verifiable steps need explicit tracking | `todo-driven-workflow` |
114
- | Behavior can be specified by executable tests | `tdd` |
115
- | Delivery needs systematic build/lint/test/diff evidence | `verification-loop` |
116
- | Auth/input/secrets/network boundaries are touched | `security-review` |
117
- | Isolated workspace would reduce risk | `using-git-worktrees` |
118
- | Quantitative scoring/benchmarking is requested | `eval-harness` |
112
+ The router normally selects `iterative-single`: bounded reason/act work plus objective verification. It may surface `tdd`, `verification-loop`, `security-review`, `using-git-worktrees`, or other focused skills. Those suggestions are applicability decisions, not a universal sequence.
119
113
 
120
- The model decides which of these are useful and in what order. It may use none, one, or several while preserving the kernel invariants. If the router emitted one or more suggestions and the agent uses none of them, the visible checkpoint/progress update must include one brief skip reason; using at least one suggestion does not require explaining why the others were omitted.
114
+ When an evaluated skill is applicable, follow its workflow rather than reading it and then discarding it because the implementation seems obvious.
121
115
 
122
116
  ### Tier 3 — Macro
123
117
 
124
- Typical shape:
125
- - repository-wide or architectural changes,
126
- - large ambiguous requirements,
127
- - broad documentation/system design,
128
- - work where deliberate delegation may reduce risk or improve coverage.
118
+ Typical shape: repository-wide/architectural work, large ambiguous requirements, cross-source synthesis, or bounded delegation.
129
119
 
130
- Common **suggestions**, not a pipeline:
120
+ The router may select `fable-staged`, `fable-parallel`, or `fable-multi-agent-workspace`. A selected Fable topology is not advisory: enter its stage-contract lifecycle, honor dependency/write-set constraints, run objective checks, synthesize, cold-verify where required, and use bounded re-planning on failure.
131
121
 
132
- | Need observed in the task | Useful skill |
133
- |---|---|
134
- | Deliberate macro planning / model-mode selection | `fable-mode`, `fable-discipline` |
135
- | Bounded parallel delegation genuinely helps | `multi-agent-workspace` |
136
- | Project-level docs need creation/update | `repo-docs` |
137
- | Important decisions need challenge before implementation | `grill-with-docs` |
138
- | Settled intent needs a spec | `to-spec` |
139
- | Settled work needs tracer-bullet issues | `to-tickets` |
140
-
141
- Tier 3 does **not** automatically require multi-agent execution. A strong model may complete macro work directly when that is the safer/smaller choice. The same all-skipped rationale rule applies when the router emitted suggestions.
122
+ Tier 3 does **not** automatically mean multi-agent; the router still chooses the smallest sufficient topology.
142
123
 
143
124
  ## 4. Cognitive OS Relationship
144
125
 
145
- The cognitive loop remains useful:
146
-
147
126
  ```mermaid
148
127
  flowchart LR
149
128
  D[Discover] --> T[Think]
@@ -155,38 +134,42 @@ flowchart LR
155
134
  Z --> T
156
135
  ```
157
136
 
158
- But this diagram describes a reasoning policy, not a peer-skill dependency graph. Domain skills may implement their own local phases and gates. They do not need to invoke `install-cognitive-os` first as long as the Harness invariants remain satisfied.
137
+ This describes a reasoning policy. The workflow contract governs lifecycle obligations; domain skills may define their own local phases inside it.
159
138
 
160
139
  ## 5. Host Integration and Enforcement Strength
161
140
 
162
141
  | Host mode | Expected behavior |
163
142
  |---|---|
164
- | Lifecycle hook available | Run the Harness Kernel on prompt submission so routing context exists before domain-skill execution. Surface the emitted checkpoint through a host-visible hook surface when supported; otherwise the agent carries it into the first visible progress/update. Hard gates may enforce supported invariants at tool/stop boundaries. |
165
- | Advisory instructions only | Tell the agent to run/reuse `harness next` before software mutation, surface the checkpoint, and run `harness verify` before completion. The behavior is advisory, not a hard host gate. |
166
- | Manual use | Invoke `harness-everything` or `install-cognitive-os` explicitly to inspect/re-establish and surface the contract. |
143
+ | Lifecycle hooks available | Kernel creates the selected workflow contract. Supported PreToolUse/Stop gates may mechanically prevent known bypasses. |
144
+ | Advisory instructions only | Agent is instructed to establish and resolve the same contract, but the host cannot be described as mechanically enforcing it. |
145
+ | Manual use | Invoke `harness-everything` / `harness next`, then execute the selected topology explicitly. |
146
+
147
+ On Claude and the local OpenAI package, supported mutation hooks require Fable entry and Tier 3/Fable Git worktree isolation. Follow-up prompts preserve unresolved state. The router displays a session `workflow-stages.json` path and `workflow-disposition.js start` command; declare stages there before entry. Stop checks expected stage contracts plus correlated exit-zero/worker evidence. A retry records `blocked`, never false success. Direct/patch paths and explicit shell targets are checked, but arbitrary scripts are not sandboxed. Other selected topologies still rely on their applicable mechanisms (for example objective verification/stop gates) and shared contract text.
167
148
 
168
- Never describe an advisory integration as hard enforcement. Platform-specific adapters may differ while preserving functional intent. Kernel emission alone is not proof that a host UI displayed the checkpoint; #82 live evidence owns that claim.
149
+ Never turn mechanism/package evidence into a cross-host live-enforcement claim. #82 owns host-specific retained evidence.
169
150
 
170
151
  ## 6. Routing Checkpoint
171
152
 
172
- For software/project work, the kernel always emits a compact checkpoint and the execution surface must make it user-visible before or with the first progress update:
153
+ For software/project work, surface this state before or with the first progress update:
173
154
 
174
155
  ```markdown
175
156
  ## 🚦 Harness Routing Checkpoint
176
157
  - Tier: Tier X — <reason>
177
158
  - Strategy: <selected/deferred strategy>
178
- - Required invariants: route-before-execution; verify-before-claim; re-plan-after-3-same-failures
179
- - Suggested skills: <deduplicated suggestions, or none>
180
- - Suggestion disposition: <using one or more | skipped all — brief reason>
159
+ - Workflow state: <pending | running | satisfied | deferred | blocked>
160
+ - Required invariants: <router invariants>
161
+ - Suggested skills: <deduplicated suggestions or none>
162
+ - Suggestion applicability: <use | not-applicable + reason | unresolved/unavailable>
163
+ - Escape: <none | reason + uncovered scope + evidence>
181
164
  ```
182
165
 
183
- The checkpoint reports state; it does not prescribe a universal workflow. Suggested skills remain advisory. The only extra accountability rule is that a non-empty suggestion set cannot disappear silently: if every suggestion is skipped, state one brief reason. Do not add a skip explanation when at least one suggestion is used.
166
+ The checkpoint is state, not a universal response template. The key distinction is: **skill suggestions are evaluated for applicability; a selected workflow topology is executed to resolution.**
184
167
 
185
168
  ## 7. Self-Healing and Dynamic Skills
186
169
 
187
- Existing self-heal, generated-skill discovery, knowledge-guide matching, and fact-audit behavior remain part of the classifier/runtime. They may recommend resources but should not silently convert recommendations into mandatory pipeline stages.
170
+ Self-heal, generated-skill discovery, knowledge-guide matching, and fact-audit behavior remain part of the runtime. Dynamic recommendations still require applicability evaluation.
188
171
 
189
- If bootstrap reports missing integration touchpoints, use the existing self-heal command:
172
+ If bootstrap reports missing integration touchpoints:
190
173
 
191
174
  ```bash
192
175
  node "<this-skill-dir>/scripts/self-heal.js"