Skip to content

feat(prism-code): CLI groups named after the modules (Part of #441) - #625

Merged
afflom merged 14 commits into
mainfrom
claude/project-thread-jbxsn0
Nov 12, 2026
Merged

afflom merged 14 commits into
mainfrom
claude/project-thread-jbxsn0

Conversation

@afflom

@afflom afflom commented Nov 12, 2026

Copy link
Copy Markdown
Member

Requested by Alex · project thread

Stacked on #614. This branch contains #614's commits. Merge #614 first, after which this diff shrinks to the one commit 89e9e9d.

Why

#441's done-when says the CLI groups match the module names. Four v0.5 workstreams add CLI verbs at the same time: images (#622), containers/volumes (#620), system/auth (#621), and later the Rust groups. If each of them edited bin/prism-code.mjs, they would all conflict on it.

What

  • prism-code <module> <verb> dispatches through src/cli/index.mjs to one file per module (src/cli/images.mjs, src/cli/containers.mjs to start). A workstream adds verbs only to its own file.
  • A verb is { flat, usage, summary } (the same command as a flat verb), { run, usage, summary }, or a function together with a verbatim help block. A file may export aliases for top-level spellings (e.g. login → auth login); these join BUILTINS, so they shadow plugins.
  • To start: images build|inspect|pull|push|verify and containers run|rm|inspect name the existing flat verbs, which stay.
  • prism-code images alone is a usage error (64) that names its verbs. prism-code images --help prints the group.
  • The developer surface reads a group line's verb as the word after the module, with place prism-code images push, so the glossary checks it as push. developer-surface.json is regenerated, and cargo xtask check-developer-view passes (150 names, 2 aliases).
  • Allowance file cli-module-groups.json (8 KiB, about 4.5 KiB used), plus a CHANGELOG entry and a STABILITY row.

Test

npm test in sdk/npm/prism-code: 862 pass, 1 fail. The failure is reference-archives.test.mjs, which fails locally on main too (sdk/npm/testing can't resolve prism-code). The new test/cli-groups.test.mjs passes 4/4.


Generated by Claude Code

…iew's glossary (#347)

The developer view of #346 is declared once, as the LexLean model
bindings/src/Foundation/Views/V1/Developer.lex.tex: the Docker-aligned
terms over the canonical terms they name, the other words of the surface
and the deprecated aliases. Its certified export is vendored into xtask,
and `cargo xtask check-developer-view` (part of `cargo xtask validate`)
runs it over sdk/npm/prism-code/developer-surface.json, refusing a name
outside the glossary, a canonical term the view renames, a Docker verb
taken before Prism has its behaviour, and an undeclared alias. The model
renders docs/developer-glossary.md.

A prism-code test keeps developer-surface.json equal to the CLI help, the
delegated verbs and the client. The check found two canonical terms on the
surface, now renamed with deprecated aliases through 0.8 that each print
one warning: `history` is `record`, and `--holo` (replay, dev) is
`--image`. Verbs handed to prismpm keep prismpm's flags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N4k8eo7mrfwURU1WM
…#347)

check-developer-view compares docs/developer-glossary.md byte for byte with
the page the model renders, so a CRLF checkout would report drift. Pin it
to LF, as COMPLIANCE.md is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N4k8eo7mrfwURU1WM
…nt (#347)

The glossary maps the developer view's words onto the canonical terms and
names the issues that build the waiting verbs, as docs/vocabulary.md maps
the docs' terms onto the repository's names, so it is excluded with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3N4k8eo7mrfwURU1WM
# Conflicts:
#	sdk/npm/prism-code/scripts/check-package.mjs
#	sdk/npm/prism-code/test/package.test.mjs
`prism-code <module> <verb>` dispatches through src/cli/index.mjs to one
file per module, so each workstream adds verbs to its own file and never
to bin/prism-code.mjs. `images build|inspect|pull|push|verify` and
`containers run|rm|inspect` name the flat verbs, which stay. A group file
may also give its verbs as functions with a verbatim `help` block, and
`aliases` for top-level spellings (`login` for `auth login`).

The developer surface reads a group line's verb as the word after the
module, so `images push` is checked against the glossary as `push`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QVSkS6PGopegNeztG
@afflom afflom self-assigned this Nov 12, 2026
afflom pushed a commit that referenced this pull request Nov 12, 2026
… (Part of #446)

Merges the group dispatcher branch (#625), adds system and auth to FILES
in src/cli/index.mjs, and regenerates developer-surface.json;
check-developer-view passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3P3wYbBfAqXcoqi2cd
…and own src/cli/

cli.json is compared with the verbs --help prints, so the two group words
join it, and the generated skill table follows. src/cli/ is owned by the
client, which composes the modules, with the same entry as #621.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QVSkS6PGopegNeztG
…its module

When a module's file aliases the module's own name (images for images ls),
prism-code images inspect x is still the group verb; the alias applies only
when no group verb follows and no --help is asked for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QVSkS6PGopegNeztG
The deadline test reads /proc/<pid>/stat to see that the timed-out
descendant stopped. When the kernel reaps it between open and read, the
read fails with ESRCH (seen in Model & Audits on #614, run for 2813675),
which means the same as ENOENT: the process is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3QVSkS6PGopegNeztG
afflom pushed a commit that referenced this pull request Nov 12, 2026
…es, tag and rmi (Part of #442)

Merges the CLI group dispatcher (#625, on #614) and adds the image store verbs
to src/cli/images.mjs: `images ls` (also `prism-code images`), `tag`, `rm`
(also `rmi`) and `prune`. `prism-code pull` keeps what it verified in the
local image store under the name it was pulled by, and `prism-code push
<reference>` with no holo sends the stored image of that name.

The developer view's glossary marks images, tag and rmi as now (#349 is
here), adds ls and usage to its words, and the bindings are re-exported.
OC-12 now counts the CLI test. Suites that pull through the CLI keep their
store in a scratch folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3NmrRTpngJ3TFNocur
@afflom
afflom merged commit b39812a into main Nov 12, 2026
28 checks passed
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