/mage:self-governancefrom mage
Applies MAGE methodology to engineering work: recognizes situations, models knowledge, aligns constraints, chooses moves, and converts failures into durable controls. Includes AUDIT and INTERPRET-FAILURE procedures for design-time review and regression prevention.
Ships in mage. 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.
This skill applies MAGE to the agent's own engineering work. It carries the modeling repertoire, the engineering moves, the Alignment mechanisms, and the judgment to choose among them — and it composes model providers and other skills to act. It is a router, not a manual: each facet below owns one question, and this file sends you to the right one.
Everything here supports one loop. Run it whenever you engineer.
recognize the situation
|
what do I need to know?
/ \
MODEL ALIGN
what is missing? what must hold?
\ /
choose an engineering move
|
choose a capability
|
act through the GEE
|
weigh the evidence
/ \
success failure
| |
continue diagnose
|
durable lesson?
/ \
no yes
| |
repair capitalize
MODEL and ALIGN are the two — and only two — MAGE activities. Modeling makes engineering knowledge explicit; Alignment gives that knowledge authority. Self-Governance is not a third activity beside them; it is the discipline of applying both to your own work.
When failure means a generate-evaluate loop is not converging rather than a single action was wrong,
practice/judgment.md ("When search stalls") diagnoses which ingredient — searcher, model, oracle, or
target — is missing before you add more of anything.
system/model-access.md.skills/repertoire.md.Name the question you face; go to the facet that owns it. Consult one; it points onward.
| Question | Consult |
|---|---|
| What situation am I in? | practice/situations.md |
| What kind of model could help? | modeling/repertoire.md |
| How should the representation improve? | modeling/moves.md |
| Which move is warranted among alternatives? | practice/judgment.md |
| What is true of this system? | system/model-access.md |
| What capability performs the move? | skills/repertoire.md |
| How should intent acquire authority? | alignment/repertoire.md |
| What should persist from this event? | learning/governance-conversion.md |
| How do I execute an operational lifecycle? | the self-operate skill (you have crossed this skill's boundary) |
The last row matters as much as the rest. Self-Governance must recognize when a task is operating the environment rather than engineering it, and hand off. A meaningful operational observation that comes back the other way — a recurring or structural weakness surfaced while operating — re-enters the loop here as a fresh engineering cycle.
Read principles.md — the portable engineering principles this skill
operates by (the generated mirror of the Davis AI-First Engineering Method). It is the
standing stance while this skill is loaded: verify rather than trust stale claims, name
shapes in types, surface load-bearing calls instead of swallowing them, right-size every
fix, and care with irreversible operations. Do not restate it here; the facets cite the
specific reflex each relies on.
Both live in learning/governance-conversion.md —
they are how the loop's capitalize branch runs in practice:
practice/situations.md for the smell catalogue.alignment/repertoire.md.skills/repertoire.md — consult it for when to
invoke which.practice/judgment.md — a
mechanism you cannot attach to a real, recurring failure is one the repo does not need,
even when the user asks for more.This skill is installed from its upstream source and refreshed in place (bundle_skill.py --install /
--refresh). A refresh overwrites every upstream file, so put your local additions where the refresh
never looks. Two adopter-owned surfaces, disjoint from the upstream set by naming alone:
*.local.md sibling. The agent reads it
as an APPEND after the upstream file. There is no override mode — replacing an upstream file wholesale
is a fork, out of scope for the adapter. Declared overlays:
principles.md → principles.local.md — your house operating principles, appended to the portable method.local/ is adopter-owned: the agent reads it on the
topic it names, and upstream never ships into local/. Use it for a standalone house note this skill
does not already carry.A refresh never reads, writes, or deletes a *.local.md file or anything under local/, so your local
tinkering survives every upstream update untouched.
alignment/mechanisms/ABSTRACTIONS.md (opens in a new tab)alignment/mechanisms/INDEX.md (opens in a new tab)alignment/mechanisms/README.md (opens in a new tab)alignment/mechanisms/agent/README.md (opens in a new tab)alignment/mechanisms/agent/context-and-dispatch/brief-linting.md (opens in a new tab)alignment/mechanisms/agent/context-and-dispatch/docs-hierarchy.md (opens in a new tab)alignment/mechanisms/agent/context-and-dispatch/dynamic-context-injection.md (opens in a new tab)alignment/mechanisms/agent/context-and-dispatch/role-typed-dispatch.md (opens in a new tab)alignment/mechanisms/agent/gates-and-merge-train/merge-train-mis-batching.md (opens in a new tab)alignment/mechanisms/agent/gates-and-merge-train/pre-commit-hook.md (opens in a new tab)alignment/mechanisms/agent/gates-and-merge-train/sentinel-first-commit.md (opens in a new tab)alignment/mechanisms/agent/gates-and-merge-train/staged-deploy-gates.md (opens in a new tab)alignment/mechanisms/agent/governance-doc-controls/claude-md-rule-index.md (opens in a new tab)alignment/mechanisms/agent/governance-doc-controls/doc-hygiene-lints.md (opens in a new tab)alignment/mechanisms/agent/governance-doc-controls/epic-and-design-templates.md (opens in a new tab)alignment/mechanisms/agent/governance-doc-controls/epic-definition-of-done.md (opens in a new tab)alignment/mechanisms/agent/governance-doc-controls/independent-design-review.md (opens in a new tab)alignment/mechanisms/agent/governance-doc-controls/mandatory-snippet-table.md (opens in a new tab)alignment/mechanisms/agent/governance-doc-controls/operational-playbooks.md (opens in a new tab)alignment/mechanisms/agent/governance-doc-controls/operator-runbook-skill.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub davisjam/model-based-agentic-software-engineering --plugin mage3 skills in this plugin
/self-communicateWrite and review engineer-facing prose, technical diagrams, talks, and slide decks. Use for engineering books, design docs, mechanism entries, runbooks, tutorials, reference material, and the operator's reports and explanations of tradeoffs. Applies document-specific registers, stable terminology, concrete mechanisms, and a prose audit, including textbook guidance that preserves necessary reasoning and examples. Routes diagrams to visualization resources and presentations through talk, deck, and slide design./self-operationsOperate an agent-fleet repository as a DevOps engineer — the positive lifecycle map of how the substrate works (managing agents, context windows, the git repo, deploys, the dev machine, cron, and the orchestrator's own hooks), plus a symptom → resolving-doc catalog for when something breaks. Use when running an orchestrator/operator session: dispatching or recovering agents, keeping the mainline deployable, reclaiming disk, colima/host-tool trouble, cron or merge-train health, hook misbehavior, or RCA of a substrate failure. LEADS with how things should work; troubleshooting is the fallback. Partner to the self-governance skill — operate routes a break to its fix, and when a failure RECURS, hand it to self-governance to convert into a durable control. NOT for the product's domain logic (its checkers, generators, business rules) — that is product code, not repo operation.Other plugins' skills for the same job