oc-harness-setup 0.1.1 → 0.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.
Files changed (114) hide show
  1. package/.docs/unwired-routing.md +14 -9
  2. package/.gitignore +14 -1
  3. package/AGENTS.md +70 -106
  4. package/README.md +31 -27
  5. package/agents/build.md +10 -12
  6. package/agents/explore.md +14 -8
  7. package/agents/general.md +7 -9
  8. package/agents/orchestrator.md +38 -0
  9. package/agents/plan.md +10 -13
  10. package/agents/reviewer.md +9 -14
  11. package/agents/vault.md +44 -35
  12. package/bin/cli.js +323 -81
  13. package/commands/build.md +2 -8
  14. package/commands/checkpoint.md +3 -1
  15. package/commands/code-simplify.md +3 -9
  16. package/commands/gauntlet.md +7 -0
  17. package/commands/handoff.md +3 -1
  18. package/commands/keeper.md +3 -3
  19. package/commands/kill.md +11 -0
  20. package/commands/plan.md +2 -13
  21. package/commands/retro.md +15 -0
  22. package/commands/review.md +1 -1
  23. package/commands/ship.md +3 -27
  24. package/commands/spec.md +3 -11
  25. package/commands/test.md +2 -9
  26. package/commands/webperf.md +7 -0
  27. package/opencode.jsonc +23 -8
  28. package/package.json +3 -3
  29. package/reference/README.md +14 -14
  30. package/reference/auto-mandate.md +11 -0
  31. package/reference/backup-convention.md +9 -0
  32. package/reference/clean-mandate.md +13 -0
  33. package/reference/editor-parity.md +7 -0
  34. package/reference/gc-scripts.md +8 -0
  35. package/reference/intent-routing.md +14 -0
  36. package/reference/lifecycle.md +15 -0
  37. package/reference/model-keeper.md +30 -10
  38. package/reference/model-test.md +13 -8
  39. package/reference/models.md +25 -14
  40. package/reference/oc-source-map.md +162 -0
  41. package/reference/owner-pin.md +31 -0
  42. package/reference/roster.md +15 -0
  43. package/reference/session-scope.md +9 -0
  44. package/reference/session-state.md +13 -0
  45. package/reference/swarm.md +32 -0
  46. package/scripts/backup-config.ps1 +42 -0
  47. package/scripts/gc-branch.ps1 +196 -0
  48. package/scripts/gc-bump.ps1 +198 -0
  49. package/scripts/gc-clean.ps1 +648 -0
  50. package/scripts/gc-commit.ps1 +143 -0
  51. package/scripts/gc-merge.ps1 +272 -0
  52. package/scripts/gc-pr.ps1 +190 -0
  53. package/scripts/gc-push.ps1 +111 -0
  54. package/scripts/gc-read.ps1 +150 -0
  55. package/scripts/gc-rebase.ps1 +162 -0
  56. package/scripts/gc-release.ps1 +225 -0
  57. package/scripts/gc-stage.ps1 +103 -0
  58. package/scripts/gc-status.ps1 +127 -0
  59. package/scripts/gc-sync.ps1 +65 -0
  60. package/scripts/gc.core.ps1 +715 -0
  61. package/scripts/gc.smoke.ps1 +779 -0
  62. package/scripts/harness-doctor.ps1 +11 -9
  63. package/scripts/interrupt-session.ps1 +65 -0
  64. package/scripts/logbook/README.md +108 -0
  65. package/scripts/logbook/logbook.test.ts +440 -0
  66. package/scripts/logbook/logbook.ts +797 -0
  67. package/scripts/pirep/README.md +147 -0
  68. package/scripts/pirep/pirep.test.ts +735 -0
  69. package/scripts/pirep/pirep.ts +836 -0
  70. package/scripts/testflight/README.md +112 -0
  71. package/scripts/testflight/testflight.test.ts +512 -0
  72. package/scripts/testflight/testflight.ts +806 -0
  73. package/skills/_shared/SOURCES.md +7 -7
  74. package/skills/_shared/references/definition-of-done.md +2 -2
  75. package/skills/_shared/references/orchestration-patterns.md +1 -2
  76. package/skills/_shared/references/security-checklist.md +2 -2
  77. package/skills/api-and-interface-design/SKILL.md +7 -360
  78. package/skills/browser-testing-with-devtools/SKILL.md +303 -0
  79. package/skills/code-simplification/SKILL.md +7 -364
  80. package/skills/creative-writing/SKILL.md +1 -1
  81. package/skills/debugging-and-error-recovery/SKILL.md +8 -309
  82. package/skills/flight-deck/SKILL.md +17 -0
  83. package/skills/frontend-ui-engineering/SKILL.md +8 -320
  84. package/skills/gauntlet/SKILL.md +21 -0
  85. package/skills/git-ceremony/SKILL.md +16 -318
  86. package/skills/grilling/SKILL.md +10 -30
  87. package/skills/observability-and-instrumentation/SKILL.md +9 -229
  88. package/skills/performance-optimization/SKILL.md +8 -488
  89. package/skills/pilot-report/SKILL.md +18 -0
  90. package/skills/planning-and-task-breakdown/SKILL.md +8 -249
  91. package/skills/security-and-hardening/SKILL.md +9 -490
  92. package/skills/source-driven-development/SKILL.md +8 -208
  93. package/skills/spec-driven-development/SKILL.md +15 -234
  94. package/skills/test-driven-development/SKILL.md +8 -388
  95. package/skills/test-flight/SKILL.md +14 -0
  96. package/skills/writing-for-agents/SKILL-MECHANICS.md +3 -3
  97. package/skills/writing-for-agents/SKILL.md +7 -1
  98. package/agents/coder.md +0 -19
  99. package/agents/documenter.md +0 -28
  100. package/agents/keeper.md +0 -22
  101. package/agents/master.md +0 -65
  102. package/agents/researcher.md +0 -21
  103. package/agents/security-auditor.md +0 -20
  104. package/agents/test-engineer.md +0 -20
  105. package/agents/web-performance-auditor.md +0 -19
  106. package/commands/council.md +0 -24
  107. package/commands/doctor.md +0 -18
  108. package/commands/ponytail-audit.md +0 -7
  109. package/commands/ponytail-debt.md +0 -14
  110. package/reference/models.md.example +0 -21
  111. package/scripts/panic/panic.ts +0 -240
  112. package/skills/code-review-and-quality/SKILL.md +0 -396
  113. package/skills/incremental-implementation/SKILL.md +0 -249
  114. package/skills/swarm-orchestration/SKILL.md +0 -54
@@ -1,7 +1,7 @@
1
1
  ---
2
- description: Refresh the model catalog and bindings from live evidence
3
- agent: keeper
2
+ description: Refresh the model catalog from live evidence
3
+ agent: vault
4
4
  subagent: true
5
5
  ---
6
6
 
7
- Refresh the model picture: compare `reference/models.md.example` and the model bindings in the file-based `agents\*.md` definitions against the live catalogs, pricing, and variants, following the canonical protocol in `reference/model-keeper.md`. Apply only evidence-backed changes; keep the catalog, bindings, and config parsing consistent. Report changes, sources, and uncertainty — or a clean no-change result.
7
+ Refresh `~/.config/opencode/reference/models.md` from live evidence using `~/.config/opencode/reference/model-keeper.md`. Do not change agent pins, routing, or bindings. Apply only sourced catalog corrections and report changes, sources, uncertainty, or a clean no-change result.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: Kill a session now — interrupt its active execution in place
3
+ agent: orchestrator
4
+ subagent: false
5
+ ---
6
+
7
+ If `$ARGUMENTS` is empty, ask once for one target and stop. Otherwise run:
8
+
9
+ `pwsh -NoProfile -File "$HOME/.config/opencode/scripts/interrupt-session.ps1" "$ARGUMENTS"`
10
+
11
+ Return the script's single result. Never substitute a message, deletion, batch sweep, or guessed session ID for the interrupt.
package/commands/plan.md CHANGED
@@ -1,18 +1,7 @@
1
1
  ---
2
2
  description: Produce an implementation plan with steps, ownership, and acceptance evidence
3
3
  agent: plan
4
- subagent: true
4
+ subagent: false
5
5
  ---
6
6
 
7
- > Triage first: WHERE (blast-radius) → WHAT → HOW (ceremony) → FIRE.
8
- > Scale ceremony to blast radius — tiny stays tiny, big gets a plan plus helpers.
9
- > Route via the existing intent table and lifecycle; no new routes, no second router.
10
-
11
- Plan `$ARGUMENTS`. Inspect the current system before planning (spawn `explore` for recon only when the codebase is unknown). Produce a user-facing plan:
12
-
13
- - **Outcome:** the definition of done, stated so anyone can verify it.
14
- - **Approach:** the shape of the solution and the lean rung it stops at (remove the need → reuse → stdlib → native platform → installed dependency → minimum change).
15
- - **Ordered steps:** each with an owner (local specialist: `coder`, `explore`, `reviewer`, `documenter`, `keeper`), what it changes, and its acceptance evidence — the narrow runnable check that proves it.
16
- - **Risks and open decisions:** with the smallest next action for each.
17
-
18
- Write `plan.md` to this session's state directory (`~/.opencode/state/sessions/<session-id>/`). If the steps aren't obvious yet, state the one decision that must be sharpened rather than inventing detail. Leave implementation to `/build`.
7
+ Plan `$ARGUMENTS`. Inspect through `explore` when evidence is missing, then produce in chat: outcome, scope and exclusions, approach, ordered steps with owners, acceptance evidence, risks, and open decisions. Do not implement or write files. Hand approved execution to `orchestrator`.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Run the bounded retro pass over logbook + pattern inbox; emit a proposal queue, never edits
3
+ agent: general
4
+ subagent: true
5
+ ---
6
+
7
+ Run one bounded retro pass. Read `~/.opencode/memory/patterns.md` and query `logbook` read-only; never use `--reindex`.
8
+
9
+ Caps (hard): ≤8 logbook queries, ≤50 hits per query (`--limit=50`), ≤30 min wall-clock, repeat threshold ≥3 distinct sessions. If a query hits its cap, stop paging and record the cap-hit as a finding about corpus size, not a failure.
10
+
11
+ Look for repeated friction: hand-typed commands, failed or thrashing dispatches, violated instructions, and user restatements. Return a proposal queue to the parent; do not write the child session's state. Each item includes evidence, uncertainty, and one outcome (`core invariant`, `agent`, `skill`, `command`, `reference`, `delete`, or `discard`).
12
+
13
+ Never apply the queue here — applying is always a separate, reviewed step. Never touch `~/.config/opencode/scripts/`, `~/.config/opencode/agents/`, `~/.config/opencode/skills/`, `~/.config/opencode/opencode.jsonc`, or `~/.config/opencode/AGENTS.md` from this command. Never read or print `.secrets` / `.env`.
14
+
15
+ Close with queries and hit counts, proposals or honest-empty evidence, caps hit, and anything unverified.
@@ -4,4 +4,4 @@ agent: reviewer
4
4
  subagent: true
5
5
  ---
6
6
 
7
- Give `$ARGUMENTS` an independent look: inspect the work and its behavior, run the checks that matter, and report findings in severity order with file:line evidence, ending with one verdict (`pass`, `revise`, or `blocked`) and the smallest next action. Follow the local `code-review-and-quality` skill when reviewing changes. Do not edit files or spawn helpers.
7
+ Review `$ARGUMENTS` independently. Inspect behavior, run relevant checks, report findings in severity order with `file:line` evidence, and end with one verdict (`pass`, `revise`, or `blocked`) plus the smallest next action. Do not edit or delegate.
package/commands/ship.md CHANGED
@@ -1,31 +1,7 @@
1
1
  ---
2
2
  description: Bounded parallel review fan-out, then a lead go/no-go merge decision
3
+ agent: orchestrator
4
+ subagent: false
3
5
  ---
4
6
 
5
- Ship gate for `$ARGUMENTS` (default: the current changes). Three phases; do not skip the merge step.
6
-
7
- ## Phase 1 — Bounded parallel fan-out
8
-
9
- Verify in parse → smoke → fresh-eyes order: well-formed first, then the narrow runnable check, then independent review.
10
- Never weaken the check to fake a green; report check output verbatim, not paraphrased.
11
- The 3-way fan-out below is unchanged.
12
-
13
- Spawn these three specialists **in parallel** with short briefs (what, where, done, how to prove it). Bounded: each gets one pass, no grandchildren, findings only — nobody edits files.
14
-
15
- - **`reviewer`** — independent verification: inspect the changes and their real behavior, run the checks that matter, report findings in severity order with file:line evidence, end with exactly one verdict (`pass`, `revise`, `blocked`).
16
- - **`security-auditor`** — security-only pass: boundary validation, secrets by pointer, injection surfaces, auth/authz changes, unsafe dependency additions. Report findings in severity order with file:line evidence and a verdict (`pass`, `revise`, `blocked`).
17
- - **`test-engineer`** — test evidence: run the existing suite, confirm coverage of the changed behavior, report what passed/failed/untested and the risk that leaves. Verdict (`pass`, `revise`, `blocked`).
18
-
19
- ## Phase 2 — Lead merge
20
-
21
- As lead, merge the three reports yourself. Do not spawn a router agent. Resolve conflicts from fresh evidence (re-check a claim yourself if two reports disagree); never trust an unchecked claim. Collapse into one findings list in severity order.
22
-
23
- ## Phase 3 — Go/no-go
24
-
25
- Emit exactly one decision:
26
-
27
- - **GO:** all three verdicts pass; no open high-severity findings; evidence is fresh. Next: ship via the repository's normal flow, preserving its existing isolation and commit checks.
28
- - **NO-GO (revise):** any `revise` verdict or high-severity finding. List the smallest fixes with owners (`coder` for implementation, `test-engineer` for gaps), then re-run `/ship` after they land.
29
- - **NO-GO (blocked):** any `blocked` verdict, or a safety-constraint violation (validation, security, accessibility, secrets, reversibility). State the blocker and the explicit next action.
30
-
31
- Report the three verdicts, the merged findings, and the decision. Close with result, evidence, remaining risk, next step.
7
+ Gate `$ARGUMENTS` (default: current changes). Dispatch three one-pass reviewers in parallel: correctness, security, and test evidence. Each is read-only, bounded, and returns findings plus one verdict. Merge the reports; if they conflict, dispatch one focused reviewer for the disputed claim. Emit exactly one decision: `GO`, `NO-GO (revise)`, or `NO-GO (blocked)`, with whatever evidence, risk, and next action actually exist — omit any section with no real content (a clean `GO` carries no risk field). Never weaken checks or ship on stale evidence.
package/commands/spec.md CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- description: Turn an idea or request into a sharp, buildable spec
2
+ description: Turn the current request into a sharp, buildable spec — inline, in this conversation
3
3
  agent: plan
4
- subagent: true
4
+ subagent: false
5
5
  ---
6
6
 
7
- Synthesize `$ARGUMENTS` into a spec from what is known and flag the rest. Follow the local `spec-driven-development` skill. Produce:
8
-
9
- - **Outcome:** what "done" means, observable.
10
- - **In scope / out of scope:** explicit non-goals.
11
- - **Constraints:** safety, validation, security, accessibility, platform limits — the things that must never be leaned away.
12
- - **Acceptance evidence:** how each part will be proven (the check that runs).
13
- - **Risks and open decisions:** what would change the build if answered differently.
14
-
15
- If the request is ambiguous enough that a wrong build would be expensive, don't guess — run the `grilling` skill to settle the open decisions first, then return to the spec. When the user wants this published, write the approved spec to the requested project artifact; otherwise report it only. Implement nothing.
7
+ Turn `$ARGUMENTS`—or the current request—into a buildable spec using `spec-driven-development`. Inspect through `explore` when facts are missing. Produce the spec in chat: observable outcome, scope and non-goals, constraints, acceptance evidence, risks, and open decisions. Ask only for decisions that materially change the outcome. Do not write files or implement; hand approved work to `orchestrator`.
package/commands/test.md CHANGED
@@ -1,14 +1,7 @@
1
1
  ---
2
2
  description: Run tests and report evidence — identify the narrowest missing coverage
3
- agent: test-engineer
3
+ agent: reviewer
4
4
  subagent: true
5
5
  ---
6
6
 
7
- For `$ARGUMENTS` (default: the current changes):
8
-
9
- 1. Run the existing test/check suite first and report results as evidence — exact commands and outcomes.
10
- 2. If behavior lacks coverage, describe the narrowest tests that would prove it, following the local `test-driven-development` skill (red-green-refactor). Do not add them in this read-only audit; hand the test task to `/build`.
11
- 3. Do not edit product code or tests to make the report pass. Report genuine defects separately with file:line evidence.
12
- 4. Never weaken assertions, skip flaky tests silently, or lower coverage to get green.
13
-
14
- End with: what passed, what failed, what is untested (with the risk that leaves), and the smallest next action.
7
+ Audit tests for `$ARGUMENTS` (default: current changes). Run the existing narrow suite first, report exact commands and outcomes, identify the smallest missing coverage, and separate genuine defects from test gaps. Do not edit, weaken assertions, hide flakes, or lower coverage. Return what passed, failed, remains untested, the resulting risk, and the smallest next action.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Audit load/runtime cost and Core Web Vitals risks with prioritized fixes
3
+ agent: reviewer
4
+ subagent: true
5
+ ---
6
+
7
+ Audit web performance for `$ARGUMENTS` (default: current project or diff) using `performance-optimization` and, when runnable, `browser-testing-with-devtools`. Measure load cost, runtime cost, and Core Web Vitals risk. Cite files, assets, or measurements; report prioritized `<risk> → <fix> → <expected impact>` findings and the highest-value next action. Do not edit.
package/opencode.jsonc CHANGED
@@ -6,7 +6,8 @@
6
6
  // This is the oc-harness-setup base config; the installer preserves your
7
7
  // model/providers/mcp/plugins.
8
8
  "$schema": "https://opencode.ai/config.json",
9
- "default_agent": "master",
9
+ "default_agent": "orchestrator",
10
+ "formatter": true,
10
11
  "compaction": {
11
12
  "auto": true,
12
13
  "keep": {
@@ -63,7 +64,11 @@
63
64
  "references": {
64
65
  "orchestration": {
65
66
  "path": "~/.config/opencode/reference",
66
- "description": "Harness references — smoke checks, model keeper, db hygiene."
67
+ "description": "Harness references - smoke checks, model keeper, db hygiene."
68
+ },
69
+ "quality": {
70
+ "path": "~/.config/opencode/skills/_shared/references",
71
+ "description": "Supporting security, testing, accessibility, performance, and observability checklists used by matching skills."
67
72
  }
68
73
  },
69
74
  "permissions": [
@@ -335,7 +340,7 @@
335
340
  },
336
341
  {
337
342
  "action": "skill",
338
- "resource": "code-review-and-quality",
343
+ "resource": "browser-testing-with-devtools",
339
344
  "effect": "allow"
340
345
  },
341
346
  {
@@ -353,6 +358,11 @@
353
358
  "resource": "debugging-and-error-recovery",
354
359
  "effect": "allow"
355
360
  },
361
+ {
362
+ "action": "skill",
363
+ "resource": "flight-deck",
364
+ "effect": "allow"
365
+ },
356
366
  {
357
367
  "action": "skill",
358
368
  "resource": "frontend-ui-engineering",
@@ -360,17 +370,17 @@
360
370
  },
361
371
  {
362
372
  "action": "skill",
363
- "resource": "git-ceremony",
373
+ "resource": "gauntlet",
364
374
  "effect": "allow"
365
375
  },
366
376
  {
367
377
  "action": "skill",
368
- "resource": "grilling",
378
+ "resource": "git-ceremony",
369
379
  "effect": "allow"
370
380
  },
371
381
  {
372
382
  "action": "skill",
373
- "resource": "incremental-implementation",
383
+ "resource": "grilling",
374
384
  "effect": "allow"
375
385
  },
376
386
  {
@@ -383,6 +393,11 @@
383
393
  "resource": "performance-optimization",
384
394
  "effect": "allow"
385
395
  },
396
+ {
397
+ "action": "skill",
398
+ "resource": "pilot-report",
399
+ "effect": "allow"
400
+ },
386
401
  {
387
402
  "action": "skill",
388
403
  "resource": "planning-and-task-breakdown",
@@ -405,12 +420,12 @@
405
420
  },
406
421
  {
407
422
  "action": "skill",
408
- "resource": "swarm-orchestration",
423
+ "resource": "test-driven-development",
409
424
  "effect": "allow"
410
425
  },
411
426
  {
412
427
  "action": "skill",
413
- "resource": "test-driven-development",
428
+ "resource": "test-flight",
414
429
  "effect": "allow"
415
430
  },
416
431
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-harness-setup",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "oc-harness-setup": "bin/cli.js"
@@ -33,9 +33,9 @@
33
33
  "author": "nathwn12",
34
34
  "repository": {
35
35
  "type": "git",
36
- "url": "https://github.com/nathwn12/oc-harness-setup.git"
36
+ "url": "git+https://github.com/nathwn12/oc-harness-setup.git"
37
37
  },
38
- "description": "Plug-and-play OpenCode harness: MASTER orchestrator, agents, commands, skills, doctor - installed by one explicit command.",
38
+ "description": "Plug-and-play OpenCode harness: orchestrator primary, agents, commands, skills, git ceremony, doctor - installed by one explicit command.",
39
39
  "keywords": [
40
40
  "opencode",
41
41
  "harness",
@@ -1,18 +1,18 @@
1
1
  # Harness references
2
2
 
3
- On-demand harness references. Always-loaded rules: `AGENTS.md`. Swarm playbook: `~/.config/opencode/skills/swarm-orchestration/SKILL.md`.
3
+ `AGENTS.md` is the always-loaded contract. Everything here is on-demand support; load only the file named by a matching rule or workflow.
4
4
 
5
- Read these only when the task calls for them:
5
+ - `roster.md` — active seats and authority.
6
+ - `swarm.md` — dispatch, reporting, fan-in, recovery, and close.
7
+ - `lifecycle.md` — action boundaries and authorization.
8
+ - `session-scope.md` — avoid collisions with other live sessions.
9
+ - `session-state.md` — optional YAML checkpoint and handoff format.
10
+ - `auto-mandate.md` — exact `--auto` behavior.
11
+ - `clean-mandate.md` — exact `--clean` housekeeper behavior.
12
+ - `editor-parity.md` — use only when dependency/config changes affect the editor.
13
+ - `gc-scripts.md` — deterministic Git wrapper map.
14
+ - `model-keeper.md`, `models.md`, `model-test.md` - model evidence; seat wiring lives in the adopter's `agents` map (or agent frontmatter) and is not shipped.
15
+ - `oc-source-map.md` — local OpenCode source map.
16
+ - `owner-pin.md` - adopter-owned template: volatile owner countdown and next item (the installer preserves an existing file).
6
17
 
7
- - `model-keeper.md` — how to refresh the model catalog and the agent model bindings (file-based under `agents\*.md`) from live evidence.
8
- - `scripts\harness-doctor.ps1` — self-contained harness health check (run `pwsh -File scripts\harness-doctor.ps1` from `~/.config/opencode` after changing the harness).
9
-
10
- ## Gotchas (verified <DATE>)
11
-
12
- Two traps were hit in one session and both cost real time. Check them before editing permission globs or running shell.
13
-
14
- - **A leading `*` glob can render as `~`.** Agent and `opencode.jsonc` resource globs are written `*.config/opencode/*` (leading `*`, char code 42), but some views display that as `~/.config/opencode/*`. Verify by raw bytes before editing or copying a glob:
15
- `[System.IO.File]::ReadAllLines($p) | Select-String 'resource:'` — 42 = `*`, 126 = `~`.
16
- Both forms resolve (V2 expands `~` at config load; `*` matches across separators and drive prefixes), so the hazard is not matching — it is *rewriting* a glob from a rendered view and silently drifting the file. This is how the mirror's agent globs diverged from local.
17
- - **The shell deny matches the command string, not the intent.** A command carrying a forbidden token — even inside a harmless `Select-String -Pattern '…'` — is refused with `Permission denied: shell`. Keep credential-path words out of command text; work by pointer, or express the pattern so the literal token never appears.
18
- - **A doctor FAIL immediately after a config edit can be transient.** Observed once right after writing a config file, then **not** reproduced across three consecutive runs — most likely the file watcher reloading mid-check, so a CLI-derived law momentarily sees an empty roster. The daily pulse escalates on any non-zero doctor exit, so **re-run once before treating a FAIL as a regression**; never silence a law to reach green.
18
+ Current control plane: the adopter's default primary seat and any planning-only primary are defined in the `agents` map; all substantive work runs through background seats.
@@ -0,0 +1,11 @@
1
+ # Autonomy mandate (`--auto`)
2
+
3
+ A standalone `--auto` or `--a` arms this posture for the session; `--ask` disarms it.
4
+
5
+ While armed, choose and execute the best bounded, reversible, in-scope path without asking preference questions. State consequential assumptions briefly and keep moving. Verification and event reporting remain required.
6
+
7
+ `--auto` does not widen scope or authorize destructive, irreversible, production, outward-facing, identity, credential, or policy changes. It never overrides a permission denial. Report adjacent opportunities as deferred findings.
8
+
9
+ Stop and report when the objective is impossible, the same attempt repeats without new evidence, progress no longer advances a measurable checkpoint, work drifts outside scope, or an explicit countermand arrives.
10
+
11
+ Close as `done`, `blocked`, or `stopped`, with the result; include evidence, remaining risk, and next action only when they have real content, omit otherwise.
@@ -0,0 +1,9 @@
1
+ # Backup Convention
2
+
3
+ When any agent must back up a config file before editing it, run:
4
+
5
+ scripts\backup-config.ps1 -Path <file>
6
+
7
+ - Backups land in `%USERPROFILE%\.opencode\config-backups\`.
8
+ - The script enforces keep-last-5 retention per file name.
9
+ - Never write `.bak` files inside `~\.config\opencode`.
@@ -0,0 +1,13 @@
1
+ # Housekeeper mandate (`--clean`)
2
+
3
+ A standalone `--clean` arms the housekeeper for this session: junk, trash, and test-generated files may be deleted. `--no-clean` disarms it. Unarmed, every sweep is a report-only dry run - it never deletes, no matter how much junk exists.
4
+
5
+ Auto path: at terminal close, after all workers are collected (global AGENTS.md close rule), run `scripts/gc-clean.ps1`. Armed, it deletes and reports; unarmed, it dry-runs and reports the same tables. The closing agent embeds the summary in the close report. Manual runs follow the same gate: the script never deletes without `-Force`, and `-Force` is passed only while `--clean` is armed.
6
+
7
+ Roots: `%TEMP%\opencode` and `%USERPROFILE%\.cache\opencode` (a `-Root` override exists for sandboxed test runs). Deletions are permitted for exactly these junk classes: `*.bak*` temp config backups; stale cache entries under `github\v2` for plugins not in the adopter's live set (classified only while a live set is passed via `-LiveCache`; without one, v2 entries are reported, never deleted); old-layout leftovers under `github\` that are not `github\v2\`; and directories left empty after those deletions. Repo-local untracked files are listed dry-run only - this tool never deletes them. Anything unclassified is reported, never deleted.
8
+
9
+ The keep-list is law, PROTECT-IF-PRESENT: the script itself, the reference directory, any `*.tgz` npm pack, the adopter's live v2 cache entries (`-LiveCache`), and anything passed via `-KeepExtra`. An absent keep is skipped with a note - never a hard exit. What stays a hard refusal: a junk-class misclassification (only the four classes above are ever deleted), and an unresolvable keep-list, which stops `-Force` with exit 2 - never a silent guess. The root-resolution guard also stands: nothing outside the two resolved roots (or the `-Root` sandbox) can ever be deleted.
10
+
11
+ Safety: the sweep never touches `~/.config`, `~/.local/state`, credential-bearing paths, junctions or reparse points, or anything containing obvious secrets. A secret hit is reported by path only - contents are never printed.
12
+
13
+ Report shape: before/after item list with sizes, bytes freed, keep-list confirmed intact, and the final `RESULT` line.
@@ -0,0 +1,7 @@
1
+ # Editor parity
2
+
3
+ Use this only when a dependency, compiler, language-server, project, or toolchain configuration change could make the user's editor disagree with the proving command.
4
+
5
+ Verify the editor can resolve the project from committed metadata and the documented install/restore step. Check the relevant manifest, lockfile, compiler config, interpreter/SDK pin, and project files. Add editor-specific settings only when the repository genuinely requires them; do not install extensions or rewrite unrelated configuration.
6
+
7
+ Report whether the editor should be green immediately, after dependency restore, or after restart. Ordinary source-only changes do not require this ceremony.
@@ -0,0 +1,8 @@
1
+ # gc-* script map
2
+
3
+ Use these wrappers only for the Git action the user requested or the named endpoint requires.
4
+
5
+ - **Verbs:** `gc-status` · `gc-sync` · `gc-branch` · `gc-stage` · `gc-commit` · `gc-push` · `gc-pr` · `gc-merge` · `gc-rebase` · `gc-bump` · `gc-read` — each as `pwsh -NoProfile -File ~/.config/opencode/scripts/gc-<verb>.ps1 -RepoRoot <path>`.
6
+ - **Output:** terse by default — one `RESULT: <json>` line on stdout; FAIL/WARN/security lines always visible; `-Detailed` restores narration; `-Quiet` is a compatibility no-op.
7
+ - **Release exception:** `gc-release -MovingLatest` is available only when repository policy explicitly declares the nonstandard single moving `latest` scheme. Ordinary releases follow repository instructions.
8
+ - **Smoke:** never - operator ruling 2026-09-29: do not run `gc.smoke.ps1`; treat the gc-* wrappers as trusted without a pre-flight gate.
@@ -0,0 +1,14 @@
1
+ # Intent routing
2
+
3
+ Routing belongs to the orchestrator and command frontmatter; this file is only a compact lookup.
4
+
5
+ - Reconnaissance → `explore`
6
+ - Project implementation → `build`
7
+ - Synthesis, operations, requested docs → `general`
8
+ - Independent verification → `reviewer`
9
+ - Global harness or credential-bearing paths → `vault`
10
+ - Planning-only conversation → `plan`
11
+
12
+ Explicit workflows: `/spec` → `spec-driven-development`; `/gauntlet` → `gauntlet`; standalone `--gc` → `git-ceremony`; standalone `--clean` → housekeeper (clean-mandate); direct performance-history questions → `pilot-report`.
13
+
14
+ Domain skills are procedures inside a worker brief, never dispatch authorities. A skill may not widen scope, choose seats, create session state, commit, publish, or advance lifecycle phases unless the user explicitly requested that action.
@@ -0,0 +1,15 @@
1
+ # Lifecycle boundaries
2
+
3
+ Before a consequential action, identify target, owner, blast radius, reversibility, dependencies, and proof.
4
+
5
+ - **Read-only:** inspect and report freely inside scope.
6
+ - **Bounded reversible:** ordinary requested edits and local checks may proceed.
7
+ - **Consequential external:** pushes, messages, remote mutations, installs, or shared-state changes require the request to include them.
8
+ - **Destructive or irreversible:** deletion, force, history rewrite, production mutation, and credential rotation require explicit authorization plus a recovery path.
9
+ - **Secrets and identity:** work by pointer; never render values.
10
+
11
+ One authorization covers the bounded action described. A material target, scope, blast-radius, or reversibility change must be surfaced before proceeding.
12
+
13
+ On failure, stop at the boundary, preserve evidence and rollback state, then recover inside scope or report the exact blocker. Never turn a failed check into permission for cleanup, rewrites, or a weaker check.
14
+
15
+ Use a script when the operation is repetitive, must keep secrets out of model context, or needs deterministic reuse. Otherwise prefer the direct native tool.
@@ -1,15 +1,23 @@
1
1
  # Model Keeper
2
2
 
3
- The `keeper` maintains the model picture: the catalog in `reference/models.md.example` and the agent model bindings in the file-based agent definitions under `~/.config/opencode/agents/*.md` (the `model:` frontmatter). `opencode.jsonc` carries global defaults and may mirror bindings; for a given agent, its `agents\*.md` file is authoritative. `/keeper` is the explicit refresh point. The keeper works from live evidence and reports changes, sources, and uncertainty — or a clean no-change result.
3
+ The `keeper` maintains the evidence-based model catalog in `~/.config/opencode/reference/models.md` and
4
+ the provider inventory (an adopter-owned companion file, e.g. `provider-model-inventory.md`, kept by the
5
+ keeper on first pass - **not** shipped with the harness). It does **not**
6
+ route models to agents and must never add, remove, or alter agent `model:` bindings.
7
+ Agent bindings exist per OWNER ORDER 2026-09-26 (`models.md` § Routing); the operator
8
+ owns them, not the keeper.
4
9
 
5
10
  ## Keeper pass
6
11
 
7
- 1. Read `reference/models.md.example`, the agent files in `~/.config/opencode/agents/*.md`, `opencode.jsonc`, and the harness references that describe routing.
8
- 2. Query the live provider catalogs and list the models and variants each one offers.
9
- 3. Check official pricing, context sizes, capabilities, and available variants for the candidate models.
10
- 4. Diff the live picture against the configured bindings and the catalog: additions, removals, renames, price changes, capability changes, and variant changes.
11
- 5. Update `reference/models.md.example` and the `model:` bindings in `agents\*.md` together (touching `opencode.jsonc` only when defaults or mirrored bindings change), keeping every configured agent binding in agreement with the catalog. Only the `keeper` writes agent files; one writer per artifact.
12
- 6. Validate: every `model:` frontmatter value parses and resolves against the catalog, agent files still parse with their frontmatter, and `opencode.jsonc` (if touched) stays consistent.
12
+ 1. Read `~/.config/opencode/reference/models.md` and the provider inventory.
13
+ 2. Query live provider catalogs and list available models and variants.
14
+ 3. Check official pricing, context sizes, capabilities, and variants for candidate models.
15
+ 4. Diff live evidence against the catalog: additions, removals, renames, price/capability
16
+ changes, and variant changes.
17
+ 5. Update the catalog and inventory only. Never add or restore an agent `model:` field,
18
+ change the TUI selection, or select a model on the operator's behalf.
19
+ 6. Validate model IDs and values against live catalogs; preserve uncertainty when sources
20
+ disagree. Report sources, verification date, and any unverified claims.
13
21
 
14
22
  ## Evidence rules
15
23
 
@@ -17,10 +25,22 @@ The `keeper` maintains the model picture: the catalog in `reference/models.md.ex
17
25
  - Official provider pricing is the price authority.
18
26
  - Promotions, temporary discounts, free trials, and usage multipliers are not routing evidence.
19
27
  - Record cache-read rates, context tiers, and per-model allocations when the source exposes them.
20
- - Record source URLs and the verification date in `reference/models.md.example`.
21
- - Preserve uncertainty when sources disagree; never invent a model ID, price, or variant.
28
+ - Preserve uncertainty; never invent a model ID, price, or variant.
22
29
  - Keep secrets by pointer only: never print, paste, log, or commit a key value.
23
30
 
24
31
  ## Cadence
25
32
 
26
- Refresh after a provider catalog change, an OpenCode update, or a recurring personal review. No background watcher runs on its own; the keeper runs when invoked. A no-change result is a valid outcome.
33
+ Recheck the date at `~/.config/opencode/reference/models.md:3`. Refresh after a provider catalog change, an
34
+ OpenCode update, or the listed review date. No background watcher runs on its own; the
35
+ keeper runs when invoked. A no-change result is valid.
36
+
37
+ Each pass also snapshots `https://opencode.ai/data` (the public usage board) into
38
+ the adopter's model data log (e.g. `model-data-log.md` beside `models.md`, created on first
39
+ pass - **not** shipped with the harness) for the tracked stable lineup: board rank, weekly tokens
40
+ and Δ, weekly retention, cost/session, and the model's Go allowance. Free, promo/
41
+ contributor, experimental, and superseded models are excluded from tracking. Record
42
+ events and claims with date, source, and a verification tag (**VERIFIED** / **UNVERIFIED**).
43
+ A no-change result is valid there too.
44
+
45
+ `~/.config/opencode/reference/model-test.md` is the optional Go-only contender bench for adding evidence to
46
+ the catalog; it does not change agent routing.
@@ -1,6 +1,11 @@
1
1
  # Model Test — fixed contender intake (Go only)
2
2
 
3
- How a new OpenCode Go model earns a row in `reference/models.md.example`. Same bytes in, same
3
+ > **TEMPLATE — unfilled contender bench (Go only).** This is the Go-only bench a new model
4
+ > runs to earn a row in `~/.config/opencode/reference/models.md`; the canonical 3-day recheck procedure is
5
+ > `~/.config/opencode/reference/model-keeper.md`. The `<DATE>` / `<YOUR_MODEL>` slots below are intentional
6
+ > template placeholders — fill them per bench series before citing a run as evidence.
7
+
8
+ How a new OpenCode Go model earns a row in `~/.config/opencode/reference/models.md`. Same bytes in, same
4
9
  harness around it, every time — so scores are comparable across models and across months.
5
10
 
6
11
  ## 0. Sweep (every recheck, every 3 days)
@@ -8,7 +13,7 @@ harness around it, every time — so scores are comparable across models and acr
8
13
  List the live catalog and diff against the ranked table — **all Go IDs are contenders**:
9
14
 
10
15
  ```powershell
11
- opencode models 2>$null | Select-String 'opencode-go/'
16
+ opencode models 2>$null | Select-String '<provider>/'
12
17
  ```
13
18
 
14
19
  **Fresh-online rule (standing):** re-pull the model list, prices, caps, and context
@@ -17,7 +22,7 @@ Never rank off a cached snapshot older than the current recheck; if a rate, cap,
17
22
  disagrees between sources, the live `opencode models` output wins for IDs and the Go
18
23
  docs win for prices, and the disagreement is recorded in one line.
19
24
 
20
- Any live ID not in `models.md.example`, or any ranked ID with a new variant/rung, enters intake below.
25
+ Any live ID not in `models.md`, or any ranked ID with a new variant/rung, enters intake below.
21
26
 
22
27
  ## 1. Third-party benchmarks first
23
28
 
@@ -66,7 +71,7 @@ labeled, never re-scored):
66
71
  2. Always pair the top rung against one level down on the fixed task.
67
72
  3. Keep the highest rung only if it wins clearly (better quality at acceptable cost —
68
73
  the Muse xhigh precedent: +3 qual, +73% TPS, −27% wall for +18%). Otherwise drop
69
- one and live there (the DeepSeek max precedent: 7,337 reasoning tokens, −5 quality,
74
+ one and live there (the verbosity precedent: 7,337 reasoning tokens, -5 quality,
70
75
  3× wall, +68% cost — verbosity that loses value to performance).
71
76
  4. No two models expose the same rungs — probe, never assume (`<YOUR_MODEL>` exposes none).
72
77
  - `steps: 8` ceiling, shell / web / subagents denied, 600 s hard timeout, single run
@@ -138,10 +143,10 @@ No standing persona panel exists; the objective /60 stays deterministic (DOM-mea
138
143
  lead-scored). When the top two are within 3 points, the subjective design /40 goes to a
139
144
  three-judge panel of existing specialists, each scoring blind from the artifact:
140
145
 
141
- - `security-auditor` — escape/XSS discipline, inline-script hygiene, autocomplete +
146
+ - `reviewer` (security lens) — escape/XSS discipline, inline-script hygiene, autocomplete +
142
147
  persistence privacy.
143
- - `reviewer` — correctness of states, a11y outcomes, focus management, no-dead-link rule.
144
- - `web-performance-auditor` — size budget, render cost, animation discipline,
148
+ - `reviewer` (correctness lens) — correctness of states, a11y outcomes, focus management, no-dead-link rule.
149
+ - `reviewer` (perf lens) — size budget, render cost, animation discipline,
145
150
  reduced-motion honesty.
146
151
 
147
152
  Majority moves the design score; dissent recorded in one line. Judges never touch the
@@ -168,4 +173,4 @@ Decision rule per contender run:
168
173
  - **Paired-rung upgrade:** if the top rung beats the usable rung on all three axes for
169
174
  +<25% cost (the Muse xhigh precedent), the rank holds the top rung, noted in the row.
170
175
 
171
- Then move the `models.md.example` recheck date +3 days. Never re-score old runs under a new rubric.
176
+ Then move the `models.md` recheck date +3 days. Never re-score old runs under a new rubric.
@@ -1,20 +1,31 @@
1
- # OpenCode Model Catalog — shipped skeleton
1
+ # OpenCode Model Catalog
2
2
 
3
- > **Recheck due: YYYY-MM-DD — every 3 days.** Procedure: `reference/model-test.md`.
3
+ > **Recheck due: `<date>` - every 3 days.** Procedure: `~/.config/opencode/reference/model-keeper.md`.
4
4
  > On recheck, move this date +3 days and re-verify the table below.
5
5
 
6
- This catalog ships with no adopted models: the harness is fully unwired by
7
- decision (see `.docs/unwired-routing.md`). When you wire an agent, add its
8
- `opencode-go/<id>` row here first — the harness doctor's Law 8 enforces that
9
- every live `model:` binding resolves against this table.
6
+ > **TEMPLATE - adopter-owned skeleton.** This file ships EMPTY of measured data by
7
+ > design: seat wiring lives in the adopter's `agents` map (or agent frontmatter) and is
8
+ > NOT shipped with the harness. The installer PRESERVES an existing file. Rows are
9
+ > recorded per `reference/model-keeper.md` - measured routes, prices, variants, and
10
+ > history are adopter evidence, never shipped.
10
11
 
11
- | # | Model (opencode-go/<id>) | Price in / out / cache-read | Monthly cap | Smart evidence | Cheap evidence | Status |
12
- |---|--------------------------|-----------------------------|-------------|----------------|----------------|--------|
12
+ This is an informational catalog of model IDs, provider availability, variants, and
13
+ measured route windows. It routes nothing itself - seat routing lives in the adopter's
14
+ `agents` map or agent frontmatter. The catalog's only machine-read contract is the table
15
+ below (`scripts/harness-doctor.ps1` parses the `Model (provider/<id>)` header and the
16
+ numbered backticked rows).
13
17
 
14
- ## Notes
18
+ Rates are USD per MTok, input / output / cache-read / cache-write. Context is
19
+ input / max output. `<...>` slots are placeholders the adopter fills on first
15
20
 
16
- - Columns follow the harness ordering: context gate first, then price, cap, and
17
- real measured evidence — never vendor claims.
18
- - The `model:` lines in `agents\*.md` must resolve against this table; the
19
- harness doctor's Law 8 enforces it.
20
- - Rank rows by judgment, not a single formula; state the judgment calls.
21
+ record; rows start empty - replace the example rows, never extend the table shape.
22
+
23
+ | # | Model (provider/<id>) | Context | Rate (in/out/read/write) | Variants | Status |
24
+ |---|----------------------|--------:|--------------------------|----------|--------|
25
+ | 1 | `provider/example-model-1` | `<context>` | `<in>/<out>/<read>/<write>` | `<variants>` | `<status>` |
26
+ | 2 | `provider/example-model-2` | `<context>` | `<in>/<out>/<read>/<write>` | `<variants>` | `<status>` |
27
+
28
+ Example rows above are structural placeholders - replace with measured rows recorded
29
+ per `reference/model-keeper.md`. No fallback ladder is shipped: provider errors are
30
+ reported by OpenCode; the catalog never retries, substitutes, or changes the selected
31
+ model.