Skip to content

I1115 — Completion comes from the command model, not from a second list

Derive shell completion from the same command model the CLI and its documentation already come from, so that a new command is completable without anything being listed.

BLOCKED wave 7 · p2 · implementation profile · parallel safe

Part of two-folder-integration — A repository that adopts Majordomus gains two directories and two lines, and can give them back.

Blocked. This issue cannot start until I1114 is done. The status is derived from that, not declared.

Objective

Derive shell completion from the same command model the CLI and its documentation already come from, so that a new command is completable without anything being listed.

Why

A completion script is the least visible copy of a command list and therefore the one that drifts furthest. It is also the one people notice, because a missing completion reads as a missing feature.

Current state

The CLI is declared once and its reference is generated. Completion, where it exists, is not derived from that declaration.

Desired state

Completion is generated from the command model, refreshed as safe cached state, and never enumerated by hand.

Scope

  • apps/majordomus-cli/src/cli.rs
  • .majordomus/generated

Out of scope

  • A completion script maintained by hand
  • Regenerating completion on the environment-entry path if it costs more than the budget allows

Dependencies

What waits on this

Acceptance criteria

  • Completion data is derived from the command model with no second enumeration
  • A command added to the model is completable after the ordinary generation, with no further edit
  • The refresh is cached state under the control-plane namespace and never a tracked-file mutation
  • Whatever the entry path does for completion stays inside the entry budget

Validation

  • majordomus generate --check
  • bash test/run.sh

Evidence required

  • completion_derived

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Risk

Completion is where a fast path tempts a shortcut list. Deriving it is cheap only if the model is already cached; otherwise the budget decides.

Timeline

started
verified
completed

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I1115.yaml. Read it back with majordomus plan show I1115.