Spec

From breethomas/bette-think · View interactive version

Spec is an AI agent skill from the GitHub repository breethomas/bette-think. Write specifications at the right depth for any project. Progressive disclosure from quick Linear issues to full AI feature specs. Embeds Linear Method philosophy (brevity, clarity, momentum) with context engineering for AI features. Use for any spec work - quick tasks, features, or AI products.

How to use this skill

Skill file

Spec - Progressive Disclosure Specification

Core Philosophy

Write what's needed. Skip what's not.

Most specs fail because they're either:

This skill routes you to the right depth:

The templates are already excellent. This skill helps you use them.


Linear Method Principles

These principles guide every level:

  1. Issues, not user stories - Plain language wins. "Add export button to dashboard" beats "As a user, I want to export data so that I can..."
  1. Scope down - If it can't be done in 1-3 weeks by 1-3 people, break it down further.
  1. Short specs get read - Long specs get skipped. Write for clarity, not completeness.
  1. Prototype > documentation - A working demo + 3 paragraphs beats a 10-page spec.
  1. Make decisions, not descriptions - Every section should decide something.

See: skills/spec/references/philosophy.md for the full philosophy.


Entry Point

When this skill is invoked, start with:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 SPEC
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What are you speccing?

  1. Quick task (hours to days)
     → Clear title + optional description
     → If it fits in one sentence, just write an issue

  2. Feature (1-3 weeks)
     → Problem, solution, success metric, scope
     → Use what's helpful, skip the rest

  3. AI feature (any size)
     → Core AI questions + context requirements + behavior examples
     → Evals are non-negotiable. Model costs early.

  4. Not sure
     → Tell me what you're building, I'll help you decide

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Parse intent from context:

Command-line shortcuts:


Level 1: Quick Task (Linear Issue)

When to Use

Template

Use templates/linear-issue.md as reference.

Flow

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 LEVEL 1: Quick Task
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The goal: A title that makes it obvious what you're doing.
Everything else is optional.

Questions to ask:

  1. What's the action? (Add, Fix, Design, Refactor, Remove...)
  1. What's being changed? (The specific thing)
  1. Where? (Optional: location in product)

Good titles:

Bad titles:

When to add a description:

When to skip description:

Output

Generate a clear issue ready for Linear:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ISSUE READY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Title: [Generated title]

Description:
[Optional description if needed]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What next?

  1. Create in Linear
  2. Edit title/description
  3. Add more context (→ Level 2)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

If Linear MCP available: Offer to create the issue directly.


Level 2: Feature (Lite PRD)

When to Use

Template

Use templates/lite-prd.md as reference.

Flow

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 LEVEL 2: Feature Spec
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The goal: Shared understanding. Not completeness.

We'll answer 5 essential questions. Everything else is optional.

The Essentials (Always answer)

1. What problem are we solving?

2. For whom?

3. How do we know this matters?

4. What are we building?

5. How will we know it worked?

Optional Sections

After the essentials, offer relevant optional sections:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 ESSENTIALS COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

That might be all you need. Want to add any of these?

  □ Scope & Decisions (in/out of scope, open questions)
  □ Risks (assumptions, four risks check)
  □ Discovery Insights (research, data)
  □ Technical Notes (estimate, challenges, dependencies)
  □ Launch Notes (rollout strategy, communication)
  □ Timeline (Now/Next/Later)

Skip what doesn't help create shared understanding.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Output

Generate the spec in markdown:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 SPEC READY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

# [Feature Name]

## The Essentials

**What problem:** [2-3 sentences]

**For whom:** [Specific segment]

**Evidence:** [What you know]

**Solution:** [What you're building + prototype link]

**Success:** [Metric with target]

[Optional sections if added]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What next?

  1. Create Linear project (parent + child issues)
  2. Export markdown
  3. Go deeper (→ Level 4 options)
  4. Start over

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Level 3: AI Feature

When to Use

Templates

Use templates/ai-product-spec.md + context requirements table.

Flow

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 LEVEL 3: AI Feature Spec
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

AI products need more upfront thinking - but not overly complex docs.

We'll cover:
  • Core AI questions (what, quality, testing, cost, failures)
  • Context requirements (what data the AI needs)
  • Behavior examples (what good/bad looks like)

Evals are non-negotiable. Model costs early.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Phase 1: Core AI Questions

Walk through these 5 questions (from templates/ai-product-spec.md):

1. What's the AI doing?

2. How will you know if it's good?

3. How will you test it?

4. What will it cost?

5. What happens when it's wrong?

Phase 2: Context Requirements

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 CONTEXT REQUIREMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

90% of AI quality comes from context quality.

What context does the AI need to do its job?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Build a context requirements table:

| Data Needed | Source | Availability | Notes |

|-------------|--------|--------------|-------|

| [Entity/signal] | [DB/API/user] | [Always/Sometimes/Never] | [Sensitivity, freshness] |

See: skills/spec/references/context-table.md for the full format.

Key questions:

Flag problems immediately:

Phase 3: Behavior Examples

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 BEHAVIOR EXAMPLES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

AI behaves according to examples, not descriptions.

We need 5-10 examples minimum covering:
  • Good responses (what should happen)
  • Bad responses (common failure modes)
  • Reject cases (when AI should refuse/defer)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Example format:

Scenario: [Brief description]
Input: [What the user provides]
Good: [Desired response]
Bad: [What to avoid]
Reject: [When to refuse - if applicable]

See: skills/spec/references/behavior-examples.md for guidance.

Coverage to aim for:

Phase 4: Agency Progression Plan

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 AGENCY PROGRESSION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

AI products earn autonomy. What's your ladder?

| Version | Capability | Control | Agency | What You're Testing |
|---------|------------|---------|--------|---------------------|
| V1      | [describe] | High    | Low    | [what you learn]    |
| V2      | [describe] | Medium  | Medium | [what you learn]    |
| V3      | [describe] | Low     | High   | [what you learn]    |

Which version are you speccing right now? (Usually V1)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Key questions:

See: skills/spec/references/agency-progression.md for examples and ladder patterns.

Phase 5: Control Handoffs

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 CONTROL HANDOFFS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

How do humans take back control when the AI is wrong?

- Override mechanism: [how users correct/reject AI output]
- Escalation path: [when AI should defer to human]
- Feedback capture: [how corrections feed back into system]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Good control handoffs:

Bad control handoffs:

Phase 6: Reference Dataset

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 REFERENCE DATASET
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Before building, you need 20-100 examples of expected behavior.
This forces alignment on what "good" looks like.

Where will reference examples come from?
- [ ] Historical data (logs, past interactions)
- [ ] Manual curation (team creates examples)
- [ ] User research (observed behaviors)
- [ ] Synthetic generation (for edge cases)

Target count: [X] examples before V1 launch
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Why this matters: Reference datasets force the team to align on expected behavior before writing prompts. Most AI features fail because teams skip this step.

Golden dataset = baseline for evals. Without it, you're testing against vibes.

Output

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 AI SPEC READY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

# [Feature Name]

## What's the AI Doing?
[Precise task description]

## Quality Definition
**Good:** [Criteria]
**Bad:** [What to avoid]

## Eval Strategy
[Test approach + dataset categories]

## Cost Model
[Cost per query + projection]

## Failure Handling
[User controls + fallbacks]

## Context Requirements

| Data | Source | Availability | Notes |
|------|--------|--------------|-------|
[Table]

**When context is missing:** [Fallback behavior]

## Behavior Examples

[5-10 examples]

## Agency Progression Plan

| Version | Capability | Control | Agency | What You're Testing |
|---------|------------|---------|--------|---------------------|
| V1 (this spec) | ... | High | Low | ... |
| V2 (future) | ... | Medium | Medium | ... |
| V3 (future) | ... | Low | High | ... |

## Control Handoffs

**Override:** [mechanism]
**Escalation:** [path]
**Feedback:** [capture method]

## Reference Dataset

**Source:** [where examples come from]
**Target:** [X] examples before launch
**Status:** [X/Y collected]

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What next?

  1. Create Linear project
  2. Export markdown
  3. Go deeper (→ Level 4 options)
  4. Run /ai-health-check
  5. Plan agency ladder (/agency-ladder)
  6. Set up post-launch calibration (/calibrate)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Level 4: Deep Dive (On-Demand)

When user needs more depth, offer these expansions:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 GO DEEPER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Your spec is solid. Need more depth anywhere?

  1. --deep context
     Full 4D Canvas walkthrough (Demand, Data, Discovery, Defense)

  2. --deep examples
     Expand to 15-25 behavior examples

  3. --deep rollout
     Detailed phased rollout with gates

  4. --deep full-prd
     Complete PRD framework (5 stages)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

--deep context

Invoke the full 4D Context Canvas walkthrough:

Reference the archived context-engineering skill for the full framework.

--deep examples

Expand behavior examples to 15-25:

--deep rollout

Detailed rollout planning:

--deep full-prd

Invoke the prd-writer skill for the complete 5-stage PRD framework:


Linear Integration

When Linear MCP is available:

Pulling Context

Creating Output

Level 1: Create issue directly via Linear MCP

Level 2: Offer to create:

Level 3: Offer to create:


Integration with Other Commands

Before /spec:

After /spec:


Attribution

Linear Method: Linear team (issues not stories, scope down, momentum)

Lite PRD: Aakash Gupta (Product Growth)

AI Product Spec: Aakash Gupta (Product Growth)

Context Engineering: Aakash Gupta & Miqdad Jaffer (OpenAI) - 4D Context Canvas


Remember

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.