# Component Spec Agent Runbook

## Project Context To Prepare
- Project goal
- Current repository or workflow context
- Current context
- Goal
- Audience or stakeholder
- Constraints
- Available notes or data

## Input Template
Project:

Goal:

Current context:

Constraints:

Available files, notes, or data:

Expected output:
- component spec
- Assumptions
- Risks
- Recommended next actions

## Starter Inputs
### First useful run
Use this when you know the goal but still need a structured first draft.

Specify an agent quality badge and installable filter control.

Context:
- Current state:
- Constraints:
- Audience:
- Success criteria:

### Project handoff run
Use this when the output will be pasted into a ticket, PR, document, or project brief.

Goal: produce component spec for a real project.
Source material:
- 
Constraints:
- 
Review needs:
- Call out assumptions.
- Flag missing context.
- End with concrete next actions.

### Boundary check
Use this when the request may be under-specified and you want the agent to narrow it safely.

Design a full design system from one button example.

Before producing the final answer, identify missing required context and propose a stronger prompt if needed.

## Setup Context Notes
- Prepare component purpose, required actions, variants, states, content constraints, and accessibility needs.
- Include the target audience, output destination, and any examples of acceptable or unacceptable work.
- Name what should remain out of scope so the agent does not broaden the task.

## Good Input Example
검색 필터 컴포넌트를 디자인 시스템에 추가하는 상황

Goal: produce component spec for a real project.
Constraints: keep the result specific, structured, and ready for handoff.

## Weak Input Example
Help me with Component Spec Agent.

## Weak Input Diagnostics
### Help me with Component Spec Agent.
- Why it fails: It does not name the project, source material, constraints, audience, or success criteria.
- Stronger input: Specify an agent quality badge and installable filter control. Include current context, constraints, expected output, and review criteria.

### Make this better.
- Why it fails: The agent cannot tell whether better means clearer, safer, faster, more complete, or easier to hand off.
- Stronger input: Improve the output for 검색 필터 컴포넌트를 디자인 시스템에 추가하는 상황. Optimize for component spec, keep assumptions explicit, and list the changes made.

## Expected Output Shape
- A short summary of the recommended component spec
- A clearly labeled component spec section
- A clearly labeled Assumptions section
- A clearly labeled Risks section
- A clearly labeled Recommended next actions section
- Assumptions and missing context separated from confirmed facts
- Risks, review checkpoints, and concrete next actions

## Output Checklist
- Includes component spec
- Includes Assumptions
- Includes Risks
- Includes Recommended next actions
- States assumptions separately from confirmed facts
- Lists concrete next actions
- Calls out risks or missing context

## Failure Modes
- The input is too broad or lacks project context
- The output is generic and does not mention concrete constraints
- The result skips assumptions, risks, or next actions
- The agent invents project facts that were not provided

## Handoff Tips
- Paste relevant project files, notes, or constraints before asking for the final output.
- Ask for a first draft, then request a stricter revision using the checklist.
- Keep the generated output with the project ticket, PR, proposal, or team document.
