Skip to content

docs(spec): require discoverable, scoped CLI controls - #6491

Merged
josephfarina merged 1 commit into
docs/compiled-topicsfrom
docs/no-hidden-cli-behavior
Sep 24, 2026
Merged

josephfarina merged 1 commit into
docs/compiled-topicsfrom
docs/no-hidden-cli-behavior

Conversation

@josephfarina

@josephfarina josephfarina commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

How must supported CLI behavior be exposed and scoped, and when is a behavior-changing global control justified?

Existing authority searched

AST-017 already owns CLI compatibility and complete response projections. No current claim requires supported behavior to be discoverable or sets an evidence bar for global controls.

Decision

Supported CLI behavior is public whether it is automatic or caller-controlled. Commands and options appear in generated help and the machine-readable manifest. Automatic behavior and other controls appear there or link directly to consumer documentation.

Astryx does not use environment variables as interfaces, including aliases for documented controls. An environment variable is Astryx-owned when Astryx defines its semantics, regardless of its name or prefix. Automation uses the documented programmatic API.

Invocation-scoped behavior belongs on the nearest command, command group, or API that owns it. A behavior-changing control may be global only when one stable invariant has meaningful, non-no-op behavior for every command, a demonstrated supported-consumer need cannot be met with narrower scope, and a manifest-derived command matrix verifies every command.

Cross-cutting guarantees define an exhaustive trust or side-effect boundary and fail closed for new extension points. Work suppressed by a safety or reduced-capability mode is visible in machine and text results, or the operation returns a stable error and nonzero exit before writes. Programmatic controls are explicit per-call inputs. Equivalent CLI and API controls have the same values, defaults, behavior, and errors.

Rejected alternatives

  • Using an environment variable as a documented or undocumented control.
  • Treating a hidden rollout gate as the user interface.
  • Making a control global because root parsing is convenient or several implementations share a switch.
  • Letting unrelated commands silently ignore a global control.
  • Using broad names such as safe, secure, trusted, or isolated instead of naming the exact capability.
  • Proving a cross-cutting guarantee with a sample of known loaders.
  • Returning an ordinary-looking partial result after intentionally suppressing work.
  • Using ambient mutable process state for a programmatic control.

Claim scope and non-goals

This adds linked public-control quality claims to AST-017. It does not choose migrations for existing environment controls, authorize a specific global interface, change CLI runtime behavior, or require a Changeset.

Evidence and implementation relationship

The generated command manifest provides the exhaustive command set needed to verify a proposed global control. This specification sets the policy and evidence requirement without approving or prescribing an implementation.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • No internal mechanism is made public; environment variables are prohibited, and rollout gates are discussed only as private availability controls.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable policy decision, not a review transcript or rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge
  • pnpm check:repo
  • pnpm -F @astryxdesign/cli exec tsc --project tsconfig.api-dts.json
  • pnpm lint:strict
  • pnpm exec vitest run packages/cli
  • Prettier
  • git diff --check

@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Sep 24, 2026 12:11am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 23, 2026
@astracat-bot

astracat-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Sep 24, 2026, 12:20 AM UTC

@josephfarina
josephfarina force-pushed the docs/no-hidden-cli-behavior branch from f01f3ef to 996503c Compare September 23, 2026 23:39
@josephfarina
josephfarina force-pushed the docs/no-hidden-cli-behavior branch from 996503c to 561be4e Compare September 23, 2026 23:53
@josephfarina josephfarina changed the title docs(spec): prohibit hidden CLI behavior docs(spec): require discoverable, scoped CLI controls Sep 23, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval is waiting on a maintainer decision for the new spec claims in this PR.

This change adds FR14 to FR18 and DEC-5 to DEC-7 to AST-017: supported CLI behavior must be discoverable, Astryx-owned environment variables are prohibited, global controls must prove meaningful behavior for every command, cross-cutting guarantees must close their boundary, suppressed work must be observable, and programmatic controls must be explicit per call. The PR itself notes no current claim covers this, and the base spec confirms that gap, so a maintainer approval owner needs to adopt this exact scope as the governing spec — including the ban on environment variables for any purpose and for private hooks — identify a different governing spec, or say what must change.

No other required fix was found: the change is spec-only, stays within AST-017, and the knowledge, formatting, and diff checks pass. Once the maintainer settles the spec authority, the remaining review is clear.

[Automated review]

@josephfarina
josephfarina merged commit fb48250 into docs/compiled-topics Sep 24, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview — 421813a7 Deployed Sep 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant