Least code, still safe
woostack's core engineering tenet: write as little code as necessary without cutting edge cases or risks.
Least code means an agent plans and implements only what the problem needs. Less code leaves less to read, test, and maintain, but correctness and safety determine how small a solution can be.
Reuse or remove before adding
Start by understanding the affected code and the real flow. A smaller implementation in the wrong place can create another bug.
The simplest solution may be removing code or deciding that no new code is needed. Otherwise, an existing helper or pattern in the repository comes before standard language facilities, native platform features, and dependencies the project already has, in that order. A clear, safe expression may be enough; a new implementation is the last option. The aim is straightforward code, not clever compression.
Small means complete
A small diff can leave an incomplete change. When a contract changes, necessary updates to its callers, tests, and documentation are part of the same outcome. Supported compatibility commitments still apply; least code does not justify breaking them or rewriting unrelated flows.
Safety sets the limit
Validation, error handling, security, accessibility, and data-loss protection are part of the solution, not extra weight. Deliberate independent checks can protect against different failures, even when they look repetitive. Removing them to avoid duplication can make the solution less safe.
When two solutions are the same size, the one that handles edge cases correctly is the better choice. A simplification that changes behavior keeps its regression coverage. Comments explain non-obvious constraints and reasons the code cannot express. A deliberate limitation needs a comment naming its ceiling and upgrade path.
The full rules live in
patterns.md §7.