You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/superpowers/plans/2026-07-10-readme-architecture-diagrams.md
+34-38Lines changed: 34 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@
29
29
**Interfaces:**
30
30
31
31
- Consumes: Component names and ownership boundaries documented in `README.md` and `docs/superpowers/specs/2026-07-10-idempotent-youtube-lifecycle-design.md`.
32
-
- Produces: One `flowchart LR` Mermaid block under `## Architecture`; later validation relies on its `ArchitectureInputs`, `ArchitectureHost`, and `ArchitectureYouTube` subgraph IDs.
32
+
- Produces: One `flowchart TB` Mermaid block under `## Architecture`; later validation relies on its `ArchitectureInputs`, `ArchitectureHost`, and `ArchitectureYouTube` subgraph IDs.
33
33
34
34
-[ ]**Step 1: Verify the three-diagram contract currently fails**
35
35
@@ -46,14 +46,16 @@ Expected: nonzero exit because the current README contains no Mermaid blocks.
46
46
Keep the existing introductory and ownership paragraphs. Replace only the fenced `text` diagram with:
47
47
48
48
```mermaid
49
-
flowchart LR
49
+
flowchart TB
50
50
subgraph ArchitectureInputs["Source and compatibility inputs"]
51
+
direction LR
51
52
Camera["RTSP camera"]
52
53
ObsScene["Optional OBS scene"]
53
54
ObsService["Optional OBS service profile"]
54
55
end
55
56
56
57
subgraph ArchitectureHost["Encoder host"]
58
+
direction TB
57
59
Systemd["systemd service"]
58
60
Supervisor["youtube-autoencoder supervisor"]
59
61
Probe["FFprobe source validation"]
@@ -64,6 +66,7 @@ flowchart LR
64
66
end
65
67
66
68
subgraph ArchitectureYouTube["YouTube"]
69
+
direction LR
67
70
Ingest["Reusable liveStream ingest"]
68
71
Api["YouTube Data API v3"]
69
72
Broadcast["One marked liveBroadcast and watch page"]
@@ -143,41 +146,34 @@ Every recovery path first preserves ownership and retry state. Media must be fre
143
146
```mermaid
144
147
stateDiagram-v2
145
148
state "Startup or restart" as RecoveryStartup
146
-
state "Retry deadline pending" as RecoveryWait
147
-
state "Probe camera source" as RecoveryProbe
148
-
state "Start and supervise FFmpeg" as RecoveryEncoder
149
-
state "Wait for active ingest" as RecoveryIngest
150
-
state "Reconcile marked broadcast" as RecoveryReconcile
151
-
state "Resume same event" as RecoveryResume
152
-
state "Create unlisted generation" as RecoveryCreate
153
-
state "Testing, live, and health gates" as RecoveryGates
154
-
state "Verified public stream" as RecoveryStable
155
-
state "Persist source cooldown" as RecoverySourceBackoff
156
-
state "Persist API, quota, or ambiguity cooldown" as RecoveryControlBackoff
157
-
state "Prior event terminal or missing" as RecoveryTerminal
149
+
state "Managed stream generation" as RecoveryGeneration {
150
+
state "Probe source and start FFmpeg" as RecoveryMedia
151
+
state "Require fresh active ingest" as RecoveryIngest
152
+
state "Reconcile exact ownership markers" as RecoveryReconcile
153
+
state "Create and bind unlisted generation" as RecoveryCreate
154
+
state "Resume one nonterminal event" as RecoveryManaged
155
+
state "Testing, live, and publication gates" as RecoveryGates
156
+
state "Verified public stream" as RecoveryStable
157
+
state "Public stream with API cooldown" as RecoveryPublicFallback
158
+
159
+
[*] --> RecoveryMedia
160
+
RecoveryMedia --> RecoveryIngest : media progress fresh
161
+
RecoveryIngest --> RecoveryReconcile : YouTube ingest active
162
+
RecoveryReconcile --> RecoveryManaged : one marked nonterminal event
163
+
RecoveryReconcile --> RecoveryCreate : none, terminal, or missing
164
+
RecoveryCreate --> RecoveryManaged : insert and bind verified
165
+
RecoveryManaged --> RecoveryGates
166
+
RecoveryGates --> RecoveryStable : two healthy live observations and privacy readback
167
+
RecoveryStable --> RecoveryPublicFallback : API unavailable, media healthy
168
+
RecoveryPublicFallback --> RecoveryStable : API recovers
169
+
}
170
+
state "Persist classified cooldown" as RecoveryBackoff
158
171
159
172
[*] --> RecoveryStartup
160
-
RecoveryStartup --> RecoveryWait : deadline still active
161
-
RecoveryWait --> RecoveryStartup : deadline expires or host restarts
162
-
RecoveryStartup --> RecoveryProbe : no active deadline
The state machine may name the testing/live/public gates only where necessary to show recovery destinations. It will not become the omitted normal-production lifecycle diagram.
71
71
72
+
For README readability, healthy progression is grouped inside one managed-generation composite state. Classified failures share one transition into the durable cooldown state; the existing failure table remains authoritative for the per-failure behavior.
73
+
72
74
### 3. Provisioning And Deployment Flow
73
75
74
76
Placement: at the start of `## Installation`, before command-level installation instructions.
0 commit comments