# Step 2: Analyze Scope
## CONTEXT
Dialog folder is created. Now we analyze the specification to determine exactly what needs to be implemented.
---
## READ SPECIFICATION
**Read the specification file(s)** referenced in the dialog file.
Extract:
- All features/sections to implement
- Object IDs and their specifications
- States and transitions
- Translations required
- Any open questions in the spec
---
## IDENTIFY SCOPE
**What should be IN SCOPE for this implementation?**
Based on the specification, list the features/sections to implement.
In scope:
Store in_scope items
**What should be OUT OF SCOPE?**
Explicitly list what we're NOT implementing (yet).
Out of scope:
Store out_of_scope items
**Are there any dependencies?**
What must exist before we can implement this? (Other features, data, APIs, etc.)
Dependencies:
Store dependencies
---
## CHECK FOR ISSUES
**Review the specification for:**
1. **Missing information** — Anything unclear or undefined?
2. **Open questions** — Any unresolved decisions?
3. **Inconsistencies** — Anything that doesn't match?
Document any issues found.
**Issues found in specification:**
{{#each issue in issues}}
- {{issue}}
{{/each}}
How should we proceed?
[A] Continue anyway — address issues as we go
[B] Pause — clarify issues before proceeding
[C] Document issues — continue but note them
Choice:
---
## UPDATE DIALOG FILE
**Update the Scope section in the dialog file:**
### In Scope
{{#each item in in_scope}}
- {{item}}
{{/each}}
### Out of Scope
{{#each item in out_of_scope}}
- {{item}}
{{/each}}
### Dependencies
{{#each item in dependencies}}
- {{item}}
{{/each}}
---
## DETERMINE STEP BREAKDOWN
**Analyze the scope to identify discrete steps.**
Guidelines:
- Each step should accomplish ONE clear thing
- Steps should be ~15-45 minutes of work
- Order by dependencies (what must come first)
- Group related changes together
- Consider testability (each step should be verifiable)
**Common patterns:**
For UI features:
1. Shell/container component
2. Static content sections
3. Dynamic data integration
4. Interactive elements
5. State transitions
6. Edge cases / error states
For refactoring:
1. Create new structure
2. Migrate piece 1
3. Migrate piece 2
4. Remove old structure
5. Update imports/references
For bug fixes:
1. Reproduce issue
2. Implement fix
3. Add tests
4. Verify fix
**What steps do we need?**
Based on the scope, list the implementation steps in order.
Example:
1. Drawer shell component
2. Header section
3. Date display section
4. Dog info section
5. Action buttons
6. State transitions
Steps:
Store steps list
---
## COMPLETION
---
## ROUTING
Based on user choice:
- [A] → Load and execute step-03-create-steps.md
- [B] → Allow user to modify steps list
- [C] → Return to scope review
---
_Agent Dialog Workflow — Step 2: Analyze Scope_