112 lines
6.3 KiB
HTML
112 lines
6.3 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>ln-223-story-replanner Workflow</title>
|
||
<link rel="stylesheet" href="../shared/css/diagram.css">
|
||
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
|
||
<script>
|
||
mermaid.initialize({
|
||
startOnLoad: true,
|
||
theme: 'base',
|
||
themeVariables: {
|
||
primaryColor: '#4A90E2',
|
||
primaryTextColor: '#fff',
|
||
primaryBorderColor: '#2E5C8A',
|
||
lineColor: '#5C6BC0',
|
||
secondaryColor: '#7E57C2',
|
||
tertiaryColor: '#26A69A'
|
||
}
|
||
});
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<div class="container">
|
||
<h1>ln-223-story-replanner: Story Replanner</h1>
|
||
|
||
<div class="diagram-section">
|
||
<h2>Workflow Diagram</h2>
|
||
<div class="mermaid">
|
||
graph TD
|
||
Start([Input: epicData, idealPlan, standardsResearch, existingCount]) --> Phase1[Phase 1: Load Existing Stories]
|
||
|
||
Phase1 --> LoadLoop[Progressive Loading:<br/>For EACH Story ONE BY ONE<br/>get_issue with full description]
|
||
LoadLoop --> Phase2[Phase 2: Compare IDEAL vs Existing]
|
||
|
||
Phase2 --> CompareAll[Match IDEAL to Existing<br/>Fuzzy match: title, persona, capability]
|
||
CompareAll --> Categorize[Categorize Operations:<br/>KEEP, UPDATE, OBSOLETE, CREATE]
|
||
Categorize --> CheckEdge{Edge cases?}
|
||
CheckEdge -->|Split/Merge| DetectComplex[⚠️ Story Split 1→2+<br/>⚠️ Story Merge 2+→1]
|
||
CheckEdge -->|Status conflicts| CheckStatus[⚠️ In Progress/Review<br/>❌ Done]
|
||
CheckEdge -->|No| Phase3[Phase 3: Show Replan Summary]
|
||
|
||
DetectComplex --> Phase3
|
||
CheckStatus --> Phase3
|
||
|
||
Phase3 --> ShowSummary[Display:<br/>IDEAL Plan changes<br/>Operations breakdown<br/>Diffs AC/Standards Research<br/>Warnings status/splits/merges]
|
||
ShowSummary --> Phase4[Phase 4: User Confirmation]
|
||
|
||
Phase4 --> CheckApprove{autoApprove?}
|
||
CheckApprove -->|true| Phase5
|
||
CheckApprove -->|false| WaitConfirm[Wait for 'confirm']
|
||
WaitConfirm --> Phase5[Phase 5: Execute Operations]
|
||
|
||
Phase5 --> ExecKeep[KEEP: Skip N Stories unchanged]
|
||
Phase5 --> ExecUpdate[UPDATE: update_issue<br/>new description Backlog/Todo only]
|
||
Phase5 --> ExecObsolete[OBSOLETE: update_issue<br/>state=Canceled + comment Backlog/Todo]
|
||
Phase5 --> ExecCreate[CREATE: Generate doc<br/>create_issue project=Epic labels=user-story]
|
||
|
||
ExecKeep --> UpdateKanban[Update kanban_board.md:<br/>Add NEW Stories ONLY<br/>Epic Grouping Algorithm<br/>Update Epic Story Counters]
|
||
ExecUpdate --> UpdateKanban
|
||
ExecObsolete --> UpdateKanban
|
||
ExecCreate --> UpdateKanban
|
||
|
||
UpdateKanban --> Summary[Display Summary:<br/>Operations executed<br/>URLs Warnings<br/>Next Steps]
|
||
Summary --> End([Done])
|
||
|
||
style Start fill:#4A90E2,stroke:#2E5C8A,color:#fff
|
||
style End fill:#26A69A,stroke:#1B5E20,color:#fff
|
||
style Phase1 fill:#7E57C2,stroke:#4A148C,color:#fff
|
||
style Phase2 fill:#7E57C2,stroke:#4A148C,color:#fff
|
||
style Phase3 fill:#7E57C2,stroke:#4A148C,color:#fff
|
||
style Phase4 fill:#7E57C2,stroke:#4A148C,color:#fff
|
||
style Phase5 fill:#26A69A,stroke:#1B5E20,color:#fff
|
||
style CheckEdge fill:#FF9800,stroke:#E65100,color:#fff
|
||
style CheckApprove fill:#FF9800,stroke:#E65100,color:#fff
|
||
style DetectComplex fill:#F44336,stroke:#B71C1C,color:#fff
|
||
style CheckStatus fill:#F44336,stroke:#B71C1C,color:#fff
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-section">
|
||
<h2>Key Information</h2>
|
||
<ul>
|
||
<li><strong>Type:</strong> Worker (L3)</li>
|
||
<li><strong>Phases:</strong> 5 (Load → Compare → Summary → Confirm → Execute)</li>
|
||
<li><strong>Invoked by:</strong> ln-220-story-coordinator (Phase 5b, REPLAN MODE)</li>
|
||
<li><strong>Input:</strong> epicData, idealPlan (5-10 Stories), standardsResearch, existingCount ≥1, teamId, autoApprove</li>
|
||
<li><strong>Output:</strong> Operations executed (KEEP/UPDATE/OBSOLETE/CREATE) + kanban_board.md updated</li>
|
||
<li><strong>Edge Cases:</strong> Story Split (1→2+), Story Merge (2+→1), Status conflicts (In Progress/Review/Done)</li>
|
||
<li><strong>Version:</strong> 1.0.0</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="notes-section">
|
||
<h2>Important Notes</h2>
|
||
<ul>
|
||
<li><strong>Phase 1:</strong> Progressive Loading - load existing Stories ONE BY ONE with FULL descriptions (token efficiency: 10 Stories × 5,000 tokens = 50,000 tokens)</li>
|
||
<li><strong>Phase 2:</strong> Match IDEAL to existing via fuzzy match (title, persona, capability), categorize KEEP/UPDATE/OBSOLETE/CREATE, detect Story Split (1→2+), Story Merge (2+→1)</li>
|
||
<li><strong>Phase 3:</strong> Show replan summary with IDEAL Plan changes, operations breakdown (N keep, N update, N cancel, N create), diffs (AC, Standards Research), warnings (status conflicts, splits, merges)</li>
|
||
<li><strong>Phase 4:</strong> autoApprove=true (automation mode) skips user confirmation, otherwise wait for "confirm"</li>
|
||
<li><strong>Phase 5:</strong> Execute operations - UPDATE/OBSOLETE only Backlog/Todo (warnings for In Progress/Review, never touch Done), CREATE new Stories (project=Epic, labels=user-story, state=Backlog), update kanban_board.md (add NEW Stories ONLY via Epic Grouping Algorithm)</li>
|
||
<li><strong>Status Constraints:</strong> UPDATE/OBSOLETE allowed for Backlog/Todo ✅, warnings for In Progress/Review ⚠️, never touch Done ❌ (preserve work, create follow-up Stories instead)</li>
|
||
<li><strong>Standards Research:</strong> UPDATE Stories when Epic standards change (new RFCs added/removed), insert updated research in Technical Notes → Library Research (Backlog/Todo only)</li>
|
||
<li><strong>Story Split Detection:</strong> 1 existing → 2+ IDEAL (same persona, split capabilities) → UPDATE first + CREATE new with warnings</li>
|
||
<li><strong>Story Merge Detection:</strong> 2+ existing → 1 IDEAL (combined capabilities) → UPDATE first + OBSOLETE rest with warnings</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html>
|