Engineering Principles
Use these principles to choose the shape of the work. The relevant workflow
still owns its procedure, checks, and completion criteria. Apply them within
the user's scope, product requirements, and execution permissions.
Read only the principles that match the decision before acting. Each link opens
one principle; a named request selects that principle directly.
Data, types, interfaces, or product tradeoffs
- Foundational Thinking: when choosing data structures, access patterns, invariants, or state ownership before writing logic.
- Redesign From First Principles: when a new requirement calls an existing design into question.
- Model the Domain: when lifecycle transitions, interacting flags, async completion, or repeated domain rules make behavior hard to reason about.
- Boundary Discipline: when parsing external input, enforcing trust boundaries, or introducing framework adapters.
- Type System Discipline: when designing types, signatures, or schemas that should rule out invalid operations.
- Experience First: when product, interface, or feature-scope tradeoffs compete with implementation convenience.
Refactoring or code that is hard to follow
- Laziness Protocol: when refactoring or considering another abstraction, dependency, or layer.
- Subtract Before You Add: when sequencing an addition, refactor, or rewrite around existing dead or redundant structure.
- Minimize Reader Load: when layers, hidden state, or pass-through wrappers make code hard to follow.
Retries, concurrent writers, or caller migration
- Outcome-Oriented Execution: when planning a rewrite or migration with explicit development and delivery boundaries.
- Make Operations Idempotent: when commands, lifecycle steps, or processing loops can repeat, crash, or restart.
- Migrate Callers Then Delete Legacy APIs: when introducing a replacement internal interface while callers still use the old route.
- Separate Before Serializing Shared State: when concurrent actors might write the same file, key, object, or shared state.
Failed fixes, competing designs, tests, or measured claims
- Attack the Premise: when successive fixes share an assumption and keep failing the same check.
- Exhaust the Design Space: when a novel interaction or unresolved architecture tradeoff needs a concrete comparison.
- Prove It Works: when deciding whether an artifact or consumer workflow satisfies the requested outcome.
- Fix Root Causes: when diagnosing a defect or repairing a symptom that may affect sibling callers.
- Test Behavior, Not Implementation: when choosing assertions, expected results, or mocks that must detect broken behavior.
- Explain the Number: before trusting, reporting, or acting on a performance measurement or evaluation result.
Sweeps, delegation, long tasks, or repeated instructions
- Build the Lever: when substantial or repeated work could benefit from a rerunnable tool or shared recipe.
- Sequence work into verifiable units: when ordering dependent edits, migration stages, commits, or PR layers into checkable increments.
- Guard the Context Window: when large outputs, repeated reads, or broad investigations crowd out useful context.
- Never Block on the Human: when routine, reversible uncertainty tempts a question that repository evidence or an experiment can settle.
- Encode Lessons in Structure: when repeated instructions or recurring corrections reveal a rule that needs durable enforcement.
For a cross-cutting task, read the applicable principles across groups. Give
delegates the relevant file paths and the decision or proof they own through
Orchestration.
Explain the concrete choice and its evidence when it matters to the result.
Keep proposed checks distinct from checks run. A principle name or a completed
checklist does not establish that the behavior works.
1---2name: engineering-principles3description: Guide engineering design and implementation decisions. Use when choosing data models or interfaces, simplifying code, planning migrations, handling retries or shared state, evaluating evidence, or organizing substantial work.4metadata:5 source: https://skillmd.com/skills/sreejithraman/engineering-principles6---78# Engineering Principles910Use these principles to choose the shape of the work. The relevant workflow11still owns its procedure, checks, and completion criteria. Apply them within12the user's scope, product requirements, and execution permissions.1314Read only the principles that match the decision before acting. Each link opens15one principle; a named request selects that principle directly.1617## Data, types, interfaces, or product tradeoffs1819- [Foundational Thinking](references/foundational-thinking.md): when choosing data structures, access patterns, invariants, or state ownership before writing logic.20- [Redesign From First Principles](references/redesign-from-first-principles.md): when a new requirement calls an existing design into question.21- [Model the Domain](references/model-the-domain.md): when lifecycle transitions, interacting flags, async completion, or repeated domain rules make behavior hard to reason about.22- [Boundary Discipline](references/boundary-discipline.md): when parsing external input, enforcing trust boundaries, or introducing framework adapters.23- [Type System Discipline](references/type-system-discipline.md): when designing types, signatures, or schemas that should rule out invalid operations.24- [Experience First](references/experience-first.md): when product, interface, or feature-scope tradeoffs compete with implementation convenience.2526## Refactoring or code that is hard to follow2728- [Laziness Protocol](references/laziness-protocol.md): when refactoring or considering another abstraction, dependency, or layer.29- [Subtract Before You Add](references/subtract-before-you-add.md): when sequencing an addition, refactor, or rewrite around existing dead or redundant structure.30- [Minimize Reader Load](references/minimize-reader-load.md): when layers, hidden state, or pass-through wrappers make code hard to follow.3132## Retries, concurrent writers, or caller migration3334- [Outcome-Oriented Execution](references/outcome-oriented-execution.md): when planning a rewrite or migration with explicit development and delivery boundaries.35- [Make Operations Idempotent](references/make-operations-idempotent.md): when commands, lifecycle steps, or processing loops can repeat, crash, or restart.36- [Migrate Callers Then Delete Legacy APIs](references/migrate-callers-then-delete-legacy-apis.md): when introducing a replacement internal interface while callers still use the old route.37- [Separate Before Serializing Shared State](references/separate-before-serializing-shared-state.md): when concurrent actors might write the same file, key, object, or shared state.3839## Failed fixes, competing designs, tests, or measured claims4041- [Attack the Premise](references/attack-the-premise.md): when successive fixes share an assumption and keep failing the same check.42- [Exhaust the Design Space](references/exhaust-the-design-space.md): when a novel interaction or unresolved architecture tradeoff needs a concrete comparison.43- [Prove It Works](references/prove-it-works.md): when deciding whether an artifact or consumer workflow satisfies the requested outcome.44- [Fix Root Causes](references/fix-root-causes.md): when diagnosing a defect or repairing a symptom that may affect sibling callers.45- [Test Behavior, Not Implementation](references/test-behavior-not-implementation.md): when choosing assertions, expected results, or mocks that must detect broken behavior.46- [Explain the Number](references/explain-the-number.md): before trusting, reporting, or acting on a performance measurement or evaluation result.4748## Sweeps, delegation, long tasks, or repeated instructions4950- [Build the Lever](references/build-the-lever.md): when substantial or repeated work could benefit from a rerunnable tool or shared recipe.51- [Sequence work into verifiable units](references/sequence-work-into-verifiable-units.md): when ordering dependent edits, migration stages, commits, or PR layers into checkable increments.52- [Guard the Context Window](references/guard-the-context-window.md): when large outputs, repeated reads, or broad investigations crowd out useful context.53- [Never Block on the Human](references/never-block-on-the-human.md): when routine, reversible uncertainty tempts a question that repository evidence or an experiment can settle.54- [Encode Lessons in Structure](references/encode-lessons-in-structure.md): when repeated instructions or recurring corrections reveal a rule that needs durable enforcement.5556For a cross-cutting task, read the applicable principles across groups. Give57delegates the relevant file paths and the decision or proof they own through58[Orchestration](../orchestration/SKILL.md).5960Explain the concrete choice and its evidence when it matters to the result.61Keep proposed checks distinct from checks run. A principle name or a completed62checklist does not establish that the behavior works.