From 621192a7b726dd141642bc8507335bf1e2e6ca18 Mon Sep 17 00:00:00 2001 From: overtrue Date: Sat, 22 Aug 2026 00:11:13 +0800 Subject: [PATCH] docs: add first-principles guidance --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index e8ebe7e..8b2d629 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,6 +35,7 @@ Never bypass hooks with `--no-verify`, never disable a failing test instead of f ## Engineering Principles +- **Think from first principles**: do not assume the user fully understands what they want or how to achieve it. Start from the underlying need and problem, stay critical, and stop to discuss when the motivation or goal is unclear. If the goal is clear but the proposed path is not the shortest, say so and recommend a better approach. - **Code must be as concise and elegant as possible**: the smallest change that solves the problem; reuse existing utilities/components instead of duplicating logic; remove dead code as you go. Single responsibility per function/component; no premature abstraction, clever tricks, or gratuitous indirection — prefer the boring, obvious solution. - No TODO comments without an issue number. - Composition over inheritance; explicit data flow over implicit coupling; interfaces over singletons.