craftwright
Senior-engineer discipline for any AI coding agent. SOLID, DRY, separation of concerns, and a strict on-demand PR reviewer.
Modern AI coding agents produce code that compiles, passes tests, and ships. A senior engineer reading the diff sees five principles violated, a switch statement that should be polymorphism, and a class doing four things wearing one name.
craftwright is the opposite of "vibe coding." A discipline skill, a fresh-context review agent, and an automated workflow graph — the first two as plain markdown any AI coding agent can read, the third wired for Claude Code:
- A discipline skill that teaches your agent 16 system design principles (SOLID, DRY, separation of concerns, composition root, illegal-states-unrepresentable, ...) plus a code-discipline rulebook for commits, comments, scope, and verification.
- A senior-review agent that channels the strict, abstraction-loving reviewer who used to send your PRs back four times — the one who reduced your 100-line function to a 10-line one and wrote the rewrite inline. It runs as a fresh context that sees only your diff, never the conversation that produced it — so it reviews your code, not its own reasoning. Now you get him on demand.
- A workflow graph (Claude Code only) that wires those principles into a pipeline: research prior art, survey the codebase, plan, stop for your approval, implement, then review the diff through three independent lenses with adversarial verification and a bounded fix loop.
A "wright" is a craftsperson: millwright, playwright, shipwright. craftwright is what your AI becomes when you install this.
Why this exists
With AI assistants writing more of the code now and no one watching the diff with that level of scrutiny, the bar quietly slips. The patterns flagged constantly. The packages reached for instead of reinvented. The architecture refused to be let slide. If you've worked with a reviewer like that, you'll recognize it. If you haven't, this is what it sounds like.
Install
One source of truth, every tool.
| Your AI tool | Install | Notes |
|---|
| Claude Code | /plugin marketplace add aashish-thapa/craftwright
/plugin install craftwright@craftwright | Full: discipline skill + review agent + the /craftwright:plan → /craftwright:build workflow graph + re-injection & commit hooks |
| OpenAI Codex CLI | curl -sL https://raw.githubusercontent.com/aashish-thapa/craftwright/main/AGENTS.md >> AGENTS.md | details |
| Cursor | curl -sL .../AGENTS.md > AGENTS.md | details — reads AGENTS.md natively |
| Aider | curl -sL .../AGENTS.md > CONVENTIONS.md | details |
| GitHub Copilot | curl -sL .../AGENTS.md > .github/copilot-instructions.md | details |
| Google Antigravity | curl -sL .../AGENTS.md > .agents/rules/craftwright.md | details |
Anything reading AGENTS.md (Windsurf, Devin, Zed, JetBrains Junie, Amp, ...) | curl -sL .../AGENTS.md >> AGENTS.md | 28+ tools support the standard |
| Gemini CLI | curl -sL https://raw.githubusercontent.com/aashish-thapa/craftwright/main/GEMINI.md > GEMINI.md | Gemini's native file |
The full markdown content is mirrored to AGENTS.md, CLAUDE.md, and GEMINI.md at the repo root — pick whichever filename your tool prefers.
What changes about your AI's code
Before — your agent writes the obvious thing:
def area(shape):
if shape.kind == "circle": return 3.14 * shape.r ** 2
elif shape.kind == "square": return shape.side ** 2
elif shape.kind == "tri": return 0.5 * shape.base * shape.height
After — your agent reaches for the seam first:
class Shape(Protocol):
def area(self) -> float: ...
class Circle:
def __init__(self, r): self.r = r
def area(self): return 3.14 * self.r ** 2
class Square:
def __init__(self, side): self.side = side
def area(self): return self.side ** 2