By Nicola Sahar
A free manual on first principles for building useful AI systems with CLI agents like Claude Code.
Inspired by Andrej Karpathy's tweet on Dec 26, 2025:
"I've never felt this much behind as a programmer. The profession is being dramatically refactored as the bits contributed by the programmer are increasingly sparse and between. I have a sense that I could be 10X more powerful if I just properly string together what has become available over the last ~year and a failure to claim the boost feels decidedly like skill issue. There's a new programmable layer of abstraction to master (in addition to the usual layers below) involving agents, subagents, their prompts, contexts, memory, modes, permissions, tools, plugins, skills, hooks, MCP, LSP, slash commands, workflows, IDE integrations, and a need to build an all-encompassing mental model for strengths and pitfalls of fundamentally stochastic, fallible, unintelligible and changing entities suddenly intermingled with what used to be good old fashioned engineering. Clearly some powerful alien tool was handed around except it comes with no manual and everyone has to figure out how to hold it and operate it, while the resulting magnitude 9 earthquake is rocking the profession. Roll up your sleeves to not fall behind."
So I wrote the manual.
morphic_programming_manual_v1.md
9 First Principles:
- Morphability - natural language as morphable code
- Abstraction - tasks become reusable commands
- Recursion - stack abstractions for leverage
- Internal Consistency - prevent system drift
- Reproducibility - crash-resilient design
- Morphic Complexity - recognize over-engineering
- E2E Autonomy - measure actual capabilities
- Token Efficiency - maximize work per token
- Mutation & Exploration - controlled self-improvement
Plus:
- System design (repo structure, git, context engineering)
- Practical tips and psychology
- Example commands you can use
I founded and sold Semantic Health, an AI healthcare startup. Now exploring AI for consciousness and mental health.
- More principles and advanced topics
- A compressed version of the first principles you can add as system context in your own morphic system
Star or watch the repo for updates.
Open an issue or DM me. What did I miss? What should Part 2 cover?
MIT License - free to use, share, and adapt.
- LinkedIn: nicolasahar
- X/Twitter: @SaharNicola
- GitHub: nicolasahar