r.writeHandler(...)
Overview
Section titled “Overview”r.writeHandler(...) — registers a command handler: name, Zod input
schema, handler closure, plus optional access and rateLimit rules.
The header is declarative; schema and body stay opaque source spans.
description is the prose the AI agent sees as this handler’s tool
description in the manifest — without it, the handler stays invisible to
the agent (fail-closed: no description, no exposure). agent.expose
overrides that derivation explicitly (force-show or force-hide);
agent.risk (“low” | “mid” | “high”) classifies the action’s blast
radius, defaulting to “mid” for a write handler.
From packages/framework/src/engine/feature-ast/patterns.ts -> WriteHandlerPattern