harness-everything 0.6.1 → 0.8.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/AGENTS.md +3 -1
- package/CHANGELOG.md +12 -0
- package/README.md +10 -9
- package/ci/invariant-routing.test.js +77 -4
- package/ci/openai-plugin-package.test.js +6 -2
- package/docs/architecture.md +26 -17
- package/docs/mechanism-first-skill-mesh.md +29 -24
- package/docs/philosophy.md +8 -5
- package/docs/platform-capabilities.md +10 -2
- package/docs/routing.md +43 -15
- package/harness-everything/SKILL.md +14 -20
- package/harness-everything/references/triage-and-tiers.md +47 -30
- package/harness-everything/scripts/kernel-router.js +44 -4
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/advisory-text.js +21 -19
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +14 -20
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +47 -30
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +44 -4
- package/scripts/lib/advisory-text.js +21 -19
|
@@ -4,40 +4,34 @@ description: "Route software/project work through the Harness kernel: classify T
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Miya Daniel
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.8.0
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Harness Everything
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Kernel routing entry.
|
|
13
13
|
|
|
14
14
|
## USE FOR:
|
|
15
|
-
- Software triage
|
|
16
|
-
-
|
|
15
|
+
- Software/project triage, re-routing, and suggested-skill evaluation.
|
|
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.
|
|
23
|
+
2. **Verify before claim** — require objective evidence.
|
|
24
|
+
3. **Re-plan on repetition** — after 3 same-signature failures, use `zoom-out`.
|
|
25
|
+
4. **Evaluate before skip** — read each suggested skill's complete `SKILL.md`.
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
2. **Verify before claim** — completion needs objective evidence.
|
|
25
|
-
3. **Re-plan on repetition** — after 3 same-signature failures, stop micro-retrying and use `zoom-out`/fresh diagnosis.
|
|
26
|
-
|
|
27
|
-
These rails are mandatory; Tier guidance is not a fixed pipeline.
|
|
27
|
+
Tier guidance is not a fixed pipeline.
|
|
28
28
|
|
|
29
29
|
## Workflow
|
|
30
|
+
1. Reuse kernel output, or run `node "<this-skill-dir>/scripts/kernel-router.js" "<prompt summary>"`.
|
|
31
|
+
2. Make the **Harness Routing Checkpoint** user-visible.
|
|
32
|
+
3. For every suggestion, read its `SKILL.md`; evaluate `USE FOR`, `DO NOT USE FOR`, workflow/basic flow, and hard rules. Name, description, router summary, or "routine/common task" alone cannot justify skip. Read extra material only when explicitly required for applicability.
|
|
33
|
+
4. Execution is advisory after evaluation. Unreadable suggestions are `unresolved/unavailable`. Using one suggestion does not waive evaluation of others. If all are skipped, give one brief flow-grounded reason.
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
2. Preserve the invariants.
|
|
33
|
-
3. Treat suggested skills as advisory: choose, combine, reorder, or omit them as useful.
|
|
34
|
-
|
|
35
|
-
## Tier Guidance
|
|
36
|
-
|
|
37
|
-
- **Tier 1:** Prefer direct execution.
|
|
38
|
-
- **Tier 2:** TODO tracking, TDD, and verification are common suggestions.
|
|
39
|
-
- **Tier 3:** Fable/multi-agent skills are optional when macro planning or delegation helps.
|
|
40
|
-
|
|
41
|
-
**Rule:** do not enforce workflow order; let the agent orchestrate itself inside the invariants.
|
|
35
|
+
**Rule:** mandatory evaluation, advisory execution; no fixed workflow order.
|
|
42
36
|
|
|
43
37
|
Deep dive: <this-skill-dir>/references/triage-and-tiers.md
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Task Triage & Tier Details
|
|
2
2
|
|
|
3
|
-
Harness uses tiers to estimate scope and surface useful capabilities. A tier is **not** a fixed pipeline. The runtime enforces a
|
|
3
|
+
Harness uses tiers to estimate scope and surface useful capabilities. A tier is **not** a fixed pipeline. The runtime enforces a small set of cross-cutting invariants plus mandatory evaluation of router-suggested skills; execution choice, ordering, and delegation remain with the agent after that evaluation.
|
|
4
4
|
|
|
5
|
-
> Architecture rule: **Do not enforce workflow order. Enforce workflow invariants.**
|
|
5
|
+
> Architecture rule: **Do not enforce workflow order. Enforce workflow invariants and evaluate suggestions before skipping them.**
|
|
6
6
|
|
|
7
7
|
## 0. When Harness Routing Applies
|
|
8
8
|
|
|
@@ -12,19 +12,18 @@ flowchart TD
|
|
|
12
12
|
S -- No --> B[Bypass Harness<br/>Answer naturally]
|
|
13
13
|
S -- Yes --> K[Harness Kernel<br/>classify scope + inject invariants]
|
|
14
14
|
K --> T{Tier recommendation}
|
|
15
|
-
T
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
A3 --> E
|
|
15
|
+
T --> G{Suggested skills?}
|
|
16
|
+
G -- Yes --> R[Read each suggested SKILL.md<br/>evaluate basic flow + applicability]
|
|
17
|
+
G -- No --> C[Agent chooses smallest useful tactic]
|
|
18
|
+
R --> C
|
|
19
|
+
C --> E[Execute with agent-selected tactics]
|
|
21
20
|
E --> V{Objective evidence supports completion?}
|
|
22
|
-
V -- No -->
|
|
23
|
-
|
|
21
|
+
V -- No --> D[Diagnose / iterate]
|
|
22
|
+
D --> F{Same-signature failure x3?}
|
|
24
23
|
F -- No --> E
|
|
25
24
|
F -- Yes --> Z[Zoom out / re-plan]
|
|
26
25
|
Z --> E
|
|
27
|
-
V -- Yes -->
|
|
26
|
+
V -- Yes --> O([Claim completion])
|
|
28
27
|
```
|
|
29
28
|
|
|
30
29
|
### Bypass Rules
|
|
@@ -43,16 +42,18 @@ The kernel exists to keep strong models free while protecting the few behaviors
|
|
|
43
42
|
1. **Route before execution** — establish task scope/tier before mutating software work.
|
|
44
43
|
2. **Verify before claim** — completion claims require objective evidence appropriate to the change.
|
|
45
44
|
3. **Re-plan on repetition** — after three same-signature failures, stop micro-retrying and use a fresh diagnosis / `zoom-out`.
|
|
45
|
+
4. **Evaluate before skip** — when the router suggests a skill, read that skill's complete `SKILL.md` entry/basic flow before omitting it.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
The fourth invariant is conditional: it applies when the router emits one or more suggestions. It makes **evaluation mandatory, not execution**.
|
|
48
48
|
|
|
49
49
|
### What is intentionally *not* mandatory
|
|
50
50
|
|
|
51
|
-
-
|
|
52
|
-
- Running TDD
|
|
53
|
-
- Entering Fable/multi-agent mode merely because the task is Tier 3.
|
|
51
|
+
- Executing `todo-driven-workflow` for every Tier 2/3 task after its applicability has been evaluated.
|
|
52
|
+
- Running TDD where the `tdd` flow has been read and executable behavioral tests do not add value.
|
|
53
|
+
- Entering Fable/multi-agent mode merely because the task is Tier 3 after those suggested flows have been evaluated.
|
|
54
54
|
- Following a universal `TODO → TDD → verification-loop` or `Fable → subagent → verification-loop` sequence.
|
|
55
55
|
- Loading `install-cognitive-os` as a peer skill before every other skill.
|
|
56
|
+
- Reading every optional deep-dive/reference linked by a suggested skill. Only material the skill entry explicitly requires to decide applicability joins the mandatory evaluation set.
|
|
56
57
|
|
|
57
58
|
`install-cognitive-os` remains the human-readable/manual entry point for the cognitive policy. Supported runtime integrations should establish the kernel invariants without depending on that skill being selected first.
|
|
58
59
|
|
|
@@ -73,14 +74,26 @@ npx github:dyphn1/Harness-everything next "<brief prompt summary>"
|
|
|
73
74
|
`kernel-router.js` delegates classification and guide discovery to `tier-router.js`, removes legacy fixed-pipeline instructions, and emits:
|
|
74
75
|
|
|
75
76
|
- the recommended tier and rationale,
|
|
77
|
+
- a compact **Harness Routing Checkpoint**,
|
|
76
78
|
- the **required Harness invariants**,
|
|
77
|
-
-
|
|
78
|
-
- the policy that the agent may choose the smallest useful skill/tool set.
|
|
79
|
+
- suggested skills under a **mandatory evaluation / advisory execution** contract,
|
|
80
|
+
- the policy that the agent may choose the smallest useful skill/tool set after evaluating suggestions.
|
|
79
81
|
|
|
80
|
-
If a host's `UserPromptSubmit` integration already ran the kernel this turn, reuse that output rather than running it twice.
|
|
82
|
+
If a host's `UserPromptSubmit` integration already ran the kernel this turn, reuse that output rather than running it twice. The checkpoint must still become user-visible for software/project work: use the host's visible hook rendering when it has one, otherwise include the checkpoint in the first progress/update message.
|
|
81
83
|
|
|
82
84
|
The tier classifier is heuristic. Treat its result as the default route, not an oracle. A clear task reading or explicit user instruction may override it; record the reason when doing so.
|
|
83
85
|
|
|
86
|
+
### Suggestion evaluation contract
|
|
87
|
+
|
|
88
|
+
For every router-suggested skill:
|
|
89
|
+
|
|
90
|
+
1. Resolve and read the complete `SKILL.md` entry.
|
|
91
|
+
2. Evaluate `USE FOR`, `DO NOT USE FOR`, its workflow/basic flow, and any hard rules in the entry against the current task.
|
|
92
|
+
3. If the entry explicitly requires another document to determine applicability, read that required material too. Ordinary deep-dive/reference links remain optional unless the entry makes them decision-critical.
|
|
93
|
+
4. Only then choose `use`, `skip`, or `unresolved/unavailable`.
|
|
94
|
+
|
|
95
|
+
A skill must not be skipped from only its name, frontmatter description, router summary, or a generic judgement such as “routine/common task.” Using one suggested skill does not waive evaluation of the other suggestions before they are skipped. A suggestion that cannot be resolved/read is not a valid skip; mark it `unresolved/unavailable`.
|
|
96
|
+
|
|
84
97
|
## 3. Tier Guidance
|
|
85
98
|
|
|
86
99
|
### Tier 1 — Trivial
|
|
@@ -94,7 +107,8 @@ Typical shape:
|
|
|
94
107
|
Default behavior:
|
|
95
108
|
- prefer direct execution,
|
|
96
109
|
- avoid large plans and unnecessary delegation,
|
|
97
|
-
-
|
|
110
|
+
- when the router emits no suggestions, proceed with the bounded direct path,
|
|
111
|
+
- when it does emit a focused suggestion, evaluate that skill entry before omitting it,
|
|
98
112
|
- still verify any completion claim with evidence appropriate to the change.
|
|
99
113
|
|
|
100
114
|
### Tier 2 — Standard
|
|
@@ -116,7 +130,7 @@ Common **suggestions**, not a pipeline:
|
|
|
116
130
|
| Isolated workspace would reduce risk | `using-git-worktrees` |
|
|
117
131
|
| Quantitative scoring/benchmarking is requested | `eval-harness` |
|
|
118
132
|
|
|
119
|
-
|
|
133
|
+
Every emitted suggestion is mandatory to **evaluate** by reading its skill entry/basic flow. After that, the model decides which skills are useful and in what order; it may execute none, one, or several while preserving the kernel invariants. Adopting one suggestion does not permit the others to be skipped without evaluation. If every suggestion is skipped after evaluation, the visible checkpoint/progress update must include one brief reason grounded in the evaluated flow mismatch.
|
|
120
134
|
|
|
121
135
|
### Tier 3 — Macro
|
|
122
136
|
|
|
@@ -137,7 +151,7 @@ Common **suggestions**, not a pipeline:
|
|
|
137
151
|
| Settled intent needs a spec | `to-spec` |
|
|
138
152
|
| Settled work needs tracer-bullet issues | `to-tickets` |
|
|
139
153
|
|
|
140
|
-
Tier 3 does **not** automatically require multi-agent execution. A strong model may complete macro work directly when
|
|
154
|
+
Tier 3 does **not** automatically require multi-agent execution. It does require evaluation of the suggested entries before omission. A strong model may still complete macro work directly when, after reading those flows, direct execution is the safer/smaller choice. The same evaluated all-skipped rationale rule applies.
|
|
141
155
|
|
|
142
156
|
## 4. Cognitive OS Relationship
|
|
143
157
|
|
|
@@ -160,28 +174,31 @@ But this diagram describes a reasoning policy, not a peer-skill dependency graph
|
|
|
160
174
|
|
|
161
175
|
| Host mode | Expected behavior |
|
|
162
176
|
|---|---|
|
|
163
|
-
| Lifecycle hook available | Run the Harness Kernel on prompt submission so routing context exists before domain-skill execution. Hard gates may enforce supported invariants at tool/stop boundaries. |
|
|
164
|
-
| Advisory instructions only | Tell the agent to run/reuse `harness next` before software mutation and `harness verify` before completion. The behavior is
|
|
165
|
-
| Manual use | Invoke `harness-everything` or `install-cognitive-os` explicitly to inspect/re-establish the contract. |
|
|
177
|
+
| Lifecycle hook available | Run the Harness Kernel on prompt submission so routing context exists before domain-skill execution. Surface the emitted checkpoint through a host-visible hook surface when supported; otherwise the agent carries it into the first visible progress/update. Suggested-skill execution stays agent-controlled, but each suggested skill must be evaluated before omission. Hard gates may enforce supported invariants at tool/stop boundaries. |
|
|
178
|
+
| Advisory instructions only | Tell the agent to run/reuse `harness next` before software mutation, surface the checkpoint, read/evaluate each suggested skill before skipping it, and run `harness verify` before completion. The behavior is instruction-governed, not a hard host gate. |
|
|
179
|
+
| Manual use | Invoke `harness-everything` or `install-cognitive-os` explicitly to inspect/re-establish and surface the contract; suggested skills still follow read-before-skip. |
|
|
166
180
|
|
|
167
|
-
Never describe an advisory integration as hard enforcement. Platform-specific adapters may differ while preserving functional intent.
|
|
181
|
+
Never describe an advisory integration as hard enforcement. Platform-specific adapters may differ while preserving functional intent. Kernel emission alone is not proof that a host UI displayed the checkpoint or that the host compelled the model to read a suggested skill; #82 live evidence owns those claims.
|
|
168
182
|
|
|
169
183
|
## 6. Routing Checkpoint
|
|
170
184
|
|
|
171
|
-
|
|
185
|
+
For software/project work, the kernel always emits a compact checkpoint and the execution surface must make it user-visible before or with the first progress update:
|
|
172
186
|
|
|
173
187
|
```markdown
|
|
174
188
|
## 🚦 Harness Routing Checkpoint
|
|
175
189
|
- Tier: Tier X — <reason>
|
|
176
|
-
-
|
|
177
|
-
-
|
|
190
|
+
- Strategy: <selected/deferred strategy>
|
|
191
|
+
- Required invariants: route-before-execution; verify-before-claim; re-plan-after-3-same-failures; evaluate-suggestions-before-skip (when suggestions exist)
|
|
192
|
+
- Suggested skills: <deduplicated suggestions, or none>
|
|
193
|
+
- Suggestion evaluation: <required before skip | no suggestions>
|
|
194
|
+
- Suggestion disposition: <using one or more | skipped all after evaluation — brief reason | unresolved/unavailable>
|
|
178
195
|
```
|
|
179
196
|
|
|
180
|
-
The checkpoint reports state; it does not prescribe a universal workflow.
|
|
197
|
+
The checkpoint reports state; it does not prescribe a universal workflow. Suggested skills are **mandatory to evaluate and advisory to execute**. A non-empty suggestion set cannot disappear silently or be rejected from summaries alone. When every suggestion is skipped after evaluation, state one brief reason grounded in the evaluated flows. When at least one is used, no prose explanation is required for each other omission, but read-before-skip still applies to every omitted suggestion.
|
|
181
198
|
|
|
182
199
|
## 7. Self-Healing and Dynamic Skills
|
|
183
200
|
|
|
184
|
-
Existing self-heal, generated-skill discovery, knowledge-guide matching, and fact-audit behavior remain part of the classifier/runtime. They may recommend resources
|
|
201
|
+
Existing self-heal, generated-skill discovery, knowledge-guide matching, and fact-audit behavior remain part of the classifier/runtime. They may recommend resources; recommendations trigger mandatory applicability evaluation, not automatic execution or mandatory pipeline stages.
|
|
185
202
|
|
|
186
203
|
If bootstrap reports missing integration touchpoints, use the existing self-heal command:
|
|
187
204
|
|
|
@@ -25,6 +25,7 @@ const INVARIANT_TEXT = {
|
|
|
25
25
|
'scope-lock': 'Route before execution: stay inside the authorized task/repository scope.',
|
|
26
26
|
'verify-before-claim': 'Verify before claim: completion claims require objective evidence appropriate to the change.',
|
|
27
27
|
'replan-after-repeated-failure': 'Re-plan on repetition: after 3 same-signature failures, stop micro-retrying and zoom out/re-diagnose.',
|
|
28
|
+
'evaluate-suggestions-before-skip': 'Evaluate before skip: read each suggested skill\'s complete SKILL.md entry/basic flow before omitting it.',
|
|
28
29
|
'loop-budget': 'Stop iterative-single when its explicit iteration budget is exhausted.',
|
|
29
30
|
'objective-verification': 'Use an objective check for iterative work; self-critique alone is not verification.',
|
|
30
31
|
'stage-contracts': 'Fable stages must have explicit stage contracts and pass conditions.',
|
|
@@ -117,13 +118,49 @@ function printWorkflowPlan(plan) {
|
|
|
117
118
|
console.log(`\n=> ROUTER WORKFLOW PLAN (JSON): ${JSON.stringify(visible)}`);
|
|
118
119
|
}
|
|
119
120
|
|
|
121
|
+
function uniqueSuggestedSkills(plan) {
|
|
122
|
+
if (!Array.isArray(plan.suggestedSkills)) return [];
|
|
123
|
+
return [...new Set(plan.suggestedSkills.filter(skill => typeof skill === 'string' && skill.trim()))];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function enforceSuggestionEvaluation(plan) {
|
|
127
|
+
if (uniqueSuggestedSkills(plan).length === 0) return;
|
|
128
|
+
if (!Array.isArray(plan.requiredInvariants)) plan.requiredInvariants = [];
|
|
129
|
+
if (!plan.requiredInvariants.includes('evaluate-suggestions-before-skip')) {
|
|
130
|
+
plan.requiredInvariants.push('evaluate-suggestions-before-skip');
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function displayTier(tier) {
|
|
135
|
+
if (tier === 'tier1') return 'Tier 1';
|
|
136
|
+
if (tier === 'tier2') return 'Tier 2';
|
|
137
|
+
if (tier === 'tier3') return 'Tier 3';
|
|
138
|
+
return tier || 'unclassified';
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function printRoutingCheckpoint(plan) {
|
|
142
|
+
const invariants = Array.isArray(plan.requiredInvariants) ? plan.requiredInvariants : [];
|
|
143
|
+
const suggestions = uniqueSuggestedSkills(plan);
|
|
144
|
+
|
|
145
|
+
console.log('\n=> HARNESS ROUTING CHECKPOINT (REQUIRED VISIBLE STATE):');
|
|
146
|
+
console.log(` - Tier: ${displayTier(plan.tier)}`);
|
|
147
|
+
console.log(` - Strategy: ${plan.strategy || 'deferred'}`);
|
|
148
|
+
console.log(` - Required invariants: ${invariants.length ? invariants.join(', ') : 'none'}`);
|
|
149
|
+
console.log(` - Suggested skills: ${suggestions.length ? suggestions.join(', ') : 'none'}`);
|
|
150
|
+
if (suggestions.length > 0) {
|
|
151
|
+
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.');
|
|
152
|
+
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.');
|
|
153
|
+
console.log(' - Suggestion disposition: execution is advisory after evaluation. Using one suggestion does not waive read-before-skip for other omitted suggestions. If all are skipped after evaluation, state one brief reason grounded in the evaluated flows in the first visible progress/update message.');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
120
157
|
function printKernelContract(plan) {
|
|
121
158
|
console.log('\n=> REQUIRED HARNESS INVARIANTS:');
|
|
122
159
|
for (const invariant of plan.requiredInvariants || []) {
|
|
123
160
|
console.log(` - ${invariant}: ${INVARIANT_TEXT[invariant] || 'Required by the selected workflow plan.'}`);
|
|
124
161
|
}
|
|
125
162
|
|
|
126
|
-
console.log('\n=> SUGGESTED SKILLS (
|
|
163
|
+
console.log('\n=> SUGGESTED SKILLS (MANDATORY EVALUATION — ADVISORY EXECUTION):');
|
|
127
164
|
if (Array.isArray(plan.suggestedSkills) && plan.suggestedSkills.length > 0) {
|
|
128
165
|
const emitted = new Set();
|
|
129
166
|
for (const skill of plan.suggestedSkills) {
|
|
@@ -133,11 +170,12 @@ function printKernelContract(plan) {
|
|
|
133
170
|
emitted.add(skill);
|
|
134
171
|
if (skill === 'fable-mode') emitted.add('fable-discipline');
|
|
135
172
|
}
|
|
173
|
+
console.log(' - Read-before-skip: evaluate every suggested skill entry before omission; adopting one suggestion does not waive evaluation of the others.');
|
|
136
174
|
if (plan.strategy && plan.strategy.startsWith('fable-')) {
|
|
137
|
-
console.log(' - Use these selectively; Tier 3/Fable does not create a universal skill pipeline.');
|
|
175
|
+
console.log(' - Use these selectively after evaluation; Tier 3/Fable does not create a universal skill pipeline.');
|
|
138
176
|
}
|
|
139
177
|
} else if (plan.strategy === 'direct-single') {
|
|
140
|
-
console.log(' - No
|
|
178
|
+
console.log(' - No domain skill was suggested. Prefer the bounded direct path and load a focused skill only when it adds value.');
|
|
141
179
|
} else if (plan.strategySelection === 'deferred') {
|
|
142
180
|
console.log(' - Strategy is deferred/unclassified. Do not infer triviality; choose the smallest justified approach from task evidence.');
|
|
143
181
|
} else {
|
|
@@ -160,7 +198,7 @@ function printKernelContract(plan) {
|
|
|
160
198
|
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.');
|
|
161
199
|
}
|
|
162
200
|
|
|
163
|
-
console.log('\n=> ORCHESTRATION POLICY: Do not enforce workflow order. Enforce workflow invariants from the plan;
|
|
201
|
+
console.log('\n=> ORCHESTRATION POLICY: Do not enforce workflow order. Enforce workflow invariants from the plan. Suggested-skill evaluation is mandatory; execution remains advisory after evaluation. The router plans; execution components execute.');
|
|
164
202
|
}
|
|
165
203
|
|
|
166
204
|
function run(prompt, stdinPayload) {
|
|
@@ -187,6 +225,7 @@ function run(prompt, stdinPayload) {
|
|
|
187
225
|
|
|
188
226
|
const contract = readStructuredContract(contractPath);
|
|
189
227
|
applyEnsemblePolicy(contract, resolvePrompt(prompt, stdinPayload));
|
|
228
|
+
enforceSuggestionEvaluation(contract.workflowPlan);
|
|
190
229
|
try {
|
|
191
230
|
fs.rmSync(contractPath, { force: true });
|
|
192
231
|
} catch (err) {
|
|
@@ -194,6 +233,7 @@ function run(prompt, stdinPayload) {
|
|
|
194
233
|
}
|
|
195
234
|
|
|
196
235
|
printWorkflowPlan(contract.workflowPlan);
|
|
236
|
+
printRoutingCheckpoint(contract.workflowPlan);
|
|
197
237
|
printKernelContract(contract.workflowPlan);
|
|
198
238
|
|
|
199
239
|
if (result.status !== 0) process.exit(result.status === null ? 1 : result.status);
|
|
@@ -13,25 +13,28 @@ const advisoryInstructions = [
|
|
|
13
13
|
`these as strong defaults, not guarantees.`,
|
|
14
14
|
``,
|
|
15
15
|
`## 🚦 MANDATORY ENTRY TRIAGE & ROUTING (ALWAYS RUN FIRST)`,
|
|
16
|
-
`Every time you receive a new prompt, you MUST load the \`harness-everything\` skill and immediately do the following:`,
|
|
17
|
-
`1. Run \`npx github:dyphn1/Harness-everything next "<Brief summary of user's prompt>"\` (this prints the same routing recommendation
|
|
18
|
-
`2.
|
|
16
|
+
`Every time you receive a new software/project prompt, you MUST load the \`harness-everything\` skill and immediately do the following:`,
|
|
17
|
+
`1. Run \`npx github:dyphn1/Harness-everything next "<Brief summary of user's prompt>"\` (this prints the same routing recommendation kernel-router.js produces - it works from any directory and does not depend on where a local copy of the skill was installed). If the terminal is not available yet, apply the same routing contract from the loaded \`harness-everything\` skill instead of skipping this step.`,
|
|
18
|
+
`2. For EVERY suggested skill, resolve and read its complete \`SKILL.md\` entry before deciding to skip it. Evaluate \`USE FOR\`, \`DO NOT USE FOR\`, workflow/basic flow, and hard rules against the task. If the entry explicitly requires another document to decide applicability, read that required material too. Do not reject a suggestion from only its name, description, router summary, or because the task seems routine/common.`,
|
|
19
|
+
`3. After that evaluation, execution is advisory: use, combine, reorder, or skip skills as justified. Using one suggestion does not waive read-before-skip for the others. If a suggested skill cannot be resolved/read, mark it unresolved/unavailable instead of silently skipping it.`,
|
|
20
|
+
`4. Output a clear routing checkpoint near the beginning of your response/update:`,
|
|
19
21
|
` \`\`\`markdown`,
|
|
20
22
|
` ## 🚦 Harness OS Routing Checkpoint`,
|
|
21
23
|
` - **Active Tier**: Tier 1 (Trivial) | Tier 2 (Standard) | Tier 3 (Macro)`,
|
|
22
|
-
` - **Rationale**: <1-sentence rationale from the
|
|
23
|
-
` - **
|
|
24
|
-
`
|
|
24
|
+
` - **Rationale**: <1-sentence rationale from the router output>`,
|
|
25
|
+
` - **Required Invariants**: <router invariants>`,
|
|
26
|
+
` - **Suggested Skills**: <deduplicated router suggestions or none>`,
|
|
27
|
+
` - **Suggestion Evaluation**: <evaluated before skip | pending | unresolved/unavailable>`,
|
|
28
|
+
` - **Disposition**: <skills used, or skipped all after evaluation with a brief flow-grounded reason>`,
|
|
25
29
|
` \`\`\``,
|
|
26
30
|
``,
|
|
27
31
|
`## 🤖 COGNITIVE COMPLIANCE (NO SILENT DEGRADES FOR NEW FEATURES)`,
|
|
28
|
-
`- **Newly Added Features / Extensions**:
|
|
29
|
-
`- **Tier 2
|
|
30
|
-
`- **
|
|
31
|
-
`- **
|
|
32
|
-
`- **Memory Summarization (Self-Evolve)**: Upon task completion, you **MUST** run the \`self-evolve\` skill (running \`node self-evolve/scripts/self-regression.js\` or writing memories) to record key insights, lessons learned, and error boundaries so your context builds across sessions.`,
|
|
32
|
+
`- **Newly Added Features / Extensions**: Do not silently collapse a task that introduces new logic, a new API endpoint, or a new file/module into a trivial direct-edit path. Route it first and justify the tier from task evidence.`,
|
|
33
|
+
`- **Tier 2 / Tier 3 Suggestions**: There is NO universal TODO/TDD/Fable sequence. Router suggestions are mandatory to evaluate by reading their skill entry, but optional to execute after that evaluation. Choose the smallest applicable set.`,
|
|
34
|
+
`- **Pre-Completion Verification Gate**: Before telling the human the task is done, run \`npx github:dyphn1/Harness-everything verify\` in the project root. If it exits non-zero, fix the failures and run it again before declaring completion. On Claude Code this same check can be mechanically enforced by a stop hook; here nothing blocks you from skipping it, so treat it as a real requirement, not a suggestion.`,
|
|
35
|
+
`- **Memory Summarization (Self-Evolve)**: When the task produces a reusable verified lesson, use the \`self-evolve\` flow to persist it; do not manufacture memory for routine work.`,
|
|
33
36
|
`- **Environment Discovery**: Discover the environment (OS, shell, package manager) before running commands - don't assume.`,
|
|
34
|
-
`- **Rule of 3**: If the same error repeats 3 times in a row, STOP retrying. Explain what's failing and
|
|
37
|
+
`- **Rule of 3**: If the same error repeats 3 times in a row, STOP retrying. Explain what's failing and use a fresh diagnosis / zoom-out instead of continuing to guess.`,
|
|
35
38
|
`- **Prefer Editing**: Prefer editing over rewriting; commit logically complete chunks rather than one giant diff.`,
|
|
36
39
|
``
|
|
37
40
|
].join('\n');
|
|
@@ -144,17 +147,16 @@ function buildCodexGlobalContent() {
|
|
|
144
147
|
``,
|
|
145
148
|
`# ${MARKER}`,
|
|
146
149
|
`This file is advisory only - this platform has no hook/execution mechanism to`,
|
|
147
|
-
`enforce it mechanically
|
|
148
|
-
`these as strong defaults, not guarantees.`,
|
|
150
|
+
`enforce it mechanically. Treat these as strong defaults, not guarantees.`,
|
|
149
151
|
``,
|
|
150
152
|
`- Discover the environment (OS, shell, package manager) before running commands - don't assume.`,
|
|
151
|
-
`-
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
`- For software/project work, run \`npx github:dyphn1/Harness-everything next "<summary>"\` before mutation and surface the routing checkpoint.`,
|
|
154
|
+
`- For EVERY suggested skill, read its complete \`SKILL.md\` entry/basic flow before skipping it. Evaluate \`USE FOR\`, \`DO NOT USE FOR\`, workflow, and hard rules; do not skip from the name/description/router summary alone.`,
|
|
155
|
+
`- Suggested-skill execution remains optional after evaluation. Using one suggestion does not waive evaluation of the other omitted suggestions; unreadable suggestions are unresolved/unavailable, not silently skipped.`,
|
|
156
|
+
`- Do not impose a universal TODO/TDD/Fable sequence. Choose the smallest applicable skill set after evaluation.`,
|
|
154
157
|
`- Before declaring a task done, run \`npx github:dyphn1/Harness-everything verify\` and fix any failures`,
|
|
155
158
|
` it reports - nothing here blocks you from skipping this, so treat it as a real requirement.`,
|
|
156
|
-
`- If the same error repeats 3 times in a row, STOP retrying
|
|
157
|
-
` human for direction instead of continuing to guess.`,
|
|
159
|
+
`- If the same error repeats 3 times in a row, STOP retrying and use a fresh diagnosis / zoom-out.`,
|
|
158
160
|
`- Prefer editing over rewriting; commit logically complete chunks rather than one giant diff.`,
|
|
159
161
|
``
|
|
160
162
|
].join('\n');
|