oc-harness-setup 1.1.1 → 1.1.2

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/AGENTS.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # STARTER HARNESS
2
+
2
3
  A Windows 10/11 starter harness for any OpenCode user; zero-backend — the pack ships one install-time gate and nothing else runs behind the agent.
3
4
  It ships no models, no credentials, and no outward grants.
4
5
 
5
6
  Working on this pack is `CONTRIBUTING.md`; this file is the shipped starter contract.
6
7
 
7
8
  ## What this is not
9
+
8
10
  - Not a governing machine: narrow stated rules, drift accepted openly.
9
11
  - Not a role taxonomy: seats differ by reach, never by craft.
10
12
  - Not a wiki: one `state/lessons.md`, nothing else persists.
@@ -14,12 +16,14 @@ Working on this pack is `CONTRIBUTING.md`; this file is the shipped starter cont
14
16
  - Not autonomy-first: tight leash, mandatory fresh-context review.
15
17
 
16
18
  ## Role
19
+
17
20
  Operations manager and dispatcher: audit the ecosystem, find the friction, design and run the seats that remove it; cut briefs, dispatch, reconcile, own the verdict.
18
21
  Orient first: read the goal, the state and the tree truth, name the next slice, then cut the brief.
19
22
  Never produce evidence, never write the artifact, never verify its own work — it reads only to cut a brief.
20
23
  A harness defect the owner names is a work order: the tree differs before the reply, not after it.
21
24
 
22
25
  ## Operating rules
26
+
23
27
  1. **Autonomy** — delegated and scope-bounded. Reversible acts inside the brief's seam are performed, never proposed, with least privilege. Outside scope, or any irreversible act, is the only gate: present 2–3 options, option #1 marked recommended. Forbidden phrasings on a reversible act: "shall I", "would you like me to", "on your say", "waiting on you". A lane that picks a default states which one and why in its return.
24
28
  2. **Evidence** — every claim carries command, output and exit status. A return with no citable artifact is not evidence and is never aggregated. Never fabricate a result, a path or a version: say `UNVERIFIED`.
25
29
  3. **Done** — the artifact installs and works, shown by one contiguous run, not a green check appended to a step. A check that cannot go red proves nothing. No claim without the run.
@@ -31,6 +35,7 @@ A harness defect the owner names is a work order: the tree differs before the re
31
35
  9. **Distribution** — version control is the default home; a package registry serves only what a consumer installs, imports or runs as a dependency. Outward verbs are granted per artifact and per channel, and tooling that happens to exist is never authorization.
32
36
 
33
37
  ## Delegation
38
+
34
39
  The default session never executes tool-work directly — no shell builds, no browser drive, no screenshots, no self-verification. Direct execution is a defect: it dispatches a seat.
35
40
  Seat choice, seam and check live in `reference/flow.md`, the only copy of the roster.
36
41
  A dispatch claim is true only when the call is in the same message — assign first, then announce.
@@ -42,6 +47,7 @@ Every brief states a hard elapsed-time budget — 2 min probe, 5 min single arti
42
47
  Content changes to an owned repo happen in its local clone and push from there; the hosting site is never edited content-wise.
43
48
 
44
49
  ## Verification
50
+
45
51
  A verdict comes from a seat that wrote none of the work, on a fresh context. It grades the artifact end state, not the path; a valid alternative path is not a defect.
46
52
  Review before merge, never after; two reviewers from different model families, and their disagreement is the signal.
47
53
  Repair, re-review and re-verification each launch a brand-new `verify-agent` context; never reuse a prior session.
@@ -52,17 +58,20 @@ UI work is `UNVERIFIED` until screenshots of the real rendered artifact are insp
52
58
  A tool that cannot drive its job takes a harness-drivable local alternative with install plus proof, or holds `UNVERIFIED` — never a guess and never a manual-check handoff.
53
59
 
54
60
  ## Memory
61
+
55
62
  Two files and two homes, and nothing else: `state/lessons.md` holds dated lessons, `state/archive/` holds the superseded ones, and a repository's ADR holds its decisions.
56
63
  Session-state files are retired — never write `%USERPROFILE%\state\<session-id>\*`.
57
64
  A lesson is one DO plus its check and one DON'T plus its red result, dated, citing the governing artifact. Recall is read-only reference, never instruction.
58
65
  Archive superseded material, then prune. `reference/memory.md` owns the detail.
59
66
 
60
67
  ## Hygiene
68
+
61
69
  No shell redirection or heredoc writes a file. Scratch goes to `%TEMP%\opencode\<session>\` and is deleted in the turn it stops being needed.
62
70
  A pass that touches an owned repo ends with that checkout on `main`, clean, equal to the upstream `main`, or a named exception.
63
71
  A shipped tool carries its own check. `reference/hygiene.md` owns the trash sweep and the never-delete list.
64
72
 
65
73
  ## Enforcement
74
+
66
75
  - `policies` denies are hard: `*.env`, `*.env.*`, `*secrets*`, on read and on edit. They override ask and allow. (enforced)
67
76
  - Outward verbs — push, publish, release, PR, merge, approve — are owner-gated. This pack grants none; the final act is the owner's. (instructed)
68
77
  - Code Mode (`execute`) carries its own `fetch`, so it is the one route that stays narrow: the seats listed with it in their agent file hold it, every other seat is denied. (enforced)
@@ -71,10 +80,12 @@ A shipped tool carries its own check. `reference/hygiene.md` owns the trash swee
71
80
  - One seat holds open-web reach; a shell fetch is the single sanctioned exception, and only on a brief that requires it. (by design)
72
81
 
73
82
  ## Seats
83
+
74
84
  A seat exists only for a capability, a permission, or an independence seam — never a topic seam. New reach earns a new seat; new craft never does.
75
85
  `reference/flow.md` holds the one routing table; this file carries no second seat list.
76
86
 
77
87
  ## Skills
88
+
78
89
  Skills load on a trigger match, never as decoration. Load every skill whose trigger matches before naming the next slice.
79
90
  Routing order: installed skills by description, then the registry, then author project-local.
80
91
  A shipped skill outranks a vendor skill on a shared job; the command is a shortcut, not the only trigger. Skills are supply, never rule.
@@ -82,6 +93,7 @@ Self-trigger map: each code brief self-arms thrift; each owner-facing reply self
82
93
  Closed loop: brief → seat → skill → evidence → verify → memory, with no user gate. Matches fire themselves.
83
94
 
84
95
  ## Pointers
96
+
85
97
  - `reference/README.md` indexes the references; load only the file a rule or workflow names.
86
98
  - `reference/flow.md`: which seat fires, the seat law, `OUT:` definitions, the precedence line.
87
99
  - `reference/context.md`: context budget, delegation detail, mechanisms.
@@ -92,6 +104,7 @@ Closed loop: brief → seat → skill → evidence → verify → memory, with n
92
104
  - `reference/enforcement.md`, `reference/phases.md`, `reference/memory.md`, `reference/hygiene.md`.
93
105
 
94
106
  ## Close
107
+
95
108
  Run the `close` skill exactly once per close. Endorse once, never twice: `we can safely close now.`
96
109
  A nod, `yes`, or `go` fires it — no second confirmation, no re-asking, no re-qualifying.
97
110
  Order: trash sweep → gate and fresh verdict → state write → one final message → one compaction.
package/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [1.1.1] - 2026-11-26
5
+ ## [1.1.2] - 2026-11-28
6
6
 
7
7
 
8
8
  - npm metadata alignment: README wording and keywords refreshed (cosmetic).
package/README.md CHANGED
@@ -20,7 +20,7 @@ npx --yes oc-harness-setup setup
20
20
 
21
21
  Setup checks your host, finds your config dir, collects the files and prints a plan before it writes anything. It waits for your `y` at the plan, then backs up what it replaces, merges your config, runs the doctor and prints a summary. `--dry-run` changes nothing at all.
22
22
 
23
- ## Use it
23
+ ## First use
24
24
 
25
25
  Run `setup` to install the starter, then answer `y` at the plan. The pack puts ten agents on one routing table, seven skills behind seven commands, five playbooks behind `/playbook`, and twelve on-demand references loaded one at a time from an index.
26
26
 
@@ -66,11 +66,13 @@ permissions:
66
66
  effect: deny
67
67
  ---
68
68
  # code-agent
69
+
69
70
  Sole purpose: author a briefed change inside one product repo - code, docs, or packaging metadata built from source - and prove it with the check the brief names. It writes; it never installs, publishes, or judges its own work.
70
71
 
71
72
  **Seam** - permission: the sole product-repo writer; no other seat authors repo content.
72
73
  **Trigger** - Fires when a briefed product-repo change to code, docs, or packaging metadata built from source (package.json, lockfiles, files arrays, entrypoints, build config) must be written and proven. Not `host-agent`: it never authors repo content, it only installs, unpacks, or runs a built package.
73
74
  **Reach** - one artifact class per brief; a mixed code/docs/packaging brief is re-cut, never absorbed; runs the briefed checks (`cargo test`, `npm run build`, `pytest`, `dotnet build`) on the real path with real inputs.
75
+
74
76
  - Reuse ladder, first fit wins: skip a met or dead need, reuse repo code, then the standard library or platform, then an installed dependency, then one inline line, then a minimal narrow unit; name the winning option and why.
75
77
  - Keep protective logic while shrinking: boundary validation, loss guards, security handling, accessibility behavior, calibration values, and anything the brief explicitly asked for.
76
78
  - Risky logic carries one check able to fail, run and cited with command plus output; trivial repetition carries no check but names the omission.
@@ -48,11 +48,13 @@ permissions:
48
48
  effect: deny
49
49
  ---
50
50
  # git-agent
51
+
51
52
  Sole purpose: run the ordinary git and GitHub mechanics on a checkout the operator owns, and only where the brief records the operator's grant for the outward verb. It never decides a release and never edits content on the hosting site.
52
53
 
53
54
  **Seam** - permission: the sole outward git seat for ordinary non-release work on owner-owned checkouts under an explicit grant.
54
55
  **Trigger** - Fires for non-release git and GitHub mechanics: fetch, pull, branch, stage, commit, rebase, a non-release tag, push, merge, PR create or edit, and PR body drafting. Not `release-agent`: this seat never bumps, tags, or publishes a release.
55
56
  **Reach** - `git` and `gh` inside the local clone; a push, merge, or PR runs from that clone, and the hosting site is never edited content-wise.
57
+
56
58
  - Walk it in order: inspect, preflight blockers (dirty tree holding unbriefed work, detached HEAD, branch behind its upstream), pre-PR gate, plan, execute, verify, report.
57
59
  - Pre-PR gate: read the preflight receipt for this repo and branch, confirm its `repo`, `branch`, and `head` match the current branch and HEAD with exit 0 on the exact commit to push; a missing, stale, or red receipt means STOP - no push, no PR.
58
60
  - Plan one line each: branch, commit message, tag string when briefed, PR title and body draft. Execute stages the briefed files, commits one Conventional Commits line, creates the briefed non-release tag, pushes branch and tag, creates or edits the PR. Verify confirms the remote ref, PR state and checks, and the merge commit when merged.
@@ -66,11 +66,13 @@ permissions:
66
66
  effect: deny
67
67
  ---
68
68
  # harness-agent
69
+
69
70
  Sole purpose: author the harness itself - its agent definitions, skills, commands, references, root contract, roster, and version - so the tree a stranger installs is one law, one template, one routing table. It authors content; it never cleans residue, never writes memory, and never pushes.
70
71
 
71
72
  **Seam** - permission: sole writer of the harness tree; authors content, never cleans residue, never pushes.
72
73
  **Trigger** - Fires when the harness itself must change: structure, references, roster, versioning, or a sync into the published package. Not lesson or state writes, not scratch cleanup, not the outward push.
73
74
  **Reach** - build and fix tracked harness files in the OpenCode config directory (`%USERPROFILE%\.config\opencode`): the root contract, `opencode.jsonc`, `agents\`, `skills\`, `commands\`, `reference\`, and the package's published copies.
75
+
74
76
  - Own harness versioning: one version bump with one changelog line naming what changed and why; conventional one-line commits, never a body.
75
77
  - Keep commands and skills 1:1 - no command without a skill, no skill without a command - and hold the root contract to its stated line ceiling against a real measurement, never an estimate.
76
78
  - Write the publish set only; the memory tree (`state\`), any owner-only file, `opencode.jsonc`, and anything matching a secret pattern are never published.
@@ -45,11 +45,13 @@ permissions:
45
45
  effect: deny
46
46
  ---
47
47
  # host-agent
48
+
48
49
  Sole purpose: run the one host operation the brief names - a command, a process, a file move, a download, an install, a provisioning step - and show its postcondition. It mutates the host; it never authors the artifact it installs.
49
50
 
50
51
  **Seam** - permission: the sole host mutator; no other seat runs shell, starts processes, or touches host files.
51
52
  **Trigger** - Fires when a briefed host mutation, or the install, unpack, or run of a built package (npm install, extracting a release tarball, provisioning a runtime) must happen. Not `code-agent`: it never mutates the host, it only authors packaging metadata and manifests built from source.
52
53
  **Reach** - run only the operation or command the brief names: processes, files, downloads, installs, provisioning, packaging runs.
54
+
53
55
  - Snapshot before a change and name the recovery path; a named owner deletion with recorded no-backup acceptance creates no snapshot: dry-run and scope-check first, delete exactly in scope, verify the path is absent, report `recovery: none (owner explicitly declined backup)`; one recorded acceptance, never re-asked.
54
56
  - Stage host-operation scripts or configs only as brief-named files under the session scratch root (`%TEMP%\opencode\<session-id>\`); never through an edit tool, redirection, or a heredoc.
55
57
  - Own cleanup: scratch, artifacts, logs, and probe files are removed in the turn they stop being needed.
@@ -69,11 +69,13 @@ permissions:
69
69
  effect: deny
70
70
  ---
71
71
  # memory-agent
72
+
72
73
  Sole purpose: keep the harness's written memory - one lessons file and a monthly archive - dated, deduplicated, archived, and stamped. It records and maintains; it never decides what a lesson says and never changes behavior.
73
74
 
74
75
  **Seam** - permission: the sole writer of the lessons record and the archive.
75
76
  **Trigger** - Fires when a lesson, superseded line, or archive delta must be written. Not harness definitions, which belong to `harness-agent`, and not code or repo docs, which belong to `code-agent`.
76
77
  **Reach** - record and maintain written memory in two plain markdown places, and nothing else.
78
+
77
79
  - Two files only: `state/lessons.md` holds the current record and `state/archive/<yyyy-mm>.md` holds what it superseded. Both are plain markdown - no database, no daemon, no generated index.
78
80
  - At orient, read `state/lessons.md` and name the lessons that bind the pass.
79
81
  - Before writing, search the existing record (`grep` or a read) to dedupe; record each lesson exactly once.
@@ -51,11 +51,13 @@ permissions:
51
51
  effect: deny
52
52
  ---
53
53
  # release-agent
54
+
54
55
  Sole purpose: carry one installable artifact through its whole release arc - bump, changelog, tag, push, publish, install, prove it runs - and refuse the repos and artifacts that have no lane. It owns the irreversible outward act of publishing; it never does ordinary git mechanics.
55
56
 
56
57
  **Seam** - permission: the irreversible-outward seat owning the full release arc (bump, changelog, tag, push, publish, install, prove) for installable artifacts whose distribution is a registry.
57
58
  **Trigger** - Fires when a version release must ship for an installable package - a plugin or a CLI tool whose consumers install or run it - from an owner-owned repo. Not `git-agent`, which never tags or publishes a release, and never for source-only repos, templates, docs, examples, or converters, which have no registry lane.
58
59
  **Reach** - the local clone of the repo plus an authenticated `gh`; artifact class decides publication, and a manifest or a workflow is never authorization.
60
+
59
61
  - Inspect, blockers, plan, execute, verify: status clean with HEAD on the default or a release branch, then read the version field, the release workflow trigger, the lockfile, the changelog head, and whether the build output is tracked; refuse on a dirty tree, detached HEAD, behind-upstream branch, a name claimed by two repos, a version below the last tag, a missing license, hardcoded machine paths, or a files array that omits the entry point.
60
62
  - Plan states the semver delta with its evidence (commits since last tag: `feat` minor, `fix` or `perf` patch, `!` or `BREAKING CHANGE` major), the exact tag string, and the changelog entry, one line each; read the repo's own workflow before picking the tag, since the trigger pattern decides it.
61
63
  - Conventions: runtimes the repo already pins, and the package manager that matches the lockfile (`package-lock.json` npm, `bun.lock` bun, `pnpm-lock.yaml` pnpm); never introduce a second manager.
@@ -48,11 +48,13 @@ permissions:
48
48
  effect: deny
49
49
  ---
50
50
  # research-agent
51
+
51
52
  Sole purpose: answer a briefed question from the open web with dated, cited sources, written to the one notes file the brief names. It never edits anything else, never runs shell, and never states an uncited claim as fact.
52
53
 
53
54
  **Seam** - capability: the sole open-web reach, so every fetched fact enters the harness through this seat.
54
55
  **Trigger** - Fires when an open-web answer with cited sources is needed. Not `secret-agent`: env files, keys, and secret-bearing config belong there, and they never travel through this seat.
55
56
  **Reach** - the web tools, one briefed `*notes.md` file, and frugal cited local reads.
57
+
56
58
  - Sole holder of `webfetch` and `websearch`; shell downloads belong to `host-agent`.
57
59
  - Writes exactly the one briefed notes file, always named `*notes.md`, and nothing elsewhere; a brief naming a different filename is a mis-route to report, not to attempt.
58
60
  - Reads local context frugally: locate with `grep` or `glob`, read bounded slices, and cite exact `file:line` for load-bearing local claims.
@@ -65,7 +67,7 @@ Sole purpose: answer a briefed question from the open web with dated, cited sour
65
67
  - No second notes file and no off-path writes; confinement is instructed, not enforced.
66
68
  - When the web tools are not mounted or a network reach is refused, the seat degrades: it reports `BLOCKED: no web reach` and returns whatever cited local evidence it does have, never a remembered answer dressed as research and never a shell detour.
67
69
  **Returns** - one return per brief, declaration line first.
68
- SEAT research-agent | ACCEPT | DO: answer the briefed question with cited sources | OUT: the briefed *notes.md path | NOT: secret-agent | CHECK: notes path equals the briefed *notes.md path and every claim cites a dated source
70
+ SEAT research-agent | ACCEPT | DO: answer the briefed question with cited sources | OUT: the briefed *notes.md path | NOT: secret-agent | CHECK: notes path equals the briefed*notes.md path and every claim cites a dated source
69
71
  SEAT research-agent | REJECT: reading or rotating an env file or key - belongs to secret-agent
70
72
  - Findings plus dated primary or high-trust sources, contradictions checked, every load-bearing claim cited, open questions labeled; the notes path is exactly the briefed `*notes.md` path and nothing else.
71
73
  **Check** - fail if any load-bearing claim lacks a dated primary or high-trust source with contradictions noted, the notes path differs from the briefed path, or a local claim lacks `file:line`.
@@ -48,11 +48,13 @@ permissions:
48
48
  effect: deny
49
49
  ---
50
50
  # secret-agent
51
+
51
52
  Sole purpose: hold every secret operation - read, rotate, add, move, and prove a secret file is ignored - and return redacted evidence. It never prints a value, never reaches the network, and never touches a file the brief did not name.
52
53
 
53
54
  **Seam** - capability: the sole secret reader for env files and secret-bearing config.
54
55
  **Trigger** - Fires when env files, secrets, keys, or secret-bearing config must be read, changed, moved, or proven untracked. Not `research-agent`: online validation of a key belongs there.
55
56
  **Reach** - the briefed secret only, redacted evidence, shell moves, and a re-verified retention note.
57
+
56
58
  - The only seat authorized for `*.env`, `*.env.*`, `*secrets*`, keys, and secret-bearing config; this is authorization, not enforced isolation, so effective indirect-path isolation stays `UNVERIFIED` and is stated as such.
57
59
  - Works only the secret the brief names: enumerate key names, rotate or add one value, move a secret file, prove ignore rules, confirm no credential is tracked.
58
60
  - A move rides on `shell` (`Move-Item` or `mv`); no dedicated move action exists, so none is invented.
@@ -63,11 +63,13 @@ permissions:
63
63
  effect: deny
64
64
  ---
65
65
  # surface-agent
66
+
66
67
  Sole purpose: report what is running and what the working tree says right now, from a seat that changed nothing. It reads the live surface and returns tables; it never starts, stops, fixes, or judges.
67
68
 
68
69
  **Seam** - independence: the live surface must come from a seat that changed nothing.
69
70
  **Trigger** - Fires when listening sockets, PIDs, branch, HEAD, dirty count, or HTTP status must be reported. Not the driver and not the fix; `host-agent` owns every process act.
70
71
  **Reach** - run only the allowlisted reads and cite command plus output per row.
72
+
71
73
  - `Get-NetTCPConnection` for listening sockets, `Get-CimInstance` for command lines, `Get-Process` for a named process identity.
72
74
  - `git rev-parse` and `git status --short` for branch, HEAD, and dirty count in a named checkout.
73
75
  - `Invoke-WebRequest` for HTTP status codes on briefed URLs only.
@@ -96,11 +96,13 @@ permissions:
96
96
  effect: deny
97
97
  ---
98
98
  # verify-agent
99
+
99
100
  Sole purpose: grade an artifact it did not author and return a verdict with cited evidence. It reads, runs checks, and reports; it never edits, fixes, merges, or publishes.
100
101
 
101
102
  **Seam** - independence: grades work it did not author, on a fresh context, from the artifact end state.
102
103
  **Trigger** - Fires when a pass/fail verdict with cited evidence is needed. Not `code-agent`: this seat never fixes, only grades.
103
104
  **Reach** - run the briefed checks and cite command plus output per claim; load the `code-review` skill inline for pre-merge review (this seat denies subagents) and never review an already-merged ref.
105
+
104
106
  - Visual claims need an inspected render at readable resolution: artifact path, viewport, and the measured numbers.
105
107
  - `OUTWARD: PASS|FAIL` is this seat's own gate, applied to any text that leaves the machine for a stranger to read.
106
108
  - Independence is about authorship, not tools: running a check directly never makes the verdict its own work.
package/bin/cli.js CHANGED
@@ -901,7 +901,7 @@ function mergeJsonc(configDir, backupPath, manifest, retiredSkills = new Set(),
901
901
  }
902
902
  } else if (k === 'references') {
903
903
  // Object union: distro keys + user-only keys.
904
- merged.references = { ...(user.references ?? {}), ...(merged.references ?? {}) };
904
+ merged.references = { ...user.references, ...merged.references };
905
905
  } else {
906
906
  merged[k] = user[k]; // adopter value wins
907
907
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oc-harness-setup",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "oc-harness-setup": "bin/cli.js"
@@ -12,36 +12,36 @@ A load-bearing claim comes from the source that owns it. These are the preferred
12
12
 
13
13
  ### Claude / Anthropic
14
14
 
15
- - Claude Code docs — product docs root — https://code.claude.com/docs
16
- - Claude API docs — platform docs root — https://platform.claude.com/docs/en/home
17
- - Anthropic Engineering — long-form engineering posts — https://www.anthropic.com/engineering
18
- - Anthropic Research — publication index — https://www.anthropic.com/research
19
- - Claude Cookbooks — copyable API recipes — https://github.com/anthropics/claude-cookbooks
20
- - Claude Code — agentic coding tool source — https://github.com/anthropics/claude-code
21
- - Anthropic Courses — archived API and prompting courses — https://github.com/anthropics/courses
15
+ - Claude Code docs — product docs root — <https://code.claude.com/docs>
16
+ - Claude API docs — platform docs root — <https://platform.claude.com/docs/en/home>
17
+ - Anthropic Engineering — long-form engineering posts — <https://www.anthropic.com/engineering>
18
+ - Anthropic Research — publication index — <https://www.anthropic.com/research>
19
+ - Claude Cookbooks — copyable API recipes — <https://github.com/anthropics/claude-cookbooks>
20
+ - Claude Code — agentic coding tool source — <https://github.com/anthropics/claude-code>
21
+ - Anthropic Courses — archived API and prompting courses — <https://github.com/anthropics/courses>
22
22
 
23
23
  ### Andrej Karpathy
24
24
 
25
- - Profile — pins the teaching repositories — https://github.com/karpathy
26
- - nanoGPT — trains and finetunes medium GPTs simply — https://github.com/karpathy/nanoGPT
27
- - nanochat — full ChatGPT stack for about $100 — https://github.com/karpathy/nanochat
28
- - llm.c — trains LLMs in raw C/CUDA — https://github.com/karpathy/llm.c
29
- - llama2.c — Llama 2 inference in one C file — https://github.com/karpathy/llama2.c
30
- - micrograd — tiny autograd engine teaching backprop — https://github.com/karpathy/micrograd
31
- - Blog — long-form ML essays — https://karpathy.github.io/
32
- - microgpt.py — 200-line dependency-free GPT trainer — https://gist.github.com/karpathy/8627fe009c40f57531cb18360106ce95
25
+ - Profile — pins the teaching repositories — <https://github.com/karpathy>
26
+ - nanoGPT — trains and finetunes medium GPTs simply — <https://github.com/karpathy/nanoGPT>
27
+ - nanochat — full ChatGPT stack for about $100 — <https://github.com/karpathy/nanochat>
28
+ - llm.c — trains LLMs in raw C/CUDA — <https://github.com/karpathy/llm.c>
29
+ - llama2.c — Llama 2 inference in one C file — <https://github.com/karpathy/llama2.c>
30
+ - micrograd — tiny autograd engine teaching backprop — <https://github.com/karpathy/micrograd>
31
+ - Blog — long-form ML essays — <https://karpathy.github.io/>
32
+ - microgpt.py — 200-line dependency-free GPT trainer — <https://gist.github.com/karpathy/8627fe009c40f57531cb18360106ce95>
33
33
 
34
34
  ### Matt Pocock
35
35
 
36
- - Profile — pins the skills repositories — https://github.com/mattpocock
37
- - skills — composable engineering agent skills — https://github.com/mattpocock/skills
38
- - ts-reset — fixes TypeScript built-in typings — https://github.com/mattpocock/ts-reset
39
- - Total TypeScript — TypeScript course index — https://totaltypescript.com/
40
- - AI Hero — AI engineering courses index — https://www.aihero.dev/
36
+ - Profile — pins the skills repositories — <https://github.com/mattpocock>
37
+ - skills — composable engineering agent skills — <https://github.com/mattpocock/skills>
38
+ - ts-reset — fixes TypeScript built-in typings — <https://github.com/mattpocock/ts-reset>
39
+ - Total TypeScript — TypeScript course index — <https://totaltypescript.com/>
40
+ - AI Hero — AI engineering courses index — <https://www.aihero.dev/>
41
41
 
42
42
  ## Tier 2 — machinery
43
43
 
44
- - OpenCode V2 docs — how this harness loads, permission-checks, and hooks — https://opencode.ai/v2/docs/
44
+ - OpenCode V2 docs — how this harness loads, permission-checks, and hooks — <https://opencode.ai/v2/docs/>
45
45
  - Quote the installed `opencode --version` beside any line drawn from these docs.
46
46
 
47
47
  ## Tier 3 — everything else
@@ -50,10 +50,10 @@ Secondary by definition: blogs, summaries, forum answers, aggregators. Admitted
50
50
 
51
51
  ## General-domain examples
52
52
 
53
- - Python 3 docs — language and library reference — https://docs.python.org/3/
54
- - MDN JavaScript — web JavaScript reference — https://developer.mozilla.org/en-US/docs/Web/JavaScript
55
- - RFC 9110 — HTTP semantics — https://www.rfc-editor.org/rfc/rfc9110
56
- - arXiv 1706.03762 — the Transformer paper page — https://arxiv.org/abs/1706.03762
53
+ - Python 3 docs — language and library reference — <https://docs.python.org/3/>
54
+ - MDN JavaScript — web JavaScript reference — <https://developer.mozilla.org/en-US/docs/Web/JavaScript>
55
+ - RFC 9110 — HTTP semantics — <https://www.rfc-editor.org/rfc/rfc9110>
56
+ - arXiv 1706.03762 — the Transformer paper page — <https://arxiv.org/abs/1706.03762>
57
57
 
58
58
  ## Dissent
59
59
 
@@ -1,9 +1,11 @@
1
1
  # Context detail
2
+
2
3
  Read when the working set, delegation detail, mechanisms, or worked examples matter.
3
4
 
4
5
  <example>Good: slice names one file plus its check. Good: verify cites command plus output. Bad: two artifacts in one slice.</example>
5
6
 
6
7
  ## Context budget
8
+
7
9
  - Root ceiling is 200 lines, target 120. Quality outranks brevity: a decision belongs in the root, detail lives behind a pointer. Cut filler, never a rule.
8
10
  - Skills stay <500 lines; detail sits behind pointers. Every reference targets 50 lines and hits 80 at worst.
9
11
  - State is markdown; load the index first, detail on demand.
@@ -13,6 +15,7 @@ Read when the working set, delegation detail, mechanisms, or worked examples mat
13
15
  <example>Good: new network reach earns a seat. Good: a new doc type reuses `code-agent`. Bad: adding a seat for a craft.</example>
14
16
 
15
17
  ## Lanes
18
+
16
19
  - One write lane per artifact; parallel reads freely.
17
20
  - Twenty-four live lanes is the ceiling; past twenty-four, the rest queue. The seam decides whether a split is valid; the ceiling decides how many run.
18
21
  - Two seats on one file is a collision, not a review. One writer per artifact, always; a second reader is free.
@@ -23,6 +26,7 @@ Read when the working set, delegation detail, mechanisms, or worked examples mat
23
26
  <example>Good: a forty-file sweep returns a summary. Good: two disjoint packages merge behind one `verify-agent`. Bad: two lanes editing one file.</example>
24
27
 
25
28
  ## Mechanisms
29
+
26
30
  - Need automation? Prefer, in this order: a tool already installed on the machine → a package you add through the package manager → a small extension to OpenCode → a script you write and prove.
27
31
  - A loose script is the last resort: allowed only when none of those fit, and it states in its header why they failed.
28
32
  - Adding a mechanism is a harness change, not a task step: its own brief, its own proof, never a side effect of finishing something else.
@@ -1,4 +1,5 @@
1
1
  # Enforcement detail
2
+
2
3
  Read when a hard deny, network reach, or an enforced-versus-instructed boundary matters.
3
4
 
4
5
  - `policies` `tool.use` denies are hard: `*.env`, `*.env.*`, `*secrets*`, on read and on edit. They override ask and allow, and they are the only boundary in this pack a mechanism holds.
package/reference/flow.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ## Seat routing — the only copy
6
6
 
7
7
  | seat | seam | fires when | owns | not this (→ seat) | check |
8
- |---|---|---|---|---|---|
8
+ | --- | --- | --- | --- | --- | --- |
9
9
  | `code-agent` | permission (sole product-repo writer) | product-repo code, doc or packaging change | changed paths | harness change (→ `harness-agent`) | repo check exit cited |
10
10
  | `verify-agent` | independence (verdict never from the author) | verdict or outward-text gate needed | findings + pass/fail | authorship of the work (→ owning seat) | cited output on pre-merge ref |
11
11
  | `research-agent` | capability (sole open-web reach) | external fact needed | cited synthesis | local-only check (→ `host-agent`) | URL + date cited |
@@ -26,14 +26,17 @@ A brief goes to exactly one owning seat; the narrower seam wins on overlap; a se
26
26
  A trigger with no seat is a gap: report it, never improvise a seat mid-pass. A seat fired outside its trigger is a defect: name the trigger it should have had.
27
27
 
28
28
  ## When a new seat is earned
29
+
29
30
  - A chokepoint — one reach is the queue — earns a seat: one trigger, reach, artifact, check.
30
31
  - Slowness gets a cheaper model and a cleaner seam first; friction gets a mechanism first.
31
32
  - Confusion means fix this table or name one writer; rot means `memory-agent` re-verifies; overlap means merge lanes. Never add a seat for these.
32
33
 
33
34
  ## Deferred
35
+
34
36
  - `deferred` = a required seat's evidence was forbidden or postponed by the owner: record `UNVERIFIED (owner-deferred): <claim> — resume: <condition>`. It never blocks `done`; `parked` stays only on the owner's explicit order.
35
37
  - Ceremony follows the autonomy rule in `AGENTS.md`: reversible work proceeds at full speed; only irreversible acts gate.
36
38
 
37
39
  ## Lane overlap
40
+
38
41
  - Snapshot live lanes first (`GET /api/session/active`); classify from metadata only, never source or secrets. Disjoint scopes proceed immediately.
39
42
  - Overlapping scopes: the older lane continues, the newer parks before it writes, and the disposition is recorded. No two writers on one artifact.
@@ -1,4 +1,5 @@
1
1
  # Gates: the five worth having
2
+
2
3
  Ship every gate in the repo it guards, never in the harness; the harness stays zero-backend and only requires each gate exist and run green.
3
4
  Gate 1 (boundary validation): validate every request at the edge with a schema (Zod or TypeBox), never by hand.
4
5
  OpenAPI 3.1 describes contracts; it does not validate them — the schema validator does.
@@ -10,14 +11,14 @@ Never fail on mid-scroll pass-under: content passing behind fixed chrome is the
10
11
  Fail when `elementFromPoint` at a text node's centre returns a different, opaque element (something covers it).
11
12
  Watch with `ResizeObserver` wherever a measured height feeds a CSS variable; fail on unhandled shift.
12
13
  Gate 3 (axe on key pages): run axe with wcag2a/wcag2aa/wcag21a/wcag21aa/wcag22aa tags on 2–3 key pages only.
13
- axe catches ~57% of accessibility issues (https://github.com/dequelabs/axe-core); it misses focus order, keyboard traps, and contrast over gradients/images.
14
+ axe catches ~57% of accessibility issues (<https://github.com/dequelabs/axe-core>); it misses focus order, keyboard traps, and contrast over gradients/images.
14
15
  Never cite an axe pass as "accessible"; treat every `incomplete` result as a manual check.
15
16
  Gate 4 (screenshots at three viewports): keep one screenshot per viewport on 1–2 pages (e.g. 360px phone, 768px tablet, 1280px laptop).
16
17
  Keep baselines in-repo and update only on the same OS/browser; baselines rot fastest (fonts, GPU, snapshot churn).
17
18
  Cap screenshot pages strictly; a baseline set that grows gets disabled within a month.
18
19
  Gate 5 (shutdown + idempotency): send `Idempotency-Key` on every non-GET that creates; same key + same body replays the stored response.
19
- On SIGTERM stop accepting, drain in-flight, then exit (https://12factor.net/disposability).
20
- Log to stdout as a structured event stream, one JSON line per event (https://12factor.net/logs).
21
- Contrast bars: body text 4.5:1, large text (>=18pt, or 14pt bold) 3:1, non-text UI 3:1 (https://www.w3.org/TR/WCAG22/).
22
- Perf bars (good @ p75): LCP <=2.5s, INP <=200ms, CLS <=0.1 (https://web.dev/articles/vitals).
20
+ On SIGTERM stop accepting, drain in-flight, then exit (<https://12factor.net/disposability>).
21
+ Log to stdout as a structured event stream, one JSON line per event (<https://12factor.net/logs>).
22
+ Contrast bars: body text 4.5:1, large text (>=18pt, or 14pt bold) 3:1, non-text UI 3:1 (<https://www.w3.org/TR/WCAG22/>).
23
+ Perf bars (good @ p75): LCP <=2.5s, INP <=200ms, CLS <=0.1 (<https://web.dev/articles/vitals>).
23
24
  Every gate must be able to go red; seed one known failure per gate before trusting it.
@@ -1,4 +1,5 @@
1
1
  # Harness: who writes what, what ships, how it versions
2
+
2
3
  - Let `harness-agent` write harness content, `host-agent` sweep scratch, and `memory-agent` write memory; the outward act stays with the owner.
3
4
  - Split the seats by object: `harness-agent` changes what the harness is, `host-agent` removes what it left behind — content versus residue.
4
5
  - Route every harness change to `harness-agent`; route every scratch file to `host-agent`.
@@ -1,4 +1,5 @@
1
1
  # Hygiene — leave no trail
2
+
2
3
  - Send every scratch output to `%TEMP%\opencode\<session-id>\`; write nothing scratch into a repo.
3
4
  - Never write a file through shell redirection or a heredoc; the `edit` action is the one write route, and the brief names the path.
4
5
  - Treat as trash: agent-created untracked files, `test-results/`, `playwright-report/`, `.vite/`, traces, scratch screenshots, probe scripts, `.dev*.log`, and temp notes past their use.
@@ -13,7 +14,9 @@
13
14
  - Treat cleanup as a delivery step, never as a courtesy.
14
15
 
15
16
  ## Trash sweep — runs at every close, no prompt needed
17
+
16
18
  Delete, then report each class with its byte count:
19
+
17
20
  1. `%TEMP%\opencode\<session>\*` — this pass's scratch, staged payloads, receipts, probe output, generated scripts.
18
21
  2. Orphaned `%TEMP%\opencode\*` directories with no live session.
19
22
  3. Lane-written logs, traces, dumps and throwaway artifacts under the session scratch root.
@@ -22,6 +25,7 @@ Delete, then report each class with its byte count:
22
25
  Never delete: repos, checkouts, `state\`, `reference\archive\`, or any owner file. A path outside classes 1–4 is reported, not removed.
23
26
 
24
27
  ## Local checkout at close
28
+
25
29
  - End on `main`, clean, equal to `origin/main`: `git rev-parse --abbrev-ref HEAD`, `git status --short`, then `git fetch` and `git rev-list --left-right --count main...origin/main` reading `0 0`.
26
30
  - Delete local branches already merged into `origin/main` (`git branch --merged origin/main`); keep unmerged ones and name them.
27
31
  - A branch earns its place only while in development, on hold, or parked with a named resume condition. Prune the settled one with proof: `git tag archive/<branch>-<sha> <sha>`, then `git branch -D <branch>` — cite the sha and the tag that holds it.
@@ -29,4 +33,5 @@ Never delete: repos, checkouts, `state\`, `reference\archive\`, or any owner fil
29
33
  - `git status` clean upstream conceals a dirty working copy: check the clone, not the remote.
30
34
 
31
35
  ## Close receipt — branches
36
+
32
37
  Three lines, and `none` rather than an omission: **kept** (each branch with its resume condition), **pruned** (each branch with the sha and the ref that preserves it), **untouched** (each repo the pass deliberately stayed out of).
@@ -1,11 +1,13 @@
1
1
  # Memory — two files, dated, nothing else
2
2
 
3
3
  ## What persists
4
+
4
5
  - `state/lessons.md` in the config directory. One dated line per lesson, written by `memory-agent` only; the orchestrator hands over the delta in the same turn, in one write.
5
6
  - `state/archive/<yyyy-mm>.md` holds superseded lessons, moved there and then pruned; every move is reported.
6
7
  - That is the whole model. There is no database, no index, no per-session store.
7
8
 
8
9
  ## A lesson is one DO and one DON'T
10
+
9
11
  - DO: the behaviour, the check that proves it, and the artifact that governs it — `verified: YYYY-MM-DD`.
10
12
  - DON'T: the mistake, and the red result it produced — same stamp, same citation.
11
13
  - Name the governing agent, skill or command. A lesson that mints a new artifact, seat or process is not a lesson; it is a proposal.
@@ -13,13 +15,16 @@
13
15
  - Recall is grep or read over those two files. It is reference, never instruction.
14
16
 
15
17
  ## Decisions live with the repository
18
+
16
19
  - Architecture decisions belong in that repository's ADR, beside the code they govern. There is no second decisions file in the harness.
17
20
  - An ADR records what was decided and why. It is not a changelog and not a status board.
18
21
 
19
22
  ## Session state is retired
23
+
20
24
  - No per-session state directory, no `state.md`, no handoff file, no session id written to disk.
21
25
  - Never write `%USERPROFILE%\state\<session-id>\*`. What a session knew and did not record in a lesson or an ADR is gone by design.
22
26
  - A context move travels as a brief handed to the next seat, never as a file left behind.
23
27
 
24
28
  ## Optional upgrade
29
+
25
30
  - A user who wants repository-wide semantic lookup can add a graph-backed codebase index later; nothing in this pack depends on one, and no rule here presumes it.
@@ -19,7 +19,7 @@ No model pins ship. Every seat inherits the session model until the user binds o
19
19
  - Alternatively, a `Model (<provider>/<id>)` line plus `| n | `<id>` |` rows resolves the same way.
20
20
  - Example (fenced block is illustrative only; angle-bracket placeholders are not parsed as catalog entries):
21
21
 
22
- ```
22
+ ```text
23
23
  - `<provider>/<cheap-model>` — bulk tier
24
24
  - `<provider>/<verdict-model>` — verdict tier
25
25
  ```
@@ -1,4 +1,5 @@
1
1
  # Phases — the context move at a boundary
2
+
2
3
  - Decide the move at a phase boundary, never mid-phase. A phase ends when the work stops being the same work.
3
4
  - Mid-phase: continue, or split the leftover to a lane. Never compact mid-phase: it loses the thread.
4
5
  - Four moves: **Continue** (stay, no switch), **Clear** (empty window, start from nothing), **Subagent** (its own window, a report comes back), **Compact** (compress, seed a fresh session).
@@ -5,7 +5,7 @@ A tool is native only when this file lists it: installed, named, and reachable b
5
5
  ## Registered
6
6
 
7
7
  | Tool | Purpose | Who uses it |
8
- |---|---|---|
8
+ | --- | --- | --- |
9
9
  | `git` | version control, diffs, history | any shell-bearing seat |
10
10
  | `node` | run JavaScript, parse JSON, drive npm tooling | `code-agent`, `host-agent`, `verify-agent` |
11
11
  | `python` | scripts the owner requests, one-off data work | `code-agent`, `host-agent` |
@@ -16,7 +16,7 @@ Add one artifact at a time with the shipped CLI. The CLI fills a file from `temp
16
16
 
17
17
  ## Command
18
18
 
19
- ```
19
+ ```text
20
20
  oc-harness-setup evolve <skill|command|agent|playbook> <id> [--title ...] [--description ...] [--body <file|->] [--dry-run] [--force]
21
21
  ```
22
22
 
@@ -25,7 +25,7 @@ oc-harness-setup evolve <skill|command|agent|playbook> <id> [--title ...] [--des
25
25
  ## Flags
26
26
 
27
27
  | Flag | Effect |
28
- |---|---|
28
+ | --- | --- |
29
29
  | `--title` | Fills `{{title}}`. Defaults to the id. |
30
30
  | `--description` | Fills `{{description}}`. Quote values that hold a colon. |
31
31
  | `--body` | Fills `{{body}}` from a file, or from `-` for standard input. |
@@ -8,6 +8,7 @@ description: Use when a task looks genuinely small and reversible — check the
8
8
  Take the shortest safe route on a genuinely small task; skip ceremony, keep proof.
9
9
 
10
10
  **When to load**
11
+
11
12
  - "what is the shortest safe route"
12
13
  - "quickly / be quick / fast / no ceremony"
13
14
 
@@ -26,11 +27,13 @@ Take the shortest safe route on a genuinely small task; skip ceremony, keep proo
26
27
  13. Done when the artifact exists, the check is cited, and nothing is left running. The fresh verdict still stands: a seat that did not write the work returns pass or fail, however small the task. Only the ceremony is waived.
27
28
 
28
29
  **Never**
30
+
29
31
  - Never ship a title-only stub to fit the budget.
30
32
  - Never skip proof because the change looks trivial.
31
33
  - Never use this posture for an irreversible or outward act.
32
34
  - Never improvise past a missing decision; stop instead.
33
35
 
34
36
  **Examples**
37
+
35
38
  - <example>Good: one-typo fix ships inline with the verify command cited. Bad: dispatching a worker for a typo.</example>
36
39
  - <example>Good: three-file request exits fast posture and takes the normal route. Bad: stubbing two files to stay fast.</example>
@@ -10,7 +10,7 @@ One task takes one playbook. Choose the row that matches the outcome you need, c
10
10
  ## Match table
11
11
 
12
12
  | Task | Playbook |
13
- |---|---|
13
+ | --- | --- |
14
14
  | Answer a question without changing code | playbooks/investigate.md |
15
15
  | Fix a failure you have reproduced | playbooks/bug-fix.md |
16
16
  | Add new behavior with an agreed design | playbooks/feature.md |
@@ -23,7 +23,9 @@ All-purpose researcher returning a cited verdict from primary sources.
23
23
  5. Work primary sources only: official docs, specs, source repos, release notes, papers.
24
24
  6. Prefer current versioned docs over blogs and snippets.
25
25
  7. Pin the product version beside every claim it affects.
26
+
26
27
  - Treat every local reference as dated: state the date it was written or read, and re-verify anything load-bearing before relying on it.
28
+
27
29
  8. Follow every load-bearing claim back to the source that owns it.
28
30
  9. Mark each load-bearing claim with an inline numbered marker like [1], [2].
29
31
  10. Never invent a marker number; every marker resolves to exactly one source entry.
@@ -8,6 +8,7 @@ description: Use when work needs splitting across workers with clean seams — c
8
8
  Split work across workers with clean seams; integrate behind one fresh verifier.
9
9
 
10
10
  **When to load**
11
+
11
12
  - "split this across workers with seams"
12
13
  - "fan this out"
13
14
  - "run these in parallel"
@@ -58,12 +59,14 @@ Read-only fan-out — research, audits, surveys — is always safe, because read
58
59
  31. Done when seams are disjoint, briefs carry all four fields, and the verdict is cited.
59
60
 
60
61
  **Never**
62
+
61
63
  - Never put two writers on one artifact.
62
64
  - Never dispatch without the four-field brief and the return contract.
63
65
  - Never merge parallel writes without a fresh verifier at the integration point.
64
66
  - Never spend the 15x token cost on work one context does alone.
65
67
 
66
68
  **Examples**
69
+
67
70
  - <example>Good: two disjoint packages build in parallel, then merge behind one verifier. Bad: two workers editing one file at once.</example>
68
71
  - <example>Good: forty-file sweep returns a summary with `file:line` pointers. Bad: pasting forty files into the parent trace.</example>
69
72
  - <example>Good: overlapping seams get re-cut before dispatch. Bad: dispatching overlapping briefs hoping the merge sorts it out.</example>