๐Ÿš€ Launch

Intent: let Amy listen in one or more normal Discord channels without instantly running every message. Amy adds ๐Ÿš€; the original author can edit/improve the message; when they click ๐Ÿš€, Amy launches the final prompt into a new thread and mirrors progress back to the channel dashboard.

๐Ÿท๏ธ Naming โ€” Ompcord vs Amy. Ompcord is the ompโ‡„Discord bridge (product/plugin); Amy is the bot persona it runs. You install Ompcord; Amy is who answers. Rename phases 1โ€“5 are complete at docs/command/runtime/package level: package name ompcord, wrapper runtime ompcordd.mjs/ompcordd.service, and compatibility for amyd.mjs, /amy, /pi-discord-remote, legacy config, and ~/.omp/amy-sessions/. Repo directory stays pi-discord-amy until final filesystem cutover. See the rename plan.*

flowchart TD
  A["User posts in launch channel"] --> B["Amy reacts ๐Ÿš€"]
  B --> C["User may edit message"]
  C --> D{"Same author clicks ๐Ÿš€?"}
  D -- no --> X["Ignore wrong trigger"]
  D -- yes --> E["Channel dashboard embed"]
  E --> F["Session thread starts"]
  F --> G["Thread runs prompt"]
  G --> H["Progress mirrors"]
  H --> I["Done / failed"]

โš™๏ธ Config

# ๐Ÿš€ Channels Amy primes with rocket. Defaults to DISCORD_HOME_CHANNEL_ID.
AMY_LAUNCH_CHANNEL_IDS=1513664007146438666
 
# โœ‚๏ธ Future-proof: other emojis can become plan/debug/review later. v1 = rocket only.
AMY_LAUNCH_EMOJI=๐Ÿš€

๐Ÿง  Exact behavior

StepWhat happensWhy
1User posts a normal message in a launch channel๐Ÿ’ฌ Keeps Discord natural; no slash ceremony.
2Amy reacts with ๐Ÿš€๐Ÿงท Arms the message but does not run yet.
3User edits message if desiredโœ๏ธ Prompt can be improved before launch.
4Same author clicks ๐Ÿš€๐Ÿ›ก๏ธ Prevents other users from launching someone elseโ€™s prompt.
5Amy replies with a channel embed dashboard๐Ÿ“Š Visible outside powerpanel, linked to source message.
6Dashboard message starts a thread๐Ÿงต Session context stays contained.
7Thread dashboard mirrors to channel dashboard๐Ÿชž Outside channel sees progress without thread diving.

๐Ÿ›ก๏ธ Safety invariants

flowchart LR
  A["Reaction event"] --> B{"Emoji is ๐Ÿš€?"}
  B -- no --> Z["Ignore"]
  B -- yes --> C{"Launch channel?"}
  C -- no --> Z
  C -- yes --> D{"User allow-listed?"}
  D -- no --> Z
  D -- yes --> E{"Original author?"}
  E -- no --> Z
  E -- yes --> F{"Prompt non-empty?"}
  F -- no --> Z
  F -- yes --> G["Launch once"]
  • ๐Ÿšซ Bot messages and bot reactions are ignored.
  • ๐Ÿ‘ค Only the original allow-listed author can trigger their own message.
  • ๐Ÿงท Source message id is reserved as pending before awaits, blocking rapid double-click duplicate threads.
  • ๐Ÿงน If reply/thread creation fails, the reservation is removed so the user can retry.
  • ๐Ÿชž Mirror edits are best-effort; failing outside dashboard edits never kill the thread run.

๐Ÿงฉ Implementation map

FileRole
launch.mjsPure launch predicates: parse channels, prime checks, trigger checks.
amyd.mjsGateway handlers: react with ๐Ÿš€, launch on reaction, create outside dashboard + thread.
dashboard.mjsOne embed object edits both the thread dashboard and outside mirror.
launch.test.mjsUnit proof for allow-list/channel/author/emoji guards.

๐Ÿ–ฅ๏ธ Compact code comments rule

Keep comments short, practical, and emoji-scannable:

// ๐Ÿš€ Prime only; user may edit before confirming by clicking the same rocket.
// ๐Ÿงท Reserve before awaits so rapid double-clicks cannot spawn duplicate threads.
// ๐Ÿงต The channel dashboard owns the session thread, preserving visible source relation.
// ๐Ÿชž Mirrors are outside powerpanels; failures are non-fatal Discord I/O.

โœ… Verification checklist

flowchart TD
  A["node --check"] --> B["bun test"]
  B --> C["npx quartz build"]
  C --> D{"Live daemon idle?"}
  D -- no --> E["Wait; do not sever run"]
  D -- yes --> F["redeploy"]
  F --> G["Post in launch channel"]
  G --> H["Amy adds ๐Ÿš€"]
  H --> I["Author clicks ๐Ÿš€"]
  I --> J["Channel dashboard appears"]
  J --> K["Thread starts"]
  K --> L["Progress mirrors"]

Commands:

cd ~/pi-discord-amy
node --check amyd.mjs && node --check ompcordd.mjs && node --check dashboard.mjs && node --check launch.mjs
bun test
 
cd ~/funday/ssot.funday.gg
npx quartz build

๐Ÿงญ Future reaction modes

EmojiFuture meaningStatus
๐Ÿš€Normal runโœ… v1 implemented
๐Ÿ“Plan modeplanned
๐ŸžDebug modeplanned
๐Ÿ”Review modeplanned

Do not add more modes until ๐Ÿš€ is live-smoked and stable.