Parent: #257
Goal
Add the first agent gateway path behind the Discord bot so users can issue natural-language English commands without putting orchestration logic directly inside a cog.
Scope
- Add a Discord cog or command entrypoint for agent-assisted commands.
- Resolve Discord user, guild, channel, and message context.
- Send structured requests to a backend agent/orchestrator endpoint.
- Render back either:
- a read-only answer
- a proposed frozen plan
- a confirmation request
- an execution result
- a denial with a clear reason
Suggested paths
apps/discord_bot/src/five08/discord_bot/cogs/agent.pyapps/api/src/five08/backend/routes/agent.py- shared request/response schemas under
packages/shared/src/five08/agent/
Requirements
- Keep the Discord bot thin.
- Do not let the bot directly execute privileged service changes.
- Include message/channel/user metadata in every agent request.
- Preserve a stable operation ID across planning, confirmation, execution, and audit.
- Make the endpoint usable for a task-management MVP first.
Acceptance criteria
- A Discord user can submit an English task-management request.
- The bot can display the resulting plan or response.
- Write actions are not executed until the authorization/confirmation layer permits them.
- The implementation has focused tests for request parsing, context forwarding, and response rendering.
Parent: #257
Goal
Add the first agent gateway path behind the Discord bot so users can issue natural-language English commands without putting orchestration logic directly inside a cog.
Scope
Suggested paths
apps/discord_bot/src/five08/discord_bot/cogs/agent.pyapps/api/src/five08/backend/routes/agent.pypackages/shared/src/five08/agent/Requirements
Acceptance criteria