principle-foundational-thinking

Guides structural decisions on data structures, scaffolding order, and concurrency before writing logic.

3|2|Updated Aug 28, 2026
One-click install
npx skills add https://github.com/adjohn/pstack --skill principle-foundational-thinking-adjohn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-foundational-thinking
Source: https://github.com/adjohn/pstack/tree/main/skills/principle-foundational-thinking
Command: npx skills add https://github.com/adjohn/pstack --skill principle-foundational-thinking-adjohn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Engineers often write logic before settling core data structures, leading to premature abstractions, late-stage rewrites, and concurrency bugs. This Skill applies foundational thinking principles so structural decisions are made first and downstream code becomes obvious. ## Core Features & Use Cases - Data Structures First: Prompts definition of core types early, tracing access patterns, and choosing structures that match dominant code paths. - Scaffold Sequencing: Orders work so CI, linting, test infrastructure, and shared types land before features, keeping commits small and single-purpose. - Concurrency Corollary: Forces the question of what happens when another actor modifies shared state, isolating state when the answer is not nothing. - Use Case: Before implementing a new service module, apply this Skill to decide the core data model, sequence test infrastructure ahead of features, and remove dead code before scaffolding. ## Quick Start Ask the agent to apply foundational thinking to plan the data structures and work sequence for the feature you are about to implement.

Frequently Asked Questions about principle-foundational-thinking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right data structure before writing code?▼

Define core types early, trace every access pattern, and choose structures matching the dominant paths. Getting the data shape right first makes downstream logic obvious, while a late data-structure change becomes a rewrite.

What is scaffold-first sequencing in software development?▼

Scaffold-first sequencing means building anything that helps every later phase first: CI, linting, test infrastructure, and shared types. Setup lands before features and tests before fixes, keeping each commit small and single-purpose.

When should I avoid creating an abstraction in code?▼

Avoid abstraction when it is premature: three similar statements still beat a premature abstraction. DRY the structure and data models rather than every line, and prefer explicit code over clever code.

How do I handle shared state between concurrent actors?▼

Before sharing state, ask what happens if another actor modifies it concurrently. If the answer is not nothing, isolate the state instead of sharing it.

When should dead code be removed during a project?▼

Subtraction comes before scaffolding: remove dead weight first, then lay foundations. Each increment should land a coherent abstraction or deepen an existing one rather than spreading special-case coordination across callers.