Skip to content

Simplicity First principle

Simplicity First is a guiding discipline for AI coding agents and software engineering, advocating for writing only the minimum amount of code necessary to solve a specific problem^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]. It operates as a constraint against over-engineering, ensuring that solutions remain manageable and focused rather than becoming abstract or complex for the sake of technical display^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].

Core Constraints

The principle establishes specific negative constraints to prevent common failure modes in software development, particularly within AI-driven workflows^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md].

  • Minimum Code Requirement: Developers and agents should strictly write the least amount of code required to fulfill the requirement^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md].
  • No Speculative Abstraction: Abstractions should not be created based on guesses about future needs. The principle explicitly forbids setting up entire frameworks for a function that can be handled simply^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md].
  • Avoid Over-design: Code should not be written to demonstrate technical skill ("炫技") or to achieve architectural elegance where a simpler solution suffices^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md].

Application Context

Simplicity First is one of the four core principles of the Andrej Karpathy Skills framework, designed to mitigate the tendency of AI agents to act as "overconfident writers" rather than careful engineers^[001-TODO__Andrej_Karpathy_Skills_-AI_Coding_Agent_行为框架.md]. By adhering to this principle, agents produce smaller, more focused code changes that are easier to review and maintain^[001-TODO__Andrej_Karpathy_Skills-_AI_Coding_Agent_行为框架.md].

This principle complements [[Surgical Changes]] by ensuring that when code is modified, the scope of the change is not only precise but also inherently simple, avoiding the introduction of unnecessary complexity into the codebase^[001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md].

  • [[Surgical Changes]]
  • [[Think Before Coding]]
  • [[YAGNI]] (You Ain't Gonna Need It)
  • [[KISS Principle]]

Sources

  • 001-TODO__Andrej_Karpathy_Skills_-_AI_Coding_Agent_行为框架.md