tmux-amq/workplans/TAMQ-WP-0009-interactive-recipient-composer.md
tegwick 8186550c9a
Some checks failed
tamq-ci / test (push) Failing after 6s
feat: add interactive recipient composer
Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
2026-08-24 23:24:18 +02:00

3.1 KiB

id type title domain repo status owner topic_slug planning_priority planning_order created updated state_hub_workstream_id
TAMQ-WP-0009 workplan Interactive recipient-aware message composer communication tmux-amq finished codex coulomb-social P0 14 2026-08-24 2026-08-24 8005dcc7-2433-5484-82e3-d528eaf6d967

Interactive recipient-aware message composer

Make bare @ safe for ordinary unquoted prose while keeping the selected recipient visible and switchable.

Required operator contract

Running @ without arguments opens an inline composer whose prompt is the selected repository, for example @flex-auth: . Plain text is read directly from the terminal, so apostrophes and other shell punctuation do not require quoting. Tab cycles through the other repository windows in the managed session, preserving the draft. Enter queues the message and Ctrl-C cancels it.

The initial recipient is the latest durable inbound sender when available. If there is no message history, use the first other repository in the session. The existing @ MESSAGE shorthand remains a non-interactive fast path and retains normal shell quoting rules.

Expose session recipients to the generic command

id: TAMQ-WP-0009-T01
status: done
priority: high
state_hub_task_id: "320e4c7c-9c44-5023-8c60-7b270a0276f5"

Encode the addressable repository list in the tamq-owned generic @ shim, without changing shell configuration or trusting arbitrary repository names. Exclude the current repository from the interactive recipient cycle.

Implement the terminal composer

id: TAMQ-WP-0009-T02
status: done
priority: high
state_hub_task_id: "6973e046-f8b3-50d1-958b-4216af656624"

Add a small terminal-local editor that displays @recipient: , accepts literal UTF-8 prose, handles backspace and Ctrl-U, cycles recipients on Tab without losing the draft, submits on Enter, and restores terminal settings on every exit path. Ctrl-C cancels without queuing a message.

Prove and document the interaction

id: TAMQ-WP-0009-T03
status: done
priority: high
state_hub_task_id: "85b8bb9f-cf0d-5d95-9598-1cec8449ac17"

Cover recipient ordering, shim metadata, non-TTY rejection, punctuation, editing and cancellation with pseudo-terminal tests. Run the full checks, install the build, exercise the composer in the live two-window session, and update README and SCOPE.

Completion evidence

  • make check: 109 tests passed, including pseudo-terminal coverage for literal apostrophes, recipient cycling with draft preservation, UTF-8-aware backspace, Ctrl-U, Ctrl-C, and terminal restoration.
  • Coverage: 76% overall and 76% for the new composer module.
  • make install: installed tmux-amq==0.1.0 and refreshed the live session's tamq-owned command shims.
  • Live flex-auth composer: delivered What's up? WP0009-live-smoke without shell quoting, then retained cycle-draft while Tab changed the visible recipient from @audit-core: to @railiance-platform: . Ctrl-C cancelled that draft. The controlled smoke message was acknowledged; existing user messages were not.