principle-foundational-thinking

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

1|Updated Jul 5, 2026
One-click install
npx skills add https://github.com/yersonargotev/packy --skill principle-foundational-thinking-yersonargotev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-foundational-thinking
Source: https://github.com/yersonargotev/packy/tree/main/bundle/skills/principle-foundational-thinking
Command: npx skills add https://github.com/yersonargotev/packy --skill principle-foundational-thinking-yersonargotev

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 provides a decision framework for choosing types, sequencing work, and isolating shared state before implementation begins. ## Core Features & Use Cases - Data-Structure-First Design: Prompts you to define core types early, trace access patterns, and match structures to dominant code paths so downstream logic becomes obvious. - Scaffold Sequencing: Directs you to build CI, linting, test infrastructure, and shared types before features, keeping commits small and single-purpose. - Concurrency Check: Asks what happens if another actor modifies shared state, and isolates state when the answer is not "nothing". - Use Case: Before starting a new service module, apply this Skill to decide the core data model, order scaffold work ahead of features, and identify which state must be isolated between concurrent actors. ## Quick Start Ask the AI to apply foundational thinking to review the data structures, work sequencing, and shared-state concurrency of 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 that match the dominant paths. Getting the data shape right first makes downstream logic obvious, while a late data-structure change becomes a rewrite.

What work should be done before building features?▼

Build scaffold first: CI, linting, test infrastructure, and shared types. Anything that benefits every later phase should come first, with setup before features and tests before fixes, keeping commits small and single-purpose.

How do I decide when to isolate shared state between threads?▼

Ask what happens if another actor modifies the state concurrently. If the answer is not "nothing", isolate the state. This check should happen before sharing any state between concurrent actors.

When is DRY the wrong approach in code design?▼

DRY applies to structure, not every line. Types and data models should converge, but three similar statements still beat a premature abstraction. Prefer explicit code over clever code and test behavior rather than line counts.

When should I remove code before adding new foundations?▼

Subtraction comes before scaffolding. Remove dead weight first, then lay foundations, so each increment lands a coherent abstraction or deepens an existing one instead of spreading special-case coordination across callers.