Repository navigation
docs(spec): admit CLI surface by tier and keep commands thin over the API - #6604
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
/approve-spec d30737c |
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval recommended. This change accepts AST-042 as the current spec for CLI command admission - tiered bars for top-level commands, subcommands, and options, every command as a thin layer over one documented and tested @astryxdesign/cli/api function, and one shared vocabulary for human-readable output - and carries it into the CLI-surface architecture record as INV20-INV23, with the contributor guide and CONTRIBUTING updated to point at both records.
The spec promotion follows the repository's owner-approval convention for this exact revision, the new rules link AST-017's discoverability and compatibility rules instead of restating them, and the stated current-state gaps (for example theme template calling a function the API barrel does not export) check out against the code. pnpm check:knowledge, pnpm check:repo, and git diff --check all pass, and existing non-conforming modules are honestly listed as known gaps with no migration silently assigned. No changes are requested.
[Automated review]
PR Analysis Report
|
… API Adds AST-042: every command is a thin layer over one documented, tested function in @astryxdesign/cli/api; text output uses only the documented blocks; and new surface is admitted by tier (top-level command needs a current spec, subcommand needs a stated case and code-owner approval, option follows the option rules and AST-017). Amends cli-surface with INV20-INV23: the API subject layout, the adapter as a subject's only access to the environment, thin command handlers, and the closed formatter kit. The contributor guide now points at both.
d30737c to
de340c5
Compare
|
/approve-spec de340c5 |
Exact decision needed
Accept AST-042 as current and amend
architecture:cli-surfacewith INV20–INV23, so that review can block a CLI change that adds surface without the right admission, puts behavior in a command handler, reaches the environment outside an API subject's adapter, or prints text outside the shared blocks.Existing authority searched
architecture:cli-surface(current) owns how a command is invoked, what it may emit, and where its code lives. Its system model already calls a command "parse, call, render", but no invariant made that binding, and nothing covered the API subject layout, adapters, or formatter admission. INV20–INV23 extend that record.spec:AST-017FR14–FR20 own discoverability, environment variables, global options, and configuration. AST-042 links them and does not restate them.docs/contributing/cli-conventions.mdalready had the command tests and the flag rules, but it creates no policy. AST-042 FR4–FR5 make them binding, and the guide now points at both records.Decision
@astryxdesign/cli/api. FR2: that API is documented and tested. FR3: text output uses only the documented blocks; a new block kind needs evidence and is shared by every command. FR4: admission tiers — a top-level command needs a current spec from an approval owner, a subcommand needs a stated case and code-owner approval, an option follows FR5 and AST-017. FR5: option rules, including a decided result for every option pair. FR6: moving surface is an admission at the new tier.api/blogandclients/cli/commands/blog.mjsare the reference code.Rejected alternatives
Claim scope and non-goals
No code or runtime behavior changes. Modules that predate the new rules are listed as known gaps in AST-042's current-state section; this change assigns no migrations. Provider identity and integration lifecycle stay with their own contracts.
Evidence and implementation relationship
The current-state facts come from an inventory of
packages/cliat the base commit:astryx manifest --json), and 28 command docs that name the function they call;theme templatecalls a function that the API barrel does not export;Project,node:fs, ornode:child_process;throwsentry;check:cli-structurechecks each API subject, not each function or command.An independent review checked each claim against the code and checked the reference code against INV20–INV23. Its findings are fixed here: honest verification rows (no mechanical check exists yet for INV21–INV23), FR3 covers authored doc content and large tables through one shared block, and "approval owner" is defined. AST-042's current-state section also states which rules have no mechanical check yet, so a new violation of them fails only in review until those checks land.
Scope
@astryxdesign/cli/apiis already a published export.Validation
pnpm check:knowledgepnpm check:repogit diff --check