skills/coding-principles/SKILL.md
Software design principles and opinionated stances on clean code. Reference skill — index is always loaded, detail files read on demand. Use when reviewing code, refactoring, or making architecture decisions.
npx skillsauth add RonanCodes/ronan-skills coding-principlesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Quick reference index. Each section links to a detail file with examples — read those when a specific principle is relevant.
| Principle | Stance | |-----------|--------| | KISS | The simplest solution that works wins. "Clever" = hard to maintain. | | YAGNI | Don't build for hypothetical futures. Predicted requirements are usually wrong. | | No premature optimization | Make it work, make it right, make it fast — in that order. Profile before optimizing. |
See: principles/simplicity.md
| Principle | Stance | |-----------|--------| | Rule of Three | Don't abstract until you've seen the pattern 3 times. Two is coincidence. | | DRY | About knowledge, not code. Two identical functions can represent different knowledge — that's OK. | | Single Source of Truth | One authoritative place for each piece of data. Derive, don't duplicate. |
See: principles/abstraction.md
| Principle | One-liner | |-----------|-----------| | Single Responsibility | One reason to change | | Open/Closed | Extend by adding code, not modifying existing code | | Liskov Substitution | Subtypes must be drop-in replacements for base types | | Interface Segregation | Many specific interfaces > one fat interface | | Dependency Inversion | Depend on abstractions, not concretions |
See: principles/solid.md
| Principle | Stance |
|-----------|--------|
| Separation of Concerns | UI, business logic, and data access are separate. Always. |
| Law of Demeter | a.getB().getC().doThing() is a red flag. Only talk to immediate friends. |
| Least Privilege | Functions receive only the data they need. Private by default. |
| Deep Modules | Small interface, large behaviour behind it (Ousterhout). Especially important when delegating implementation to agents: a deep module lets a human review the interface contract and delegate the inside. Background: llm-wiki-ai-research:deep-modules-for-ai. |
| Push reviewer, pull implementer | In multi-agent setups, push coding standards into the reviewer agent's prompt; let the implementer pull standards on demand. Background: llm-wiki-ai-research:push-vs-pull-coding-standards. |
See: principles/boundaries.md
| Principle | Stance | |-----------|--------| | Tracer Bullets | Build a thin end-to-end slice first. Validate architecture before building features. | | Don't Outrun Your Headlights | Small steps with feedback. Feedback rate is your speed limit. | | Fail Fast | Surface errors immediately. Don't hide them, don't continue in a broken state. |
See: principles/pragmatic.md
| Principle | Stance | |-----------|--------| | Boy Scout Rule | Leave code better than you found it. Small improvements, not rewrites. | | Least Surprise | If a function name says "get", it shouldn't modify state. No hidden side effects. | | Composition over Inheritance | Prefer combining objects over class hierarchies. Inheritance is rarely the right call. |
See: principles/craftsmanship.md
| Context | TDD? | Notes | |---------|------|-------| | Backend | Mandatory | Write the test first. Business logic bugs are expensive. | | Frontend | Optional | When it adds value — complex logic, utils, critical paths. |
Backend TDD workflow: failing test → minimum code to pass → refactor → repeat.
testing
--- name: linear-pipeline description: The Fable orchestrator for a single dispatched Linear ticket. Holds almost no context itself; it receives `--issue <ID> --detached`, decides the stage sequence, and fans out a sub-agent per stage, passing forward only each stage's artifact (never re-derived, never inlined into its own context). Step zero, before any planning or stage routing, is a boundary triage against `canon/security-boundary.md` (#199): a match tags Ronan Connolly and stops the run, no
development
--- name: in-your-face description: Capture a chat-only answer into a durable artifact (markdown + HTML, PDF when cheap) and launch it automatically so the user cannot miss it. Use when user says "in your face", "don't let me lose this", "save that answer", "make that durable", or right after answering a substantive side question (a recipe, comparison, how-to, or generated prompt) that would otherwise die with the context. category: workflow argument-hint: [--no-open] [--vault <short>] [hint of
tools
One-shot headless OpenAI Codex CLI calls for background/admin AI tasks — summaries, classification, extraction, admin glue. The default engine for anything that runs AI constantly in the background (daemon-driven, per-event), because it bills the flat ChatGPT subscription instead of Claude usage or per-token API spend, and it keeps working while Claude is rate-limited. NEVER for coding — coding stays Claude. Use when a skill or daemon needs a cheap always-on AI call, when the user says "use codex", "ask codex", "codex as backup", or when building a background summarizer/classifier into a listener or loop. Reads auth from ~/.codex/auth.json (ChatGPT account, no API key).
research
Turn a warranty rejection, repair quote, or RMA email into a cited decision brief — legal read (NL/EU consumer law), is the part user-serviceable, live part and new-unit prices, repair-vs-DIY-vs-new economics, before-you-send-it checklist, deadlines. Use when the user pastes or screenshots a repair quote, warranty rejection, "not covered" email, onderzoekskosten fee, or asks "should I repair or replace this".