Skip to content

draft(spec): SEND-TO-AGENT-001 — CLI contract for sending tasks and alerts to agents#55

Merged
madtank merged 1 commit intomainfrom
orion/task-b38a7475-send-contract
Apr 16, 2026
Merged

draft(spec): SEND-TO-AGENT-001 — CLI contract for sending tasks and alerts to agents#55
madtank merged 1 commit intomainfrom
orion/task-b38a7475-send-contract

Conversation

@madtank
Copy link
Copy Markdown
Member

@madtank madtank commented Apr 16, 2026

Summary

Task `b38a7475` — define the CLI contract for sending tasks and alerts to agents as real, structured requests (not paraphrases in a plain message).

What this PR is

A single spec doc at `specs/SEND-TO-AGENT-001/spec.md`.

Recommendation

Two commands, thin specializations of the existing `ax send` + `_build_alert_metadata` machinery:

```bash
axctl tasks send TASK_ID --to @agent [--message TEXT] [--reason TEXT] [--wait]
axctl alerts forward ALERT_ID --to @agent [--message TEXT] [--wait]
```

One transcript message per send. Metadata carries `alert.task` snapshot (PR #54 pattern) + `resource_uri = ui://tasks/{id}` for the Open Task button. `message_type = task_send` (or `alert_send`) distinguishes from plain text and from passive reminders.

Owner split

Layer Owner Scope
CLI contract @orion (this spec) Command shape, envelope
CLI impl @orion `tasks.py::send`, `alerts.py::forward`
Backend no change Plain `POST /messages` accepts the envelope
MCP @mcp_sentinel (follow-up) Optional `tasks.send` / `alerts.send` MCP tool
Frontend @frontend_sentinel (tasks `60113fd7` + `e55be7c8`) Render `intent=task_send` card, Open/Ack/Reassign buttons
Wiki @orion ax-cli wiki: "Sending tasks and alerts" page

Composes with

Open questions (flagged in §7)

Test plan

  • Team review of §3 command shape + envelope
  • Agreement on `message_type` naming
  • Dogfood after impl: orion → backend_sentinel live task, evidence captured per §6

🤖 Generated with Claude Code

Task b38a7475: users need an intuitive way to send a task or alert to an
agent as a real request with structured context. Today's workaround is
copy-paste the id into a plain message, which drops the structured
reference and teaches the receiver to guess.

This spec defines the two commands, the outgoing envelope shape (one
transcript message, one card, reuses PR #53 alert metadata + PR #54 task
snapshot pattern), how delivery receipts flow through (SEND-RECEIPTS-001),
and how the flow differs from plain ax send vs. passive app signals.

Owner split:
- CLI (orion, this spec + impl): tasks send / alerts forward
- Frontend (frontend_sentinel, task 60113fd7): Send to Agent button +
  receiver card rendering
- MCP (mcp_sentinel, follow-up): optional tasks.send / alerts.send MCP tool
- Backend: no schema changes, plain messages POST accepts the envelope

Composes with PR #107 (availability-escalation), PR #108 (delivery-
receipts), PR #54 (task snapshot embedding), PR #53 (ax alerts MVP).

Task: b38a7475-8bf6-445e-bd6e-1845222885dd

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@madtank madtank merged commit f927c06 into main Apr 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant