reclaim-code-entropy README

The project's README from github.com/Yevanchen/reclaim-code-entropy. As one markdown file: README.md.

Reclaim Code Entropy

An evidence-first Agent Skill for safely simplifying any codebase.

English | 简体中文

The Problem

Codebases accumulate more than dead symbols. They accumulate duplicate truths, abandoned extension points, compatibility paths with no remaining consumer, lifecycle flags that describe the same transition, and wrappers that only move complexity around.

Static analysis can produce candidates. It cannot prove that a string-dispatched route, public export, migration, persisted format, plugin entrypoint, or asynchronous cleanup path is safe to remove.

The Solution

reclaim-code-entropy makes simplification evidence-driven:

Stage Question
Establish the contract What is public, persisted, generated, dynamic, or compatibility-sensitive?
Survey entropy Where are the extra representations, states, APIs, layers, and policies?
Prove the cut Who consumes it, why was it added, and what capability would disappear?
Simplify one boundary Can the obsolete contract be removed end to end without replacement glue?
Verify behavior What is the smallest check that would fail if the deletion were wrong?

The skill prefers a few proved cuts over a long speculative cleanup list. Finding nothing safe to remove is a valid result.

What It Finds

Modes

Audit mode ranks candidates by confidence, risk, tradeoff, and estimated net reduction. It does not edit the repository.

Apply mode implements the safest proved cut, preserves observable behavior, and runs proportional verification.

Install

Ask Codex:

Install the reclaim-code-entropy skill from https://github.com/Yevanchen/reclaim-code-entropy/tree/main/skills/reclaim-code-entropy

Start a new Codex task after installation.

Option B: Manual install

git clone https://github.com/Yevanchen/reclaim-code-entropy.git
mkdir -p ~/.codex/skills
cp -R reclaim-code-entropy/skills/reclaim-code-entropy ~/.codex/skills/

Use

Audit a repository without changing it:

Use $reclaim-code-entropy to audit this repository and rank the safest simplification candidates.

Apply the strongest safe cut:

Use $reclaim-code-entropy to simplify this repository. Preserve public and persisted behavior, implement one high-confidence cut, and verify it.

Investigate a specific area:

Use $reclaim-code-entropy to check whether these lifecycle flags represent distinct states or duplicated ownership.

Key Insight

Deletion volume is not the goal. The goal is reducing the number of facts, contracts, states, and concepts the team must keep coherent.

A large deletion can be wrong. A small deletion can remove an entire maintenance obligation. The decisive evidence is the consumer graph, ownership model, history, compatibility surface, and verification boundary.

How to Know It Is Working

A useful result is reviewable, reduces concepts without hiding compatibility risk, and may still conclude that no safe cut exists.

Safety Boundaries

The skill does not simplify away authorization, trust-boundary validation, accessibility basics, data-loss prevention, durable-data compatibility, or cleanup required for resource quiescence.

It is not a performance audit unless simplification is the stated goal.

Inspiration

The initial idea came from studying DeepSeek Harness and its emphasis on simplification during agent-driven development. This project generalizes that lesson for repositories in any language or stack. It is independent and not affiliated with DeepSeek.

License

MIT

reclaim-code-entropy (Yevanchen/reclaim-code-entropy)

Searching Database…

这是什么?这是一个 Agent Skill,指导 AI 编程智能体安全地简化代码库:通过找出死代码、重复逻辑和不必要的抽象,用证据而不是猜测来支撑每次删减。
这是需要我自己运行的静态分析器,还是供 AI 智能体使用的东西?它不是你直接运行的独立分析器,而是一份供 AI 编程智能体(如 Codex)遵循的技能定义。由智能体来执行调查,在删除任何东西之前先证明每一处删减是安全的。
这个技能怎么安装?推荐的做法是让 Codex 通过 Codex 技能安装器安装它,然后再开启一个新的 Codex 任务;README 中还介绍了一种手动安装方式。
使用它需要特定的编程智能体吗?安装流程围绕 Codex 构建(你让 Codex 安装技能并用它运行任务),因为它被打包为与 Codex 兼容的 Agent Skill。
它总能找到可以删除的东西吗?不——该技能明确把“找不到可安全删除的内容”视为有效结果;审计(Audit)模式只对候选对象排序,不会改动仓库;应用(Apply)模式每次运行只实施经验证的最安全的那一处删减。
审计(Audit)模式和应用(Apply)模式有什么区别?审计(Audit)模式按置信度、风险、权衡和净代码削减量对删除候选排序,不做任何改动。应用(Apply)模式只实施经验证的最安全的一处删减,保持可观察行为不变,并运行相应比例的验证。
它会寻找哪些类型的问题?它的目标是诸如未被使用的 API 和导出、重复的状态表示、投机性的抽象、只做转发的包装器、重复的生命周期/清理逻辑,以及重复造轮子(平台已有对应功能)的手写代码。
出于安全考虑它不会碰什么?它避免把授权、信任边界校验、无障碍基础功能、数据丢失防护、持久化数据兼容性,以及资源静默所需的清理逻辑简化掉。
为什么要做这个项目?想法从何而来?作者在研究 DeepSeek Harness 及其在智能体驱动开发中对简化的重视时获得启发,随后把这一想法泛化为一个可用于任何语言、任何代码库的技能。
Creator
Yevanchen
Size
<0.1 MB
Stars
205
Updated
CommitAug 21
Age
2mo
Commits · 90 Days