principle-foundational-thinking

Installation
SKILL.md

Foundational thinking

Structure comes before the logic that rests on it: the data shape before the code that reads it, and the scaffold every later phase needs before those phases. Decisions about structure guard the options left open later, and decisions about code guard simplicity.

When: a slice's logic holds state, branches on a shape, or lays down a type later slices share.

  • Settle the data shape before the logic: define the core types early, follow every path that reads or writes them, and pick structures that fit the paths taken most. The principle-model-the-domain skill decides which structure fits.
  • Remove duplication of structure, not of every line. Types and data models converge on one shape.
  • Three similar statements still beat an abstraction made too early. No reflection or dynamic dispatch where a direct call works.
  • Tests cover behavior and edge cases, never a line count; the principle-test-behavior-not-implementation skill says how.
  • Before state is shared between actors, ask what happens when another actor changes it at the same moment. Any answer other than nothing means isolate it, per the principle-separate-before-serializing-shared-state skill.
  • Whatever helps every later phase goes first; ask whether each later phase gains from it already existing. CI, the linter, test infrastructure, and shared types are scaffold.
  • Order for open options: setup before features, and the failing test before the fix it proves, both in one commit per the principle-sequence-verifiable-units skill. Commits stay small and single-purpose, per the commit rule.
  • Each increment lands one coherent abstraction or deepens one that exists. A new capability is never spread over its callers as special cases they coordinate.
  • Before scaffold comes subtraction: code the change orphaned goes first, and other dead weight is flagged, removed first only when the plan includes it, per the principle-subtract-before-you-add skill.

Where it stops: scaffold is setup done before the first slice, not a slice, and a shared type laid down there carries shape only; behavior on it waits for a slice's failing test. Every diff after that still traces to its slice.

Installs
3
Repository
pwguler/skills
GitHub Stars
10
First Seen
4 days ago