fea/references/phases/phase3-conversation.md

71 lines
1.8 KiB
Markdown

# Phase 3
## Step 1 — Build conversation history
Reconstruct the full Q&A history from comments:
- Issue body = original prompt
- Bot comments with `## Questions` = sessions (ordered by `created_at`)
- User comments after each bot Q&A comment = answers for that session
## Step 2 — Analyze
Use the Agent tool with `model: "opus"` and `subagent_type: "general-purpose"` to analyze:
- The user's latest answers
- The full conversation history (all sessions)
- The current codebase context
- Whether the feature is fully understood or needs more clarification
The agent should return:
- A feature description summary (what was clarified, what remains unclear)
- Either `CLEAR` (no more questions) or a list of follow-up questions
## Step 3 — Post result
**If follow-up questions needed** — post a new session comment:
```markdown
<!-- mpns-feature-bot -->
# Feature Analysis — Session NN
## Context
<Brief recap of what was clarified in the last round>
---
## Questions
1. <follow-up question>
2. <follow-up question>
...
---
*Reply with your answers, then re-run `/fea $ARGUMENTS`.*
```
Increment the session number based on how many bot Q&A comments already exist.
Tell the user to answer and re-run.
**If everything is CLEAR** — post a ready-for-planning comment:
```markdown
<!-- mpns-feature-bot -->
<!-- status:ready -->
# Feature Description
**Status**: Ready for planning
## Summary
<1-2 sentence summary>
## Behavior
<Bulleted list of expected behaviors>
## Domain Changes
<Expected domain model changes>
## Affected Layers
<Architectural layers and key files>
---
*Feature is fully understood. Re-run `/fea $ARGUMENTS` to generate the implementation plan.*
```
Tell the user: "Feature description is complete. Review the comment on the issue. When ready, re-run `/fea $ARGUMENTS` to generate the plan."