fix(explain): resolve console-script name, greening the rubric gate#1
fix(explain): resolve console-script name, greening the rubric gate#1OriNachum wants to merge 4 commits into
Conversation
`teken cli doctor . --strict` failed its `explain_self` bundle (25/26),
turning the CI `lint` job red on every PR regardless of content. The
rubric derives the CLI's self-name from the `[project.scripts]` entry
point (`fleet`) and probes `explain fleet`, but the catalog only keyed
the distribution name `("fleet-cli",)`.
Register both spellings against the root entry, and pin the invariant in
pytest so it surfaces in the fast suite rather than only in the slow gate.
Drive-by: the `explain` remediation hint told the reader to run
`fleet-cli explain fleet-cli` — `fleet-cli` is the distribution name, not
a runnable command, so the hint led to "command not found". It now names
`fleet explain fleet`, which is executable.
Also expands CLAUDE.md from the scaffold seed into full repo guidance.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CjyqmVt8wog8m6xGtWGYND
Colleague review: the previous form relied on transitivity (`fleet == fleet-cli`, then `bare-root == fleet`) to establish that the distribution-name spelling matches the root entry. Compare each spelling to the bare-root rendering directly instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CjyqmVt8wog8m6xGtWGYND
|
/agentic_review |
PR Summary by QodoFix
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1.
|
`uv run fleet-cli whoami` and `uv run fleet-cli learn` both failed with "command not found": `fleet-cli` is the distribution name, while `fleet` is the sole `[project.scripts]` entry and therefore the only runnable command. Name the console script, and say so explicitly so the split does not surprise the next reader. Verified by executing all three forms (`fleet whoami`, `fleet learn`, `python -m fleet whoami`). The broader reconciliation of `prog=` and the ~30 `fleet-cli <verb>` usage examples is tracked in #2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CjyqmVt8wog8m6xGtWGYND
Qodo review: registering ("fleet",) as a root alias permanently occupies
that command-path tuple, because resolve() does exact-tuple lookup. The
guidance added in this PR then offered `fleet` as an example noun-group
name — following it would overwrite the root alias and re-break the
rubric's explain_self bundle.
Take the doc-only mitigation. The collision is inherent to the rubric,
not to the catalog's lookup scheme: explain_self probes `explain <console
script>` and requires the root entry back, so no aliasing mechanism can
serve both root docs and a `fleet` noun's docs from that path.
Reserve the name in the catalog comment and in CLAUDE.md, and steer the
drone-fleet noun to `drone`/`swarm`/`mission`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CjyqmVt8wog8m6xGtWGYND
|



Why
The CI
lintjob runsuv run teken cli doctor . --strict, and that gate wasred on
main— 25/26 bundles. Because it is red for reasons unrelated to anygiven change, every PR opened against this repo inherited a failing lint job,
docs-only ones included. This unblocks the lane.
The failing bundle was
explain_self. The rubric derives the CLI's self-namefrom the
[project.scripts]entry point —fleet— and probesexplain fleet.The catalog only keyed the distribution name,
("fleet-cli",), so the probeerrored.
What changed
fleet/explain/catalog.py— register("fleet",)alongside("fleet-cli",); both key the root entry. Gate goes 25/26 → 26/26.fleet/explain/__init__.py— theexplainremediation hint told thereader to run
fleet-cli explain fleet-cli.fleet-cliis the distributionname, not a console script, so following the hint produced a
"command not found". It now names
fleet explain fleet, which is executable.tests/test_cli.py—test_explain_self_name_matches_console_scriptpinsthat both spellings render identically to the bare root. The pre-existing
test_every_catalog_path_resolvescould not have caught this: it walkscatalog keys → commands, never the reverse, so a missing key is
invisible to it.
CLAUDE.md— expanded from the scaffold seed into full repo guidance(CLI contracts, noun-group specialization checklist, test-module map, the
fleetvsfleet-clisplit, mesh identity, rubric invariants).README.md— the quickstart printeduv run fleet-cli whoamianduv run fleet-cli learn, neither of which runs. Both now name the consolescript, and a line states the split outright. Verified by executing
fleet whoami,fleet learn, andpython -m fleet whoami.Verification
Ran the exact CI matrix locally, all green:
black --check/isort --check-only/flake8/banditmarkdownlint-cli2teken cli doctor . --strictpytest -n auto --cov=fleetThe remediation hint was executed verbatim to confirm it resolves:
fleet explain fleet→ exit 0.Reviewed by colleague
ask-colleague review(read-only, isolated worktree) found no blocking bugs andendorsed the dual-key approach over collapsing
prog=. Two notes came back:distribution-name spelling to the root entry; it now compares each spelling
to the bare-root rendering directly.
fleet-cli explain fleet-cliexamples in the_EXPLAINcatalog body andlearn.py. Doing only those two would make the surface less consistent,not more: all ~30 usage examples across the catalog and
learnare spelledfleet-cli <verb>, and none of them run. Reconciling that properly meanschanging
prog=too, which several tests pin (usage: fleet-cli,subject == "fleet-cli","fleet-cli doctor"). That is a separate,deliberate change — documented in
CLAUDE.mdand tracked in Reconcile thefleetvsfleet-clinaming split #2.Scope note
This bundles a code fix with the
CLAUDE.mdrewrite because they are coupled:the doc's "Known failing check" section existed to describe precisely the bug
this PR fixes, so landing one without the other ships a stale document.
Found along the way
fleetvsfleet-clinaming split #2 — the fullfleet/fleet-clireconciliation (prog=andthe ~30 usage examples that don't run).
recall+rememberskills #3 —docs/skill-sources.mddocuments 12 skills, but 14are vendored on disk;
recallandrememberhave no provenance rows, eventhough both
SKILL.mdfiles point at that ledger for their provenance. PerCHANGELOG.mdthey came fromeidetic-cliin 0.4.0. Not reconciled here: theupstream version and last-synced date are facts to be recorded by whoever
vendored them, not guessed by a reader. Noted in
CLAUDE.md.devex pr lintreports oneuser-dotfile-referenceviolation inCHANGELOG.md. It is pre-existing onmain(the lint scans whole files, not the diff) and sits in prose describinga path that is home-dir by design. Rewriting a shipped changelog entry to
satisfy a lint rule seemed worse than leaving it.