Anti entropy governance

From hashgraph-online/awesome-codex-plugins · View interactive version

Anti entropy governance is an AI agent skill from the GitHub repository hashgraph-online/awesome-codex-plugins. 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.

How to use this skill

Skill file

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:

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:

source-of-truth, or external compatibility boundaries

Do not use for:

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:

persistence

delete-vs-retain

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:

evidence; confirmation-first when distribution is proven but consumers

cannot be observed

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. Before editing, require user-authored,

scoped authorization that explicitly accepts the concrete external risk.

An informed instruction may already supply it; otherwise disclose the risk

and request scoped confirmation.

Mentioning, loading, or discussing destructive-action rules never authorizes

destructive execution. Without explicit scoped user confirmation:

Deletion Classes

Classify the deletion target first:

or other persistent state

Default Path By Class

retirement uses delete-first with high-risk verification

still requires confirmation when it reaches persistent-state

Hard Stops

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

object:

Examples that require confirmation:

Data Destruction Guard

When confirmation-first protects persistent-state or an irreversible

source-of-truth object, stop normal retirement flow and emit:

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:

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

For external-unknown code, fill User Confirmation Required with yes unless

the user's own instruction already names the concrete external risk, accepts

its possible breakage, and authorizes the exact retirement scope, or the user

later gives scoped confirmation after your disclosure. A generic original

deletion request does not satisfy this slot. Do not infer acceptance from mere

awareness of external use or from your own risk summary.

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:

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

Rules:

whose consumers cannot be observed

If Path = confirmation-first, no destructive execution may happen until

scoped confirmation is established. For external-unknown code, earlier generic

deletion instructions do not count. An informed, scoped user instruction may

establish confirmation before your disclosure; otherwise disclose the risk

and directly ask the user to confirm the exact retirement scope before editing.

Do not only state that confirmation is required or quote the words needed.

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.

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

Meaning:

when its carrier was deleted, the old path is no longer referenced on the

main path

Gap Taxonomy

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

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

Gap Closure

Repair order:

Use this contract:

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:

Without these, do not retain compat.

Completion Semantics

Completion claims must reflect the real outcome:

deferred debt, not clean retirement

Common Mistakes

Do not:

a proven external boundary

separately evidenced legitimate role remains

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.

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

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.