Escapement
Claude Code plugin for structured development workflows. Regulated workflow, one tick at a time.
What This Is
Escapement takes GitHub issues to merged pull requests in three layers. Each layer builds on the one below it:
| Layer | Scope | Who acts | What it gives you |
|---|
| Workflow skills | One issue | Claude, with you confirming each step | Issue → scratchpad plan → atomic commits → PR → archive |
| Factory | One issue | The AI agent, under an authorization you grant once | An approved plan and validation contract run to a validated PR. You approve the plan and merge |
| Manifest | Many issues, across repos | You, with the skills | A per-user dependency graph: what is ready, what can run in parallel, what drifted |
The workflow skills are the base and need nothing beyond the plugin. The factory and the manifest are two TypeScript CLIs in one package (scripts/factory.sh, scripts/manifest.sh), sharing a per-user SQLite database. All three work across every project you load the plugin in, and each project tunes them in its own CLAUDE.md.
flowchart TB
issues[("GitHub issues")]
subgraph manifest["Manifest: many issues, many repos"]
direction LR
mb["manifest-bootstrap"] --> mp["manifest-plan"] --> md["manifest-dispatch"]
ms["manifest-sync"]
mc["manifest-check"]
end
subgraph workflow["Workflow skills: one issue, you confirm each step"]
direction LR
sw["setup-work"] --> dw["do-work"] --> cp["create-pr"] --> aw["archive-work"]
end
subgraph factory["Factory: the same skills, run as the AI agent"]
direction LR
contract["Validation contract"] --> run["Authorized run"] --> vw["validate-work"] --> pr["PR with its report"]
end
issues --> mb
issues --> sw
md -->|"a worktree per issue"| sw
sw -->|"Approve + authorize run"| contract
pr -->|"you merge"| aw
aw --> ms
Skills activate from natural language ("setup issue 42", "commit these changes") or explicitly as /escapement:skill-name.
Installation
From Source
git clone https://github.com/fusupo/escapement.git
# Run Claude Code with the plugin
claude --plugin-dir /path/to/escapement
That is all the workflow skills need. The PreCompact hook also needs jq.
The Factory and the Manifest
The factory runner (scripts/factory.sh) and the manifest CLI (scripts/manifest.sh) are TypeScript in the plugin's manifest/ directory. Their dependencies aren't committed, so install them once in the plugin directory, not in your project. This needs Node.js and a C/C++ build toolchain for better-sqlite3:
npm ci --prefix /path/to/escapement/manifest
Both wrappers work from any project directory. bash /path/to/escapement/scripts/factory.sh --check (or manifest.sh --check) reports whether the dependencies are installed.
A factory run also needs the AI agent's identity (see GitHub as the AI Agent), and the project needs its checks in Escapement Settings (see Escapement Settings).
From a Marketplace
Escapement isn't published to a plugin marketplace yet. Load it with --plugin-dir.
How It Works
Layer 1: Workflow Skills
Work moves through four phases. Each one is a skill or two, and each stops for you at the points marked as hexagons:
flowchart LR
subgraph initialize["Initialize"]
direction TB
ps["prime-session"] -.-> sw["setup-work"]
ci["create-issue"] -.-> sw
sw --> approve{{"You approve the plan"}}
end
subgraph execute["Execute"]
direction TB
dw["do-work"] --> cc["commit-changes"]
cc --> confirm{{"You confirm each commit"}}
confirm -->|"next task"| dw
end
subgraph review["Review"]
direction TB
cp["create-pr"] --> rp["review-pr"]
rp --> merge{{"You merge"}}
end
subgraph archive["Archive"]
direction TB
hook["PreCompact hook"] -.->|"session logs"| aw["archive-work"]
end
approve --> dw
confirm -->|"tasks done"| cp
rp -->|"changes requested"| dw
merge --> aw
Initialize (prime-session, create-issue, setup-work). setup-work fetches the issue and has the scratchpad-planner agent analyze the codebase. It then writes SCRATCHPAD_{issue}.md with the plan, acceptance criteria, atomic tasks and open questions. It asks you the questions, and creates the feature branch once you approve the plan. prime-session orients a new session in the project, and create-issue files an issue from a passing idea.
Execute (do-work, commit-changes). do-work works through the scratchpad one task at a time and keeps the checklist and work log up to date. commit-changes makes an atomic commit in the project's format after each task.