Repository navigation
docs(minimal): T32 — One command model, its help, completions and reference - #3700
Draft
minimal-foundry[bot] wants to merge 3 commits into
Draft
minimal-foundry[bot] wants to merge 3 commits into
minimal-foundry[bot] wants to merge 3 commits into
Conversation
…ence Five tests check that every min box, session and task verb and flag is in the one command model, in --help and in the shell completions. They also check the CLI reference and the one migration note. The noun help lines now say what each noun does.
Add a reference section for each box verb and each type-noun alias, and one migration note in the sessions concept page for the old spellings.
The task puts the old spellings in one migration note in docs/concepts/sessions.md. The T31 docs check now skips only that section and still rejects the old spellings everywhere else.
Contributor
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T32 — One command model, its help, completions and reference
slice: S8
kind: task
covers: BCLI-026, BCLI-028, BCLI-044, BCLI-043
size: M
est: 150 code, 300 tests
executor: agent
difficulty: routine
model: standard
diagnostics:
min box --helplists every verb with one line on what it does, andmin box <verb> --helplists its flags, pinned by help_and_completions_from_one_modelobservability: the command's existing tracing span records the verb, the box id it resolved and the outcome
layers:
- client:
- crates/minimal/src/cli.rs: the verb's arguments and help in the one command model
- crates/minimal/src/completions.rs: completions come from the same command model as the help
- crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
test: cargo nextest run -p minimal box_verbs_exist_with_arch_flags
test: cargo nextest run -p minimal help_and_completions_from_one_model
test: cargo nextest run -p minimal cli_reference_documents_box_grammar
test: cargo nextest run -p minimal docs_name_aliases_only_in_one_migration_note
test: cargo nextest run -p minimal setup_zed_unchanged
- docs:
- docs/reference/cli-min.md: documents every
min box, session and task verb- docs/concepts/sessions.md: carries the one migration note that names the old spellings
produces: none
consumes: none
proof:
min box --helpand the shell completions list every verb and flag, and the CLI reference documents each one.depends on:
- blocked by #2913
- blocked by #2893
- blocked by #2915
- blocked by #2908
- blocked by #2909
- blocked by #2921
- blocked by #2917
Proof
min box --help,min session --helpandmin task --helplist every verb with one line on what it does. Eachmin <noun> <verb> --helpand the shell completion ofmin <noun> <verb> --list the same flags, because both come from the one clap command model. docs/reference/cli-min.md now has a section for all 17min boxverbs and for eachmin sessionandmin taskalias, and the tests fail if a verb or flag goes missing from any of them. docs/concepts/sessions.md has the one migration note for the old spellings and--provider local-minimald.Notes from the agent: The verbs and flags were already in the command model, so the code change in cli.rs is only the help lines of
min box,min sessionandmin task. completions.rs needed no change: completions already run through clap_complete overCli::command, the same model as the help, and help_and_completions_from_one_model now pins that. Gap against BCLI-026:min box runstill has no--name(BCLI-069). The comment on TaskRunArgs defers it to #3196, becauseRunEntryin task.rs takes no name, and task.rs is outside this task's layers. box_verbs_exist_with_arch_flags does not assert--nameonbox run. Observability: the task asks for the verb, the resolved box id and the outcome on the command's tracing span. The dispatch code is in main.rs and cmd/boxes, outside the layers, so I did not change it. Not done:just lint-prose(vale is not installed on this box) andjust clippy-strict.cargo clippy -p minimal --all-targetsis clean. Docs drift I saw but did not fix: thesession attachsection in cli-min.md still says an ambiguous bare attach opens a picker. BCLI-032 says it fails with exit 2 and lists the candidates. I did not check which behaviour the code has.Tests
cargo nextest run -p minimal box_verbs_exist_with_arch_flagscargo nextest run -p minimal help_and_completions_from_one_modelcargo nextest run -p minimal cli_reference_documents_box_grammarcargo nextest run -p minimal docs_name_aliases_only_in_one_migration_notecargo nextest run -p minimal setup_zed_unchangedVerify
min task run agent-verifyexited 100, so this PR is a draft.Closes #2922