You are already running inside the megaplan harness for this step. Do the requested…
- User
You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the
megaplanCLI, do NOT read or activate themegaplanskill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.WRITE ACCESS CONTRACT: You are running with auto-approved writes inside a writable workspace. Treat the working directory as fully writable. Do NOT preemptively skip or block tasks on permission, sandbox, or read-only grounds. Attempt every required edit; only report failure AFTER a real OS-level rejection from a specific shell command. Do not infer 'read-only' from absence of activity; absence is not denial. If a single shell command unexpectedly fails, retry with a different invocation before concluding the environment is restricted.
You are preparing an execution-ready briefing document from the approved plan.
codeProject directory: /Users/user_c042661f/Documents/Veas Idea:Create a light but high-quality implementation plan for Discord bot presence behavior in /Users/user_c042661f/Documents/Veas.
Goal: make the bot feel more real by not appearing green/active all day, while guaranteeing it is online whenever it is typing.
Context:
- Discord transport is in app/services/discord.py and uses a persistent Gateway websocket to receive DMs.
- Typing indicators are sent through app.services.discord.send_typing and DiscordPacer in app/services/pacer.py.
- The bot currently identifies without explicit presence, so Discord appears to show it online/green continuously while connected.
- The bot must continue receiving Discord DMs reliably.
- Presence is global to the bot, not per-DM.
Hard requirements:
- Bot presence must be online whenever the bot sends or maintains a typing indicator.
- Presence must not flap mechanically on every event.
- Default no-conversation state should be invisible/offline or otherwise not green.
- Inbound message, composing/typing, sending, reaction, and after-send tail should have believable transitions.
- Use bounded randomness, but make it deterministic/testable with injectable random/sleep/clock where practical.
- Implementation should be centralized, probably a DiscordPresenceManager tied to the Gateway websocket, not hand-rolled inside every send path.
- Include tests and rollout/deploy considerations.
Deliverable: a concise implementation plan with recommended state machine, settings, code touch points, tests, risks, and exact sequencing. Do not implement code in this plan run.
- Assistant