First Principles
When To Use
- Choosing between architectures or designs with multiple valid approaches
- Evaluating trade-offs between competing concerns
- Planning a non-mechanical refactor or a greenfield implementation
- Deep code review that needs hidden assumptions surfaced
Boundaries
- Not for debugging a specific failure — use
diagnose, which owns that loop
- Not for clarifying an ambiguous WHAT — use
brainstorming
- Not for mechanical tasks (rename, format, move) or changes that follow an
established pattern without ambiguity
Self-Check Gate
Before applying full analysis, assess the task:
Full decomposition — apply when:
- Problem is ambiguous or under-specified
- Multiple valid approaches exist with non-obvious trade-offs
- Requirements are unclear or conflicting
- Changes have systemic implications across components
Lightweight analysis — apply when:
- Cause is obvious and fix is isolated
- Single clear approach, no meaningful alternatives
- Change is well-scoped with predictable impact
If lightweight: apply standard execution with basic reasoning transparency. Skip to the relevant section as needed. If full: work through all sections below sequentially.
Epistemic Framework
These standards apply to all reasoning within the task:
- State assumptions before building on them. If your analysis depends on something being true, name it explicitly. Don't bury premises inside conclusions.
- Calibrate confidence. Distinguish what you know with evidence, what you're inferring, and what you're uncertain about. Name the information that would resolve gaps.
- Mark knowledge boundaries. Note whether a position represents established consensus, emerging practice, or an outlier view. Flag when you're reasoning beyond your training data.
- Watch your own blind spots. If you notice uncertainty about your own certainty — say so. If your analysis keeps confirming the same conclusion without stress-testing it, flag that too.
- Disagree clearly when warranted. When correcting a premise or pushing back on an approach, explain the error and why it matters. Don't soften the correction to the point of ambiguity, and don't be dismissive.
Problem Decomposition
Break the problem down before attempting a solution:
- Identify the core question. What specifically needs to be decided, understood, or built? Strip away incidental complexity.
- Decompose into sub-problems. Find the independently solvable pieces. Each should have a clear boundary and a testable outcome.
- Map dependencies. Which sub-problems depend on others? Which can be solved in parallel? Where are the interfaces between components?
- Surface assumptions at each level. Each sub-problem carries its own assumptions — name them. An assumption buried in a sub-problem can invalidate the whole solution.
- Solve from foundations up. Start with the sub-problems that have the fewest dependencies and the most downstream impact. Don't jump to the top-level solution.
Analytical Method
Ground analysis in fundamentals, not pattern-matching:
- Reason from what must be true, not what is typically done. Conventions are useful defaults, but they're not arguments. If you're recommending an approach because it's common, say so — and explain what makes it actually appropriate here.
- Surface alternatives. Before committing to an approach, identify at least one meaningful alternative and explain why you're choosing one over the other. "Meaningful" means a real contender — not a strawman.
- Flag inconsistencies in both directions. Challenge questionable premises in the existing code, the requirements, and your own reasoning. Apply the same standard everywhere.
Verification-Driven Reasoning
Tie reasoning to evidence, not theory:
- Define "working" before or alongside implementation. What specific, observable behavior constitutes success? Establish this upfront — not after the fact to match what you got.
- Write testable assertions. Express expected behavior as concrete, verifiable statements. These can be formal tests, but they can also be specific conditions you'll check manually.
- Validate empirically when possible. If you can run it, test it, or measure it — do that instead of reasoning about whether it should work. Prefer evidence over argument.
- Close the loop. Implementation is not the last step. The cycle is: implement → verify → reassess. If results don't match expectations, that's information — revisit your assumptions rather than explaining away the discrepancy.
- Scale verification to the task. Full first-principles tasks: define success criteria upfront, test each sub-problem independently, validate integration. Lightweight tasks: run existing tests, confirm no regressions.
Resolving Principle Tensions
Principles conflict. When they do, use the current context to decide — not a fixed hierarchy:
| Tension |
Resolution Heuristic |
| DRY vs. readability |
If the abstraction requires more context to understand than the duplication, keep the duplication |
| SOLID vs. simplicity |
Apply SRP and DI broadly; apply OCP/ISP/LSP only at module boundaries or public APIs |
| YAGNI vs. extensibility |
Build for today's requirements; refactor when (not before) new requirements arrive |
| Performance vs. clarity |
Write clear code first; optimize only when profiling shows a measured bottleneck |
| Consistency vs. correctness |
Don't follow a bad pattern just because it's established; fix the pattern if scope allows, otherwise document the deviation |
| Abstraction vs. directness |
If you'd need to read the abstraction's source to understand the call site, the abstraction isn't helping |
Decision Matrix
| Signal |
Analysis Level |
What to Do |
| Multiple valid architectures, unclear which fits |
Full |
Decompose, analyze trade-offs, recommend with reasoning |
| Complex failure, cause unclear |
— |
Use diagnose; it owns the debugging loop |
| Trade-off between competing concerns |
Full |
Name both sides, explain costs, recommend with explicit assumptions |
| Refactor to improve structure/separation |
Full |
Define target state, decompose changes, verify behavior preserved |
| Greenfield implementation |
Full |
First principles on requirements, decompose, define verification criteria |
| Deep code review |
Full |
Challenge assumptions, surface hidden trade-offs, flag inconsistencies |
| Clear bug with obvious root cause |
Skip |
Fix, verify, move on |
| Isolated change, well-defined scope |
Lightweight |
Standard execution with basic reasoning |
| Mechanical operations (rename, format, move) |
Skip |
Execute directly |
Verification
- Assumptions are stated explicitly before conclusions that depend on them
- At least one alternative was considered for non-trivial decisions
- Trade-offs name concrete costs, not vague "might be harder to maintain"
- Engineering principles were applied as lenses, not invoked as dogma
- Verification criteria were defined before or alongside implementation
Sibling skills
This skill is in two clusters: pre-execution thinking and disciplines (modes that govern how the agent reasons).
Pre-execution thinking:
brainstorming — upstream. Use that skill when WHAT is ambiguous; this skill when HOW or WHY needs systems-level reasoning.
write-spec — downstream. Once a direction is reasoned out, hand off to write-spec for the falsifiable contract; then write-plan to sequence the build.
deep-research — parallel evidence gathering when reasoning hinges on unknowns.
Disciplines:
verify-before-complete — gate at the end of execution. This skill shapes thinking at the start.
test-strategy — methodology for the testing decisions; orthogonal axis to architectural reasoning here.
caveman — output style mode; orthogonal.
1---2name: first-principles3description: Systems-level reasoning for high-stakes technical decisions. Use when choosing between architectures, evaluating trade-offs, or planning a non-mechanical refactor. For debugging a specific failure use diagnose; for clarifying an ambiguous WHAT use brainstorming.4---56# First Principles78## When To Use910- Choosing between architectures or designs with multiple valid approaches11- Evaluating trade-offs between competing concerns12- Planning a non-mechanical refactor or a greenfield implementation13- Deep code review that needs hidden assumptions surfaced1415## Boundaries1617- Not for debugging a specific failure — use `diagnose`, which owns that loop18- Not for clarifying an ambiguous WHAT — use `brainstorming`19- Not for mechanical tasks (rename, format, move) or changes that follow an20 established pattern without ambiguity2122## Self-Check Gate2324Before applying full analysis, assess the task:2526**Full decomposition** — apply when:27- Problem is ambiguous or under-specified28- Multiple valid approaches exist with non-obvious trade-offs29- Requirements are unclear or conflicting30- Changes have systemic implications across components3132**Lightweight analysis** — apply when:33- Cause is obvious and fix is isolated34- Single clear approach, no meaningful alternatives35- Change is well-scoped with predictable impact3637If lightweight: apply standard execution with basic reasoning transparency. Skip to the relevant section as needed. If full: work through all sections below sequentially.3839## Epistemic Framework4041These standards apply to all reasoning within the task:4243- **State assumptions before building on them.** If your analysis depends on something being true, name it explicitly. Don't bury premises inside conclusions.44- **Calibrate confidence.** Distinguish what you know with evidence, what you're inferring, and what you're uncertain about. Name the information that would resolve gaps.45- **Mark knowledge boundaries.** Note whether a position represents established consensus, emerging practice, or an outlier view. Flag when you're reasoning beyond your training data.46- **Watch your own blind spots.** If you notice uncertainty about your own certainty — say so. If your analysis keeps confirming the same conclusion without stress-testing it, flag that too.47- **Disagree clearly when warranted.** When correcting a premise or pushing back on an approach, explain the error and why it matters. Don't soften the correction to the point of ambiguity, and don't be dismissive.4849## Problem Decomposition5051Break the problem down before attempting a solution:52531. **Identify the core question.** What specifically needs to be decided, understood, or built? Strip away incidental complexity.542. **Decompose into sub-problems.** Find the independently solvable pieces. Each should have a clear boundary and a testable outcome.553. **Map dependencies.** Which sub-problems depend on others? Which can be solved in parallel? Where are the interfaces between components?564. **Surface assumptions at each level.** Each sub-problem carries its own assumptions — name them. An assumption buried in a sub-problem can invalidate the whole solution.575. **Solve from foundations up.** Start with the sub-problems that have the fewest dependencies and the most downstream impact. Don't jump to the top-level solution.5859## Analytical Method6061Ground analysis in fundamentals, not pattern-matching:6263- **Reason from what must be true**, not what is typically done. Conventions are useful defaults, but they're not arguments. If you're recommending an approach because it's common, say so — and explain what makes it actually appropriate here.64- **Surface alternatives.** Before committing to an approach, identify at least one meaningful alternative and explain why you're choosing one over the other. "Meaningful" means a real contender — not a strawman.65- **Flag inconsistencies in both directions.** Challenge questionable premises in the existing code, the requirements, and your own reasoning. Apply the same standard everywhere.6667## Verification-Driven Reasoning6869Tie reasoning to evidence, not theory:7071- **Define "working" before or alongside implementation.** What specific, observable behavior constitutes success? Establish this upfront — not after the fact to match what you got.72- **Write testable assertions.** Express expected behavior as concrete, verifiable statements. These can be formal tests, but they can also be specific conditions you'll check manually.73- **Validate empirically when possible.** If you can run it, test it, or measure it — do that instead of reasoning about whether it should work. Prefer evidence over argument.74- **Close the loop.** Implementation is not the last step. The cycle is: implement → verify → reassess. If results don't match expectations, that's information — revisit your assumptions rather than explaining away the discrepancy.75- **Scale verification to the task.** Full first-principles tasks: define success criteria upfront, test each sub-problem independently, validate integration. Lightweight tasks: run existing tests, confirm no regressions.7677## Resolving Principle Tensions7879Principles conflict. When they do, use the current context to decide — not a fixed hierarchy:8081| Tension | Resolution Heuristic |82|---|---|83| DRY vs. readability | If the abstraction requires more context to understand than the duplication, keep the duplication |84| SOLID vs. simplicity | Apply SRP and DI broadly; apply OCP/ISP/LSP only at module boundaries or public APIs |85| YAGNI vs. extensibility | Build for today's requirements; refactor when (not before) new requirements arrive |86| Performance vs. clarity | Write clear code first; optimize only when profiling shows a measured bottleneck |87| Consistency vs. correctness | Don't follow a bad pattern just because it's established; fix the pattern if scope allows, otherwise document the deviation |88| Abstraction vs. directness | If you'd need to read the abstraction's source to understand the call site, the abstraction isn't helping |8990## Decision Matrix9192| Signal | Analysis Level | What to Do |93|---|---|---|94| Multiple valid architectures, unclear which fits | Full | Decompose, analyze trade-offs, recommend with reasoning |95| Complex failure, cause unclear | — | Use `diagnose`; it owns the debugging loop |96| Trade-off between competing concerns | Full | Name both sides, explain costs, recommend with explicit assumptions |97| Refactor to improve structure/separation | Full | Define target state, decompose changes, verify behavior preserved |98| Greenfield implementation | Full | First principles on requirements, decompose, define verification criteria |99| Deep code review | Full | Challenge assumptions, surface hidden trade-offs, flag inconsistencies |100| Clear bug with obvious root cause | Skip | Fix, verify, move on |101| Isolated change, well-defined scope | Lightweight | Standard execution with basic reasoning |102| Mechanical operations (rename, format, move) | Skip | Execute directly |103104## Verification105106- Assumptions are stated explicitly before conclusions that depend on them107- At least one alternative was considered for non-trivial decisions108- Trade-offs name concrete costs, not vague "might be harder to maintain"109- Engineering principles were applied as lenses, not invoked as dogma110- Verification criteria were defined before or alongside implementation111112## Sibling skills113114This skill is in two clusters: **pre-execution thinking** and **disciplines** (modes that govern *how* the agent reasons).115116Pre-execution thinking:117- `brainstorming` — upstream. Use that skill when WHAT is ambiguous; this skill when HOW or WHY needs systems-level reasoning.118- `write-spec` — downstream. Once a direction is reasoned out, hand off to `write-spec` for the falsifiable contract; then `write-plan` to sequence the build.119- `deep-research` — parallel evidence gathering when reasoning hinges on unknowns.120121Disciplines:122- `verify-before-complete` — gate at the *end* of execution. This skill shapes thinking at the start.123- `test-strategy` — methodology for the testing decisions; orthogonal axis to architectural reasoning here.124- `caveman` — output style mode; orthogonal.