What problem does it solve? It standardizes how TypeScript agents are built in the codm codebase, preventing common architectural mistakes like overriding the run() template method, restating the input envelope, leaking policy into agents, or minting run tokens in the wrong layer. ## Core Features & Use Cases - Agent scaffolding conventions: Defines the one-directory-per-agent layout (class, prompt builder, types, barrel) and the bun cli agent <context> <Name> scaffold command. - Identity and tool scope rules: Enforces static IdentitySchema parsed before token issuance, declared tool scopes, and AgentIdentityService issue/resolve/revoke semantics. - Testing and DI guidance: Prescribes class-token transient DI in all three environments and testing against a stubbed AgentRunner that records requests. - Use Case: When adding a new ClassifyIssueAgent, follow the playbook to create the four files, declare the input schema via z.agentInput(), register it in the context registry, and verify the base stamps agentName using a capturing stub runner. ## Quick Start Ask the AI to scaffold a new TypeScript agent for a given context and name following the agent playbook, including its prompt builder, input schema, DI registration, and stubbed-runner test.