You are about to ship an LLM feature and want it to behave predictably in production. This workflow pins behavior with a real eval suite and CI gate, makes structured output reliable with schema validation and bounded retries, and cuts token and cost waste before it reaches users. Every step runs against your actual repo and works across the Anthropic and OpenAI SDKs, LangChain, LlamaIndex, Vercel AI SDK, and Pydantic AI.
Point the command at the prompt or agent file behind your feature. It scaffolds a real eval suite using promptfoo or DeepEval, or a test-runner plus LLM-judge setup, and wires a CI gate so a bad prompt change fails the build instead of shipping. Seed it with your known-good cases and the failure modes you already worry about, including prompt-injection cases from the OWASP LLM Top 10.
Run the doctor on the code that parses model responses. It moves you onto native structured output, adds schema validation so malformed JSON is caught at the boundary, and wraps a bounded retry so one bad generation does not fail the request. This replaces brittle string parsing that breaks the first time the model phrases things differently.
Finish by auditing token usage across the feature. The audit finds waste like bloated system prompts, redundant context, and oversized max-token settings, then proposes concrete fixes so the feature is cheaper to run at scale. Run it last so it accounts for the retries and schema overhead added in the previous step.
Run /eval-scaffold first and commit the generated CI gate before touching anything else. Once behavior is pinned, every later change to the prompt or parsing code is measured against the same baseline, so a regression fails the build instead of reaching users.
The toolchain ships a read-only prompt-injection-auditor agent. Run it against any prompt that concatenates user input before that output is wired into tools or actions, then encode each hole it finds against the OWASP LLM Top 10 as an eval case so the fix stays closed.
Order matters: run /structured-output-doctor before /token-cost-audit. Native structured output, schema validation, and a retry all add tokens, so auditing cost last means the report reflects what you will actually pay in production.