harness-everything 0.19.0 → 0.20.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 (69) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.releaserc.json +1 -1
  4. package/AGENTS.md +3 -2
  5. package/CHANGELOG.md +9 -0
  6. package/README.md +14 -14
  7. package/RELEASING.md +10 -2
  8. package/ci/invariant-routing.test.js +42 -19
  9. package/ci/mechanism-2af-worktree-isolation.test.js +3 -3
  10. package/ci/mechanism-2ag-router-worktree-contract.test.js +1 -0
  11. package/ci/mechanism-2an-workflow-obligations.test.js +1 -0
  12. package/ci/mechanism-2ap-sbom.test.js +92 -0
  13. package/ci/mechanism-33-issues-205-207.test.js +2 -2
  14. package/ci/openai-plugin-package.test.js +6 -6
  15. package/ci/router-workflow-plan.test.js +12 -9
  16. package/ci/workflow-execution-contract.test.js +2 -2
  17. package/docs/architecture.md +15 -15
  18. package/docs/enforcement-locks.md +17 -15
  19. package/docs/philosophy.md +43 -8
  20. package/docs/routing.md +23 -16
  21. package/docs/workflow-runtime.md +20 -19
  22. package/environment-detection/SKILL.md +3 -1
  23. package/evals/harness-everything/tasks/positive-tier1.yaml +1 -1
  24. package/evals/harness-everything/tasks/positive-tier2.yaml +1 -1
  25. package/evals/harness-everything/tasks/positive-tier3.yaml +1 -1
  26. package/evals/using-git-worktrees/tasks/positive-trigger.yaml +1 -1
  27. package/find-skills/SKILL.md +20 -29
  28. package/git-commit/SKILL.md +4 -4
  29. package/harness-everything/SKILL.md +16 -17
  30. package/harness-everything/references/triage-and-tiers.md +17 -16
  31. package/harness-everything/scripts/kernel-router-core.js +26 -24
  32. package/harness-everything/scripts/kernel-router.js +8 -8
  33. package/harness-everything/scripts/router-contract-core.js +7 -7
  34. package/harness-everything/scripts/router-contract.js +1 -1
  35. package/hooks/scripts/atomic-commit-check.js +1 -1
  36. package/hooks/scripts/boundary-guard.js +2 -2
  37. package/hooks/scripts/depth-guard.js +5 -6
  38. package/hooks/scripts/subagent-scope-guard.js +2 -2
  39. package/hooks/scripts/workflow-gate.js +1 -1
  40. package/install-cognitive-os/SKILL.md +3 -3
  41. package/opencode-plugin/plugin.json +1 -1
  42. package/package.json +5 -2
  43. package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
  44. package/plugins/harness-everything/hooks/scripts/atomic-commit-check.js +1 -1
  45. package/plugins/harness-everything/hooks/scripts/boundary-guard.js +2 -2
  46. package/plugins/harness-everything/hooks/scripts/depth-guard.js +5 -6
  47. package/plugins/harness-everything/hooks/scripts/subagent-scope-guard.js +2 -2
  48. package/plugins/harness-everything/hooks/scripts/workflow-gate.js +1 -1
  49. package/plugins/harness-everything/plugin.json +1 -1
  50. package/plugins/harness-everything/scripts/lib/advisory-text.js +19 -17
  51. package/plugins/harness-everything/skills/environment-detection/SKILL.md +3 -1
  52. package/plugins/harness-everything/skills/find-skills/SKILL.md +20 -29
  53. package/plugins/harness-everything/skills/git-commit/SKILL.md +4 -4
  54. package/plugins/harness-everything/skills/harness-everything/SKILL.md +16 -17
  55. package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +17 -16
  56. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +26 -24
  57. package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +8 -8
  58. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +7 -7
  59. package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +1 -1
  60. package/plugins/harness-everything/skills/install-cognitive-os/SKILL.md +3 -3
  61. package/plugins/harness-everything/skills/rewrite-commits/SKILL.md +2 -2
  62. package/plugins/harness-everything/skills/to-tickets/SKILL.md +2 -2
  63. package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +6 -6
  64. package/rewrite-commits/SKILL.md +2 -2
  65. package/sbom.cdx.json +2110 -0
  66. package/scripts/generate-sbom.js +239 -0
  67. package/scripts/lib/advisory-text.js +19 -17
  68. package/to-tickets/SKILL.md +2 -2
  69. package/using-git-worktrees/SKILL.md +6 -6
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: harness-everything
3
- description: "Route software/project work through the Harness kernel: classify Tier 1/2/3, surface planning guidance and applicable skills, then let the agent choose tactics. Use for software triage, routing, and re-routing; not general Q&A or non-software writing."
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."
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.18.1
7
+ version: 0.19.1
8
8
  ---
9
9
 
10
10
  # Harness Everything
@@ -12,28 +12,27 @@ metadata:
12
12
  Kernel routing entry.
13
13
 
14
14
  ## USE FOR:
15
- - Software/project triage, routing, re-routing, and workflow selection.
15
+ - Software/project triage, routing, re-routing, workflow selection.
16
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
- 1. **Route before execution** — establish scope/tier and useful workflow guidance.
23
- 2. **Verify before claim** — seek objective evidence before saying work is done.
24
- 3. **Zoom out 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. **Surface status** — non-trivial work MUST render `### 🚦 Harness Status` with bold bullets: `Current`, `Read / Evidence`, `Next`; optional `Risk / Blocked`.
27
- 6. **Keep agency** — workflow state and numeric limits guide; they do not hard-stop execution.
22
+ 1. **Route (MUST)** — establish scope/tier and selected/deferred topology.
23
+ 2. **Verify (MUST)** — completion claims need objective evidence.
24
+ 3. **Zoom out (MUST)** — after 3 same-signature failures, use `zoom-out`.
25
+ 4. **Resolve suggestions (MUST)** — read/evaluate each suggested `SKILL.md`; applicable core contracts MUST run, otherwise retain a flow-grounded reason.
26
+ 5. **Surface status (MUST)** — non-trivial work renders `### 🚦 Harness Status` with bold `Current`, `Read / Evidence`, `Next`; optional `Risk / Blocked`.
27
+ 6. **Keep agency** — required obligations are MUST; tactics MAY adapt. Numeric planning values MAY guide, never hard-stop.
28
28
 
29
29
  ## Workflow
30
- 1. Reuse kernel output, or run `node "<this-skill-dir>/scripts/kernel-router.js" "<prompt summary>"`.
31
- 2. Keep the **Harness Routing Checkpoint** internal; never render it separately.
32
- 3. Read each suggested `SKILL.md`; evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules.
33
- 4. Use the selected topology as planning guidance. Choose, combine, reorder, or skip steps when evidence supports doing so.
34
- 5. Prefer worktree isolation for broad/Tier-3 mutation and objective verification before completion.
35
- 6. If guidance is not useful, explain the reason briefly and continue; no Harness reset is required.
36
-
37
- **Rule:** guidance may become louder when evidence is weak, but only Rule-of-3 reflection and explicit user/host permission boundaries may block.
30
+ 1. Reuse kernel output or run `node "<this-skill-dir>/scripts/kernel-router.js" "<prompt summary>"`.
31
+ 2. Keep the routing checkpoint internal.
32
+ 3. Resolve each suggestion as `use`, `not-applicable`, or `unresolved`; `use` follows its core contract.
33
+ 4. Resolve selected-topology required invariants/stages/checks before completion.
34
+ 5. Tier-3/Fable broad mutation MUST resolve isolation: linked worktree or explicit degraded fallback.
35
+
36
+ **Rule:** semantic MUST is not hard blocking; only Rule-of-3 reflection and explicit user/host permission boundaries may block.
38
37
 
39
38
  Deep dive: <this-skill-dir>/references/triage-and-tiers.md
@@ -2,7 +2,7 @@
2
2
 
3
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: **Guidance-first workflow; flexible reasoning/implementation; only Rule-of-3 reflection and explicit permission boundaries may block.**
5
+ > Architecture rule: **Contract-first lifecycle; flexible reasoning/implementation; semantic MUSTs may be reminder-observed, while only Rule-of-3 reflection and explicit permission boundaries may hard-block.**
6
6
 
7
7
  ## 0. When Harness Routing Applies
8
8
 
@@ -43,7 +43,7 @@ The kernel protects lifecycle obligations without micromanaging model reasoning.
43
43
  2. **Verify before claim** — completion requires objective evidence appropriate to the change.
44
44
  3. **Re-plan on repetition** — after three same-signature failures, stop micro-retrying and use a fresh diagnosis / `zoom-out`.
45
45
  4. **Evaluate before omission** — when the router suggests a skill, read its complete `SKILL.md` entry/basic flow before deciding applicability.
46
- 5. **Review selected workflow** — use the topology as planning guidance and keep any skipped step evidence-based.
46
+ 5. **Resolve selected workflow** — selected-topology required obligations are semantic MUSTs; implementation tactics MAY adapt where the contract allows.
47
47
  6. **Surface status** — non-trivial software/project work MUST use the single Harness Status format at required phase boundaries.
48
48
 
49
49
  The model remains free to choose tools, implementation technique, decomposition details, and reasoning inside the workflow.
@@ -55,7 +55,7 @@ The model remains free to choose tools, implementation technique, decomposition
55
55
  - Every router-suggested skill when its evaluated flow is objectively not applicable.
56
56
  - Every optional deep-dive/reference linked from a skill.
57
57
 
58
- 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 planning guidance. Escape/replan metadata may still record why a suggested path was not followed, but it is not a lock.
58
+ A suggested skill may resolve as `use`, `not-applicable`, or `unresolved/unavailable`. Resolution is a **MUST**. `not-applicable` needs a flow-grounded reason; a metadata-only or confidence-only judgement is insufficient. If disposition is `use`, the skill's core contract is a **MUST**. The selected **topology** is also a semantic execution contract; neither concept implies a persistent runtime lock.
59
59
 
60
60
  ## 2. Routing Mechanism
61
61
 
@@ -69,12 +69,12 @@ npx github:dyphn1/Harness-everything next "<brief prompt summary>"
69
69
 
70
70
  `kernel-router.js` delegates classification/guide discovery to `tier-router.js` and emits:
71
71
 
72
- - recommended tier + rationale,
72
+ - classified tier + rationale,
73
73
  - structured workflow plan,
74
74
  - compact **Harness Routing Checkpoint**,
75
75
  - required invariants,
76
76
  - suggested skills whose applicability must be evaluated,
77
- - **Workflow Guidance** for the selected topology.
77
+ - **Workflow Contract** for the selected topology.
78
78
 
79
79
  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.
80
80
 
@@ -82,23 +82,24 @@ If `UserPromptSubmit` already ran the kernel this turn, reuse that output. Do no
82
82
 
83
83
  For every router-suggested skill:
84
84
 
85
- 1. Read the complete `SKILL.md` entry.
86
- 2. Evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules.
85
+ 1. **MUST** read the complete `SKILL.md` entry.
86
+ 2. **MUST** evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules.
87
87
  3. Read extra material only when the entry explicitly requires it to decide applicability.
88
- 4. Resolve the suggestion as `use`, `not-applicable`, or `unresolved/unavailable`.
88
+ 4. **MUST** resolve the suggestion as `use`, `not-applicable`, or `unresolved/unavailable`.
89
+ 5. `use` means the skill's core contract **MUST** be followed; `not-applicable` **MUST** keep a flow-grounded reason.
89
90
 
90
91
  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.
91
92
 
92
93
  ### Workflow escape contract
93
94
 
94
- Escape is audit metadata for a bounded guidance deviation. Use it only when the selected topology genuinely cannot represent part of the task. The permitted reason codes are:
95
+ Escape is audit metadata for a bounded contract exception. Use it only when the selected topology genuinely cannot represent part of the task. The permitted reason codes are:
95
96
 
96
97
  - `workflow-uncovered-scope` — the selected topology cannot represent a bounded part of the task;
97
98
  - `host-capability-unavailable` — the host lacks a capability required to execute the selected topology.
98
99
 
99
- 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. Host capability loss and missing isolation should remain visible as warnings/evidence, without creating a persistent execution lock.
100
+ 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. Host capability loss and missing isolation **MUST** remain visible as warnings/evidence, without creating a persistent execution lock.
100
101
 
101
- ## 3. Tier Guidance
102
+ ## 3. Tier Routing
102
103
 
103
104
  ### Tier 1 — Trivial
104
105
 
@@ -118,7 +119,7 @@ When an evaluated skill is applicable, follow its workflow rather than reading i
118
119
 
119
120
  Typical shape: repository-wide/architectural work, large ambiguous requirements, cross-source synthesis, or bounded delegation.
120
121
 
121
- The router may select `fable-staged`, `fable-parallel`, or `fable-multi-agent-workspace`. A selected Fable topology is structured planning guidance: use its stages/dependencies/evidence when helpful, but do not convert missing lifecycle evidence into a persistent workflow lock.
122
+ The router may select `fable-staged`, `fable-parallel`, or `fable-multi-agent-workspace`. A selected Fable topology is a semantic execution contract: its required stages, dependencies/write sets, checks, synthesis barrier, and verifier **MUST** resolve. Missing lifecycle evidence may produce reminders rather than a persistent workflow lock; fail-open mechanics do not make the contract optional.
122
123
 
123
124
  Tier 3 does **not** automatically mean multi-agent; the router still chooses the smallest sufficient topology.
124
125
 
@@ -141,8 +142,8 @@ This describes a reasoning policy. The workflow contract governs lifecycle oblig
141
142
 
142
143
  | Host mode | Expected behavior |
143
144
  |---|---|
144
- | Lifecycle hooks available | Kernel records selected workflow guidance. PreToolUse/Stop hooks emit reminders; Rule-of-3 and permission gates are the intentional blocking exceptions. |
145
- | Advisory instructions only | Agent receives the same routing/workflow guidance without lifecycle observations. |
145
+ | Lifecycle hooks available | Kernel records the selected semantic workflow contract. PreToolUse/Stop hooks observe/remind; Rule-of-3 and permission gates are the intentional blocking exceptions. |
146
+ | Instruction-only / advisory delivery | Agent receives the same MUST/SHOULD/MAY semantic contract without lifecycle observations or hard-enforcement claims. |
146
147
  | Manual use | Invoke `harness-everything` / `harness next`, then execute the selected topology explicitly. |
147
148
 
148
149
  On Claude and the local OpenAI package, supported hooks observe workflow/worktree/verification state and emit reminders. Rule-of-3 reflection and explicit action/permission gates remain separate blocking boundaries.
@@ -185,11 +186,11 @@ For software/project work, consume this internal runtime state when producing th
185
186
  - Escape: <none | reason + uncovered scope + evidence>
186
187
  ```
187
188
 
188
- The checkpoint is runtime/source state, not a competing user-facing template. Render user progress through the single Harness Status contract above. The key distinction is: **skill suggestions are evaluated for applicability; a selected topology guides execution but does not trap it.**
189
+ The checkpoint is runtime/source state, not a competing user-facing template. Render user progress through the single Harness Status contract above. The key distinction is: **skill suggestions MUST resolve applicability; applicable skill core contracts and selected-topology obligations are MUSTs, while tactics MAY adapt.**
189
190
 
190
191
  ## 8. Self-Healing and Dynamic Skills
191
192
 
192
- Self-heal, generated-skill discovery, knowledge-guide matching, and fact-audit behavior remain part of the runtime. Dynamic recommendations still require applicability evaluation.
193
+ Self-heal, generated-skill discovery, knowledge-guide matching, and fact-audit behavior remain part of the runtime. Dynamic skill suggestions still require applicability evaluation.
193
194
 
194
195
  If bootstrap reports missing integration touchpoints:
195
196
 
@@ -22,29 +22,31 @@ const { applyEnsemblePolicy } = require('./ensemble-policy');
22
22
  */
23
23
 
24
24
  const INVARIANT_TEXT = {
25
- 'scope-lock': 'Route before execution: stay inside the authorized task/repository scope.',
26
- 'verify-before-claim': 'Verify before claim: completion claims require objective evidence appropriate to the change.',
27
- 'visible-status-updates': 'User-visible status is mandatory: render the single Markdown Harness Status with a visible heading, bullet-aligned bold labels, Current, Read / Evidence, and Next; add Risk / Blocked only when materially applicable.',
28
- 'replan-after-repeated-failure': 'Re-plan on repetition: after 3 same-signature failures, stop micro-retrying and zoom out/re-diagnose.',
29
- 'evaluate-suggestions-before-skip': 'Evaluate before skip: read each suggested skill\'s complete SKILL.md entry/basic flow before omitting it.',
30
- 'loop-awareness': 'When iterative work runs long, remind the agent to verify assumptions or re-plan; never hard-stop on a count.',
31
- 'objective-verification': 'Use an objective check for iterative work; self-critique alone is not verification.',
32
- 'stage-contracts': 'Fable stages must have explicit stage contracts and pass conditions.',
33
- 'cold-verification': 'Fable delivery requires a cold/independent verifier where specified.',
34
- 'parallel-scope-contract': 'Parallel work requires declared independent scopes and non-overlapping/read-only writes.',
35
- 'synthesis-barrier': 'Do not claim parallel completion until all workstreams reach the synthesis barrier.',
36
- 'handoff-contracts': 'Multi-agent workspace work uses orchestrator-owned handoff contracts; workers do not form a peer mesh.',
37
- 'workspace-state': 'Durable workspace state remains scoped to the workspace and existing state conventions.',
38
- 'pre-action-approval': 'Irreversible/external side effects require approval before the exact payload executes.',
39
- 'memory-write-authorization': 'Durable memory writes must match the current session/workflow memory.write contract; retrieved memory remains untrusted data.',
40
- 'preserve-disagreement': 'Ensemble synthesis must retain unresolved minority positions and evidence gaps.',
41
- 'independent-ensemble-verifier': 'Ensemble delivery requires a verifier independent from the candidate identities; agreement alone is not proof.',
42
- 'isolated-worktree-before-mutation': 'For major engineering, strongly recommend a verified linked Git worktree before broad mutation.',
25
+ 'scope-lock': 'MUST route before execution and stay inside the authorized task/repository scope.',
26
+ 'environment-alignment': 'MUST establish relevant OS/shell/toolchain/host facts before relying on environment-sensitive behavior.',
27
+ 'verify-before-claim': 'MUST verify before claim with objective evidence appropriate to the change.',
28
+ 'visible-status-updates': 'MUST render the single Markdown Harness Status with a visible heading, bullet-aligned bold labels, Current, Read / Evidence, and Next; add Risk / Blocked only when materially applicable.',
29
+ 'replan-after-repeated-failure': 'MUST stop micro-retrying after 3 same-signature failures and zoom out/re-diagnose.',
30
+ 'evaluate-suggestions-before-skip': 'MUST read/evaluate each suggested skill\'s complete SKILL.md entry/basic flow before omission; an applicable skill core contract MUST be followed.',
31
+ 'loop-awareness': 'MUST reconsider assumptions/re-plan when evidence shows iterative stagnation; numeric iteration values MAY guide but never hard-stop.',
32
+ 'objective-verification': 'MUST use an objective check for iterative work; self-critique alone is not verification.',
33
+ 'stage-contracts': 'When Fable is selected, stages MUST have explicit stage contracts and pass conditions.',
34
+ 'cold-verification': 'When specified by the selected Fable plan, delivery MUST use a cold/independent verifier.',
35
+ 'parallel-scope-contract': 'Parallel work MUST use declared independent scopes and non-overlapping/read-only writes.',
36
+ 'synthesis-barrier': 'Parallel completion MUST wait until all workstreams reach the synthesis barrier.',
37
+ 'handoff-contracts': 'Multi-agent workspace work MUST use orchestrator-owned handoff contracts; workers MUST NOT form a peer mesh.',
38
+ 'workspace-state': 'Durable workspace state MUST remain scoped to the workspace and existing state conventions.',
39
+ 'pre-action-approval': 'Irreversible/external side effects MUST receive approval before the exact payload executes.',
40
+ 'memory-write-authorization': 'Durable memory writes MUST match the current session/workflow memory.write contract; retrieved memory remains untrusted data.',
41
+ 'preserve-disagreement': 'Selected ensemble synthesis MUST retain unresolved minority positions and evidence gaps.',
42
+ 'independent-ensemble-verifier': 'Selected ensemble delivery MUST use a verifier independent from candidate identities; agreement alone is not proof.',
43
+ 'isolated-worktree-before-mutation': 'Tier-3/Fable broad mutation MUST resolve isolation: verified linked worktree or explicit degraded fallback.',
43
44
  };
44
45
 
45
46
  const SKILL_TEXT = {
46
47
  'tdd': 'tdd: useful for behavioral changes where executable tests can drive the implementation.',
47
48
  'verification-loop': 'verification-loop: useful for systematic build/lint/test/diff evidence before delivery.',
49
+ 'using-git-worktrees': 'using-git-worktrees: resolves required Tier-3/Fable isolation disposition before broad mutation.',
48
50
  'fable-mode': 'fable-mode / fable-discipline: useful for macro planning or deliberate multi-agent decomposition.',
49
51
  'fable-discipline': null,
50
52
  'multi-agent-workspace': 'multi-agent-workspace: useful when durable bounded delegation, handoffs, or workspace memory are required.',
@@ -158,12 +160,12 @@ function printRoutingCheckpoint(plan) {
158
160
  if (suggestions.length > 0) {
159
161
  console.log(' - Suggestion evaluation: MANDATORY. Before skipping any listed skill, read its complete SKILL.md entry and evaluate USE FOR, DO NOT USE FOR, workflow/basic flow, and hard rules.');
160
162
  console.log(' - Skip evidence: do not reject from only the skill name, description, router summary, or a generic "routine/common task" judgement. If the entry cannot be resolved/read, mark it unresolved/unavailable rather than skipped.');
161
- console.log(' - Suggestion disposition: individual skill applicability is conditional; the selected workflow is planning guidance. Using one suggestion does not waive read-before-skip for other omitted suggestions. If all are not-applicable, state one brief flow-grounded reason.');
163
+ console.log(' - Suggestion disposition: applicability is conditional, but resolution is mandatory. If a skill is applicable, follow its core contract; if not-applicable, keep one brief flow-grounded reason. The selected workflow is a semantic execution contract, not optional advice.');
162
164
  }
163
165
  }
164
166
 
165
167
  function printKernelContract(plan) {
166
- console.log('\n=> REQUIRED HARNESS INVARIANTS:');
168
+ console.log('\n=> REQUIRED HARNESS INVARIANTS (SEMANTIC MUST):');
167
169
  for (const invariant of plan.requiredInvariants || []) {
168
170
  console.log(` - ${invariant}: ${INVARIANT_TEXT[invariant] || 'Required by the selected workflow plan.'}`);
169
171
  }
@@ -182,7 +184,7 @@ function printKernelContract(plan) {
182
184
  console.log(' - Emit it before substantive execution, after a major phase, when direction materially changes, at meaningful long-running phase boundaries, and before final completion (the final response may merge it naturally).');
183
185
  console.log(' - This is a semantic communication MUST, not a hard execution lock, counter, or reset condition.');
184
186
 
185
- console.log('\n=> WORKFLOW SKILLS (EVALUATE APPLICABILITY — SELECTED WORKFLOW IS GUIDANCE):');
187
+ console.log('\n=> WORKFLOW SKILLS (APPLICABILITY MUST BE RESOLVED):');
186
188
  if (Array.isArray(plan.suggestedSkills) && plan.suggestedSkills.length > 0) {
187
189
  const emitted = new Set();
188
190
  for (const skill of plan.suggestedSkills) {
@@ -192,12 +194,12 @@ function printKernelContract(plan) {
192
194
  emitted.add(skill);
193
195
  if (skill === 'fable-mode') emitted.add('fable-discipline');
194
196
  }
195
- console.log(' - Read-before-skip: evaluate every suggested skill entry before omission; adopting one suggestion does not waive evaluation of the others.');
197
+ console.log(' - Read-before-skip: MUST evaluate every suggested skill entry before omission. If applicable, MUST follow its core contract; adopting one suggestion does not waive resolution of the others.');
196
198
  if (plan.strategy && plan.strategy.startsWith('fable-')) {
197
199
  console.log(' - Fable is not a universal pipeline, but a selected Fable topology must be entered and resolved before completion.');
198
200
  }
199
201
  } else if (plan.strategy === 'direct-single') {
200
- console.log(' - No domain skill was suggested. Prefer the bounded direct path and load a focused skill only when it adds value.');
202
+ console.log(' - No domain skill was suggested. The bounded direct path SHOULD remain minimal; a focused skill MAY be loaded when it adds value.');
201
203
  } else if (plan.strategySelection === 'deferred') {
202
204
  console.log(' - Strategy is deferred/unclassified. Do not infer triviality; choose the smallest justified approach from task evidence.');
203
205
  } else {
@@ -220,7 +222,7 @@ function printKernelContract(plan) {
220
222
  console.log('\n=> ROUTING DEGRADATION: Structured routing is degraded. Keep the strategy deferred unless independent evidence supports a route; do not silently downgrade to Tier 1/direct execution.');
221
223
  }
222
224
 
223
- console.log('\n=> ORCHESTRATION POLICY: Selected topology is planning guidance. Evaluate the suggested workflow and preserve objective evidence, but lifecycle hooks remind rather than hard-block. User/host permission boundaries and the Rule-of-3 zoom-out remain separate safety rails.');
225
+ console.log('\n=> ORCHESTRATION POLICY: Selected-topology required obligations and applicable skill core contracts are semantic MUSTs; implementation tactics MAY adapt. Lifecycle hooks observe/remind rather than hard-block, except user/host permission boundaries and the Rule-of-3 zoom-out.');
224
226
  }
225
227
 
226
228
  function route(prompt, stdinPayload) {
@@ -91,7 +91,7 @@ function persistWorkflow(contract, payload, prompt) {
91
91
  revision: 0,
92
92
  escapes: [],
93
93
  guidance: {
94
- mode: 'advisory-workflow',
94
+ mode: 'semantic-contract',
95
95
  reasoningPolicy: 'model-controls-how',
96
96
  hardBoundaries: ['rule-of-3-reflection', 'user-host-permission'],
97
97
  },
@@ -136,15 +136,15 @@ function run(raw) {
136
136
  core.printWorkflowPlan(plan);
137
137
  core.printRoutingCheckpoint(plan);
138
138
  core.printKernelContract(plan);
139
- console.log('\n=> WORKFLOW GUIDANCE (ADVISORY WHEN SELECTED):');
139
+ console.log('\n=> WORKFLOW SEMANTIC CONTRACT (NON-BLOCKING OBSERVATION):');
140
140
  console.log(' - State: ' + (persisted?.workflow.state || (plan.strategy ? 'unpersisted' : 'deferred')));
141
141
  console.log(' - Selected workflow: ' + (plan.strategy || 'deferred'));
142
142
  if (plan.strategySelection === 'selected') {
143
- console.log(' - Use the selected workflow as planning guidance; reasoning and implementation remain flexible.');
144
- console.log(' - Before claiming completion, review unresolved workflow evidence and objective verification.');
145
- console.log(' - If you skip a suggested step, keep the reason explicit and evidence-based.');
146
- console.log(' - Tier 3 / Fable changes are safer in a linked Git worktree; missing isolation is a strong reminder, not a Harness lock.');
147
- console.log(' - Escape/replan metadata remains useful for audit, but it does not create a persistent execution lock.');
143
+ console.log(' - Selected-topology required obligations are semantic MUSTs; implementation technique and local tactics MAY adapt.');
144
+ console.log(' - Before claiming completion, MUST resolve required workflow evidence and objective verification, or report an explicit blocked/degraded disposition.');
145
+ console.log(' - Every suggested skill MUST resolve applicability. If applicable, follow its core contract; if not-applicable, keep a flow-grounded reason.');
146
+ console.log(' - Tier 3 / Fable broad mutation MUST resolve isolation: verified linked worktree or explicit degraded fallback. Missing isolation is not a Harness lock.');
147
+ console.log(' - Escape is only for genuinely uncovered declared scope with evidence; it does not erase covered MUST obligations.');
148
148
  }
149
149
  if (persisted?.workflow) {
150
150
  const controller = path.join(persisted.hooksRoot, 'workflow-disposition.js');
@@ -163,7 +163,7 @@ function run(raw) {
163
163
  console.log(' - Runtime state was not persisted; reminders may be less precise, but execution remains available.');
164
164
  }
165
165
  if (failure) console.error('[Workflow Reminder] routing state was not persisted: ' + failure.message);
166
- if (result && result.status !== 0) console.error('[Workflow Reminder] router returned status ' + result.status + '; guidance is degraded, not blocking.');
166
+ if (result && result.status !== 0) console.error('[Workflow Reminder] router returned status ' + result.status + '; contract observation is degraded, not blocking.');
167
167
  }
168
168
 
169
169
  if (typeof module !== 'undefined') module.exports = { isHostNotificationPrompt };
@@ -320,7 +320,7 @@ function selectWorkflowStrategy(input = {}) {
320
320
  function planMetadataForStrategy(strategy) {
321
321
  const base = {
322
322
  patterns: ['router'],
323
- requiredInvariants: ['scope-lock', 'verify-before-claim', 'replan-after-repeated-failure', 'visible-status-updates'],
323
+ requiredInvariants: ['scope-lock', 'environment-alignment', 'verify-before-claim', 'replan-after-repeated-failure', 'visible-status-updates'],
324
324
  suggestedSkills: [],
325
325
  maxIterations: null,
326
326
  parallelAllowed: null,
@@ -365,8 +365,8 @@ function planMetadataForStrategy(strategy) {
365
365
  return {
366
366
  ...base,
367
367
  patterns: ['router', 'planner-executor', 'evaluator-optimizer'],
368
- requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification'],
369
- suggestedSkills: ['fable-mode', 'fable-discipline', 'verification-loop'],
368
+ requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'isolated-worktree-before-mutation'],
369
+ suggestedSkills: ['using-git-worktrees', 'fable-mode', 'fable-discipline', 'verification-loop'],
370
370
  parallelAllowed: false,
371
371
  parallelReasonCodes: ['dependent-or-unproven-independent-stages'],
372
372
  workspaceRequired: false,
@@ -380,8 +380,8 @@ function planMetadataForStrategy(strategy) {
380
380
  return {
381
381
  ...base,
382
382
  patterns: ['router', 'planner-executor', 'evaluator-optimizer'],
383
- requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'parallel-scope-contract', 'synthesis-barrier'],
384
- suggestedSkills: ['fable-mode', 'fable-discipline', 'verification-loop'],
383
+ requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'isolated-worktree-before-mutation', 'parallel-scope-contract', 'synthesis-barrier'],
384
+ suggestedSkills: ['using-git-worktrees', 'fable-mode', 'fable-discipline', 'verification-loop'],
385
385
  parallelAllowed: true,
386
386
  parallelReasonCodes: ['independent-read-only-or-disjoint-scopes'],
387
387
  workspaceRequired: false,
@@ -395,8 +395,8 @@ function planMetadataForStrategy(strategy) {
395
395
  return {
396
396
  ...base,
397
397
  patterns: ['router', 'planner-executor', 'evaluator-optimizer', 'multi-agent-memory'],
398
- requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'handoff-contracts', 'workspace-state'],
399
- suggestedSkills: ['multi-agent-workspace', 'fable-mode', 'fable-discipline', 'verification-loop'],
398
+ requiredInvariants: [...base.requiredInvariants, 'stage-contracts', 'cold-verification', 'isolated-worktree-before-mutation', 'handoff-contracts', 'workspace-state'],
399
+ suggestedSkills: ['using-git-worktrees', 'multi-agent-workspace', 'fable-mode', 'fable-discipline', 'verification-loop'],
400
400
  parallelAllowed: false,
401
401
  parallelReasonCodes: ['workspace-orchestrator-controls-concurrency'],
402
402
  workspaceRequired: true,
@@ -16,7 +16,7 @@ function augmentWorkflowPlan(plan) {
16
16
  if (!requiredInvariants.includes('isolated-worktree-before-mutation')) requiredInvariants.push('isolated-worktree-before-mutation');
17
17
  if (!suggestedSkills.includes('using-git-worktrees')) suggestedSkills.push('using-git-worktrees');
18
18
  return { ...plan, requiredInvariants, suggestedSkills, mutationIsolation: {
19
- required: true, mechanism: 'git-worktree', transition: 'before-first-mutation', onUnavailable: 'blocked',
19
+ required: true, mechanism: 'git-worktree', transition: 'before-first-mutation', onUnavailable: 'degraded',
20
20
  } };
21
21
  }
22
22
 
@@ -142,7 +142,7 @@ function main(payload) {
142
142
 
143
143
  const changedFiles = statusRaw.split('\n').length;
144
144
  console.error(`[Atomic Commit Check] ${state.editCount} edits since the last commit (${changedFiles} files currently changed).`);
145
- console.error('If a logically complete chunk of work is done, commit it now before continuing - large uncommitted diffs are harder to review and harder to recover from.');
145
+ console.error('Before committing, MUST inspect the staged diff/scope; unrelated concerns SHOULD be split unless coupling or explicit user intent justifies one commit. Large uncommitted diffs remain a review/recovery risk.');
146
146
  process.exit(0);
147
147
  }
148
148
 
@@ -27,7 +27,7 @@ process.stdin.on('end', () => {
27
27
  if (stat.isFile() && stat.size > MAX_BYTES_WITHOUT_LIMIT) {
28
28
  console.error(`[Boundary Reminder]: "${filePath}" is ${(stat.size / 1024).toFixed(0)}KB.`);
29
29
  console.error(`Reading a file this large in one call risks context bloat and "lost in the middle" degradation.`);
30
- console.error(`Re-issue the Read with an explicit "offset"/"limit" to pull a targeted slice, or use Grep to locate the relevant section first.`);
30
+ console.error(`SHOULD narrow the read with explicit "offset"/"limit" or use Grep first, unless full-file context is materially required.`);
31
31
  process.exit(0);
32
32
  }
33
33
  }
@@ -43,7 +43,7 @@ process.stdin.on('end', () => {
43
43
  if (hitsNoiseDir) {
44
44
  console.error(`[Boundary Reminder]: search targets a noise directory (${NOISE_DIRS.join(', ')}).`);
45
45
  console.error(`These produce huge, low-signal result sets and rarely contain what you're actually looking for.`);
46
- console.error(`Scope the search to source directories instead, or state explicitly why this directory must be searched.`);
46
+ console.error(`SHOULD scope the search to source directories; if the noisy directory is materially required, state the evidence-based exception.`);
47
47
  process.exit(0);
48
48
  }
49
49
  }
@@ -4,10 +4,9 @@
4
4
  * Claude Code already refuses to Edit a file that wasn't Read first in the
5
5
  * same session - that's native behavior, not something this hook needs to
6
6
  * re-check. The gap is Write: it happily overwrites an existing file with
7
- * no prior Read at all. This hook closes that gap: blocks Write on a file
8
- * that already exists on disk unless a Read of that exact path shows up
9
- * earlier in this session's transcript.
10
- * Fails open on any parse/lookup error - never blocks due to a bug here.
7
+ * no prior Read at all. This hook observes that gap and emits the semantic
8
+ * MUST to establish current target state before destructive overwrite.
9
+ * Fails open on parse/lookup errors and does not create a cognitive lock.
11
10
  */
12
11
  const fs = require('fs');
13
12
  const path = require('path');
@@ -53,8 +52,8 @@ process.stdin.on('end', () => {
53
52
 
54
53
  if (!wasRead) {
55
54
  console.error(`[Depth Reminder]: "${filePath}" already exists but hasn't been Read in this session.`);
56
- console.error(`Write() overwrites the whole file - doing that blind risks destroying content you never looked at.`);
57
- console.error(`Read the file first (even a quick pass), then retry the Write, or use Edit for a targeted change.`);
55
+ console.error(`Semantic MUST: establish the current target state before a destructive whole-file overwrite.`);
56
+ console.error(`Read the file first (even a quick pass), or use Edit for a targeted change. This reminder is fail-open rather than a persistent lock.`);
58
57
  process.exit(0);
59
58
  }
60
59
 
@@ -165,7 +165,7 @@ process.stdin.on('end', () => {
165
165
  } else if (declaredContracts.length === 0) {
166
166
  console.error(`[Subagent Scope Reminder] ${newlyChanged.length} file(s) changed with no machine-readable writeSet contract:`);
167
167
  newlyChanged.forEach(line => console.error(` ${line}`));
168
- console.error('Confirm every path was actually in scope before trusting or committing this output.');
168
+ console.error('Semantic MUST: reconcile every changed path against the declared scope before trusting or committing this output.');
169
169
  } else {
170
170
  for (const entry of classified.expected) {
171
171
  console.log(`[Subagent Scope Reminder] in-scope ${entry.statusLine} -> ${entry.planId}/${entry.runId}/${entry.stageId}${entry.workerId ? ` worker=${entry.workerId}` : ''}`);
@@ -174,7 +174,7 @@ process.stdin.on('end', () => {
174
174
  console.error(`[Subagent Scope Reminder] ambiguous scope ${entry.statusLine}; matches ${entry.stages.map(stage => `${stage.runId}/${stage.stageId}`).join(', ')}`);
175
175
  }
176
176
  for (const entry of classified.outOfScope) {
177
- console.error(`[Subagent Scope Reminder] OUT-OF-SCOPE ${entry.statusLine}${entry.workerId ? ` worker=${entry.workerId}` : ''}`);
177
+ console.error(`[Subagent Scope Reminder] OUT-OF-SCOPE ${entry.statusLine}${entry.workerId ? ` worker=${entry.workerId}` : ''}; MUST reconcile/revert or explicitly re-authorize scope before accepting the result.`);
178
178
  }
179
179
  }
180
180
 
@@ -35,7 +35,7 @@ function decide(payload) {
35
35
  if (String(workflow.strategy || '').startsWith('fable-') && !matchingRun(context)) warn('Selected Fable workflow has no correlated run; consider creating/updating the stage map before broad changes.');
36
36
  if (isMajorWorkflow(workflow)) {
37
37
  const isolatedRoot = linkedWorktree(cwd, root);
38
- if (!isolatedRoot) warn('This is a major workflow; a linked Git worktree is strongly recommended before mutation.');
38
+ if (!isolatedRoot) warn('Tier-3/Fable isolation disposition is a semantic MUST before broad mutation: enter a linked Git worktree or record an explicit degraded fallback. This reminder does not hard-block.');
39
39
  else {
40
40
  try { if (DIRECT.has(tool)) assertTargets(payload, cwd, isolatedRoot); else assertShellScope(command, cwd, isolatedRoot); }
41
41
  catch (error) { warn(error.message); }
@@ -4,12 +4,12 @@ description: "Explain or explicitly apply the Harness cognitive policy: Discover
4
4
  license: Apache-2.0
5
5
  metadata:
6
6
  author: Miya Daniel
7
- version: 0.4.0
7
+ version: 0.19.1
8
8
  ---
9
9
 
10
10
  # Agent Cognitive OS
11
11
 
12
- The Cognitive OS is policy, not a required peer-skill selection. Supported runtimes should establish the smaller Harness invariant contract before domain-skill execution; this skill remains its human-readable/manual entry point.
12
+ The Cognitive OS is policy, not a required peer-skill selection. Supported runtimes **MUST** establish the smaller Harness invariant contract before domain-skill execution; this skill remains its human-readable/manual entry point.
13
13
 
14
14
  ## USE FOR:
15
15
  - Apply or explain Discover → Think → Try → Summarize → Record.
@@ -39,6 +39,6 @@ The Cognitive OS is policy, not a required peer-skill selection. Supported runti
39
39
 
40
40
  Domain skills may define their own tactics and phases. They do not need to invoke this skill first as long as the Harness invariants remain satisfied.
41
41
 
42
- On advisory-only platforms, these rules are guidance rather than hard tool-call gates.
42
+ On instruction-only platforms, the same semantic MUST/SHOULD/MAY contract applies through instructions rather than hard tool-call gates.
43
43
 
44
44
  Deep dive: <this-skill-dir>/references/cognitive-loop.md
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harness-enforcement",
3
3
  "description": "Repository inventory for the opencode enforcement plugin and its standalone helper",
4
- "version": "0.19.0",
4
+ "version": "0.20.0",
5
5
  "runtime": "index.mjs",
6
6
  "hooks": {
7
7
  "verify": "hooks/verify.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Harness OS: An Orchestrated Agent Operating System for AI-driven Development",
5
5
  "main": "harness-everything/scripts/bootstrap.js",
6
6
  "bin": {
@@ -20,7 +20,7 @@
20
20
  "test:consistency": "node ci/consistency-check.js && node ci/doc-capability-consistency.test.js && node ci/repository-contract.test.js && node ci/mechanism-2ao-plugin-sync.test.js",
21
21
  "test:docs:capabilities": "node ci/doc-capability-consistency.test.js",
22
22
  "test:references": "node ci/reference-check.js",
23
- "test:release": "node ci/release-consistency-check.js && node ci/mechanism-2x-release-automation.test.js && node ci/mechanism-2x-release-commit-message.test.js",
23
+ "test:release": "node ci/release-consistency-check.js && node ci/mechanism-2x-release-automation.test.js && node ci/mechanism-2x-release-commit-message.test.js && node ci/mechanism-2ap-sbom.test.js",
24
24
  "test:release:semantics": "node ci/semantic-release-analyzer.test.mjs",
25
25
  "test:install": "node scripts/verify-install.js",
26
26
  "test:collision": "node ci/description-collision.js",
@@ -29,11 +29,14 @@
29
29
  "test:routing:invariants": "node ci/invariant-routing.test.js && node ci/router-workflow-plan.test.js && node ci/workflow-execution-contract.test.js",
30
30
  "plugin:sync": "node scripts/sync-openai-plugin.js",
31
31
  "plugin:hosts": "node scripts/plugin-sync.js",
32
+ "sbom:generate": "node scripts/generate-sbom.js --output sbom.cdx.json",
33
+ "sbom:validate": "node scripts/generate-sbom.js --validate sbom.cdx.json",
32
34
  "test:plugin:claude": "node ci/mechanism-2z-claude-plugin-manifest.test.js",
33
35
  "plugin:claude:stage": "node scripts/stage-claude-plugin.js",
34
36
  "plugin:claude:validate": "node scripts/validate-claude-plugin.js",
35
37
  "test:plugin:openai": "node ci/openai-plugin-package.test.js && node ci/openai-plugin-runtime.test.js",
36
38
  "test:plugin:hosts": "node ci/mechanism-2ao-plugin-sync.test.js",
39
+ "test:release:sbom": "node ci/mechanism-2ap-sbom.test.js",
37
40
  "plugin:submission:build": "node scripts/build-openai-submission.js",
38
41
  "test:plugin:submission": "node ci/openai-plugin-submission.test.js",
39
42
  "test:platform:compatibility": "node ci/mechanism-2w-platform-compatibility.test.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harness-everything",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
5
5
  "author": {
6
6
  "name": "Miya Daniel",
@@ -142,7 +142,7 @@ function main(payload) {
142
142
 
143
143
  const changedFiles = statusRaw.split('\n').length;
144
144
  console.error(`[Atomic Commit Check] ${state.editCount} edits since the last commit (${changedFiles} files currently changed).`);
145
- console.error('If a logically complete chunk of work is done, commit it now before continuing - large uncommitted diffs are harder to review and harder to recover from.');
145
+ console.error('Before committing, MUST inspect the staged diff/scope; unrelated concerns SHOULD be split unless coupling or explicit user intent justifies one commit. Large uncommitted diffs remain a review/recovery risk.');
146
146
  process.exit(0);
147
147
  }
148
148
 
@@ -27,7 +27,7 @@ process.stdin.on('end', () => {
27
27
  if (stat.isFile() && stat.size > MAX_BYTES_WITHOUT_LIMIT) {
28
28
  console.error(`[Boundary Reminder]: "${filePath}" is ${(stat.size / 1024).toFixed(0)}KB.`);
29
29
  console.error(`Reading a file this large in one call risks context bloat and "lost in the middle" degradation.`);
30
- console.error(`Re-issue the Read with an explicit "offset"/"limit" to pull a targeted slice, or use Grep to locate the relevant section first.`);
30
+ console.error(`SHOULD narrow the read with explicit "offset"/"limit" or use Grep first, unless full-file context is materially required.`);
31
31
  process.exit(0);
32
32
  }
33
33
  }
@@ -43,7 +43,7 @@ process.stdin.on('end', () => {
43
43
  if (hitsNoiseDir) {
44
44
  console.error(`[Boundary Reminder]: search targets a noise directory (${NOISE_DIRS.join(', ')}).`);
45
45
  console.error(`These produce huge, low-signal result sets and rarely contain what you're actually looking for.`);
46
- console.error(`Scope the search to source directories instead, or state explicitly why this directory must be searched.`);
46
+ console.error(`SHOULD scope the search to source directories; if the noisy directory is materially required, state the evidence-based exception.`);
47
47
  process.exit(0);
48
48
  }
49
49
  }
@@ -4,10 +4,9 @@
4
4
  * Claude Code already refuses to Edit a file that wasn't Read first in the
5
5
  * same session - that's native behavior, not something this hook needs to
6
6
  * re-check. The gap is Write: it happily overwrites an existing file with
7
- * no prior Read at all. This hook closes that gap: blocks Write on a file
8
- * that already exists on disk unless a Read of that exact path shows up
9
- * earlier in this session's transcript.
10
- * Fails open on any parse/lookup error - never blocks due to a bug here.
7
+ * no prior Read at all. This hook observes that gap and emits the semantic
8
+ * MUST to establish current target state before destructive overwrite.
9
+ * Fails open on parse/lookup errors and does not create a cognitive lock.
11
10
  */
12
11
  const fs = require('fs');
13
12
  const path = require('path');
@@ -53,8 +52,8 @@ process.stdin.on('end', () => {
53
52
 
54
53
  if (!wasRead) {
55
54
  console.error(`[Depth Reminder]: "${filePath}" already exists but hasn't been Read in this session.`);
56
- console.error(`Write() overwrites the whole file - doing that blind risks destroying content you never looked at.`);
57
- console.error(`Read the file first (even a quick pass), then retry the Write, or use Edit for a targeted change.`);
55
+ console.error(`Semantic MUST: establish the current target state before a destructive whole-file overwrite.`);
56
+ console.error(`Read the file first (even a quick pass), or use Edit for a targeted change. This reminder is fail-open rather than a persistent lock.`);
58
57
  process.exit(0);
59
58
  }
60
59