๐ 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 runtimeompcordd.mjs/ompcordd.service, and compatibility foramyd.mjs,/amy,/pi-discord-remote, legacy config, and~/.omp/amy-sessions/. Repo directory stayspi-discord-amyuntil 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
| Step | What happens | Why |
|---|---|---|
| 1 | User posts a normal message in a launch channel | ๐ฌ Keeps Discord natural; no slash ceremony. |
| 2 | Amy reacts with ๐ | ๐งท Arms the message but does not run yet. |
| 3 | User edits message if desired | โ๏ธ Prompt can be improved before launch. |
| 4 | Same author clicks ๐ | ๐ก๏ธ Prevents other users from launching someone elseโs prompt. |
| 5 | Amy replies with a channel embed dashboard | ๐ Visible outside powerpanel, linked to source message. |
| 6 | Dashboard message starts a thread | ๐งต Session context stays contained. |
| 7 | Thread 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
pendingbefore 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
| File | Role |
|---|---|
launch.mjs | Pure launch predicates: parse channels, prime checks, trigger checks. |
amyd.mjs | Gateway handlers: react with ๐, launch on reaction, create outside dashboard + thread. |
dashboard.mjs | One embed object edits both the thread dashboard and outside mirror. |
launch.test.mjs | Unit 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
| Emoji | Future meaning | Status |
|---|---|---|
๐ | Normal run | โ v1 implemented |
๐ | Plan mode | planned |
๐ | Debug mode | planned |
๐ | Review mode | planned |
Do not add more modes until ๐ is live-smoked and stable.