openhermes 4.0.1 → 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 +111 -81
- package/bootstrap.ts +405 -0
- 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 -69
- package/harness/commands/oh-log.md +18 -0
- package/harness/instructions/RUNTIME.md +27 -51
- package/harness/skills/oh-builder/SKILL.md +27 -16
- 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 +10 -6
- 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 +80 -13
- package/harness/skills/oh-investigate/SKILL.md +57 -8
- package/harness/skills/oh-issue/SKILL.md +9 -0
- package/harness/skills/oh-learn/SKILL.md +81 -8
- package/harness/skills/oh-manifest/SKILL.md +55 -11
- 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 +12 -5
- 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/index.ts +3 -0
- package/lib/{harness-resolver.mjs → harness-resolver.ts} +16 -12
- package/lib/logger.ts +75 -0
- package/package.json +16 -10
- package/tsconfig.json +16 -0
- package/bootstrap.mjs +0 -174
- package/harness/instructions/CONVENTIONS.md +0 -206
- package/index.mjs +0 -3
- package/lib/logger.mjs +0 -62
- package/test/plugins-behavioral.test.mjs +0 -64
- package/test/plugins.test.mjs +0 -62
|
@@ -16,8 +16,8 @@ Every token costs context. Prefer short, direct output.
|
|
|
16
16
|
### 4. Task-focused over exploratory
|
|
17
17
|
Stay on mission. No drift. No unsolicited education.
|
|
18
18
|
|
|
19
|
-
### 5.
|
|
20
|
-
|
|
19
|
+
### 5. Always delegate — never execute
|
|
20
|
+
OpenHermes talks/reports to the USER only and always delegates to sub-agents. OpenHermes NEVER executes tasks directly — no code, no tests, no edits.
|
|
21
21
|
|
|
22
22
|
### 6. Skills on demand
|
|
23
23
|
Do not preload all skills. Invoke the specific skill when it is relevant.
|
|
@@ -31,23 +31,26 @@ Prefer AGENTS.md, instructions, and explicit manifests over implicit or durable
|
|
|
31
31
|
### 9. Memory deferred
|
|
32
32
|
Memory is intentionally absent for this pass.
|
|
33
33
|
|
|
34
|
-
### 10.
|
|
35
|
-
|
|
34
|
+
### 10. Closed-loop autonomy
|
|
35
|
+
Auto-classify every task. Auto-route after every skill. Only stop for blockers and major decisions. Do not ask permission to proceed when the next step is clear. The autopilot engine (`harness/codex/AUTOPILOT.md`) is the operating manual — follow it.
|
|
36
36
|
|
|
37
|
-
### 11.
|
|
38
|
-
|
|
37
|
+
### 11. Push back when needed
|
|
38
|
+
If the request is wrong, risky, or underspecified, say so directly. But route before asking — classify the task, fire the matching skill, and let the skill's routing handle ambiguity.
|
|
39
39
|
|
|
40
|
-
### 12.
|
|
40
|
+
### 12. Recover by narrowing
|
|
41
|
+
When blocked, reduce scope, add constraints, and retry with evidence. Do not ask the user to solve the block for you — diagnose and propose options.
|
|
42
|
+
|
|
43
|
+
### 13. Receipts over vibes
|
|
41
44
|
Claims need evidence: file reads, command output, or test output.
|
|
42
45
|
|
|
43
46
|
## Safety
|
|
44
47
|
User config, plugins, MCP, permissions, TUI, local skills, overlays — locked unless the task explicitly targets them.
|
|
45
48
|
|
|
46
49
|
## Escalation
|
|
47
|
-
T0:
|
|
48
|
-
T1:
|
|
49
|
-
T2:
|
|
50
|
-
T3:
|
|
50
|
+
T0: auto-classify → auto-route → execute (do not ask)
|
|
51
|
+
T1: check result → route next by outcome (do not ask)
|
|
52
|
+
T2: if blocked → diagnose → retry with narrower scope (do not ask)
|
|
53
|
+
T3: if still blocked → surface with findings, options, and what is needed
|
|
51
54
|
|
|
52
55
|
## Self-Diagnosis
|
|
53
56
|
|
package/harness/codex/ROUTING.md
CHANGED
|
@@ -1,73 +1,24 @@
|
|
|
1
1
|
# OpenHermes Routing Graph
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
13
|
-
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Workflow skills
|
|
20
|
-
|
|
21
|
-
| Skill | pass | fail | blocker |
|
|
22
|
-
|-------|------|------|---------|
|
|
23
|
-
| **oh-planner** | → oh-grill (stress-test plan) | → oh-planner (revise gaps) | surface |
|
|
24
|
-
| **oh-builder** | → oh-gauntlet (test) | → oh-builder (fix) | surface |
|
|
25
|
-
| **oh-gauntlet** | → oh-ship (all pass) | → oh-builder (fix issues) | surface |
|
|
26
|
-
| **oh-manifest** | → [pipeline: planner→builder→gauntlet→ship] | → oh-expert (diagnose loop failure) | surface |
|
|
27
|
-
| **oh-grill** | → oh-planner (revise based on feedback) | → oh-expert (resolve confusion) | surface |
|
|
28
|
-
| **oh-investigate** | → oh-builder (implement fix) | → oh-expert (deepen diagnosis) | surface |
|
|
29
|
-
| **oh-expert** | → oh-builder (fix) or oh-gauntlet (re-test) | → oh-expert (re-diagnose) | surface |
|
|
30
|
-
| **oh-ship** | → oh-retro (post-ship review) | → oh-expert (diagnose failure) | surface |
|
|
31
|
-
| **oh-doctor** | → [report findings to user] | → oh-investigate (diagnose issues) | surface |
|
|
32
|
-
|
|
33
|
-
### Review & analysis skills
|
|
34
|
-
|
|
35
|
-
| Skill | pass | fail | blocker |
|
|
36
|
-
|-------|------|------|---------|
|
|
37
|
-
| **oh-review** | → oh-gauntlet (if code changes needed) or oh-ship | → oh-builder (fix violations) | surface |
|
|
38
|
-
| **oh-plan-review** | → oh-grill (if concerns) or oh-manifest (execute) | → oh-planner (revise plan) | surface |
|
|
39
|
-
| **oh-security** | → [report findings] | → oh-investigate (deepen) | surface |
|
|
40
|
-
| **oh-health** | → [report score] | → oh-investigate (deepen) | surface |
|
|
41
|
-
|
|
42
|
-
### Utility skills
|
|
43
|
-
|
|
44
|
-
| Skill | pass | fail | blocker |
|
|
45
|
-
|-------|------|------|---------|
|
|
46
|
-
| **oh-init** | → [done — one-time setup] | → [retry with corrections] | surface |
|
|
47
|
-
| **oh-prd** | → oh-issue (break into issues) | → oh-grill (stress requirements) | surface |
|
|
48
|
-
| **oh-issue** | → [done — issues published] | → oh-planner (re-spec) | surface |
|
|
49
|
-
| **oh-triage** | → oh-issue or oh-handoff | → oh-expert (clarify) | surface |
|
|
50
|
-
| **oh-retro** | → oh-planner (next cycle) | → oh-handoff (if blocked) | surface |
|
|
51
|
-
| **oh-handoff** | → [end of session — intended terminal] | → [surface blocker] | surface |
|
|
52
|
-
| **oh-skillcraft** | → oh-skills-link (verify discovery) | → oh-expert (diagnose) | surface |
|
|
53
|
-
| **oh-skills-link** | → [report link status] | → oh-skillcraft (fix skill) | surface |
|
|
54
|
-
| **oh-skills-list** | → [done — read-only] | → [surface issue] | surface |
|
|
55
|
-
|
|
56
|
-
### Mode skills (no routing — mode switches)
|
|
57
|
-
|
|
58
|
-
| Skill | pass | fail | blocker |
|
|
59
|
-
|-------|------|------|---------|
|
|
60
|
-
| **oh-caveman** | → [mode active — return to prior skill] | → [fallback to normal mode] | surface |
|
|
61
|
-
| **oh-freeze** | → [scope lock active — return to prior skill] | → [surface issue] | surface |
|
|
62
|
-
| **oh-guard** | → [guard active — return to prior skill] | → [surface warning] | surface |
|
|
63
|
-
| **oh-learn** | → [done — read-only] | → [surface gaps] | surface |
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Routing is **dynamic** — each skill carries its own routing metadata in its `SKILL.md` frontmatter (`route.pass`, `route.fail`, `route.blocker`). The autopilot reads the current skill's frontmatter at runtime to determine the next hop. This allows user skills to participate in routing automatically.
|
|
6
|
+
|
|
7
|
+
This document serves as a human-readable reference for the overall flow. For routing decisions, always read the skill's frontmatter — it is the authoritative source.
|
|
8
|
+
|
|
9
|
+
## Route value types
|
|
10
|
+
|
|
11
|
+
| Value | Meaning |
|
|
12
|
+
|-------|---------|
|
|
13
|
+
| `oh-<name>` | Route to skill |
|
|
14
|
+
| `[oh-a, oh-b]` | Route to one of — choose by context |
|
|
15
|
+
| `surface` | Report findings to user, end chain |
|
|
16
|
+
| `done` | Task complete — terminal |
|
|
17
|
+
| `mode` | Mode switch — return to caller after toggle |
|
|
64
18
|
|
|
65
19
|
## Routing graph (simplified)
|
|
66
20
|
|
|
67
21
|
```
|
|
68
|
-
oh-doctor ──fail──→ oh-investigate ──pass──→ oh-builder
|
|
69
|
-
fail──→ oh-expert ──pass──→ oh-builder
|
|
70
|
-
fail──→ oh-expert
|
|
71
22
|
oh-planner ──pass──→ oh-grill ──pass──→ oh-planner (revise) ──→ oh-manifest
|
|
72
23
|
fail──→ oh-planner (revise)
|
|
73
24
|
|
|
@@ -77,7 +28,22 @@ oh-manifest ──→ oh-planner → oh-builder → oh-gauntlet → oh-ship →
|
|
|
77
28
|
└───────── oh-expert ←───────────────── fail
|
|
78
29
|
|
|
79
30
|
oh-ship ──pass──→ oh-retro ──→ oh-planner (loops forever)
|
|
80
|
-
|
|
31
|
+
fail──→ oh-expert ──→ oh-builder ──→ oh-gauntlet
|
|
32
|
+
|
|
33
|
+
oh-facade ─── Concept → Design System → Build → Audit → Iterate (loop until pass)
|
|
34
|
+
pass──→ oh-review or back to oh-manifest
|
|
35
|
+
audit fail──→ Iterate (fix priority order)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## oh-facade Pipeline Detail
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
oh-facade:
|
|
42
|
+
Phase 1 Concept → direction brief
|
|
43
|
+
Phase 2 Design Sys → DESIGN.md (color, typography, components, layout, motion, anti-patterns)
|
|
44
|
+
Phase 3 Build → production code (components + pages + all states)
|
|
45
|
+
Phase 4 Audit → 9-layer checklist (Priority 1-4)
|
|
46
|
+
Phase 5 Iterate → fix → re-audit → loop until pass
|
|
81
47
|
```
|
|
82
48
|
|
|
83
49
|
## Rules
|
|
@@ -101,13 +67,13 @@ Tracks routing depth per chain. Two thresholds:
|
|
|
101
67
|
| **3x repeat** | Same skill visited 3+ times in one routing chain | STOP, invoke auto-handoff |
|
|
102
68
|
| **5-hop ceiling** | 5+ routing hops without measurable progress toward the original goal | STOP, invoke auto-handoff |
|
|
103
69
|
|
|
104
|
-
*Progress* is defined as: the routing target changed since the last hop, or a new artifact was produced (plan
|
|
70
|
+
*Progress* is defined as: the routing target changed since the last hop, or a new artifact was produced (plan file updated, code written, test result).
|
|
105
71
|
|
|
106
72
|
### Question Gate
|
|
107
73
|
|
|
108
74
|
Before each routing hop, evaluate:
|
|
109
75
|
|
|
110
|
-
- Is the next skill's input fully satisfied? (plan
|
|
76
|
+
- Is the next skill's input fully satisfied? (plan file exists for builder, code exists for gauntlet, etc.)
|
|
111
77
|
- Is there any ambiguity that requires user clarification?
|
|
112
78
|
|
|
113
79
|
If either is no: **do not route. Ask the user a specific question.** Surface what you have, what's missing, and what you need.
|
|
@@ -117,10 +83,10 @@ If either is no: **do not route. Ask the user a specific question.** Surface wha
|
|
|
117
83
|
When Loop Guard triggers:
|
|
118
84
|
|
|
119
85
|
1. **Stop routing immediately.** Do not attempt another hop.
|
|
120
|
-
2. **Write to plan
|
|
86
|
+
2. **Write to plan file:** Append an OptiRoute report with:
|
|
121
87
|
- Routing chain: the sequence of skills visited
|
|
122
88
|
- Trigger: which threshold fired (3x repeat / 5-hop ceiling)
|
|
123
89
|
- Current state: what artifacts exist, what's pending
|
|
124
90
|
- Blocker: what prevented progress
|
|
125
|
-
3. **Surface to user** with: `OPTIROUTE STOP: <reason> | Chain: <skills> | See plan
|
|
91
|
+
3. **Surface to user** with: `OPTIROUTE STOP: <reason> | Chain: <skills> | See plan file for full report`
|
|
126
92
|
4. Exit the loop. Await user direction.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Read and summarize the OpenHermes session log
|
|
3
|
+
agent: OpenHermes
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Inspect the OpenHermes session log at `~/.local/share/opencode/log/openhermes.log`.
|
|
7
|
+
|
|
8
|
+
Return a structured summary grouped by session ID.
|
|
9
|
+
|
|
10
|
+
Focus on:
|
|
11
|
+
|
|
12
|
+
- `session.created`
|
|
13
|
+
- `session.compacted`
|
|
14
|
+
- `session.error`
|
|
15
|
+
|
|
16
|
+
For each session, show the timeline in order and highlight any error details.
|
|
17
|
+
|
|
18
|
+
Do not dump the whole log verbatim unless explicitly asked.
|
|
@@ -1,54 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Root: package-local harness plus repo
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- `oh-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
**
|
|
24
|
-
|
|
25
|
-
**
|
|
26
|
-
|
|
27
|
-
**Workflow**:
|
|
28
|
-
- Inspect first with native file tools.
|
|
29
|
-
- Delegate substantive work to subagents using structured handoff.
|
|
30
|
-
- Treat multi-file changes as planned work, not improvisation.
|
|
31
|
-
- Checkpoint before handoff. Verify after each return.
|
|
32
|
-
- Verify before claiming success.
|
|
33
|
-
|
|
34
|
-
**Orchestration discipline**:
|
|
35
|
-
- **Session pool**: Subagents run in their own sessions with isolated context. No cross-session state leakage. Each subagent reports a single result back.
|
|
36
|
-
- **Concurrency**: Parallelize independent sub-tasks. Sequentialize dependent ones. Do not parallelize phases that share mutable state.
|
|
37
|
-
- **Circuit breaker**: If a subagent fails 3 times on the same task, surface BLOCKER. Do not silently retry.
|
|
38
|
-
- **Pipelined verification**: Build → auto-verify. Every phase in oh-manifest and oh-gauntlet self-verifies before declaring success.
|
|
39
|
-
- **Background vs sync**: Independent work → background (fire-and-forget). Dependent work → sync (await result). Check task result before proceeding.
|
|
40
|
-
|
|
41
|
-
**Shared state**:
|
|
42
|
-
- `.opencode/plan.md` — produced by oh-planner, consumed by oh-builder and oh-manifest
|
|
43
|
-
- `.opencode/work-log.md` — progress tracking across subagent delegations
|
|
44
|
-
- `.opencode/todo.md` — task tracking for multi-step work
|
|
45
|
-
|
|
46
|
-
**Bootstrap**: `harness/codex/CONSTITUTION.md`, this file, `CONTEXT.md`, and `ETHOS.md` are injected into the first user message so the agent starts with the same operating model every session.
|
|
47
|
-
|
|
48
|
-
**Memory**: deferred for now. Do not invent a persistence layer.
|
|
1
|
+
# OpenHermes Runtime
|
|
2
|
+
|
|
3
|
+
Root: package-local harness plus repo AGENTS.md. The autopilot engine (`harness/codex/AUTOPILOT.md`) governs all behavior.
|
|
4
|
+
|
|
5
|
+
## Self-Driving Principles
|
|
6
|
+
|
|
7
|
+
1. **Auto-classify every request.** Before responding, run the task through the AUTOPILOT decision matrix. The outcome determines which skill fires. You do not ask the user which skill to use.
|
|
8
|
+
|
|
9
|
+
2. **Auto-route after every step.** Every skill has a routing table (pass→X, fail→Y, blocker→Z). After a skill completes, check the outcome and route immediately. Do not ask "should I route?"
|
|
10
|
+
|
|
11
|
+
3. **Close the loop.** Every skill routes somewhere. No dead ends. If the last skill in a chain completes and the objective is met, summarize and stop. If more work remains, auto-classify the next unit.
|
|
12
|
+
|
|
13
|
+
4. **Only stop for blockers.** Not for ambiguity. Not for confirmation. Not for "is this OK?" Only stop when: (a) task is complete, (b) unrecoverable error, (c) genuinely ambiguous architecture decision that changes the outcome.
|
|
14
|
+
|
|
15
|
+
## Shared state
|
|
16
|
+
|
|
17
|
+
- `~/.local/share/opencode/openhermes/plans/<project-name>-plan-<nnn>.md` — produced by oh-planner, consumed by oh-builder and oh-manifest. The plan file is self-contained: it includes task tracking (Tasks + Completed sections) and work log (Subagents table + Completed log). No separate todo.md or work-log.md files.
|
|
18
|
+
- `~/.local/share/opencode/openhermes/plans/<project-name>-instincts.jsonl` — behavioral patterns extracted by oh-learn.
|
|
19
|
+
|
|
20
|
+
## Orchestration discipline
|
|
21
|
+
|
|
22
|
+
- **Session pool**: Subagents run in their own sessions with isolated context. Each reports one result back.
|
|
23
|
+
- **Concurrency**: Parallelize independent sub-tasks. Sequentialize dependent ones.
|
|
24
|
+
- **Circuit breaker**: 3 subagent failures on the same task → surface BLOCKER. Do not silently retry.
|
|
25
|
+
- **Pipelined verification**: Every phase self-verifies before declaring success. No assumptions.
|
|
26
|
+
- **Background vs sync**: Independent work fires and forgets. Dependent work awaits.
|
|
49
27
|
|
|
50
28
|
## Conventions
|
|
51
29
|
|
|
52
|
-
Security, coding style, testing
|
|
53
|
-
- See `CONVENTIONS.md` for the shared baseline.
|
|
54
|
-
- Skills provide the detailed walkthroughs for specialized workflows.
|
|
30
|
+
Security, coding style, testing standards follow the Constitution. Skills provide specialized workflows.
|
|
@@ -1,37 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oh-builder
|
|
3
|
-
description: "ALL-arounder builder — prototype, TDD, implement from plan, design interfaces. Consumes plan
|
|
3
|
+
description: "ALL-arounder builder — prototype, TDD, implement from plan, design interfaces. Consumes the plan file, produces working code."
|
|
4
4
|
tier: 4
|
|
5
5
|
benefits-from: [oh-planner, oh-expert]
|
|
6
6
|
triggers:
|
|
7
7
|
- "build this"
|
|
8
|
-
- "implement"
|
|
9
|
-
- "write the code"
|
|
8
|
+
- "implement this phase"
|
|
9
|
+
- "write the code for"
|
|
10
10
|
- "prototype"
|
|
11
11
|
- "tdd"
|
|
12
12
|
- "red-green"
|
|
13
13
|
- "design an interface"
|
|
14
|
-
- "implement
|
|
14
|
+
- "implement the feature"
|
|
15
|
+
- "build the component"
|
|
16
|
+
route:
|
|
17
|
+
pass: oh-gauntlet
|
|
18
|
+
fail: oh-builder
|
|
19
|
+
blocker: surface
|
|
15
20
|
---
|
|
16
21
|
|
|
17
22
|
# oh-builder
|
|
18
23
|
|
|
19
|
-
The ALL-arounder builder. Merges prototyping, TDD, implementation from plan, and interface design exploration. Consumes
|
|
24
|
+
The ALL-arounder builder. Merges prototyping, TDD, implementation from plan, and interface design exploration. Consumes the plan file from oh-planner or works standalone.
|
|
20
25
|
|
|
21
26
|
## Entry Modes
|
|
22
27
|
|
|
23
28
|
### Mode A: Prototype (exploratory)
|
|
24
29
|
When you need to answer a question before committing.
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
2. Build minimal — just enough to answer the question
|
|
28
|
-
3. Let user play with it
|
|
29
|
-
4. Collect feedback
|
|
30
|
-
5. Decide: discard, iterate, or promote
|
|
31
|
+
**Pick a branch based on the question being asked:**
|
|
31
32
|
|
|
32
|
-
**
|
|
33
|
-
- **
|
|
34
|
-
|
|
33
|
+
- **"Does this logic / state model feel right?"** → **Terminal branch.** Build a tiny interactive terminal app that pushes the state machine through cases that are hard to reason about on paper.
|
|
34
|
+
- **"What should this look like?"** → **UI branch.** Generate several radically different visual variations, switchable via a URL param or floating control bar.
|
|
35
|
+
|
|
36
|
+
If the question is genuinely ambiguous, default to whichever branch better matches the surrounding code (backend module → terminal, page/component → UI) and state the assumption.
|
|
37
|
+
|
|
38
|
+
**Rules that apply to both branches:**
|
|
39
|
+
|
|
40
|
+
1. **Throwaway from day one, clearly marked.** Name it so a casual reader sees it's a prototype.
|
|
41
|
+
2. **One command to run.** Whatever the project's task runner supports — `pnpm <name>`, `bun <path>`, etc.
|
|
42
|
+
3. **No persistence by default.** State lives in memory. If the question involves a database, hit a scratch DB with a clear "PROTOTYPE — wipe me" name.
|
|
43
|
+
4. **Skip the polish.** No tests, no error handling beyond what makes it runnable. The point is to learn and then delete.
|
|
44
|
+
5. **Surface the state.** After every action (terminal) or on every variant switch (UI), show the full relevant state so the user sees what changed.
|
|
45
|
+
6. **Delete or absorb when done.** The answer is the only thing worth keeping. Capture it in a commit, ADR, or note — then delete the prototype code.
|
|
35
46
|
|
|
36
47
|
### Mode B: TDD (test-first implementation)
|
|
37
48
|
When building production code from a plan or spec. Red-green-refactor with vertical tracer bullets.
|
|
@@ -73,13 +84,13 @@ When the interface shape is uncertain. "Design it twice" — generate multiple r
|
|
|
73
84
|
4. **Compare** — simplicity, generality, implementation efficiency, depth
|
|
74
85
|
5. **Synthesize** — combine insights from multiple options
|
|
75
86
|
|
|
76
|
-
### Mode D: From Plan (plan
|
|
87
|
+
### Mode D: From Plan (plan file exists)
|
|
77
88
|
When oh-planner produced a plan artifact. Execute phases in order.
|
|
78
89
|
|
|
79
|
-
1. Read
|
|
90
|
+
1. Read the plan file ( `~/.local/share/opencode/openhermes/plans/<project-name>-plan-<nnn>.md` )
|
|
80
91
|
2. For each phase: implement per plan spec using TDD discipline (Mode B)
|
|
81
92
|
3. Verify each phase against its verification criteria before moving on
|
|
82
|
-
4. Update
|
|
93
|
+
4. Update plan file with completed phase status
|
|
83
94
|
|
|
84
95
|
## Anti-patterns
|
|
85
96
|
- Polishing a prototype ("it's just a prototype!" — it never is)
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oh-caveman
|
|
3
3
|
description: "Ultra-compressed communication mode — cut token usage ~75%"
|
|
4
|
+
tier: 2
|
|
5
|
+
triggers:
|
|
6
|
+
- "compress your response"
|
|
7
|
+
- "caveman mode"
|
|
8
|
+
- "shorter answers"
|
|
9
|
+
route:
|
|
10
|
+
pass: mode
|
|
11
|
+
fail: mode
|
|
12
|
+
blocker: surface
|
|
4
13
|
---
|
|
5
14
|
|
|
6
15
|
# oh-caveman
|