Unit 5/Lesson 1 of 3

Writing Specs for AI Features

BuzzBoard's job posting explicitly requires 'creating comprehensive specification sets for engineering teams.' An AI feature spec has different sections than a traditional product spec — here's exactly what to include.

SkillsAI feature specsTechnical writingEngineering collaboration
+25 XP
✏️ On desktop — select text to ask Nobi, save notes, or add thoughts

What's different about AI feature specs

A traditional feature spec defines: user stories, acceptance criteria, edge cases, and success metrics. An AI feature spec needs all of that plus:

Agent behavior definition — what does the agent do, step by step? What data does it consume? What actions can it take? What does it produce? This is essentially a prompt spec in prose form, before a single line of code is written.

Model and architecture decisions — which model? RAG, fine-tuning, or prompting? If RAG, what data sources? If multi-agent, what's the orchestration pattern? These are product decisions, not just engineering decisions.

Output schema — the exact JSON (or other format) the agent produces. Field names, types, and constraints. This is the API contract between the model and the application layer.

Quality requirements — what's the quality bar the feature must meet before shipping? Minimum LLM-judge score? Minimum task success rate? Human review of a random sample?

Latency and cost requirements — P50 and P95 latency targets. Maximum cost per run. These are shipping criteria, not afterthoughts.

Failure modes and fallbacks — explicitly document what happens when the agent fails. Returns partial output? Falls back to a static template? Shows a human-review flag? Silent failures in AI products are the norm, not the exception — spec the fallback explicitly.

Eval plan — how will this feature be evaluated? What's the test set? What does a successful eval run look like? When will the first eval run before launch?

囲
Tsumegoつめご

A life-and-death problem — a local position where you must find the correct sequence to survive or kill. A complete spec is the tsumego solution: every variation accounted for, every failure path resolved before the stones are placed.

Spec template: Zylo outreach personalization feature

Feature: Zylo Outreach Draft Generation

User story: As a sales rep at a B2SMB vendor, I want Zylo to generate a personalized outreach email for a prospect in under 3 seconds, so that I can send high-quality messages at scale without spending 10 minutes per prospect.

Agent behavior:
1. Receive prospect_id from the rep's queue
2. Retrieve IRIS profile for prospect_id (tool call: IRIS API)
3. Extract top 2 challenges from the IRIS profile (reasoning step)
4. Select the most relevant BuzzBoard value prop for each challenge (reference internal value prop library)
5. Generate 2 outreach variants: one short (under 100 words), one detailed (100–150 words)
6. Return structured output

Output schema:
{ prospect_id, research_confidence, outreach_variants: [{variant_id, subject, body, tone, word_count}], flags: {low_data_quality, needs_human_review} }

Quality requirements: LLM-judge personalization score ≥ 4.0/5; value prop clarity score ≥ 4.0/5; length compliance: 100% pass

Latency: P50 < 2.5s, P95 < 5s (measured from API request to first token streamed)

Cost: < $0.025 per run at current Claude Sonnet pricing

Fallback: If IRIS returns lowdataquality: true, generate a vertical-generic template using prospect's industry only; set needshumanreview: true

Eval plan: Run against 150-example prospect eval set before launch. Minimum pass rate: 85% of examples meet quality thresholds. Run again after each prompt change in production.

Writing for an engineering audience

The best AI feature specs are written to eliminate ambiguity for engineers, not to demonstrate PM thoroughness. A spec that requires 10 back-and-forth clarification questions is a failed spec.

Be specific about data flows: "The agent receives a prospect_id" is better than "the agent knows about the prospect." Specify the exact API endpoint, the expected payload format, and what to do if the API is unavailable.

Use concrete examples: Don't say "the agent should generate personalized outreach." Show a mock input (a sample IRIS profile) and a mock output (a sample draft). This eliminates ambiguity about what "personalized" means more effectively than any description.

Separate what from how: A spec defines *what* the feature does and what success looks like. How the engineering team implements it (which orchestration library, which vector DB, which caching strategy) is their decision. Over-speccing implementation details disrespects engineering expertise and makes specs harder to maintain.

Include the non-obvious constraints: The constraints that aren't obvious from the user story are the ones engineers will miss. "Never mention competitor names" won't be in any API spec — it has to be in the system prompt design and the output validation. Spell it out.

Version your specs: Specs change as implementation proceeds. Version the document and track changes so engineers know whether they're working from the latest spec or an outdated one.

Ask Nobiexplain

Select any text in the lesson to ask a question. Press Esc to close.

1 / 3

An engineer reads your spec for a new Ember feature and asks: 'What happens if the account health score API returns an error?' Your spec doesn't address this. What does this indicate?