|
| 1 | +--- |
| 2 | +name: flashduty-statuspage |
| 3 | +version: 1.0.0 |
| 4 | +description: "Flashduty status page management and one-time migration from external providers. Commands: statuspage list, changes, create-incident, create-timeline; statuspage migrate structure, email-subscribers, status, cancel. Use when publishing an incident or maintenance to a public status page, posting a timeline update, importing an existing Atlassian Statuspage (structure, history, or email subscribers) into Flashduty, or polling a migration job. Does not cover incident response workflows inside Flashduty — see flashduty-incident for that." |
| 5 | +metadata: |
| 6 | + requires: |
| 7 | + bins: ["flashduty"] |
| 8 | + cliHelp: "flashduty statuspage --help" |
| 9 | +--- |
| 10 | + |
| 11 | +# flashduty-statuspage |
| 12 | + |
| 13 | +**CRITICAL** -- Before using this skill, read [`../flashduty-shared/SKILL.md`](../flashduty-shared/SKILL.md) for authentication, the 3-layer noise reduction model, global flags, and safety rules. |
| 14 | + |
| 15 | +## Overview |
| 16 | + |
| 17 | +Status pages are the public-facing communication layer: they let customers and internal stakeholders see current service health, ongoing incidents, and scheduled maintenance. This skill covers two distinct use cases: |
| 18 | + |
| 19 | +1. **Day-to-day operations** on existing Flashduty status pages: listing pages, posting incidents and maintenance windows, updating timelines. |
| 20 | +2. **One-time migration** from an external provider (currently Atlassian Statuspage) into Flashduty: structure + history in one job, email subscribers in a separate job to control when verification emails go out. |
| 21 | + |
| 22 | +Migration jobs are **asynchronous**. Start a job, poll its status, cancel if needed. The CLI never blocks waiting on a long-running migration. |
| 23 | + |
| 24 | +## Quick Decision |
| 25 | + |
| 26 | +| User wants to... | Command | |
| 27 | +|---|---| |
| 28 | +| See existing status pages | `statuspage list` | |
| 29 | +| See open incidents or maintenance on a page | `statuspage changes --page-id <id> --type incident` | |
| 30 | +| Publish a new incident | `statuspage create-incident --page-id <id> --title "..."` | |
| 31 | +| Update an ongoing incident | `statuspage create-timeline --page-id <id> --change <id> --message "..."` | |
| 32 | +| Migrate a page from Atlassian (contents first) | `statuspage migrate structure --from atlassian ...` | |
| 33 | +| Migrate subscribers (after structure) | `statuspage migrate email-subscribers --from atlassian ...` | |
| 34 | +| Check migration progress | `statuspage migrate status --job-id <id>` | |
| 35 | +| Stop a runaway migration | `statuspage migrate cancel --job-id <id>` | |
| 36 | + |
| 37 | +## Commands |
| 38 | + |
| 39 | +### statuspage list |
| 40 | + |
| 41 | +List all status pages visible to the account. |
| 42 | + |
| 43 | +```bash |
| 44 | +flashduty statuspage list [flags] |
| 45 | +``` |
| 46 | + |
| 47 | +| Flag | Type | Description | |
| 48 | +|------|------|-------------| |
| 49 | +| `--id` | string | Filter by page IDs (comma-separated) | |
| 50 | + |
| 51 | +Output columns: ID, NAME, SLUG, STATUS, COMPONENTS. |
| 52 | + |
| 53 | +Use this to look up page IDs for the other commands in this skill. |
| 54 | + |
| 55 | +### statuspage changes |
| 56 | + |
| 57 | +List active incidents or maintenance windows on a page. |
| 58 | + |
| 59 | +```bash |
| 60 | +flashduty statuspage changes --page-id <id> --type <incident|maintenance> |
| 61 | +``` |
| 62 | + |
| 63 | +| Flag | Type | Description | |
| 64 | +|------|------|-------------| |
| 65 | +| `--page-id` | int | Page ID (**required**) | |
| 66 | +| `--type` | string | `incident` or `maintenance` (**required**) | |
| 67 | + |
| 68 | +Output columns: ID, TITLE, TYPE, STATUS, CREATED, UPDATED. |
| 69 | + |
| 70 | +"Active" means not yet resolved / not yet completed. Returns both incident and maintenance changes depending on `--type`. |
| 71 | + |
| 72 | +### statuspage create-incident |
| 73 | + |
| 74 | +Publish a new incident on a status page. The incident appears to subscribers and on the public page immediately. |
| 75 | + |
| 76 | +```bash |
| 77 | +flashduty statuspage create-incident --page-id <id> --title <title> [flags] |
| 78 | +``` |
| 79 | + |
| 80 | +| Flag | Type | Description | |
| 81 | +|------|------|-------------| |
| 82 | +| `--page-id` | int | Page ID (**required**) | |
| 83 | +| `--title` | string | Incident title, max 255 chars (**required**) | |
| 84 | +| `--message` | string | Initial update message | |
| 85 | +| `--components` | string | `id1:status,id2:status` — statuses: `operational`, `degraded`, `partial_outage`, `full_outage` | |
| 86 | +| `--notify` | bool | Notify page subscribers (default: false) | |
| 87 | + |
| 88 | +Use `--notify` deliberately — it sends email + push to every subscriber on the page. |
| 89 | + |
| 90 | +### statuspage create-timeline |
| 91 | + |
| 92 | +Add a timeline update to an existing incident or maintenance. Use this to move a change through its lifecycle (`investigating` → `identified` → `monitoring` → `resolved`). |
| 93 | + |
| 94 | +```bash |
| 95 | +flashduty statuspage create-timeline --page-id <id> --change <id> --message <msg> [flags] |
| 96 | +``` |
| 97 | + |
| 98 | +| Flag | Type | Description | |
| 99 | +|------|------|-------------| |
| 100 | +| `--page-id` | int | Page ID (**required**) | |
| 101 | +| `--change` | int | Change ID (**required**) — get it from `statuspage changes` | |
| 102 | +| `--message` | string | Timeline message (**required**) | |
| 103 | +| `--status` | string | Incident: `investigating`, `identified`, `monitoring`, `resolved`; maintenance: `scheduled`, `ongoing`, `completed` | |
| 104 | + |
| 105 | +The `--status` transition determines when a change is considered resolved / completed and stops appearing in `statuspage changes`. |
| 106 | + |
| 107 | +### statuspage migrate structure |
| 108 | + |
| 109 | +Start an asynchronous migration of status page **structure and history** from an external provider into a new Flashduty status page. Components, sections, past incidents, past maintenance windows, and notification templates are imported. **No emails are sent to subscribers.** |
| 110 | + |
| 111 | +```bash |
| 112 | +flashduty statuspage migrate structure --from atlassian --source-page-id <id> --api-key <key> |
| 113 | +``` |
| 114 | + |
| 115 | +| Flag | Type | Description | |
| 116 | +|------|------|-------------| |
| 117 | +| `--from` | string | Source provider, currently only `atlassian` (**required**) | |
| 118 | +| `--source-page-id` | string | Page ID in the source provider (**required**) | |
| 119 | +| `--api-key` | string | Source provider API key (**required**) | |
| 120 | + |
| 121 | +Returns a job ID plus the command to poll its status. Human output shows the new Flashduty `target_page_id` once the job reaches the `completed` phase — capture that for the subscriber migration. |
| 122 | + |
| 123 | +### statuspage migrate email-subscribers |
| 124 | + |
| 125 | +Start a **separate** migration of email subscribers from the external provider into an existing Flashduty status page. Split from `migrate structure` so that operators can verify imported content before waking up the subscriber list. |
| 126 | + |
| 127 | +```bash |
| 128 | +flashduty statuspage migrate email-subscribers --from atlassian --source-page-id <id> --target-page-id <id> --api-key <key> |
| 129 | +``` |
| 130 | + |
| 131 | +| Flag | Type | Description | |
| 132 | +|------|------|-------------| |
| 133 | +| `--from` | string | Source provider, currently only `atlassian` (**required**) | |
| 134 | +| `--source-page-id` | string | Page ID in the source provider (**required**) | |
| 135 | +| `--target-page-id` | int | Flashduty page ID from `migrate structure` (**required**) | |
| 136 | +| `--api-key` | string | Source provider API key (**required**) | |
| 137 | + |
| 138 | +### statuspage migrate status |
| 139 | + |
| 140 | +Poll the progress of an async migration job. |
| 141 | + |
| 142 | +```bash |
| 143 | +flashduty statuspage migrate status --job-id <id> |
| 144 | +``` |
| 145 | + |
| 146 | +| Flag | Type | Description | |
| 147 | +|------|------|-------------| |
| 148 | +| `--job-id` | string | Migration job ID (**required**) | |
| 149 | + |
| 150 | +Human output prints the current phase, status, progress counters (components, sections, incidents, maintenances, subscribers, templates), and any accumulated warnings or a fatal error. Poll until `Status: completed`, `failed`, or `cancelled`. |
| 151 | + |
| 152 | +### statuspage migrate cancel |
| 153 | + |
| 154 | +Request cancellation of an in-flight migration job. Best-effort: jobs in their final phase may still complete. |
| 155 | + |
| 156 | +```bash |
| 157 | +flashduty statuspage migrate cancel --job-id <id> |
| 158 | +``` |
| 159 | + |
| 160 | +| Flag | Type | Description | |
| 161 | +|------|------|-------------| |
| 162 | +| `--job-id` | string | Migration job ID (**required**) | |
| 163 | + |
| 164 | +Returns a confirmation and the command to poll the final state. |
| 165 | + |
| 166 | +## Workflows |
| 167 | + |
| 168 | +### Workflow 1: Publish and Manage an Incident |
| 169 | + |
| 170 | +Post a new incident, move it through investigation, resolve it. |
| 171 | + |
| 172 | +```bash |
| 173 | +# 1. Find the page ID |
| 174 | +flashduty statuspage list |
| 175 | + |
| 176 | +# 2. Create the incident (no notifications yet) |
| 177 | +flashduty statuspage create-incident \ |
| 178 | + --page-id 42 \ |
| 179 | + --title "Database latency elevated" \ |
| 180 | + --message "We're investigating reports of slow database queries" \ |
| 181 | + --components "comp_1:degraded" |
| 182 | + |
| 183 | +# 3. See the change ID for follow-up updates |
| 184 | +flashduty statuspage changes --page-id 42 --type incident |
| 185 | + |
| 186 | +# 4. Post updates as the incident progresses |
| 187 | +flashduty statuspage create-timeline \ |
| 188 | + --page-id 42 --change 101 \ |
| 189 | + --status identified \ |
| 190 | + --message "Root cause: a runaway query. Rolling back now." |
| 191 | + |
| 192 | +flashduty statuspage create-timeline \ |
| 193 | + --page-id 42 --change 101 \ |
| 194 | + --status monitoring \ |
| 195 | + --message "Rollback complete. Monitoring for recurrence." |
| 196 | + |
| 197 | +# 5. Resolve |
| 198 | +flashduty statuspage create-timeline \ |
| 199 | + --page-id 42 --change 101 \ |
| 200 | + --status resolved \ |
| 201 | + --message "Latency back to baseline. Closing." |
| 202 | +``` |
| 203 | + |
| 204 | +### Workflow 2: Full Atlassian → Flashduty Migration |
| 205 | + |
| 206 | +Import structure first, verify, then import subscribers. |
| 207 | + |
| 208 | +```bash |
| 209 | +# 1. Start the structure + history migration |
| 210 | +flashduty statuspage migrate structure \ |
| 211 | + --from atlassian \ |
| 212 | + --source-page-id page_atl_123 \ |
| 213 | + --api-key "$ATLASSIAN_STATUSPAGE_API_KEY" |
| 214 | +# → captures Job ID: str_abc |
| 215 | + |
| 216 | +# 2. Poll until completed |
| 217 | +flashduty statuspage migrate status --job-id str_abc |
| 218 | +# Repeat until Status: completed. |
| 219 | +# Capture Target page ID from the completed job's output. |
| 220 | + |
| 221 | +# 3. Sanity-check the imported page |
| 222 | +flashduty statuspage list --id <new_page_id> |
| 223 | +flashduty statuspage changes --page-id <new_page_id> --type incident |
| 224 | + |
| 225 | +# 4. ONLY AFTER VERIFYING: start subscriber migration |
| 226 | +flashduty statuspage migrate email-subscribers \ |
| 227 | + --from atlassian \ |
| 228 | + --source-page-id page_atl_123 \ |
| 229 | + --target-page-id <new_page_id> \ |
| 230 | + --api-key "$ATLASSIAN_STATUSPAGE_API_KEY" |
| 231 | +# → captures Job ID: sub_xyz |
| 232 | + |
| 233 | +# 5. Poll until completed |
| 234 | +flashduty statuspage migrate status --job-id sub_xyz |
| 235 | +``` |
| 236 | + |
| 237 | +### Workflow 3: Stop a Runaway Migration |
| 238 | + |
| 239 | +```bash |
| 240 | +# Saw unexpected warnings or want to retry with a different config |
| 241 | +flashduty statuspage migrate cancel --job-id str_abc |
| 242 | + |
| 243 | +# Confirm it reached a terminal state |
| 244 | +flashduty statuspage migrate status --job-id str_abc |
| 245 | +# Status should become cancelled. |
| 246 | +``` |
| 247 | + |
| 248 | +## Key Concepts |
| 249 | + |
| 250 | +- **Page ID** (int) is the Flashduty status page primary key. **Change ID** (int) is the ID of an incident/maintenance within a page. Don't confuse them. |
| 251 | +- **Migration is async.** `migrate structure` and `migrate email-subscribers` return immediately with a job ID; the actual work happens on the backend. |
| 252 | +- **Two migration jobs, not one.** Structure + history run separately from subscribers. This is deliberate — subscriber import triggers verification emails, so operators verify content first. |
| 253 | +- **Migration phases** for the structure job progress in order: `components` → `sections` → `history` (incidents + maintenances) → `templates`. The subscribers job has a single `subscribers` phase. |
| 254 | +- **Terminal statuses:** `completed`, `failed`, `cancelled`. Stop polling once any of these appears. |
| 255 | +- **`--notify` is subscriber-visible.** In `create-incident`, omit or set `--notify=false` for silent incidents; set `--notify` when you want an announcement. |
| 256 | +- **Component statuses vary by change type.** Incident statuses: `operational`, `degraded`, `partial_outage`, `full_outage`. Maintenance statuses: `operational`, `under_maintenance`. |
| 257 | +- **Source provider support** is currently Atlassian Statuspage only. Other providers will require SDK + CLI updates. |
| 258 | + |
| 259 | +## Cross-References |
| 260 | + |
| 261 | +- **Prerequisites:** `flashduty-shared` — authentication, global flags (`--json`, `--no-trunc`), and safety rules. |
| 262 | +- **Related skills:** |
| 263 | + - `flashduty-incident` — internal Flashduty incident response (distinct from public status page incidents). |
| 264 | + - `flashduty-channel` — channels are how alerts are routed internally; status pages publish to customers. They can be wired together but are independent concepts. |
0 commit comments