principle-foundational-thinking
GitHub指导在编写代码前优先进行基础架构思考,强调数据结构选择、并发隔离及脚手架搭建顺序。旨在通过正确的数据形状和前期设置保护选项价值,简化后续开发并避免过度工程化。
Trigger Scenarios
Install
npx skills add sediman-agent/OpenSkynet --skill principle-foundational-thinking -g -y
SKILL.md
Frontmatter
{
"name": "principle-foundational-thinking",
"description": "Apply before writing logic: choosing core types and data structures, sequencing scaffold-vs-feature work, asking what concurrent actors share. Get the data structures right so downstream code becomes obvious.",
"disable-model-invocation": true
}
Foundational Thinking
Structural decisions protect option value. Code-level decisions protect simplicity. Over-engineering is often a premature decision that closes doors. The right foundational data structure keeps doors open.
Data structures first. Get the data shape right before writing logic. The right shape makes downstream code obvious. Define core types early, trace every access pattern, and choose structures that match the dominant paths. A data-structure change late is a rewrite. Early, it is often a one-line diff.
At code level, DRY the structure, not every line. Types and data models should converge. Three similar statements still beat a premature abstraction. Prefer explicit over clever. Test behavior and edge cases, not line counts.
Concurrency corollary. Before sharing state between actors, ask "what happens if another actor modifies this concurrently?" If not "nothing", isolate.
Scaffold first. If something helps every later phase, do it first. Ask "does every subsequent phase benefit from this existing?" CI, linting, test infrastructure, and shared types are scaffold. Sequence for option value: setup before features, tests before fixes. Keep commits small and single-purpose.
Subtraction comes before scaffolding: remove dead weight first, then lay foundations.
Version History
- c9d8953 Current 2026-07-05 19:53


