AgentSkillsCN

decomplect-py

针对 Python 设计质量的架构代码分析。评估简洁性(Rich Hickey)、函数式核心/命令式外壳(Gary Bernhardt)以及耦合度(Constantine & Yourdon)。适用于 Python 代码的设计评审或架构评估。

SKILL.md
--- frontmatter
name: decomplect-py
description: Architectural code analysis for Python design quality. Evaluates simplicity (Rich Hickey), functional core/imperative shell (Gary Bernhardt), and coupling (Constantine & Yourdon). Use for design review or architectural assessment of Python code.

Decomplect-Py

Architectural analysis for Python design quality.

Usage

code
/decomplect-py                # Run all 3 analyzers in parallel
/decomplect-py --simplicity   # Specific analyzer
/decomplect-py --fcis         # Specific analyzer
/decomplect-py --coupling     # Specific analyzer

Analyzers

AnalyzerQuestion
simplicity-analyzerIs this truly simple or just easy?
fcis-analyzerIs pure logic separated from I/O?
coupling-analyzerAre modules well-separated?

What It Checks

PillarFocus
SimplicityValues over state, decomplected concerns
FCISFunctional core (pure), imperative shell (I/O)
CouplingHigh cohesion, low coupling

When to Use

  • Reviewing Python system design
  • Before major refactoring
  • Assessing architectural quality
  • Checking if code is "Rich Hickey approved"

Supported Languages

  • Python (.py files only)

Python-Specific Patterns

  • dataclasses(frozen=True) and NamedTuple for immutable values
  • Mutable default argument anti-patterns
  • Django/Flask view architecture
  • Circular import detection
  • Module-level state analysis

Reference Documentation

See Also

  • /decomplect - Analysis for TypeScript/Go/Rust
  • /unslopify - Tactical code cleanup