Pdd Entropy Reduction logo

Pdd Entropy Reduction

Community
wonderslife
pdd-entropy-reduction

PDD Entropy Reduction Agent, continuously monitors and repays technical debt to prevent system decay. Automatically triggered when users need code cleanup, documentation updates, technical debt management, architecture alignment, entropy reduction, or garbage collection. Core Objective: Combat system "entropy increase" and "decay" by periodically running agents to discover documentation inconsistencies or architecture constraint violations. Trigger Scenarios: - User requests "entropy reduction", "clean up technical debt", "code cleanup", "garbage collection" - User requests checking documentation and code consistency - User requests architecture constraint checking - User requests technical debt audit - Scheduled trigger (recommended weekly) - Automatic trigger after code commit (optional) - Automatic trigger after PR merge (optional) 支持中文触发:熵减、清理技术债务、代码清理、文档更新、技术债务管理、架构对齐、垃圾回收、PDD熵减。

Overview

Publisherwonderslife
Repositorypdd-skills
Skill namepdd-entropy-reduction
Stars
41
Forks
11
Bundled files
3
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.

  • 3 bundled files

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

  • Open source

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

Installation

Install the Pdd Entropy Reduction 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/wonderslife/pdd-skills/tree/main/pdd-entropy-reduction
  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/wonderslife/pdd-skills.git /tmp/pdd-skills
mkdir -p .claude/skills
cp -r /tmp/pdd-skills/pdd-entropy-reduction .claude/skills/pdd-entropy-reduction
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pdd Entropy Reduction 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 Pdd Entropy Reduction 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 Pdd Entropy Reduction 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.

PDD Entropy Reduction Agent

Core Philosophy

"Technical debt is like a high-interest loan: it's better to continuously repay the debt in small amounts than to let it accumulate and then painfully resolve it all at once." —— OpenAI Harness Engineering

In the PDD (PRD-Driven Development) methodology, the core objective of the entropy reduction mechanism is to combat system "entropy increase" and "decay" by periodically running agents to discover documentation inconsistencies or architecture constraint violations.

Natural Trend of Entropy Increase

Entropy Increase (Natural Trend):
- Code decay: Duplicate code, overly long functions, inconsistent naming
- Documentation obsolescence: Code and documentation out of sync, outdated comments
- Technical debt accumulation: Unhandled TODOs, unoptimized temporary solutions
- Architecture drift: Violating dependency directions, blurred boundaries
- Test deficiency: Decreasing coverage, outdated tests

Entropy Reduction (Requires Energy Input):
- Refactoring: Eliminate duplication, simplify complexity
- Documentation updates: Synchronize documentation with code
- Technical debt repayment: Handle TODOs, optimize temporary solutions
- Architecture alignment: Fix violations, strengthen boundaries
- Test supplementation: Increase coverage, update tests

Four Professional Sub-Skills

The entropy reduction agent coordinates four professional sub-skills to form a complete entropy reduction closed loop:

┌─────────────────────────────────────────────────────────────┐
│                  pdd-entropy-reduction                       │
│                      (Main Coordinator)                      │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐│
│  │ pdd-doc-    │  │ expert-arch │  │ expert-     │  │ expert-auto ││
│  │ gardener    │  │ -enforcer   │  │ entropy-    │  │ -refactor   ││
│  │             │  │             │  │ auditor     │  │             ││
│  │ Document    │  │ Architecture│  │ Entropy     │  │ Auto        ││
│  │ Gardener    │  │ Enforcer    │  │ Auditor     │  │ Refactor    ││
│  └─────────────┘  └─────────────┘  └─────────────┘  └─────────────┘│
│                                                             │
└─────────────────────────────────────────────────────────────┘

1. pdd-doc-gardener (Document Gardener)

Responsibility: Periodically scans the docs/ directory in the code repository to identify outdated or deprecated documentation that no longer reflects actual code behavior.

Detection Items:

  • Code and documentation inconsistency
  • Outdated comments (TODOs existing for more than N days)
  • Code referenced in documentation has been deleted
  • API documentation doesn't match implementation

Action: When documentation is found to be out of sync with implementation, automatically initiate a Pull Request for fixes.

2. expert-arch-enforcer (Architecture Constraint Enforcer)

Responsibility: Monitors whether code violates preset invariants and architecture boundaries.

Detection Items:

  • Module dependency direction violations (e.g., Types → Config → Repo → Service → Runtime → UI)
  • Missing boundary data validation
  • File size exceeding limits
  • Naming convention violations

Tool Integration: Utilizes custom Linters or structural tests (like ArchUnit), running periodically in the background to scan for deviations.

3. expert-entropy-auditor (Entropy Increase Auditor)

Responsibility: Discovers gaps between "design intent" and "code implementation".

Detection Items:

  • PRD and code implementation inconsistency
  • Spec documentation and code inconsistency
  • Duplicate code (AI residue)
  • Guessed data structures
  • Scattered utility tools

Function: Like a garbage collector, identifies "AI residue" scattered in the codebase and recommends consolidating them into shared utility packages.

4. expert-auto-refactor (Automated Refactoring)

Responsibility: Transforms collected quality improvement tasks into concrete code operations.

Strategy: Periodically initiates targeted refactoring PRs using a "small loan repayment" approach to prevent technical debt accumulation.

Refactoring Types:

  • Extract common methods
  • Eliminate duplicate code
  • Simplify complex logic
  • Optimize naming

Workflow

Entropy Reduction Execution Process

┌─────────────┐     ┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Trigger   │ ──→ │   Scan      │ ──→ │   Analyze   │ ──→ │   Execute   │
│             │     │             │     │             │     │             │
│ • Manual    │     │ • Doc scan  │     │ • Entropy   │     │ • Auto fix  │
│ • Scheduled │     │ • Code scan │     │   score     │     │ • Create PR │
│ • Event     │     │ • Arch scan │     │ • Classify  │     │ • Update    │
│             │     │             │     │ • Prioritize│     │   docs      │
└─────────────┘     └─────────────┘     └─────────────┘     └─────────────┘

Entropy Score System

Entropy score range: 0-100 (100 = most orderly)

Score RangeStatusRecommended Action
90-100ExcellentMaintain current state
70-89GoodSmall improvements
50-69FairPlanned cleanup
30-49WarningPriority handling
0-29CriticalEmergency refactoring

Execution Guide

Step 1: Entropy Detection

Based on user request or trigger condition, select appropriate detection scope:

  1. Full Detection: Scan all entropy increase points
  2. Documentation Detection: Only scan documentation-related issues
  3. Architecture Detection: Only scan architecture constraint violations
  4. Code Detection: Only scan code quality issues

Step 2: Generate Entropy Report

Use references/entropy-report-template.md to generate entropy report, including:

  • Entropy score
  • Issue list (sorted by priority)
  • Fix recommendations
  • Estimated workload

Step 3: Entropy Reduction Execution

Select execution strategy based on issue type:

Issue TypeExecution MethodManual Confirmation
Simple fixes (naming, formatting)Auto fix and commitNo
Medium fixes (documentation updates)Create PRYes
Complex fixes (refactoring)Create Issue + PRYes

Integration with PDD Framework

PDD Forward Process                      PDD Entropy Reduction Process
    │                                     │
    ▼                                     ▼
┌─────────────┐                    ┌─────────────┐
│ PRD Document │                    │ Entropy     │
├─────────────┤                    │ Detection   │
│ Feature     │                    ├─────────────┤
│ Extraction  │                    │ Entropy     │
├─────────────┤                    │ Report      │
│ Spec Design │                    ├─────────────┤
├─────────────┤                    │ Entropy     │
│ Code        │  ←───────────────  │ Reduction   │
│ Implementation│                   │ Execution   │
├─────────────┤                    ├─────────────┤
│ Acceptance  │                    │ Auto Fix    │
│ Testing     │                    ├─────────────┤
└─────────────┘                    │ PR Creation │
                                   └─────────────┘

Golden Principles

Based on Harness Engineering best practices, define the following golden principles:

  1. Use Shared Toolkits, Avoid Handwritten Helper Functions

    • Centralize invariant management
    • Reduce duplicate code
  2. Validate Boundary Data, Don't Guess Data Structures

    • All API entry points must have Schema validation
    • Don't rely on implicit type inference
  3. Keep Code Concise, Prioritize Readability

    • Single file no more than 300 lines
    • Single function no more than 50 lines
  4. Documentation as Code, Keep Synchronized

    • Code changes must synchronize documentation
    • Outdated documentation is considered technical debt
  5. Small Loan Repayment, Continuous Improvement

    • Every commit is an improvement opportunity
    • Don't let technical debt accumulate

Configuration File

Entropy reduction behavior can be configured via entropy-config.yaml:

yaml
# entropy-config.yaml
entropy_reduction:
  # Trigger configuration
  triggers:
    schedule: "0 2 * * *"  # Daily at 2 AM
    on_commit: false       # Trigger on commit
    on_pr_merge: true      # Trigger on PR merge
  
  # Detection configuration
  detection:
    docs:
      enabled: true
      paths: ["docs/", "*.md"]
      max_age_days: 30     # Maximum documentation age in days
    architecture:
      enabled: true
      layers: ["types", "config", "repo", "service", "runtime", "ui"]
    code:
      enabled: true
      max_file_lines: 300
      max_function_lines: 50
    tests:
      enabled: true
      min_coverage: 80
  
  # Execution configuration
  execution:
    auto_fix: true         # Auto fix simple issues
    create_pr: true        # Create PR
    max_pr_per_run: 5      # Maximum PRs per run
  
  # Scoring configuration
  scoring:
    weights:
      docs: 0.25
      architecture: 0.25
      code: 0.25
      tests: 0.25

Output Format

Entropy Report Format

After each entropy reduction execution, generate an entropy report saved to the docs/entropy-reports/ directory:

markdown
# Entropy Reduction Report - YYYY-MM-DD

## Entropy Score: XX/100

## Issue List

### Critical (Must Fix)
- [ ] Issue description

### Warning (Recommended Fix)
- [ ] Issue description

### Info (Optional Fix)
- [ ] Issue description

## Fix Recommendations

### Critical Fixes
1. Fix recommendation details

## Execution Results
- Auto fixed: X items
- Created PR: X items
- Skipped: X items

Usage Examples

Example 1: Full Entropy Reduction

User: Execute full entropy reduction

AI:
1. Trigger all detectors
2. Generate entropy report
3. Execute fixes by priority
4. Report results

Example 2: Documentation Entropy Reduction

User: Check documentation consistency

AI:
1. Trigger pdd-doc-gardener
2. Scan docs/ directory
3. Compare code with documentation
4. Generate fix PR

Example 3: Architecture Entropy Reduction

User: Check architecture constraints

AI:
1. Trigger expert-arch-enforcer
2. Run custom Linter
3. Detect dependency violations
4. Generate fix recommendations

References

Bundled files

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

Frequently asked questions

What does the Pdd Entropy Reduction AI skill do?

PDD Entropy Reduction Agent, continuously monitors and repays technical debt to prevent system decay. Automatically triggered when users need code cleanup, documentation updates, technical debt management, architecture alignment, entropy reduction, or garbage collection. Core Objective: Combat system "entropy increase" and "decay" by periodically running agents to discover documentation inconsistencies or architecture constraint violations. Trigger Scenarios: - User requests "entropy reduction", "clean up technical debt", "code cleanup", "garbage collection" - User requests checking documen...

Why use Pdd Entropy Reduction on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wonderslife/pdd-skills/tree/main/pdd-entropy-reduction. 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 Pdd Entropy Reduction?

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 Pdd Entropy Reduction?

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

Is the Pdd Entropy Reduction AI skill free?

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