feat(aterm): complete role slugs and seats from the live roster #1243

Merged
coilyco-ops merged 1 commit from aos/claude/vk48-completion into main 2026-08-25 22:59:17 +00:00
Member

Closes #1241.

aterm refused a role that left the roster but could not offer the live ones,
so the seven current slugs stayed invisible until the command ran.

$ aterm <TAB>
devrel    -- Developer Advocate
eval      -- Agent Evaluation Engineer
frontend  -- Frontend Design Engineer
gamedev   -- Game Developer
platform  -- Developer Platform Engineer
sysadmin  -- Systems Administrator
tpm       -- Technical Program Manager

$ aterm sysadmin <TAB>
claude  codex  -- Olaf [he] // frontier
goose          -- Olaf [he]

Seats are scoped to the role, so goose appears for sysadmin and nowhere
else, and a catalogue seat with no native harness (penpot) never completes
into a candidate the launcher would then refuse. Past the seat it is silent,
and flags still fall through to the framework.

The two open questions in the issue

Caching. Measured rather than assumed: the roster read is under 10ms, so
there is no cache and nothing to go stale.

Failure. Completion runs on a keystroke, so it never prints. A missing,
off-PATH, or broken agent-compose yields silence. I verified all three
explicitly, and caught one bad test of my own along the way: an
AGENT_COMPOSE_BIN override is not applied during completion, so my first
attempt was silently exercising the real binary and proving nothing.

Verification

shell/common.sh registers both shells through aterm completion <shell>,
after compinit in zsh because the generated script uses compdef.

I drove an interactive zsh over zpty and sent a real TAB rather than reading
the script and assuming. Role listing, seat listing, and partial-word
completion (aterm plat<TAB> -> aterm platform ) all resolve. bash
registration is confirmed via complete -p; bash-completion is not installed
on this host, and the upstream script requires it, so the bash tab loop itself
is unverified here.

61 Go tests, 76.3% coverage, 717 pytest tests, full pre-commit suite.

🤖 Generated with Claude Code

Closes #1241. `aterm` refused a role that left the roster but could not offer the live ones, so the seven current slugs stayed invisible until the command ran. ```text $ aterm <TAB> devrel -- Developer Advocate eval -- Agent Evaluation Engineer frontend -- Frontend Design Engineer gamedev -- Game Developer platform -- Developer Platform Engineer sysadmin -- Systems Administrator tpm -- Technical Program Manager $ aterm sysadmin <TAB> claude codex -- Olaf [he] // frontier goose -- Olaf [he] ``` Seats are scoped to the role, so `goose` appears for `sysadmin` and nowhere else, and a catalogue seat with no native harness (`penpot`) never completes into a candidate the launcher would then refuse. Past the seat it is silent, and flags still fall through to the framework. ## The two open questions in the issue **Caching.** Measured rather than assumed: the roster read is under 10ms, so there is no cache and nothing to go stale. **Failure.** Completion runs on a keystroke, so it never prints. A missing, off-PATH, or broken `agent-compose` yields silence. I verified all three explicitly, and caught one bad test of my own along the way: an `AGENT_COMPOSE_BIN` override is not applied during completion, so my first attempt was silently exercising the real binary and proving nothing. ## Verification `shell/common.sh` registers both shells through `aterm completion <shell>`, after `compinit` in zsh because the generated script uses `compdef`. I drove an interactive zsh over `zpty` and sent a real TAB rather than reading the script and assuming. Role listing, seat listing, and partial-word completion (`aterm plat<TAB>` -> `aterm platform `) all resolve. bash registration is confirmed via `complete -p`; bash-completion is not installed on this host, and the upstream script requires it, so the bash tab loop itself is unverified here. 61 Go tests, 76.3% coverage, 717 pytest tests, full pre-commit suite. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(aterm): complete role slugs and seats from the live roster (#1241)
All checks were successful
ci / aos-eval-tests (pull_request) Successful in 1m29s
ci / aos-cli-tests (pull_request) Successful in 2m21s
ci / gate (pull_request) Successful in 1m6s
ci / ward-doctor (pull_request) Successful in 4m1s
6aba13c346
aterm refused a role that left the roster but could not offer the live ones, so
the seven current slugs stayed invisible until the command ran. Shell history
carries engineer, ops, creator, strats, director, exec, qa, pm, content, and
advisor against a roster of seven, so completion catches a keystroke earlier
than the refusal does.

`aterm <TAB>` offers the live slugs with their display names. `aterm sysadmin
<TAB>` offers only that role's launchable seats, so goose appears for sysadmin
and nowhere else, and a catalogue seat with no native harness never completes.
Past the seat it is silent, and flags still fall through to the framework.

The issue raised caching as an open question. Measured instead: the roster read
is under 10ms, so there is no cache and nothing to go stale.

Completion never prints. A missing, off-PATH, or broken agent-compose yields
silence, because a shell that interrupts a keystroke with a diagnostic is worse
than one offering nothing.

shell/common.sh registers both shells through `aterm completion <shell>`, called
after compinit in zsh because the generated script uses compdef. Verified by
driving an interactive zsh over zpty and pressing a real TAB, not by reading the
script: role listing, seat listing, and partial-word completion all resolve.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Agent-Role: platform
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-flight-deck/agentic-os!1243
No description provided.