oc-harness-setup 0.1.0 → 0.2.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/.docs/unwired-routing.md +16 -0
- package/.gitignore +8 -0
- package/AGENTS.md +3 -3
- package/README.md +13 -15
- package/agents/keeper.md +3 -3
- package/agents/master.md +5 -3
- package/bin/cli.js +322 -97
- package/commands/doctor.md +1 -0
- package/commands/keeper.md +1 -1
- package/commands/report.md +13 -0
- package/package.json +3 -1
- package/reference/README.md +1 -1
- package/reference/model-keeper.md +4 -4
- package/reference/model-test.md +3 -3
- package/reference/models.md +20 -0
- package/scripts/harness-doctor.ps1 +27 -7
- package/scripts/harness-report.ps1 +695 -0
- package/reference/models.md.example +0 -21
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Model routing is unwired by decision
|
|
2
|
+
|
|
3
|
+
- Record type: decision record.
|
|
4
|
+
- Status: current.
|
|
5
|
+
|
|
6
|
+
Model routing is UNWIRED by decision in this harness. All 14 agent `model:`
|
|
7
|
+
lines are commented out (`# model: <YOUR_MODEL>`), so every agent inherits the
|
|
8
|
+
session's selected model — no per-agent bindings, no catalog resolution at load
|
|
9
|
+
time.
|
|
10
|
+
|
|
11
|
+
- Why: the unwired state is the supported MVP baseline; bindings get re-added
|
|
12
|
+
per agent only when evidence justifies a specific model.
|
|
13
|
+
- Verified by: the harness doctor's Law 8 — fully-unwired routing is a PASS
|
|
14
|
+
state only while a `.docs` record like this one documents the decision.
|
|
15
|
+
- Reverting: uncomment `model:` lines in `agents\*.md` with ids that resolve
|
|
16
|
+
in `reference/models.md`, or document the new wiring state here.
|
package/.gitignore
ADDED
package/AGENTS.md
CHANGED
|
@@ -98,9 +98,9 @@ Understand the real flow first, then stop at the first rung that holds — in or
|
|
|
98
98
|
- The lead owns the directory and hands helpers the path. `/checkpoint` and `/handoff` write these on demand.
|
|
99
99
|
|
|
100
100
|
## Routing
|
|
101
|
-
- Model bindings live in `~/.config/opencode/agents/*.md`; the catalog skeleton lives in `~/.config/opencode/reference/models.md
|
|
102
|
-
- Routing is unwired: all 14 agents have their `model:` line commented (`# model: …`), so each inherits the session's selected model; `reference/models.md
|
|
103
|
-
- Recheck nudge: `reference/models.md
|
|
101
|
+
- Model bindings live in `~/.config/opencode/agents/*.md`; the catalog skeleton lives in `~/.config/opencode/reference/models.md`, maintained per `~/.config/opencode/reference/model-keeper.md` via `/keeper`. Keep model names out of prose.
|
|
102
|
+
- Routing is unwired: all 14 agents have their `model:` line commented (`# model: …`), so each inherits the session's selected model; `reference/models.md` retains the binding list as the commented-suggestion map. When the selected model hits its monthly cap, follow the Caps & fallback order in `reference/models.md` rather than inventing a substitute.
|
|
103
|
+
- Recheck nudge: `reference/models.md` carries a recheck-due date (every 3 days). When a session opens past due, surface it before giving model advice.
|
|
104
104
|
|
|
105
105
|
## Team
|
|
106
106
|
- `master` (default) is the grand orchestrator and sole user-facing assistant; it triages to a dispatch tier, dispatches helpers, reduces their reports, and closes with a recommendation and one question. `build` implements; `plan` plans; spawn `coder`, `explore`, `researcher`, `general`, `reviewer`, `documenter`, `keeper`, `vault` (secret-file handling and OpenCode account switching).
|
package/README.md
CHANGED
|
@@ -23,16 +23,16 @@ npx --yes oc-harness-setup setup
|
|
|
23
23
|
|
|
24
24
|
## 🔧 What setup does
|
|
25
25
|
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
A["⚡ preflight"] --> B["🔍 locate config"] --> C["🤝 consent gate"] --> D["💾 backup"] --> E["📦 install"] --> F["🩺 verify"]
|
|
26
|
+
```text
|
|
27
|
+
preflight -> locate config -> consent gate -> backup -> install -> verify
|
|
29
28
|
```
|
|
30
29
|
|
|
31
30
|
- **Consent first** — the full manifest prints before anything moves; `--dry-run` shows it without touching a file
|
|
32
|
-
- **Your config survives** — `
|
|
33
|
-
- **
|
|
31
|
+
- **Your config survives** — the installer owns runtime policy (`$schema`, `default_agent`, `compaction`, `tool_output`, `media`, `watcher`), unions your `plugins` and `references` with the harness's, and preserves every other top-level key, known or unknown — `provider`, `model`, `agents`, `commands`, `skills`, `mcp`, or a key of your own
|
|
32
|
+
- **Your `permissions` still apply** — your rules are placed after the harness's allow/ask rules and ahead of its hard denies, so a rule of yours beats a harness allow while the hard denies stay last
|
|
33
|
+
- **Reversible** — a SHA-256 journal records every touched file; `--uninstall` removes the files the installer created and restores any file it overwrote from the pre-install backup (its path is printed before anything moves). Post-install edits to a restored file are copied aside first as `<name>.replaced-<ts>` — never destroyed
|
|
34
34
|
- **Idempotent** — re-run anytime; identical files are skipped
|
|
35
|
-
- **Verified** — ends on the harness's own 16-law doctor; red = nonzero exit with the file:line that explains it
|
|
35
|
+
- **Verified** — ends on the harness's own 16-law doctor; red = nonzero exit with the file:line that explains it. The doctor needs PowerShell 7: if it is missing, the laws are **skipped** and reported as skipped — not passed
|
|
36
36
|
|
|
37
37
|
> *Installation never modifies your config by itself — setup is always an explicit command you run. **No postinstall, ever.***
|
|
38
38
|
|
|
@@ -40,13 +40,13 @@ flowchart LR
|
|
|
40
40
|
|
|
41
41
|
## 📦 What you get
|
|
42
42
|
|
|
43
|
-
|
|
|
44
|
-
|
|
45
|
-
| 🧠 **MASTER** | dispatch tiers, parallel waves, fan-in reduction, one question per close |
|
|
46
|
-
| 🤖 **14 agents** | coder · explore · reviewer · security-auditor · vault (secrets by pointer) · … |
|
|
47
|
-
| ⌨️ **14 commands** | doctor · council · keeper · checkpoint · plan · build · review · ship · … |
|
|
48
|
-
| 🧪 **18 skills** | spec-driven dev · TDD · debugging · security · performance · git ceremony · … |
|
|
49
|
-
| 🩺 **The doctor** | 16 self-derived laws; green = consistent, regressions ≠ drift |
|
|
43
|
+
| Component | What it gives you |
|
|
44
|
+
|:---|:---|
|
|
45
|
+
| 🧠 **MASTER** | dispatch tiers, parallel waves, fan-in reduction, one question per close |
|
|
46
|
+
| 🤖 **14 agents** | coder · explore · reviewer · security-auditor · vault (secrets by pointer) · … |
|
|
47
|
+
| ⌨️ **14 commands** | doctor · council · keeper · checkpoint · plan · build · review · ship · … |
|
|
48
|
+
| 🧪 **18 skills** | spec-driven dev · TDD · debugging · security · performance · git ceremony · … |
|
|
49
|
+
| 🩺 **The doctor** | 16 self-derived laws; green = consistent, regressions ≠ drift |
|
|
50
50
|
|
|
51
51
|
---
|
|
52
52
|
|
|
@@ -54,8 +54,6 @@ flowchart LR
|
|
|
54
54
|
|
|
55
55
|
> Strict deny-set permissions that survive `--auto` · skills fail closed on unknown IDs · credentials stay by pointer · backup before any change.
|
|
56
56
|
|
|
57
|
-
**Optional add-on:** [`oc-freedom-fleet`](https://github.com/nathwn12/oc-freedom-fleet) — typed JEV sidecar + free-model lanes.
|
|
58
|
-
|
|
59
57
|
---
|
|
60
58
|
|
|
61
59
|
<div align="center">
|
package/agents/keeper.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Maintains reference/models.md
|
|
2
|
+
description: Maintains reference/models.md and the opencode.jsonc bindings from live catalogs, pricing, and variants.
|
|
3
3
|
mode: subagent
|
|
4
4
|
# model: <YOUR_MODEL>
|
|
5
5
|
steps: 40
|
|
@@ -8,14 +8,14 @@ permissions:
|
|
|
8
8
|
resource: "*.config/opencode/opencode.jsonc"
|
|
9
9
|
effect: allow
|
|
10
10
|
- action: edit
|
|
11
|
-
resource: "*.config/opencode/reference/models.md
|
|
11
|
+
resource: "*.config/opencode/reference/models.md"
|
|
12
12
|
effect: allow
|
|
13
13
|
- action: subagent
|
|
14
14
|
resource: "*"
|
|
15
15
|
effect: deny
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
You maintain the model picture: compare `~/.config/opencode/reference/models.md
|
|
18
|
+
You maintain the model picture: compare `~/.config/opencode/reference/models.md` and the model bindings in `~/.config/opencode/opencode.jsonc` against the live catalogs, official pricing, and available variants.
|
|
19
19
|
|
|
20
20
|
- Apply only evidence-backed updates; keep both files consistent and the config parsing (JSONC valid, schema URL intact).
|
|
21
21
|
- Report changes, sources, and uncertainty — or a clean no-change result.
|
package/agents/master.md
CHANGED
|
@@ -58,11 +58,13 @@ Tiers are provisional. Unknown topology during recon promotes T1→T2; seams tha
|
|
|
58
58
|
## Risk is orthogonal
|
|
59
59
|
Reversibility, secrets, and safety are not tiers: a T0 action can be irreversible. Apply the safety rules and human-approval gates regardless of tier.
|
|
60
60
|
|
|
61
|
+
## Self-maintenance (when the doctor is red)
|
|
62
|
+
When `scripts\harness-doctor.ps1` reports a regression or drift, self-diagnose, then ENDORSE exactly one adjustment: the evidence, one recommended path marked `(Recommended)` first, and exactly one question. You MAY re-run the doctor, refresh session state, and invoke `/keeper`.
|
|
63
|
+
You may NOT edit `opencode.jsonc`, `agents\*`, `skills\*`, or the permissions/deny rail without the human gate, and re-running `setup` is PROPOSED only — idempotency is unverified, so a second install is never your call to make unasked.
|
|
64
|
+
When the defect is in the product rather than the local config, offer `/report` instead of patching around it.
|
|
65
|
+
|
|
61
66
|
## Voice
|
|
62
67
|
Report as result · evidence · recommended path · **exactly one question**. Non-prose and brief; options first. Ask only when the answer changes the outcome — otherwise state the assumption and keep moving. Close with what changed, the evidence, the remaining risk, and the next step.
|
|
63
68
|
|
|
64
69
|
## Team
|
|
65
70
|
Dispatch coder, build, general, vault, documenter, keeper, explore, researcher, reviewer, security-auditor, test-engineer, web-performance-auditor. Route verification to the right seat: `reviewer` for correctness and regressions, `security-auditor` for vulnerabilities, `test-engineer` for test adequacy, `web-performance-auditor` for load/runtime.
|
|
66
|
-
|
|
67
|
-
## Freedom Fleet
|
|
68
|
-
Fleet routing, the JEV sidecar, and the roster live in the separate package `oc-freedom-fleet` (npm) — deferred here.
|