# Skynet — Project preparation pack (index · working agreements · RACI · access · risks)

**For:** Agon, Vince, Sead, and the stakeholders named in §3

## 0. Index — the standard preparation set and where each piece lives

| # | Artifact | Where | State |
|---|---|---|---|
| 1 | Vision / PRD (business "done") | `skynet-unified-app-functional-design.md` + PDF | Done; **approved by Mathew** (§7 item 1, recorded 2026-08-25); Reddit VOC + PubMed evidence addenda §3.1; Bian (item 2) + D1–D4 still open |
| 2 | Functional spec (27 user stories) | same, §3–§4 | Done |
| 3 | Architecture + ADRs | `skynet-technical-plan.md` v5 + v5.1 addendum; ADRs in repo `docs/decisions/` | Plan done; ADR-001…009 written when their cards run |
| 4 | Interface contracts | `skynet-day0-lock-2026-08-24.md` §4 → repo `packages/contracts` (the gate) | Schema level done; repo artifact = contract day |
| 5 | Work breakdown → task specs | `skynet-task-specs.md` + `skynet-techdesk/appendix-b-import.json` | Done — 48 cards, reviewed executable |
| 6 | Test / acceptance plan | lock doc §6 (per seam) + acceptance command on every task spec | Done |
| 7 | Deployment + ops runbooks | `skynet-implementation-prd.md` §2–§6; runbooks = cards X4/X5/X7/A6 | Done / carded |
| 8 | Risk register | this doc §5 | Done |
| 9 | RACI + cadence | this doc §3 | Done |
| 10 | Working agreements + Definition of Done | this doc §2 | Done |
| 11 | Access checklist | this doc §4 | Done — **fill by the gate** |
| 12 | Stakeholder one-pagers | card M6 (the gate) + kickoff notes | Later |

## 1. The delivery in one paragraph
One app at `app.rescale.media`; Production native; the creative-code loop proven with one real ad; links to the standalone scraper and RescaleOS in S1; bridge track B allowed in those standalone repos while S1 runs; launch-board pilot in S4; ops floor. Three lanes, one person each. Gates are slice and wave gates only; no calendar dates are part of this plan.

## 2. Working agreements and Definition of Done (one page — this is the contract between the three of us)

**Repo and branches**
- Trunk-based on `main`; branch per card `feat|chore|spike/<lane>/<key>-<slug>`; a branch lives ≤ 2 days.
- Branch protection: CI required checks, 1 approval, linear history, secret scanning. No direct pushes to `main`.
- PR title starts with the card key (`S3: creative-code service`). PR template requires `Task: <key>` and `ADR: <n|none>`.
- Nobody commits or pushes for someone else. No `Co-Authored-By` trailers.

**Ownership**
- One card, one owner, one branch. The owner is accountable for the merge and the acceptance artifact.
- Never change another lane's card status. Never close a card from CI.
- Discovered work → a new card (backlog) with the evidence, before its code lands. No silent TODOs.

**Reviews**
- Every PR: draft → hard review → fix → re-verify before a human looks.
- Human cross-lane review is **required** only for changes to `packages/contracts`, any migration, auth/session code, Caddyfile/compose, and workflows. Everything else: owner merges after draft, review, fixes and re-verification.
- A review comment is either "must fix" or "nit". Nits do not block a merge.

**Definition of Done (a card moves to `done` only when all are true)**
1. Code merged to `main`, CI green.
2. The acceptance check from the task spec was run and its output (log, screenshot, table, or file) is posted as a comment on the TechDesk task.
3. Docs the spec names exist (README section, runbook, or ADR).
4. Feature flags default to off in prod unless the spec says otherwise.
5. No secret in the diff (scan gate green).
6. If it changes a contract: the consumer tests in the other lanes pass.

**Blocked**
- `blocked` requires a comment naming the blocker card or person and the unblock condition. The upstream owner ships a stub or fixture the same day if the real thing is late.

**Scope discipline**
- S1 non-goals are not carded. A "while I'm here" that touches a sidecar outside the allowed list is reverted. The allowed standalone exception is bridge track B only: the standalone scraper and RescaleOS may be changed for the track-B cards while S1 runs.
- Sizes are hard: S ≤ ½ day, M ≈ 1 day, L ≈ 2 days. A card that will exceed its size by more than half a day is split before continuing, not stretched.

## 3. RACI and cadence

**People**
| Person | Role in Skynet |
|---|---|
| Agon | Delivery owner, Lane A (platform, imports, proxy, scraper, runtime), release manager at go-live |
| Vince | Lane B (shell, production, bindings/spend guard, launch-board UI) |
| Sead | Lane C (core auth, contracts, creative code, read layer, readback, launch-board API, discovery) |
| Mathew | Product sponsor (functional design, hooks/strategy layer, taxonomy) |
| Bian | Owner of RescaleOS's live loops; must agree the coexistence plan before A11 |
| Cyrus | Creative lead; consulted on creative-code/naming and Production changes |
| Sven | Built rescale-workos; consulted on S0a scrub and the workos bridge endpoints |
| Media buyer (named at G2) | Pilot user of the launch board; walkthrough at the pilot gate |
| D3 sponsor (leadership) | Signs G3 (pilot in prod) |

**RACI (R = does, A = accountable/decides, C = consulted before, I = informed after)**
| Decision / deliverable | Agon | Vince | Sead | Mathew | Bian | Cyrus | Sven | Leadership |
|---|---|---|---|---|---|---|---|---|
| Functional design approval (§7 items 1, 5, 7, 9) — **done, Mathew approved** | R | I | I | **A** | I | C | I | I |
| RescaleOS coexistence (§7 item 2, A11) | R | — | — | C | **A** | — | — | I |
| D1–D4 (funding, ownership, pilot sponsor, store hosting) | R | — | C | C | — | — | — | **A** |
| Technical plan, implementation PRD, day-0 lock | **A/R** | C | C | I | I | — | C | I |
| Contracts (`packages/contracts`) | C | C | **A/R** | — | — | C (creative code) | C (naming) | — |
| Gate G2 (pilot design) | C | C | **A/R** | C | — | C | — | I |
| Gate G1 (scraper data access) | **A/R** | I | C | — | — | — | — | — |
| Gate G3 (pilot in prod) | C | C | **R** | C | — | — | — | **A** (D3 sponsor) |
| Go-live | **A/R** | R | R | I | I | I | I | I |
| Workos secret scrub (S0a) | C | — | **A/R** | — | — | — | C | — |
| Comms + training (M6) | **A/R** | C | C | C | I | I | — | I |

**Cadence**
| When | What | Who | Where |
|---|---|---|---|
| Daily 09:30 (5 min, written) | Stand-up: yesterday / today / blocked, one line each, per card key | Agon, Vince, Sead | TechDesk project comment (async; no meeting) |
| As scheduled by the current wave | Pairing blocks (integration, not co-coding) — see the delivery plan | as scheduled | call |
| At each gate review | Gate reviews (S1 wave gates; G2, G1, G3 in their slices) — 30 min, decision recorded as an ADR in the same wave | gate owner + Agon (+ sponsor for G3) | call |
| Before the relevant gate closes | Integration checklist on staging | all three | staging |
| At go-live | Go-live + demo + training sessions | Agon runs; all present | call + app |
| Weekly (Fri) | One-paragraph status to Mathew and leadership: gates, risks, what ships | Agon | email/Telegram |
| Anytime | Blocker → TechDesk `blocked` + a direct message to the upstream owner | anyone | TechDesk + Telegram |

**Communication rules:** decisions live in ADRs and TechDesk comments, never only in chat. Stakeholders outside the three get the regular status paragraph and the go-live session; nothing else is expected of them until G3.

## 4. Access checklist (every line ticked before the gate — the classic day-1 blocker)

| Access | Agon | Vince | Sead | Notes |
|---|---|---|---|---|
| GitHub org `Rescale-Media`, write on `skynet`, read on the four source repos | ☐ | ☐ | ☐ | `skynet` created empty by Agon (A1a) |
| GHCR: `read:packages` PAT for `docker login ghcr.io` on the box | ☐ | — | — | Already used for meta-ads / rescaleos |
| `server.rescale.media` SSH (deploy user) | ☐ | ☐ (read) | ☐ (read) | Vince/Sead: read + `docker logs` only |
| Plesk panel (vhosts, TLS) | ☐ | — | — | Staging + prod vhosts |
| Portainer (viewer) | ☐ | ☐ | ☐ | Viewer only, per PRD |
| ecomprofits Postgres — `skynet_readonly` role + connection string | — | — | ☐ | Sead creates it (S5a), escrow in password manager |
| ecomprofits repo write (one-line grant PR) | — | — | ☐ | Sead owns ecomprofits |
| Cloudflare R2: buckets `static-ads`, `meta-ads-media` + keys | ☐ | ☐ | — | From existing envs |
| OpenRouter org key (+ per-user keys for M1) | ☐ | ☐ | — | Fernet key carried over |
| ClickUp: bot token (existing, scrubbed from repo) + a sandbox list for S8 tests | — | ☐ (read) | ☐ | Sven confirms scope |
| Railway project "Rescale Tools" (workos) | ☐ | — | ☐ | For the bridge endpoints deploy |
| Discord + Telegram bot tokens (alerts) | ☐ | — | ☐ | Existing bots |
| Transactional email provider (M3) | — | — | ☐ | Reuse ecomprofits' provider |
| TechDesk account + MCP token | ☐ | ☐ | ☐ | Tokens after the TechDesk rollout gate; UI until then |
| Coding assistants on each machine | ☐ | ☐ | ☐ | Claude Code + Codex |
| Password manager vault "Skynet" | ☐ | ☐ | ☐ | Every secret lands here, never in chat |
| Scraper Supabase project (dump for A4 + staging copy) | ☐ | — | — | Service key |
| RescaleOS Claude subscription tokens | ☐ | — | — | Never in staging |

## 5. Risk register (trigger · owner · fallback)

| # | Risk | Trigger you can observe | Owner | Fallback / mitigation |
|---|---|---|---|---|
| 1 | Creative-code sequence forks between workos and Skynet | Two codes with the same `seq` for one product | Sead | S3 calls `rescale_service.next_naming_seq` in the same transaction; cross-check test vs workos output; no second generator ever |
| 2 | Read layer numbers do not match ecomprofits dashboards | S5a acceptance table differs on any of 3 known ads | Sead | Formulas fixed in contracts (`three_second=video_plays`, etc.); Looker/ecomprofits value is the reference, never adjusted in Looker |
| 3 | Auth bridge breaks static-ads `?token=` URLs | Any image/SSE 401 after V1 on staging | Vince | Bridge per lock §4.1; X1 tests; week-3 cookie-only migration |
| 4 | G1 spike fails or overruns the gate | Any inventory row FAIL at the gate review | Agon | Hard stop; scraper keeps Supabase; ADR-003 records; later-slice choice |
| 5 | Pilot discovery shows the launch board is the wrong first board | G2 doc names another board | Sead | S8b/V9 re-target or defer; the rest of the slice exit gate still ships |
| 6 | ClickUp mirror drifts / clobbers human edits | Reconciliation report shows field diffs | Sead | Per-field compare-and-write; machine vs human field lists; workos reconcile cron |
| 7 | Workos credential leaks into the monorepo | Scan gate hit | Sead | S0a scrubbed tree + custom patterns; old repo stays private |
| 8 | Sidecar redeploy loses networks / Plesk GUI edit breaks mounts | Container off `skynet-net`; mount type `bind` | Agon | A2b aliases in compose; rule: compose is the only owner; synthetic checks |
| 9 | Agon overloaded (infra critical path + side-quests) | Any lane-A card slips a wave | Agon | Bridge work stays in explicit B cards only; no hidden side-quests inside S1 |
| 10 | D1–D4 / Bian sign-off missing at the gate | No signature at the gate | Agon | G3 = staging-only automatically; A11 (coexistence) waits for Bian |
| 11 | Production data migration (V3/S12) corrupts or loses rows | Checksum mismatch in S12 | Vince + Sead | Dump before, checksums, restore drill X4; old host read-only 2 weeks (M5) |
| 12 | Spend guard misfires (pauses production) | 402s on staging during E2E | Vince | Kill switch env; admin resume (V5); thresholds per workspace |
| 13 | Scope creep from "keep 100% features" | A card grows past size + ½ day | Everyone | Split rule; Appendix A checklist is the parity bar, not new features |
| 14 | Staging exercises live sidecars by mistake | Staging scraper writes to the live DB | Agon | Isolated staging sidecars (PRD §4); crons off; read-only role only |
| 16 | Bridge work (track B for Mathew) displaces S1 capacity on Lane A | Any lane-A S1 card slips a wave while I1/I2 run | Agon | Accepted explicitly; bridge tracked as separate B cards, never hidden inside S1; PubMed R-cards are Bian-side/Vince, not Lane A |
| 15 | Shared box incident (other tools) takes Skynet down | Any other container saturates disk/CPU | Agon | Separate compose projects; rollback drill; disk guard in migrate step |
