code-simplify
Simplify DegenExus code while preserving source-of-truth behavior and test evidence.
SKILL.md.claude/skills/code-simplify/SKILL.md
GitHubCode Simplify Workflow
Canonical /code-simplify workflow. Use this skill instead of keeping simplification prose in .claude/commands/code-simplify.md.
Sources of Truth
- Routing contract:
.claude/rules/synergy-contract.yml - Evidence schema:
.claude/rules/evidence-schema.yml - Review rubric:
.claude/skills/code-reviewer/SKILL.md - FSV doctrine:
.claude/skills/fsv-verify/SKILL.md
Workflow
- Identify the target code and source-of-truth behavior.
- Read callers, tests, edge cases, and relevant invariants before editing.
- Prefer deletion, guard clauses, extracted helpers, descriptive names, and removal of dead code after proof.
- Apply one simplification at a time.
- After each meaningful change, run targeted tests and compare behavior against source-of-truth expectations.
- Run
python -m compileall -q src/for runtime changes. - If behavior changes unexpectedly, revert that simplification and investigate before continuing.
Output
Emit .claude/rules/evidence-schema.yml fields with behavior-preservation proof, source-of-truth comparisons, commands run, edge cases, and memory-update status.