principle-foundational-thinking
GitHub指导在编码前优先确立核心数据结构与类型,以保障后续代码的清晰度与可维护性。强调通过分离并发状态、先构建通用脚手架(如CI、测试)再开发功能,以及避免过度工程化来最大化系统选项价值并简化实现。
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


