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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.releaserc.json +1 -1
- package/AGENTS.md +3 -2
- package/CHANGELOG.md +9 -0
- package/README.md +14 -14
- package/RELEASING.md +10 -2
- package/ci/invariant-routing.test.js +42 -19
- package/ci/mechanism-2af-worktree-isolation.test.js +3 -3
- package/ci/mechanism-2ag-router-worktree-contract.test.js +1 -0
- package/ci/mechanism-2an-workflow-obligations.test.js +1 -0
- package/ci/mechanism-2ap-sbom.test.js +92 -0
- package/ci/mechanism-33-issues-205-207.test.js +2 -2
- package/ci/openai-plugin-package.test.js +6 -6
- package/ci/router-workflow-plan.test.js +12 -9
- package/ci/workflow-execution-contract.test.js +2 -2
- package/docs/architecture.md +15 -15
- package/docs/enforcement-locks.md +17 -15
- package/docs/philosophy.md +43 -8
- package/docs/routing.md +23 -16
- package/docs/workflow-runtime.md +20 -19
- package/environment-detection/SKILL.md +3 -1
- package/evals/harness-everything/tasks/positive-tier1.yaml +1 -1
- package/evals/harness-everything/tasks/positive-tier2.yaml +1 -1
- package/evals/harness-everything/tasks/positive-tier3.yaml +1 -1
- package/evals/using-git-worktrees/tasks/positive-trigger.yaml +1 -1
- package/find-skills/SKILL.md +20 -29
- package/git-commit/SKILL.md +4 -4
- package/harness-everything/SKILL.md +16 -17
- package/harness-everything/references/triage-and-tiers.md +17 -16
- package/harness-everything/scripts/kernel-router-core.js +26 -24
- package/harness-everything/scripts/kernel-router.js +8 -8
- package/harness-everything/scripts/router-contract-core.js +7 -7
- package/harness-everything/scripts/router-contract.js +1 -1
- package/hooks/scripts/atomic-commit-check.js +1 -1
- package/hooks/scripts/boundary-guard.js +2 -2
- package/hooks/scripts/depth-guard.js +5 -6
- package/hooks/scripts/subagent-scope-guard.js +2 -2
- package/hooks/scripts/workflow-gate.js +1 -1
- package/install-cognitive-os/SKILL.md +3 -3
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +5 -2
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/scripts/atomic-commit-check.js +1 -1
- package/plugins/harness-everything/hooks/scripts/boundary-guard.js +2 -2
- package/plugins/harness-everything/hooks/scripts/depth-guard.js +5 -6
- package/plugins/harness-everything/hooks/scripts/subagent-scope-guard.js +2 -2
- package/plugins/harness-everything/hooks/scripts/workflow-gate.js +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/advisory-text.js +19 -17
- package/plugins/harness-everything/skills/environment-detection/SKILL.md +3 -1
- package/plugins/harness-everything/skills/find-skills/SKILL.md +20 -29
- package/plugins/harness-everything/skills/git-commit/SKILL.md +4 -4
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +16 -17
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +17 -16
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router-core.js +26 -24
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +8 -8
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract-core.js +7 -7
- package/plugins/harness-everything/skills/harness-everything/scripts/router-contract.js +1 -1
- package/plugins/harness-everything/skills/install-cognitive-os/SKILL.md +3 -3
- package/plugins/harness-everything/skills/rewrite-commits/SKILL.md +2 -2
- package/plugins/harness-everything/skills/to-tickets/SKILL.md +2 -2
- package/plugins/harness-everything/skills/using-git-worktrees/SKILL.md +6 -6
- package/rewrite-commits/SKILL.md +2 -2
- package/sbom.cdx.json +2110 -0
- package/scripts/generate-sbom.js +239 -0
- package/scripts/lib/advisory-text.js +19 -17
- package/to-tickets/SKILL.md +2 -2
- package/using-git-worktrees/SKILL.md +6 -6
package/docs/architecture.md
CHANGED
|
@@ -9,16 +9,16 @@ Harness is a **behavior and workflow observer/router**, not a universal fixed wo
|
|
|
9
9
|
The minimal kernel establishes:
|
|
10
10
|
|
|
11
11
|
- scope/tier before mutation,
|
|
12
|
-
- a selected workflow topology as
|
|
12
|
+
- a selected workflow topology as a semantic execution contract when task evidence supports one,
|
|
13
13
|
- applicability evaluation for every suggested skill before omission,
|
|
14
14
|
- objective evidence before completion,
|
|
15
15
|
- bounded re-plan/recovery after repeated failure,
|
|
16
16
|
- explicit warnings/degraded/escape evidence instead of silent workflow deletion;
|
|
17
17
|
- one mandatory user-visible Harness Status protocol for non-trivial work, independent of execution topology.
|
|
18
18
|
|
|
19
|
-
> **
|
|
19
|
+
> **Contract-first lifecycle; flexible reasoning/implementation and execution.**
|
|
20
20
|
>
|
|
21
|
-
> Suggested skills
|
|
21
|
+
> Suggested skills MUST be evaluated from their real flows. Applicable skill core contracts and selected-topology obligations are semantic MUSTs; missing evidence produces reminders rather than persistent Harness locks.
|
|
22
22
|
|
|
23
23
|
This avoids both extremes: no universal Tier-2/Tier-3 pipeline and no maze of self-deadlocking cognitive gates.
|
|
24
24
|
|
|
@@ -50,8 +50,8 @@ flowchart TD
|
|
|
50
50
|
- selected/deferred execution strategy,
|
|
51
51
|
- required invariants,
|
|
52
52
|
- suggested skills that require applicability evaluation,
|
|
53
|
-
- the
|
|
54
|
-
-
|
|
53
|
+
- the internal routing checkpoint,
|
|
54
|
+
- the semantic workflow contract.
|
|
55
55
|
|
|
56
56
|
The router does not tell the model *how* to solve each stage. It decides what lifecycle shape is required. `direct-single`, `iterative-single`, `fable-staged`, `fable-parallel`, and `fable-multi-agent-workspace` remain deliberately small, non-overlapping topology choices.
|
|
57
57
|
|
|
@@ -78,7 +78,7 @@ This is a semantic contract, not another cognitive lock. Hook-capable hosts may
|
|
|
78
78
|
|
|
79
79
|
Router suggestions remain useful domain/workflow knowledge, not a universal sequence. Before omission, the agent reads the complete `SKILL.md` entry and evaluates `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules. Name/description/router-summary or “routine task” is insufficient evidence.
|
|
80
80
|
|
|
81
|
-
The selected topology is a
|
|
81
|
+
The selected topology is a semantic lifecycle contract, not a persistent execution lock. Required obligations MUST resolve; implementation tactics MAY adapt.
|
|
82
82
|
|
|
83
83
|
### Runtime workflow state
|
|
84
84
|
|
|
@@ -91,13 +91,13 @@ For selected Fable topologies on Claude:
|
|
|
91
91
|
- `workflow-stop-gate.js` reports unresolved stage/verification evidence without rejecting Stop;
|
|
92
92
|
- `workflow-disposition.js` records explicit lifecycle/audit decisions; numeric budgets are no longer authoritative control state.
|
|
93
93
|
|
|
94
|
-
Other topologies use their own applicable mechanisms:
|
|
94
|
+
Other topologies use their own applicable mechanisms: MAY-level loop-awareness planning hints, regular verification stop-gates, action gates, and task-specific skills. Mechanism coverage is not assumed identical across hosts.
|
|
95
95
|
|
|
96
96
|
### Scoped runtime advisories and capabilities
|
|
97
97
|
|
|
98
98
|
Two kernel mechanisms annotate plans without creating hard workflow enforcement:
|
|
99
99
|
|
|
100
|
-
- **Ensemble policy (`harness-everything/scripts/ensemble-policy.js`):**
|
|
100
|
+
- **Ensemble policy (`harness-everything/scripts/ensemble-policy.js`):** optional selection is a **MAY** capability, not a separate topology. It is selected only when uncertainty is high (or stakes are high) **and** the task asks for comparable outputs or preserves explicit disagreement **and** the selected strategy is already `fable-*`. Creative generation, mechanical bulk work, an explicit user prohibition, unavailable subagents, or a blocked base plan force exclusion. Once selected, preserving disagreement, using an independent verifier, and honoring the plan's ensemble invariants are **MUST** obligations. Covered by deterministic mechanism tests; no live-host effectiveness claim follows from the annotation alone.
|
|
101
101
|
- **Single-use memory capability (`kernel-router.js#issueMemoryCapability`):** when the selected plan permits memory writes, the router issues one capability token bound to `sessionId`/`workflowId` with a stored SHA-256 hash (`memoryAuthorization`, coordinator-only writer role, `usedAt` tracking). Plans with `memory.write === 'none'` receive no capability. This binds a memory write to the workflow that authorized it; it is not a general credential and proves nothing about a live host honoring the binding.
|
|
102
102
|
|
|
103
103
|
### PreToolUse guard trio and denied-mutation probes
|
|
@@ -105,7 +105,7 @@ Two kernel mechanisms annotate plans without creating hard workflow enforcement:
|
|
|
105
105
|
On the Claude hook path, three narrowly scoped `PreToolUse` guards sit alongside the workflow/action gates:
|
|
106
106
|
|
|
107
107
|
- `boundary-guard.js` (Grep/Glob/Read): warns about very large reads and noisy search roots; it fails open.
|
|
108
|
-
- `depth-guard.js` (Write):
|
|
108
|
+
- `depth-guard.js` (Write): reminds when an existing file would be overwritten without prior inspection. The semantic obligation to establish current target state before destructive overwrite is a **MUST**; the hook itself stays fail-open. New files are unaffected.
|
|
109
109
|
- `context-compact.js`: estimates working-tree context pressure from `git status`/`git diff --numstat` so later stages can compact or halt before lost-in-the-middle degradation.
|
|
110
110
|
|
|
111
111
|
Shell mutation observation is best-effort evidence for reminders. The old mutation-probe reservation/lock subsystem was retired by #190.
|
|
@@ -118,23 +118,23 @@ Harness aligns to each host's actual lifecycle/tool APIs. Shared skill text defi
|
|
|
118
118
|
|
|
119
119
|
Runtime state includes hook metadata, workflow lifecycle, circuit-breaker counters, handoff/verification evidence, and WAL-style session state. Skill content is independently discoverable and remains useful on instruction-only surfaces.
|
|
120
120
|
|
|
121
|
-
### Claude Code — hook
|
|
121
|
+
### Claude Code — hook observation plus explicit safety boundaries
|
|
122
122
|
|
|
123
123
|
The installer configures native lifecycle hooks and project skills.
|
|
124
124
|
|
|
125
125
|
- `SessionStart`: bootstrap/restoration.
|
|
126
|
-
- `UserPromptSubmit`: kernel routing + workflow
|
|
126
|
+
- `UserPromptSubmit`: kernel routing + semantic workflow contract.
|
|
127
127
|
- `PreToolUse`: workflow/boundary/depth/scope reminders, plus separate action permission and Rule-of-3 boundaries.
|
|
128
128
|
- `PostToolUse`: outcomes, state, repeated-failure evidence, stage checks.
|
|
129
129
|
- `Stop`: action-gate audit plus non-blocking workflow/verification reminders.
|
|
130
130
|
|
|
131
|
-
These hooks make
|
|
131
|
+
These hooks make semantic obligations observable; they do not promote cognitive workflow contracts into hard enforcement.
|
|
132
132
|
|
|
133
133
|
### OpenCode — plugin enforcement, scoped live verification
|
|
134
134
|
|
|
135
135
|
The retained [OpenCode evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md) supports **project-scope `.js` loading and edit/verification state on OpenCode 1.18.31 (macOS)**. The final snapshot is **post-reset**. Hard-lock is an **interactive observation** with **no retained blocked-tool trace**; reflection was **operator-seeded** and then agent-rewritten. Global scope, npm-package installation, and other OpenCode versions remain unverified.
|
|
136
136
|
|
|
137
|
-
This evidence predates #190 and does not establish behavioral effectiveness of the current
|
|
137
|
+
This evidence predates #190 and does not establish behavioral effectiveness of the current contract-first lifecycle.
|
|
138
138
|
|
|
139
139
|
### Cursor — skills plus advisory rules
|
|
140
140
|
|
|
@@ -148,7 +148,7 @@ Copilot receives Agent Skills/repository instructions. No Harness-specific live
|
|
|
148
148
|
|
|
149
149
|
Codex has multiple distinct Harness surfaces:
|
|
150
150
|
|
|
151
|
-
- The general `--codex` installer writes repo-scoped `.agents/skills/` plus `AGENTS.md`; when consumed only as instructions,
|
|
151
|
+
- The general `--codex` installer writes repo-scoped `.agents/skills/` plus `AGENTS.md`; when consumed only as instructions, the same semantic contract is instruction-delivered without a hard-enforcement claim.
|
|
152
152
|
- The **Codex / local OpenAI plugin** under `plugins/harness-everything/` packages canonical skills plus session/prompt/supported-tool/subagent/stop hooks. The package includes workflow-gate adapters, but this is mechanism/package evidence until a live Codex session proves loading/firing.
|
|
153
153
|
- The public OpenAI **Skills-only** artifact excludes local `.codex-plugin` lifecycle hooks; it carries reusable workflow knowledge, not local hard gates.
|
|
154
154
|
|
|
@@ -204,7 +204,7 @@ A domain skill may define RED/GREEN/REFACTOR or another local lifecycle. The sel
|
|
|
204
204
|
|
|
205
205
|
1. **No Harness telemetry service:** project code/state is not uploaded by Harness runtime scripts.
|
|
206
206
|
2. **Credential protection:** credentials remain human/host controlled.
|
|
207
|
-
3. **Small mechanism surface:** hooks
|
|
207
|
+
3. **Small mechanism surface:** hooks **SHOULD** remain fast and auditable.
|
|
208
208
|
4. **Explicit enforcement labels:** instruction, mechanism, and live evidence are distinct.
|
|
209
209
|
5. **Deterministic regression:** workflow/routing/hook contracts are executable CI gates.
|
|
210
210
|
6. **No silent widening:** workflow escape cannot widen authorization, permissions, or external side effects.
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Semantic Contracts and Safety Boundary Diagnostic Flows
|
|
2
2
|
|
|
3
|
-
Harness deliberately separates **
|
|
3
|
+
Harness deliberately separates **semantic obligation strength** from **mechanical enforcement** and from **authorization/safety boundaries**. Canonical MUST/SHOULD/MAY definitions live in [philosophy.md](philosophy.md#contract-strength-must--should--may).
|
|
4
4
|
|
|
5
5
|
## Classification
|
|
6
6
|
|
|
7
|
-
| Mechanism |
|
|
8
|
-
|
|
9
|
-
| Workflow routing/
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
7
|
+
| Mechanism / obligation | Semantic strength | Runtime behavior | Hard block? |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| Workflow routing / selected topology | **MUST** resolve required obligations | Observe/remind about unresolved lifecycle evidence | No |
|
|
10
|
+
| Suggested skill applicability | **MUST** evaluate; applicable core contract **MUST** run | Kernel/instructions expose dispositions | No |
|
|
11
|
+
| Iteration/revision/replan/worker numbers | **MAY** guide planning | Planning hints only | No |
|
|
12
|
+
| Verification before claim | **MUST** | Stop/hooks remind when evidence is missing | No |
|
|
13
|
+
| Boundary guard / huge-noisy context | **SHOULD** narrow reads/searches | Warn | No |
|
|
14
|
+
| Destructive overwrite target inspection | **MUST** establish current state | Depth guard reminds/fails open on mechanism errors | No |
|
|
15
|
+
| Tier-3/Fable isolation disposition | **MUST** resolve worktree or degraded fallback | Warn when unresolved | No |
|
|
16
|
+
| Subagent declared scope / unexpected writes | **MUST** respect and reconcile | Report ambiguous/out-of-scope changes | No |
|
|
17
|
+
| Commit scope | Staged diff review **MUST**; split unrelated concerns **SHOULD** | Atomic-commit reminder | No |
|
|
18
|
+
| Fable stage/check/synthesis/verifier | **MUST** when selected | Record pass/fail/ambiguity/dependency evidence and remind | No |
|
|
19
|
+
| Rule of 3 | Third matching failure **MUST** trigger zoom-out | Pause mutation until reflection | **Yes — intentional cognitive boundary** |
|
|
20
|
+
| Action/permission gate | Approval **MUST** precede governed side effects | Host/user authorization | **Yes — trust boundary** |
|
|
19
21
|
|
|
20
22
|
## Rule of 3
|
|
21
23
|
|
|
@@ -41,7 +43,7 @@ The previous numeric enforcement required mutation probes, stale-probe recovery,
|
|
|
41
43
|
|
|
42
44
|
The design test is simple:
|
|
43
45
|
|
|
44
|
-
> If
|
|
46
|
+
> If observing a semantic obligation would require another lock, lease, heartbeat, counter-recovery protocol, or parser exception, use a reminder instead. The reminder changes the **mechanism**, not the obligation's MUST/SHOULD/MAY strength.
|
|
45
47
|
|
|
46
48
|
## Troubleshooting
|
|
47
49
|
|
package/docs/philosophy.md
CHANGED
|
@@ -9,17 +9,52 @@ The mechanism/enforcement boundary remains platform-specific; see [Platform Capa
|
|
|
9
9
|
## Core Philosophy: Constrain Lifecycle, Not Reasoning
|
|
10
10
|
|
|
11
11
|
1. **Reasoning autonomy remains high.** The model chooses implementation technique, tools, decomposition details, and tactics inside the selected workflow.
|
|
12
|
-
2. **
|
|
13
|
-
3. **Skill applicability is explicit.**
|
|
12
|
+
2. **Selected lifecycle obligations are contracts, not advice.** Once a topology is selected, its required invariants, stages, checks, synthesis barriers, and verification obligations are semantic MUSTs. The model remains free to decide how to satisfy them.
|
|
13
|
+
3. **Skill applicability is explicit.** Every router-suggested skill MUST be read/evaluated before omission. If its real flow is applicable, its core contract MUST be followed; if it is not applicable, the agent MUST keep a flow-grounded reason.
|
|
14
14
|
4. **Escape is conditional, not default.** If the selected workflow genuinely cannot represent part of the task, record the uncovered scope and evidence, then allow model-defined handling only for that uncovered portion.
|
|
15
|
-
5. **Mechanisms
|
|
15
|
+
5. **Mechanisms do not define obligation strength.** Hooks/plugins may observe, remind, or mechanically block where the host supports them, but a missing blocking mechanism does not downgrade a semantic MUST to optional advice.
|
|
16
16
|
|
|
17
17
|
This principle can be summarized as:
|
|
18
18
|
|
|
19
|
-
> **
|
|
19
|
+
> **contract-first lifecycle; flexible reasoning/implementation inside it; evidence-backed escape only where the workflow does not cover the task.**
|
|
20
20
|
|
|
21
21
|
The goal is not to make the model less capable. It is to prevent capability/confidence from silently deleting engineering obligations such as verification, bounded re-planning, stage checks, documentation checks, or safety gates when those obligations are applicable.
|
|
22
22
|
|
|
23
|
+
## Contract Strength: MUST / SHOULD / MAY
|
|
24
|
+
|
|
25
|
+
Harness uses three semantic strengths. Recommendation-style language is the last choice, not the default for important behavior.
|
|
26
|
+
|
|
27
|
+
| Strength | Meaning | Typical use |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| **MUST** | Skipping the obligation violates the Harness semantic contract. Host enforcement may still be reminder-only. | routing, applicability resolution, applicable skill core contracts, selected-topology obligations, verification-before-claim, status, scope/safety/authorization evidence |
|
|
30
|
+
| **SHOULD** | The default is expected, but a concrete evidence-based exception is legitimate. | ordinary isolation, targeted editing, splitting mixed commit concerns, context-size/noisy-search discipline |
|
|
31
|
+
| **MAY** | Optional optimization/capability. Omitting it needs no exception unless another contract selected it. | numeric planning hints, optional ensemble selection, extra deep references, opportunistic parallelism |
|
|
32
|
+
|
|
33
|
+
Do not use `recommend`, `prefer`, `advisory`, or `guidance` to weaken a MUST. Those words are reserved for actual SHOULD/MAY behavior or for describing the host's **mechanical delivery mode** (for example, an instruction-only surface).
|
|
34
|
+
|
|
35
|
+
The repository-wide classification for #217 is:
|
|
36
|
+
|
|
37
|
+
| Obligation | Strength |
|
|
38
|
+
|---|---|
|
|
39
|
+
| Route before software/project execution | **MUST** |
|
|
40
|
+
| Read/evaluate every suggested skill before omission | **MUST** |
|
|
41
|
+
| Follow an applicable suggested skill's core contract; otherwise keep a flow-grounded not-applicable reason | **MUST** |
|
|
42
|
+
| Resolve selected-topology invariants/stages/checks/synthesis/verification | **MUST** |
|
|
43
|
+
| Choose tools, implementation technique, decomposition details, and local tactics | **MAY** within the MUST contract |
|
|
44
|
+
| Verify before claiming completion | **MUST** |
|
|
45
|
+
| Emit the unified Harness Status for non-trivial work | **MUST** |
|
|
46
|
+
| Discover relevant environment/host facts before relying on environment-sensitive behavior | **MUST** |
|
|
47
|
+
| Establish current target state before destructive overwrite/rewrite | **MUST** |
|
|
48
|
+
| Resolve Tier-3/Fable isolation before broad mutation: linked worktree or explicit degraded fallback | **MUST** |
|
|
49
|
+
| Use isolation for ordinary work when it materially reduces collision/risk | **SHOULD** |
|
|
50
|
+
| Honor Fable stage contracts, checks, synthesis barrier, and cold verifier when selected | **MUST** |
|
|
51
|
+
| Keep delegated agents inside declared scope and reconcile unexpected writes | **MUST** |
|
|
52
|
+
| Inspect the staged diff/commit scope before committing | **MUST**; split unrelated concerns **SHOULD** |
|
|
53
|
+
| Avoid huge/noisy reads/searches when a narrower query is sufficient | **SHOULD** |
|
|
54
|
+
| Numeric iteration/revision/replan/worker values | **MAY** guide planning; never hard-block |
|
|
55
|
+
| Select ensemble review | **MAY** when task shape warrants it; once selected, disagreement preservation and independent verification are **MUST** |
|
|
56
|
+
| Durable memory writes | **MUST** be authorized by the active workflow/session contract |
|
|
57
|
+
|
|
23
58
|
## Why This Is Not a Rigid Global Pipeline
|
|
24
59
|
|
|
25
60
|
Harness still rejects a universal `TODO → TDD → Fable → verification` sequence.
|
|
@@ -38,19 +73,19 @@ Domain skills remain conditional on applicability. The contract says “execute
|
|
|
38
73
|
|
|
39
74
|
### 1. Environment Alignment — Discovery over Assumption
|
|
40
75
|
|
|
41
|
-
|
|
76
|
+
Relevant environment discovery is a conditional **MUST**: establish OS, shell, package/runtime context, repository boundaries, and host capabilities before relying on environment-sensitive behavior. On surfaces that package preflight/session hooks this may be injected automatically; instruction-only hosts MUST do it explicitly when needed.
|
|
42
77
|
|
|
43
78
|
### 2. Guardrails — Lifecycle Boundaries
|
|
44
79
|
|
|
45
|
-
Circuit breakers, action gates, workflow gates, scope guards, and completion gates protect specific transitions. They
|
|
80
|
+
Circuit breakers, action gates, workflow gates, scope guards, and completion gates protect specific transitions. They **SHOULD** remain narrow and evidence-driven. On integration surfaces that expose the required lifecycle/tool hooks, Harness can mechanically block supported violations; elsewhere the same contract is instruction-governed and must not be mislabeled hard enforcement.
|
|
46
81
|
|
|
47
82
|
### 3. Context Preservation — Progressive Disclosure
|
|
48
83
|
|
|
49
|
-
|
|
84
|
+
**SHOULD** load the smallest useful context. A suggested skill's complete entry **MUST** be read before deciding applicability; optional deep references **MAY** remain unloaded unless needed. Machine-visible workflow state SHOULD carry lifecycle facts instead of repeating large prompt blocks.
|
|
50
85
|
|
|
51
86
|
### 4. Self-Evolution — Learn from Workflow Evidence
|
|
52
87
|
|
|
53
|
-
`self-evolve`
|
|
88
|
+
`self-evolve` **MUST** ground durable learning in verified recovery/workflow evidence. Escape events, repeated replans, verifier fail→pass transitions, and recurrence outcomes **MAY** provide that evidence. Durable learning MUST improve future coverage rather than grant a shortcut around the current workflow, and remains distinct from runtime session state.
|
|
54
89
|
|
|
55
90
|
## Mechanism-First Cooperation
|
|
56
91
|
|
package/docs/routing.md
CHANGED
|
@@ -4,9 +4,9 @@ Harness classifies software work and selects the smallest sufficient execution t
|
|
|
4
4
|
|
|
5
5
|
The current architecture follows two coupled rules:
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **Contract-first lifecycle; flexible reasoning/implementation and execution.**
|
|
8
8
|
>
|
|
9
|
-
> **Skill applicability is
|
|
9
|
+
> **Skill applicability is explicit: evaluation is mandatory, applicable core contracts are mandatory, and not-applicable dispositions require evidence.**
|
|
10
10
|
|
|
11
11
|
A strong model remains free to decide *how* to perform the work. It may not decide that an applicable selected lifecycle can be skipped because the task feels simple or already understood.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ For software/project work, Harness establishes routing context and lightweight r
|
|
|
18
18
|
2. **Verify before claim** — completion requires objective evidence appropriate to the change.
|
|
19
19
|
3. **Re-plan after repeated failure** — after three same-signature failures, stop micro-retrying and use a fresh diagnosis / `zoom-out`.
|
|
20
20
|
4. **Evaluate before omission** — read every suggested skill's complete `SKILL.md` entry before deciding applicability.
|
|
21
|
-
5. **
|
|
21
|
+
5. **Resolve selected workflow** — satisfy the selected topology's required obligations before completion; tactics MAY adapt, but required lifecycle evidence cannot be silently skipped.
|
|
22
22
|
6. **Surface status** — non-trivial work MUST keep the user informed through the single Harness Status format at required phase boundaries.
|
|
23
23
|
|
|
24
24
|
The model owns tools, implementation technique, reasoning, and decomposition details inside those rails.
|
|
@@ -28,10 +28,10 @@ The model owns tools, implementation technique, reasoning, and decomposition det
|
|
|
28
28
|
```text
|
|
29
29
|
kernel-router.js
|
|
30
30
|
├─ delegates classification / guide discovery → tier-router.js
|
|
31
|
-
├─ preserves tier + rationale + dynamic-skill
|
|
31
|
+
├─ preserves tier + rationale + dynamic-skill suggestions
|
|
32
32
|
├─ emits required invariants + structured workflow plan
|
|
33
33
|
├─ requires applicability evaluation for suggested skills
|
|
34
|
-
├─ records the selected workflow
|
|
34
|
+
├─ records the selected workflow contract
|
|
35
35
|
└─ exposes warnings/degraded/escape evidence instead of silently hiding limitations
|
|
36
36
|
```
|
|
37
37
|
|
|
@@ -70,10 +70,11 @@ These are intentionally different concepts.
|
|
|
70
70
|
|
|
71
71
|
For **every suggested skill**:
|
|
72
72
|
|
|
73
|
-
1.
|
|
74
|
-
2.
|
|
73
|
+
1. **MUST** resolve/read the complete `SKILL.md` entry.
|
|
74
|
+
2. **MUST** evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules.
|
|
75
75
|
3. Read extra material only when the entry explicitly requires it for applicability.
|
|
76
|
-
4.
|
|
76
|
+
4. **MUST** resolve the suggestion as `use`, `not-applicable`, or `unresolved/unavailable`.
|
|
77
|
+
5. If disposition is `use`, the skill's core contract **MUST** be followed. If it is `not-applicable`, a concise flow-grounded reason **MUST** be retained.
|
|
77
78
|
|
|
78
79
|
A name, description, router summary, tier label, or generic “routine/common task” judgement is not sufficient evidence for `not-applicable`.
|
|
79
80
|
|
|
@@ -86,7 +87,7 @@ For the **selected workflow topology**:
|
|
|
86
87
|
|
|
87
88
|
This prevents two opposite failures: forcing every task through one giant pipeline, and allowing a model to rationalize away the entire engineering lifecycle.
|
|
88
89
|
|
|
89
|
-
## Three-tier
|
|
90
|
+
## Three-tier routing model
|
|
90
91
|
|
|
91
92
|
```mermaid
|
|
92
93
|
flowchart TD
|
|
@@ -117,7 +118,7 @@ No universal `TODO → TDD → verification-loop` order is implied. But when a s
|
|
|
117
118
|
|
|
118
119
|
Typical triggers: repository-wide refactors, architecture/migration work, broad synthesis, or bounded delegation. The router may select `fable-staged`, `fable-parallel`, or `fable-multi-agent-workspace`.
|
|
119
120
|
|
|
120
|
-
A selected Fable topology is
|
|
121
|
+
A selected Fable topology is a semantic execution contract for that run: required stage contracts, dependency/write-set validation, objective checks, synthesis, and cold verification **MUST** resolve. Host hooks may only remind when evidence is missing; that fail-open mechanism does not make the obligations optional.
|
|
121
122
|
|
|
122
123
|
Tier 3 does **not** automatically mean multi-agent. The smallest sufficient topology still wins.
|
|
123
124
|
|
|
@@ -141,18 +142,24 @@ Direct/iterative verification milestones are checked, while semantic check quali
|
|
|
141
142
|
|
|
142
143
|
## Cognitive OS relationship
|
|
143
144
|
|
|
144
|
-
`install-cognitive-os` remains the explanatory/manual entry point for Discover → Think → Try → Summarize → Record. It is a reasoning policy, not a peer skill that must be selected before domain work. The selected workflow
|
|
145
|
+
`install-cognitive-os` remains the explanatory/manual entry point for Discover → Think → Try → Summarize → Record. It is a reasoning policy, not a peer skill that must be selected before domain work. The selected workflow contract defines lifecycle obligations; the model retains freedom over reasoning and implementation tactics.
|
|
145
146
|
|
|
146
|
-
##
|
|
147
|
+
## Contract and Enforcement Strength
|
|
147
148
|
|
|
148
|
-
|
|
149
|
+
Canonical strength definitions live in [philosophy.md](philosophy.md#contract-strength-must--should--may):
|
|
149
150
|
|
|
150
|
-
- **
|
|
151
|
+
- **MUST:** skipping violates the semantic contract.
|
|
152
|
+
- **SHOULD:** expected default with a concrete evidence-based exception.
|
|
153
|
+
- **MAY:** optional optimization/capability.
|
|
154
|
+
|
|
155
|
+
Keep semantic strength separate from runtime mechanics:
|
|
156
|
+
|
|
157
|
+
- **semantic contract:** what the agent MUST/SHOULD/MAY do;
|
|
151
158
|
- **mechanism:** which transitions a packaged hook/plugin can block, observe, or remind about;
|
|
152
159
|
- **live evidence:** whether a real host actually loaded/fired that mechanism.
|
|
153
160
|
|
|
154
|
-
|
|
161
|
+
A semantic MUST does not require a hard lock. Outside Rule-of-3 reflection and explicit permission/safety boundaries, lifecycle hooks stay fail-open/reminder-oriented.
|
|
155
162
|
|
|
156
|
-
Instruction-only integrations receive the same
|
|
163
|
+
Instruction-only integrations receive the same semantic contract through instructions, but must not be labeled hard-enforced. Kernel emission alone does not prove model compliance. #82 owns host-specific retained evidence.
|
|
157
164
|
|
|
158
165
|
Do not infer cross-host parity from shared runtime code or passing package tests.
|
package/docs/workflow-runtime.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Workflow Runtime
|
|
2
2
|
|
|
3
|
-
Harness uses workflow state to **observe, explain, and remind**. It is not a numeric-budget scheduler.
|
|
3
|
+
Harness uses workflow state to **observe, explain, and remind about semantic contracts**. It is not a numeric-budget scheduler, and reminder-only mechanics do not make MUST obligations optional.
|
|
4
4
|
|
|
5
5
|
## Product rule
|
|
6
6
|
|
|
7
7
|
The runtime follows **minimal rails, maximum freedom**:
|
|
8
8
|
|
|
9
|
-
- routing
|
|
10
|
-
- workflow state records useful evidence and unresolved obligations;
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
9
|
+
- routing **MUST** establish the selected/deferred topology and suggested-skill applicability set;
|
|
10
|
+
- workflow state records useful evidence and unresolved obligations without becoming a cognitive lock;
|
|
11
|
+
- selected-topology required obligations and applicable skill core contracts are semantic **MUSTs**;
|
|
12
|
+
- the agent **MUST** verify before claiming completion and use the single user-visible Harness Status at required phase boundaries for non-trivial work;
|
|
13
|
+
- verification hooks may only remind when evidence is missing, but the semantic verification obligation remains **MUST**;
|
|
14
|
+
- Tier-3/Fable broad mutation **MUST** resolve isolation disposition: verified linked worktree or explicit degraded fallback;
|
|
15
|
+
- iteration, revision, replan, and worker counts are **MAY** planning hints only.
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Those cognitive workflow conditions **MUST NOT** trap a session or require a reset command.
|
|
17
18
|
|
|
18
19
|
A semantic MUST is not the same thing as a hard runtime lock. User-visible status, routing/applicability obligations, and verification-before-claim can remain mandatory agent contracts while host hooks observe or remind on a best-effort basis. Do not downgrade a semantic obligation to optional advice merely because the host cannot block it.
|
|
19
20
|
|
|
@@ -41,11 +42,11 @@ The two intentionally separate hard boundaries are:
|
|
|
41
42
|
|
|
42
43
|
```text
|
|
43
44
|
route
|
|
44
|
-
-> selected workflow
|
|
45
|
-
-> execute
|
|
45
|
+
-> selected workflow semantic contract
|
|
46
|
+
-> execute with model-chosen tactics
|
|
46
47
|
-> observe edits / verification / stage evidence
|
|
47
48
|
-> emit reminders when evidence is weak
|
|
48
|
-
-> complete
|
|
49
|
+
-> complete only when MUST obligations resolve
|
|
49
50
|
|
|
50
51
|
same failure signature x3
|
|
51
52
|
-> zoom-out reflection required
|
|
@@ -55,7 +56,7 @@ same failure signature x3
|
|
|
55
56
|
|
|
56
57
|
There is no `budget-exhausted -> blocked -> reset-budget` lifecycle.
|
|
57
58
|
|
|
58
|
-
## Numeric
|
|
59
|
+
## Numeric MAY hints
|
|
59
60
|
|
|
60
61
|
Router plans may still expose values such as:
|
|
61
62
|
|
|
@@ -64,13 +65,13 @@ Router plans may still expose values such as:
|
|
|
64
65
|
- `maxReplans`
|
|
65
66
|
- `maxWorkers`
|
|
66
67
|
|
|
67
|
-
These are **
|
|
68
|
+
These are **MAY planning hints**, useful for prompts, diagnostics, or planning. Runtime hooks do not maintain authoritative counters, reserve mutation capacity, or reject the Nth event.
|
|
68
69
|
|
|
69
|
-
A long loop
|
|
70
|
+
A long loop **SHOULD** produce a message such as:
|
|
70
71
|
|
|
71
72
|
> Iterative work is getting long; verify assumptions or consider re-planning.
|
|
72
73
|
|
|
73
|
-
It
|
|
74
|
+
It **MUST NOT** create a lock.
|
|
74
75
|
|
|
75
76
|
## Mutation observation
|
|
76
77
|
|
|
@@ -86,19 +87,19 @@ A workflow may retain `blocked` as a descriptive status recorded by the controll
|
|
|
86
87
|
|
|
87
88
|
## Fable and worktrees
|
|
88
89
|
|
|
89
|
-
Fable stage graphs, dependencies, write sets,
|
|
90
|
+
When a Fable topology is selected, its stage graphs, dependencies, write sets, objective checks, synthesis barrier, and required verifier are semantic **MUSTs**. `maxWorkers` remains a **MAY** planning hint and no longer chunks ready stages as a hard concurrency cap.
|
|
90
91
|
|
|
91
|
-
For
|
|
92
|
+
For Tier-3/Fable broad mutation, isolation disposition is a semantic **MUST**: use/reuse a verified linked worktree, or record an explicit degraded fallback when isolation is unavailable or the user explicitly chooses to stay in place. Missing isolation is surfaced prominently, but Harness-owned cognitive workflow hooks do not turn it into a self-deadlocking runtime state.
|
|
92
93
|
|
|
93
94
|
## Legacy state
|
|
94
95
|
|
|
95
|
-
Existing sessions may contain `budget.state = "budget-exhausted"`, old counters, or mutation-probe files from earlier versions. Current runtime code treats the budget API as
|
|
96
|
+
Existing sessions may contain `budget.state = "budget-exhausted"`, old counters, or mutation-probe files from earlier versions. Current runtime code treats the budget API as MAY-planning compatibility only and creates no new mutation-probe state.
|
|
96
97
|
|
|
97
98
|
Starting a fresh session remains the cleanest way to discard old evidence, but it is no longer required to recover from numeric budget exhaustion.
|
|
98
99
|
|
|
99
100
|
## Testing contract
|
|
100
101
|
|
|
101
|
-
Regression tests
|
|
102
|
+
Regression tests **MUST** prove:
|
|
102
103
|
|
|
103
104
|
- reminders fire when relevant;
|
|
104
105
|
- commands/Stop remain available;
|
|
@@ -4,7 +4,7 @@ description: Use at session start (Discover phase) to detect and align with the
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.19.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Environment Detection & Shell Alignment
|
|
@@ -20,6 +20,8 @@ metadata:
|
|
|
20
20
|
|
|
21
21
|
Boundary: stay inside `process.cwd()`. Detection never writes integrations or searches parent/cache paths for another runtime.
|
|
22
22
|
|
|
23
|
+
**Strength:** before relying on environment-sensitive commands, paths, package managers, or host capabilities, relevant discovery is a semantic **MUST**. Hosts may satisfy it from trusted injected environment context instead of rerunning probes.
|
|
24
|
+
|
|
23
25
|
## Workflow
|
|
24
26
|
|
|
25
27
|
1. Run `node "<this-skill-dir>/scripts/preflight.js"`; detect OS, shell, CLIs.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id: positive-trivial-tier1-001
|
|
2
2
|
name: Trivial edit routes to Tier 1
|
|
3
|
-
description: "Route software/project work through
|
|
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
|
tags:
|
|
5
5
|
- positive-trigger
|
|
6
6
|
- tier-1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id: positive-standard-tier2-001
|
|
2
2
|
name: Standard bug fix routes to Tier 2
|
|
3
|
-
description: "Route software/project work through
|
|
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
|
tags:
|
|
5
5
|
- positive-trigger
|
|
6
6
|
- tier-2
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id: positive-macro-tier3-001
|
|
2
2
|
name: Architectural task routes to Tier 3
|
|
3
|
-
description: "Route software/project work through
|
|
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
|
tags:
|
|
5
5
|
- positive-trigger
|
|
6
6
|
- tier-3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
id: positive-using-git-worktrees-001
|
|
2
2
|
name: On-scope prompt triggers using-git-worktrees
|
|
3
|
-
description: "Use when
|
|
3
|
+
description: "Use when work needs isolation or before major implementation plans - resolves workspace isolation via native tools or git worktree fallback, with an explicit degraded fallback when isolation is unavailable"
|
|
4
4
|
tags:
|
|
5
5
|
- positive-trigger
|
|
6
6
|
inputs:
|
package/find-skills/SKILL.md
CHANGED
|
@@ -4,45 +4,36 @@ description: Search the agent-skills ecosystem (skills.sh / npx skills) when no
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.19.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Find Skills
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Skill Contract
|
|
13
13
|
|
|
14
|
-
| Component |
|
|
14
|
+
| Component | Contract |
|
|
15
15
|
| :--- | :--- |
|
|
16
|
-
| **
|
|
17
|
-
| **
|
|
18
|
-
| **State
|
|
19
|
-
| **
|
|
16
|
+
| **Input** | No installed skill fits, or user asks to find one. |
|
|
17
|
+
| **Output** | Vetted skill pointer, approved application, or fallback. |
|
|
18
|
+
| **State** | Temp cache by default; permanent install is opt-in. |
|
|
19
|
+
| **Gate** | Third-party fetch/apply/install requires explicit approval. |
|
|
20
20
|
|
|
21
21
|
## Workflow
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
3. Present name/source/count; NEVER fetch/apply without explicit approval.
|
|
31
|
-
4. Apply ephemerally (default, zero footprint):
|
|
32
|
-
```bash
|
|
33
|
-
node "<this-skill-dir>/scripts/use-skill.js" <owner/repo[@skill]>
|
|
34
|
-
```
|
|
35
|
-
Treat the printed output as binding for this request, like a loaded skill — not reference material. OS-temp cache (6h); nothing written to repo or manifest.json.
|
|
36
|
-
5. Permanent install ONLY when the user says they will reuse it: `npx skills add <owner/repo[@skill]> --agent <agent> [-g] -y`
|
|
37
|
-
6. Nothing exists? Help directly; suggest `npx skills init <name>` if recurring.
|
|
38
|
-
|
|
39
|
-
Deep dive: <this-skill-dir>/references/discovery-flow.md
|
|
23
|
+
1. Check local coverage first: `npx skills list --json` and `npx skills list -g --json`.
|
|
24
|
+
2. If uncovered, search skills.sh / `npx skills find [query] [--owner <owner>]`.
|
|
25
|
+
3. Official/1K+ sources **SHOULD** rank first; **MUST** read the unaudited `SKILL.md`.
|
|
26
|
+
4. Present name/source/count; **MUST** get explicit approval before fetching or applying third-party code.
|
|
27
|
+
5. Ephemeral use is default: `node "<this-skill-dir>/scripts/use-skill.js" <owner/repo[@skill]>`. Treat its output as binding for this request.
|
|
28
|
+
6. Permanent install **MUST** be explicitly requested: `npx skills add <owner/repo[@skill]> --agent <agent> [-g] -y`.
|
|
29
|
+
7. No match: help directly; `npx skills init <name>` **MAY** be suggested for recurring needs.
|
|
40
30
|
|
|
41
31
|
## USE FOR:
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
- ephemeral skill use without permanent installs
|
|
32
|
+
- external skill discovery/vetting
|
|
33
|
+
- approved ephemeral use
|
|
45
34
|
|
|
46
35
|
## DO NOT USE FOR:
|
|
47
|
-
- authoring
|
|
48
|
-
-
|
|
36
|
+
- skill authoring (`skill-creator`)
|
|
37
|
+
- unapproved third-party application/install
|
|
38
|
+
|
|
39
|
+
Deep dive: <this-skill-dir>/references/discovery-flow.md
|
package/git-commit/SKILL.md
CHANGED
|
@@ -4,7 +4,7 @@ description: "Generate Angular-style commit messages after verifying the environ
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.19.1
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Git Commit (Angular Style)
|
|
@@ -20,10 +20,10 @@ metadata:
|
|
|
20
20
|
|
|
21
21
|
## Quick Workflow
|
|
22
22
|
|
|
23
|
-
1. `git status`; no repo → offer `git init` or skip; submodules changed → commit first per `<this-skill-dir>/guides/SUBMODULES.md`.
|
|
24
|
-
2. `git diff --cached
|
|
23
|
+
1. **MUST** run `git status`; no repo → offer `git init` or skip; submodules changed → commit first per `<this-skill-dir>/guides/SUBMODULES.md`.
|
|
24
|
+
2. **MUST** inspect `git diff --cached` before committing. Nothing staged → prompt user / stage only user-authorized targeted files. Unrelated concerns **SHOULD** be split unless coupling or explicit user intent justifies one commit.
|
|
25
25
|
3. Format `<type>(<scope>): <subject>` per `<this-skill-dir>/guides/ANGULAR_STYLE.md`. Multiline/Windows → `.git-commit-msg.txt` + `git commit -F`, clean up.
|
|
26
|
-
4. `git commit -m "..."`, verify with `git log -1`.
|
|
26
|
+
4. `git commit -m "..."`, then **MUST** verify the result with `git log -1`.
|
|
27
27
|
|
|
28
28
|
## USE FOR:
|
|
29
29
|
- Commit request from the user
|