๐Ÿ“ฆ Research

Source session: amy-jun10-1631 (thread 1514275906170912769, 2026-06-10). This page is the seamless-continuation handoff: the next agent should be able to proceed without reading that conversation. Two parts: (A) Handoff โ€” exact state + finalized rename plan; (B) Research Charter โ€” the next sessionโ€™s main job. Current-docs note (2026-06-19): this handoff was written during the earlier Hugo-docs phase. The current wiki is Quartz 5 at /home/usr/funday/ssot.funday.gg, built with npx quartz build, and served from ssot.funday.gg/public.


๐ŸŽฏ Goal

Evolve the always-on ompโ‡„Discord bridge toward 100% intuitive, responsive perfection. The product is being branded Ompcord (bot/persona stays Amy). Because the product is still early-stage, the next session must run exhaustive, multi-source research across the entire pi/omp/discord plugin & package ecosystem and publish a deep comparative report in these docs: what to learn or adapt from each.


๐Ÿงฑ Constraints & Preferences (established โ€” do not relitigate)

  • ๐ŸŸฅ Real Discord UI only. When a live Discord session exists, NEVER post Markdown/code-box mockups of embeds. Send actual embed + components via ~/pi-discord-amy/live-responsive-interview.mjs <thread-id>.
  • โฑ๏ธ Discord ACK โ‰ค 3s. showModal() first for a modal; deferUpdate()/deferReply() first for any slow path. The handler process must stay alive or components render dead.
  • ๐Ÿ‘ฅ Allow-list gates everything โ€” every inbound message, slash command, button, select, modal.
  • ๐Ÿ”‘ NEVER paste a bot token in chat. Token lives only in env / systemd EnvironmentFile, never source/commits/logs.
  • ๐Ÿงฐ Toolchain: Bun for dev/QA/tests (bun.lock is SSOT); daemon deploys under Node (node amyd.mjs today, node ompcordd.mjs wrapper-supported). Only declared dep: discord.js@^14.26.4. typebox is host-provided (do not vendor).
  • ๐Ÿ–ฅ๏ธ Emojified, compact, idiot-proof comments & docs โ€” high-level โ€œidiot overstandingโ€ with // ๐Ÿš€ why/what/how one-liners.
  • ๐Ÿ“š Current docs = Quartz wiki at /home/usr/funday/ssot.funday.gg (content/* โ†’ ssot.funday.gg). Build/verify with cd /home/usr/funday/ssot.funday.gg && npx quartz build. Older handoff notes below may mention Hugo as historical context.
  • โœ… Every change ships with docs + tests and is verified with the relevant code checks plus npx quartz build for wiki changes.

๐Ÿ“ฆ Progress

โœ… Done (this session + immediately prior)

  • Responsive interview embed โ€” live-proven in the coms thread (message 1514313332268597429 in thread 1514275906170912769): embed fields, single/multi select, pagination buttons, busy buttons, Customโ€ฆ modal, Confirm/Cancel, in-place edits. Docs: discord-responsive-interview; sender live-responsive-interview.mjs; skill discord-live-responsive-interview.
  • SSOT embed dashboard โ€” /amy status, /amy health, /amy cancel + Refresh / Open Thread / Cancel(when busy) buttons (ACK via deferUpdate()). Pure module status.mjs (createRuntimeState/snapshotStatus/renderStatusEmbed/renderStatusComponents); streamed message_end model/provider/api + token/cache/cost usage when present; fallback stays explicitly unavailable. Docs: amy-ssot-dashboard.
  • Rocket-launch channels โ€” launch.mjs (parseLaunchChannels/shouldPrimeLaunchMessage/shouldTriggerLaunch); ๐Ÿš€ react-to-run in AMY_LAUNCH_CHANNEL_IDS (default 1513664007146438666); channel dashboard โ†’ session thread โ†’ mirrored progress; double-click race fixed (source-id reserved "pending" before awaits). Docs: amy-rocket-launch.
  • Session continuity (CLI โ‡„ Discord) โ€” every thread is an on-disk omp session at ~/.omp/amy-sessions/<threadId>/; resume with --session-dir โ€ฆ -c. Docs: amy-session-continuity (deployed live).
  • Historical verification: bun test โ†’ 37 pass / 105 assertions; then-current docs build passed.

โœ… Resolved in the continuation session (2026-06-10)

  • ๐Ÿ”ญ Ecosystem research report โ€” delivered: agents/ompcord-ecosystem-learnings (weight 10), every charter target covered with the 5-point structure + prioritized early-stage wins; cross-linked from _index.md + this page; then-current docs build passed; live (HTTP 200).
  • Redeploy amyd safely โ€” alias/telemetry deploy moved pid 3133087 โ†’ 3136782; Phase 4 wrapper-runtime deploy dry-run found amyd.mjs idle, then node redeploy.mjs moved pid 3136782 โ†’ 3429641 and relaunched the same legacy entrypoint. Final process: /usr/bin/node amyd.mjs; final log: ONLINE as Amy#0305, registered 2 slash command(s): amy,ompcord, ready โ€” /amy, /ompcord, and thread chat are live. Interactive slash/button click remains human-gated (a bot cannot self-invoke its own slash commands); tests cover the logic.
  • Ompcord rename โ€” Phases 1โ€“4 โ€” naming callouts are consistent, /ompcord aliases are live, the bridge page is now agents/ompcord, and runtime wrapper-first cutover is shipped: ompcordd.mjs/ompcordd.service exist while amyd.mjs, amyd.service, legacy config, and ~/.omp/amy-sessions remain compatible.
  • Docs link cleanup โ€” fixed every broken /* link from the prior docs tree. Current wiki links are Quartz routes under ssot.funday.gg/content.
  • Top early-stage wins #1โ€“#2 โ€” /amy status now consumes real message_end.message.usage (input/output/cache/total/cost + model/provider/api) instead of hardcoding unavailable when JSONL provides it, and tool_execution_end.isError marks failed tools red in the live dashboard/runtime status. Covered by stream.test.mjs + status.test.mjs; verified with node --check and bun test (42 pass / 124 assertions).
  • Phase 4 verification โ€” node --check amyd.mjs && node --check ompcordd.mjs && node --check config.mjs && node --check redeploy.mjs && node --check live-responsive-interview.mjs; bun test โ†’ 48 pass / 141 assertions across 8 files; rendered link scan found no duplicate docs-path hrefs and no stale bridge routes.

โœ… Rename completion

  • Ompcord rename Phase 5 โ€” package identity now matches product naming (package.json.name + bun.lock workspace name are ompcord). Repo directory stays pi-discord-amy until a separate filesystem cutover can preserve local service paths and history.

๐Ÿงญ Key Decisions

  • Naming split โ€” โ€œOmpcordโ€ product, โ€œAmyโ€ persona. Users install/use Ompcord; Amy is the bot/persona Ompcord runs.

    LayerNameWhy
    Product / pluginompcordShort, memorable, โ€œomp + Discordโ€.
    Bot / personaAmyHuman-friendly runtime identity.
    Daemonompcordd wrapper live; amyd compatProduct-aligned daemon name without breaking the deployed legacy entrypoint.
    Legacy compatpi-discord-remoteExisting config/command must not break abruptly.
  • Phase the rename โ€” docs first, repo-directory last. Docs, command aliases, runtime wrapper, service wrapper, session/config compatibility, and package name now carry Ompcord; the physical repo path stays pi-discord-amy until a separate filesystem cutover can preserve local service paths/history.

  • Keep tool names discord_ask_user_question / discord_send_image โ€” they name capability, not product, and are an LLM-facing contract that skills/prompts depend on. Optional ompcord_* aliases only after tests prove identical contracts.


๐Ÿ—บ๏ธ Critical Context (paths, commands, IDs)

  • Repo (โ†’ Ompcord): ~/pi-discord-amy/ โ€” amyd.mjs (legacy daemon + startDaemon()), ompcordd.mjs (same-process wrapper), ompcordd.service, run.mjs (headless loop + JSONL parser + ASK_PROTOCOL), dashboard.mjs (evolving embed), slash.mjs (/amy + /ompcord), ask.mjs (askViaDashboard), status.mjs (SSOT), launch.mjs (rocket), live-responsive-interview.mjs, redeploy.mjs, config.mjs, helpers.mjs, index.mjs (Pi extension). Read ~/pi-discord-amy/AGENTS.md before editing.
  • Sessions: default remains ~/.omp/amy-sessions/<threadId>/*.jsonl; OMPCORD_SESSION_ROOT or an existing ~/.omp/ompcord-sessions is supported without stranding legacy threads. Continue any thread: omp --allow-home --cwd /home/usr --session-dir ~/.omp/amy-sessions/<threadId> -c.
  • Docs: current wiki source is /home/usr/funday/ssot.funday.gg/content/*.md; build/validate with cd /home/usr/funday/ssot.funday.gg && npx quartz build.
  • Live IDs: guild 1496176276933972110 ยท coms thread 1514275906170912769 (amy-jun10-1631) ยท launch channel 1513664007146438666.
  • Verify trio: node --check amyd.mjs ompcordd.mjs config.mjs redeploy.mjs slash.mjs status.mjs ยท bun test ยท npx quartz build for wiki docs.

๐Ÿ—๏ธ Ompcord rename migration plan (finalized โ€” execute in order)

Each phase is independently shippable and reversible. Do not skip ahead; runtime risk rises with each phase.

PhaseScopeActionsRisk
1๐Ÿ“ Docs + vocabularyโœ… Done: state โ€œOmpcord = the bridge, Amy = the personaโ€ across ompcord.md, discord-responsive-interview.md, amy-ssot-dashboard.md, amy-rocket-launch.md, pi-discord-amy/AGENTS.md.none
2๐Ÿ”— Command aliasโœ… Done: Pi TUI /ompcord alongside legacy /pi-discord-remote; Discord /ompcord alongside persona /amy; old commands remain compat aliases.low
3๐Ÿ“„ Page renameโœ… Done: omp-pi-discord.md โ†’ ompcord.md with a legacy alias for the old URL before the old file was removed.low
4โš™๏ธ Runtimeโœ… Done wrapper-first: ompcordd.mjs imports/starts amyd.mjsโ€™s exported startDaemon() in-process; ompcordd.service reads legacy Amy env then Ompcord env; redeploy.mjs detects/relaunches either entrypoint; session root defaults to legacy but supports OMPCORD_SESSION_ROOT/existing ~/.omp/ompcord-sessions.medium
5๐Ÿ“ฆ Packageโœ… Done: package.json.name and bun.lock workspace name are ompcord; repo directory intentionally remains pi-discord-amy for service/path compatibility until a later filesystem cutover.medium

๐Ÿ”ญ Part B โ€” Ecosystem Research Charter (next sessionโ€™s mission)

โœ… DELIVERED (session continuation, 2026-06-10): the report this charter commissioned is live at Ompcord โ€” Ecosystem Learnings โ€” every target below covered with the 5-point structure + a prioritized early-stage wins table. The charter remains here as the spec it was built against.

Mandate (verbatim intent): ultra-deep, holistic, perpetually-looping, obsessive research โ€” meticulously scanning ALL diverse sources EVERYWHERE โ€” until practical, genius, idiot-proof understanding of ALL OTHER relevant pi/omp/discord plugins & packages is achieved; then publish a deep comparative report in docs on what we can learn or adapt from each, given weโ€™re still early-stage.

๐Ÿ“ฅ Deliverable

Create agents/ompcord-ecosystem-learnings.md (weight 10, cross-link from _index.md + this page). For each target below, one section answering exactly:

  1. What it is / does (1โ€“2 lines, grounded โ€” read the actual source).
  2. Key patterns & APIs worth knowing (hooks, tool registration, lifecycle, data flow, config).
  3. ๐ŸŸข Adopt / ๐ŸŸก Adapt / ๐Ÿ”ด Skip for Ompcord โ€” with the concrete reason.
  4. Effort & risk if adopted (S/M/L ยท low/med/high).
  5. Citation โ€” exact file path or URL read (no unsourced claims).

End with a prioritized โ€œearly-stage winsโ€ table: top 5โ€“8 things to adopt now, ranked by value รท effort.

๐ŸŽฏ Target inventory (grounded โ€” versions observed locally)

Internal omp/pi packages (.bun/install/cache/@oh-my-pi/)

PackageVerWhy it matters to Ompcord
pi-coding-agent15.10.7The omp CLI + extension API Ompcord plugs into. Read examples/extensions/* and examples/hooks/*.
pi-agent-core15.10.7Agent loop, compaction, handoff prompts (src/compaction/prompts/handoff-document.md), plan-mode (src/plan-mode/plan-handoff.ts).
pi-ai15.10.7Model/provider abstraction โ†’ informs honest model/provider/usage reporting in the SSOT dashboard.
pi-tui15.10.7TUI rendering primitives โ†’ parity ideas for embed/component rendering.
pi-mnemopi / pi-mnemosyne15.10.7 / 15.6.0Memory/recall โ†’ could back Amy cross-session context.
hashline15.10.7Structural edit format โ†’ patterns for safe transforms.
pi-utils / pi-natives15.10.xShared utilities / native bits.

Installed omp plugins (~/.omp/plugins/package.json)

PluginVerLearn / adapt angle
@oh-my-pi/omp-stats15.10.10Usage/stats surfacing โ†’ feed real numbers into /amy status & /amy health.
@oh-my-pi/swarm-extension13.17.0Multi-agent swarm orchestration โ†’ future โ€œAmy delegates to sub-agentsโ€ mode.
pi-langfuse1.4.3 (patched)Observability/tracing โ†’ run telemetry for Ompcord turns.
pi-discord-remote0.2.4The published baseline (โ€œeach session gets its own auto-created channelโ€) that Ompcord forks/supersedes โ€” diff its UX vs threads/embeds.

Discord libraries

PackageVerFocus
discord.js14.26.4Interaction lifecycle, components v2, modals, rate limits, partials/intents.
discord-api-types0.38.48Canonical payload shapes / limits.
@discordjs/*โ€”builders, rest, ws internals.

External comparables (scan widely)

  • @earendil-works/pi-coding-agent 0.78.0 โ€” an alternate pi coding-agent fork; compare its extension/handoff model (examples/extensions/handoff.ts).
  • Other LLM/agent Discord bridges on npm + GitHub (coding-agent-in-Discord, ChatGPT/Claude Discord bots, agent-ops dashboards).
  • discord.js official guide patterns: interaction collectors, ephemeral flows, button/select/modal wizards, pagination.
  • Adjacent chat-ops bridges (Slack/Matrix agent bots) for dashboard/approval UX ideas.

๐Ÿ” Methodology โ€” the obsessive loop

flowchart LR
  A["Pick target"] --> B["Read real source<br/>cache ยท npm ยท GitHub ยท docs"]
  B --> C["Extract patterns/APIs"]
  C --> D["Adopt / Adapt / Skip<br/>+ effort/risk"]
  D --> E["Write section + citation"]
  E --> F{"More targets<br/>or open questions?"}
  F -- yes --> A
  F -- no --> G["Prioritized wins"]
  • ๐Ÿ“‚ Prefer local source-of-truth first: read packages under .bun/install/cache/... directly (theyโ€™re on disk) before reaching for the web โ€” then corroborate with npm/GitHub/official docs.
  • ๐ŸŒ Use web_search + read <url> for npm pages, GitHub READMEs, discord.js guide; cite every external claim with a link.
  • ๐Ÿง  Delegate breadth with task subagents (one per target cluster), keep synthesis/judgment in the lead context. READ-ONLY agents (explore/librarian) for source spelunking; lead writes the report.
  • โ™ป๏ธ Loop until no open question materially reduces uncertainty โ€” then synthesize.

โœ… Acceptance criteria

  • agents/ompcord-ecosystem-learnings.md exists, covers every target above, each with the 5-point structure + citation.
  • Prioritized โ€œearly-stage winsโ€ table present and defensible (value รท effort).
  • Cross-linked from _index.md and this page; page renders live.
  • Zero unsourced claims; zero Markdown-mockup hand-waving โ€” patterns grounded in real source/URLs.

๐Ÿ”— Related: Ompcord โ€” Always-on Discord Bridge ยท Responsive Interview Embed ยท SSOT Dashboard ยท Rocket Launch ยท Session Continuity.