graph TD
Start([Start: Create ADR]) --> Phase1[Phase 1: ADR Number Detection
Glob existing ADRs
Calculate next number]
Phase1 --> Phase2[Phase 2: Interactive Dialog
5 questions:
Q1: Decision title
Q2: Category Strategic/Technical
Q3: Context
Q4: Considered options
Q5: Decision + consequences]
Phase2 --> Phase3[Phase 3: Generate ADR
7 sections Nygard format
300-500 words]
Phase3 --> ReadmeExists{README.md
exists?}
ReadmeExists -->|Yes| Phase4[Phase 4: Update Documentation Hub
Add ADR link to README]
ReadmeExists -->|No| Phase5
Phase4 --> Phase5
Phase5[Phase 5: Summary
Display ADR path + next steps]
Phase5 --> End([End])
%% Styling
classDef discovery fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
classDef dialog fill:#FFF9C4,stroke:#F57C00,stroke-width:2px
classDef decision fill:#FFE0B2,stroke:#E64A19,stroke-width:2px
classDef action fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
class Phase1 discovery
class Phase2,Phase3 dialog
class ReadmeExists decision
class Phase4,Phase5 action