AnamKwon/programming-as-theory-building-skill
29 stars · Last commit 2026-06-11
Claude Code skill that applies Naur's Programming as Theory Building to coding-agent workflows.
README preview
# Programming as Theory Building Skill A Claude Code plugin and reusable coding-agent skill that turns code generation from prompt completion into theory-preserving engineering work. Most coding-agent failures are not syntax failures. They are theory failures: the agent writes code that looks right, but does not understand the invariant the code protects, why the current boundary exists, where the change belongs, or what behavior proves the change is correct. The skill is grounded in Peter Naur's paper "Programming as Theory Building" (1985). Naur's central claim is that the durable asset in programming is not only the program text, but the programmer's theory of how the program maps real-world affairs into behavior. This skill converts that idea into operational checks for coding agents: map the domain rule, explain the current shape, place the change beside the closest existing facility, and verify the behavior that matters. ## The Problem General coding agents often produce plausible files that satisfy the prompt surface while missing the program's governing invariant. For code generation, that shows up as: - new helpers or modules that do not match the existing domain boundary, - tests that prove the happy path but not the business rule, - speculative abstractions added before the current problem needs them, - readable code whose design story is hard to extend safely. `programming-as-theory-building` narrows the agent's behavior around the question Naur's paper makes unavoidable: what theory of the program is being preserved or extended? ## The Solution