AgentLayer▸docs
Engineering

Principles

Twenty-three engineering principles, each a short rule with a test the agent runs on its own work. Name one to steer.

The engineer skill carries 23 principles, one file each, and the operating manual indexes them by name. You don't invoke them. You use their names to steer, because each name points at a complete rule the agent has already read. When a principle changes a decision, Kevin says which decision; a principle cited with no decision behind it is name-dropping.

you  > apply laziness protocol. delete the obsolete adapters first.
you  > prove it works. run the real import and show me the written rows.
you  > separate before serializing shared state. own worktree per attempt, no locks.

Core

PrincipleThe rule
Laziness protocolPrefer deletion and the smallest change that solves the problem; keep call chains flat
Foundational thinkingGet the data structures right first, and scaffold before features
Redesign from first principlesFold a new requirement in as if it had been there on day one
Attack the premiseAfter two failed fixes on one premise, write the premise down and count who holds the imbalance
Subtract before you addRemove dead weight first, then build on the simpler base
Minimize reader loadFewer layers and less hidden state; "where does X come from?" in 30 seconds
Outcome-oriented executionConverge on the end state instead of preserving throwaway intermediate ones
Experience firstThe user, the caller, and the next maintainer beat implementation convenience
Exhaust the design spaceWith no precedent, build two or three whole shapes and compare
Build the leverScript the edit or the proof, so a reviewer can rerun it

Architecture

PrincipleThe rule
Model the domainA state machine, table, or typed model instead of scattered conditionals
Boundary disciplineValidate at the edges, trust types inside, keep logic pure
Type system disciplineMake illegal states unrepresentable, brand ids, exhaust every variant
Make operations idempotentSafe to run twice, and safe again after a crash halfway
Migrate callers, then delete legacy APIsMove every internal caller and drop the old API in one wave
Separate before serializing shared stateGive each concurrent writer its own target before reaching for a lock

Verification

PrincipleThe rule
Prove it worksCheck the real artifact, and say how far up the proof ladder you got
Fix root causesReproduce, ask why, and never add a guard that silences the crash
Sequence verifiable unitsEach small unit ends green before the next; the failing test lands before the fix
Test behavior, not implementationA test that still passes when every import returns undefined gets rewritten or deleted

Delegation

PrincipleThe rule
Guard the context windowBulk reading goes to subagents; only summaries come back
Never block on the humanReversible work proceeds and gets shown; anything irreversible or outward-facing still waits for you

Meta

PrincipleThe rule
Encode lessons in structureA rule needed twice becomes a type, a test, a lint, or a hook

The principles are adapted from pstack (MIT).

On this page