Anti Entropy Governance logo

Anti Entropy Governance

CommunityPopular
GanyuanRan
anti-entropy-governance

Use when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically; destructive execution requires explicit confirmation.

Overview

PublisherGanyuanRan
RepositoryAegis
Skill nameanti-entropy-governance
Stars
1.2K
Forks
52
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

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

Installation

Install the Anti Entropy 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.
  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/GanyuanRan/Aegis.git /tmp/Aegis
mkdir -p .claude/skills
cp -r /tmp/Aegis/skills/anti-entropy-governance .claude/skills/anti-entropy-governance
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Anti Entropy 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 Anti Entropy 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 Anti Entropy 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.

Anti-Entropy

Overview

Use this skill when the task is not merely "change code" but "remove old paths safely without growing entropy".

This skill chooses between:

  • delete-first for internal code retirement
  • compat-exception for proven external dependency boundaries
  • confirmation-first for irreversible state or an external contract whose distributed consumers cannot be observed

It does not replace brainstorming, writing-plans, systematic-debugging, or verification-before-completion. It is a narrow governance owner for retirement, fallback collapse, duplicate-owner cleanup, and deletion safety.

When to Use

Use when any of these are true:

  • old logic, duplicate owners, or stale fallbacks should be retired
  • a candidate fix is "delete old path" vs "add another fallback"
  • internal keyword / phrase / trigger logic is being replaced by structured logic
  • a new canonical owner exists and the old owner may still carry real behavior
  • a cleanup, migration, or deprecation task touches schema, persistence, source-of-truth, or external compatibility boundaries
  • the task risks confusing code retirement with live data deletion

Do not use for:

  • pure additive feature work with no retirement decision
  • tiny wording edits
  • simple status or read-only Q&A
  • normal bug fixes that do not involve owner collapse, fallback cleanup, or deletion choice

Auto-Compose Boundary

This skill should be composed by other owners. It should not become a new global hot-path entry.

Prefer composition from:

  • brainstorming for approach selection involving retirement or persistence risk
  • writing-plans for plans that delete old paths or touch schema / migration / persistence
  • systematic-debugging when the tempting fix is fallback growth or delete-vs-retain
  • verification-before-completion for cleanup / retirement / compatibility / migration closeout

Load automatically when the task touches owner collapse, fallback removal, or schema/persistence/source-of-truth boundaries. Automatic loading identifies and advises only; destructive execution still requires explicit scoped user confirmation.

Core Principle

Default to reducing internal entropy, not preserving internal history.

Retirement is responsibility-scoped before it is carrier-scoped. Name the obsolete or duplicated authority first. If the same carrier has a separately evidenced legitimate role, remove the invalid responsibility and keep only that role-scoped capability; this is not a compatibility exception. Apply delete-first to the carrier once no legitimate responsibility remains. Unknown consumers alone still do not justify retaining an internal carrier.

Use this rule:

  • internal code retirement -> delete-first
  • external compatibility boundary -> compat-exception with active dependency evidence; confirmation-first when distribution is proven but consumers cannot be observed
  • persistent-state or irreversible source-of-truth object -> confirmation-first

Unknown alone neither proves an external dependency nor blocks internal delete-first. Once distribution is proven, unobservable consumers also do not prove deletion safe: inspect read-only and require scoped post-disclosure confirmation before editing.

Mentioning, loading, or discussing destructive-action rules never authorizes destructive execution. Without explicit scoped user confirmation:

  • no irreversible deletion is executed
  • no destructive tool call is made
  • no runnable destructive command is emitted as the next action
  • no broad assent is reinterpreted as deletion approval

Deletion Classes

Classify the deletion target first:

  • code-retirement

    • source code
    • internal triggers
    • duplicate owners
    • stale fallback branches
    • compat-only carriers
    • dead tests/config tied to removed internal behavior
  • contract-carrying code

    • schema definition files
    • migration files
    • public API contract code
    • host install/discovery code
    • persistence read/write logic
  • live-state mutation surface

    • code or commands that would mutate live databases, object stores, queues, or other persistent state
  • derived-state

    • rebuildable caches
    • generated indexes
    • temporary exports
    • recomputable artifacts
  • persistent-state

    • live database tables / columns / rows
    • source-of-truth object storage files
    • user records
    • permission / identity / membership records
    • audit / billing / irreversible business records
    • non-rebuildable queue or event contents

Default Path By Class

  • code-retirement -> delete-first
  • contract-carrying code -> classify by the Core Principle; internal-only retirement uses delete-first with high-risk verification
  • live-state mutation surface -> inspect and classify; destructive execution still requires confirmation when it reaches persistent-state
  • derived-state -> verify rebuildability first, then decide
  • persistent-state -> confirmation-first

Hard Stops

If the target is persistent-state or another irreversible source-of-truth object:

  • do not execute deletion automatically
  • do not emit a runnable destructive command as the next action
  • do not call a destructive tool
  • do not interpret generic agreement as confirmation
  • ask for explicit scoped user confirmation
  • request backup / rollback / migration note when relevant

Examples that require confirmation:

  • DROP TABLE
  • DROP COLUMN
  • TRUNCATE
  • bulk delete of real business data
  • deleting source-of-truth uploaded files
  • deleting permission, identity, audit, billing, or membership records
  • purging non-rebuildable queues or event streams

Data Destruction Guard

When confirmation-first protects persistent-state or an irreversible source-of-truth object, stop normal retirement flow and emit:

text
Data Destruction Guard:
- Target Class:
- Exact Target(s):
- Environment:
- Why Irreversible:
- Backup / Rollback Note:
- Allowed Read-Only Next Steps:
- Blocked Destructive Steps:
- Confirmation Required: yes
- Status: awaiting scoped confirmation

Only explicit scoped confirmation can continue. Broad assent such as "OK", "continue", or "sounds good" is insufficient. If scope changes at all, previous confirmation is invalid and fresh confirmation is required.

Anti-Entropy Declaration

Before deletion, state:

text
Anti-Entropy Declaration:
- Deletion Class:
- Old Path/Object:
- Invalid Responsibility / Authority:
- Legitimate Capability Remaining on Carrier:
- New Canonical Owner:
- Expected Preserved Behavior:
- Expected Retired Behavior:
- External Boundary Touched: no | yes
- Source-of-Truth Data Risk: none | possible | confirmed
- User Confirmation Required: no | yes

If User Confirmation Required: yes, stop normal delete-first flow. Persistent-state or irreversible targets enter Data Destruction Guard; external-unknown code stays in the Retirement Decision hold below.

Retirement Decision

Choose one path only:

text
Retirement Decision:
- Path: delete-first | compat-exception | confirmation-first
- Why:
- Non-edits:

Rules:

  • choose delete-first for internal retirement unless a stronger boundary blocks it
  • choose compat-exception only when external dependency is proven
  • choose confirmation-first for irreversible targets or proven distribution whose consumers cannot be observed

If Path = confirmation-first, no destructive execution may happen until scoped confirmation is received. For external-unknown code, earlier generic deletion instructions do not count; disclose the risk first.

Verification Plan

Do not verify only by "tests are green". Verify that the old logic actually died and the new owner actually carries the behavior.

text
Verification Plan:
- Main-path check:
- Lingering-reference check:
- Negative check:
- Boundary check:

Meaning:

  • Main-path check: new canonical owner still satisfies intended behavior
  • Lingering-reference check: the retired responsibility is no longer active; when its carrier was deleted, the old path is no longer referenced on the main path
  • Negative check: retired trigger/path really stopped working
  • Boundary check: host/API/schema/persistence boundary was not accidentally broken

Gap Taxonomy

If a gap appears after deletion, classify it before repairing:

  • expected-retirement
  • missing-owner-logic
  • stale-internal-consumer
  • baseline-gap
  • external-compat
  • persistent-state-risk

persistent-state-risk is a stop condition, not a normal repair branch.

Gap Closure

Repair order:

  • expected-retirement
    • update tests, docs, or caller expectations
  • missing-owner-logic
    • fix the new canonical owner
  • stale-internal-consumer
    • migrate the internal consumer
  • baseline-gap
    • correct requirement / spec / baseline first
  • external-compat
    • allow compat only if active external dependency evidence exists
  • persistent-state-risk
    • stop and ask for user confirmation

Use this contract:

text
Gap Closure:
- Gap Found:
- Gap Type:
- Repair Action:
- Reintroduced Compat: no | yes
- If yes, External Dependency Evidence:
- Retirement Trigger:

If Gap Type = persistent-state-risk, stop and return to the confirmation gate. Do not improvise destructive repair.

Compat Exception Gate

Retention is allowed only if all are true:

  • an external boundary is touched
  • current active dependency evidence exists
  • deletion would break a published or documented contract
  • the current slice cannot complete owner repair or consumer migration
  • an observation metric exists
  • a retirement trigger exists

Without these, do not retain compat.

Completion Semantics

Completion claims must reflect the real outcome:

  • internal retirement with old compat preserved -> bounded mitigation or deferred debt, not clean retirement
  • external compat retained with full evidence -> bounded compatibility exception
  • persistent-state deletion without scoped confirmation -> not complete

Common Mistakes

Do not:

  • treat unknown dependency as proof of dependency
  • treat missing active-dependency evidence as proof that deletion is safe across a proven external boundary
  • keep both owners active "for safety"
  • add a fallback before checking whether the gap belongs in the new owner
  • confuse migration-file deletion with live database deletion
  • treat source-of-truth data cleanup as ordinary code retirement
  • call a task "cleaned up" when old logic still carries main-path behavior
  • delete a carrier merely because one authority on it was invalid when a separately evidenced legitimate role remains
  • treat a warning or guard card as destructive authorization

Minimal Reporting Shape

This shape is the anti-entropy workflow's decision surface, not a separate final completion report. When anti-entropy materially shapes a completed task, its preserved/retired behavior, deletion class, retained boundary, verification plan, and residual risk should flow into verification-before-completion's unified Aegis impact/safety receipt.

text
Aegis Visibility:
Anti-Entropy Declaration:
Retirement Decision:
Verification Plan:
Gap Closure:

Use the compact shape by default. Expand only when task risk requires it.

Frequently asked questions

What does the Anti Entropy Governance AI skill do?

Use when touching retiring old logic, collapsing duplicate owners, removing fallbacks, or schema/persistence/source-of-truth boundaries; identify opportunities automatically; destructive execution requires explicit confirmation.

Why use Anti Entropy Governance on TypingMind?

Because you install it once and use it with any model. Anti Entropy 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 Anti Entropy Governance in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/GanyuanRan/Aegis/tree/main/skills/anti-entropy-governance. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Anti Entropy 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 Anti Entropy Governance?

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

Is the Anti Entropy Governance AI skill free?

Yes. It is published on GitHub by GanyuanRan 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 👇