@hecer/yoke 1.17.0 → 1.19.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/README.md CHANGED
@@ -1,957 +1,143 @@
1
1
  <div align="center">
2
2
 
3
- <h1><img src="https://raw.githubusercontent.com/HECer/yoke/v1.17.0/docs/assets/yoke-logo.png" alt="Yoke" width="100" height="63"></h1>
3
+ <img src="https://raw.githubusercontent.com/HECer/yoke/main/docs/assets/yoke-logo.png" alt="Yoke" width="104">
4
4
 
5
- <!-- yoke:version:start -->1.17.0<!-- yoke:version:end -->
6
- <!-- yoke:tests:start -->1298<!-- yoke:tests:end -->
7
- <!-- yoke:skills:start -->34<!-- yoke:skills:end -->
8
- <!-- yoke:agents:start -->Claude | Codex | Gemini | Qwen | OpenCode | Kilo | Pi | Hermes<!-- yoke:agents:end -->
9
-
10
- ### One harness, eight agents — and zero trust in "done."
5
+ # Yoke
11
6
 
12
- **Yoke** installs one curated canon of skills, **mechanical safety gates**, and tool wiring into any project — natively for **Claude Code, OpenAI Codex CLI, Gemini CLI, Qwen Code, OpenCode, Kilo, Pi coding agent, and Hermes Agent**. Its opt-in loop implements and verifies stories before committing. Independent review and browser proofs run when configured; screenshots and videos require the browser smoke gate.
7
+ ### Autonomous coding across your agents. Proof before done.
13
8
 
14
9
  [![npm](https://img.shields.io/npm/v/%40hecer%2Fyoke?logo=npm&color=CB3837)](https://www.npmjs.com/package/@hecer/yoke)
15
- [![npm downloads](https://img.shields.io/npm/dm/%40hecer%2Fyoke?logo=npm)](https://www.npmjs.com/package/@hecer/yoke)
16
10
  [![CI](https://github.com/HECer/yoke/actions/workflows/ci.yml/badge.svg)](https://github.com/HECer/yoke/actions/workflows/ci.yml)
17
- [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](#-license)
18
- ![Node](https://img.shields.io/badge/node-%E2%89%A520-339933?logo=node.js&logoColor=white)
19
- ![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)
20
- ![Tests](https://img.shields.io/badge/tests-1298%20defined-blue.svg)
21
- ![Agents](https://img.shields.io/badge/agents-Claude%20%7C%20Codex%20%7C%20Gemini%20%7C%20Qwen%20%7C%20OpenCode%20%7C%20Kilo%20%7C%20Pi%20%7C%20Hermes-8A2BE2)
22
- ![Built with TDD](https://img.shields.io/badge/built%20with-TDD%20%2B%20review-ff69b4.svg)
23
-
24
- **Install:** [`npm i -g @hecer/yoke`](https://www.npmjs.com/package/@hecer/yoke)
25
-
26
- </div>
27
-
28
- > **TL;DR** — `yoke setup .` asks six questions and installs the native harness for your agent. `yoke new my-app --idea="..."` bootstraps a project and drafts its story backlog. `yoke loop run my-app --isolate --review` then implements it behind hard gates: **clean tree → acceptance criteria → your real tests green → an independent model approves → commit**. Add `--parallel=N` for dependency-aware workers, or declare a reference and add `--quality` for a bounded critic/repair gauntlet. If any blocking gate is red, nothing is committed. Proof lives in `.yoke/proof/<story>/`.
29
-
30
- **New in 1.15.0:** federated [Code Intelligence](docs/CODE-INTELLIGENCE.md) composes Graft, Graphify and Serena behind one Yoke-controlled MCP surface, with structural and semantic evidence, content-addressed snapshots, partial-coverage reporting and isolated edit previews. It is opt-in: use `off` for the unchanged legacy path, `shadow` for read-only canaries, or `active` for previews and approved edits. The [1.14.0 dashboard overhaul](docs/DASHBOARD-OVERHAUL.md) and first-class [OpenCode, Kilo and Pi integrations](docs/HARNESSES.md) remain available. See the [changelog](CHANGELOG.md) and [Code Intelligence guide](docs/CODE-INTELLIGENCE.md) for setup and limitations.
31
-
32
- OpenCode, Kilo and Pi are real CLI integrations, not bundled runtimes or credentials. OpenCode/Kilo use their JSON headless modes and local MCP configuration; Pi uses JSONL and explicit tool allowlists, but has no native MCP, sub-agent or plan layer. Read the [integration guide](docs/HARNESSES.md) before selecting a permission profile.
33
-
34
- **Fixed in 1.15.1:** multi-turn Pi usage accounting, provider error/progress handling, task-specific time ranges and missing skill resources. Pi has been supported since **1.13.0**; current Pi versions require explicit project trust for project-local skills in headless runs. The [agent/skill hardening audit](docs/AGENT-HARDENING-2026-09-16.md) documents the fixes, migration notes and validation limits.
35
-
36
- ### One dashboard, multiple projects
11
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
12
+ ![Node.js 20+](https://img.shields.io/badge/node-%E2%89%A520-339933?logo=node.js&logoColor=white)
37
13
 
38
- ```sh
39
- npm install -g @hecer/yoke@latest
40
- yoke projects add /path/to/frontend
41
- yoke projects add /path/to/backend
42
- yoke dashboard --no-register
43
- ```
14
+ <!-- yoke:version:start -->1.19.0<!-- yoke:version:end --> · <!-- yoke:tests:start -->1339<!-- yoke:tests:end --> test cases · <!-- yoke:skills:start -->34<!-- yoke:skills:end --> skills
44
15
 
45
- Open the printed `http://127.0.0.1:...` URL. Each registered project has its own goals, tasks and evidence. The dashboard is a local control room with an overview/ranking screen, project live view, bounded **History explorer**, and Workspace analytics by UTC time bucket. It shows worker state, agent/provider/model/variant/role/phase metadata when recorded, per-task duration estimates, planned start offsets, input/output tokens, reported costs, outcomes, and explicit unknown or partial measurements. Dark and light themes, keyboard navigation, responsive layouts, and reduced-motion handling are included.
16
+ <!-- yoke:agents:start -->Claude | Codex | Gemini | Qwen | OpenCode | Kilo | Pi | Hermes<!-- yoke:agents:end -->
46
17
 
47
- The dashboard includes attention-first project search and filters, project ranking by attention, last activity, token usage, reported cost, acceptance, or name, restorable view links, and usage comparisons against the preceding period. From a project’s live view you can request a safe-boundary pause or resume, add an operator note, and use **Queue a change** for the next planning boundary. See [dashboard behavior and measurement limits](docs/DASHBOARD-EVOLUTION.md) and the [dashboard overhaul contract](docs/DASHBOARD-OVERHAUL.md).
18
+ </div>
48
19
 
49
- Projects are registered explicitly; this version does not automatically discover every process or aggregate other computers. Dashboard controls call the existing goal/loop pause and resume boundaries and never execute arbitrary shell commands. Change requests are append-only pending inbox entries, not immediate code changes. The server stays loopback-only and POST actions require same-origin session authorization; the local Yoke process remains the authority for execution. Missing history appears as unknown; time ranges are empirical estimates, not exact deadlines. Read the [overhaul contract](docs/DASHBOARD-OVERHAUL.md) for data limits and non-goals.
20
+ Yoke turns a goal into acceptance-tested stories, coordinates one or more coding agents, and commits work only after the configured checks pass. Run a normal backlog to completion, or optionally let Yoke explore for evidence-backed improvements and continue the same verified loop.
50
21
 
51
- ### Verified goals and efficient execution
22
+ ## How it works
52
23
 
53
- ```sh
54
- yoke check /path/to/project --json
55
- # First define executable criteria and protected tests in .yoke/acceptance.yaml.
56
- yoke goal set /path/to/project --objective="Complete guest checkout" --attempts=3 --minutes=30
57
- yoke goal run /path/to/project --runner=codex
58
- yoke goal resume /path/to/project --runner=claude
59
- yoke goal handoff /path/to/project
24
+ ```mermaid
25
+ flowchart LR
26
+ A[Goal and acceptance criteria] --> B[PRD stories and dependencies]
27
+ B --> C[Agent workers in isolated worktrees]
28
+ C --> D{Acceptance tests and configured gates}
29
+ D -- needs work --> C
30
+ D -- passes --> E[Commit and local proof]
31
+ E -. explore enabled .-> F[Evidence-backed next tasks]
32
+ F --> B
60
33
  ```
61
34
 
62
- Goals persist their objective, attempts and check evidence across runs. Changed protected tests block acceptance; failed work is retained. Explicit routing rules bypass controller calls, configured tool actions use no model, and failed rule-based attempts can escalate to a stronger worker. Context selection stays within a character budget; declared write scopes and dependencies guide parallel scheduling.
63
-
64
- See the [1.7 workflow guide](docs/VERIFIED-PROJECTS.md) for setup, Gemini selection, recovery and budgets. Provider contracts do not establish equal model quality; live comparative savings and calibrated time predictions remain unmeasured. Token budgets apply between provider calls, and browser proofs still require a configured smoke gate.
65
-
66
- Yoke 1.5 keeps failed gate output compact without throwing evidence away: deterministic previews
67
- retain actionable failures and final summaries, while large complete stdout/stderr remains available
68
- in private, content-addressed local artifacts. Existing projects keep their serial behavior and use
69
- safe 2 KiB preview / 8 KiB artifact defaults unless configured otherwise.
70
-
71
- Yoke 1.4 introduced opt-in parallel workers and a bounded, reference-driven quality gauntlet.
72
- Automatic parallelism was introduced in Yoke 1.8.0. This unreleased branch adds a shared cross-project worker pool. See [the 1.4 migration guide](docs/MIGRATING-TO-1.4.md)
73
- for the new flags, configuration, cleanup behavior, and review-verdict contract.
35
+ Each story carries observable acceptance criteria and targeted test commands. Parallel workers take independent stories; Yoke checks their integrated result before committing. Proof is saved under `.yoke/proof/`.
74
36
 
75
- Yoke 1.1 is safe-by-default: provider CLIs use autonomous sandbox profiles unless `--unsafe`
76
- is explicit; reviews require a schema-valid verdict and a different model unless
77
- `--allow-self-review` is explicit; commits enforce the human identity from project config or Git.
78
- See [the 1.1 migration guide](docs/MIGRATING-TO-1.1.md) for setup/decision parity and
79
- [the 1.0 guide](docs/MIGRATING-TO-1.0.md) for the earlier safety-policy changes.
37
+ ## What Yoke adds
80
38
 
81
- ---
39
+ | Capability | What it does for you |
40
+ | --- | --- |
41
+ | **Verified completion** | Checks acceptance criteria, the project verify command, and any configured completion, review, quality, or browser gates before accepting work. |
42
+ | **Parallel execution** | Schedules independent stories in isolated worktrees, respects dependencies and write scopes, and coordinates a shared worker limit across projects. |
43
+ | **Long-running autonomy** | Recovers from provider failures and blocked work. Optional exploration discovers new, repository-evidenced tasks after the planned backlog drains. |
44
+ | **A choice of agents** | Uses the native CLI for Claude, Codex, Gemini, Qwen, OpenCode, Kilo, Pi, or Hermes. Install and authenticate the CLI you choose; Yoke does not bundle model runtimes or credentials. |
45
+ | **Project visibility** | A local dashboard shows project status, **Workspace analytics**, **History**, and controls such as **Queue a change**, safe-boundary pause/resume, and operator notes. It runs with the local Yoke process. Dark and light themes are available. |
46
+ | **Optional Pi efficiency** | An opt-in SoL-Pi integration exposes per-project mechanism settings for Pi. It is off by default; benchmark results are not a savings guarantee. |
82
47
 
83
- ## Qwen Code, DeepSeek and Kimi
48
+ ## Quick start
84
49
 
85
- Qwen Code supports Yoke's setup, routing, planning and review workflows. New Qwen
86
- setups use your configured model. To add DeepSeek and Kimi API model profiles:
50
+ Requires Node.js 20+ and Git. Install Yoke and create a project with a draft backlog:
87
51
 
88
52
  ```sh
89
- yoke setup . --yes --agent=qwen --runner=qwen --model-provider=deepseek,kimi
53
+ npm install --global @hecer/yoke
54
+ yoke new my-app --idea="A reading list app" --agent=codex --runner=codex
90
55
  ```
91
56
 
92
- Set `DEEPSEEK_API_KEY` and `MOONSHOT_API_KEY` in the environment. Presets include
93
- DeepSeek V4 Flash/Pro and Kimi K2.6/K2.7 Code/K3, executed through Qwen Code.
94
- See [setup, permissions, reasoning configuration and validation limits](docs/QWEN-MODEL-SUPPORT.md).
95
-
96
- ## Why Yoke exists
97
-
98
- Agentic coding in 2026 fails in four well-documented ways. Yoke answers each one **mechanically** — in code, not in a prompt the agent can ignore:
99
-
100
- | The pain | What actually happens | What Yoke does about it |
101
- |---|---|---|
102
- | 🎭 **The verification gap** — *"agent says done, but it isn't"* | A success message can omit untested acceptance criteria. | The loop executes acceptance and project checks. Enabled review and browser gates must pass before a story lands. `yoke check` exposes unmapped outcomes as unverified. |
103
- | 🔀 **Four agents, four configs** | Teams hand-maintain `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, skills, and MCP wiring separately — copy-paste drift everywhere | **One canon → `yoke retrofit`** generates the idiomatic native artifacts for each agent. Change the canon once, re-retrofit everywhere. |
104
- | 🌀 **Overnight loops going off the rails** | Raw Ralph-loop users "wake up to broken codebases that don't compile" | Yoke is **"Ralph, but with gates"**: clean-worktree gate, acceptance-criteria gate, green-tests gate, review gate, per-story worktree isolation, idle-timeout watchdog, single-flight lock, commit integrity. |
105
- | 😵 **Review fatigue** | AI adoption nearly doubles PR volume and review time; humans start skimming | **`yoke review`**: a second model writes a schema-validated pass/fail verdict — chainable into verify, pre-push, or CI. Cross-model review catches what self-review misses. |
106
-
107
- **Who it's for:** anyone driving Claude Code, Codex CLI, Gemini CLI, Qwen Code, OpenCode, Kilo, Pi or Hermes on real projects — especially if you use more than one, want autonomous runs you can trust, or are tired of "done" meaning "probably". Greenfield (`yoke new`) and brownfield (`yoke retrofit`) both work.
108
-
109
- **Who it's not for:** if you want a chat pair-programmer with no process, you don't need a harness. Yoke is for shipping with discipline.
110
-
111
- ## Example: idea → verified implementation
112
-
113
- ```console
114
- $ yoke new reading-app --idea="a web app that tracks my reading list"
115
- ✓ reading-app bootstrapped. # git repo · harness for all agents · context · PRD drafted from the idea
116
-
117
- $ yoke prd check reading-app
118
- ✓ PRD valid — 8 stories, 0 pass
119
-
120
- $ yoke loop on reading-app
121
- $ yoke loop run reading-app --isolate --review --max=10
122
- ▶ STORY-1 (0/8 · 0%) — implementing… · verifying… · reviewing… · committing…
123
- ✓ STORY-1 done in 3m12s — 1/8 (13%) · ~22m left
124
- ▶ STORY-2 (1/8 · 13%) — implementing… · ~22m left (Ø 3m12s/story)
125
- ✓ STORY-2 done in 2m48s — 2/8 (25%) · ~18m left
126
- ▶ STORY-3 (2/8 · 25%) — implementing… ✘ blocked: story did not verify (tests red)
127
- # nothing was committed. fix, then re-run.
128
-
129
- $ ls reading-app/.yoke/proof/STORY-2/
130
- home.png list.png # example when browser smoke is configured
131
- ```
132
-
133
- This is an illustrative transcript. Actual durations depend on the project, provider, retries and enabled gates; browser proof requires a configured smoke flow. See [how it was built](#-why--how-it-was-built).
134
-
135
- ## 🚀 Quickstart
136
-
137
- ```bash
138
- npm install -g @hecer/yoke # → global `yoke` on your PATH
139
- # (or from source: git clone https://github.com/HECer/yoke.git && cd yoke && npm install && npm run build && npm link)
140
-
141
- # Greenfield: idea → loop-ready project in one command
142
- yoke new my-app --idea="a CLI that tracks reading lists"
143
- yoke loop on my-app && yoke loop run my-app --isolate
144
-
145
- # — or retrofit an existing project —
146
- yoke setup /path/to/project # interactive: agents, graph, loop, runner, decisions, routing
147
- yoke validate canon # sanity-check the canon
148
- yoke loop run /path/to/project --isolate --parallel=3 --reviewer=codex --max=20
149
- ```
150
-
151
- > Requires Node ≥ 20 and git. No global install? `node /path/to/yoke/dist/cli.js …` or `npm --prefix /path/to/yoke run yoke -- …` work too. The MCP tools (rtk, graphify/Serena, Playwright MCP) are wired by Yoke but installed separately — the generated config is a clearly-labelled, adjustable template.
152
-
153
- ### Skills before the first setup
154
-
155
- The canon is also packaged as a Claude Code plugin — the repo is its own marketplace:
156
-
157
- ```text
158
- /plugin marketplace add HECer/yoke
159
- /plugin install yoke@yoke
160
- ```
161
-
162
- That gives you all canon skills under the `yoke:` namespace (e.g. `yoke:tdd`, `yoke:review`) inside Claude Code — no retrofit needed. The `yoke` CLI (loop, gates, retrofit for Codex/Gemini/Qwen/OpenCode/Kilo/Pi/Hermes) still comes from `npm i -g @hecer/yoke`. Gemini CLI users can likewise `gemini extensions install https://github.com/HECer/yoke`.
163
-
164
- For Codex, no preinstalled skill is required: run `npx @hecer/yoke setup .` in a terminal, or
165
- ask Codex to run the six-question Yoke setup flow. The retrofit writes native skills to
166
- `.agents/skills/`, including `yoke-retrofit` and `yoke-workflow`; start a fresh Codex task if an
167
- already-open task does not discover newly installed skills. The npm package also contains
168
- `.codex-plugin/plugin.json` for Codex plugin hosts.
169
-
170
- ### Staying up to date
171
-
172
- Yoke checks for new releases npm/gh-style: a **non-blocking background check** (at most once a day, detached, offline-safe) prints a one-line hint when a newer version exists — upgrading itself is always an explicit act:
173
-
174
- ```bash
175
- yoke upgrade # npm install -g @hecer/yoke@latest
176
- ```
177
-
178
- Disable the check with `YOKE_NO_UPDATE_CHECK=1` (it is also silent in CI, `--json` runs, and piped output). Projects that want the loop to self-update can opt in via `.yoke/config.yaml`:
179
-
180
- ```yaml
181
- update:
182
- auto: true # upgrade at loop START only — never mid-run; applies from the next invocation
183
- ```
184
-
185
- Auto-upgrade is deliberately **not** the default: a gate harness shouldn't change itself mid-project, and unreviewed auto-installs are a supply-chain hazard.
186
-
187
- ## 🤖 Driving it through an agent
188
-
189
- Yoke is meant to be operated *by* your coding agent — after a retrofit, the agent has the skills, the safety policy, and the routing, so it knows the methodology. Copy-paste prompts (identical wording works for Claude Code, Codex CLI, Gemini CLI, Qwen Code, OpenCode, Kilo, Pi, and Hermes):
190
-
191
- > **Set it up** — *"Set up Yoke in this project. Ask me the Yoke setup questions one at a time with your recommendation, then run `yoke setup . --yes` with the selected host, agents, code graph, loop, runner, and decision policy. Commit in my configured identity."*
192
-
193
- > **Work the disciplined way** — *"From now on follow the Yoke skills you just installed: brainstorm → spec → plan → TDD → review before merging. Use the `review` skill before any merge."*
194
-
195
- > **Plan, then run autonomously** — *"Use the `yoke-workflow` skill. Ask only the planning questions that materially change the product, write the approved plan and loop-ready stories, then execute every approved story without routine follow-ups. Follow the configured `auto` or `critical` decision policy."*
196
-
197
- > **Watch / unblock** — *"Run `yoke loop status .`. If it says BLOCKED, run the project's verify command, find the root cause, fix it without weakening tests, then continue the loop."*
198
-
199
- > ⚠️ **Long runs from inside an agent session:** `yoke loop run` has no story cap by default; it continues until every planned story passes or a gate blocks. A multi-story run can therefore outlive most agents' shell-tool timeouts (Claude Code's Bash tool defaults to 2 minutes). If the outer tool call is killed mid-run, you get a stale lock and possibly half-finished state — which *looks* like a hang. Run the loop **in the background** (e.g. Claude Code's `run_in_background`), use `--max=3..5` only when you intentionally want a bounded batch, poll with `yoke loop status`, and after any interrupted run do `yoke loop cleanup` before the next one. A `running` status with no update for 20+ minutes on a claude runner is worth checking — since 0.5.0 the runner streams continuously, so prolonged true silence is no longer normal.
200
-
201
- > ⚠️ **Never kill agent processes by name or command-line pattern** (e.g. every process matching `dangerously-skip-permissions`): on a machine running several yoke projects, that takes down the *healthy* runners of the other projects mid-story — they stall and their loops block. `yoke loop cleanup` is the scoped alternative: each watchdog records its pids in the project's `.yoke/runner.pid`, and cleanup kills exactly those recorded trees — nothing else on the machine.
202
-
203
- ### Agent cheat sheet — every command is an exit-code contract
204
-
205
- Yoke's CLI is deterministic and chainable by design: an agent (or a shell `&&`) can branch on exit codes without parsing prose.
206
-
207
- | Command | What it does | Exit codes |
208
- |---|---|---|
209
- | `yoke dashboard [dir] [--no-register] [--port=N]` | Local overview for every registered project; optionally register `dir` first | `0` stopped normally · `1` shutdown failure · `2` unavailable |
210
- | `yoke projects add\|list\|remove` | Register a project, list registrations or remove a reference by ID | `0` · `2` invalid/unavailable |
211
- | `yoke check [dir] [--json] [--requirement=] [--protect [--refresh]]` | Execute acceptance checks or explicitly pin their infrastructure | `0` passed/pinned · `1` failed · `2` unverified/unavailable |
212
- | `yoke goal set\|run\|resume\|pause\|status\|handoff\|budget [dir]` | Durable objectives, provider handoff, protected checks and checkpoint budgets | run/resume: `0` complete · `1` unfinished · `2` unavailable |
213
- | `yoke setup [dir] [--yes] [--host=] [--agent=] [--runner=] [--code-graph=] [--code-intelligence=off\|shadow\|active] [--decision-policy=] [--loop\|--no-loop] [--routing\|--no-routing] [--model-provider=deepseek,kimi]` | Shared setup for all eight harnesses; optional federated code intelligence and DeepSeek/Kimi API profiles | `0` · `1` invalid setup |
214
- | `yoke code-intelligence-server [--workspace=] [--mode=off\|shadow\|active]` | Serve the single Yoke-controlled MCP facade for federated code intelligence | `0` · `1` invalid/unavailable |
215
- | `yoke validate [canonDir]` | Validate the canon (schema, frontmatter, templates) | `0` valid · `1` errors |
216
- | `yoke new <dir> [--idea=] [--agent=] [--runner=] [--loop]` | Greenfield bootstrap: git init → scaffold → retrofit → context → PRD (drafted from `--idea`) → committed | `0` · `1` usage / non-empty dir / draft failed (scaffold survives) · `2` draft agent unavailable |
217
- | `yoke retrofit [dir] [--agent=claude,codex,gemini,qwen,opencode,kilo,pi,hermes\|all] [--code-graph=graphify\|serena] [--code-intelligence=off\|shadow\|active] [--loop]` | Install/update the harness for the selected agents, non-destructively | `0` |
218
- | `yoke prd draft [dir] --idea= [--runner=] [--force]` | Idea → 5–12 stories with testable acceptance criteria | `0` · `1` invalid/guarded · `2` agent unavailable |
219
- | `yoke prd check [dir]` | PRD lint gate (schema, dependencies, cycles, duplicate ids, acceptance) | `0` valid · `1` violations |
220
- | `yoke change add\|status [dir] [--idea=]` | Queue a change at any time; the loop turns it into append-only stories at the next safe boundary | `0` · `1` invalid inbox/request |
221
- | `yoke context init\|status [dir]` | Durable context layer (`PROJECT/DECISIONS/KNOWLEDGE/GLOSSARY.md`, optional `CONTEXT-MAP.md`) | `0` |
222
- | `yoke loop on\|off\|status\|decision\|answer\|resume\|run\|cleanup [dir]` | Autonomous loop; `run` supports `--parallel=N`, bounded reference-driven `--quality`, and blind `--candidates=N` selection; `--max=N` creates an intentional batch cap; `cleanup` retains worktrees unless `--remove-worktrees` is explicit | run: `0` complete · `1` blocked/cap · `2` not runnable / already locked · `3` paused |
223
- | `yoke review [dir] [--reviewer=] [--base=] [--focus=] [--json] [--allow-self-review]` | An independent model writes a schema-valid verdict | `0` approved · `1` findings/invalid verdict · `2` no independent reviewer |
224
- | `yoke audit [dir] [--json]` | Dependency, high-confidence secret, and sensitive-change audit | `0` green · `1` blocking findings · `2` not runnable |
225
- | `yoke design-scan [dir] [--max=N] [--report]` | Static AI-slop design gate | `0` within budget · `1` over |
226
- | `yoke flow-smoke [dir] [--url=] [--label=]` | Browser gate with screenshot/video proofs | `0` green · `1` failures · `2` not runnable |
227
-
228
- A genuinely hung agent self-terminates after the idle timeout (default 20 min; `--timeout`), and `yoke loop status` shows the live phase or a `⚠ possibly stuck` hint — an autonomous run is never a black box.
229
-
230
- ## ⚖️ How it compares — superpowers · gstack · Yoke
231
-
232
- Three excellent projects, three different jobs. Honest version:
233
-
234
- | | [superpowers](https://github.com/obra/superpowers) (obra) | [gstack](https://github.com/garrytan/gstack) (Garry Tan) | **Yoke** |
235
- |---|---|---|---|
236
- | **What it is** | The canonical *skills methodology*: brainstorm → plan → TDD → review as composable skills | A *software factory* for Claude Code: ~40 role skills (QA, CSO, ship…) + a real Chromium browser layer | A *cross-agent harness*: one canon → native installs, plus a gated autonomous loop |
237
- | **Agents** | Claude Code first | Claude Code + hosts like Codex/Cursor/Kiro — **no Gemini CLI** | **Claude Code, Codex CLI, Gemini CLI, Qwen Code, OpenCode, Kilo, Pi, Hermes** from one source of truth |
238
- | **Enforcement** | Advisory — skills *describe* the discipline; following them is up to the agent | Skill-driven; browser QA is genuinely real | **Mechanical** — gates live in code: clean tree, acceptance criteria, green tests, review verdict, commit integrity |
239
- | **Autonomy** | Interactive sessions | Interactive slash-commands (`/qa`, `/ship`, …) | Opt-in **Ralph loop** with watchdog, worktree isolation, single-flight lock, per-story proofs |
240
- | **Visual QA** | — | **Best-in-class**: live browser daemon (Chromium/CDP) with deep interactive QA | Built-in `flow-smoke` gate: screenshots always, video on failure, labelled per story — lighter, but *enforced* and cross-agent |
241
- | **Cross-model review** | — | `/codex` second opinion (Codex-only direction) | `yoke review` — resolves an independent provider and validates a structured verdict, inside or outside the loop |
242
- | **Footprint** | Markdown skills (plugin) | ~230 MB with browser runtime; hourly auto-update | Node CLI + markdown canon; Playwright only if you use flow-smoke, resolved **from your project** |
243
- | **License** | MIT | MIT | MIT |
244
-
245
- **They compose — use all three where they're strongest.** Yoke's canon *ships* the superpowers methodology natively for all eight agents (13 skills, [attributed](canon/skills/ATTRIBUTION.md)). And if gstack is installed, `yoke retrofit` detects it and adds a routing note to `CLAUDE.md` telling Claude to prefer gstack's live-browser `/qa`, `/cso`, and ship pipeline for what Yoke deliberately doesn't bundle — no dependency, no conflict, and non-Claude artifacts stay uniform.
246
-
247
- **Choose Yoke when** you run more than one agent, want autonomy you can audit (gates + proofs + logs), or want one place to maintain your team's methodology. **Choose gstack when** you live 100% in Claude Code and want the deepest interactive browser QA. **Choose superpowers when** you want the methodology alone, interactively, in Claude Code — or just use it *through* Yoke.
248
-
249
- ## 🏗️ Architecture
250
-
251
- You curate **one source of truth** — skills, policy, and tool wiring. Yoke generates the **idiomatic, native artifacts** each agent expects, non-destructively, into any repo:
252
-
253
- ```mermaid
254
- flowchart TD
255
- Canon["📦 CANON — single source of truth<br/>skills · policy · loop spec · tool wiring"]
256
- Skill["🛠️ yoke retrofit<br/>detect → plan → apply (backup) → report"]
257
- Canon --> Skill
258
- Skill --> Claude["Claude Code<br/>.claude/skills · .mcp.json · hook"]
259
- Skill --> Codex["Codex CLI<br/>AGENTS.md · config.toml · RTK.md"]
260
- Skill --> Gemini["Gemini CLI<br/>GEMINI.md · commands · settings.json"]
261
- Skill --> Qwen["Qwen Code<br/>QWEN.md · skills · settings.json"]
262
- Skill --> OpenCode["OpenCode<br/>AGENTS.md · opencode.json · .opencode/skills"]
263
- Skill --> Kilo["Kilo<br/>AGENTS.md · kilo.jsonc · .kilo/skills"]
264
- Skill --> Pi["Pi<br/>AGENTS.md · .pi/settings.json · .pi/skills"]
265
- Skill --> Hermes["Hermes<br/>AGENTS.md · .hermes/skills · yoke-reviewer.md"]
266
- Loop["🤖 yoke loop — autonomous Ralph loop<br/>gates · verify · review · isolation · proofs"]
267
- Claude -. drives .-> Loop
268
- Codex -. drives .-> Loop
269
- Gemini -. drives .-> Loop
270
- Qwen -. drives .-> Loop
271
- OpenCode -. drives .-> Loop
272
- Kilo -. drives .-> Loop
273
- Pi -. drives .-> Loop
274
- Hermes -. drives .-> Loop
275
- ```
276
-
277
- Three layers — **Canon** (`yoke validate`) → **Retrofit** (`yoke retrofit`) → **Loop** (`yoke loop`) — on top of a durable **Context layer** (`yoke context`).
278
-
279
- ### What gets generated per agent
280
-
281
- | Agent | Artifacts |
282
- |---|---|
283
- | **Claude** | Complete skill packages under `.claude/skills/` (including referenced resources), `AGENTS.md`, `CLAUDE.md`, `.mcp.json` (code-graph + Playwright), and an rtk `PreToolUse` hook when WSL is available |
284
- | **Codex** | Complete skill packages under `.agents/skills/`, per-skill implicit-invocation policy, `AGENTS.md`, `RTK.md`, `.codex/config.toml`, native hooks, reusable `.codex/agents/*.toml`, and package plugin metadata |
285
- | **Gemini** | Complete skill packages under `.gemini/skills/`, an auto-invocation index, `GEMINI.md`, `.gemini/commands/*.toml`, and `.gemini/settings.json` (MCP + `AGENTS.md` context) |
286
- | **Qwen** | Complete skill packages under `.qwen/skills/`, `QWEN.md`, `.qwen/settings.json`, native invocation restrictions, and an RTK PreToolUse retry guard |
287
- | **OpenCode** | Complete skill packages under `.opencode/skills/`, shared `AGENTS.md`, merged `opencode.json` (instructions + local MCP), and `.opencode/agents/yoke-reviewer.md` |
288
- | **Kilo** | Complete skill packages under `.kilo/skills/`, shared `AGENTS.md`, merged `kilo.jsonc` (instructions + local MCP), and `.kilo/agents/yoke-reviewer.md` |
289
- | **Pi** | Complete skill packages under `.pi/skills/`, shared `AGENTS.md`, and merged `.pi/settings.json`; Pi's tool allowlists are applied at invocation time |
290
- | **Hermes** | Complete skill packages under `.hermes/skills/`, shared `AGENTS.md`, and `.hermes/agents/yoke-reviewer.md` |
291
-
292
- > **rtk integration:** Claude receives its PreToolUse hook; Codex receives a native hook adapter around `rtk hook check`; Gemini retains instruction-mode fallback where its CLI has no equivalent command-rewrite lifecycle.
293
-
294
- > **Composes with gstack:** if [gstack](https://github.com/garrytan/gstack) is installed (repo-local or global), `yoke retrofit` adds a short "Composed tools" routing note to **CLAUDE.md only** — telling Claude to prefer gstack's skills for capabilities Yoke doesn't ship (live-browser QA `/qa`, security audit `/cso`, ship/deploy `/ship`). No bundling, no dependency; the note is never written to the Codex or Gemini artifacts.
295
-
296
- > **Your content survives re-retrofits — preserve blocks:** anything you put between
297
- > `<!-- yoke:preserve:start -->` and `<!-- yoke:preserve:end -->` in a generated file is
298
- > carried into the regenerated version on every future `yoke retrofit`. The generated
299
- > `CLAUDE.md` and `GEMINI.md` ship an empty preserve block scaffold — put your project-specific
300
- > instructions (tech stack, workflow, `@`-includes) inside it. Works in any yoke-written file;
301
- > content *outside* the markers is still replaced (and backed up under `.yoke/backup/`).
302
-
303
- ## 🧰 What's in the canon — 34 skills
304
-
305
- `yoke retrofit` installs all of these into each selected agent natively. Provenance is credited in [`canon/skills/ATTRIBUTION.md`](canon/skills/ATTRIBUTION.md).
306
-
307
- To stop overlapping skills from auto-invoking against each other, `canon/AGENTS.md` carries a **skill routing & precedence** block (methodology before role; one canonical entrypoint per concern — e.g. pre-merge code review is always `review`), emitted into all eight agents.
308
-
309
- Each manifest entry also declares `invocation: auto|manual`. Retrofit translates that intent into
310
- the provider's native controls: Claude and Qwen disable model invocation for manual skills, Codex writes
311
- `agents/openai.yaml`, Gemini lists only automatic skills in its generated index, and OpenCode/Kilo/Pi/Hermes
312
- receive complete project-local skill packages. Validation
313
- rejects conflicting package metadata and broken local Markdown links before anything is installed.
314
-
315
- **Process / methodology** — *superpowers-derived discipline (13)*
316
-
317
- | Skill | What it does |
318
- |---|---|
319
- | `brainstorming` | Explore intent, requirements & design before any creative work |
320
- | `writing-plans` | Turn a spec into a bite-sized, TDD implementation plan |
321
- | `executing-plans` | Execute a written plan in a separate session with review checkpoints |
322
- | `subagent-driven-development` | Run a plan task-by-task: fresh subagent + two-stage review each |
323
- | `tdd` | Write the test first, watch it fail, write minimal code, refactor |
324
- | `systematic-debugging` | Root-cause first — no fix without a confirmed cause |
325
- | `verification-before-completion` | Prove it actually works before claiming done |
326
- | `using-git-worktrees` | Isolated worktrees for safe / parallel work |
327
- | `requesting-code-review` | Request a structured review before merging |
328
- | `receiving-code-review` | Handle review feedback with rigor, not blind agreement |
329
- | `dispatching-parallel-agents` | Fan out 2+ independent tasks concurrently |
330
- | `finishing-a-development-branch` | Merge / PR / cleanup a finished branch |
331
- | `writing-skills` | Author and verify new skills |
332
-
333
- **Roles** — *gstack-derived, de-gstacked to be harness-agnostic (7)*
334
-
335
- | Skill | What it does |
336
- |---|---|
337
- | `plan-eng-review` | Architecture / edge-case review of a *plan* |
338
- | `plan-ceo-review` | Founder-mode scope & ambition review of a plan |
339
- | `review` | Single canonical pre-merge code review — diff safety + engineering quality (architecture, edge cases, tests, performance) |
340
- | `ship` | Ship workflow: tests → review → version → changelog → PR |
341
- | `health` | Code-quality dashboard with a composite score |
342
- | `retro` | Engineering retrospective from commit history |
343
- | `document-release` | Post-ship documentation sync (README / CHANGELOG / …) |
344
-
345
- **Yoke-native** — *authored or adapted for this harness (14)*
346
-
347
- | Skill | What it does |
348
- |---|---|
349
- | `yoke-retrofit` | Set up the Yoke harness in a project (detect → plan → apply) |
350
- | `yoke-workflow` | Provider-neutral planning questions → approved PRD → autonomous stories → critical-decision resume |
351
- | `authoring-prd` | Slice a product idea into loop-ready stories with testable acceptance criteria |
352
- | `minimal-code` | Write the least code that solves the task (YAGNI; ponytail-derived) |
353
- | `performance` | Efficiency as a measured requirement: benchmarks as tests, budgets as gates, optimizations local + documented |
354
- | `maintaining-context` | Keep `.yoke/context/` the durable source of truth (the Context layer) |
355
- | `workflow` | The default order of operations, from idea to deploy |
356
- | `unslop-ui` | Detect & remove AI-slop design tells (purple gradients, neon glow, emoji-icons…) |
357
- | `visual-verification` | Widen verify to design-scan + the built-in `yoke flow-smoke` gate (screenshot proofs; video on failure) |
358
- | `no-ai-slop` | Detect and edit generic AI prose while preserving the author's voice; includes its evaluation rubric |
359
- | `domain-modeling` | Model boundaries, invariants, vocabulary, context maps, and decision records before implementation |
360
- | `codebase-design` | Explore architecture, deepen a chosen design, and compare two viable approaches when tradeoffs matter |
361
- | `resolving-merge-conflicts` | Resolve conflicts by reconstructing intent, then verify the integrated result |
362
- | `writing-for-agents` | Write compact agent instructions with explicit triggers, constraints, resources, and checks |
363
-
364
- ## 🌱 Zero to 100: `yoke new` + `yoke prd`
365
-
366
- Yoke's greenfield entrypoint — one command from idea to loop-ready project:
367
-
368
- ```bash
369
- yoke new my-app --idea="a CLI that tracks reading lists" # scaffold + retrofit + context + PRD
370
- yoke loop on my-app && yoke loop run my-app --isolate # hand it to the loop
371
- ```
372
-
373
- `yoke new <dir>` refuses a non-empty directory (greenfield-only — use `yoke retrofit` for
374
- existing projects), then: creates and `git init`s the directory, writes a minimal scaffold
375
- (`README.md`, `.gitignore`), runs the full **retrofit** (`--agent=` as usual), initialises the
376
- **context layer** (with `--idea` seeded into `PROJECT.md` as the north star), writes a commented
377
- **PRD template** to `.yoke/prd.yaml`, and makes the initial commit — so `--isolate` works from
378
- iteration 1. With `--idea`, it then drafts the PRD from your idea via an agent (`--runner=`,
379
- the configured runner or active host) and commits it as a second commit (`docs: draft PRD from idea`).
380
-
381
- - **Exit codes** — `0` success; `1` usage / non-empty dir / draft failure (the scaffold survives —
382
- retry with `yoke prd draft`); `2` requested draft agent unavailable.
57
+ Set `verify.command` in `my-app/.yoke/config.yaml` to the project's real test command, then run:
383
58
 
384
- **`yoke prd draft [dir] --idea="..."`** turns an idea into 5–12 small, independently shippable
385
- stories with testable behavioral acceptance criteria (greenfield STORY-1 scaffolds the project
386
- skeleton + test suite and wires `verify.command`). An existing PRD with stories is never
387
- overwritten without `--force`; the untouched template doesn't trigger the guard. Runs through
388
- the same idle-timeout watchdog as the loop (`--timeout`). If `.yoke/plan.md` exists, its approved
389
- goals, non-goals, constraints, and decisions are injected as settled context instead of being
390
- reopened by the drafting agent.
391
-
392
- **`yoke prd check [dir]`** is the chainable pre-loop lint gate: schema validation plus
393
- duplicate-id, empty-acceptance, unresolved-placeholder, and zero-stories checks. Exits `0` with
394
- `✓ PRD valid — N stories, M pass`, `1` on any violation. The `authoring-prd` canon skill
395
- teaches interactive sessions the same story-slicing discipline.
396
-
397
- ## 🤖 The autonomous loop
398
-
399
- Opt-in; `yoke setup` recommends enabling it for new installs, while `retrofit` alone keeps it off unless requested. Each iteration starts a **fresh agent** and passes through hard gates before anything is committed:
400
-
401
- ```mermaid
402
- flowchart LR
403
- I[consume queued change<br/>as new stories] --> A[pick next PRD story]
404
- A --> B{clean worktree?}
405
- B -- no --> X[blocked]
406
- B -- yes --> C{acceptance<br/>criteria?}
407
- C -- no --> X
408
- C -- yes --> D[agent implements<br/>one story]
409
- D --> E{suite + criterion<br/>proof green?}
410
- E -- no --> X
411
- E -- yes --> V{UI design<br/>within budget?}
412
- V -- no --> X
413
- V -- yes --> F{reviewer<br/>approves?}
414
- F -- no --> X
415
- F -- yes --> G[commit + mark passes:true<br/>+ proof in .yoke/proof/]
416
- G --> I
417
- I --> H{all stories pass?}
418
- H -- yes --> J{integrated system<br/>gate green?}
419
- J -- no --> X
420
- J -- yes --> K[current backlog ready]
59
+ ```sh
60
+ yoke loop on my-app
61
+ yoke loop run my-app --isolate --parallel=auto
421
62
  ```
422
63
 
423
- ```bash
424
- yoke loop on . # enable (recorded in .yoke/config.yaml)
425
- yoke loop status . # show state + PRD progress
426
- yoke change add . --idea="Add passkey login" # safe while the loop runs
427
- yoke loop run . \
428
- --runner=codex \ # implement with Codex…
429
- --reviewer=claude \ # …review with Claude (role separation)
430
- --isolate \ # each story in a throwaway git worktree
431
- --parallel=3 \ # run dependency-ready, non-colliding stories concurrently
432
- --decision-policy=critical # pause only for high-impact decisions; routine choices stay autonomous
433
- # Optional: add --max=20 only when this run should stop after a bounded batch.
434
- yoke loop off . # disable
435
- ```
64
+ For an existing project, run `yoke setup .`, set `verify.command`, and draft a backlog with `yoke prd draft . --idea="..."`. Add `--review` when an independent reviewer is configured.
436
65
 
437
66
  **PRD format** (`.yoke/prd.yaml`):
438
67
 
439
68
  ```yaml
440
69
  - id: STORY-1
441
70
  title: Add a health endpoint
442
- priority: 1 # lower = higher priority
443
- acceptance: # Definition of Done (required, else blocked)
71
+ priority: 1
72
+ acceptance:
444
73
  - id: health-returns-200
445
74
  text: GET /health returns 200
446
75
  verify: [npm run test:health-returns-200]
447
76
  - id: health-rejects-post
448
77
  text: POST /health returns 405
449
78
  verify: [npm run test:health-rejects-post]
450
- passes: false # the loop sets this true only on green tests
451
- ```
452
-
453
- New projects default to `verify.requireCriteria: true`: every story has 2–5 behavioral criteria.
454
- Each criterion ID must occur in its single, approved test command; shell operators and broad,
455
- untargeted suites are rejected. Yoke records each result in `.yoke/proof/<story>/evidence.json`. Configure optional
456
- `completion.command` for integrated journeys such as purchase → entitlement → relaunch or
457
- magic-link → callback → authenticated app. It runs whenever the current backlog has no open
458
- stories; this is readiness, not a release.
459
-
460
- No generic tool can infer whether arbitrary test code perfectly represents product meaning. Yoke
461
- closes the mechanical false-done paths—targeted evidence, coverage review, clean committed state,
462
- and integrated journeys—while the project still owns the correctness of its tests and production
463
- observability.
464
-
465
- ### Parallel workers and the quality gauntlet
466
-
467
- `--parallel=N` dispatches dependency-ready stories concurrently. The default maximum is three
468
- shared worker units across Yoke projects; set `YOKE_MAX_PARALLEL_WORKERS=1..8` to change it.
469
- `--parallel` and `loop.parallel` accept 1–8. Candidate races consume one unit per simultaneous
470
- candidate. Claims carry leases, workers use isolated worktrees, collision areas and write scopes stay
471
- reserved through integration, and only a mechanically green candidate enters the FIFO integration
472
- queue. Integration has its own serialized lane, so it does not occupy an implementation slot while
473
- unrelated work proceeds. Integrated-tree gates remain mandatory. `yoke loop status` reports local
474
- workers, resource waits, shared capacity, integrations, and reopened stories. See
475
- [parallel execution and safe task decomposition](docs/parallel-execution.md).
476
-
477
- Quality is reference-driven and opt-in. Declare what one story should match:
478
-
479
- ```yaml
480
- quality:
481
- reference: { name: approved-home, source: design/home.png, kind: file }
482
- candidate: { kind: screenshots, paths: [.yoke/proof/STORY-1/home.png] }
483
- rubric: Match the approved layout, hierarchy, spacing, and states.
484
- policy: blocking # or advisory
485
- ```
486
-
487
- Configure project defaults, then enable the gauntlet for a run:
488
-
489
- ```yaml
490
- quality:
491
- enabled: false # keep opt-in, or make it the project default
492
- policy: blocking
493
- maxRounds: 3
494
- maxMinutes: 60
495
- consistencyChecks: 2
496
- maxParallelCandidates: 2
497
- critic: { agent: codex, model: gpt-5.6-sol } # model required for --candidates
498
- repair: { agent: claude }
79
+ passes: false
499
80
  ```
500
81
 
501
- ```bash
502
- yoke loop run . --quality --quality-rounds=3 --quality-minutes=60
503
- yoke loop run . --quality --candidates=2 # blind pairwise selection; stories need quality declarations
504
- ```
505
-
506
- The critic compares opaque candidate/reference labels, writes schema-validated provenance, and
507
- cannot modify the project. Blocking findings enter a bounded repair loop and rerun every mechanical
508
- gate; advisory findings are retained without blocking. `--quality-policy=`, `--no-quality`, and
509
- `--quality-unbounded` override defaults for one run. Unbounded mode is explicit and warned because
510
- it removes repair limits, not Yoke's watchdog, isolation, verification, or commit safety.
511
-
512
- State lives **outside the model context** — the PRD file plus git — so each iteration is fresh.
513
- Use `yoke change add` at any time. Its ignored append-only inbox is consumed at the next story
514
- boundary. A separate coverage pass must confirm that every requested outcome maps to behavioral
515
- criteria before Yoke appends and commits the new stories; existing stories are never rewritten and
516
- no restart is needed.
517
-
518
- ### Watching a run
519
-
520
- Every iteration emits token-free, harness-side feedback (Node console + local files — **zero agent tokens**):
521
-
522
- - **Live console with progress + ETA** —
523
- `▶ S6 (19/45 · 42%) — implementing… · ~1h44m left (Ø 4m/story)` … `✓ S6 done in 4m28s — 20/45 (44%) · ~1h40m left`.
524
- The estimate uses the **average duration of stories completed in this run** (current
525
- velocity); before the first story lands it falls back to the recorded history of previous
526
- runs (`.yoke/story-durations.json`, last 50 stories, gitignored). No data yet → no estimate,
527
- never a made-up one.
528
- - **`.yoke/loop-status.json`** — the current state (now including `percent` and an `eta`
529
- block); read it any time with `yoke loop status`:
530
- ```
531
- Loop: RUNNING on S6 "Weekly digest"
532
- implementing · iteration 20 · 19/45 (42%) · updated 30s ago
533
- ~1h44m remaining (Ø 4m/story)
534
- ```
535
- - **Parallel + quality detail** — active workers include provider, candidate ID, worktree,
536
- lifecycle, phase, quality round, and repair budget; the integrator is shown separately.
537
- - **`.yoke/loop.log`** — an append-only timeline of every phase transition.
538
- - **`--json`** — machine mode for supervisors: every status write is *also* emitted as one
539
- NDJSON line on stdout (`{"type":"status","state":"running","phase":"verifying",…}` — the
540
- same shape as `loop-status.json`), the human narrative moves off stdout (the final summary
541
- goes to stderr), and a consumer can follow the stream line by line instead of polling the file.
542
- Provider JSON streams are also accounted: statuses (file + stream) carry cumulative input and
543
- output tokens for the whole run plus provider-reported cache-read, cache-write, reasoning, model,
544
- and cost fields when available. Missing values stay absent—Yoke does not estimate them.
545
-
546
- ### Pausing a run
547
-
548
- Drop a **`.yoke/loop.pause`** file (contents irrelevant) while the loop is running and it
549
- stops at the **next story boundary** — the running story still finishes, verifies, and
550
- commits; no story is ever cut off mid-flight. The loop consumes the pause file, writes
551
- `state: "paused"` to `loop-status.json` (log label `paused`), releases the lock, and exits
552
- with code `3`. Resume by simply running `yoke loop run` again.
553
-
554
- A per-iteration **idle timeout** guards against a genuinely hung agent: if the agent produces
555
- **no output at all** for `--timeout` minutes (default 20; `0` disables), the loop kills it
556
- (SIGTERM→SIGKILL) and marks the story blocked. A slow-but-working agent that keeps streaming
557
- output is **never** killed — the output stream *is* the liveness signal. Set a project default
558
- with `loop.timeoutMinutes` in `.yoke/config.yaml`.
559
-
560
- ### Decision policy: autonomous by default, interrupt only when configured
561
-
562
- Planning questions happen before the loop. The provider-neutral `yoke-workflow` skill asks only
563
- questions whose answer materially changes product behavior, scope, architecture, security, data
564
- ownership, external cost, or an irreversible choice. It saves the approved brief in
565
- `.yoke/plan.md`; `yoke prd draft` consumes it, and `yoke prd check` rejects explicit unresolved
566
- placeholders such as `TBD`.
567
-
568
- The unattended loop then follows `loop.decisionPolicy`:
569
-
570
- ```yaml
571
- loop:
572
- enabled: true
573
- decisionPolicy: critical # or auto
574
- runner:
575
- agent: codex # setup chooses the current host by default
576
- ```
577
-
578
- - **`auto` (default):** routine ambiguity and implementation details are resolved using the
579
- approved plan, acceptance criteria, current code, and project conventions. The loop does not
580
- ask follow-up questions.
581
- - **`critical`:** routine choices are still resolved automatically. Only high-impact decisions
582
- involving public architecture, security/privacy, destructive migration or data loss, material
583
- external cost, legal/compliance exposure, or another irreversible choice may pause the story.
584
- The agent writes a schema-validated request; the loop blocks before verify and preserves it as
585
- `.yoke/pending-decision.yaml`.
586
-
587
- Inspect and answer a critical stop:
588
-
589
- ```bash
590
- yoke loop decision .
591
- yoke loop answer . --choice=A --rationale="Matches the existing identity model"
592
- ```
593
-
594
- `answer` validates the choice against the still-open story, appends it to
595
- `.yoke/context/DECISIONS.md`, commits only that file using the configured human identity, clears
596
- the pending request, and resumes the same story with the original runner, isolation, review,
597
- permission, timeout, JSON, decision-policy, and iteration settings intact. Add
598
- `--no-resume` when a supervisor should restart the loop separately. If the automatic restart
599
- cannot begin because a provider/reviewer is unavailable or another process owns the lock, run
600
- `yoke loop resume .`; its request-bound options are retained under Git's private state directory
601
- until a loop actually runs. To intentionally abandon an orphaned or stale private resume state,
602
- use `yoke loop resume . --discard`; pending decisions are never deleted by that command. Existing
603
- `loop.onAmbiguity: resolve|abort` and `--on-ambiguity=` remain supported as compatibility aliases;
604
- new projects should use `decisionPolicy: auto|critical`.
605
-
606
- ### Adaptive model routing
607
-
608
- `yoke setup` enables routing by default and preserves explicit opt-outs. Without configured
609
- worker profiles, automatic execution keeps the selected parent. When enabled, the selected
610
- parent remains the strong planner/controller. Before each bounded story it receives only the
611
- story, acceptance criteria, and at most three eligible worker profiles, then returns one
612
- machine-readable choice. The worker can be a cheaper/faster profile for any configured harness;
613
- `SELF` keeps difficult work on the parent. Explicit project rules skip the controller.
614
- Loop runners disable native delegation in Codex, Claude, Gemini, Qwen, OpenCode and Kilo so it cannot multiply
615
- the Yoke worker budget. Integration retains its execution slot until the candidate lands.
616
-
617
- **Provider support:** adaptive routing uses Yoke's shared provider adapter and works with Claude
618
- Code, Codex CLI, Gemini CLI, Qwen Code, OpenCode, Kilo, Pi, and Hermes, including mixed-provider worker lists.
619
- Internal contract tests cover invocation and routing behavior for all eight providers. The measured
620
- performance evidence below is intentionally **Codex-only**; it does not claim equivalent savings
621
- until authenticated, repeated in-the-wild runs exist for each provider.
82
+ Yoke requires 2–5 behavioral criteria on new stories by default. Each criterion needs an approved test command containing its ID. See the [PRD schema](canon/loop/prd.schema.md).
622
83
 
623
- ```yaml
624
- runner:
625
- agent: codex
626
- model: gpt-5.6-sol # optional; provider model strings stay opaque to Yoke
627
- reasoningEffort: high
628
- routing:
629
- enabled: true # new setup default; false preserves an explicit opt-out
630
- strategy: balanced # balanced | cost | speed | quality
631
- maxCandidates: 3
632
- workers:
633
- - id: codex-light
634
- agent: codex
635
- reasoningEffort: low
636
- costTier: medium
637
- capabilities: [exploration, implementation, tests]
638
- - id: claude-fast
639
- agent: claude
640
- model: haiku # rolling alias; omit to use the provider's current default
641
- reasoningEffort: low
642
- costTier: low
643
- capabilities: [mechanical-edits, tests]
644
- - id: gemini-auto
645
- agent: gemini # omitted model means the account's current Auto/default route
646
- costTier: low
647
- capabilities: [large-context, implementation]
648
- ```
649
-
650
- Use `yoke loop run . --routing` to explicitly require configured routing or `--no-routing` for a controlled
651
- baseline. Routing control calls are read-only and deliberately tiny; malformed output or no
652
- eligible worker falls back to `SELF`. Yoke does not ship a universal, fast-aging
653
- "intelligence score". Candidate model IDs come from project configuration while setup defaults
654
- prefer rolling aliases or provider Auto/defaults. A per-user registry learns only from Yoke's
655
- independent verify/performance/audit/review gates, keyed by worker + provider + model/effort and expired
656
- after 30 days. It stores no prompts, source, or project paths—only a project hash and aggregate
657
- time/token/outcome evidence. Writes are immutable one-event files, so concurrent Yoke instances
658
- cannot overwrite a shared registry file.
659
-
660
- Routing is not free: stories without a matching rule can add a controller call. Measure it
661
- on your own backlog rather than assuming a win. Routing now also runs within asynchronous
662
- parallel workers. Automatic parallelism uses up to the shared worker limit when pending tasks declare
663
- write scopes; the scheduler still serializes dependencies, collision areas, and overlapping scopes.
664
- Unknown scopes and configured tool actions keep automatic execution serial. Isolation is
665
- on by default. Explicit `--parallel=N`, `--no-routing` and `--no-isolate` remain available.
666
- See [execution defaults and dashboard measurement details](docs/VERIFIED-PROJECTS.md#execution-defaults-in-180).
667
-
668
- ### Performance budgets: efficiency as a gate, not a style
669
-
670
- Clean code is the default (the `minimal-code` skill) — but when efficiency matters, "should
671
- be fast" is a vibe the loop cannot enforce. Yoke makes it mechanical, at two levels:
672
-
673
- - **Per story:** write the requirement as a **measurable acceptance criterion**
674
- ("imports 1M rows in < 2s, asserted by the bench test") and let your verify tests measure
675
- it — no new machinery needed.
676
- - **Per project:** wire a benchmark as a standing **perf gate** in `.yoke/config.yaml`:
677
-
678
- ```yaml
679
- perf:
680
- command: node bench/check-budget.mjs # exit 0 = within budget
681
- retries: 1 # benchmarks are noisy; same retry logic as verify
682
- ```
683
-
684
- The loop runs it **after verify** on every story (phase `perf`, with `YOKE_STORY` set); a
685
- red benchmark blocks the story — `story S6 exceeded its performance budget: p95 62ms > budget 50ms` —
686
- no matter how clean the diff was. The implementer prompt names the budget command, so the
687
- agent knows not to trade hot-path efficiency for style and never "simplifies away" an
688
- optimization without re-running the benchmark. The `performance` canon skill carries the
689
- method: profile first, optimize leaves not boundaries, commit benchmarks as tests, version
690
- the *why* of every optimization in `context/DECISIONS.md`.
691
-
692
- ### Artifact-backed gate output: compact context, complete local evidence
693
-
694
- Failed verify, executable-criterion, performance, configured custom-audit, and completion commands can emit thousands of
695
- low-signal lines. Yoke keeps the model-visible failure summary deterministic and bounded while
696
- preserving large raw stdout/stderr below `.yoke/artifacts/`:
697
-
698
- ```yaml
699
- output:
700
- previewBytes: 2048 # default: maximum compact preview bytes
701
- artifactThresholdBytes: 8192 # default: persist raw output only above this size
702
- ```
703
-
704
- The preview prioritizes errors, warnings, adjacent context, and final test summaries. Above the
705
- artifact threshold it also includes a project-relative path, byte count, and full SHA-256 digest,
706
- for example:
84
+ ## Optional continuous exploration
707
85
 
708
- ```text
709
- [full output: .yoke/artifacts/STORY-4/verify-0123abcd4567.log | 42810 bytes | sha256:0123...]
710
- ```
86
+ Exploration is **off by default**. Add `--explore` to keep the supervisor active after the current backlog drains. It proposes bounded work from repository evidence; accepted tasks still pass through the project's normal tests and configured gates.
711
87
 
712
- An agent can read that ordinary file when the preview is insufficient; nothing is injected into
713
- later stories automatically. Repeated identical failures reuse the same content-addressed path.
714
- Successful gate output is discarded as before. This affects only commands executed by Yoke's own
715
- gates. It does **not** intercept tool output generated internally by Claude Code, Codex, Gemini, or Qwen,
716
- so benchmark ratios for this feature are not provider-token or billing claims.
717
-
718
- Command capture is capped at 16 MiB per stdout/stderr stream. Exceeding that quota fails the gate
719
- closed and stores the captured prefix with a `[truncated output: ...]` marker; Yoke never labels
720
- partial evidence as full output.
721
-
722
- Yoke treats `.yoke/artifacts/` as local, non-committable runtime state and excludes it from its
723
- clean-tree and story-commit operations; `yoke retrofit` also adds it to `.gitignore`. Raw command output is intentionally stored
724
- without redaction so it remains valid evidence and may therefore contain credentials, personal
725
- data, or other sensitive text emitted by project commands. Inspect artifacts before sharing them.
726
-
727
- The loop trusts **verify**, not the agent's exit code: a story whose tests are green is
728
- committed even if the agent process exited non-zero (a common Windows `.cmd`-wrapper ghost).
729
- A failing verify is retried up to `verify.retries` times (default 1) so a transient flake
730
- self-heals while a real failure still blocks. Structured acceptance criteria are then verified
731
- individually; an unrelated green suite cannot satisfy a criterion without its proof command.
732
-
733
- `.yoke/loop-status.json`, `.yoke/loop.log`, `.yoke/loop.lock`, its takeover/recovery leases, lock/decision temp files, `.yoke/story-durations.json`,
734
- `.yoke/ambiguity.md`, `.yoke/artifacts/`, and the critical-decision request/answering files are runtime artifacts;
735
- `yoke retrofit` gitignores them (along with
736
- `.yoke/worktrees/`, `.yoke/backup/`, `.yoke/proof/`, and `.yoke/changes/`) so they never trip the clean-tree gate.
737
-
738
- ### Single-flight guard + cleanup
739
-
740
- Two concurrent `yoke loop run`s would race on the PRD and status files, so the loop takes a
741
- **lock** (`.yoke/loop.lock`) for the duration of a run. Complete lock metadata is published atomically;
742
- stale takeover is serialized by `.yoke/loop.lock.takeover`. A second invocation exits `2` with
743
- `Another loop is already running here (pid …). If that is wrong, run: yoke loop cleanup`. A lock
744
- whose holder process is dead is taken over automatically (with a warning).
745
-
746
- **`yoke loop cleanup [dir]`** reaps only runner process trees recorded by this project and removes
747
- a stale lock. Yoke-created worktrees are **retained by default** and listed in the output; pass
748
- `--remove-worktrees` to remove `.yoke/worktrees/*` with `git worktree remove --force` + `prune`.
749
- User-created worktrees are never touched. A live lock is reported and left alone. Exits `0` when
750
- cleanup succeeds, `1` if any requested removal fails. If a machine/process crash leaves the cleanup
751
- recovery lease itself behind, an operator can run
752
- `yoke loop cleanup . --discard-stale-recovery`; Yoke refuses while its recorded PID is alive, and
753
- the force flag must not be run concurrently.
754
-
755
- ## 🔍 Cross-model review (`yoke review`)
756
-
757
- Outside the loop, `yoke review` has a **second** model review your current diff as a
758
- pass/fail gate — the interactive counterpart to the loop's `--review`/`--reviewer`.
759
-
760
- ```bash
761
- yoke review . # review the uncommitted working tree
762
- yoke review . --base=main # review the range main..HEAD instead
763
- yoke review . --reviewer=codex # force a specific reviewer
764
- yoke review . --focus="the auth layer" # steer what it scrutinises
88
+ ```sh
89
+ yoke loop run my-app --explore --parallel=auto --explore-limit=3d
90
+ yoke loop status my-app
91
+ yoke loop pause my-app
765
92
  ```
766
93
 
767
- - **Reviewer resolution** — picks the first available of **codex → gemini → claude**,
768
- preferring a model *other* than the one you drive so the review is genuinely cross-model.
769
- On a Claude-only machine it degrades to a self-review (and says so).
770
- - **Scope** — the uncommitted working tree by default, or a commit range with `--base=<ref>`.
771
- - **Exit-code gate** — exits `0` when the reviewer approves, `1` when it finds a blocking
772
- issue, `2` when no (or an unavailable) reviewer CLI is found. Chain it: `... && yoke review`,
773
- or wire it into a pre-push hook.
774
- - Runs through the same idle-timeout watchdog as the loop (`--timeout`, default 20 min).
775
-
776
- ## 🎨 Visual & design verification — done, with a photo
94
+ Without `--explore-limit`, exploration has no time limit. A limit such as `12h`, `3d`, or `2w` requests a pause at the next safe boundary; active stories finish their normal gates and integration first, so the process can run past the deadline while that work completes. The supervisor requires an available machine, running process, and usable providers. Read the [continuous exploration guide](docs/CONTINUOUS-EXPLORATION.md) for discovery rules, retries, stop detection, and recovery.
777
95
 
778
- Unit tests don't catch a blank page, an unwired route, or generic AI-slop design. Yoke adds three things:
96
+ ## Parallel workers
779
97
 
780
- - **`yoke design-scan [dir]`** — a static scanner for the visual *tells* of AI-generated UIs
781
- (AI-purple gradients, gradient hero text, neon glow, emoji-as-icons, gradient overload). It
782
- scores findings and **exits non-zero over budget** (`--max`, default 4; `--report` to list only),
783
- so it drops straight into your verify pipeline.
784
- - **`yoke flow-smoke [dir]`** — a built-in browser gate with **proof artifacts** (below).
785
- - **`unslop-ui` + `visual-verification` skills** — the design rubric, plus how to compose a verify
786
- pipeline (`types → units → design-scan → flow-smoke`).
98
+ Use `--parallel=auto` or `--parallel=N` to run independent stories together. The scheduler observes story dependencies, collision areas, and declared write scopes. A shared user-level pool admits up to three worker units by default; `YOKE_MAX_PARALLEL_WORKERS` adjusts that ceiling from 1 to 8. See [parallel execution](docs/parallel-execution.md) for admission, integration, and recovery details.
787
99
 
788
- Retrofit adds `design: { mode: auto, max: 4 }` when it detects UI dependencies, UI source files,
789
- or configured smoke flows. In `auto` mode the loop runs the design scan after functional verify and
790
- before performance/audit; `on` forces it for any project and `off` disables it. Existing explicit
791
- settings are preserved. `flow-smoke` remains an explicit project verify step because Yoke cannot
792
- infer how to start each application's server.
100
+ ## Dashboard
793
101
 
794
- `unslop-ui` is the visual-design skill. `no-ai-slop` is separate: it reviews prose for generic AI
795
- patterns and edits only confirmed problems while preserving meaning and voice.
102
+ Register projects and start the loopback-only dashboard:
796
103
 
797
- *Tell set informed by the MIT-licensed [vibecoded-design-tells](https://github.com/JCarterJohnson/vibecoded-design-tells) research.*
798
-
799
- ### `yoke flow-smoke [dir] [--url=<baseUrl>] [--label=<name>]`
800
-
801
- Configure your key user flows once in `.yoke/config.yaml`:
802
-
803
- ```yaml
804
- smoke:
805
- baseUrl: http://localhost:3000
806
- flows:
807
- - name: home
808
- path: /
809
- landmark: "main h1" # optional CSS selector to wait for
810
- - name: login
811
- path: /login
104
+ ```sh
105
+ yoke projects add /path/to/project
106
+ yoke dashboard
812
107
  ```
813
108
 
814
- For every flow, `yoke flow-smoke` loads the route against the running dev server, waits for the
815
- landmark, and fails on a non-OK response or **any console/page error**. The proof contract:
816
-
817
- - **Screenshots always** — every flow (pass *or* fail) saves `.yoke/proof/<label>/<flow>.png`;
818
- the failure screenshot *is* the evidence.
819
- - **Video only on failure** — each flow is recorded, but the clip is kept only when the flow
820
- goes red (`<flow>.webm`); green runs delete it.
821
- - **Labelled per story** — inside the loop, verify runs with `YOKE_STORY=<story-id>`, so proofs
822
- land in `.yoke/proof/<story-id>/` automatically. Standalone runs use `latest`, or pass
823
- `--label=`. The label dir is wiped per run — evidence is always from the latest run.
824
- - **Exit codes** — `0` all flows green (chain it: `... && yoke design-scan . && yoke flow-smoke .`),
825
- `1` any flow failed, `2` not runnable (no `smoke:` config, or Playwright missing).
826
- - **Playwright comes from the *target project*, never Yoke** —
827
- `npm i -D playwright && npx playwright install chromium` there. Start the dev server before
828
- verify (e.g. via `start-server-and-test`); `--url=` overrides `baseUrl`.
829
-
830
- `.yoke/proof/` is gitignored by the retrofit — proofs are runtime artifacts and never break the
831
- loop's clean-tree gate.
832
-
833
- ## 🧠 Context layer (`.yoke/context/`)
834
-
835
- Yoke keeps durable, cross-session context so a fresh-context agent is never blind:
836
-
837
- - `PROJECT.md` — the north star (goal, constraints, non-goals, success criteria).
838
- - `DECISIONS.md` — an append-only ledger. The loop adds an entry per completed story; you and agents add the *why*.
839
- - `KNOWLEDGE.md` — reusable gotchas and conventions.
840
- - `GLOSSARY.md` — the project's canonical terms, meanings, and aliases.
841
- - `CONTEXT-MAP.md` — optional bounded-context relationships for projects that need domain mapping.
842
-
843
- `yoke retrofit` scaffolds the four core files non-destructively; your edits are never overwritten.
844
- It reports `CONTEXT-MAP.md` when the optional file already exists.
845
- The loop reads them into every agent + reviewer prompt and logs decisions back on each story's
846
- commit. Decision history is explicitly delimited as untrusted reference data, so stored text is
847
- never treated as fresh instructions. Manage the files directly with `yoke context init` and `yoke context status`. The
848
- `maintaining-context` skill teaches agents to honour the same files during interactive work.
849
-
850
- > Commit `.yoke/context/` to git. The `--isolate` loop runs each iteration in a worktree
851
- > checked out from HEAD, so it only sees committed context.
852
-
853
- ## 🛡️ Safety model
854
-
855
- Yoke's guardrails are **mechanical, not advisory** — the loop blocks on a dirty worktree, missing acceptance criteria, red tests, or a reviewer rejection, and **none of them rely on the agent choosing to behave**.
856
-
857
- - **Commit integrity** — a story is never recorded `passes: true` without a corresponding commit; a failed commit reverts the PRD.
858
- - **Role separation** — the implementer never reviews its own work; `--reviewer` can even be a different agent.
859
- - **Isolation** — with `--isolate`, failed or partial work is discarded with the worktree and never reaches your main tree.
860
- - **Non-destructive retrofit** — existing files are backed up before any change; settings are merged, not replaced.
861
- - **Independent verification** — "done" means *your test command exits 0*, not "the agent said so".
862
- - **Single-flight** — a lock prevents two loops from racing the same repo; `yoke loop cleanup` recovers after crashes.
863
-
864
- ## 🧠 Choose your code-graph
865
-
866
- `yoke retrofit --code-graph=graphify|serena` (default `graphify`, remembered per project) selects the legacy single graph. For complete code intelligence, enable the federated facade with `yoke retrofit --code-intelligence=active` (or `shadow` for a read-only canary). See the [Code Intelligence guide](docs/CODE-INTELLIGENCE.md).
867
-
868
- | | **graphify** | **Serena** |
869
- |---|---|---|
870
- | Engine | tree-sitter AST + graph | real language servers (LSP) |
871
- | Strength | fast, multimodal (code + PDFs + images) | symbol-exact cross-file refactoring |
872
- | Token efficiency | ~70× reduction on large mixed repos | standard, no index to go stale |
873
- | Best for | rapid exploration / migration / onboarding | systematic refactoring in typed codebases |
874
- | Caveat | heuristic edges; static index can go stale | one language server per language |
875
-
876
- The federated mode composes both structural and semantic evidence and adds Graphify's architecture/document graph. It exposes one Yoke-controlled MCP surface, content-addressed snapshots, partial-coverage reporting and isolated edit previews; the legacy `codeGraph` setting remains valid and unchanged when code intelligence is `off`.
877
-
878
- ## 🪙 Token efficiency
109
+ The dashboard is a local control room. It does not discover every process or run arbitrary shell commands. See the [dashboard guide](docs/DASHBOARD-EVOLUTION.md) for data coverage and measurement limits.
879
110
 
880
- Yoke attacks tokens on two complementary surfaces:
111
+ ## Agent and feature guides
881
112
 
882
- - **rtk** compresses noisy command/tool output before it enters context (wired as a hook/instruction per agent).
883
- - The **`minimal-code`** skill installs a YAGNI / "lazy senior dev" ladder so agents write the least code that solves the task — fewer output tokens, smaller review surface. *(Adapted from the MIT-licensed [ponytail](https://github.com/DietrichGebert/ponytail) ruleset.)*
113
+ | Guide | Details |
114
+ | --- | --- |
115
+ | [Harnesses](docs/HARNESSES.md) | CLI setup, permissions, provider/model selection, and telemetry limits |
116
+ | [SoL-Pi for Pi](docs/SOL-PI.md) | Opt-in settings, supported runtime, project trust, data handling, and paper evidence |
117
+ | [Parallel execution](docs/parallel-execution.md) | Worker scheduling, shared capacity, integration, and recovery |
118
+ | [Continuous exploration](docs/CONTINUOUS-EXPLORATION.md) | Autonomous discovery, runtime limits, pause/resume, and stop detection |
119
+ | [Project workflows](docs/VERIFIED-PROJECTS.md) | Setup, verification, goals, and execution defaults |
120
+ | [Code Intelligence](docs/CODE-INTELLIGENCE.md) | Optional Graphify, Serena, and Graft evidence providers |
121
+ | [Dashboard](docs/DASHBOARD-EVOLUTION.md) | Project views, history, controls, and reporting boundaries |
122
+ | [Changelog](CHANGELOG.md) | Release features, behavior changes, and migration notes |
884
123
 
885
- A Codex-only full-repository study ran three alternating-order pairs per arm. The same Sol parent
886
- completed all 12 stories and all **36/36 hidden acceptance checks**; with routing enabled, a Sol
887
- controller selected Luna for every bounded implementation story. Including controller overhead,
888
- the routed median used **33.8% less wall time, 11.0% less fresh input, 49.5% fewer output tokens,
889
- and 78.2% fewer reasoning tokens**. All three pairs improved wall time and fresh input.
124
+ ## Safety and limits
890
125
 
891
- The boundary matters: an earlier architecture/privacy task correctly stayed on `SELF` and paid
892
- controller overhead, so the routing default is not evidence of universal savings. Codex did not
893
- emit dollar cost for these plan-backed runs; Yoke reports the measured token breakdown instead of
894
- inventing a price. Method, ranges, controller cost, caveats, analyzer, and six raw JSON rows are in
895
- [`bench/RESULTS.md`](bench/RESULTS.md#codex-only-full-repository-routing-study-2026-08-02).
126
+ - A green result means the configured checks passed; the project remains responsible for meaningful tests and acceptance criteria.
127
+ - Harness permissions differ. Some CLIs do not provide an OS-level sandbox; use Yoke's read-only profile for inspection and review.
128
+ - Exploration filters proposals but cannot guarantee product maturity or model quality. Time limits pause at safe boundaries; they do not kill an active story mid-integration.
129
+ - SoL-Pi is an optional Pi extension. Its pinned upstream lists Node.js 22.19+ and `@earendil-works/pi-coding-agent@0.84.2` as the tested baseline; Yoke does not enforce the Pi version. Pi project trust may be required. See [SoL-Pi limits](docs/SOL-PI.md).
896
130
 
897
- ## 🧩 Optional companions
131
+ ## Development
898
132
 
899
- Two external tools pair well with Yoke and are documented (not bundled) in `canon/tools/` — each has its own installer and update cadence, so Yoke wires the boundary instead of vendoring a copy:
900
-
901
- - **[claude-mem](https://github.com/thedotmack/claude-mem)** — persistent cross-session memory for interactive work. Deliberate boundary: the autonomous loop keeps its memory **explicit and versioned** (`context/*.md` + PRD, fresh context per story), so claude-mem's automatic injection stays out of loop runs.
902
- - **[ui-ux-pro-max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill)** — data-driven design intelligence (styles, palettes, industry rules) for the *generation* side. Yoke's `unslop-ui`, `design-scan`, and `visual-verification` remain the *verification* side: generate with pro-max, gate with Yoke.
903
-
904
- ## 🌱 Why & how it was built
905
-
906
- **The problem.** Coding agents are powerful, but each speaks its own dialect — Claude has skills and hooks, Codex reads `AGENTS.md` and a TOML config, Gemini wants commands and a settings file. Keeping the same skills, safety policy, and tool wiring consistent across all of them means copy-paste drift and three things to maintain. Yoke exists to keep **one** source of truth, generate the right native artifacts for each agent, and let that harness run **autonomously and safely** when you want to hand it a spec and walk away.
907
-
908
- **The inspiration.** Yoke is a synthesis of ideas already proven across the ecosystem: composable-skills methodology ([superpowers](https://github.com/obra/superpowers), [gstack](https://github.com/garrytan/gstack)); the portable [AGENTS.md](https://agents.md/) standard; the *"one source-of-truth → idiomatic per-harness artifacts"* generation pattern ([wshobson/agents](https://github.com/wshobson/agents)); spec-driven autonomous orchestration (GSD); mechanical safety gates and role separation (safe-agentic-workflow); and the **Ralph loop** (Geoff Huntley) — keep handing a *fresh* agent the next task until the spec is done. Token efficiency comes from [rtk](https://github.com/rtk-ai/rtk) and the write-less-code idea behind [ponytail](https://github.com/DietrichGebert/ponytail).
909
-
910
- **How it was built.** Yoke was built the way it's meant to be *used* — agent-driven, incremental, and test-first. The stack was chosen by **researching alternatives first** (which is how `jcodemunch` was dropped for its license and Serena was added as an option). Then every component shipped one small piece at a time through a disciplined loop: **brainstorm → spec → plan → TDD implementation → an independent two-stage review** (does it match the spec? is it well-built?) **→ merge**. Those reviews caught real bugs before they shipped — a Windows `.cmd` spawn failure, a commit-integrity hole, a path-traversal that could delete project data, a resolution bug that broke the CLI's default invocation, a TOML-escaping bug. Yoke was even **dogfooded on its own repo**, which surfaced (and fixed) a genuine Windows bug. Every spec and plan lives in [`docs/superpowers/`](docs/superpowers/).
911
-
912
- ## 🗂️ Project layout
913
-
914
- ```text
915
- canon/ # the source of truth — harness-agnostic
916
- AGENTS.md skills/ policy/ loop/ tools/ manifest.yaml
917
- src/
918
- canon/ # manifest schema + validator (yoke validate)
919
- code-intelligence/ # federated MCP facade, adapters, snapshots and guarded edits
920
- change/ # append-only change inbox · planning · independent coverage review
921
- retrofit/ # detect · plan · apply · planners (all eight harnesses) · tools
922
- loop/ # prd · gates · runner · verify · git/worktree · loop · run-command · lock · cleanup
923
- quality/ # reference collection · blind critic · bounded repair · candidate comparison
924
- new/ # yoke new — greenfield bootstrap
925
- prd/ # yoke prd draft|check — idea → stories + lint gate
926
- review/ # yoke review — cross-model diff gate
927
- smoke/ # yoke flow-smoke — browser gate with screenshot/video proofs
928
- scan/ # yoke design-scan — AI-slop design gate
929
- context/ # the durable context layer
930
- docs/superpowers/ # the spec and every component's implementation plan
931
- ```
932
-
933
- ## 🗺️ Roadmap
934
-
935
- Completed release work lives in the changelog. Remaining, explicitly scoped work is tracked in
936
- [`TODOS.md`](TODOS.md), including broader benchmark samples, native output schemas, and signed
937
- release provenance.
938
-
939
- ## 🧪 Development
940
-
941
- ```bash
942
- npm test # vitest (1298 tests)
943
- npm run build # tsc, no emit errors
944
- npm run yoke -- validate canon
133
+ ```sh
134
+ git clone https://github.com/HECer/yoke.git
135
+ cd yoke
136
+ npm ci
137
+ npm run lint
138
+ npm run build
139
+ npm test
140
+ npm run docs:check
945
141
  ```
946
142
 
947
- ## 🙏 Credits & inspiration
948
-
949
- Yoke stands on the shoulders of a great ecosystem: methodology ideas from [superpowers](https://github.com/obra/superpowers) and [gstack](https://github.com/garrytan/gstack); the [AGENTS.md](https://agents.md/) standard; the generator pattern from [wshobson/agents](https://github.com/wshobson/agents); the Ralph autonomous-loop pattern; safety-gate thinking from safe-agentic-workflow; and the wired tools [rtk](https://github.com/rtk-ai/rtk), [graphify](https://github.com/safishamsi/graphify), [Serena](https://github.com/oraios/serena), and [Playwright MCP](https://github.com/microsoft/playwright-mcp). The `minimal-code` skill adapts the MIT-licensed [ponytail](https://github.com/DietrichGebert/ponytail) ruleset.
950
-
951
- ## 📄 License
952
-
953
- MIT — see [`LICENSE`](LICENSE).
954
-
955
- <div align="center">
956
- <sub>Built with a disciplined loop: brainstorm → spec → plan → TDD → two-stage review → merge — and reviewed by a second model, because we don't trust "done" either.</sub>
957
- </div>
143
+ Yoke is released under the [MIT License](LICENSE).