π Amy Rocket Launch Channels β quick-start#
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[π¬ Allow-listed user posts in launch channel] --> B[π€ Amy reacts π]
B --> C[βοΈ User may edit/improve message]
C --> D{π Same author clicks?}
D -- no --> X[π‘οΈ Ignore: wrong emoji/user/channel]
D -- yes --> E[π Amy replies with channel dashboard embed]
E --> F[π§΅ Dashboard message starts session thread]
F --> G[π§ Thread runs omp prompt]
G --> H[πͺ Thread dashboard mirrors progress to channel dashboard]
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{Message channel is launch channel?}
C -- no --> Z
C -- yes --> D{User allow-listed?}
D -- no --> Z
D -- yes --> E{User is 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[π hugo --minify]
C --> D{Live daemon idle?}
D -- no --> E[βΈοΈ Wait; do not sever active 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/dev/docs
hugo --minifyπ§ 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.