Self Governance logo

Self Governance

Community
davisjam
self-governance

Apply MAGE to your own engineering work — the capstone mastery-skill of the method. Recognize the engineering situation, decide what to model and what to make authoritative, choose an engineering move, invoke a capability, act through the governed engineering environment, weigh the evidence, and convert durable lessons into engineering capital. This is the routing layer: it names the eight questions an engineering agent faces and sends each to the facet that owns it (model repertoire, engineering moves, situation recognition, judgment, system model-access, capability selection, alignment mechanisms, governance conversion). Two standing procedures live under it: AUDIT (survey a repo for missing guardrails and propose a prioritized adopt/adapt/skip plan) and INTERPRET-FAILURE (a failure just recurred — classify the class and convert it into a durable control: a constraint, sensor, validator, or gate). Use at DESIGN time — reviewing a new subsystem, state machine, queue, cross-service seam, or data model; or introducing concurrency, a trust boundary, an irreversible operation, or duplicated state/logic — to catch predictive smells whose failure class can be prevented by construction. Use when hardening an agent-collaborative codebase, reducing recurring agent-caused regressions, setting up guardrails / lints / gates / typed seams, reviewing governance posture, or when a failure class just recurred and should be prevented structurally, not only patched.

Overview

Publisherdavisjam
Repositorymodel-based-agentic-software-engineering
Skill nameself-governance
Stars
27
Forks
1
Bundled files
88
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 88 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by davisjam on GitHub. Read the source before you install it.

Installation

Install the Self Governance AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/davisjam/model-based-agentic-software-engineering/tree/main/plugin/mage/skills/self-governance
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/davisjam/model-based-agentic-software-engineering.git /tmp/model-based-agentic-software-engineering
mkdir -p .claude/skills
cp -r /tmp/model-based-agentic-software-engineering/plugin/mage/skills/self-governance .claude/skills/self-governance
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Self Governance in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Self Governance on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Self Governance is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Self-Governance

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.

The engineering loop

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.

What this skill establishes

  • Self-Governance applies MAGE to the work. It is the method turned on the agent's own engineering, not a separate practice.
  • Modeling and Alignment remain the two activities. Self-Governance is not a third one.
  • The skill knows the method; model providers know the system. Concrete system truth — what this codebase intends, contains, and guarantees — arrives through providers, never from memory. See system/model-access.md.
  • Specialized capabilities come through other skills. Self-Governance chooses the move; a specialized skill executes it. See skills/repertoire.md.
  • Consequential action stays bounded by the GEE. Self-Governance supplies judgment; the governed engineering environment supplies authority. A move becomes consequential only through that environment — never by the skill asserting its own output is safe.
  • Self-Governance is not Self-Operate. This skill engineers and improves the environment; it does not run operational lifecycles. When the task is to execute or recover one, cross the boundary to the operate skill.
  • Self-Governance is not self-certification. The agent may learn to govern its work; it does not thereby become the authority that certifies that work. Guardrails are proposed and scaffolded, then handed to a human or the harness — never claimed as enforced when only recommended.

Routing table

Name the question you face; go to the facet that owns it. Consult one; it points onward.

QuestionConsult
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.

Ambient stance

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.

The two standing procedures

Both live in learning/governance-conversion.md — they are how the loop's capitalize branch runs in practice:

  • AUDIT — survey a repo for missing guardrails and propose a prioritized adopt / adapt / skip plan. Its design-time trait scan is situation-recognition; consult practice/situations.md for the smell catalogue.
  • INTERPRET-FAILURE — a failure recurred; classify the class and convert it into a durable control (constraint / sensor / validator / gate), following alignment/repertoire.md.

Notes

  • Partner skills — three lenses on one environment. Self-Governance engineers the environment; self-operate runs its operational lifecycles and returns evidence when reality exposes a deficiency; self-communicate supplies the craft for the representations both produce. They are orthogonal, not isolated. Each is recorded as a capability in skills/repertoire.md — consult it for when to invoke which.
  • Beware the tower of governance. The primary failure mode of this skill is minting mechanisms faster than they earn their keep. Default to skip; proportion governance to the operation. The tradeoff belongs to 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.

Local adapter (plug points)

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:

  • File overlays — for a listed upstream file, create the named *.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.
  • Directory drop-in — any file you place under 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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

and 28 more files.

Frequently asked questions

What does the Self Governance AI skill do?

Apply MAGE to your own engineering work — the capstone mastery-skill of the method. Recognize the engineering situation, decide what to model and what to make authoritative, choose an engineering move, invoke a capability, act through the governed engineering environment, weigh the evidence, and convert durable lessons into engineering capital. This is the routing layer: it names the eight questions an engineering agent faces and sends each to the facet that owns it (model repertoire, engineering moves, situation recognition, judgment, system model-access, capability selection, alignment me...

Why use Self Governance on TypingMind?

Because you install it once and use it with any model. Self Governance is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Self Governance in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/davisjam/model-based-agentic-software-engineering/tree/main/plugin/mage/skills/self-governance. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Self Governance?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Self Governance?

As many as you like. As long as a model supports skills, you can use Self Governance with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Self Governance AI skill free?

Yes. It is published on GitHub by davisjam under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇