/iterate Command Workflow
/iterate Command Workflow
Overview
The /iterate command is a dedicated capability of the planning-agent that allows users to update Epic content based on new information that emerges during the design phase. It provides a structured way to incorporate decisions from Teams chats, meeting transcripts, and direct input while tracking open questions and blockers.
Architecture
/iterate uses a hybrid architecture combining a command (orchestration) with specialized skills (logic execution):
Command Layer (/iterate):
- User-facing workflow orchestrator
- Handles conversational flow and user prompts
- Coordinates the overall iteration process
- Shows previews and gets user confirmation
- Manages state and decision flow
Skill Layer (reusable components):
meeting-parser- Parses meeting transcripts (Fireflies, etc.), extracts decisions and open questionsteams-chat-parser- Parses Teams chat exports, extracts decisions and open questionsepic-updater- Updates Epic content files (PRD, User Stories, RACI) with validated changesrefinement-tracker- Manages REFINEMENT.md (adds questions, logs decisions, marks resolved)
This separation enables:
- Reusability: Other commands can leverage these skills (e.g.,
/trackupdating Epics from Jira) - Modularity: Each skill has a single, testable responsibility
- Maintainability: Logic is isolated and easier to update independently
Context & Purpose
Epic content is initially created during the planning phase with the best available information. However, much of the substantive detail and end-user requirements cannot be fully determined until the design phase. The design team needs user stories to begin work, but these stories are then refined and detailed during design before they reach the development phase.
/iterate handles this post-creation refinement process - updating already-created Epic content as it evolves through design.
Epic Content Definition
Throughout this document, “Epic content” refers to all key documents for each Epic:
- PRD (Product Requirements Document)
- User Stories
- Idea Brief
- RACI Matrix
- REFINEMENT.md (tracks ongoing unknowns and decisions)
Command Flow
1. Initial Invocation
/iterate {epic-key}Example: /iterate TP-1234
The planning-agent will:
- Locate the Epic within the initiative structure (
.trilogy/initiatives/TP-XXXX-initiative/TP-YYYY-epic/) - Load existing Epic content (PRD, User Stories, RACI, REFINEMENT.md)
- Present an overview of current Epic state
2. Iteration Method Selection
Agent prompts user to choose:
- Direct iteration: User directly tells agent what to update
- Indirect iteration: User provides external content (Teams chat or meeting transcript)
Direct Iteration Path
Flow
- User describes desired changes verbally
- Planning-agent compares requested changes against current Epic content (PRD, User Stories, RACI, REFINEMENT.md)
- Planning-agent proposes specific updates showing how they would appear in each affected file
- User reviews and confirms
- Planning-agent invokes skills to apply changes:
epic-updaterskill: Updates PRD, User Stories, RACI filesrefinement-trackerskill: Logs decisions in REFINEMENT.md- Jira sync using existing mechanisms
- Planning-agent confirms completion and shows summary of changes made
Example
User: "Add requirement for multi-currency support in invoices"
Agent: "I'll add this to the Epic content. Here's how it will appear:
**PRD Updates:**- Section 3.2: Add 'Multi-currency support for international clients'
**User Stories Updates:**- New story: 'As an admin, I want to configure supported currencies'
**RACI Updates:**- Multi-currency configuration: Design team Responsible, Product Owner Accountable
**REFINEMENT.md Updates:**- Decision logged: Multi-currency support confirmed for international expansion
Confirm these changes?"Indirect Iteration Path
File Type Selection
Agent prompts: Teams Chat or Meeting Transcript
Meeting Transcript Flow
Step 1: File Upload
- User provides Fireflies meeting transcript
- Planning-agent saves to Epic’s dumping ground folder:
.trilogy/initiatives/TP-XXXX-initiative/TP-YYYY-epic/dumping-ground/meetings/
Step 2: Analysis Phase
Planning-agent invokes meeting-parser skill which:
- Parses the meeting transcript
- Extracts decided changes (clear decisions that can be immediately applied)
- Extracts open questions (unresolved issues or blockers requiring resolution)
- Returns structured output to the planning-agent
Output Format:
{ "decisions": [ { "decision": "Payment gateway: Stripe selected over PayPal", "context": "...", "impacts": ["PRD Section 3.2", "User Story US-005"] } ], "open_questions": [ { "question": "Which service for international tax rules?", "context": "...", "impact": "Affects invoice calculation logic", "suggested_owner": "Tech Lead" } ]}Step 3: User Review - Decided Changes
Agent: "Found 3 decisions from the meeting:
1. Payment gateway: Stripe selected over PayPal2. Webhook retry: Implement exponential backoff (3 attempts)3. Multi-currency: Launch with USD, EUR, GBP only
Proposed Epic content updates:[Shows specific changes to PRD, stories, brief]
Confirm these updates?"Upon confirmation, planning-agent invokes skills:
epic-updaterskill: Updates PRD, User Stories, RACI files with decided changesrefinement-trackerskill: Logs decisions in REFINEMENT.md “Decisions Made” section- Jira sync executed using existing sync procedures
- Planning-agent confirms completion with summary
Step 4: User Review - Open Questions
Agent: "Found 2 open questions requiring resolution:
1. Tax calculation: Which service to use for international tax rules?2. Currency conversion: Real-time rates or daily batch updates?
For each question, you can:- Resolve now (provide answer → updates Epic content)- Track as open question (adds to REFINEMENT.md and creates Jira Task blocker)If user resolves now: Planning-agent invokes skills to apply resolution:
epic-updaterskill: Incorporates answer into Epic content (PRD, User Stories, RACI as applicable)refinement-trackerskill: Logs decision in REFINEMENT.md “Decisions Made” section- Jira sync executed
- Planning-agent confirms completion
If tracking as open question: Planning-agent invokes skills to track the blocker:
refinement-trackerskill: Adds question to REFINEMENT.md “Unresolved Questions” section with:- The question
- Impact on user stories/requirements
- Owner (who needs to answer)
- Checkbox for tracking resolution
- Jira Task created under the Epic as blocker (using existing sync mechanisms)
epic-updaterskill: Marks affected user stories as blocked if needed- Can be resolved later via another
/iteraterun
Step 5: Iterative Resolution
User can run /iterate {epic-key} again after blocker tasks are resolved to incorporate those answers into Epic content.
Teams Chat Export Flow
Differences from Meeting Transcript
- Teams chat exports can be lengthy
- May contain ongoing discussions spanning multiple days
- Process similar to meeting transcript:
- Upload chat export to
dumping-ground/teams-chats/ - Planning-agent invokes
teams-chat-parserskill to extract decisions and open questions - Same review/confirmation flow
- Planning-agent invokes
epic-updaterandrefinement-trackerskills to update Epic content - Jira sync executed
- Upload chat export to
Context Management Considerations
- Teams chats are processed incrementally (see separate
teams-chat-log-system.mddocumentation) - The
/iteratecommand can reference the ongoing Teams chat log as context - Agent may ask: “Would you like to review recent Teams discussions from the log?”
File Storage Structure
.trilogy/initiatives/TP-XXXX-initiative/TP-YYYY-epic/├── idea.md # Initial idea brief├── PRD.md # Product Requirements Document├── RACI.md # RACI matrix├── REFINEMENT.md # Ongoing unknowns and decisions├── USER-STORIES/│ └── user-stories.csv # User stories for Jira sync└── dumping-ground/ # All supporting materials ├── meetings/ │ ├── 2025-01-15-kickoff.txt │ └── 2025-01-20-review.txt └── teams-chats/ └── teams-chat-log.md # Ongoing Teams discussion logKey Design Principles
- Planning-agent ownership:
/iterateis a dedicated capability of the planning-agent for maintaining Epic content throughout the design phase - Always show before applying: User must review and confirm all Epic content changes
- Track blockers systematically: Open questions are added to REFINEMENT.md and become Jira Task blockers if not immediately resolvable
- Format consistency: Proposed changes shown in exact format they’ll appear in files
- Use existing mechanisms: All file updates and Jira syncs use the same scripts/procedures from initial Epic creation
- Comprehensive updates: Changes propagate to all affected Epic content (PRD, User Stories, RACI, REFINEMENT.md)
- Iterative resolution: Support multiple
/iterateruns to resolve questions over time as design progresses
Integration Points
With Planning-Agent Workflow
- Uses existing initiative/epic file structure from planning-agent
- Leverages existing Jira sync scripts/procedures established during Epic creation
- Extends REFINEMENT.md usage from pre-creation unknowns to post-creation design refinements
- Maintains consistency with planning-agent conventions for all file updates
With Jira
- Syncs Epic content updates (description, stories, RACI, etc.) using existing sync procedures
- Creates Task work items for open questions that become blockers
- Updates Epic status based on blocker resolution
- Marks affected user stories as blocked when dependencies exist
With Teams Chat Log
- Can reference ongoing
teams-chat-log.mdas context source - Teams discussions automatically captured (see separate documentation)
/iteratecan incorporate recent log entries without manual export
Future Enhancements (Not Yet Implemented)
- Auto-suggest
/iteratewhen Teams chat log shows significant decisions - Diff view showing before/after for Epic content changes
- Support for other transcript formats (Zoom, Google Meet, etc.)
- Batch processing multiple meeting transcripts at once
Skills Reference
meeting-parser Skill
Purpose: Parse meeting transcripts and extract structured decisions and open questions
Input: Meeting transcript text (Fireflies, Zoom, Google Meet, etc.)
Output: JSON with decisions[] and open_questions[] arrays
Used by: /iterate command (and potentially other commands needing meeting analysis)
teams-chat-parser Skill
Purpose: Parse Teams chat exports and extract structured decisions and open questions
Input: Teams chat export text
Output: JSON with decisions[] and open_questions[] arrays
Used by: /iterate command (and potentially other commands needing Teams chat analysis)
epic-updater Skill
Purpose: Update Epic content files (PRD, User Stories, RACI) with validated changes
Input: Epic location, changes to apply (structured format)
Output: Success/failure status, list of files modified
Used by: /iterate, /track (and potentially other commands that modify Epic content)
refinement-tracker Skill
Purpose: Manage REFINEMENT.md - add questions, log decisions, mark resolved
Input: Epic location, action (add_question, log_decision, mark_resolved), data
Output: Success/failure status, updated REFINEMENT.md state
Used by: /iterate, /stories (and potentially other commands managing refinement questions)
Related Commands
/jira-sync- Syncs Epics to/from Jira/idea- Creates initial idea brief/prd- Generates PRD from idea brief/stories- Generates user stories from PRD (may userefinement-trackerskill)/track- Updates Epic progress from Jira (may useepic-updaterskill)/link-chat- Links Teams chat to Epic (enables Teams chat log)