openhermes 4.11.2 → 4.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTEXT.md +6 -6
- package/ETHOS.md +2 -2
- package/README.md +8 -8
- package/bootstrap.ts +131 -198
- package/harness/codex/AUTOPILOT.md +39 -27
- package/harness/codex/CHARTER.md +1 -1
- package/harness/lib/background/background.test.ts +24 -5
- package/harness/lib/background/manager.ts +9 -9
- package/harness/lib/composer/compose.test.ts +29 -18
- package/harness/lib/composer/fragments/02-delegation.md +5 -4
- package/harness/lib/composer/fragments/04-task-flow.md +43 -3
- package/harness/lib/composer/fragments/09-guardrails.md +25 -12
- package/harness/lib/guards/guard-config.ts +72 -0
- package/harness/lib/hooks/builtins/confidence-gate-hook.ts +9 -11
- package/harness/lib/hooks/builtins/delegation-depth-hook.ts +24 -5
- package/harness/lib/hooks/builtins/dynamic-route-hook.ts +99 -0
- package/harness/lib/hooks/builtins/error-recovery-hook.ts +7 -7
- package/harness/lib/hooks/builtins/memory-sync-hook.ts +2 -2
- package/harness/lib/hooks/builtins/next-route-hook.ts +24 -0
- package/harness/lib/hooks/builtins/plan-check-hook.ts +5 -5
- package/harness/lib/hooks/builtins/route-tracking-hook.ts +80 -26
- package/harness/lib/hooks/builtins/subagent-failure-hook.ts +93 -0
- package/harness/lib/hooks/hooks.test.ts +145 -69
- package/harness/lib/hooks/index.ts +12 -0
- package/harness/lib/hooks/registry.ts +3 -3
- package/harness/lib/hooks/types.ts +50 -2
- package/harness/lib/memory/memory-manager.ts +2 -2
- package/harness/lib/memory/memory.test.ts +0 -6
- package/harness/lib/memory/plan-store.ts +1 -21
- package/harness/lib/plans/plan-location.ts +134 -0
- package/harness/lib/routing/index.ts +21 -0
- package/harness/lib/routing/route-guidance.ts +147 -0
- package/harness/lib/routing/route-resolver.ts +58 -0
- package/harness/lib/routing/routing.test.ts +195 -0
- package/harness/lib/routing/skill-frontmatter.ts +125 -0
- package/harness/lib/routing/types.ts +52 -0
- package/harness/lib/sanity/checker.ts +45 -34
- package/harness/lib/sync/file-watcher.ts +26 -25
- package/harness/lib/sync/plan-sync.ts +22 -25
- package/harness/lib/sync/sync.test.ts +30 -4
- package/harness/skills/oh-fusion/DEEP.md +109 -86
- package/harness/skills/oh-fusion/SKILL.md +47 -33
- package/harness/skills/oh-manifest/SKILL.md +1 -0
- package/harness/skills/oh-review/DEEP.md +5 -3
- package/harness/skills/oh-review/SKILL.md +1 -0
- package/package.json +53 -55
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# oh-fusion — Deep Reference
|
|
2
2
|
|
|
3
|
-
## When to Use
|
|
4
|
-
|
|
5
|
-
Use when a user wants to bring an external skill or capability into the OpenHermes harness as an OH-native skill.
|
|
6
|
-
|
|
7
|
-
## Phase 1: Discovery
|
|
3
|
+
## When to Use
|
|
4
|
+
|
|
5
|
+
Use when a user wants to bring an external skill or capability into the OpenHermes harness as an OH-native skill.
|
|
6
|
+
|
|
7
|
+
## Phase 1: Discovery
|
|
8
8
|
|
|
9
9
|
| Source | Access |
|
|
10
10
|
|--------|--------|
|
|
@@ -14,48 +14,63 @@ Use when a user wants to bring an external skill or capability into the OpenHerm
|
|
|
14
14
|
| User path | Resolve and read |
|
|
15
15
|
| Inline text | Capture raw |
|
|
16
16
|
|
|
17
|
-
Confirm: content loaded, frontmatter present, no access restrictions. For multiple: all loaded.
|
|
18
|
-
|
|
19
|
-
## Phase 2: Analysis
|
|
20
|
-
|
|
21
|
-
###
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
17
|
+
Confirm: content loaded, frontmatter present, no access restrictions. For multiple: all loaded.
|
|
18
|
+
|
|
19
|
+
## Phase 2: Analysis
|
|
20
|
+
|
|
21
|
+
### Required Lenses
|
|
22
|
+
|
|
23
|
+
Analyze every source through these lenses:
|
|
24
|
+
|
|
25
|
+
- **OH gaps** — what OH does not currently cover, or covers weakly
|
|
26
|
+
- **OH wins** — where OH already outperforms the source and should not regress
|
|
27
|
+
- **Missed patterns** — reusable patterns the source surfaces that OH should absorb
|
|
28
|
+
- **Overlap target** — the strongest existing `oh-*` candidate for merge, if any
|
|
29
|
+
|
|
30
|
+
### Merge Rubric
|
|
31
|
+
|
|
32
|
+
Choose one verdict:
|
|
33
|
+
|
|
34
|
+
| Verdict | Use when |
|
|
35
|
+
|---------|----------|
|
|
36
|
+
| Merge | The source upgrades an existing OH capability more than it defines a new one |
|
|
37
|
+
| Standalone | The source adds a distinct capability with its own trigger, workflow, and routing needs |
|
|
38
|
+
| Discard | The source is redundant, weak, or anti-native |
|
|
39
|
+
|
|
40
|
+
### Strength Check
|
|
41
|
+
|
|
42
|
+
Reject or rewrite any protocol that makes OH weaker, slower, noisier, or less OpenCode-native.
|
|
43
|
+
|
|
44
|
+
### Fusion Report Template
|
|
45
|
+
```markdown
|
|
46
|
+
## OH gaps
|
|
47
|
+
- ...
|
|
48
|
+
|
|
49
|
+
## OH wins
|
|
50
|
+
- ...
|
|
51
|
+
|
|
52
|
+
## Missed patterns
|
|
53
|
+
- ...
|
|
54
|
+
|
|
55
|
+
## Merge verdict
|
|
56
|
+
- Verdict: <merge | standalone | discard>
|
|
57
|
+
- Target: <existing oh-* or new oh-*>
|
|
58
|
+
- Why: <short rationale>
|
|
59
|
+
|
|
60
|
+
## Action plan
|
|
61
|
+
1. ...
|
|
62
|
+
2. ...
|
|
63
|
+
|
|
64
|
+
## Approval gate
|
|
65
|
+
- Status: pending approval
|
|
66
|
+
- Next move after approval: <skill/action>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Phase 3: Decision
|
|
70
|
+
|
|
71
|
+
Default to `merge` when the source sharpens an existing OH workflow. Default to `standalone` only when the capability stays clean, distinct, and reusable after removing overlap.
|
|
72
|
+
|
|
73
|
+
## Phase 4: Adaptation
|
|
59
74
|
|
|
60
75
|
### Frontmatter
|
|
61
76
|
```yaml
|
|
@@ -64,29 +79,34 @@ description: "Adapted from <source>. Core function. Use when ..."
|
|
|
64
79
|
tier: <2|3|4>
|
|
65
80
|
```
|
|
66
81
|
|
|
67
|
-
### Body Structure
|
|
68
|
-
1. **Summary** — one
|
|
69
|
-
2. **When to Use** — clear triggering context
|
|
70
|
-
3. **
|
|
71
|
-
4. **
|
|
72
|
-
5. **Routing** — pass/fail/blocker table
|
|
73
|
-
|
|
74
|
-
### Adaptation Rules
|
|
75
|
-
- Remove emojis. Replace ecosystem terms with OH equivalents.
|
|
76
|
-
- Convert relative paths to OH harness conventions.
|
|
77
|
-
- Add routing table based on the skill's purpose.
|
|
78
|
-
- Keep all concrete rules, examples, and anti-patterns from the original.
|
|
79
|
-
- Discard fluff, philosophy, and motivational language.
|
|
80
|
-
- Preserve the original's unique signal — that's why you're importing it.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
### Body Structure
|
|
83
|
+
1. **Summary** — one short paragraph
|
|
84
|
+
2. **When to Use** — clear triggering context
|
|
85
|
+
3. **Protocol** — numbered workflow
|
|
86
|
+
4. **Rubric / guardrails** — what to merge, reject, or escalate
|
|
87
|
+
5. **Routing** — pass/fail/blocker table
|
|
88
|
+
|
|
89
|
+
### Adaptation Rules
|
|
90
|
+
- Remove emojis. Replace ecosystem terms with OH equivalents.
|
|
91
|
+
- Convert relative paths to OH harness conventions.
|
|
92
|
+
- Add routing table based on the skill's purpose.
|
|
93
|
+
- Keep all concrete rules, examples, and anti-patterns from the original.
|
|
94
|
+
- Discard fluff, philosophy, and motivational language.
|
|
95
|
+
- Preserve the original's unique signal — that's why you're importing it.
|
|
96
|
+
- Keep the result OpenCode/OpenHermes-native only.
|
|
97
|
+
|
|
98
|
+
### Naming
|
|
99
|
+
Match `^[a-z0-9]+(-[a-z0-9]+)*$`, prefix `oh-`. Original name if good fit, adapt if not. Fusion names signal combined purpose.
|
|
100
|
+
|
|
101
|
+
## Phase 5: Approval Gate
|
|
102
|
+
|
|
103
|
+
Before any harness mutation, surface the fusion report and wait for approval. Approved intent already present in the conversation counts. Do not ask new questions unless a blocker cannot be resolved from the codebase or prior conversation.
|
|
104
|
+
|
|
105
|
+
## Phase 6: Fusion (opt — skip for single imports)
|
|
106
|
+
|
|
107
|
+
For each skill being fused, identify:
|
|
108
|
+
- **Unique concepts** — content only this skill has
|
|
109
|
+
- **Overlapping content** — same idea expressed differently (keep the better version)
|
|
90
110
|
- **Conflicting directives** — skills that say opposite things (surface to user)
|
|
91
111
|
|
|
92
112
|
### Merge Architecture
|
|
@@ -98,23 +118,26 @@ Structure so each source contributes its strength. Do NOT concatenate — must r
|
|
|
98
118
|
### Phase B: <from skill 2>
|
|
99
119
|
```
|
|
100
120
|
|
|
101
|
-
### Naming
|
|
102
|
-
Name signals combined purpose, not individual sources. E.g., `oh-facade` from redesign + design-taste + high-end-visual, not `oh-redesign-plus-taste`.
|
|
103
|
-
|
|
104
|
-
## Phase
|
|
105
|
-
|
|
106
|
-
1. **Create file** → user dir (`~/.config/opencode/skills/oh-<name>/SKILL.md`)
|
|
107
|
-
2. **Wire AUTOPILOT** → add to auto-classify matrix in `harness/codex/AUTOPILOT.md`: signal keywords → classification → "Load **oh-<name>**. Do not ask."
|
|
108
|
-
3. **Wire routing** → add `route:` frontmatter in the skill. Dynamic loading reads `route.pass`, `route.fail`, `route.blocker` directly from `SKILL.md` — no ROUTING.md edit needed. Skill becomes routable automatically.
|
|
121
|
+
### Naming
|
|
122
|
+
Name signals combined purpose, not individual sources. E.g., `oh-facade` from redesign + design-taste + high-end-visual, not `oh-redesign-plus-taste`.
|
|
123
|
+
|
|
124
|
+
## Phase 7: Integration
|
|
125
|
+
|
|
126
|
+
1. **Create file** → user dir (`~/.config/opencode/skills/oh-<name>/SKILL.md`)
|
|
127
|
+
2. **Wire AUTOPILOT** → add to auto-classify matrix in `harness/codex/AUTOPILOT.md`: signal keywords → classification → "Load **oh-<name>**. Do not ask."
|
|
128
|
+
3. **Wire routing** → add `route:` frontmatter in the skill. Dynamic loading reads `route.pass`, `route.fail`, `route.blocker` directly from `SKILL.md` — no ROUTING.md edit needed. Skill becomes routable automatically.
|
|
109
129
|
4. **Wire AGENTS.md** → add to skills table with tier and purpose. Increment total count.
|
|
110
130
|
5. **Wire openhermes.md** → add to orchestrator's skill list in `harness/agents/openhermes.md`.
|
|
111
131
|
6. **Verify** → route to `oh-skills-link` to confirm OpenCode discovers it.
|
|
112
132
|
|
|
113
|
-
## Anti-patterns
|
|
114
|
-
|
|
115
|
-
- Importing without analysis (always run Phase 2)
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
133
|
+
## Anti-patterns
|
|
134
|
+
|
|
135
|
+
- Importing without analysis (always run Phase 2)
|
|
136
|
+
- Asking before checking code or prior conversation
|
|
137
|
+
- Changing the harness before the approval gate clears
|
|
138
|
+
- Keeping everything — most external skill text is fluff
|
|
139
|
+
- Fusing incompatible domains (confusing to model and user)
|
|
140
|
+
- Naming after source ("oh-tailwind-v2") instead of capability ("oh-styles")
|
|
141
|
+
- Skipping route frontmatter — without it, autopilot can't route
|
|
142
|
+
- Overwriting existing routing without checking for collisions
|
|
143
|
+
- Shipping a protocol that weakens OH or makes it less native
|
|
@@ -1,36 +1,50 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oh-fusion
|
|
3
|
-
description: "Use when the user has an existing skill, finds a skill in their .agents/skills, or wants to bring an external capability into OH as a skill."
|
|
4
|
-
tier: 3
|
|
5
|
-
route:
|
|
6
|
-
pass:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
3
|
+
description: "Use when the user has an existing skill, finds a skill in their .agents/skills, or wants to bring an external capability into OH as a skill."
|
|
4
|
+
tier: 3
|
|
5
|
+
route:
|
|
6
|
+
pass: [oh-skill-craft, oh-skills-link]
|
|
7
|
+
fail: surface
|
|
8
|
+
blocker: surface
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# oh-fusion
|
|
12
|
+
|
|
13
|
+
Skill fusion pipeline: Discover → Analyze → Verdict → Approval Gate → Integrate.
|
|
14
|
+
|
|
15
|
+
## Protocol
|
|
16
|
+
|
|
17
|
+
1. Load skill content — read from `.agents/skills/`, `npx skills`, URL, user path, or inline text.
|
|
18
|
+
2. Analyze the source against OH — report `OH gaps`, `OH wins`, and `missed patterns`.
|
|
19
|
+
3. Compare overlap — identify the best existing `oh-*` target, if any.
|
|
20
|
+
4. Decide with a rubric:
|
|
21
|
+
- **Merge** when the source mainly strengthens an existing OH capability.
|
|
22
|
+
- **Standalone** when the source adds a distinct, reusable capability.
|
|
23
|
+
- **Discard** when the signal is weak or redundant.
|
|
24
|
+
5. Produce a fusion report with these sections, in order:
|
|
25
|
+
- `OH gaps`
|
|
26
|
+
- `OH wins`
|
|
27
|
+
- `missed patterns`
|
|
28
|
+
- `merge verdict`
|
|
29
|
+
- `action plan`
|
|
30
|
+
- `approval gate`
|
|
31
|
+
6. Resolve from code and prior conversation first. Ask only if a blocker remains.
|
|
32
|
+
7. After approval, adapt to OH-native form and route directly to implementation.
|
|
33
|
+
8. Verify discovery with `oh-skills-link` when a new or renamed skill is added.
|
|
34
|
+
|
|
35
|
+
## Merge Rubric
|
|
36
|
+
|
|
37
|
+
- **Merge into existing `oh-*`** when domain, trigger, and route already exist; the source mostly adds sharper rules, better sequencing, or stronger edge-case handling.
|
|
38
|
+
- **Create standalone `oh-*`** when the source introduces a capability with distinct trigger words, workflow, and handoff points.
|
|
39
|
+
- **Discard** when the source adds fluff, duplicates OH, or weakens OpenCode/OpenHermes-native operation.
|
|
40
|
+
|
|
41
|
+
## Routing
|
|
42
|
+
|
|
43
|
+
| Outcome | Route |
|
|
44
|
+
|---------|-------|
|
|
45
|
+
| Approved merge or standalone plan | → oh-skill-craft |
|
|
46
|
+
| New or renamed skill needs discovery check | → oh-skills-link |
|
|
47
|
+
| Analysis: discard | → surface |
|
|
48
|
+
| Approval not yet granted | → surface |
|
|
36
49
|
| Blocker | → surface |
|
|
50
|
+
|
|
@@ -20,12 +20,14 @@ AGENTS.md, CLAUDE.md, CONTRIBUTING.md, CONTEXT.md, ADRs, eslint/biome/prettier c
|
|
|
20
20
|
- **Standards** — Read standards + diff. Per-file/hunk: violations citing standard + rule. Distinguish hard violations from judgment calls. Skip tool-enforced.
|
|
21
21
|
- **Spec** — Read spec + diff. Report: missing/partial requirements, scope creep, wrong implementations. Quote spec line.
|
|
22
22
|
|
|
23
|
-
### 5. Aggregate
|
|
24
|
-
Present under `## Standards` / `## Spec`. Do not merge. End with total + worst issue.
|
|
23
|
+
### 5. Aggregate
|
|
24
|
+
Present under `## Standards` / `## Spec`. Do not merge. End with total + worst issue.
|
|
25
|
+
|
|
26
|
+
Concrete, low-risk, fixable findings should be converted into implementation work and dispatched to oh-builder immediately instead of stopping as report-only notes.
|
|
25
27
|
|
|
26
28
|
### Safety Check (inline before spawning)
|
|
27
29
|
- SQL injection, LLM trust boundary violations, conditional side effects (test vs prod), hardcoded secrets
|
|
28
|
-
- Block immediately if critical — do not spawn sub-agents.
|
|
30
|
+
- Block immediately if critical — do not spawn sub-agents.
|
|
29
31
|
|
|
30
32
|
## Mode B: Architecture Deepening
|
|
31
33
|
|
package/package.json
CHANGED
|
@@ -1,57 +1,55 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"@types/node": "^25.8.0"
|
|
56
|
-
}
|
|
2
|
+
"name": "openhermes",
|
|
3
|
+
"version": "4.12.1",
|
|
4
|
+
"description": "Autonomous agent orchestration for OpenCode.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"engines": {
|
|
8
|
+
"bun": "\u003e=1.0"
|
|
9
|
+
},
|
|
10
|
+
"main": "./index.ts",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@opencode-ai/plugin": "1.15.0"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": "./index.ts",
|
|
16
|
+
"./bootstrap": "./bootstrap.ts"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.ts",
|
|
20
|
+
"bootstrap.ts",
|
|
21
|
+
"tsconfig.json",
|
|
22
|
+
"ETHOS.md",
|
|
23
|
+
"CONTEXT.md",
|
|
24
|
+
"lib/",
|
|
25
|
+
"harness/codex/",
|
|
26
|
+
"harness/instructions/",
|
|
27
|
+
"harness/skills/",
|
|
28
|
+
"harness/agents/",
|
|
29
|
+
"harness/lib/"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"test": "bun test"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"opencode",
|
|
36
|
+
"openhermes",
|
|
37
|
+
"orchestrator",
|
|
38
|
+
"skills",
|
|
39
|
+
"commands",
|
|
40
|
+
"agents",
|
|
41
|
+
"rules"
|
|
42
|
+
],
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/nathwn12/openhermes.git"
|
|
46
|
+
},
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/nathwn12/openhermes/issues"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/nathwn12/openhermes#readme",
|
|
51
|
+
"author": "nathwn12",
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@types/node": "^25.8.0"
|
|
54
|
+
}
|
|
57
55
|
}
|