harness-everything 0.7.0 → 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 +6 -0
- package/README.md +10 -9
- package/ci/invariant-routing.test.js +68 -10
- 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 -21
- package/harness-everything/references/triage-and-tiers.md +42 -28
- package/harness-everything/scripts/kernel-router.js +18 -5
- 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 -21
- package/plugins/harness-everything/skills/harness-everything/references/triage-and-tiers.md +42 -28
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +18 -5
- package/scripts/lib/advisory-text.js +21 -19
|
@@ -4,41 +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. Ensure the emitted **Harness Routing Checkpoint** is user-visible: reuse a host-visible rendering or include it in the first progress/update message.
|
|
33
|
-
3. Preserve the invariants.
|
|
34
|
-
4. Treat suggested skills as advisory: choose, combine, reorder, or omit them as useful. If suggestions are non-empty and you use none, state one brief skip reason with the visible checkpoint/progress update.
|
|
35
|
-
|
|
36
|
-
## Tier Guidance
|
|
37
|
-
|
|
38
|
-
- **Tier 1:** Prefer direct execution.
|
|
39
|
-
- **Tier 2:** TODO tracking, TDD, and verification are common suggestions.
|
|
40
|
-
- **Tier 3:** Fable/multi-agent skills are optional when macro planning or delegation helps.
|
|
41
|
-
|
|
42
|
-
**Rule:** enforce checkpoint visibility and workflow invariants, not workflow order; let the agent orchestrate itself inside those rails.
|
|
35
|
+
**Rule:** mandatory evaluation, advisory execution; no fixed workflow order.
|
|
43
36
|
|
|
44
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
|
|
|
@@ -75,13 +76,24 @@ npx github:dyphn1/Harness-everything next "<brief prompt summary>"
|
|
|
75
76
|
- the recommended tier and rationale,
|
|
76
77
|
- a compact **Harness Routing Checkpoint**,
|
|
77
78
|
- the **required Harness invariants**,
|
|
78
|
-
-
|
|
79
|
-
- 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.
|
|
80
81
|
|
|
81
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.
|
|
82
83
|
|
|
83
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.
|
|
84
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
|
+
|
|
85
97
|
## 3. Tier Guidance
|
|
86
98
|
|
|
87
99
|
### Tier 1 — Trivial
|
|
@@ -95,7 +107,8 @@ Typical shape:
|
|
|
95
107
|
Default behavior:
|
|
96
108
|
- prefer direct execution,
|
|
97
109
|
- avoid large plans and unnecessary delegation,
|
|
98
|
-
-
|
|
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,
|
|
99
112
|
- still verify any completion claim with evidence appropriate to the change.
|
|
100
113
|
|
|
101
114
|
### Tier 2 — Standard
|
|
@@ -117,7 +130,7 @@ Common **suggestions**, not a pipeline:
|
|
|
117
130
|
| Isolated workspace would reduce risk | `using-git-worktrees` |
|
|
118
131
|
| Quantitative scoring/benchmarking is requested | `eval-harness` |
|
|
119
132
|
|
|
120
|
-
|
|
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.
|
|
121
134
|
|
|
122
135
|
### Tier 3 — Macro
|
|
123
136
|
|
|
@@ -138,7 +151,7 @@ Common **suggestions**, not a pipeline:
|
|
|
138
151
|
| Settled intent needs a spec | `to-spec` |
|
|
139
152
|
| Settled work needs tracer-bullet issues | `to-tickets` |
|
|
140
153
|
|
|
141
|
-
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.
|
|
142
155
|
|
|
143
156
|
## 4. Cognitive OS Relationship
|
|
144
157
|
|
|
@@ -161,11 +174,11 @@ But this diagram describes a reasoning policy, not a peer-skill dependency graph
|
|
|
161
174
|
|
|
162
175
|
| Host mode | Expected behavior |
|
|
163
176
|
|---|---|
|
|
164
|
-
| Lifecycle hook available | Run the Harness Kernel on prompt submission so routing context exists before domain-skill execution. Surface the emitted checkpoint through a host-visible hook surface when supported; otherwise the agent carries it into the first visible progress/update. Hard gates may enforce supported invariants at tool/stop boundaries. |
|
|
165
|
-
| Advisory instructions only | Tell the agent to run/reuse `harness next` before software mutation, surface the checkpoint, and run `harness verify` before completion. The behavior is
|
|
166
|
-
| Manual use | Invoke `harness-everything` or `install-cognitive-os` explicitly to inspect/re-establish and surface 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. |
|
|
167
180
|
|
|
168
|
-
Never describe an advisory integration as hard enforcement. Platform-specific adapters may differ while preserving functional intent. Kernel emission alone is not proof that a host UI displayed the checkpoint; #82 live evidence owns
|
|
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.
|
|
169
182
|
|
|
170
183
|
## 6. Routing Checkpoint
|
|
171
184
|
|
|
@@ -175,16 +188,17 @@ For software/project work, the kernel always emits a compact checkpoint and the
|
|
|
175
188
|
## 🚦 Harness Routing Checkpoint
|
|
176
189
|
- Tier: Tier X — <reason>
|
|
177
190
|
- Strategy: <selected/deferred strategy>
|
|
178
|
-
- Required invariants: route-before-execution; verify-before-claim; re-plan-after-3-same-failures
|
|
191
|
+
- Required invariants: route-before-execution; verify-before-claim; re-plan-after-3-same-failures; evaluate-suggestions-before-skip (when suggestions exist)
|
|
179
192
|
- Suggested skills: <deduplicated suggestions, or none>
|
|
180
|
-
- Suggestion
|
|
193
|
+
- Suggestion evaluation: <required before skip | no suggestions>
|
|
194
|
+
- Suggestion disposition: <using one or more | skipped all after evaluation — brief reason | unresolved/unavailable>
|
|
181
195
|
```
|
|
182
196
|
|
|
183
|
-
The checkpoint reports state; it does not prescribe a universal workflow. Suggested skills
|
|
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.
|
|
184
198
|
|
|
185
199
|
## 7. Self-Healing and Dynamic Skills
|
|
186
200
|
|
|
187
|
-
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.
|
|
188
202
|
|
|
189
203
|
If bootstrap reports missing integration touchpoints, use the existing self-heal command:
|
|
190
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.',
|
|
@@ -122,6 +123,14 @@ function uniqueSuggestedSkills(plan) {
|
|
|
122
123
|
return [...new Set(plan.suggestedSkills.filter(skill => typeof skill === 'string' && skill.trim()))];
|
|
123
124
|
}
|
|
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
|
+
|
|
125
134
|
function displayTier(tier) {
|
|
126
135
|
if (tier === 'tier1') return 'Tier 1';
|
|
127
136
|
if (tier === 'tier2') return 'Tier 2';
|
|
@@ -139,7 +148,9 @@ function printRoutingCheckpoint(plan) {
|
|
|
139
148
|
console.log(` - Required invariants: ${invariants.length ? invariants.join(', ') : 'none'}`);
|
|
140
149
|
console.log(` - Suggested skills: ${suggestions.length ? suggestions.join(', ') : 'none'}`);
|
|
141
150
|
if (suggestions.length > 0) {
|
|
142
|
-
console.log(' - Suggestion
|
|
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.');
|
|
143
154
|
}
|
|
144
155
|
}
|
|
145
156
|
|
|
@@ -149,7 +160,7 @@ function printKernelContract(plan) {
|
|
|
149
160
|
console.log(` - ${invariant}: ${INVARIANT_TEXT[invariant] || 'Required by the selected workflow plan.'}`);
|
|
150
161
|
}
|
|
151
162
|
|
|
152
|
-
console.log('\n=> SUGGESTED SKILLS (
|
|
163
|
+
console.log('\n=> SUGGESTED SKILLS (MANDATORY EVALUATION — ADVISORY EXECUTION):');
|
|
153
164
|
if (Array.isArray(plan.suggestedSkills) && plan.suggestedSkills.length > 0) {
|
|
154
165
|
const emitted = new Set();
|
|
155
166
|
for (const skill of plan.suggestedSkills) {
|
|
@@ -159,11 +170,12 @@ function printKernelContract(plan) {
|
|
|
159
170
|
emitted.add(skill);
|
|
160
171
|
if (skill === 'fable-mode') emitted.add('fable-discipline');
|
|
161
172
|
}
|
|
173
|
+
console.log(' - Read-before-skip: evaluate every suggested skill entry before omission; adopting one suggestion does not waive evaluation of the others.');
|
|
162
174
|
if (plan.strategy && plan.strategy.startsWith('fable-')) {
|
|
163
|
-
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.');
|
|
164
176
|
}
|
|
165
177
|
} else if (plan.strategy === 'direct-single') {
|
|
166
|
-
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.');
|
|
167
179
|
} else if (plan.strategySelection === 'deferred') {
|
|
168
180
|
console.log(' - Strategy is deferred/unclassified. Do not infer triviality; choose the smallest justified approach from task evidence.');
|
|
169
181
|
} else {
|
|
@@ -186,7 +198,7 @@ function printKernelContract(plan) {
|
|
|
186
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.');
|
|
187
199
|
}
|
|
188
200
|
|
|
189
|
-
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.');
|
|
190
202
|
}
|
|
191
203
|
|
|
192
204
|
function run(prompt, stdinPayload) {
|
|
@@ -213,6 +225,7 @@ function run(prompt, stdinPayload) {
|
|
|
213
225
|
|
|
214
226
|
const contract = readStructuredContract(contractPath);
|
|
215
227
|
applyEnsemblePolicy(contract, resolvePrompt(prompt, stdinPayload));
|
|
228
|
+
enforceSuggestionEvaluation(contract.workflowPlan);
|
|
216
229
|
try {
|
|
217
230
|
fs.rmSync(contractPath, { force: true });
|
|
218
231
|
} catch (err) {
|
|
@@ -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');
|