@hecer/yoke 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +494 -0
- package/canon/AGENTS.md +28 -0
- package/canon/context/DECISIONS.md +4 -0
- package/canon/context/KNOWLEDGE.md +4 -0
- package/canon/context/PROJECT.md +15 -0
- package/canon/loop/loop-spec.md +30 -0
- package/canon/loop/prd.schema.md +14 -0
- package/canon/manifest.yaml +47 -0
- package/canon/policy/gates.md +7 -0
- package/canon/policy/roles.md +9 -0
- package/canon/skills/ATTRIBUTION.md +71 -0
- package/canon/skills/authoring-prd/SKILL.md +44 -0
- package/canon/skills/brainstorming/SKILL.md +164 -0
- package/canon/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/canon/skills/document-release/SKILL.md +297 -0
- package/canon/skills/executing-plans/SKILL.md +70 -0
- package/canon/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/canon/skills/health/SKILL.md +177 -0
- package/canon/skills/maintaining-context/SKILL.md +34 -0
- package/canon/skills/minimal-code/SKILL.md +21 -0
- package/canon/skills/plan-ceo-review/SKILL.md +541 -0
- package/canon/skills/plan-eng-review/SKILL.md +362 -0
- package/canon/skills/receiving-code-review/SKILL.md +213 -0
- package/canon/skills/requesting-code-review/SKILL.md +105 -0
- package/canon/skills/retro/SKILL.md +397 -0
- package/canon/skills/review/SKILL.md +246 -0
- package/canon/skills/ship/SKILL.md +696 -0
- package/canon/skills/subagent-driven-development/SKILL.md +277 -0
- package/canon/skills/systematic-debugging/SKILL.md +296 -0
- package/canon/skills/tdd/SKILL.md +371 -0
- package/canon/skills/unslop-ui/SKILL.md +34 -0
- package/canon/skills/using-git-worktrees/SKILL.md +218 -0
- package/canon/skills/verification-before-completion/SKILL.md +139 -0
- package/canon/skills/visual-verification/SKILL.md +54 -0
- package/canon/skills/workflow/SKILL.md +18 -0
- package/canon/skills/writing-plans/SKILL.md +152 -0
- package/canon/skills/writing-skills/SKILL.md +655 -0
- package/canon/skills/yoke-retrofit/SKILL.md +18 -0
- package/canon/tools/graphify.md +3 -0
- package/canon/tools/playwright-mcp.md +3 -0
- package/canon/tools/rtk.md +7 -0
- package/canon/tools/serena.md +7 -0
- package/dist/canon/frontmatter.js +10 -0
- package/dist/canon/manifest.js +26 -0
- package/dist/canon/validate.js +73 -0
- package/dist/cli.js +244 -0
- package/dist/context/command.js +33 -0
- package/dist/context/context.js +57 -0
- package/dist/loop/cleanup.js +42 -0
- package/dist/loop/gates.js +12 -0
- package/dist/loop/git.js +25 -0
- package/dist/loop/lock.js +45 -0
- package/dist/loop/loop.js +190 -0
- package/dist/loop/prd.js +29 -0
- package/dist/loop/reporter.js +91 -0
- package/dist/loop/run-command.js +134 -0
- package/dist/loop/runner.js +157 -0
- package/dist/loop/verify.js +38 -0
- package/dist/loop/watchdog.js +86 -0
- package/dist/new/command.js +53 -0
- package/dist/prd/command.js +129 -0
- package/dist/retrofit/apply.js +54 -0
- package/dist/retrofit/canon-dir.js +22 -0
- package/dist/retrofit/command.js +37 -0
- package/dist/retrofit/config.js +53 -0
- package/dist/retrofit/context-actions.js +21 -0
- package/dist/retrofit/detect.js +17 -0
- package/dist/retrofit/gitignore.js +26 -0
- package/dist/retrofit/gstack.js +19 -0
- package/dist/retrofit/merge-json.js +38 -0
- package/dist/retrofit/plan.js +29 -0
- package/dist/retrofit/planners/claude.js +67 -0
- package/dist/retrofit/planners/codex.js +36 -0
- package/dist/retrofit/planners/gemini.js +54 -0
- package/dist/retrofit/report.js +14 -0
- package/dist/retrofit/tools.js +23 -0
- package/dist/retrofit/wsl.js +15 -0
- package/dist/review/command.js +43 -0
- package/dist/scan/design.js +79 -0
- package/dist/smoke/command.js +141 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 HECer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# π Yoke
|
|
4
|
+
|
|
5
|
+
### One harness, three agents β and zero trust in "done."
|
|
6
|
+
|
|
7
|
+
**Yoke** installs one curated canon of skills, **mechanical safety gates**, and tool wiring into any project β natively for **Claude Code, OpenAI Codex CLI, and Gemini CLI**. Then, when you want it, an opt-in autonomous loop ships your spec story-by-story: tested, cross-model-reviewed, committed β **with a screenshot to prove every story and a video for every failure**.
|
|
8
|
+
|
|
9
|
+
[](https://github.com/HECer/yoke/actions/workflows/ci.yml)
|
|
10
|
+
[](#-license)
|
|
11
|
+

|
|
12
|
+

|
|
13
|
+

|
|
14
|
+

|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
> **TL;DR** β `yoke new my-app --idea="..."` scaffolds a git repo, installs the harness for all three agents, and drafts a story backlog from your idea. `yoke loop run my-app --isolate --review` then implements it story by story behind hard gates: **clean tree β acceptance criteria β your real tests green β an independent model approves β commit**. If any gate is red, nothing is committed. When a story is done, there's a photo of it in `.yoke/proof/<story>/`.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Why Yoke exists
|
|
24
|
+
|
|
25
|
+
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:
|
|
26
|
+
|
|
27
|
+
| The pain | What actually happens | What Yoke does about it |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| π **The verification gap** β *"agent says done, but it isn't"* | Agents submit confidently on 100% of runs while resolving far fewer; "all tests pass" when they were never run ([silent-failures research](https://arxiv.org/pdf/2603.25764)) | The loop trusts **your verify command's exit code**, never the agent's word. A story is `passes: true` only after tests are green, the reviewer approved, and the commit landed β atomically. Plus: **screenshot proofs** per story. |
|
|
30
|
+
| π **Three agents, three 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. |
|
|
31
|
+
| π **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. |
|
|
32
|
+
| π΅ **Review fatigue** | AI adoption nearly doubles PR volume and review time; humans start skimming | **`yoke review`**: a *second* model reviews the diff as a pass/fail exit-code gate β chainable into verify, pre-push, or CI. Cross-model review measurably catches what self-review misses. |
|
|
33
|
+
|
|
34
|
+
**Who it's for:** anyone driving Claude Code, Codex CLI, or Gemini CLI 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.
|
|
35
|
+
|
|
36
|
+
**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.
|
|
37
|
+
|
|
38
|
+
## β±οΈ 60 seconds: idea β tested, photographed software
|
|
39
|
+
|
|
40
|
+
```console
|
|
41
|
+
$ yoke new reading-app --idea="a web app that tracks my reading list"
|
|
42
|
+
β reading-app bootstrapped. # git repo Β· harness for all agents Β· context Β· PRD drafted from the idea
|
|
43
|
+
|
|
44
|
+
$ yoke prd check reading-app
|
|
45
|
+
β PRD valid β 8 stories, 0 pass
|
|
46
|
+
|
|
47
|
+
$ yoke loop on reading-app
|
|
48
|
+
$ yoke loop run reading-app --isolate --review --max=10
|
|
49
|
+
βΆ STORY-1 (0/8) β implementingβ¦ Β· verifyingβ¦ Β· reviewingβ¦ β committed β 1/8
|
|
50
|
+
βΆ STORY-2 (1/8) β implementingβ¦ Β· verifyingβ¦ β committed β 2/8
|
|
51
|
+
βΆ STORY-3 (2/8) β implementingβ¦ Β· verifyingβ¦ β blocked: story did not verify (tests red)
|
|
52
|
+
# nothing was committed. fix, then re-run.
|
|
53
|
+
|
|
54
|
+
$ ls reading-app/.yoke/proof/STORY-2/
|
|
55
|
+
home.png list.png # photographic evidence, labelled per story
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Every claim in that transcript is enforced by code paths with tests behind them β 322 of them, and this repo was built by its own loop and gates ([how it was built](#-why--how-it-was-built)).
|
|
59
|
+
|
|
60
|
+
## π Quickstart
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
git clone https://github.com/HECer/yoke.git && cd yoke
|
|
64
|
+
npm install && npm run build && npm link # β global `yoke` on your PATH
|
|
65
|
+
|
|
66
|
+
# Greenfield: idea β loop-ready project in one command
|
|
67
|
+
yoke new my-app --idea="a CLI that tracks reading lists"
|
|
68
|
+
yoke loop on my-app && yoke loop run my-app --isolate
|
|
69
|
+
|
|
70
|
+
# β or retrofit an existing project β
|
|
71
|
+
yoke validate canon # 1) sanity-check the canon
|
|
72
|
+
yoke retrofit /path/to/project --agent=all # 2) install (non-destructive)
|
|
73
|
+
yoke loop on /path/to/project # 3) optional: the autonomous loop
|
|
74
|
+
yoke loop run /path/to/project --isolate --reviewer=codex --max=20
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
> 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. *(npm package `@hecer/yoke` is prepared; until it's published, clone as above.)*
|
|
78
|
+
|
|
79
|
+
## π€ Driving it through an agent
|
|
80
|
+
|
|
81
|
+
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, and Gemini CLI):
|
|
82
|
+
|
|
83
|
+
> **Set it up** β *"Install the Yoke harness in this project: run `yoke retrofit . --agent=all`, pick the code-graph you'd recommend for this codebase, and leave the autonomous loop disabled for now. Then summarise what changed and commit it."*
|
|
84
|
+
|
|
85
|
+
> **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."*
|
|
86
|
+
|
|
87
|
+
> **Run autonomously** β *"Write `.yoke/prd.yaml` with one story per task (each needs acceptance criteria β see the `authoring-prd` skill), set `verify.command` in `.yoke/config.yaml`, enable the loop with `yoke loop on .`, then run it in small visible batches: `yoke loop run . --max=5`. After each batch show me `yoke loop status .`."*
|
|
88
|
+
|
|
89
|
+
> **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."*
|
|
90
|
+
|
|
91
|
+
### Agent cheat sheet β every command is an exit-code contract
|
|
92
|
+
|
|
93
|
+
Yoke's CLI is deterministic and chainable by design: an agent (or a shell `&&`) can branch on exit codes without parsing prose.
|
|
94
|
+
|
|
95
|
+
| Command | What it does | Exit codes |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| `yoke validate [canonDir]` | Validate the canon (schema, frontmatter, templates) | `0` valid Β· `1` errors |
|
|
98
|
+
| `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 |
|
|
99
|
+
| `yoke retrofit [dir] [--agent=claude,codex,gemini\|all] [--code-graph=graphify\|serena] [--loop]` | Install/update the harness, non-destructively | `0` |
|
|
100
|
+
| `yoke prd draft [dir] --idea= [--runner=] [--force]` | Idea β 5β12 stories with testable acceptance criteria | `0` Β· `1` invalid/guarded Β· `2` agent unavailable |
|
|
101
|
+
| `yoke prd check [dir]` | PRD lint gate (schema, duplicate ids, empty acceptance) | `0` valid Β· `1` violations |
|
|
102
|
+
| `yoke context init\|status [dir]` | Durable context layer (`PROJECT/DECISIONS/KNOWLEDGE.md`) | `0` |
|
|
103
|
+
| `yoke loop on\|off\|status\|run\|cleanup [dir]` | The autonomous loop (see below) | run: `0` complete Β· `1` blocked/cap Β· `2` not runnable / already locked |
|
|
104
|
+
| `yoke review [dir] [--reviewer=] [--base=] [--focus=]` | A **second model** reviews your diff | `0` approved Β· `1` findings Β· `2` no reviewer CLI |
|
|
105
|
+
| `yoke design-scan [dir] [--max=N] [--report]` | Static AI-slop design gate | `0` within budget Β· `1` over |
|
|
106
|
+
| `yoke flow-smoke [dir] [--url=] [--label=]` | Browser gate with screenshot/video proofs | `0` green Β· `1` failures Β· `2` not runnable |
|
|
107
|
+
|
|
108
|
+
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.
|
|
109
|
+
|
|
110
|
+
## βοΈ How it compares β superpowers Β· gstack Β· Yoke
|
|
111
|
+
|
|
112
|
+
Three excellent projects, three different jobs. Honest version:
|
|
113
|
+
|
|
114
|
+
| | [superpowers](https://github.com/obra/superpowers) (obra) | [gstack](https://github.com/garrytan/gstack) (Garry Tan) | **Yoke** |
|
|
115
|
+
|---|---|---|---|
|
|
116
|
+
| **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 |
|
|
117
|
+
| **Agents** | Claude Code first | Claude Code + hosts like Codex/Cursor/Kiro β **no Gemini CLI** | **Claude Code, Codex CLI, Gemini CLI** from one source of truth |
|
|
118
|
+
| **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 |
|
|
119
|
+
| **Autonomy** | Interactive sessions | Interactive slash-commands (`/qa`, `/ship`, β¦) | Opt-in **Ralph loop** with watchdog, worktree isolation, single-flight lock, per-story proofs |
|
|
120
|
+
| **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 |
|
|
121
|
+
| **Cross-model review** | β | `/codex` second opinion (Codex-only direction) | `yoke review` β resolves **codex β gemini β claude**, exit-code gate, works in and outside the loop |
|
|
122
|
+
| **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** |
|
|
123
|
+
| **License** | MIT | MIT | MIT |
|
|
124
|
+
|
|
125
|
+
**They compose β use all three where they're strongest.** Yoke's canon *ships* the superpowers methodology natively for all three 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 Codex/Gemini artifacts stay uniform.
|
|
126
|
+
|
|
127
|
+
**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.
|
|
128
|
+
|
|
129
|
+
## ποΈ Architecture
|
|
130
|
+
|
|
131
|
+
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:
|
|
132
|
+
|
|
133
|
+
```mermaid
|
|
134
|
+
flowchart TD
|
|
135
|
+
Canon["π¦ CANON β single source of truth<br/>skills Β· policy Β· loop spec Β· tool wiring"]
|
|
136
|
+
Skill["π οΈ yoke retrofit<br/>detect β plan β apply (backup) β report"]
|
|
137
|
+
Canon --> Skill
|
|
138
|
+
Skill --> Claude["Claude Code<br/>.claude/skills Β· .mcp.json Β· hook"]
|
|
139
|
+
Skill --> Codex["Codex CLI<br/>AGENTS.md Β· config.toml Β· RTK.md"]
|
|
140
|
+
Skill --> Gemini["Gemini CLI<br/>GEMINI.md Β· commands Β· settings.json"]
|
|
141
|
+
Loop["π€ yoke loop β autonomous Ralph loop<br/>gates Β· verify Β· review Β· isolation Β· proofs"]
|
|
142
|
+
Claude -. drives .-> Loop
|
|
143
|
+
Codex -. drives .-> Loop
|
|
144
|
+
Gemini -. drives .-> Loop
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Three layers β **Canon** (`yoke validate`) β **Retrofit** (`yoke retrofit`) β **Loop** (`yoke loop`) β on top of a durable **Context layer** (`yoke context`).
|
|
148
|
+
|
|
149
|
+
### What gets generated per agent
|
|
150
|
+
|
|
151
|
+
| Agent | Artifacts |
|
|
152
|
+
|---|---|
|
|
153
|
+
| **Claude** | `.claude/skills/`, `AGENTS.md`, `CLAUDE.md`, `.mcp.json` (code-graph + Playwright), and an rtk `PreToolUse` hook when WSL is available |
|
|
154
|
+
| **Codex** | `AGENTS.md` (native), `.codex/config.toml` (MCP servers), `RTK.md` |
|
|
155
|
+
| **Gemini** | `GEMINI.md`, `.gemini/commands/*.toml` (one per skill, full body), `.gemini/settings.json` (MCP + `AGENTS.md` context) |
|
|
156
|
+
|
|
157
|
+
> **rtk asymmetry, handled:** Claude can rewrite commands transparently via a hook (needs WSL on Windows); Codex and Gemini have no such hook, so they get an instruction to prefix commands with `rtk` instead.
|
|
158
|
+
|
|
159
|
+
> **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.
|
|
160
|
+
|
|
161
|
+
## π§° What's in the canon β 27 skills
|
|
162
|
+
|
|
163
|
+
`yoke retrofit` installs all of these into each agent natively. Provenance is credited in [`canon/skills/ATTRIBUTION.md`](canon/skills/ATTRIBUTION.md).
|
|
164
|
+
|
|
165
|
+
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 three agents.
|
|
166
|
+
|
|
167
|
+
**Process / methodology** β *superpowers-derived discipline (13)*
|
|
168
|
+
|
|
169
|
+
| Skill | What it does |
|
|
170
|
+
|---|---|
|
|
171
|
+
| `brainstorming` | Explore intent, requirements & design before any creative work |
|
|
172
|
+
| `writing-plans` | Turn a spec into a bite-sized, TDD implementation plan |
|
|
173
|
+
| `executing-plans` | Execute a written plan in a separate session with review checkpoints |
|
|
174
|
+
| `subagent-driven-development` | Run a plan task-by-task: fresh subagent + two-stage review each |
|
|
175
|
+
| `tdd` | Write the test first, watch it fail, write minimal code, refactor |
|
|
176
|
+
| `systematic-debugging` | Root-cause first β no fix without a confirmed cause |
|
|
177
|
+
| `verification-before-completion` | Prove it actually works before claiming done |
|
|
178
|
+
| `using-git-worktrees` | Isolated worktrees for safe / parallel work |
|
|
179
|
+
| `requesting-code-review` | Request a structured review before merging |
|
|
180
|
+
| `receiving-code-review` | Handle review feedback with rigor, not blind agreement |
|
|
181
|
+
| `dispatching-parallel-agents` | Fan out 2+ independent tasks concurrently |
|
|
182
|
+
| `finishing-a-development-branch` | Merge / PR / cleanup a finished branch |
|
|
183
|
+
| `writing-skills` | Author and verify new skills |
|
|
184
|
+
|
|
185
|
+
**Roles** β *gstack-derived, de-gstacked to be harness-agnostic (7)*
|
|
186
|
+
|
|
187
|
+
| Skill | What it does |
|
|
188
|
+
|---|---|
|
|
189
|
+
| `plan-eng-review` | Architecture / edge-case review of a *plan* |
|
|
190
|
+
| `plan-ceo-review` | Founder-mode scope & ambition review of a plan |
|
|
191
|
+
| `review` | Single canonical pre-merge code review β diff safety + engineering quality (architecture, edge cases, tests, performance) |
|
|
192
|
+
| `ship` | Ship workflow: tests β review β version β changelog β PR |
|
|
193
|
+
| `health` | Code-quality dashboard with a composite score |
|
|
194
|
+
| `retro` | Engineering retrospective from commit history |
|
|
195
|
+
| `document-release` | Post-ship documentation sync (README / CHANGELOG / β¦) |
|
|
196
|
+
|
|
197
|
+
**Yoke-native** β *authored or adapted for this harness (7)*
|
|
198
|
+
|
|
199
|
+
| Skill | What it does |
|
|
200
|
+
|---|---|
|
|
201
|
+
| `yoke-retrofit` | Set up the Yoke harness in a project (detect β plan β apply) |
|
|
202
|
+
| `authoring-prd` | Slice a product idea into loop-ready stories with testable acceptance criteria |
|
|
203
|
+
| `minimal-code` | Write the least code that solves the task (YAGNI; ponytail-derived) |
|
|
204
|
+
| `maintaining-context` | Keep `.yoke/context/` the durable source of truth (the Context layer) |
|
|
205
|
+
| `workflow` | The default order of operations, from idea to deploy |
|
|
206
|
+
| `unslop-ui` | Detect & remove AI-slop design tells (purple gradients, neon glow, emoji-iconsβ¦) |
|
|
207
|
+
| `visual-verification` | Widen verify to design-scan + the built-in `yoke flow-smoke` gate (screenshot proofs; video on failure) |
|
|
208
|
+
|
|
209
|
+
## π± Zero to 100: `yoke new` + `yoke prd`
|
|
210
|
+
|
|
211
|
+
Yoke's greenfield entrypoint β one command from idea to loop-ready project:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
yoke new my-app --idea="a CLI that tracks reading lists" # scaffold + retrofit + context + PRD
|
|
215
|
+
yoke loop on my-app && yoke loop run my-app --isolate # hand it to the loop
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`yoke new <dir>` refuses a non-empty directory (greenfield-only β use `yoke retrofit` for
|
|
219
|
+
existing projects), then: creates and `git init`s the directory, writes a minimal scaffold
|
|
220
|
+
(`README.md`, `.gitignore`), runs the full **retrofit** (`--agent=` as usual), initialises the
|
|
221
|
+
**context layer** (with `--idea` seeded into `PROJECT.md` as the north star), writes a commented
|
|
222
|
+
**PRD template** to `.yoke/prd.yaml`, and makes the initial commit β so `--isolate` works from
|
|
223
|
+
iteration 1. With `--idea`, it then drafts the PRD from your idea via an agent (`--runner=`,
|
|
224
|
+
default `claude`) and commits it as a second commit (`docs: draft PRD from idea`).
|
|
225
|
+
|
|
226
|
+
- **Exit codes** β `0` success; `1` usage / non-empty dir / draft failure (the scaffold survives β
|
|
227
|
+
retry with `yoke prd draft`); `2` requested draft agent unavailable.
|
|
228
|
+
|
|
229
|
+
**`yoke prd draft [dir] --idea="..."`** turns an idea into 5β12 small, independently shippable
|
|
230
|
+
stories with testable behavioral acceptance criteria (greenfield STORY-1 scaffolds the project
|
|
231
|
+
skeleton + test suite and wires `verify.command`). An existing PRD with stories is never
|
|
232
|
+
overwritten without `--force`; the untouched template doesn't trigger the guard. Runs through
|
|
233
|
+
the same idle-timeout watchdog as the loop (`--timeout`).
|
|
234
|
+
|
|
235
|
+
**`yoke prd check [dir]`** is the chainable pre-loop lint gate: schema validation plus
|
|
236
|
+
duplicate-id, empty-acceptance, and zero-stories checks. Exits `0` with
|
|
237
|
+
`β PRD valid β N stories, M pass`, `1` on any violation. The `authoring-prd` canon skill
|
|
238
|
+
teaches interactive sessions the same story-slicing discipline.
|
|
239
|
+
|
|
240
|
+
## π€ The autonomous loop
|
|
241
|
+
|
|
242
|
+
Opt-in and off by default. Each iteration starts a **fresh agent** and passes through hard gates before anything is committed:
|
|
243
|
+
|
|
244
|
+
```mermaid
|
|
245
|
+
flowchart LR
|
|
246
|
+
A[pick next PRD story] --> B{clean worktree?}
|
|
247
|
+
B -- no --> X[blocked]
|
|
248
|
+
B -- yes --> C{acceptance<br/>criteria?}
|
|
249
|
+
C -- no --> X
|
|
250
|
+
C -- yes --> D[agent implements<br/>one story]
|
|
251
|
+
D --> E{tests green?}
|
|
252
|
+
E -- no --> X
|
|
253
|
+
E -- yes --> F{reviewer<br/>approves?}
|
|
254
|
+
F -- no --> X
|
|
255
|
+
F -- yes --> G[commit + mark passes:true<br/>+ proof in .yoke/proof/]
|
|
256
|
+
G --> A
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
yoke loop on . # enable (recorded in .yoke/config.yaml)
|
|
261
|
+
yoke loop status . # show state + PRD progress
|
|
262
|
+
yoke loop run . \
|
|
263
|
+
--runner=codex \ # implement with Codexβ¦
|
|
264
|
+
--reviewer=claude \ # β¦review with Claude (role separation)
|
|
265
|
+
--isolate \ # each story in a throwaway git worktree
|
|
266
|
+
--max=20
|
|
267
|
+
yoke loop off . # disable
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**PRD format** (`.yoke/prd.yaml`):
|
|
271
|
+
|
|
272
|
+
```yaml
|
|
273
|
+
- id: STORY-1
|
|
274
|
+
title: Add a health endpoint
|
|
275
|
+
priority: 1 # lower = higher priority
|
|
276
|
+
acceptance: # Definition of Done (required, else blocked)
|
|
277
|
+
- GET /health returns 200
|
|
278
|
+
passes: false # the loop sets this true only on green tests
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
The loop stops when every story is `passes: true`. State lives **outside the model context** β the PRD file plus git β so each iteration is fresh.
|
|
282
|
+
|
|
283
|
+
### Watching a run
|
|
284
|
+
|
|
285
|
+
Every iteration emits token-free, harness-side feedback (Node console + local files β **zero agent tokens**):
|
|
286
|
+
|
|
287
|
+
- **Live console** β `βΆ S6 (19/45) β implementingβ¦ Β· verifyingβ¦ β committed β 20/45`.
|
|
288
|
+
- **`.yoke/loop-status.json`** β the current state; read it any time with `yoke loop status`:
|
|
289
|
+
```
|
|
290
|
+
Loop: BLOCKED on S5 "Segment schemas"
|
|
291
|
+
verifying Β· iteration 19 Β· 18/45 Β· updated 2026-06-29T10:00:00.000Z
|
|
292
|
+
reason: story did not verify (working tree has uncommitted changes β review/clean before re-running)
|
|
293
|
+
```
|
|
294
|
+
- **`.yoke/loop.log`** β an append-only timeline of every phase transition.
|
|
295
|
+
|
|
296
|
+
A per-iteration **idle timeout** guards against a genuinely hung agent: if the agent produces
|
|
297
|
+
**no output at all** for `--timeout` minutes (default 20; `0` disables), the loop kills it
|
|
298
|
+
(SIGTERMβSIGKILL) and marks the story blocked. A slow-but-working agent that keeps streaming
|
|
299
|
+
output is **never** killed β the output stream *is* the liveness signal. Set a project default
|
|
300
|
+
with `loop.timeoutMinutes` in `.yoke/config.yaml`.
|
|
301
|
+
|
|
302
|
+
The loop trusts **verify**, not the agent's exit code: a story whose tests are green is
|
|
303
|
+
committed even if the agent process exited non-zero (a common Windows `.cmd`-wrapper ghost).
|
|
304
|
+
A failing verify is retried up to `verify.retries` times (default 1) so a transient flake
|
|
305
|
+
self-heals while a real failure still blocks.
|
|
306
|
+
|
|
307
|
+
`.yoke/loop-status.json`, `.yoke/loop.log`, and `.yoke/loop.lock` are runtime artifacts;
|
|
308
|
+
`yoke retrofit` gitignores them (along with `.yoke/worktrees/`, `.yoke/backup/`, and
|
|
309
|
+
`.yoke/proof/`) so they never trip the clean-tree gate.
|
|
310
|
+
|
|
311
|
+
### Single-flight guard + cleanup
|
|
312
|
+
|
|
313
|
+
Two concurrent `yoke loop run`s would race on the PRD and status files, so the loop takes a
|
|
314
|
+
**lock** (`.yoke/loop.lock`) for the duration of a run. A second invocation exits `2` with
|
|
315
|
+
`Another loop is already running here (pid β¦). If that is wrong, run: yoke loop cleanup`. A lock
|
|
316
|
+
whose holder process is dead is taken over automatically (with a warning).
|
|
317
|
+
|
|
318
|
+
**`yoke loop cleanup [dir]`** removes what a crashed loop leaves behind: every worktree under
|
|
319
|
+
`.yoke/worktrees/` (via `git worktree remove --force` + `prune` β user-created worktrees are
|
|
320
|
+
never touched) and a **stale** lock file. A live lock is reported and left alone. Exits `0`
|
|
321
|
+
when everything cleaned, `1` if any removal failed.
|
|
322
|
+
|
|
323
|
+
## π Cross-model review (`yoke review`)
|
|
324
|
+
|
|
325
|
+
Outside the loop, `yoke review` has a **second** model review your current diff as a
|
|
326
|
+
pass/fail gate β the interactive counterpart to the loop's `--review`/`--reviewer`.
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
yoke review . # review the uncommitted working tree
|
|
330
|
+
yoke review . --base=main # review the range main..HEAD instead
|
|
331
|
+
yoke review . --reviewer=codex # force a specific reviewer
|
|
332
|
+
yoke review . --focus="the auth layer" # steer what it scrutinises
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
- **Reviewer resolution** β picks the first available of **codex β gemini β claude**,
|
|
336
|
+
preferring a model *other* than the one you drive so the review is genuinely cross-model.
|
|
337
|
+
On a Claude-only machine it degrades to a self-review (and says so).
|
|
338
|
+
- **Scope** β the uncommitted working tree by default, or a commit range with `--base=<ref>`.
|
|
339
|
+
- **Exit-code gate** β exits `0` when the reviewer approves, `1` when it finds a blocking
|
|
340
|
+
issue, `2` when no (or an unavailable) reviewer CLI is found. Chain it: `... && yoke review`,
|
|
341
|
+
or wire it into a pre-push hook.
|
|
342
|
+
- Runs through the same idle-timeout watchdog as the loop (`--timeout`, default 20 min).
|
|
343
|
+
|
|
344
|
+
## π¨ Visual & design verification β done, with a photo
|
|
345
|
+
|
|
346
|
+
Unit tests don't catch a blank page, an unwired route, or generic AI-slop design. Yoke adds three things:
|
|
347
|
+
|
|
348
|
+
- **`yoke design-scan [dir]`** β a static scanner for the visual *tells* of AI-generated UIs
|
|
349
|
+
(AI-purple gradients, gradient hero text, neon glow, emoji-as-icons, gradient overload). It
|
|
350
|
+
scores findings and **exits non-zero over budget** (`--max`, default 4; `--report` to list only),
|
|
351
|
+
so it drops straight into your verify pipeline.
|
|
352
|
+
- **`yoke flow-smoke [dir]`** β a built-in browser gate with **proof artifacts** (below).
|
|
353
|
+
- **`unslop-ui` + `visual-verification` skills** β the design rubric, plus how to compose a verify
|
|
354
|
+
pipeline (`types β units β design-scan β flow-smoke`).
|
|
355
|
+
|
|
356
|
+
Because the loop trusts **verify as the source of truth**, widening `verify.command` to include the
|
|
357
|
+
scanner and the flow-smoke makes visual quality a real gate β not an afterthought.
|
|
358
|
+
|
|
359
|
+
*Tell set informed by the MIT-licensed [vibecoded-design-tells](https://github.com/JCarterJohnson/vibecoded-design-tells) research.*
|
|
360
|
+
|
|
361
|
+
### `yoke flow-smoke [dir] [--url=<baseUrl>] [--label=<name>]`
|
|
362
|
+
|
|
363
|
+
Configure your key user flows once in `.yoke/config.yaml`:
|
|
364
|
+
|
|
365
|
+
```yaml
|
|
366
|
+
smoke:
|
|
367
|
+
baseUrl: http://localhost:3000
|
|
368
|
+
flows:
|
|
369
|
+
- name: home
|
|
370
|
+
path: /
|
|
371
|
+
landmark: "main h1" # optional CSS selector to wait for
|
|
372
|
+
- name: login
|
|
373
|
+
path: /login
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
For every flow, `yoke flow-smoke` loads the route against the running dev server, waits for the
|
|
377
|
+
landmark, and fails on a non-OK response or **any console/page error**. The proof contract:
|
|
378
|
+
|
|
379
|
+
- **Screenshots always** β every flow (pass *or* fail) saves `.yoke/proof/<label>/<flow>.png`;
|
|
380
|
+
the failure screenshot *is* the evidence.
|
|
381
|
+
- **Video only on failure** β each flow is recorded, but the clip is kept only when the flow
|
|
382
|
+
goes red (`<flow>.webm`); green runs delete it.
|
|
383
|
+
- **Labelled per story** β inside the loop, verify runs with `YOKE_STORY=<story-id>`, so proofs
|
|
384
|
+
land in `.yoke/proof/<story-id>/` automatically. Standalone runs use `latest`, or pass
|
|
385
|
+
`--label=`. The label dir is wiped per run β evidence is always from the latest run.
|
|
386
|
+
- **Exit codes** β `0` all flows green (chain it: `... && yoke design-scan . && yoke flow-smoke .`),
|
|
387
|
+
`1` any flow failed, `2` not runnable (no `smoke:` config, or Playwright missing).
|
|
388
|
+
- **Playwright comes from the *target project*, never Yoke** β
|
|
389
|
+
`npm i -D playwright && npx playwright install chromium` there. Start the dev server before
|
|
390
|
+
verify (e.g. via `start-server-and-test`); `--url=` overrides `baseUrl`.
|
|
391
|
+
|
|
392
|
+
`.yoke/proof/` is gitignored by the retrofit β proofs are runtime artifacts and never break the
|
|
393
|
+
loop's clean-tree gate.
|
|
394
|
+
|
|
395
|
+
## π§ Context layer (`.yoke/context/`)
|
|
396
|
+
|
|
397
|
+
Yoke keeps durable, cross-session context so a fresh-context agent is never blind:
|
|
398
|
+
|
|
399
|
+
- `PROJECT.md` β the north star (goal, constraints, non-goals, success criteria).
|
|
400
|
+
- `DECISIONS.md` β an append-only ledger. The loop adds an entry per completed story; you and agents add the *why*.
|
|
401
|
+
- `KNOWLEDGE.md` β reusable gotchas and conventions.
|
|
402
|
+
|
|
403
|
+
`yoke retrofit` scaffolds these files (non-destructively β your edits are never overwritten).
|
|
404
|
+
The loop reads them into every agent + reviewer prompt and logs decisions back on each story's
|
|
405
|
+
commit. Manage them directly with `yoke context init` and `yoke context status`. The
|
|
406
|
+
`maintaining-context` skill teaches agents to honour the same files during interactive work.
|
|
407
|
+
|
|
408
|
+
> Commit `.yoke/context/` to git. The `--isolate` loop runs each iteration in a worktree
|
|
409
|
+
> checked out from HEAD, so it only sees committed context.
|
|
410
|
+
|
|
411
|
+
## π‘οΈ Safety model
|
|
412
|
+
|
|
413
|
+
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**.
|
|
414
|
+
|
|
415
|
+
- **Commit integrity** β a story is never recorded `passes: true` without a corresponding commit; a failed commit reverts the PRD.
|
|
416
|
+
- **Role separation** β the implementer never reviews its own work; `--reviewer` can even be a different agent.
|
|
417
|
+
- **Isolation** β with `--isolate`, failed or partial work is discarded with the worktree and never reaches your main tree.
|
|
418
|
+
- **Non-destructive retrofit** β existing files are backed up before any change; settings are merged, not replaced.
|
|
419
|
+
- **Independent verification** β "done" means *your test command exits 0*, not "the agent said so".
|
|
420
|
+
- **Single-flight** β a lock prevents two loops from racing the same repo; `yoke loop cleanup` recovers after crashes.
|
|
421
|
+
|
|
422
|
+
## π§ Choose your code-graph
|
|
423
|
+
|
|
424
|
+
`yoke retrofit --code-graph=graphify|serena` (default `graphify`, remembered per project). The `yoke-retrofit` skill asks and recommends based on the project.
|
|
425
|
+
|
|
426
|
+
| | **graphify** | **Serena** |
|
|
427
|
+
|---|---|---|
|
|
428
|
+
| Engine | tree-sitter AST + graph | real language servers (LSP) |
|
|
429
|
+
| Strength | fast, multimodal (code + PDFs + images) | symbol-exact cross-file refactoring |
|
|
430
|
+
| Token efficiency | ~70Γ reduction on large mixed repos | standard, no index to go stale |
|
|
431
|
+
| Best for | rapid exploration / migration / onboarding | systematic refactoring in typed codebases |
|
|
432
|
+
| Caveat | heuristic edges; static index can go stale | one language server per language |
|
|
433
|
+
|
|
434
|
+
## πͺ Token efficiency
|
|
435
|
+
|
|
436
|
+
Yoke attacks tokens on two complementary surfaces:
|
|
437
|
+
|
|
438
|
+
- **rtk** compresses noisy command/tool output before it enters context (wired as a hook/instruction per agent).
|
|
439
|
+
- 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.)*
|
|
440
|
+
|
|
441
|
+
## π± Why & how it was built
|
|
442
|
+
|
|
443
|
+
**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.
|
|
444
|
+
|
|
445
|
+
**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).
|
|
446
|
+
|
|
447
|
+
**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/).
|
|
448
|
+
|
|
449
|
+
## ποΈ Project layout
|
|
450
|
+
|
|
451
|
+
```text
|
|
452
|
+
canon/ # the source of truth β harness-agnostic
|
|
453
|
+
AGENTS.md skills/ policy/ loop/ tools/ manifest.yaml
|
|
454
|
+
src/
|
|
455
|
+
canon/ # manifest schema + validator (yoke validate)
|
|
456
|
+
retrofit/ # detect Β· plan Β· apply Β· planners (claude/codex/gemini) Β· tools
|
|
457
|
+
loop/ # prd Β· gates Β· runner Β· verify Β· git/worktree Β· loop Β· run-command Β· lock Β· cleanup
|
|
458
|
+
new/ # yoke new β greenfield bootstrap
|
|
459
|
+
prd/ # yoke prd draft|check β idea β stories + lint gate
|
|
460
|
+
review/ # yoke review β cross-model diff gate
|
|
461
|
+
smoke/ # yoke flow-smoke β browser gate with screenshot/video proofs
|
|
462
|
+
scan/ # yoke design-scan β AI-slop design gate
|
|
463
|
+
context/ # the durable context layer
|
|
464
|
+
docs/superpowers/ # the spec and every component's implementation plan
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
## πΊοΈ Roadmap
|
|
468
|
+
|
|
469
|
+
- **npm publish** (`@hecer/yoke`) β one-liner `npx` install (package prepared).
|
|
470
|
+
- **Security gate** β a `cso`-style audit skill + `yoke audit` (deps, secrets, diff surface).
|
|
471
|
+
- **Token-budget gate** β per-story budget with abort; cost transparency for loop runs.
|
|
472
|
+
- **Multi-reviewer quorum** β N independent reviewers with distinct lenses (correctness / security / acceptance).
|
|
473
|
+
- **Merge queue** β re-test against the latest main before integrating, for parallel/multi-agent loops.
|
|
474
|
+
- **More agents** β the canonβretrofit pattern generalises; OpenCode and Copilot CLI are natural next targets.
|
|
475
|
+
|
|
476
|
+
## π§ͺ Development
|
|
477
|
+
|
|
478
|
+
```bash
|
|
479
|
+
npm test # vitest (322 tests)
|
|
480
|
+
npm run build # tsc, no emit errors
|
|
481
|
+
npm run yoke -- validate canon
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
## π Credits & inspiration
|
|
485
|
+
|
|
486
|
+
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.
|
|
487
|
+
|
|
488
|
+
## π License
|
|
489
|
+
|
|
490
|
+
MIT β see [`LICENSE`](LICENSE).
|
|
491
|
+
|
|
492
|
+
<div align="center">
|
|
493
|
+
<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>
|
|
494
|
+
</div>
|
package/canon/AGENTS.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Yoke Harness β Agent Baseline
|
|
2
|
+
|
|
3
|
+
You are operating in a project retrofitted by Yoke. Follow these always:
|
|
4
|
+
|
|
5
|
+
- **Quality first:** Test-driven development is the default. No production code without a failing test first. See skill `tdd`.
|
|
6
|
+
- **Stop-the-Line:** Do not start implementation until Definition of Done / Acceptance Criteria are written. See `policy/gates.md`.
|
|
7
|
+
- **Role separation:** The agent that implements does not self-review, self-merge, or self-audit security. See `policy/roles.md`.
|
|
8
|
+
- **Context efficiency:** Prefer the wired tools (rtk for command output, the code-graph for symbol lookup) over reading whole files. See `tools/`.
|
|
9
|
+
|
|
10
|
+
This file is the portable baseline. Agent-specific instructions are generated alongside it (CLAUDE.md, GEMINI.md).
|
|
11
|
+
|
|
12
|
+
## Skill routing & precedence
|
|
13
|
+
|
|
14
|
+
When several skills could match the same task, resolve deterministically:
|
|
15
|
+
|
|
16
|
+
1. **Methodology before role.** Skills that decide *how* to work (`brainstorming`, `writing-plans`,
|
|
17
|
+
`tdd`, `subagent-driven-development`, `systematic-debugging`, β¦) take precedence and set the
|
|
18
|
+
process. Role skills (`review`, `ship`, `health`, `retro`, β¦) add a perspective on top.
|
|
19
|
+
2. **One canonical entrypoint per concern** β pick the most specific:
|
|
20
|
+
- Plan-time architecture review β `plan-eng-review`
|
|
21
|
+
- Plan-time product / scope review β `plan-ceo-review`
|
|
22
|
+
- **Pre-merge code review β `review`** (the single canonical one)
|
|
23
|
+
- Requesting a review (dispatch a reviewer) β `requesting-code-review`
|
|
24
|
+
- Handling review feedback β `receiving-code-review`
|
|
25
|
+
- Overall order of operations (idea β deploy) β `workflow`
|
|
26
|
+
3. **Don't double-run.** These skills declare their own triggers aggressively; when more than one
|
|
27
|
+
matches, the precedence above and the most-specific entrypoint decide. Do not run two skills
|
|
28
|
+
that serve the same concern on the same task.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Project β North Star
|
|
2
|
+
|
|
3
|
+
> Edit this file. It is the durable goal every Yoke agent reads before implementing.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
<!-- One paragraph: what this project is and the outcome it must produce. -->
|
|
7
|
+
|
|
8
|
+
## Constraints
|
|
9
|
+
<!-- Hard limits: stack, platforms, performance, compliance. -->
|
|
10
|
+
|
|
11
|
+
## Non-goals
|
|
12
|
+
<!-- Explicitly out of scope. The most valuable section for preventing drift. -->
|
|
13
|
+
|
|
14
|
+
## Success criteria
|
|
15
|
+
<!-- How we know it works. -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Loop Specification (Ralph + GSD)
|
|
2
|
+
|
|
3
|
+
The autonomous loop is OPTIONAL and toggle-able:
|
|
4
|
+
|
|
5
|
+
- `yoke loop on` / `yoke loop off` β enable/disable (recorded in `.yoke/config.yaml`, default off).
|
|
6
|
+
- `yoke loop status` β show enabled state + PRD progress.
|
|
7
|
+
- `yoke loop run [--max=N] [--isolate]` β run the loop (default cap 25 iterations).
|
|
8
|
+
|
|
9
|
+
Pass `--isolate` to run each iteration in a fresh git worktree: the agent works on a throwaway checkout, and only a verified, committed story is fast-forwarded back into the main tree. A failed iteration never touches your working tree. Requires `.yoke/prd.yaml` to be committed to git, since the worktree is a checkout of HEAD.
|
|
10
|
+
|
|
11
|
+
Pass `--review` (or `--reviewer=<claude|codex|gemini>` for a different agent) to add a role-separated review step: after the tests pass, an independent reviewer agent must approve the change before the story is committed and marked done. A rejection blocks the story (no commit). The reviewer is a fresh agent pass β the implementer never reviews its own work.
|
|
12
|
+
|
|
13
|
+
When enabled and run, each iteration:
|
|
14
|
+
|
|
15
|
+
1. Pre-dispatch gate: the git worktree must be clean, else `blocked`.
|
|
16
|
+
2. Pick the highest-priority unfinished PRD story (`.yoke/prd.yaml`).
|
|
17
|
+
3. Stop-the-Line gate: the story must have acceptance criteria, else `blocked`.
|
|
18
|
+
4. Run a fresh agent to implement ONE story. The runner is selected by `--runner=<claude|codex|gemini>` or the first configured agent (default claude); the loop refuses to start if that agent's CLI is not installed.
|
|
19
|
+
5. Run the project's verify command (config `verify.command`, or detected `npm test`).
|
|
20
|
+
**Verify is the source of truth** β the agent's exit code is advisory, so a spurious
|
|
21
|
+
non-zero exit (e.g. a Windows `.cmd` wrapper) cannot block a story whose tests are green.
|
|
22
|
+
A failing verify is retried up to `verify.retries` times (default 1) so a transient flake
|
|
23
|
+
self-heals; a real failure still fails. Only if verify passes is the story marked
|
|
24
|
+
`passes: true`, committed atomically, and a decision logged. If verify fails: `blocked`.
|
|
25
|
+
6. Stop when all stories `passes: true` (`complete`), or the iteration cap is reached (`cap-reached`).
|
|
26
|
+
|
|
27
|
+
State lives outside the model context: the PRD file + git. The agent runner is pluggable.
|
|
28
|
+
|
|
29
|
+
## Limitations
|
|
30
|
+
- The loop verifies via the project's test command and an optional agent review; it has no formal merge-queue or multi-reviewer quorum.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# PRD Schema
|
|
2
|
+
|
|
3
|
+
The loop is driven by a versioned PRD file. Each story:
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
- id: STORY-1
|
|
7
|
+
title: Short imperative description
|
|
8
|
+
priority: 1 # lower = higher priority
|
|
9
|
+
acceptance: # Definition of Done (required before implementation)
|
|
10
|
+
- The endpoint returns 200 for a valid request.
|
|
11
|
+
passes: false # set true only when acceptance is met and tests are green
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Stop condition: every story has `passes: true`.
|