Recommended: Run
./install.shfrom the repo root for automated installation. Supports Claude Code, Gemini CLI, Codex CLI, Cursor, OpenCode, and OpenClaw. The manual steps below are for reference or troubleshooting.
First Principles is a cognitive base — it changes how the agent reasons, not what tools it uses. Installation means injecting cognitive-protocol.md into the agent's always-on instructions (system prompt, rules file, or configuration).
| Platform | Where to inject | File to use |
|---|---|---|
| Claude Code | ~/.claude/first-principles.md + ref in CLAUDE.md |
cognitive-protocol.md |
| Codex | Prepend to AGENTS.md |
cognitive-protocol.md |
| Gemini | system_instruction field |
cognitive-protocol.md |
| Cursor | Prepend to .cursorrules |
cognitive-protocol.md |
| ChatGPT | Custom Instructions → system prompt | cognitive-protocol.md |
| LangChain | System message in chain | cognitive-protocol.md |
| AutoGPT / CrewAI | Agent system prompt | cognitive-protocol.md |
| Any other | Find the "always-on instructions" config and inject there | cognitive-protocol.md |
- Locate your agent's system prompt or always-on rules file
- Copy the contents of
cognitive-protocol.md(~30 lines) - Paste it into the system prompt, BEFORE any domain-specific instructions
- If using Tacit Knowledge, place it first, then First Principles
| Need | File | Size |
|---|---|---|
| Minimal install (core rules only) | cognitive-protocol.md |
~30 lines |
| Full reference framework | + SKILL.md |
~120 lines |
| Anti-pattern detection | + anti-patterns.md |
~100 lines |
| Teaching examples | + examples.md |
~100 lines |
For most agents, cognitive-protocol.md alone is sufficient. The additional files are reference material for when the agent needs deeper guidance.
- Agent ignores the rules: Move
cognitive-protocol.mdcontent to the beginning of the system prompt, not the end. Most models weight earlier instructions more heavily. - Rules conflict with domain instructions: First Principles should never conflict — it changes reasoning process, not output format. If conflict appears, the domain instruction likely contains an unexamined assumption. That's a feature, not a bug.
- Context window pressure:
cognitive-protocol.mdis ~30 lines. If that's too much, something else in your prompt needs trimming first.