concept evergreen ·
Constraint quality > constraint quantity
Constraint Quality > Constraint Quantity
More constraints isn’t monotonically better. What matters is semantic clarity — constraints that communicate intent, not just enforce correctness. Rust’s borrow checker is overhead without payoff for AI; Ruby/Elixir’s readability is the real force multiplier. The right guardrail beats more guardrails.
Core formulations
- Semantic clarity > formal rigor — Type systems verify mechanical correctness; readable code communicates intent. AI follows intent better than it follows types. (ai-and-software-engineering)
- Implementation as constraint — Existing code patterns are signals AI follows. Beautiful exemplar code is as important as types and tests. Legacy patterns reproduce even in well-typed codebases. (Profile)
- Spec collapse — Sufficiently detailed spec is code. Ruby DSLs (
validates,has_many) collapse the spec/code gap while staying readable. Lean 4 dependent types prove correctness but nobody can audit the type signature. (sufficiently-detailed-spec-is-code, dont-vibe-prove) - Don’t trust output that looks right — Without verification, constraints don’t fire. LLM-as-judge rates a broken test (missing parenthesis) at 0.75. (rails-testing-agent, against-vibes-generative-models)
Diminishing/negative returns
Past a point, every constraint family hits a ceiling:
| Family | Useful range | Past the ceiling |
|---|---|---|
| Types | Catch shape errors, enable refactor | Borrow-checker tax, audience-of-experts |
| Tests | Encode behavior, lock regressions | Comprehension debt — verifies what you considered, misses what you didn’t |
| Linters | Enforce conventions | Bikeshed proliferation, false positives drown signal |
| Specs | Communicate intent | Sufficiently detailed = code; we’re back to start |
Pattern instances
- Ralph Loop guardrails — Failure-driven CLAUDE.md. Best context files contain non-discoverable gotchas, not exhaustive rules. (ralph-loop-agent, claude-md-less-is-more)
- CLAUDE.md as schema — Five to ten lines of curated context beat a bloated rulebook. The schema tells the agent what it can’t easily discover on its own. (agent-memory-is-a-cache)
- Ruby/Elixir for AI-readable code — Reads like English, executes as code, no spec/code gap.
Failure modes
- More-is-better fallacy — Treating constraints as monotonic. Tests, types, linters all have negative-returns regions.
- Audience mismatch — Lean 4 verifies but no human can audit. The constraint exists but nobody can use it.
- Spec drift — Spec and code drift apart unless the spec is the code (DSLs) or the code is auto-generated from spec.
Related
- Concept: codebase-as-memory — same insight on a different axis: memory and constraints both compound on quality, not quantity
- Bet: semantic-clarity-over-formal-rigor — Ruby/Elixir > Rust for AI codebases
- Bet: context-engineering-over-customization — context (constraint quality) beats fine-tuning
- Belief: “Constraint quality > constraint quantity,” “Implementation is a constraint,” “Evidence over vibes” (Profile)
- Principle: “Constraints over volume” (PRINCIPLES)
Open questions
- Is there a metric for “constraint quality”? Or is it inherently judgment-based?
- DSL-as-spec works in Ruby. Does it work for systems languages? Or is the readable-spec idea language-bound?
- How do you remove constraints? Adding is easy; pruning a stale type or test is rarely done.
Recent edits
- vault: update site