{"slug":"anti-entropy-governance","title":"anti-entropy-governance","summary":"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.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-15T18:23:33.314384Z","repo":{"url":"https://github.com/GanyuanRan/Aegis","stars":1439,"forks":81,"license":"MIT","updatedAt":"2026-11-13T06:11:57Z"},"bodyHtml":"<hr>\n<h2>name: anti-entropy-governance\ndescription: \"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.\"</h2>\n<h1>Anti-Entropy</h1>\n<h2>Overview</h2>\n<p>Use this skill when the task is not merely \"change code\" but \"remove old paths\nsafely without growing entropy\".</p>\n<p>This skill chooses between:</p>\n<ul>\n<li><code>delete-first</code> for internal code retirement</li>\n<li><code>compat-exception</code> for proven external dependency boundaries</li>\n<li><code>confirmation-first</code> for irreversible state or an external contract whose\ndistributed consumers cannot be observed</li>\n</ul>\n<p>It does not replace <code>brainstorming</code>, <code>writing-plans</code>,\n<code>systematic-debugging</code>, or <code>verification-before-completion</code>. It is a narrow\ngovernance owner for retirement, fallback collapse, duplicate-owner cleanup,\nand deletion safety.</p>\n<h2>When to Use</h2>\n<p>Use when any of these are true:</p>\n<ul>\n<li>old logic, duplicate owners, or stale fallbacks should be retired</li>\n<li>a candidate fix is \"delete old path\" vs \"add another fallback\"</li>\n<li>internal keyword / phrase / trigger logic is being replaced by structured logic</li>\n<li>a new canonical owner exists and the old owner may still carry real behavior</li>\n<li>a cleanup, migration, or deprecation task touches schema, persistence,\nsource-of-truth, or external compatibility boundaries</li>\n<li>the task risks confusing code retirement with live data deletion</li>\n</ul>\n<p>Do not use for:</p>\n<ul>\n<li>pure additive feature work with no retirement decision</li>\n<li>tiny wording edits</li>\n<li>simple status or read-only Q&amp;A</li>\n<li>normal bug fixes that do not involve owner collapse, fallback cleanup, or\ndeletion choice</li>\n</ul>\n<h2>Auto-Compose Boundary</h2>\n<p>This skill should be composed by other owners. It should not become a new\nglobal hot-path entry.</p>\n<p>Prefer composition from:</p>\n<ul>\n<li><code>brainstorming</code> for approach selection involving retirement or persistence risk</li>\n<li><code>writing-plans</code> for plans that delete old paths or touch schema / migration /\npersistence</li>\n<li><code>systematic-debugging</code> when the tempting fix is fallback growth or\ndelete-vs-retain</li>\n<li><code>verification-before-completion</code> for cleanup / retirement / compatibility /\nmigration closeout</li>\n</ul>\n<p>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.</p>\n<h2>Core Principle</h2>\n<p>Default to reducing internal entropy, not preserving internal history.</p>\n<p>Retirement is responsibility-scoped before it is carrier-scoped. Name the\nobsolete or duplicated authority first. If the same carrier has a separately\nevidenced legitimate role, remove the invalid responsibility and keep only\nthat role-scoped capability; this is not a compatibility exception. Apply\n<code>delete-first</code> to the carrier once no legitimate responsibility remains.\nUnknown consumers alone still do not justify retaining an internal carrier.</p>\n<p>Use this rule:</p>\n<ul>\n<li>internal code retirement -&gt; <code>delete-first</code></li>\n<li>external compatibility boundary -&gt; <code>compat-exception</code> with active dependency\nevidence; <code>confirmation-first</code> when distribution is proven but consumers\ncannot be observed</li>\n<li>persistent-state or irreversible source-of-truth object -&gt;\n<code>confirmation-first</code></li>\n</ul>\n<p>Unknown alone neither proves an external dependency nor blocks internal\n<code>delete-first</code>. Once distribution is proven, unobservable consumers also do not\nprove deletion safe: inspect read-only and require scoped post-disclosure\nconfirmation before editing.</p>\n<p>Mentioning, loading, or discussing destructive-action rules never authorizes\ndestructive execution. Without explicit scoped user confirmation:</p>\n<ul>\n<li>no irreversible deletion is executed</li>\n<li>no destructive tool call is made</li>\n<li>no runnable destructive command is emitted as the next action</li>\n<li>no broad assent is reinterpreted as deletion approval</li>\n</ul>\n<h2>Deletion Classes</h2>\n<p>Classify the deletion target first:</p>\n<ul>\n<li><p><code>code-retirement</code></p>\n<ul>\n<li>source code</li>\n<li>internal triggers</li>\n<li>duplicate owners</li>\n<li>stale fallback branches</li>\n<li>compat-only carriers</li>\n<li>dead tests/config tied to removed internal behavior</li>\n</ul>\n</li>\n<li><p><code>contract-carrying code</code></p>\n<ul>\n<li>schema definition files</li>\n<li>migration files</li>\n<li>public API contract code</li>\n<li>host install/discovery code</li>\n<li>persistence read/write logic</li>\n</ul>\n</li>\n<li><p><code>live-state mutation surface</code></p>\n<ul>\n<li>code or commands that would mutate live databases, object stores, queues,\nor other persistent state</li>\n</ul>\n</li>\n<li><p><code>derived-state</code></p>\n<ul>\n<li>rebuildable caches</li>\n<li>generated indexes</li>\n<li>temporary exports</li>\n<li>recomputable artifacts</li>\n</ul>\n</li>\n<li><p><code>persistent-state</code></p>\n<ul>\n<li>live database tables / columns / rows</li>\n<li>source-of-truth object storage files</li>\n<li>user records</li>\n<li>permission / identity / membership records</li>\n<li>audit / billing / irreversible business records</li>\n<li>non-rebuildable queue or event contents</li>\n</ul>\n</li>\n</ul>\n<h2>Default Path By Class</h2>\n<ul>\n<li><code>code-retirement</code> -&gt; <code>delete-first</code></li>\n<li><code>contract-carrying code</code> -&gt; classify by the Core Principle; internal-only\nretirement uses <code>delete-first</code> with high-risk verification</li>\n<li><code>live-state mutation surface</code> -&gt; inspect and classify; destructive execution\nstill requires confirmation when it reaches persistent-state</li>\n<li><code>derived-state</code> -&gt; verify rebuildability first, then decide</li>\n<li><code>persistent-state</code> -&gt; <code>confirmation-first</code></li>\n</ul>\n<h2>Hard Stops</h2>\n<p>If the target is <code>persistent-state</code> or another irreversible source-of-truth\nobject:</p>\n<ul>\n<li>do not execute deletion automatically</li>\n<li>do not emit a runnable destructive command as the next action</li>\n<li>do not call a destructive tool</li>\n<li>do not interpret generic agreement as confirmation</li>\n<li>ask for explicit scoped user confirmation</li>\n<li>request backup / rollback / migration note when relevant</li>\n</ul>\n<p>Examples that require confirmation:</p>\n<ul>\n<li><code>DROP TABLE</code></li>\n<li><code>DROP COLUMN</code></li>\n<li><code>TRUNCATE</code></li>\n<li>bulk delete of real business data</li>\n<li>deleting source-of-truth uploaded files</li>\n<li>deleting permission, identity, audit, billing, or membership records</li>\n<li>purging non-rebuildable queues or event streams</li>\n</ul>\n<h2>Data Destruction Guard</h2>\n<p>When <code>confirmation-first</code> protects persistent-state or an irreversible\nsource-of-truth object, stop normal retirement flow and emit:</p>\n<pre><code>Data Destruction Guard:\n- Target Class:\n- Exact Target(s):\n- Environment:\n- Why Irreversible:\n- Backup / Rollback Note:\n- Allowed Read-Only Next Steps:\n- Blocked Destructive Steps:\n- Confirmation Required: yes\n- Status: awaiting scoped confirmation\n</code></pre>\n<p>Only explicit scoped confirmation can continue. Broad assent such as \"OK\",\n\"continue\", or \"sounds good\" is insufficient. If scope changes at all, previous\nconfirmation is invalid and fresh confirmation is required.</p>\n<h2>Anti-Entropy Declaration</h2>\n<p>Before deletion, state:</p>\n<pre><code>Anti-Entropy Declaration:\n- Deletion Class:\n- Old Path/Object:\n- Invalid Responsibility / Authority:\n- Legitimate Capability Remaining on Carrier:\n- New Canonical Owner:\n- Expected Preserved Behavior:\n- Expected Retired Behavior:\n- External Boundary Touched: no | yes\n- Source-of-Truth Data Risk: none | possible | confirmed\n- User Confirmation Required: no | yes\n</code></pre>\n<p>If <code>User Confirmation Required: yes</code>, stop normal delete-first flow.\nPersistent-state or irreversible targets enter <code>Data Destruction Guard</code>;\nexternal-unknown code stays in the <code>Retirement Decision</code> hold below.</p>\n<h2>Retirement Decision</h2>\n<p>Choose one path only:</p>\n<pre><code>Retirement Decision:\n- Path: delete-first | compat-exception | confirmation-first\n- Why:\n- Non-edits:\n</code></pre>\n<p>Rules:</p>\n<ul>\n<li>choose <code>delete-first</code> for internal retirement unless a stronger boundary blocks it</li>\n<li>choose <code>compat-exception</code> only when external dependency is proven</li>\n<li>choose <code>confirmation-first</code> for irreversible targets or proven distribution\nwhose consumers cannot be observed</li>\n</ul>\n<p>If <code>Path = confirmation-first</code>, no destructive execution may happen until\nscoped confirmation is received. For external-unknown code, earlier generic\ndeletion instructions do not count; disclose the risk first.</p>\n<h2>Verification Plan</h2>\n<p>Do not verify only by \"tests are green\". Verify that the old logic actually\ndied and the new owner actually carries the behavior.</p>\n<pre><code>Verification Plan:\n- Main-path check:\n- Lingering-reference check:\n- Negative check:\n- Boundary check:\n</code></pre>\n<p>Meaning:</p>\n<ul>\n<li><code>Main-path check</code>: new canonical owner still satisfies intended behavior</li>\n<li><code>Lingering-reference check</code>: the retired responsibility is no longer active;\nwhen its carrier was deleted, the old path is no longer referenced on the\nmain path</li>\n<li><code>Negative check</code>: retired trigger/path really stopped working</li>\n<li><code>Boundary check</code>: host/API/schema/persistence boundary was not accidentally broken</li>\n</ul>\n<h2>Gap Taxonomy</h2>\n<p>If a gap appears after deletion, classify it before repairing:</p>\n<ul>\n<li><code>expected-retirement</code></li>\n<li><code>missing-owner-logic</code></li>\n<li><code>stale-internal-consumer</code></li>\n<li><code>baseline-gap</code></li>\n<li><code>external-compat</code></li>\n<li><code>persistent-state-risk</code></li>\n</ul>\n<p><code>persistent-state-risk</code> is a stop condition, not a normal repair branch.</p>\n<h2>Gap Closure</h2>\n<p>Repair order:</p>\n<ul>\n<li><code>expected-retirement</code>\n<ul>\n<li>update tests, docs, or caller expectations</li>\n</ul>\n</li>\n<li><code>missing-owner-logic</code>\n<ul>\n<li>fix the new canonical owner</li>\n</ul>\n</li>\n<li><code>stale-internal-consumer</code>\n<ul>\n<li>migrate the internal consumer</li>\n</ul>\n</li>\n<li><code>baseline-gap</code>\n<ul>\n<li>correct requirement / spec / baseline first</li>\n</ul>\n</li>\n<li><code>external-compat</code>\n<ul>\n<li>allow compat only if active external dependency evidence exists</li>\n</ul>\n</li>\n<li><code>persistent-state-risk</code>\n<ul>\n<li>stop and ask for user confirmation</li>\n</ul>\n</li>\n</ul>\n<p>Use this contract:</p>\n<pre><code>Gap Closure:\n- Gap Found:\n- Gap Type:\n- Repair Action:\n- Reintroduced Compat: no | yes\n- If yes, External Dependency Evidence:\n- Retirement Trigger:\n</code></pre>\n<p>If <code>Gap Type = persistent-state-risk</code>, stop and return to the confirmation\ngate. Do not improvise destructive repair.</p>\n<h2>Compat Exception Gate</h2>\n<p>Retention is allowed only if all are true:</p>\n<ul>\n<li>an external boundary is touched</li>\n<li>current active dependency evidence exists</li>\n<li>deletion would break a published or documented contract</li>\n<li>the current slice cannot complete owner repair or consumer migration</li>\n<li>an observation metric exists</li>\n<li>a retirement trigger exists</li>\n</ul>\n<p>Without these, do not retain compat.</p>\n<h2>Completion Semantics</h2>\n<p>Completion claims must reflect the real outcome:</p>\n<ul>\n<li>internal retirement with old compat preserved -&gt; <code>bounded mitigation</code> or\n<code>deferred debt</code>, not clean retirement</li>\n<li>external compat retained with full evidence -&gt; <code>bounded compatibility exception</code></li>\n<li>persistent-state deletion without scoped confirmation -&gt; not complete</li>\n</ul>\n<h2>Common Mistakes</h2>\n<p>Do not:</p>\n<ul>\n<li>treat unknown dependency as proof of dependency</li>\n<li>treat missing active-dependency evidence as proof that deletion is safe across\na proven external boundary</li>\n<li>keep both owners active \"for safety\"</li>\n<li>add a fallback before checking whether the gap belongs in the new owner</li>\n<li>confuse migration-file deletion with live database deletion</li>\n<li>treat source-of-truth data cleanup as ordinary code retirement</li>\n<li>call a task \"cleaned up\" when old logic still carries main-path behavior</li>\n<li>delete a carrier merely because one authority on it was invalid when a\nseparately evidenced legitimate role remains</li>\n<li>treat a warning or guard card as destructive authorization</li>\n</ul>\n<h2>Minimal Reporting Shape</h2>\n<p>This shape is the anti-entropy workflow's decision surface, not a separate\nfinal completion report. When anti-entropy materially shapes a completed task,\nits preserved/retired behavior, deletion class, retained boundary, verification\nplan, and residual risk should flow into <code>verification-before-completion</code>'s\nunified Aegis impact/safety receipt.</p>\n<pre><code>Aegis Visibility:\nAnti-Entropy Declaration:\nRetirement Decision:\nVerification Plan:\nGap Closure:\n</code></pre>\n<p>Use the compact shape by default. Expand only when task risk requires it.</p>\n","files":[{"path":"SKILL.md","sizeBytes":12412,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-28T20:56:16.464137Z","sha256":"9E080DDEB5559FE030324C8356E2D5E57A400C9CB5450E41A16816F229C62B4B","sizeBytes":4673},"review":null,"source":{"repositoryUrl":"https://github.com/GanyuanRan/Aegis","path":"skills/anti-entropy-governance","license":"MIT","commit":"9872f111fa637d6cf2c67515fcf911474b6c1f0b","subtreeSha":"4E6190E4F3FA1633BEFA78593DA5FDD655465C4FF2B094EDF1E4172052996637","lastSyncedAt":"2026-11-13T21:44:40.568965Z"},"reviewedAt":"2026-09-28T20:56:26.544368Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/GanyuanRan/Aegis/tree/main/skills/anti-entropy-governance"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install ganyuanran-aegis@llmmart"},{"target":"git","command":"git clone https://github.com/GanyuanRan/Aegis.git"}]}