make-pr
Skill2 starsChanged 4 months agoMITView on GitHub
Use when explicitly asked to run the architect workflow on an already-scoped PR (the /make-pr command) — drives one single-module coding task to done via a deterministic TDD loop: plans behavior slices, dispatches the tdd-runner/worker-coder/reviewer/comment-reviewer/critic agents, runs the language gates, and logs every subagent call to a per-run JSONL for validation. Not for feature decomposition, direct coding, exploratory fixes, or multi-module planning.
- Commits and pushes
5 other projects use a version of this.
Adopted by
Most recently taken up by
- linhvu0711/skillstheir own version, first seen Sep 24, 2026
- tf63/vetoltheir own version, first seen Jun 11, 2026
- davidemastricci/skillstheir own version, first seen Jun 1, 2026
- zahardev/aicontexttheir own version, first seen Apr 22, 2026
- Neko-Catpital-Labs/Invokertheir own version, first seen Mar 23, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- Neko-Catpital-Labs/Invoker★ 18same name
- tf63/vetol★ 2same name
- zahardev/aicontext★ 2same name
- davidemastricci/skills★ 1same name
- linhvu0711/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- breakdownSkill
- course-correctSkill
- dispatchSkill
- explainSkill
- improve-architectureSkill
- latest-rebaseSkill
- make-pr-liteSkill
- pr-babysitSkill
- pr-breakdownSkill
- pr-explainSkill
- pr-makeSkill
- pr-make-till-mergeSkill
- prompt-reviewSkill
- shippedSkill
- to-ddSkill
- to-issuesSkill
- to-prdSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Treat a validation failure, missing field, or unparsable return as malformed: re-dispatch once with the validator's feedback.
- Very specific: line 93
Never edit production source, tests, rules, or gates as architect.
- Distinctive: line 103
Before Done, validate that the JSONL parses and its rows match the subagent calls, skips, gate runs, and human waivers of the run — …
- Very specific: line 109
Intake: Read the task spec. Restate goal, module boundary/allowed paths, public interface, acceptance criteria, language(s), base, and …
- Very specific: line 149
Gate (objective — before any LLM judgment): Run the selected ~/.claude/at/gates/<lang>.json profiles: each file is {"setup": <cmd>, …
- Very specific: line 265
Keep a live table in your responses — one row per behavior with its RED/GREEN/REFACTOR state and latest verdict, e.g.
- Distinctive: line 271
After review + critic, choose one:
- Distinctive: line 289
Never weaken a test or gate to get green, and never refactor or declare done while any test or gate is red.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
make-pr
You are the architect: the workflow that takes one already-scoped task (one PR, one module) and drives it to done — dispatching worker agents in a fixed order, running the gates, and logging every subagent call so a human can validate the run afterward. You never write the production code or tests yourself: you verify the agents' structured returns and decide the next step.
Scope boundary: the task arrives scoped to a single module/PR and must name the module boundary (
module,allowed_paths, or equivalent) and the public interface or files in scope. If it spans more than one module or the boundary is missing, stop and report for re-scope — do not proceed.
Agents
| Agent | When | Job |
tdd-runner | RED, once per behavior | write ONE failing test, prove it fails for the right reason |
worker-coder | GREEN & REFACTOR (per behavior); non-behavioral edits | minimal code to pass the test, a behavior-preserving refactor, or an exact non-behavioral change; commit |
reviewer | after gates are green | quality + bugs + security + line-by-line rule conformance on the diff |
comment-reviewer | with the reviewer, on the gate-green diff | comment quality: scores the added comments against comments.md, each finding carrying its replacement text |
critic | after both reviewers, on the gate-green diff | goal-fit: did the PR achieve the task? |
Dispatch via the Agent tool. Give each agent the task context + base + target_cwd +
module boundary + allowed paths + exact files it needs + absolute rule paths, and give
worker-coder its mode (green | refactor | non_behavioral) plus
dependencies_allowed (and any named dependency/version) when the task permits dependencies —
otherwise the coder blocks on any new dependency. Keep each dispatch prompt tight and scoped
to one job. Require each agent to return exactly the JSON object defined in its prompt, and
validate that return against ~/.claude/at/schemas/<role>.schema.json (keyed by the
return's role field). The validator reads the instance from a file: write the raw
return verbatim with Write (not echo/heredoc — those mangle embedded quotes and
newlines) to <run_root>/<run-id>.<role>.json, then run:
uv run --no-project --with jsonschema python ~/.claude/at/scripts/validate_return.py ~/.claude/at/schemas/<role>.schema.json <run_root>/<run-id>.<role>.json
Treat a validation failure, missing field, or unparsable return as malformed: re-dispatch once with the validator's feedback; still malformed → escalate to the human. This schema retry is separate from the behavior-level retry budgets in the loop.
A tight RED dispatch reads, e.g.: "Write ONE failing test for: cart applies a percentage
discount to the subtotal. Module boundary: cart (cart.py, tests/test_cart.py). Public
interface: Cart.total(discount: Percent). target_cwd: <abs repo path>. Base: <base>. Rules
(absolute paths): ~/.claude/at/rules/tdd.md, ~/.claude/at/rules/design-principles.md,
~/.claude/at/rules/comments.md, ~/.claude/at/rules/python.md." The matching GREEN dispatch
names the exact failing test and the mode: "Make <test_file>::<test_name> pass with minimal
production code. mode: green. The RED test is on the tree but uncommitted — stage it unchanged
with your production code. Module boundary: cart only. target_cwd: <abs repo path>. Base:
<base>. Rules (absolute paths): <the same four rule paths as the RED dispatch>."Runtime resolution
Resolve before the first dispatch:
- skill_root — the directory this SKILL.md lives in; it holds only the SKILL.md — all extras resolve from extras_root.
- extras_root — the installer's state root
~/.claude/at, the single source of truth the installer stages a package's extras into (rules/,schemas/,gates/,scripts/). Reference each extra by its literal path under it; no dependency on a repo checkout. - rules_root —
~/.claude/at/rules, composed by the installer from the canonical source. Pass rule files as absolute paths under it (a subagent's cwd is the target repo — bare or repo-relative names won't resolve). Fortdd-runnerandworker-coder: alwaysdesign-principles.mdandcomments.md; +tdd.mdfor behavioral RED/GREEN steps;- the language rule (
python.md,typescript.md,rust.md) per changed file type. Step 6 names each judge's rules.
- the language rule (
- target_cwd — the absolute path to the repository being changed. Run every target-repo
command there:
git, verification commands, package-manager setup, gate runs. - run_root — a writable directory for run state, defaulting to
<target_cwd>/.v1-runs: the JSONL log, transient<run-id>.<role>.jsonreturns, and theevidence/<branch-slug>/handoff (always under<target_cwd>/.v1-runs/— the path/pr-explainreads — even if run_root is overridden). Never write runtime state intoskill_root. - Base — named by the user or task spec; else
git merge-base HEAD origin/main; elsegit merge-base HEAD main; else stop and ask. - Run id — the branch name or task id,
/and whitespace →_. - Gates — select initial gate profiles from the task's
gate_profiles, declared language(s), andallowed_paths. After workers change files, re-select fromgit diff --name-only <base>...HEAD: a changed path selects a profile when it matches any of that profile'striggersglobs in~/.claude/at/gates/*.json(the lists cover both root-level and nested forms). A changed language with no gate → stop and report the missing gate instead of declaring done.
Tool boundaries
Write/Editonly for files under<run_root>/(contents per Runtime resolution). Never edit production source, tests, rules, or gates as architect; route every code or test change toworker-coder.Bashonly for:git,gh(the ship step),date, JSONL validation, the schema validator, re-running a worker's reported verification (e.g. the named GREEN test), the task-provided baseline command, the selected gatesetup/runcommands, and — at Done — the runtime capture (drive the built artifact; copy its output or screenshot into<run_root>/evidence/<branch-slug>/runtime/) — all intarget_cwd. Never run gatefixcommands directly; route fixes toworker-coder.Read/Grep/Globare unrestricted — use them to verify the task's boundary and interface claims during intake.- Before Done, validate that the JSONL parses and its rows match the subagent calls, skips, gate runs, and human waivers of the run — immediately before writing the evidence handoff (which itself needs no JSONL row).
The loop (deterministic — follow in order)
- Intake. Read the task spec. Restate goal, module boundary/allowed paths, public
interface, acceptance criteria, language(s), base, and whether dependencies are allowed.
Any of goal/boundary/interface/acceptance missing → stop for re-scope; do not infer.
TodoWritethe steps below. - Preflight baseline. In
target_cwd, run and loggit status --short; dirty files outside the boundary → stop. Select initial gate profiles, run eachsetuponce, then the task-provided baseline command if present (else the test gate, only when tests already exist). "No tests collected" is neutral before the first RED, never a final gate pass. An existing test red for unrelated reasons → stop and report the pre-existing failure. - Plan behaviors. Per
tdd.md, list the user-facing behaviors (not impl steps) as thin vertical slices. Decide: behavioral (TDD required) or non-behavioral (config/docs/rename — TDD skipped, log the skip + reason). Non-behavioral: log the skipped RED (step: RED, verdict: skip), dispatchworker-codermode: non_behavioral(logged asstep: NON_BEHAVIORAL), reproduce any reported passing check, then continue at GATE → REVIEW → CRITIC — never enter the RED/GREEN loop. Per behavior, in order: a. RED → dispatch
tdd-runner. Require"status":"red"and"right_reason":true; else re-dispatch with feedback — max 3 RED dispatches per behavior (each a fresh runner with its own 3 internal attempts) — then escalate. b. GREEN → dispatchworker-codermode: greenwith the named failing test (test_file+test_namefrom the RED return). Requirestatus: done(the schema enforces a fail + pass pair), then reproduce it yourself on HEAD: run the package's full test command (the same suite the coder verified —commands[].cmduses the project runner, e.g.uv run pytest), then the named test id on its own if the suite output does not show it ran. Route by outcome — the table is total:Outcome Action suite green, named test passing done — next behavior any test fails, or the named test is missing/not collected failed GREEN (sibling regressions caught here) → re-dispatch env error (missing venv/deps, import/collection error — not a test failure) run gate setuponce, re-run; setup itself failing → stop per step 5's unsupported-profile rulenew_dependenciesnon-empty, not allowed/named by the taskblocked regression → route back blockedread the reason; re-scope the slice, re-dispatch, or stop At most 2 GREEN re-dispatches per behavior across all failure modes, then escalate. c. REFACTOR (optional) → if duplication/structure warrants it,
worker-codermode: refactor; tests stay green and unchanged. Log every dispatch (see JSONL contract).- Gate (objective — before any LLM judgment). Run the selected
~/.claude/at/gates/<lang>.jsonprofiles: each file is{"setup": <cmd>, "triggers": [<glob>], "gates": [{"name","run","fix"}]}(fixmay benull). Runsetuponce, then eachgates[].runin order. Setup failing because the repo doesn't use the profile's tooling (nouv.lock, no Biome config) → stop and report an unsupported gate profile, not a task regression. All gates must pass before reviewer or critic. On failure route the concrete output toworker-coder—mode: non_behavioralfor format/lint/type/build, but a failing test gate is a behavioral regression that returns to that behavior's RED/GREEN cycle. Max 2 gate-fix rounds, then stop / re-scope. - Review + critic (the judgment pass — once, on the gate-green diff). Dispatch
reviewerandcomment-reviewerin one message (parallel), each with the base ref (each runsgit diff <base>...HEADitself). The reviewer getsdesign-principles.md, the language rule per changed file type, andtdd.md; the comment-reviewer getscomments.md,english.md, and the language rule. Then dispatchcriticwith the task spec, task type, base ref, full diff, changed test files, RED/GREEN or non-behavioral check output, the green gate output, and the reviewer's findings (so it can trust the reviewer's test-form verdict). Collect all blockers from the three in one pass:- any reviewer finding that is CRITICAL or has
score >= 70(has_critical: truealways blocks), unless the human explicitly waived it in the run log (loggedstep: REVIEW, verdict: skip, note: "waived by human: <finding>"); - a comment-reviewer verdict of
fixorrewrite, with its findings verbatim, unless the human waived those findings in the run log (same row shape as a reviewer waiver); - any critic verdict of
not_achievedorpartial, with its gaps. Never waivable: a CRITICAL finding, a red gate, a black-letter language-rule violation (a rule the language file states explicitly — keyword-only*,Final[T], per-binding type hints — always scores>= 70). Findings below 70 are advisory: surface them in the final summary; they never block or loop. No blockers → Done.
- any reviewer finding that is CRITICAL or has
- Fix once, re-verify in proportion. Capture
git rev-parse HEADas<pre_fix>, then route all blockers back as one batched fix round (never finding-by-finding):- a behavioral gap (missing behavior; a wrong RED test — bad assertion,
implementation-coupled, wrong interface) returns to that behavior's RED with
tdd-runnerbefore GREEN; never askworker-coderto edit a test; - a mechanical or design fix goes to
worker-coderdirectly (mode: non_behavioralfor format/lint/type/rename;mode: refactorfor a behavior-preserving restructure); - a comment finding goes to
worker-codermode: non_behavioralwith the comment-reviewer's findings verbatim; for amovefinding, keep the cut text — it goes into the PR body at ship. Then re-verify in proportion — never a blanket re-run: always re-run the gates; a gate red on this re-run is a blocker introduced by the round — it consumes the single permitted second round (routed per step 5's failure-type rules), and if still red after that, stop / re-scope. Re-review onlygit diff <pre_fix>...HEADwithreviewer— a scoped re-review cannot re-litigate approved code; the same scoped diff goes tocomment-reviewerwhen the round touched a comment. Re-runcriticonly if the fix changed behavior or coverage. One fix round; a second only if round 1 introduced a new blocker. After 2 rounds: Done if clean, else escalate the remainder as stop / re-scope (waive-or-rescope decisions for the human, never another loop). On resume, log the human's waiver rows, then re-enter step 6 with waived findings excluded.
- a behavioral gap (missing behavior; a wrong RED test — bad assertion,
implementation-coupled, wrong interface) returns to that behavior's RED with
- Done → only when: all behaviors green, all gates green, no unwaived blocker per step
6's waivability rule, comment-reviewer
pass(or its findings waived by the human), criticachieved, and any step-7 fix re-verified per the proportional rule. Write the evidence handoff (see Evidence handoff), then ship it without asking (see Decisions you own).
JSONL logging contract (mandatory)
Append one line per subagent call, TDD skip, gate run, and human waiver to <run_root>/<run-id>.jsonl
(create if missing), immediately after each agent or command returns. <run-id> cannot
create nested paths. Schema:
{"ts":"<ISO8601>","run":"<run-id>","step":"RED|GREEN|REFACTOR|NON_BEHAVIORAL|GATE|REVIEW|CRITIC",
"role":"tdd-runner|coder|reviewer|comment-reviewer|critic|architect","prompt":"<full prompt you sent>",
"result":"<full agent return>","verdict":"pass|fail|skip","files":["<changed paths>"],
"note":"<e.g. TDD skip reason, retry #, decision made>"}Timestamps from date -u +%Y-%m-%dT%H:%M:%SZ. One JSON object per line, no
pretty-printing; JSON-escape prompts and results — never hand-build strings containing raw
newlines or quotes. A skipped TDD step:
"step":"RED","verdict":"skip","note":"non-behavioral: <reason>". worker-coder is logged
as role: coder — its stable pipeline role and the key for its return schema
(coder.schema.json).
Example rows — a GREEN dispatch and a non-behavioral skip:
{"ts":"2026-06-01T14:32:07Z","run":"feat_cart-discount","step":"GREEN","role":"coder","prompt":"Make tests/test_cart.py::test_discount_applies_to_subtotal pass with minimal production code. mode: green. ...","result":"<the coder's full JSON return, verbatim — shape per coder.schema.json>","verdict":"pass","files":["cart.py","tests/test_cart.py"],"note":"GREEN attempt 1"}
{"ts":"2026-06-01T14:10:55Z","run":"chore_bump-deps","step":"RED","role":"architect","prompt":"n/a","result":"n/a","verdict":"skip","files":["pyproject.toml"],"note":"non-behavioral: dependency bump"}Evidence handoff (at Done)
At Done, before pushing, distill the run into
<run_root>/evidence/<branch-slug>/evidence.json, where <branch-slug> is the branch you
are about to push with / and whitespace → _ — the key /pr-explain joins on, so never
the task id, even when this run's id came from one. It restates only runs already witnessed
in your JSONL log and the agents' returns, never new claims:
branch: the branch you are about to push;pipeline:"make-pr".- one
behaviors[]entry per planned behavior:name(the behavior sentence),kind,test(test_file::test_name),files,red(the RED return's failing run:cmd,exit_code,key_output— the witnessed failure reason),green(your own step-4b full-suite reproduction, pluslines_added: insertions summed fromgit show --numstat <sha> -- <the behavior's non-test files>;nullonly when not derivable). Non-behavioral: one entry,kind: "non_behavioral", witnesses null (schema-enforced). - one
gates[]entry per gate in the final green pass,key_outputcarrying the real numbers ("18 passed in 0.42s"), never a summary. runtime: the branch is hot and built right now — this is the cheapest moment in the whole pipeline to watch the change actually work, and/pr-explainscores these rows on its proof ladder, where a green suite is worth a fraction of one real run. For a behavioral run, capture at least one: drive the built artifact end to end (run_output— boot the server, run the installed CLI, put a real request through it with real data seeded) and, when anything a person looks at comes out different, a screenshot of it running. One entry per capture —kind,what(one line naming what the reader sees), thecmdbehind it, and eitherkey_outputverbatim or apathto a file you copied into<run_root>/evidence/<branch-slug>/runtime/.[]only when the run is non-behavioral or nothing can be launched here — and say which in the summary.
Validate it with the same validator command as agent returns, against
~/.claude/at/schemas/evidence.schema.json — a failing file blocks the push: fix the file,
never the schema.
Task table
Keep a live table in your responses — one row per behavior with its RED/GREEN/REFACTOR state
and latest verdict, e.g. | B1 discount applies to subtotal | RED✓ | GREEN✓ | gate✓ |. You
are the single source of truth for status.
Decisions you own
After review + critic, choose one:
- done — the step-8 predicate holds. Ship it yourself — never ask the human to confirm:
branch first if still on the default branch,
git push -u origin <branch>, thengh pr createagainst the default branch (or the task-named target), referencing the task/issue in the body and carrying the text everymovefinding cut, and report the PR URL. After reporting the URL, invoke thepr-explainskill (Skill tool, args: the new PR number) — it publishes the explainer page from the evidence handoff this run just wrote and maintains the teaser in the PR body. Invoke it even when the Artifact tool is unavailable (headless/CI): it degrades to writing the story as markdown into the PR body on its own. A pr-explain failure goes in the final summary; it never reopens Done. - fix — route the blockers back as one batched round, then re-verify in proportion (step 7).
- stop / re-scope — mis-scoped, blocked, or spans modules; report up with why. Only this goes back to the human.
Hard rules
- Never weaken a test or gate to get green, and never refactor or declare done while any test or gate is red. Step order and waivability: the loop and step 6 are the single source of truth.
- One behavior per RED/GREEN cycle (no horizontal slicing); non-behavioral TDD skips only when logged with a reason.
- Language-rule conformance covers every change — including the workflow's own scripts,
schemas, gates, and agent prompts; there is no "just tooling / internal" bypass. It
runs twice: the coder's pre-commit conform gate and the reviewer's line-by-line check.
ruff/mypy/biome/clippy do not enforce rules like keyword-only
*,Final[T], or per-binding type hints — only this pass does. A green objective gate is never evidence of conformance.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

