Skip to content

d-wwei/first-principles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

First Principles | 第一性原理

A cognitive base that makes AI agents reason from verified foundations instead of inherited conventions. Works with any LLM agent — Claude, GPT, Gemini, or custom frameworks.

让 AI agent 从经过验证的基础出发推理,而不是继承惯例。适用于任何 LLM agent — Claude、GPT、Gemini 或自定义框架。


What it does | 它做什么

Most AI agents accept the problem structure they're given and produce answers within that frame. First Principles adds a reasoning layer that audits assumptions, decomposes to verifiable foundations, and rebuilds solutions unconstrained by the original architecture.

大多数 AI agent 接受给定的问题结构,在既有框架内产出答案。第一性原理增加了一个推理层——审计假设、分解到可验证的基础、在不受原有架构约束的情况下重建解决方案。

Before (default agent) | 安装前

"Should we migrate to microservices?"

"Here's a 6-step migration plan: identify service boundaries with DDD, use the strangler fig pattern, add an API gateway..."

After (with First Principles) | 安装后

"The question assumes microservices are the target. Your actual constraints are deployment independence, scaling specific components, and team autonomy. A modular monolith satisfies all three at 20% of the operational cost. Which constraint is actually binding?"


How it works | 工作原理

Four cognitive shifts applied to every reasoning task:

四个认知转换,应用于每一个推理任务:

Default mode Target mode
Accept the problem frame 接受问题框架 Audit the frame — separate givens from conventions 审计框架——区分事实与惯例
Decompose to parts 拆成零件 Decompose to independently verifiable claims 分解为可独立验证的命题
Reassemble the original 原样装回 Rebuild freely, unconstrained by original architecture 自由重建,不受原有架构约束
Smooth linear reasoning 线性推理 Branch-point reasoning — identify where conclusions could fork 分叉点推理——识别结论可能分叉之处

Information filter that classifies inputs:

  • Ground truths — build on these (physical laws, verified data)
  • Conventions — audit these (industry practices, inherited defaults)
  • Derived claims — trace dependency chains
  • Analogies — pressure-test structural fit

Six anti-patterns that catch fake first-principles reasoning:

六个反模式,捕捉伪第一性原理推理:

Anti-pattern 反模式 Description 描述
Retroactive justification 倒推合理化 Building a "from scratch" derivation that inevitably lands on the known answer 构造必然落在已知答案上的"从零推导"
Decomposition theater 分解表演 Breaking into parts instead of principles 拆零件而不是拆原理
Domain mismatch 领域错配 Applying physics reasoning to coordination problems 把物理推理套在协调问题上
Cargo cult decomposition 货物崇拜式分解 Always defaulting to "what are the raw costs?" 无论什么领域都问"原材料成本是多少"
Blank slate confusion 白板谬误 Discarding all prior knowledge instead of auditing it 丢弃所有先验知识而不是审计它
Structural mimicry 结构性模仿 Adding "from first principles" to standard analysis 给标准分析加上"从第一性原理出发"的帽子

Installation | 安装

Claude Code

cp cognitive-protocol.md ~/.claude/first-principles.md
echo '@~/.claude/first-principles.md' >> ~/.claude/CLAUDE.md

Codex

cat cognitive-protocol.md >> AGENTS.md

Gemini

Paste cognitive-protocol.md into system_instruction.

cognitive-protocol.md 内容粘贴到 system_instruction 中。

Cursor

cat cognitive-protocol.md >> .cursorrules

Any agent | 任何 agent

Inject cognitive-protocol.md (~30 lines) into the system prompt. See install/generic.md for details.

cognitive-protocol.md(约 30 行)注入系统提示词。详见 install/generic.md


File structure | 文件结构

first-principles/
├── README.md                  ← You are here / 你在这里
├── cognitive-protocol.md      ← Core rules (~30 lines, always-on) / 核心规则(约 30 行,始终激活)
├── SKILL.md                   ← Full framework reference / 完整框架参考
├── anti-patterns.md           ← Detailed anti-pattern guide / 反模式详解
├── examples.md                ← Before/after scenarios / 前后对比示例
└── install/
    ├── claude-code.md         ← Claude Code installation / Claude Code 安装指南
    ├── codex.md               ← Codex installation / Codex 安装指南
    ├── gemini.md              ← Gemini installation / Gemini 安装指南
    └── generic.md             ← Universal guide / 通用安装指南

Composability | 可组合性

First Principles is a cognitive base — it changes how the agent reasons, not what it produces. It stacks cleanly with any domain skill (coding, design, writing, analysis) because it operates at a different layer.

第一性原理是一个认知底座——它改变 agent 的推理方式,而非产出内容。它与任何领域技能(编程、设计、写作、分析)无冲突地叠加,因为它运行在不同的层级。

Relationship to Tacit Knowledge | 与隐性知识的关系

Layer 层级 What it governs 管辖范围 Example 示例
Tacit Knowledge 隐性知识 Output quality — how conclusions are structured 输出质量 "Lead with judgment, not preamble" 判断优先
First Principles 第一性原理 Input quality — what foundations conclusions are built on 输入质量 "Audit assumptions before solving" 先审计假设

Both load as always-on cognitive protocols. No conflicts. Combined: well-reasoned conclusions presented with clarity and conviction.

两者同时加载,始终激活,互不冲突。组合效果:基于经过审计的基础,以清晰和确信呈现的结论。


Theoretical foundation | 理论基础

Based on Aristotle's concept of ἀρχή (arkhe) — propositions that are true in themselves, not derived from other propositions. Operationalized through Descartes' methodical doubt (systematic assumption auditing) and modern physics methodology (decomposition to independently verifiable quantities, synthesis under constraints).

基于亚里士多德的 ἀρχή(本原)概念——不从其他命题推导、自身为真的命题。通过笛卡尔的方法论怀疑(系统性假设审计)和现代物理学方法论(分解为可独立验证的量、在约束下综合)进行操作化。

The cognitive protocol strips all theory and translates these ideas into executable instructions for any reasoning agent.

认知协议剥离了所有理论,将这些思想转译为任何推理 agent 可执行的指令。


License

MIT


All Cognitive Bases

Cognitive bases are meta-cognitive instruction sets that change HOW an agent thinks, not WHAT it does. Each one targets a different cognitive axis. Mix and match.

Cognitive Base What it changes
Results-Driven Require evidence for completion, not just activity
Tacit Knowledge Think like an experienced practitioner
Attention Allocation Find and concentrate on the ONE binding constraint
Bayesian Reasoning Calibrated probability thinking, not binary judgments
Constraint as Catalyst Turn constraints into innovation catalysts
Conviction Override Override rational caution when obstacles are convention, not physics
Cross-Domain Connector Detect structural isomorphisms across disciplines
Dialectical Thinking Synthesize through contradictions (矛盾论)
Double-Loop Learning Question the assumptions that produce errors
Frame Auditing Detect and transcend invisible analytical frames
Interactive Cognition Model others' cognition and manage information flow
Inversion Thinking Map failure modes first, then avoid them
Motivation Audit Audit motivational drivers before analysis (正心诚意)
Non-Attachment Radical cognitive freedom — use frameworks without fusing
Principled Action Unify knowing and doing through practice-theory spirals (知行合一)
Second-Order Thinking Trace consequences beyond first-order effects
Systems Thinking Feedback-driven structural analysis, not linear cause-effect
Temporal Wisdom Make time your ally — compound effects and phase awareness
Cognitive Base Creator Generate new cognitive bases from any thinking framework

About

A cognitive base that makes AI agents reason from verified foundations instead of inherited conventions. 让 AI agent 从第一性原理出发推理,而不是继承惯例。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors