/polytropos:architectfrom polytropos
Plan a complex task once on the frontier tier (Fable 5.1 today) and write the execution kit — PLAN.md, TASKS.md, GUARDRAILS.md, and model-pinned agents — that a cheaper model then executes at near-Fable quality. Use when the user says "plan this with Fable", "architect this", "review this codebase", or escalates a complex task. Not for running a kit; that is /polytropos:execute.
Ships in polytropos. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The goal: Fable 5 runs once, at the start; its judgment persists as scaffolding. The output is not just a plan — it is an execution kit a lesser model can run at near-Fable quality, because every decision that needed Fable-level judgment is already made and written down.
Check the current session model. Two entry modes:
model: fable. Give it this entire skill's Steps 1–3 as instructions plus a complete brief of the task and all relevant conversation context (the subagent sees none of it otherwise). A subagent cannot ask the user anything, so the run is two hops around Step 1's approval pause: the first hop explores and returns only the spec draft; you relay it to the user verbatim and collect their approval or edits; the second hop gets the approved spec back and writes the kit. Continue the same subagent for the second hop (SendMessage with its id) so its exploration carries over; if it cannot be continued, dispatch a fresh one with the original brief plus the approved spec, and say that the earlier exploration was not carried over. You relay its summary. The main session never leaves the daily driver./model fable, or wants to steer interactively): do Steps 1–3 in this session, stopping at Step 1's approval pause, then remind them to switch back (/model opus) once the kit is built.If the task is ambiguous, ask the scoping questions BEFORE burning Fable time — Fable works best with the full spec up front in one shot.
Write .claude/kits/<slug>/PLAN.md in the target project (<slug> = short kebab-case task name). It opens with the spec — what and why, no design yet:
Approval pause — the user signs off on the spec before any design. Draft those two sections, then stop and show them to the user. A misread requirement caught here costs one exchange; caught after the kit is written, it costs the whole Fable run. The draft goes in your reply, never onto disk: write nothing into .claude/kits/<slug>/ before approval, because a kit directory holding a PLAN.md and nothing else is indistinguishable from a broken kit. Below the draft, list the assumptions you made and any open question whose answer would change the plan. Continue only on the user's approval in this conversation. Their edits are the spec: write the approved text into PLAN.md as approved, and if the design later shows the spec cannot hold (a "done" that cannot be checked, a constraint that rules out every approach), stop and bring the conflict back to the user rather than quietly rewriting it. Skip the pause only when the user explicitly says to plan straight through, and say in the Step 3 handoff that the spec was not approved separately.
Once the spec is approved, the rest of PLAN.md is the design:
autonomy: advisory or autonomy: auto line anywhere in PLAN.md (absent = advisory). Execute reads it as the kit's dial for live re-routing and auto-escalation; the user can override it per run at invocation. An optional PLAN.md line, not a task field — the task-field contract is unchanged.budget: max-dispatches=N max-escalations=N max-consults=N line anywhere in PLAN.md (any subset of the three keys; absent = unbounded, today's behavior). Execute's own loop and all four headless drivers (bin/claude_execute.py, bin/copilot_execute.py, bin/codex_execute.py, bin/cursor_execute.py) honor it: on reaching a declared cap they stop cleanly, leave the remaining tasks' status untouched, and append ONE outcome: ... result=budget-stop line (run= included) instead of dispatching — never folded into a fluent summary. Like autonomy:, this is a PLAN.md line family, never a task field — the task-field contract is unchanged.roles: <token> <token> ... line anywhere in PLAN.md, naming the optional pipeline roles this kit adds beyond the standing trio (implementer / verifier / reviewer). Tokens come from exactly seven: scout, test-author, second-verifier, red-team, security-auditor, docs-editor, synthesizer; anything else is out of grammar. Absent = the trio, today's behavior — every kit written before this dial existed stays valid, and nothing here changes the default or auto-declares a role. An optional workflow: line names the assurance level: reviewed (the trio, default), extended (trio + declared roles), or direct (implementer and deterministic checks only, no independent review; say it by name, never beside roles:). Declare a role for a stated purpose from the task's risk, never because the name exists; its contract is python3 ${CLAUDE_PLUGIN_ROOT}/bin/kit_contract.py roster --kit .claude/kits/<slug> --json, and a headless driver refuses or discloses a role it cannot sequence, never skips it. Execute reads the line once at setup, dispatches each declared role at its own hook point, and records every declared-role dispatch as an agent: line in the kit's NOTES.md so the roster can be measured afterwards. Like autonomy: and budget:, this is a PLAN.md line family, never a task field — the task-field contract is unchanged.Before dispatching wide exploratory reads over an unfamiliar target repo, check whether it already carries a graphify-out/graph.json (or offer the user /polytropos:graphify to build one — an optional, external, availability-gated tool, not assumed present). When a graph exists, python3 bin/graph_ground.py ground --graph <path> --seed <file-or-symbol> (freshness against the working tree, a bounded walk from the seeds, a search fallback when the graph is stale, unknown, or silent), python3 bin/graph_brief.py brief --graph <path>, and a few targeted graphify explain <symbol> calls ground the plan at near-zero context cost. Read the freshness verdict first: a stale or unknown graph is hints, not evidence. But the graph's limits bind — dynamic loaders (importlib, plugin registries) are invisible to its AST extraction, and the absence of an edge is never evidence of the absence of a dependency — so treat it as a first map that narrows where to look next, never as the sole evidence backing a contract or dependency claim in PLAN.md.
This is the part that makes lesser models perform above their weight. Produce:
TASKS.md (same kit directory)Ordered task list. Every task must be executable by a model with zero access to this conversation:
id, title, status (pending/in-progress/done/blocked), model (sonnet default; opus for the genuinely hard ones; haiku for trivial mechanical ones)evidence: — red-green (default), regression, or precondition. Default means the verify command must be able to fail before the work; if it already passes, execute blocks the task. Mark regression/precondition when passing beforehand is the point (refactors, drift guards) — not to silence a check that should have gone red.## Phase N — <name> headings; the execute loop dispatches the reviewer agent at each phase end.depends: <ids> or independent: yes — execute parallelizes only tasks marked independent. depends: is machine-read: ids of task blocks in this kit, comma-separated, or (none) — never prose, ranges, or another kit's ids. Ids are unique; no self-dependency; no cycle. Execution validates the whole graph first and refuses an invalid kit, naming each finding (python3 ${CLAUDE_PLUGIN_ROOT}/bin/kit_contract.py graph --kit .claude/kits/<slug>).depends: chains that share a primary file and carry the same model pin. Execute may then serve the whole cluster with one continued (warm) implementer instead of N cold spawns; tasks marked independent: still fan out fresh. This is a hint, not a new task field — the task-field contract is unchanged.model field is authoritative at dispatch time: execute passes it as the Agent tool's model parameter, which overrides the implementer agent's frontmatter default. When a kit runs with the autonomy dial on auto, execute may layer a logged, upgrade-only runtime override on top at dispatch (one tier step, never to frontier) — the field itself is never rewritten and stays the dispatch default.model pins: python3 bin/routing_scorecard.py --history is EVIDENCE, not an auto-pin-setter — the architect weighs it and decides. Read references/routing-evidence.md when choosing pins or declaring roles: how to read the --history and --roles cards, the escalation lineage and failure breakdown, and the recurring brief-defect kinds that are evidence about your own briefs.NOTES.md beside PLAN.md/TASKS.md — cross-task learnings plus machine-read ledger lines (outcome:, agent:, reviewer:, defect:) that bin/routing_scorecard.py reads. The architect creates none of them, and the task-field contract (id/title/status/model/brief/acceptance/verify) is unchanged by them; their fields and rules are in references/routing-evidence.md.Pin down contracts and interfaces precisely; leave implementation judgment open where any competent model would do fine. Over-prescription wastes the kit; under-specification wastes the executor.
.claude/agents/ in the target project)Only create what the kit needs and doesn't already exist. Typical trio, each with project-specific conventions baked into its prompt:
<slug>-implementer.md — model: sonnet — executes one task brief exactly; stops and reports rather than improvising when the brief is wrong<slug>-verifier.md — model: sonnet by default (haiku only when every check is mechanical — a command exit code, a byte comparison; the routing history's Role quality card shows why), tools: Bash, Read, Grep, Glob — fresh-context adversarial check of acceptance criteria; never trusts the implementer's claims, reruns the verify command itself<slug>-reviewer.md — model: opus, tools: Bash, Read, Grep, Glob — reviews completed phases against PLAN.md for driftPin the read-only roles' tools: frontmatter — mandatory for every kit you generate. Verifier and reviewer get tools: Bash, Read, Grep, Glob (read/search plus Bash, no Write, no Edit); the implementer's tools stay unpinned, because writing is its job. Scope structurally rather than by instruction: a verifier with no editor cannot be talked into fixing the defect while it is in there. But write the honest limit into the agent file too, instead of trusting the pin — Bash alone can delete or rewrite any tracked file, and in this repo a verifier holding exactly this pin destroyed an authored docs section during mutation testing, never restored it, and reported its own damage as the implementer's defect. Removing Write/Edit removes the casual path, not the capability. So pair the pin with the practice that actually closes the gap, stated in both read-only agents' prompts: prefer non-mutating checks; when a check genuinely needs mutation, copy the target to a temp directory and mutate the copy, never a tracked file in place; if the tree is touched anyway, restore it byte-for-byte before reporting and say so; and close with git status --porcelain, reporting any unexpected change as the agent's own defect, never the implementer's.
When PLAN.md declares a roles: line, instantiate each declared role from its template. This skill ships one generic template per optional role at skills/architect/references/roles/<role>.md (resolve via ${CLAUDE_PLUGIN_ROOT}, falling back to "relative to this SKILL.md") — each a complete agent file with frontmatter, the role's mission, its hook point in the pipeline, and its recording contract. Copy the template to .claude/agents/<slug>-<role>.md in the target project and replace every <slug> placeholder with the kit slug and <repo-root> with the target repo's root. Templates are consumer-neutral: they name the kit's GUARDRAILS.md and the repo's own conventions, never this plugin's — put the target's fences there. Keep the template's model: default and its tools posture as written — the read-only roles carry the same tools: pin and damage-restore practice as the verifier and reviewer above; the write-capable roles (test-author, docs-editor, synthesizer) carry a scoped write mission instead of a pin — unless this kit has a specific reason to differ, in which case state the reason in PLAN.md. Do not widen a template's mission to cover another role's ground: the boundaries are the design (red-team attacks beyond the acceptance criteria rather than re-running the verifier's checks; security-auditor is fences, leaks, and injection surface only, not the reviewer's drift review; second-verifier must carry a stated different lens from the verifier's). And as with the trio, never reuse the name of an agent listed in an aesop manifest's primitives.agents.
Write the kit's fences to .claude/kits/<slug>/GUARDRAILS.md — task-scoped conventions, forbidden shortcuts, "always run X before claiming done". Execute reads the file at setup, so they load only when this kit runs and never tax other sessions. Always create this file, one per kit, no exceptions: if the kit genuinely needs no fences beyond PLAN.md's out-of-scope section, write that sentence and point at PLAN.md rather than omitting the file — an absent file is indistinguishable from a forgotten one, and a layout check that requires it fails the whole suite (hence every task's verify command), not just the kit that skipped it. Give it real substance, not a stub. Add to the target project's global CLAUDE.md only an invariant that is genuinely permanent and project-wide — true for every future session, not just this kit — and sparingly: that file is loaded everywhere, forever. Prefer judgement over rules: state the principle and name the signal to read (e.g. "match the surrounding file's error-handling style") instead of an absolute — EXCEPT rules protecting real money, live CLIs, or user data, which stay absolute and explicit. If a procedure is complex enough, make it a project skill (.claude/skills/<name>/SKILL.md) instead. These are the Fable-judgment rails the executors run on.
Aesop-managed target? If the target project has an aesop.yaml at its root, or an <!-- aesop:begin fence in its CLAUDE.md/AGENTS.md, those files are compiled output — hand-edits get flagged as drift by aesop sync and overwritten by aesop compile. Put the guardrails in aesop.yaml under primitives.instructions.blocks (scope: project) instead, then run aesop compile and confirm aesop sync reports no drift. Kit directories (.claude/kits/…) and kit-prefixed agent files are safe to write directly — aesop tracks only files it emits — but never reuse the name of an agent listed in the manifest's primitives.agents.
references/routing-evidence.md — read when choosing model pins, declaring a roles: line, or reading a kit's ledger: the --history and --roles cards, the roster comparison ladder, the outcome: line's optional fields, and what budget-stop means.references/roles/<role>.md — the seven optional-role templates instantiated in Step 2.End with exactly what happens next, e.g.:
Kit ready at
.claude/kits/<slug>/. Switch back to your daily driver (/model opus) and run/polytropos:execute <slug>. Blocked tasks escalate back to Fable one at a time — you won't pay Fable prices for execution.
The kit's model-pinned agents mean the model mix is enforced automatically during execution — nobody has to remember to downgrade.
When an explicit repository/kit/assignment and authorized startup config are supplied, use the native context-travel skill and read ${CLAUDE_PLUGIN_ROOT}/docs/CONTEXT-TRAVEL-SURFACES.md (or ../../docs/CONTEXT-TRAVEL-SURFACES.md relative to the context-travel skill) on demand for a bounded planning brief. Treat missing, stale, partial, or refused context as advisory; retain this workflow's authoritative sources, policy, pricing, permission, and mandatory verification rules. If no authorized context transport is available, continue this workflow and report context unavailable.
references/roles/docs-editor.md (opens in a new tab)references/roles/red-team.md (opens in a new tab)references/roles/scout.md (opens in a new tab)references/roles/second-verifier.md (opens in a new tab)references/roles/security-auditor.md (opens in a new tab)references/roles/synthesizer.md (opens in a new tab)references/roles/test-author.md (opens in a new tab)references/routing-evidence.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub agentmc15/polytropos --plugin polytropos17 skills in this plugin
/assess-improvementAssess an existing repository for a small, evidence-backed improvement opportunity and produce a scoped findings report and handoff briefs. Use when the user asks where a codebase could be improved, wants an evidence-driven improvement plan, or wants a harness or runtime ecosystem assessed — including multi-harness Polytropos assessments. Not for implementing, activating, enabling providers, or promoting a policy change./bench-routingRank published benchmark entries (Artificial Analysis Intelligence Index), recommend a model+effort per orchestration role given what each harness can actually dispatch, and check that recommendation against this repo's OWN measured routing outcomes. Use when the user asks whether a new/higher model should replace what a role currently runs on, wants a benchmark-informed routing recommendation, or asks "should we upgrade X to Y for this role" — the answer must be checked against the ledger, not just the benchmark./context-travelUse when a kit task needs a bounded, read-only lifecycle briefing, source explanation, or comparison of supplied validated views./context-weightReach for this when your context is huge, you're near 700K, cache reads are high, or you're asking should I compact — it explains what this skill can and cannot do, ranks prevent/prune/measure in priority order, and gives the checkpoint move before you compact./cost-reportAnalyze historical Claude Code usage from local transcripts — spend by model, most expensive sessions, and sessions where a cheaper model would have sufficed. Use when the user asks what they've spent, which model they've been using, or where they could save./dashboardBuild the local observability dashboard — one offline HTML page over the attempt ledger and history, the routing scorecard across every checkout, the telemetry snapshots and journal digests, and the evaluation, policy and training status — then report where it landed. Use when the user asks for the dashboard, an overview of what the ledger, scorecard or telemetry show, or to refresh the observability page. Not for analysis or routing changes; it renders what the owning engines report.