From programming-as-theory-building-skill
Guides code changes by surfacing the program's real-world theory, placement context, and behavioral proof. Slows trivial edits to ensure non-trivial changes fit.
How this skill is triggered — by the user, by Claude, or both
Slash command
/programming-as-theory-building-skill:programming-as-theory-buildingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Operational rules for applying Peter Naur's "Programming as Theory Building" to coding-agent workflows. Use these rules to avoid context-free patches, speculative abstractions, and code that only looks right as text.
Operational rules for applying Peter Naur's "Programming as Theory Building" to coding-agent workflows. Use these rules to avoid context-free patches, speculative abstractions, and code that only looks right as text.
Tradeoff: This skill slows down trivial edits. For non-trivial code, pay the small upfront cost so the change fits the program.
Programming is not text production. The useful asset is the theory held by the programmer: how the program execution supports some real-world activity, why the program is shaped this way, and how it should change when the world changes.
Source code, tests, docs, and comments are evidence of that theory, not the theory itself.
Answer these briefly before a non-trivial edit:
If you cannot answer the first three, inspect more before patching.
Naur's key modification question is not "where can I add this?" but "what existing world-facing capability is this most like?"
Future flexibility is not free. Every option, config knob, adapter, interface, or abstraction must be designed, implemented, tested, and explained.
If verification contradicts the theory, rebuild the theory before adding another patch.
Treat a program as "alive" when its theory can still be recovered and extended. Treat it as high-risk or "dead" when only text remains.
Stop and gather more context if:
If the existing text is too far from any recoverable theory, say so. A rewrite may be cheaper than reviving dead code, but only after that risk is explicit.
When reviewing code, look for:
For non-trivial work, summarize briefly:
Theory: [world rule -> program location]
Changed: [what changed]
Verified: [checks run]
Risk: [meaningful residual risk, if any]
For review-only work, lead with findings and file references. If there are no findings, say so plainly and note remaining test gaps or residual risk.
npx claudepluginhub anamkwon/programming-as-theory-building-skill --plugin programming-as-theory-building-skillEnforces a disciplined coding workflow: understand first, reuse existing code, fix root causes, and verify before claiming done. Useful for any coding task to reduce slop and wasted round-trips.
Reduces common LLM coding mistakes: think before coding, favor simplicity, make surgical changes, define verifiable success criteria. Use when writing, reviewing, or refactoring code.
Guides Claude Code with six principles from Andrej Karpathy: think before coding, keep it simple, make surgical changes, define success criteria, reproduce bugs before fixing, and surface tradeoffs.