Skip to content

rust-cli-template phase 2: catch up with the canon and with scribe - #20

Merged
danieljhkim merged 2 commits into
agent-mainfrom
orbit/ORB-26712-af449fc6
Nov 22, 2026
Merged

danieljhkim merged 2 commits into
agent-mainfrom
orbit/ORB-26712-af449fc6

Conversation

@orbit-agent-01

Copy link
Copy Markdown
Contributor

Task

ORB-26712 — rust-cli-template phase 2: catch up with the canon and with scribe

Description

Phase 2 ("Canon") of the Rust CLI template redesign: everything in the design's Shape 4.

The template was last brought up to the canon on 2026-09-26. It pins STD-02@3 and STD-04@1 while the canon is at STD-02@4 and STD-04@2, and it does not adopt STD-06, STD-08 or STD-09. scribe, made from the template on 2026-11-02, fixed four shared-code defects the template never received.

Change

  1. Re-vendor the standards at the canon's current versions and adopt STD-06, STD-08 and STD-09 as well (Daniel settled that new projects adopt all three by default although they are draft). The adopted set becomes STD-01, STD-02, STD-03, STD-04, STD-05, STD-06, STD-08, STD-09. Use the standards.sync plugin tool, or the umbrella's operations/scripts/sync-standards.sh --adopt <full list>; never hand-edit docs/standards/ or the managed block in AGENTS.md. Bring the code and docs into line with the new rules of STD-02@‍4 and STD-04@‍2 that the template demonstrates.
  2. A README.md that meets STD-09, keeping the template-only note scripts/rename-template.sh strips.
  3. A licence file matching the MIT that Cargo.toml declares, in the form other public constellation-works repositories use (MIT License, Copyright (c) 2026 constellation-works contributors).
  4. The scope-track design template (1_scope.md, STD-06 §R2) beside the full-track templates under docs/design/.
  5. Grouped root help: commands grouped under headings with one-line summaries, as scribe and Orbit both built, plus a test that fails when a summary is longer than the limit. Read scribe's implementation (constellation-works/scribe, root help summaries and groups) and port the mechanism, not scribe's commands.
  6. scribe's four shared-code fixes: make deny falls back to a writable advisory-database path; a help-width helper keeps piped --help output independent of the machine; a table row with blank trailing cells no longer ends in padding; store/fsio.rs gains bounded reads, a directory listing and a private remove. Compare with scribe's Makefile, output/table.rs and store/fsio.rs.
  7. Remove the private task ids the shipped docs cite today, and add a gate (a script under scripts/ run by make ci) that fails when a tracked file outside docs/standards/ contains ORB-<digits>.

Not in this task: the grouped-help rule itself as a standard. That is a standards friction against STD-01 in the umbrella, filed separately.

Design: docs/design/rust-cli-template/1_scope.md in the constellation umbrella (Accepted, constellation 574df86; Daniel, 2026-11-21: "Approve as recommended"). Phase 1 (ORB-26696) made this repository the source of the template, and ORB-26697 onboarded it as ws_rust-cli-template. This repository is public: keep private task ids (ORB-…) out of every shipped file.

Approval: tagged no-auto-approve. The constellation captain (ORB-26697) owns this workspace (Daniel, 2026-11-22: "Const captain") and approves it explicitly, quoting his 2026-11-16 words, once ORB-26710 has landed.

Also, from the about.md change that landed first: the README line under the template-only note now states the template's own summary, and a renamed copy keeps it, so a new repository's README describes the template. In the STD-09 rewrite, keep the template's summary inside the template-only note and leave a placeholder summary line for the copy, matching the placeholder card rename-template.sh writes.

Acceptance Criteria

  • docs/standards/README.md and the managed block in AGENTS.md pin the canon's current versions for STD-01, STD-02, STD-03, STD-04, STD-05, STD-06, STD-08 and STD-09, and sh docs/standards/check.sh exits 0.
  • README.md meets STD-09 and still carries the template-only note; a licence file states the MIT licence that Cargo.toml declares.
  • docs/design/ holds a scope-track 1_scope.md template beside the full-track templates.
  • Root --help groups commands under headings with one-line summaries, and a test fails when a summary exceeds the limit.
  • Each of scribe's four fixes (deny database fallback, help width independent of the terminal when piped, no trailing padding after blank trailing cells, fsio bounded reads, listing and private remove) is present with a test or a gate run that shows it.
  • A gate run by make ci fails on a tracked file outside docs/standards/ containing ORB- followed by digits, and git grep -nE 'ORB-[0-9]+' -- . ':(exclude)docs/standards' finds nothing.
  • make ci passes, and on a scratch copy scripts/rename-template.sh demo-cli followed by make ci passes.

Execution Summary

Click to expand

Phase 2 is ready for the pipeline. Strict Linux CI passed in the template and in a fresh checkout renamed demo-cli.

  1. Re-vendored the canon at 026de8f5eca4d47f9904a4bad40d994b33ac85f6 using the umbrella sync script. Both pins list STD-01@‍2, STD-02@‍4, STD-03@‍2, STD-04@‍2, STD-05@‍1, STD-06@‍1, STD-08@‍2 and STD-09@‍1. The standards integrity check passed in both checkouts. The plugin sync call had refused the session capability, so the requested CLI script performed the sync.
  2. The STD-09 README has a centered name, tagline, manifest-version and MIT badges, an install and first result, and links to the user guide, configuration, feature board and release history. It passed the size and link gate (49 lines, 228 words, 8 local links). LICENSE matches satellites' MIT text byte-for-byte. The rename exposes the same project-summary placeholder in README.md and about.md.
  3. Added the scope-track template beside the full track. The feature board is generated from entry frontmatter and checked in CI. The negative controls rejected an unknown stage and a broken README anchor.
  4. Piped root help lists Notes and Help. Group summaries come from clap's declarations and have a 70-character one-line limit. The boundary test rejected a 71-character mutation. The only golden diff adds/replaces the root headings. Piped output compared equal with and without COLUMNS and through the built-in help command.
  5. The advisory gate switches to a repository-local cache when the default advisory location is unwritable. A stub exercised config forwarding and policy retention. Real cargo-deny passed with a read-only diagnostic parent and created the fallback DB lock. The renderer omits blank trailing padding and empty color escapes. fsio bounds lock-holder reads at 1 KiB and supplies sorted listing and checked durable removal. Regressions for the help groups, padding, oversized lock holder and advisory fallback failed before their fixes and passed after. Listing/removal tests cover ordering, repeated removal, links and writable state.
  6. Removed private task IDs from public design and test material. The requested tracked-file git grep and its untracked-inclusive variant both exited 1 with no matches. In a scratch checkout, make ci rejected a synthetic ID added to a tracked README. The vendored canon is excluded by the guard.
  7. Passed make ci-fast, make ci-lint and make goldens within strict make ci (CI=true STANDARDS_STRICT=1). The template ran 137 tests and one doctest. The fresh demo-cli scratch copy ran 136 tests and one doctest after scripts/rename-template.sh demo-cli. The first copy exposed a pre-existing self-test dependency on the deleted renamer. The renamer now removes its dedicated integration test from the copy. Both runs passed the three golden tests and used real cargo-deny and nextest. make goldens UPDATE=1 passed and the root golden was reviewed. Native macOS checks were not run on this Linux host. The GitHub matrix covers macOS.

Reconciliation: baseline c7d24df, clean working tree and index. HEAD and index remain at the baseline. Delivery includes the synced standards; public README, licence, usage/development and design docs; Make and script gates; CLI/core implementation, tests and root golden. Companion changes outside selectors cover architecture and about metadata, the feature board and conventions, help module and re-exports, typed color and its callers, core lock regression and lint reasons, additional script/golden tests and the template-only rename test. No unrelated changes or scratch output outside .orbit/tmp. Staged and non-vendored whitespace checks passed, including untracked additions. Full git diff --check flagged one canonical blank line at EOF in docs/standards/STD-04-testing-and-verification/why.md:199. The vendor is byte-identical to canon and its checksum passes.

The design decisions record public-reference handling for STD-06 and retained human diagnostics for STD-08. The umbrella's operations/scripts/new-rust-cli.sh still passes its old five-standard adoption list to sync after export. That cross-workspace caller was outside this checkout. The phase 3 handoff already owns routing the caller update. The template and its direct rename path both retain all eight standards.

Evidence: canon-validation/template-ci.log, canon-validation/demo-ci.log, canon-validation/negative-controls.log and canon-validation/deny-fallback.log.

Validation

  • Not reported

Branch Freshness

  • Base ref: refs/remotes/origin/agent-main
  • Head ref: orbit/ORB-26712-af449fc6
  • Behind base: 0
  • Ahead of base: 1

Orchestrated-By: opus

orbit[gpt-6.2-sol] and others added 2 commits November 22, 2026 00:08
rust-cli-template phase 2: catch up with the canon and with scribe

Phase 2 is ready for the pipeline. Strict Linux CI passed in the template and in a fresh checkout renamed demo-cli.

Orbit-Task: ORB-26712
Orchestrated-By: Orchestrated-By: opus
Manifest verified: attempt_id matches, HEAD equals candidate.commit c19725b, base.commit c7d24df is an ancestor of HEAD, and required_validation_commands is present and empty. There was no prior report or history. Acceptance criteria checked against the diff: the standards pins for STD-01@‍2, STD-02@‍4, STD-03@‍2, STD-04@‍2, STD-05@‍1, STD-06@‍1, STD-08@‍2 and STD-09@‍1 match in README.md and AGENTS.md, and check.sh passes. README passes check-readme.py and I read it against the STD-09 length, header, required-section and link rules. LICENSE is MIT with the specified copyright, and Cargo.toml declares MIT. The scope-track 1_scope.md sits beside the full-track templates. Root help is grouped under Notes and Help, and the summary-length test covers every command and checks each visible root row exactly once. Piped help is byte-identical under COLUMNS 12, 40 and 200, and under a pty with stderr and stdin on a TTY while stdout is piped; clap's wrap_help feature is off in the locked tree. The blank-trailing-cell table fix, the deny cache fallback (exercised by a stub-driven test), the bounded lock-holder read, and the listing and private-remove helpers each have a test. The ORB-digit guard exits 1 when a planted id is added to README.md and exits 0 once the file is restored, and git grep finds nothing outside docs/standards. One low defect was found and repaired: list_dir discarded inspect_dir's does-not-exist answer and returned an I/O NotFound error for a missing directory. I added a regression test that failed before the fix and passes after, and list_dir now returns an empty listing. On the fixed tree, make ci-fast, make ci-lint and make goldens pass; the focused core lib and store tests (58), the tmpl-cli lib, cli, scripts and rename_template tests (77), and the doctests pass. A scratch copy renamed with rename-template.sh demo-cli passes ci-fast, ci-lint and goldens, and its script removed itself. Not run here: the full make test and make ci blanket suite, which the review policy excludes; the implementer's canon-validation/demo-ci.log predates the list_dir fix. macOS was not run on this host, and the hosted CI matrix covers it. Judgement calls: a missing directory lists as empty, matching how remove_private treats a missing file; scribe's no-follow read_bounded_beneath (a scaffold read) was not ported, since the template has no scaffold read and its generic bounded read guards the lock holder.

Repaired findings: F1.

Changed paths: crates/tmpl-cli-core/src/store/fsio.rs, crates/tmpl-cli-core/src/store/tests/fsio.rs.

Orbit-Task: ORB-26712
Orbit-Review-Attempt: rvw-12f33389f3d9-1
Orbit-Review-Crew: haiku
@danieljhkim
danieljhkim merged commit b3d2772 into agent-main Nov 22, 2026
3 of 4 checks passed
@danieljhkim
danieljhkim deleted the orbit/ORB-26712-af449fc6 branch November 22, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants