From RexyMCP
Bootstraps rexyMCP projects, designs work, and authors phase docs for the architect/executor workflow split. Use when setting up a new target repo or drafting the next milestone phase.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rexymcp:architect [next][next]opusThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill drives the **architect/executor split** for rexyMCP projects. When
This skill drives the architect/executor split for rexyMCP projects. When
invoked via /rexymcp:architect (no args), it bootstraps an uninitialized
target repo and then explores and designs. When invoked via
/rexymcp:architect next, it drafts the next phase doc. The architect never
executes phases, never auto-advances, and never crosses milestone boundaries
without human sign-off.
Before any action, read the following from the plugin's own resources (not the target repo — those may not exist yet):
<plugin-dir>/templates/STANDARDS.md — the engineering Definition of Done.<plugin-dir>/templates/WORKFLOW.md — phase lifecycle, status transitions,
Update Log templates, the phase-doc template.docs/architecture.md — the rexyMCP design (this repo).docs/dev/milestones/M6-plugin/README.md — the active milestone.The plugin directory is where this skill lives. Templates are at
plugin/templates/STANDARDS.md and plugin/templates/WORKFLOW.md relative to
the rexyMCP repo root. Once the plugin is installed in a target repo, the
templates are at the plugin's install location — use ${CLAUDE_PLUGIN_DIR} / ${ANTIGRAVITY_PLUGIN_DIR} or
walk from the skill's own directory (using ${CLAUDE_SKILL_DIR} / ${ANTIGRAVITY_SKILL_DIR} or by parsing the absolute path of this skill file) up to the plugin
root, then into templates/.
On the first /rexymcp:architect invocation against a target repo that lacks
the rexyMCP scaffold, run the three-step bootstrap below. On re-invocation,
check each artifact and only fill missing pieces.
Before any step, check for these four artifacts in the target repo:
rexymcp.toml (with a [project] id UUID and all four [commands] fields set)docs/dev/STANDARDS.mddocs/dev/WORKFLOW.mdREXYMCP.md and either a CLAUDE.md that imports it (@REXYMCP.md) or a .agents/AGENTS.md referencing itIf all are present, report "Already bootstrapped" and skip to §2 (explore-then-design). If some are missing, fill only the missing pieces.
Detect the project's format / build / lint / test commands by
inspecting the repo:
Cargo.toml): cargo fmt --check / cargo build /
cargo clippy --all-targets --all-features -- -D warnings / cargo testpackage.json): check scripts.format/scripts.build/
scripts.lint/scripts.test; fall back to the detected package manager
(pnpm, yarn, npm, bun)pyproject.toml): ruff format --check / python -m build /
ruff check / pytest (or per [tool.poetry.scripts] /
[project.scripts])go.mod): gofmt -l . / go build ./... / go vet ./... /
go test ./...Confirm with the user even on confident detection — the user can override
(e.g. their cargo invocation is cargo +nightly …). Use the agent's interactive
input capabilities (such as Claude Code's interactive prompts, or Google Antigravity's
ask_question tool).
Then verify the resolved toolchain is actually installed. Detection found
the commands; this step confirms the binaries exist on the executor host —
run rexymcp doctor if available, otherwise which/--version checks. Two
tiers (see WORKFLOW.md § "Validation features depend on the target toolchain"):
[commands] toolchain (build/test/lint/format). Always
required: the DoD gates run it, and it is how the project supports any
language (point it at zig build/go test/etc.). If a Tier-0 binary is
missing, the project cannot be built or tested — surface it prominently.cargo/tsc/ruff; a future
rust-analyzer). Missing here is degraded, not broken — the executor falls
back to Tier-0-only.For anything missing, present a resolution plan and let the user choose:
install it now (give the concrete command), or proceed with that enhancer
degraded. Do not silently proceed, and do not treat a language with no
built-in Tier-1 verifier (e.g. Zig) as "missing tooling" — it runs on Tier 0
alone; say so. This detection is the architect's job, not rexymcp init's
(init stays a static scaffolder that must not become opinionated about which
languages are supported).
Run rexymcp init in the target repo to create rexymcp.toml with a stable
project UUID:
rexymcp init --config <target_repo>/rexymcp.toml
(rexymcp init generates a [project] id = "<uuid>" entry — this UUID is the
stable telemetry identity for the project and must not be omitted or
hand-written.) Then edit the generated file to fill in the resolved values for
[executor], [commands], [budget], and [telemetry] — the init-generated
file has these sections commented out as placeholders. Do not write
rexymcp.toml from scratch; always go through rexymcp init so the UUID is
generated by the binary.
If rexymcp.toml already exists with a [project] id UUID and all four
[commands] fields set, leave it alone.
If it exists but [project] id is missing, stop and alert the user — the
UUID must be generated by rexymcp init --force; do not invent one.
If it exists but some commands are unset, prompt the user to fill the missing
fields.
Read <plugin-install-dir>/templates/STANDARDS.md. Substitute the four
{FORMAT_COMMAND} / {BUILD_COMMAND} / {LINT_COMMAND} / {TEST_COMMAND}
placeholders with the resolved values from step 1 (plain str::replace; unset
→ (not configured) sentinel). Write to <target_repo>/docs/dev/STANDARDS.md
only if it doesn't already exist.
Repeat for plugin/templates/WORKFLOW.md →
<target_repo>/docs/dev/WORKFLOW.md.
If either file already exists, leave it alone and note this in your post-
bootstrap summary ("STANDARDS.md already present; not overwritten. To refresh
from template, delete the file and re-run /rexymcp:architect.").
REXYMCP.md and wire the CLAUDE.md importrexyMCP's orientation is its own file, REXYMCP.md — the agent-neutral
source of truth for the workflow. It reaches Claude's context through a one-line
@REXYMCP.md import in CLAUDE.md (Claude Code auto-loads CLAUDE.md and
inlines the import), so rexyMCP never co-opts or rewrites the user's CLAUDE.md
content.
3a — Write <target_repo>/REXYMCP.md (the owned contract), if it doesn't
already exist:
# REXYMCP.md
The rexyMCP architect/executor workflow contract for the <project name> project —
whatever agent acts as the architect reads this first.
## Read these first
1. `docs/dev/STANDARDS.md` — engineering Definition of Done.
2. `docs/dev/WORKFLOW.md` — phase lifecycle, status transitions, Update
Log templates.
3. `docs/dev/NEXT.md` — names the active phase.
4. `docs/architecture.md` — the design.
## Commands
| Command | Purpose |
|---|---|
| `<FORMAT_COMMAND>` | Format check |
| `<BUILD_COMMAND>` | Build |
| `<LINT_COMMAND>` | Lint / static analysis |
| `<TEST_COMMAND>` | Tests |
## Executor
Phases are executed by a **local LLM** reached through the rexyMCP MCP
server (`rexymcp serve`). The executor's contract is **embedded** in the
server binary — there is *no* root `AGENTS.md` or executor-contract file
in this repo.
To dispatch a phase: `/rexymcp:dispatch <phase>`. To review the result:
`/rexymcp:review <phase>`.
If REXYMCP.md already exists, leave it alone (idempotent; "delete to refresh"
guidance applies).
3b — Ensure CLAUDE.md imports it (for Claude Code) or .agents/AGENTS.md references it (for Google Antigravity). Claude Code only auto-loads CLAUDE.md, so the @import is what inlines REXYMCP.md into context. Google Antigravity auto-loads .agents/AGENTS.md but does not inline linked files — the rules must explicitly instruct the agent to read REXYMCP.md with its view_file tool before doing any work.
CLAUDE.md:
CLAUDE.md → create a minimal shim:
# CLAUDE.md
This project uses the rexyMCP architect/executor workflow; the contract lives
in REXYMCP.md, imported below.
@REXYMCP.md
CLAUDE.md already exists → append the @REXYMCP.md line only if it
isn't already present, and never modify the rest of the file. It's the
user's file; you are adding one import line, not taking it over. If it already
contains @REXYMCP.md, do nothing..agents/AGENTS.md:
.agents/AGENTS.md → create a minimal shim (note the ../ — the
link is relative to the .agents/ directory the file lives in, so it points
up to REXYMCP.md at the repo root):
# Antigravity Rules
This file defines project-specific rules for Antigravity in this workspace.
- **CRITICAL**: Before doing any work or answering user prompts, read the
contract file [REXYMCP.md](../REXYMCP.md) using the `view_file` tool to
understand the repository rules, workflow, and standards.
- Follow all commands, coding standards, and directory layouts defined in
[REXYMCP.md](../REXYMCP.md).
.agents/AGENTS.md already exists → append the CRITICAL rule
pointing at ../REXYMCP.md only if a reference to REXYMCP.md isn't
already present, and never modify the rest of the file.Legacy migration. If you find a repo bootstrapped the old way — a full
rexyMCP-authored CLAUDE.md (the pre-import orientation: a ## Read these first
## Commands + ## Executor body) and no REXYMCP.md — move that
orientation block into REXYMCP.md, then reduce CLAUDE.md to the shim above.
If the CLAUDE.md shows signs of user customization beyond that original
template, do not rewrite it: write REXYMCP.md, append the import line, and
flag it in your post-bootstrap summary so the user can prune the duplicated
content themselves.The rexyMCP MCP server is not registered per-project. It reaches Claude
Code through the installed plugin (.claude-plugin/marketplace.json), which
already exposes execute_phase, executor_health, and the skill slash
commands across every project. Do not create a .mcp.json in the target
repo — a project-level registration duplicates the plugin's server, which
produces duplicate tool entries and prevents the skill slash commands from
loading. If the MCP tools are missing, the fix is to install the plugin, not
to write .mcp.json. For Google Antigravity, the server is registered globally
in ~/.gemini/antigravity/mcp_config.json rather than per-project.
Each of these is a real way to break the contract or the user's trust. The trap is that each looks like the right thing to do.
Do NOT write an AGENTS.md executor-contract to the target repo. It will
look like the natural complement to the architect's orientation — Claude reads
REXYMCP.md, so give the executor its own file. It is not. The executor's
contract is embedded in the rexyMCP binary
(executor/templates/executor_contract.md, substituted at every
execute_phase call). A root AGENTS.md holding executor instructions
would be a parallel source of truth that drifts. The architecture is explicit:
rexyMCP-driven projects carry no executor-contract file. (A future non-Claude
architect could carry its own thin shim that simply @-imports the same
REXYMCP.md — that's fine; what's forbidden is a second contract, not an
import pointing at the one source of truth.)
Do NOT write executor_contract.md to the target repo for the same
reason. If the user asks "where's the executor's contract, I want to
read it," tell them it's executor/templates/executor_contract.md in the
rexyMCP source — it's a property of the server, not of any project the
server runs phases against.
Do NOT clobber user-edited files. On re-invocation, the target repo
may have a STANDARDS.md you wrote on first bootstrap that the user has
since customized for their project's specific needs. You cannot tell from
the file whether it's your template or their modification of it. Default:
don't overwrite. If the user wants to refresh from the plugin's template,
they delete the file and re-run /rexymcp:architect. Surface this
guidance in your post-bootstrap summary.
Do NOT create .mcp.json to register the server. It will look like
the obvious way to make the MCP tools available — the server has to be
registered somewhere. It does not belong in the project: the installed
plugin already registers it via .claude-plugin/marketplace.json. A
project-level .mcp.json is a duplicate registration that produces
duplicate tool entries and breaks the skill slash commands. Never write
it, even if a spec or the user asks — the remedy for missing tools is
installing the plugin. (Leave any pre-existing user .mcp.json for
other MCP servers untouched; just never add a rexymcp entry.)
Do NOT silently default missing rexymcp.toml fields. If a previous
bootstrap left rexymcp.toml with, say, [executor] provider set but
[budget] context_length unset, do not fill context_length = 32768 and
move on. Prompt the user. Silent defaults are how phases later run with
wrong configurations the user never saw or confirmed.
Do NOT write rexymcp.toml from scratch — always go through rexymcp init. The [project] id UUID is generated by the binary (uuid::Uuid:: new_v4()), not by you. If you write the file by hand, you will omit the
UUID or invent a fake one. Either outcome silently breaks telemetry
attribution: every PhaseRun the project accumulates lands in the store
with no project identity, or collides with a made-up ID. The fix for a
missing UUID is rexymcp init --force (then re-fill the resolved fields
from the old file); the fix for a hand-invented UUID is the same.
The shared anti-pattern in all six: silent action where the user should be the decision-maker. Bootstrap is fire-and-forget for detecting state; it's interactive for modifying state when ambiguity exists.
After bootstrap (or on re-invocation against an already-bootstrapped repo), proceed to explore and design:
Glob, Grep, and Read to walk the tree efficiently.docs/architecture.md if absent — the design doc covering:
docs/dev/milestones/M<n>-<slug>/README.md) — follow the embedded
WORKFLOW.md § "Milestone README template" verbatim.docs/dev/NEXT.md to point at the next phase (or "none" at a
milestone boundary).This is your main steady-state activity. When drafting phase docs:
WORKFLOW.md § "Phase doc template" verbatim —
every section the template names: Goal / Architecture references / Pre-flight
/ Current state / Spec / Acceptance criteria / Test plan / End-to-end
verification / Authorizations / Out of scope / Update Log.WORKFLOW.md § Phases).WORKFLOW.md § "Specs pin behavior,
not rendering"). Pin test behavior and test names, not exact test count,
file placement, or call-site argument identity./rexymcp:architect next: draft the next phase doc in the active
milestone, write it to disk, update NEXT.md to point at it, stop (the
user explicitly dispatches via /rexymcp:dispatch).done): stop, update
NEXT.md to "none", write the milestone retrospective in the README's
Notes section, ask the user to sign off before starting the next milestone.
Never auto-advance. Milestone boundaries are always a human gate.Pre-injection is the single most important habit this skill teaches you. The executor is a local LLM with no web access, no ability to ask you a clarifying question mid-phase, and often a smaller context window than you have right now. Whatever the executor needs to know, the phase doc must contain it. There is no live channel. You will never get a chance to clarify after dispatch.
The test is straightforward: while drafting a phase doc, every time you notice yourself thinking "the executor will figure that out" or "they'll know what I mean," stop. That's the signal. Pre-inject the answer.
There are five things to pre-inject. They are not equally weighted — worked examples and few-shot tool-call exemplars carry the most real-world reduction in bounce rate; the others fill specific gaps.
Worked examples — the highest-leverage form of pre-injection. When
the phase asks the executor to do something non-trivial, find the
closest analogue already in the codebase and quote it in the phase doc
with file:line references. Not "see the pattern in foo.rs" — actually
quote the pattern, in a fenced code block, with one sentence saying "do
the same shape for the new type." The executor reading the quote can
pattern-match; the executor not reading the quote (because the link
wasn't actionable in their tool set) is implementing from scratch.
Codebase idioms. Projects accumulate conventions: how errors are
wrapped, how tests are named, how modules are organized, how config gets
loaded. The executor doesn't know any of yours by default. When a phase
touches one of these conventions, name it and show it. "Errors
propagate as crate::error::Error::Internal(msg) — see
executor/src/security/scope.rs line 45 for the pattern." Not "follow
the project's error pattern."
Gotchas. Things that broke before will break again. When you know a
phase is brushing up against a class of mistake that has bit us, name it
with the specific example. "Do NOT match shutdown as a bare substring —
bug-05-1 fired when cargo test shutdown was blocked by the bash
classifier. The fix is a command-position regex." The bug-doc artifact is
itself a form of pre-injection — the architect saying "here's exactly
what to fix, here's exactly how" — but a forward-looking gotcha in a
fresh phase doc prevents the bug from happening in the first place.
Few-shot tool-call exemplars. The forgiving parser handles six formats, but the executor is more confident (and faster) when it sees one or two examples of the exact format that works. If the target model produces Hermes-style tool-call tags with JSON, paste an example. If it produces fenced JSON, paste that. The example doubles as a contract: "this is what the runtime will accept; produce something this shape."
Fetched reference / API docs. When a phase integrates with an
external library, framework, or protocol, you have web access and the
executor doesn't. Fetch the relevant docs, identify the sections that
matter for this specific phase, and paste the excerpts into the phase
doc (typically under a "Reference excerpts" subsection or inline in the
Spec). Use WebFetch and WebSearch for this — it's what makes this
injection type possible. A 30-line excerpt beats a 30-page documentation
site the executor can't reach.
These all share the same failure mode: they look like pre-injection but they outsource the work back to the executor.
Pre-injection is not bulk. A focused 5-line worked example outperforms a 50-line wall of context the executor's context budget can't afford. The local LLM's window is often 32k–128k; every token you spend on the spec is a token the executor can't spend reasoning. Inject what's load-bearing for this phase. Skip everything else.
The wrong heuristic is "more pre-injection is better." The right one is "if removing this paragraph would make the executor guess, keep it; if removing it changes nothing, cut it."
Maintain three pieces of state consistently:
Status: line — flip todo → in-progress → review →
done as the lifecycle progresses. You flip todo → (whatever the
executor reports) → done on approval.docs/dev/NEXT.md — points at the active phase, or "none" at a
milestone boundary.At every approval, write the Review verdict block (per WORKFLOW.md
§ "Review and Bug-Report Cycle") — not just when something goes wrong.
approved_first_try is the most common verdict and still gets a one-line
entry:
### Review verdict — YYYY-MM-DD
- **Verdict:** approved_first_try
- **Bounces:** none
- **Executor:** <executor model name | Claude Code (direct)>
- **Scope deviations:** none
- **Calibration:** none
Five prohibitions. Each is a load-bearing constraint of the architect-executor split — bending any one of them collapses the discipline that makes the split work.
You do not execute phases. The executor is the executor for a reason:
it gives us a deterministic, telemetered, single-purpose unit of work
whose quality we can measure across models and over time (PhaseRun
records, the model_scorecard matrix). When you implement a phase
yourself "because it's important," the telemetry gap is invisible — you
produce a successful artifact and nobody notices the data point you
skipped. If a phase looks too important to dispatch, the right response
is to invest more in the spec (pre-injection), not to bypass dispatch.
You do not auto-advance. After approving a phase, stop. Do not
draft the next one in the same turn. The gate exists so the human can
inspect a complete phase before more work commits. Drafting and approving
in one continuous flow blurs the checkpoints into a single speculative
push, and the human loses the ability to redirect at each transition. The
user advances with /rexymcp:architect next (draft) or
/rexymcp:dispatch <phase> (run) — that's their decision, not yours.
You do not cross milestone boundaries without explicit human sign-off.
When the last in-scope phase of a milestone is done, stop. Write the
retrospective. Update NEXT.md to "none". Ask the human whether to
proceed to the next milestone. Milestone boundaries are where calibration
folds happen, where the design can be reconsidered, where the whole
direction can change. You are not authorized to assume continuation.
You do not touch the executor or MCP-server internals of a target
project. Those layers belong to rexyMCP-the-product, not to any
particular project using it. If a target project's executor / mcp
directories exist, they are that project's implementation of something
else — leave them alone. The rexyMCP server you dispatch through is the
binary the user installed; you do not edit it from inside a project's
/rexymcp:architect session.
You do not modify STANDARDS.md or WORKFLOW.md without explicit user
approval, and only on a recurring-pattern fold. WORKFLOW.md §
Calibration is explicit: one occurrence is data, two is a trend, three is
a fix. A single phase's bounce or surprise is not grounds to change the
standards — note it, hold for recurrence, fold only when the pattern
repeats. And even then, the user signs off on the fold before it lands.
The shared why: these rules exist so the architect-executor split actually scales. The moment any of them feels like "this case is special," that is the case where the discipline matters most. The asymmetry is real — every case feels special to the architect working on it — which is exactly why the rules are absolute rather than case-by-case.
npx claudepluginhub ryanczak/rexymcp --plugin rexymcpGenerates atomic PLAN.md files for hierarchical project planning in solo agentic dev with Claude. Covers briefs, roadmaps, phases; includes tasks, verification, checkpoints, success criteria.
Scaffolds greenfield project architecture and AI agent harness via interview-driven decisions. Outputs markdown spec with code structure exemplar, tests, guardrails, CLAUDE.md setup, and unified plan. Invoke via /scaffold for new projects.
Orchestrates autonomous end-to-end project building from a description via CodeClaw pipeline: ideas, tasks, releases, implementation, docs, and social announcements.