openhermes 4.1.0 → 4.3.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/ETHOS.md +6 -3
- package/LICENSE +21 -21
- package/README.md +109 -79
- package/bootstrap.ts +214 -8
- package/harness/agents/openhermes.md +45 -55
- package/harness/codex/AUTOPILOT.md +126 -0
- package/harness/codex/CONSTITUTION.md +14 -11
- package/harness/codex/ROUTING.md +35 -70
- package/harness/commands/oh-log.md +18 -0
- package/harness/instructions/RUNTIME.md +27 -52
- package/harness/skills/oh-builder/SKILL.md +13 -8
- package/harness/skills/oh-caveman/SKILL.md +9 -0
- package/harness/skills/oh-expert/SKILL.md +6 -0
- package/harness/skills/oh-facade/SKILL.md +298 -0
- package/harness/skills/oh-freeze/SKILL.md +9 -0
- package/harness/skills/oh-full-output/SKILL.md +81 -0
- package/harness/skills/oh-fusion/SKILL.md +314 -0
- package/harness/skills/oh-gauntlet/SKILL.md +9 -5
- package/harness/skills/oh-grill/SKILL.md +9 -5
- package/harness/skills/oh-guard/SKILL.md +9 -0
- package/harness/skills/oh-handoff/SKILL.md +9 -0
- package/harness/skills/oh-health/SKILL.md +8 -4
- package/harness/skills/oh-init/SKILL.md +28 -94
- package/harness/skills/oh-investigate/SKILL.md +10 -0
- package/harness/skills/oh-issue/SKILL.md +9 -0
- package/harness/skills/oh-learn/SKILL.md +13 -4
- package/harness/skills/oh-manifest/SKILL.md +15 -10
- package/harness/skills/oh-plan-review/SKILL.md +15 -8
- package/harness/skills/oh-planner/SKILL.md +18 -8
- package/harness/skills/oh-prd/SKILL.md +9 -0
- package/harness/skills/oh-refactor/SKILL.md +426 -0
- package/harness/skills/oh-retro/SKILL.md +9 -0
- package/harness/skills/oh-review/SKILL.md +11 -4
- package/harness/skills/oh-security/SKILL.md +4 -0
- package/harness/skills/oh-ship/SKILL.md +10 -0
- package/harness/skills/oh-skill-craft/SKILL.md +88 -0
- package/harness/skills/oh-skills-link/SKILL.md +9 -0
- package/harness/skills/oh-skills-list/SKILL.md +9 -0
- package/harness/skills/oh-triage/SKILL.md +11 -0
- package/lib/harness-resolver.ts +2 -2
- package/lib/logger.ts +7 -1
- package/package.json +6 -3
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oh-fusion
|
|
3
|
+
description: "Skill ingestion pipeline: discover, analyze, filter, adapt, fuse, and integrate external skills into the OH harness. Use when the user has an existing skill, finds a skill in their .agents/skills, or wants to bring an external capability into OH."
|
|
4
|
+
tier: 3
|
|
5
|
+
benefits-from: [oh-skill-craft, oh-skills-link, oh-expert]
|
|
6
|
+
triggers:
|
|
7
|
+
- "import skill"
|
|
8
|
+
- "ingest skill"
|
|
9
|
+
- "fuse skill"
|
|
10
|
+
- "merge skills"
|
|
11
|
+
- "port skill"
|
|
12
|
+
- "add skill from"
|
|
13
|
+
- "make this OH-native"
|
|
14
|
+
- "skill fusion"
|
|
15
|
+
- "oh-fusion"
|
|
16
|
+
- "integrate skill"
|
|
17
|
+
- "convert skill"
|
|
18
|
+
- "bring in a skill"
|
|
19
|
+
- "transfer skill"
|
|
20
|
+
- "copy skill"
|
|
21
|
+
- "adopt skill"
|
|
22
|
+
route:
|
|
23
|
+
pass:
|
|
24
|
+
- oh-skills-link
|
|
25
|
+
- oh-skill-craft
|
|
26
|
+
fail: oh-skill-craft
|
|
27
|
+
blocker: surface
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# oh-fusion
|
|
31
|
+
|
|
32
|
+
The skill ingestion pipeline: discover external skills, evaluate signal quality, filter out noise, adapt to OH conventions, fuse multiple into one, and integrate into the harness.
|
|
33
|
+
|
|
34
|
+
Every skill you run through `oh-fusion` becomes part of the closed loop — wired into AUTOPILOT, ROUTING.md, AGENTS.md, and the self-driving engine.
|
|
35
|
+
|
|
36
|
+
## When to Use
|
|
37
|
+
|
|
38
|
+
- The user points at a skill in `.agents/skills` and says "make this OH-native"
|
|
39
|
+
- The user has a skill from `npx skills` ecosystem they want integrated
|
|
40
|
+
- The user provides raw skill content and asks "is this worth keeping?"
|
|
41
|
+
- Multiple skills need fusing into one (like the `oh-facade` fusion in this session)
|
|
42
|
+
- Any external capability needs to become an `oh-*` skill with full wiring
|
|
43
|
+
|
|
44
|
+
## Pipeline
|
|
45
|
+
|
|
46
|
+
6-phase closed loop:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Discovery → Analysis → Decision → Adaptation → Fusion (opt) → Integration
|
|
50
|
+
↓
|
|
51
|
+
oh-skills-link (verify)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Phase 1: Discovery
|
|
57
|
+
|
|
58
|
+
Input: user's skill source
|
|
59
|
+
Output: raw skill content loaded for analysis
|
|
60
|
+
|
|
61
|
+
### Sources
|
|
62
|
+
|
|
63
|
+
| Source | How to access |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `.agents/skills/<name>/SKILL.md` | Read the file directly |
|
|
66
|
+
| `npx skills` package | Run `npx skills find <query>` or check `skills.sh` |
|
|
67
|
+
| URL to a skill | Fetch the content via web fetch |
|
|
68
|
+
| User-provided path | Resolve and read |
|
|
69
|
+
| User-provided content inline | Capture the raw text |
|
|
70
|
+
| Multiple skills (for fusion) | Load all, enter Phase 2 on each |
|
|
71
|
+
|
|
72
|
+
### Discovery Checklist
|
|
73
|
+
|
|
74
|
+
Before proceeding, confirm:
|
|
75
|
+
- [ ] Skill content is loaded and readable
|
|
76
|
+
- [ ] Frontmatter is present (name, description)
|
|
77
|
+
- [ ] There are no access restrictions or permissions needed
|
|
78
|
+
- [ ] For multiple skills: all are loaded and ready for comparison
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Phase 2: Analysis
|
|
83
|
+
|
|
84
|
+
Input: raw skill content
|
|
85
|
+
Output: structured analysis report with signal score
|
|
86
|
+
|
|
87
|
+
### 2a. Depth Scoring
|
|
88
|
+
|
|
89
|
+
Measure the skill's substantive content:
|
|
90
|
+
|
|
91
|
+
| Metric | How to assess |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Total lines | SKILL.md length |
|
|
94
|
+
| Concrete rules count | Number of "must", "never", "always", "banned" directives |
|
|
95
|
+
| Example count | Number of code blocks showing before/after or usage |
|
|
96
|
+
| Anti-patterns listed | Explicit "don't do this" sections |
|
|
97
|
+
| Workflow steps | Number of sequential, actionable steps |
|
|
98
|
+
| Routing table | Does it define pass/fail/blocker routing? |
|
|
99
|
+
|
|
100
|
+
**Scoring:**
|
|
101
|
+
- **High signal** (70-100): Multiple concrete rules, examples, anti-patterns, workflow steps, routing
|
|
102
|
+
- **Medium signal** (30-69): Some structure but thin on specifics, few examples
|
|
103
|
+
- **Low signal** (0-29): Vague descriptions, no concrete rules, no anti-patterns, "be creative" level
|
|
104
|
+
|
|
105
|
+
### 2b. Overlap Detection
|
|
106
|
+
|
|
107
|
+
Compare against all existing OH skills (`harness/skills/oh-*/SKILL.md`):
|
|
108
|
+
|
|
109
|
+
- Does any existing OH skill cover the same domain?
|
|
110
|
+
- Is the overlap partial (complementary) or complete (redundant)?
|
|
111
|
+
- Does the external skill have unique content OH lacks?
|
|
112
|
+
|
|
113
|
+
### 2c. Convention Check
|
|
114
|
+
|
|
115
|
+
Does the skill follow good practices?
|
|
116
|
+
|
|
117
|
+
- [ ] Has clear description for triggering
|
|
118
|
+
- [ ] Has concrete, actionable instructions (not just philosophy)
|
|
119
|
+
- [ ] Has anti-patterns or failure modes documented
|
|
120
|
+
- [ ] Has examples or code blocks
|
|
121
|
+
- [ ] Has measurable outcomes (not subjective "make it good")
|
|
122
|
+
- [ ] Avoids time-sensitive references (dates, version numbers)
|
|
123
|
+
- [ ] Avoids platform-specific assumptions that don't apply
|
|
124
|
+
|
|
125
|
+
### 2d. Report
|
|
126
|
+
|
|
127
|
+
Output a structured report:
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
## Analysis: <skill-name>
|
|
131
|
+
|
|
132
|
+
**Source:** <path or origin>
|
|
133
|
+
**Depth score:** <0-100> — <High/Medium/Low>
|
|
134
|
+
**Total lines:** <N> | Concrete rules: <N> | Examples: <N> | Anti-patterns: <N>
|
|
135
|
+
**Overlap:** <existing OH skill> — <none/partial/complete>
|
|
136
|
+
**Verdict:** <keep / fuse / discard / ask>
|
|
137
|
+
|
|
138
|
+
**Strengths:**
|
|
139
|
+
- <what this skill does well>
|
|
140
|
+
|
|
141
|
+
**Weaknesses:**
|
|
142
|
+
- <what is missing or weak>
|
|
143
|
+
|
|
144
|
+
**Recommended action:** <port directly / fuse with X > / discard>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Phase 3: Decision
|
|
150
|
+
|
|
151
|
+
Based on the analysis, decide what to do:
|
|
152
|
+
|
|
153
|
+
| Verdict | Action |
|
|
154
|
+
|---|---|
|
|
155
|
+
| **Keep** | High signal, no overlap, OH conventions missing. Port directly to `oh-<name>`. |
|
|
156
|
+
| **Fuse** | Medium-high signal, partial overlap with existing OH skill(s). Merge complementary DNA. |
|
|
157
|
+
| **Discard** | Low signal, complete overlap, too niche, or no actionable content. Surface reasoning. |
|
|
158
|
+
| **Ask** | Ambiguous quality, unclear domain fit, or user needs to choose between approaches. Surface findings. |
|
|
159
|
+
|
|
160
|
+
**Decision principles:**
|
|
161
|
+
- When in doubt between keep and fuse, prefer fuse — conserves routing slots and reduces surface area
|
|
162
|
+
- When in doubt between keep and discard, prefer keep if there is ANY unique signal — the autopilot won't load it unless triggered
|
|
163
|
+
- Never fuse incompatible domains (e.g., UI design into a security skill) — the result is confusing
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Phase 4: Adaptation
|
|
168
|
+
|
|
169
|
+
Input: raw skill content to keep/fuse
|
|
170
|
+
Output: OH-native SKILL.md
|
|
171
|
+
|
|
172
|
+
### 4a. Rewrite Frontmatter
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
---
|
|
176
|
+
name: oh-<new-name>
|
|
177
|
+
description: "Adapted from <source>. <Core function>. Use when <triggers>."
|
|
178
|
+
tier: <2|3|4>
|
|
179
|
+
benefits-from: [<relevant oh- skills this depends on>]
|
|
180
|
+
triggers:
|
|
181
|
+
- "<trigger phrase from original, adapted>"
|
|
182
|
+
- "<new trigger phrases for OH context>"
|
|
183
|
+
---
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### 4b. Structure the Body
|
|
187
|
+
|
|
188
|
+
OH skill structure:
|
|
189
|
+
1. **Summary** — one paragraph of what the skill does
|
|
190
|
+
2. **When to Use** — clear triggering context
|
|
191
|
+
3. **Workflow** — numbered steps (the core of the skill)
|
|
192
|
+
4. **Anti-patterns** — what NOT to do
|
|
193
|
+
5. **Routing** — pass/fail/blocker table
|
|
194
|
+
|
|
195
|
+
Adaptation rules:
|
|
196
|
+
- Remove all emojis from content
|
|
197
|
+
- Replace ecosystem-specific terminology with OH equivalents
|
|
198
|
+
- Convert relative paths to OH harness conventions
|
|
199
|
+
- Add routing table based on skill's purpose
|
|
200
|
+
- Keep all concrete rules, examples, and anti-patterns from the original
|
|
201
|
+
- Discard fluff, philosophy, and motivational language
|
|
202
|
+
- Preserve the original's unique signal — that's why you're importing it
|
|
203
|
+
|
|
204
|
+
### 4c. Naming
|
|
205
|
+
|
|
206
|
+
- Name must match `^[a-z0-9]+(-[a-z0-9]+)*$`
|
|
207
|
+
- Prefix with `oh-`
|
|
208
|
+
- Use the original name if it maps well, adapt if not
|
|
209
|
+
- For fusions: invent a new name that captures the combined purpose
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Phase 5: Fusion (optional — skip for single-skill imports)
|
|
214
|
+
|
|
215
|
+
Input: 2+ analyzed skill contents with "fuse" verdict
|
|
216
|
+
Output: one unified skill that merges complementary DNA
|
|
217
|
+
|
|
218
|
+
### 5a. Identify Complementary DNA
|
|
219
|
+
|
|
220
|
+
For each skill being fused, identify:
|
|
221
|
+
- **Unique rules/concepts** — content that only this skill has
|
|
222
|
+
- **Overlapping content** — same idea expressed differently (keep the better version)
|
|
223
|
+
- **Conflicting directives** — skills that say opposite things (surface to user)
|
|
224
|
+
|
|
225
|
+
### 5b. Merge Architecture
|
|
226
|
+
|
|
227
|
+
Structure the fused skill so each source contributes its strength:
|
|
228
|
+
|
|
229
|
+
```markdown
|
|
230
|
+
## <Combined Workflow>
|
|
231
|
+
|
|
232
|
+
### Phase A: <from skill 1>
|
|
233
|
+
<what skill 1 contributes>
|
|
234
|
+
|
|
235
|
+
### Phase B: <from skill 2>
|
|
236
|
+
<what skill 2 contributes>
|
|
237
|
+
|
|
238
|
+
### Phase C: <from skill 3>
|
|
239
|
+
<what skill 3 contributes>
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Do NOT just concatenate. The fused skill must read as a single coherent workflow, not three documents glued together.
|
|
243
|
+
|
|
244
|
+
### 5c. Name the Fusion
|
|
245
|
+
|
|
246
|
+
The name should signal the combined purpose, not the individual sources.
|
|
247
|
+
- `oh-facade` (from redesign + design-taste + high-end-visual) — not `oh-redesign-plus-taste`
|
|
248
|
+
- Apply the same principle here
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Phase 6: Integration
|
|
253
|
+
|
|
254
|
+
Input: OH-native SKILL.md
|
|
255
|
+
Output: skill fully wired into the harness
|
|
256
|
+
|
|
257
|
+
### 6a. Create the Skill File
|
|
258
|
+
|
|
259
|
+
Write to `~/.config/opencode/skills/oh-<name>/SKILL.md` (user dir, survives npm updates).
|
|
260
|
+
If the user has an alternative preference (`~/.agents/skills/`), use that instead.
|
|
261
|
+
The file structure follows the standard OH skill template.
|
|
262
|
+
|
|
263
|
+
### 6b. Wire into AUTOPILOT
|
|
264
|
+
|
|
265
|
+
Add an entry to the auto-classify matrix in `harness/codex/AUTOPILOT.md`:
|
|
266
|
+
- Signal keywords that should trigger this skill
|
|
267
|
+
- Classification label
|
|
268
|
+
- Action: "Load **oh-<name>**. Do not ask."
|
|
269
|
+
|
|
270
|
+
### 6c. Wire routing into frontmatter
|
|
271
|
+
|
|
272
|
+
Add `route:` frontmatter to the skill — no ROUTING.md edit needed. The dynamic routing system reads `route.pass`, `route.fail`, and `route.blocker` directly from the skill's own `SKILL.md`. The skill becomes routable automatically:
|
|
273
|
+
|
|
274
|
+
```yaml
|
|
275
|
+
route:
|
|
276
|
+
pass: <next skill or done>
|
|
277
|
+
fail: <fallback skill or surface>
|
|
278
|
+
blocker: surface
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
### 6d. Wire into AGENTS.md
|
|
282
|
+
|
|
283
|
+
Add to the skills table in `AGENTS.md`:
|
|
284
|
+
- Skill, tier, purpose
|
|
285
|
+
- Increment the total count
|
|
286
|
+
|
|
287
|
+
### 6e. Wire into openhermes.md
|
|
288
|
+
|
|
289
|
+
Add to the orchestrator's skill list in `harness/agents/openhermes.md`.
|
|
290
|
+
|
|
291
|
+
### 6f. Verify Discovery
|
|
292
|
+
|
|
293
|
+
Route to `oh-skills-link` to confirm the skill is discoverable by OpenCode.
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Routing
|
|
298
|
+
|
|
299
|
+
| Outcome | Route |
|
|
300
|
+
|---|---|
|
|
301
|
+
| integration complete | -> oh-skills-link (verify discovery) |
|
|
302
|
+
| fusion with iteration needed | -> oh-skill-craft (optimize via eval loop) |
|
|
303
|
+
| analysis: discard | -> surface findings to user |
|
|
304
|
+
| analysis: ask | -> surface findings + recommendations to user |
|
|
305
|
+
| blocker | -> surface to user |
|
|
306
|
+
|
|
307
|
+
## Anti-patterns
|
|
308
|
+
|
|
309
|
+
- Importing a skill without analyzing it first — always run Phase 2
|
|
310
|
+
- Keeping everything from the source — 50% of most external skills is fluff. Be ruthless.
|
|
311
|
+
- Fusing incompatible domains — the result confuses both the model and the user
|
|
312
|
+
- Naming after the source ("oh-tailwind-v2") instead of the capability ("oh-styles")
|
|
313
|
+
- Skipping route frontmatter — a skill without `route.pass`/`route.fail`/`route.blocker` won't auto-route
|
|
314
|
+
- Overwriting existing routing entries without checking for collisions
|
|
@@ -4,14 +4,18 @@ description: "Rigorous multi-axis testing gauntlet: unit, integration, edge case
|
|
|
4
4
|
tier: 4
|
|
5
5
|
benefits-from: [oh-expert, oh-builder]
|
|
6
6
|
triggers:
|
|
7
|
-
- "gauntlet"
|
|
7
|
+
- "run the gauntlet on"
|
|
8
8
|
- "test everything"
|
|
9
9
|
- "rigorous testing"
|
|
10
10
|
- "review all angles"
|
|
11
|
-
- "qa"
|
|
12
|
-
- "full review"
|
|
13
|
-
- "
|
|
14
|
-
- "
|
|
11
|
+
- "qa the feature"
|
|
12
|
+
- "full review of the code"
|
|
13
|
+
- "validate this feature"
|
|
14
|
+
- "thorough testing"
|
|
15
|
+
route:
|
|
16
|
+
pass: oh-ship
|
|
17
|
+
fail: oh-builder
|
|
18
|
+
blocker: surface
|
|
15
19
|
---
|
|
16
20
|
|
|
17
21
|
# oh-gauntlet
|
|
@@ -4,12 +4,16 @@ description: "Stress-test plans and designs through relentless Socratic question
|
|
|
4
4
|
tier: 3
|
|
5
5
|
benefits-from: [oh-expert, oh-planner]
|
|
6
6
|
triggers:
|
|
7
|
-
- "grill"
|
|
8
7
|
- "stress test this plan"
|
|
9
|
-
- "challenge this"
|
|
10
|
-
- "grill me"
|
|
11
|
-
- "poke holes"
|
|
12
|
-
- "interrogate"
|
|
8
|
+
- "challenge this plan"
|
|
9
|
+
- "grill me on this"
|
|
10
|
+
- "poke holes in this plan"
|
|
11
|
+
- "interrogate this plan"
|
|
12
|
+
- "stress test this design"
|
|
13
|
+
route:
|
|
14
|
+
pass: oh-planner
|
|
15
|
+
fail: oh-expert
|
|
16
|
+
blocker: surface
|
|
13
17
|
---
|
|
14
18
|
|
|
15
19
|
# oh-grill
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oh-guard
|
|
3
3
|
description: "Safety confirmation mode — warn before destructive operations"
|
|
4
|
+
tier: 2
|
|
5
|
+
triggers:
|
|
6
|
+
- "confirm before"
|
|
7
|
+
- "safety confirmation"
|
|
8
|
+
- "guard mode"
|
|
9
|
+
route:
|
|
10
|
+
pass: mode
|
|
11
|
+
fail: mode
|
|
12
|
+
blocker: surface
|
|
4
13
|
---
|
|
5
14
|
|
|
6
15
|
# oh-guard
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oh-handoff
|
|
3
3
|
description: "Compact session state into a structured handoff document"
|
|
4
|
+
tier: 2
|
|
5
|
+
triggers:
|
|
6
|
+
- "session handoff"
|
|
7
|
+
- "handoff to another agent"
|
|
8
|
+
- "handoff the session"
|
|
9
|
+
route:
|
|
10
|
+
pass: done
|
|
11
|
+
fail: surface
|
|
12
|
+
blocker: surface
|
|
4
13
|
---
|
|
5
14
|
|
|
6
15
|
# oh-handoff
|
|
@@ -3,12 +3,16 @@ name: oh-health
|
|
|
3
3
|
description: "Code quality dashboard: runs project tools (typecheck, lint, test, dead code detection), computes weighted composite 0-10 score, persists history, shows trend. Read-only — no fixes."
|
|
4
4
|
tier: 2
|
|
5
5
|
triggers:
|
|
6
|
-
- "health check"
|
|
7
|
-
- "code quality"
|
|
6
|
+
- "health check the codebase"
|
|
7
|
+
- "code quality check"
|
|
8
8
|
- "quality dashboard"
|
|
9
9
|
- "how healthy is the codebase"
|
|
10
|
-
- "run all checks"
|
|
11
|
-
- "health"
|
|
10
|
+
- "run all project checks"
|
|
11
|
+
- "code health"
|
|
12
|
+
route:
|
|
13
|
+
pass: surface
|
|
14
|
+
fail: oh-investigate
|
|
15
|
+
blocker: surface
|
|
12
16
|
---
|
|
13
17
|
|
|
14
18
|
# oh-health
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oh-init
|
|
3
|
-
description: "Initialize project for OpenHermes
|
|
3
|
+
description: "Initialize project for OpenHermes: wire AGENTS.md, configure domain docs, issue tracker, and triage labels. Does NOT create .opencode/ directory."
|
|
4
4
|
tier: 2
|
|
5
5
|
triggers:
|
|
6
|
-
- "init project"
|
|
7
|
-
- "setup project"
|
|
8
|
-
- "initialize"
|
|
9
|
-
- "onboard"
|
|
10
|
-
- "scaffold"
|
|
11
|
-
- "takeover"
|
|
6
|
+
- "init this project for oh"
|
|
7
|
+
- "setup project for openhermes"
|
|
8
|
+
- "initialize openhermes setup"
|
|
9
|
+
- "onboard this project"
|
|
10
|
+
- "scaffold project setup"
|
|
11
|
+
- "oh takeover this project"
|
|
12
|
+
route:
|
|
13
|
+
pass: done
|
|
14
|
+
fail: oh-init
|
|
15
|
+
blocker: surface
|
|
12
16
|
---
|
|
13
17
|
|
|
14
18
|
# oh-init
|
|
15
19
|
|
|
16
|
-
Per-repo setup for OpenHermes-assisted development. Run once per repo. Wires
|
|
20
|
+
Per-repo setup for OpenHermes-assisted development. Run once per repo. Wires AGENTS.md, configures domain docs, issue tracker, and triage labels. Does NOT create a `.opencode/` directory — plan files go to `~/.local/share/opencode/openhermes/plans/`.
|
|
17
21
|
|
|
18
22
|
Complements OpenCode's built-in `/init` command (which creates `AGENTS.md` with project build/test/architecture notes). Run oh-init after or instead — they serve different layers.
|
|
19
23
|
|
|
@@ -22,84 +26,15 @@ Complements OpenCode's built-in `/init` command (which creates `AGENTS.md` with
|
|
|
22
26
|
### Phase 0: Check Existing State
|
|
23
27
|
Before writing anything, detect what already exists:
|
|
24
28
|
|
|
25
|
-
- ☐ `.opencode/` directory present?
|
|
26
|
-
- ☐ `.opencode/plan.md` exists?
|
|
27
|
-
- ☐ `.opencode/todo.md` exists?
|
|
28
|
-
- ☐ `.opencode/work-log.md` exists?
|
|
29
|
-
- ☐ `.opencode/instincts.jsonl` exists?
|
|
30
29
|
- ☐ `AGENTS.md` exists? (If yes, was it created by OpenCode `/init` or manually?)
|
|
31
30
|
- ☐ `opencode.json` / `opencode.jsonc` present?
|
|
31
|
+
- ☐ Canonical plan files (`~/.local/share/opencode/openhermes/plans/<project-name>-plan-*.md`)?
|
|
32
|
+
- ☐ `CONTEXT.md` exists?
|
|
33
|
+
- ☐ `docs/agents/` directory exists?
|
|
32
34
|
|
|
33
35
|
Report findings. If everything exists, offer to skip or verify and exit.
|
|
34
36
|
|
|
35
|
-
### Phase 1: .
|
|
36
|
-
Create `.opencode/` directory if missing. Scaffold shared state files:
|
|
37
|
-
|
|
38
|
-
**`.opencode/plan.md`** — working plan for the current session. Uses the same format as the global permanent plan directory (`%USERPROFILE%/.config/opencode/task/<project>-plan-<nnn>.md`). When a plan is completed, copy to the global directory with sequenced naming for permanent archive.
|
|
39
|
-
|
|
40
|
-
```markdown
|
|
41
|
-
# PLAN: <project-name>
|
|
42
|
-
|
|
43
|
-
Plan ID: <project-name>-plan-<nnn>
|
|
44
|
-
Project: <project-name>
|
|
45
|
-
Status: active
|
|
46
|
-
Created: <local-date-time>
|
|
47
|
-
Updated: <local-date-time>
|
|
48
|
-
Project Path: <absolute-project-path>
|
|
49
|
-
Plan Path: .opencode/plan.md
|
|
50
|
-
Objective: <short objective>
|
|
51
|
-
|
|
52
|
-
## Current State
|
|
53
|
-
|
|
54
|
-
## Assumptions
|
|
55
|
-
|
|
56
|
-
## Tasks
|
|
57
|
-
|
|
58
|
-
- [ ] Task 1
|
|
59
|
-
- [ ] Subtask 1.1
|
|
60
|
-
|
|
61
|
-
## Active Task
|
|
62
|
-
|
|
63
|
-
## Subagents
|
|
64
|
-
|
|
65
|
-
| Agent | Purpose | Status | Findings |
|
|
66
|
-
|---|---|---|---|
|
|
67
|
-
|
|
68
|
-
## Completed
|
|
69
|
-
|
|
70
|
-
## Blockers
|
|
71
|
-
|
|
72
|
-
- None
|
|
73
|
-
|
|
74
|
-
## Validation
|
|
75
|
-
|
|
76
|
-
- [ ] Static checks
|
|
77
|
-
- [ ] Formatting checks
|
|
78
|
-
- [ ] Type checks
|
|
79
|
-
- [ ] Unit tests
|
|
80
|
-
- [ ] Integration checks
|
|
81
|
-
- [ ] Manual verification
|
|
82
|
-
|
|
83
|
-
## Decisions
|
|
84
|
-
|
|
85
|
-
## Notes
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**`.opencode/todo.md`** — task tracking for multi-step work (start empty).
|
|
89
|
-
|
|
90
|
-
**`.opencode/work-log.md`** — progress tracking across subagent delegations:
|
|
91
|
-
```markdown
|
|
92
|
-
# Work Log
|
|
93
|
-
|
|
94
|
-
## <date> — <description>
|
|
95
|
-
- Started: <time>
|
|
96
|
-
- Completed: <task>
|
|
97
|
-
- Next: <next task>
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**`.opencode/instincts.jsonl`** — behavioral pattern store for oh-learn (start as empty file). Will grow organically as the agent extracts patterns from sessions.
|
|
101
|
-
|
|
102
|
-
### Phase 2: AGENTS.md Wiring
|
|
37
|
+
### Phase 1: AGENTS.md Wiring
|
|
103
38
|
|
|
104
39
|
Check if AGENTS.md exists:
|
|
105
40
|
|
|
@@ -121,11 +56,12 @@ OpenHermes is the primary orchestrator. All routing, planning, and delegation fl
|
|
|
121
56
|
|
|
122
57
|
## Key Directives
|
|
123
58
|
|
|
124
|
-
- Plan first. Write to
|
|
59
|
+
- Plan first. Write to `~/.local/share/opencode/openhermes/plans/<project-name>-plan-<nnn>.md` before multi-file changes.
|
|
60
|
+
- **OpenHermes never executes tasks directly. It talks/reports to the user and delegates everything to sub-agents.**
|
|
125
61
|
- Verify before claiming success. Read files, run commands, confirm output.
|
|
126
|
-
-
|
|
62
|
+
- Never write code, run tests, or edit files in the main context — always delegate.
|
|
127
63
|
- Use oh-* skills on demand. Load via OpenCode's skill tool when relevant.
|
|
128
|
-
-
|
|
64
|
+
- Plan file is self-contained (Tasks, Completed, Work Log sections).
|
|
129
65
|
```
|
|
130
66
|
|
|
131
67
|
Then ask the user to fill in the Project Context fields. Offer to auto-detect from package manifests.
|
|
@@ -139,13 +75,12 @@ Append an `## OpenHermes Orchestrator` section to the end:
|
|
|
139
75
|
OpenHermes is the primary orchestrator for this session.
|
|
140
76
|
|
|
141
77
|
- **Orchestrator**: OpenHermes — hub-and-spoke routing through oh-* skills
|
|
142
|
-
- **Plan**:
|
|
143
|
-
- **
|
|
78
|
+
- **Plan**: `~/.local/share/opencode/openhermes/plans/<project-name>-plan-<nnn>.md` — always check before starting work
|
|
79
|
+
- **Never execute**: OpenHermes talks/reports to the user and delegates everything to sub-agents
|
|
144
80
|
- **Verify before claim**: read files, run commands, confirm output
|
|
145
|
-
- **Delegate**: subagents for implementation, main context orchestrates
|
|
146
81
|
```
|
|
147
82
|
|
|
148
|
-
### Phase
|
|
83
|
+
### Phase 2: Issue Tracker
|
|
149
84
|
Detect the git hosting platform:
|
|
150
85
|
- **GitHub** — `gh` CLI
|
|
151
86
|
- **GitLab** — `glab` CLI
|
|
@@ -154,7 +89,7 @@ Detect the git hosting platform:
|
|
|
154
89
|
|
|
155
90
|
Confirm with the user. Write the result to `docs/agents/issue-tracker.md`.
|
|
156
91
|
|
|
157
|
-
### Phase
|
|
92
|
+
### Phase 3: Triage Labels
|
|
158
93
|
The `triage` skill uses these label strings to move issues through a state machine:
|
|
159
94
|
- `needs-triage` — maintainer needs to evaluate
|
|
160
95
|
- `needs-info` — waiting on reporter
|
|
@@ -164,7 +99,7 @@ The `triage` skill uses these label strings to move issues through a state machi
|
|
|
164
99
|
|
|
165
100
|
If the repo already has different label names, map them. Write to `docs/agents/triage-labels.md`.
|
|
166
101
|
|
|
167
|
-
### Phase
|
|
102
|
+
### Phase 4: Domain Docs
|
|
168
103
|
Configure how the project organizes domain language:
|
|
169
104
|
- **Single-context** — one `CONTEXT.md` + `docs/adr/` at repo root
|
|
170
105
|
- **Multi-context** — `CONTEXT-MAP.md` pointing to per-context files
|
|
@@ -173,7 +108,7 @@ Scaffold `CONTEXT.md` with project name, domain description, and placeholder glo
|
|
|
173
108
|
|
|
174
109
|
Write to `docs/agents/domain.md`.
|
|
175
110
|
|
|
176
|
-
### Phase
|
|
111
|
+
### Phase 5: Agent Skills Block
|
|
177
112
|
Add a `## Agent skills` section to `AGENTS.md` (or `CLAUDE.md` if it exists):
|
|
178
113
|
|
|
179
114
|
```markdown
|
|
@@ -189,7 +124,7 @@ Add a `## Agent skills` section to `AGENTS.md` (or `CLAUDE.md` if it exists):
|
|
|
189
124
|
<summary>. See docs/agents/domain.md.
|
|
190
125
|
```
|
|
191
126
|
|
|
192
|
-
### Phase
|
|
127
|
+
### Phase 6: Decision Record
|
|
193
128
|
Record: "oh-init completed for project <name> on <date>."
|
|
194
129
|
|
|
195
130
|
## Anti-patterns
|
|
@@ -198,9 +133,8 @@ Record: "oh-init completed for project <name> on <date>."
|
|
|
198
133
|
- Creating ADR directory but never writing ADRs
|
|
199
134
|
- Creating both AGENTS.md and CLAUDE.md — edit the one that exists
|
|
200
135
|
- Overwriting an existing AGENTS.md created by OpenCode `/init` (append instead)
|
|
201
|
-
-
|
|
136
|
+
- Creating `.opencode/` directory — plan files go to OpenCode's canonical storage, not a hidden project dir
|
|
202
137
|
- Empty instinct file never getting populated (run oh-learn extract periodically)
|
|
203
|
-
- Never archiving completed plans to the global task directory (completed plans rot in `.opencode/` instead of becoming permanent records)
|
|
204
138
|
|
|
205
139
|
## Routing
|
|
206
140
|
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oh-investigate
|
|
3
3
|
description: "Systematic bug diagnosis with root cause investigation"
|
|
4
|
+
tier: 2
|
|
5
|
+
triggers:
|
|
6
|
+
- "investigate this bug"
|
|
7
|
+
- "debug this"
|
|
8
|
+
- "why is this broken"
|
|
9
|
+
- "root cause"
|
|
10
|
+
route:
|
|
11
|
+
pass: oh-builder
|
|
12
|
+
fail: oh-expert
|
|
13
|
+
blocker: surface
|
|
4
14
|
---
|
|
5
15
|
|
|
6
16
|
# oh-investigate
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oh-issue
|
|
3
3
|
description: "Break a plan, spec, or PRD into independently-grabbable GitHub issues"
|
|
4
|
+
tier: 2
|
|
5
|
+
triggers:
|
|
6
|
+
- "break into issues"
|
|
7
|
+
- "create issues from plan"
|
|
8
|
+
- "issue breakdown"
|
|
9
|
+
route:
|
|
10
|
+
pass: done
|
|
11
|
+
fail: oh-planner
|
|
12
|
+
blocker: surface
|
|
4
13
|
---
|
|
5
14
|
|
|
6
15
|
# oh-issue
|