Skill v1.0.0
currentAutomated scan100/100name: maximus-ai-product-spec description: "Spec an AI feature like a product: user-visible behavior, refusal and failure modes, eval rubric, staged rollout, kill switch, success metrics. Use for 'spec an AI feature', 'define AI behavior', 'AI acceptance criteria', 'plan rollout for AI', 'how do we know the model is working'." metadata: version: "1.0.0" pillar: ai-engineering source: maximus
Maximus — AI Product Spec
A demo is a model doing something impressive once. A product is a model doing the right thing reliably, failing gracefully, and improving measurably. This skill turns the gap between those two into a structured artifact.
When to use
- Designing any user-facing AI feature from scratch.
- Expanding an existing AI feature (new inputs, new modalities, new use cases).
- Preparing for an internal or external launch where the team needs alignment on behavior.
- When someone asks: "what should the AI actually do?" or "how do we know it's working?"
If the feature doesn't involve a model (LLM, classifier, ranking, embedding, recommendation), use maximus-design-spec instead.
Core rules
- Behavior first, model second. Define what the user sees, what the system returns, and what happens when it fails — before choosing a model or prompt strategy.
- Refusals are features. Document the cases where the model must decline. Silence on refusal design = accidental compliance issues.
- Eval before launch. Every AI feature ships with a rubric. No rubric = no launch criteria = perpetual "almost ready."
- Staged rollout is not optional. AI features can fail in subtle ways that only appear at scale. Gate each stage with explicit metrics thresholds.
- Kill switch at day one. Plan the off-ramp before you need it.
Procedure
- Load the prior art. Read any existing design doc, PRD, or
maximus-design-specartifact. Note open questions. Usesearch_webto check if comparable features exist in the market.
- Define the user-visible behavior.
- What does the user invoke? (button, text field, API call, background trigger)
- What do they see when the model succeeds? (format, length, tone, citations)
- What do they see when the model fails or refuses?
- What latency budget is acceptable? (< 1 s streaming first token, < 5 s full response?)
- Define expected outputs.
- Specify output structure: free text, JSON schema, ranked list, classification label.
- Write 5–10 golden examples covering the core use case, edge cases, and boundary conditions.
- Specify language, tone, and length constraints explicitly.
- Define refusal and failure modes.
- List the categories of inputs that must be refused (off-topic, harmful, PII, out-of-scope).
- Define what the model says when refusing (never a blank 400 error to the user).
- Define graceful degradation: if the model is slow, unavailable, or returning low-confidence output, what fallback do you show?
- Write the eval rubric. See HOWTO.md §"How to design the eval rubric." At minimum:
- Task success rate (human-rated or automated)
- Safety pass rate (refusal on harmful inputs)
- Format compliance rate
- Latency P50/P95
- User thumbs-up/thumbs-down ratio
- Plan the staged rollout.
- Stage 0: Off (feature flag disabled, infrastructure deployed).
- Stage 1: Internal (team + trusted testers only).
- Stage 2: 5% traffic (random or cohort-based).
- Stage 3: 25% → 50% → 100% with defined hold times and metric thresholds between each.
- Define the promotion criteria for each gate (e.g., "task success ≥ 80%, safety pass ≥ 99.5%, no P1 incidents in 72 h").
- Define the kill switch.
- Feature flag name and owner.
- Who can flip it without approval? (on-call engineer, product lead?)
- What automated trigger trips it? (error rate spike, latency breach, safety flag rate spike)
- What does the user see when it's flipped? (fallback text, graceful removal of the feature)
- Define success metrics.
- Leading: task success, format compliance, thumbs-up rate, refusal accuracy.
- Lagging: retention impact (D7, D30), feature engagement rate, support ticket rate.
- Anti-metrics: what signals would indicate the feature is hurting (e.g., users deleting AI outputs and rewriting manually).
- Write the spec artifact. Use
examples/spec-template.mdas the base. Populate all sections. Leave no TBD without an owner and date.
- Review with stakeholders. AI specs need sign-off from: product, engineering, safety/trust-and-safety, and legal (if the feature touches regulated domains). Cross-reference
maximus-ai-safety-governancefor safety controls.
Domain notes
- Prompt engineering is implementation detail. The spec describes behavior;
maximus-prompt-engineeringcovers how to achieve it. Keep them separate. - RAG features need an additional section: retrieval quality (recall, precision) and the behavior when retrieval returns nothing. See
maximus-rag-pipeline. - Agent features need tool-call scope, max iterations, and interruption behavior. See
maximus-agent-design. - Fine-tuned models need a base model version pinned in the spec and a plan for retraining cadence. See
maximus-fine-tuning. - Eval rubrics map directly to test suites. See
maximus-eval-and-testfor implementation.
Gotchas
- Specs that say "the model will use judgment" without defining what good judgment looks like are not specs — they're wishes.
- Thumbs-up rate is gameable; pair it with task-success rate from blind human eval.
- Staged rollout only works if you actually measure metrics at each stage. Build the dashboard before Stage 1.
- A kill switch that requires 3 approvals is not a kill switch. Make it a one-person action.
- "We'll add refusal cases later" always means never. Write them in the spec.
Output
A populated spec document (from examples/spec-template.md), an eval rubric (from examples/eval-rubric.md), a rollout plan table, and a list of open questions with owners and target-resolution dates.