Skip to content

spec(AST-081): global mode, so the CLI answers in any folder and a project's own release answers inside it - #7601

Merged
josephfarina merged 33 commits into
mainfrom
josephfarina/global-mode-spec
Oct 20, 2026
Merged

josephfarina merged 33 commits into
mainfrom
josephfarina/global-mode-spec

Conversation

@josephfarina

@josephfarina josephfarina commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

How the Astryx CLI behaves when a person or an agent installs it once for the computer and runs it in any folder:

  1. Which release answers a run inside a project, and which answers outside one.
  2. What each command does outside a project, and how that is declared and checked.
  3. How a result names the release that answered, and which command name printed commands use.
  4. How a copy installed for the computer stays current, and what it never does to a project.
  5. Where any run may write.
  6. What each release carries for use outside a project.
  7. What a door (the CLI package installed for the computer or run through a package runner, a programmatic host) may pass the CLI, and how.
  8. How every copy of the CLI hands a run inside a project to the release that answers there, and which release that is when the project's CLI and Core differ.

Existing authority searched

Decision

Adds spec:AST-081 (current), FR1–FR12, one verification row each:

  • FR1, one CLI behind thin doors. The CLI package run directly (a project's own, one installed for the computer, or one a package runner fetched) is the CLI itself. A programmatic host carries the Core equal to the CLI it runs and starts it through @astryxdesign/cli/host, a supported API with explicit inputs: arguments, working folder, the door's command name, its package sets and the integrations it approves for use outside a project, resolved by name from the package set that serves the run, in addition to the computer-level integrations FR12 finds there, its own discover sources, and the reason when it declined a project's own CLI. One call per process. No door adds a command, an option, a variable, or behavior; with the same Core, output, exit status, and file changes match across doors.
  • FR2, in a project the project's own CLI answers; without one, the copy that started the run: a project that installs its own CLI is answered by it, whatever its version, and doctor warns when that CLI and the project's Core differ, naming the command that aligns them. A project with no CLI of its own (only Core, or a fresh clone) is answered by the copy that started the run, as before global mode; when that copy is not the Core's release, one text-mode hint after a successful command, at most once a day per project, names the command that adds the CLI at the Core's version, and copy is starting; doctor warns too. Only when the project's own CLI cannot start does the release equal to its Core answer (installed, else the lockfile's, else the newest the declared range allows; a project with no Core is matched by the CLI it locks or declares), from the per-user cache unless the starting copy is that release. upgrade follows the same rule. When the matched release cannot be obtained, the copy that started the run answers, with one standard-error warning and copy: fallback; a failed install is retried after 2 minutes, then after 10 once it fails again in a row; a success forgets it; ERR_VERSIONS_UNAVAILABLE only when nothing can answer. In the next minor release the release equal to the Core answers both a project whose own CLI differs and a project with only Core, as a breaking change (DEC-10).
  • FR3, outside a project, the copy that started the run answers with its own release, as a new project would. Commands that need Core answer from the Core of the answering release, installed into the per-user cache when first needed, or ahead of time by a detached step as a run ends (never in CI and never on Windows, where a command that reads Core installs it on first need), else ERR_VERSIONS_UNAVAILABLE, except an open search, which answers from the rest and says what it skipped (meta.partial); doctor, swizzle, and upgrade never read it. No advice that needs a project.
  • FR4, every command declares same, refuse, or own in its command doc, and astryx manifest publishes it as outsideProject. New refusals use ERR_PROJECT_REQUIRED; released refusal codes stay until a declared minor. doctor checks the computer outside a project; swizzle refuses.
  • FR5, every successful result carries meta.answeredBy (cli, core, copy: project, starting, matched, carried, or fallback), with one standard-error line when the project's own CLI was handed the run or a matched or carried release answered (FR9); a starting run prints only FR2's daily hint. One picker names every printed command: the command the loaded integrations declare as cliCommand, else the door's name, else the package manager's name. Docs and integration text are written with bare astryx and named when shown; JSON stays bare.
  • FR6, the global copy never installs or switches releases itself: once a day it checks the registry in the background and, after a successful command, prints at most once a day that a newer release is available and the exact command to upgrade it; never with --json, after a failure, or when CI is set to a true value or NO_UPDATE_NOTIFIER is set. Projects are never updated; a project that is behind gets the same notice with its own install and upgrade commands. A requested version runs exactly that release outside a project; inside one, FR2 and FR9 decide. A copy a package runner fetches adds no update behavior.
  • FR7, every write lands in a named place: the operation root, the per-user cache, the temporary directory, or the computer-level agent text (written only by its own command). Anything else is refused before writing.
  • FR8, the agent text, the official list, and the project starters ship inside each release, generated from the repository and checked for drift. Every starter scaffolds, installs, and builds with its release.
  • FR9, every copy hands a project's run to the release FR2 names: to the project's own CLI when the project installs one, whatever its version, and to the matched release when that CLI cannot start; a project with no CLI of its own is answered by the copy that started the run, with no hand-off; whatever release the copy is and whatever version was requested; when the matched release cannot be obtained the copy that started the run answers, announced (FR2). Outside a project the global copy answers itself. astryx --help and the manifest's globalMode field point to astryx docs global. At most once, same arguments, folder, streams, exit status; one standard-error line in text mode (printed by the answering release, or by the copy that handed off for a release that predates it), none in JSON.
  • FR10, update notices: at most once a day, after a successful command, a two-line notice with the exact upgrade command; never with --json, after a failure, or when CI or NO_UPDATE_NOTIFIER turns the check off.
  • FR11, who answers: a table of every global/project case, each with its test.
  • FR12, computer-level integrations: integrations installed beside the global CLI or in a door's package set load outside projects; inside a project only the project's own integrations load, and compatible computer-level ones appear in discover as available.

A folder's project is found the way the CLI finds the Core and the CLI it reads (the released read reach), else the nearest package.json declaring either, up to the repository root; a folder nested in another project answers with that project's release.

Amends:

  • spec:AST-047 FR7 and Platform support: text moves start with the command name AST-081 FR5 picks.
  • spec:AST-048 Platform support: printed commands start with the command name AST-081 FR5 picks.
  • spec:AST-051 FR6: a door may pass its own sources, called after the integrations' sources and named as the door's.
  • architecture:cli-surface: a release-choice stage before dispatch, meta.answeredBy in INV2, ERR_PROJECT_REQUIRED and ERR_VERSIONS_UNAVAILABLE in INV3, outsideProject in INV7, the per-user writes outside a project in INV10 (the cache, settings and state, and the skill file with its links or copy), the run-level standard-error lines in INV12 (none under --json), the computer-level agent text in INV13, computer-level integrations loading only outside a project in INV14, the picker's command name in INV22's hints, and its owning code and deciding specs. INV31 now scopes out the computer-level skill file FR8 writes (only init --user and the global copy's background step write it).
  • contributing:cli-conventions: outsideProject in the command doc fields and the checklist.

spec:AST-048, spec:AST-051, architecture:cli-surface, and contributing:cli-conventions are current, so this pull request needs their owners' approval. Approved by josephfarina on 2026-10-19; recorded as current. #7543, #7539 and #7494 have landed.

Relationship to #7412

This record absorbs the host entry's public contract: what a door passes (including the command name, the door's own discover sources, and the reason for a declined hand-off), one call per process, which release answers a hosted run, and what a hosted run prints. architecture:cli-surface INV30 keeps the mechanism: how a package set is matched to a project's pins, how its approved integrations are enumerated (with its INV14 change), what a run records, and that doctor reads only the project's install. To fit, #7412 would:

  • defer its planning outcomes to FR2 and FR3 as amended: a project's own CLI answers its project, whatever its version; a project with only Core is answered by the copy that started the run (for a hosted run, the host's CLI), with FR2's daily hint; the matched release answers only when the project's own CLI cannot start; and the project is the one spec:AST-040 FR9 finds (INV30 plans against the working directory);
  • print its hand-off line once per run, in text mode only, naming the project's CLI that answered and the copy the run started in (FR9); a run started in the project's own CLI prints none;
  • drop its spec:AST-051 FR6 and DEC-2 rewrite, because a door's catalog is its own source here, named as the door's, rather than a replacement under an integration's name.

ERR_VERSIONS_UNAVAILABLE, the unavailable-release code FR2 uses, is the one INV30 introduces.

Both add an entry to architecture:cli-surface's deciding specs, and #7539 inserts INV31 where this pull request extends INV13; whichever lands second keeps both.

Rejected alternatives

  • The newest release answering in every folder. In a project on an older release, its templates and component docs use props the project's Core does not have, and some commands do different things across releases while both exit 0.
  • Falling back to another release when the matching one is unavailable. It brings back the mix FR2 exists to prevent.
  • Refusing every command that needs Core outside a project. Agents without project files could not learn Core.
  • A project, global, or both scope on each command. It cannot express a command with a different job outside a project, or one with modes of each kind.
  • A top-level envelope field for who answered. It changes the envelope every consumer reads; meta does not.
  • An update notice that tells the caller what to run, as most command-line tools print. Agents run printed commands unasked.
  • Fetching the official list, starters, or agent text at run time. They can disagree with the release that reads them, and they fail offline.
  • A door replacing an integration's discover source under that integration's name. Discover would report the door's catalog as the integration's own.
  • A separate launcher package (the common install routes would still answer with their own release; two packages to choose between).
  • The project's own CLI answering whatever its version (keeps the mix in every half-upgraded project).

Claim scope and non-goals

  • Owned here: which release answers, the host entry's inputs, outside-project declarations, who-answered data and printed command names, global-copy updates, the places a run may write, the global assets a release carries, the command-name picker, an integration's declared command (cliCommand), and the hand-off every copy of the CLI makes to a project's own CLI.
  • Referenced, not restated: upgrade's project scope (spec:AST-040 FR9–FR13), the agent-docs layout (INV31), the official list (spec:AST-051 FR11), the package-set mechanism (INV30), and compatibility classification (spec:AST-017, and architecture:cli-surface INV10a for out-of-root refusals).
  • Not decided here: what a project starter contains and the template kind that ships it; the JSON shape of doctor's computer check; whether a folder nested in another project answers for itself (it answers with the enclosing project's release).
  • Per-command values other than doctor and swizzle live in each command's doc, set when the field ships.

Follow-ups (records not amended here)

Each lands with the change that needs it:

  • architecture:cli-surface: optionally an INV2 line that lets a failure envelope name who answered, which FR5 leaves to successful results.
  • architecture:cli-surface INV31: init outside a project writes nothing and points to project starters. That changes released behavior, so it waits for a declared minor.
  • spec:AST-040: FR9's non-goal can note that AST-081 reuses its project search.
  • spec:AST-042 FR4: admission asks for the outsideProject value at every tier.
  • spec:AST-048: outside a project, a project start before the page start, once starters ship.
  • architecture:template-authoring (draft) INV1: the project template kind. spec:AST-035: integration project templates behind a CLI floor.
  • spec:AST-051: the official list flags themes that are not maintained.
  • spec:AST-017: none needed (FR13, FR17, FR18 as above).
  • Next minor release: integration check --strict fails on invalid_cli_command, a malformed cliCommand (FR5); this release reports it without failing, since a new failure code joins only in a minor (architecture:cli-surface INV35).
  • A record that owns the integration manifest's fields, all of them (providerId, the roots, agentDocs, issuesUrl, cliCommand). Until one exists, FR5 defines cliCommand; INV24 already allows an integration-level field, so no current record changes here.
  • contributing:cli-conventions: printed commands go through the picker, and shipped text writes commands bare. It lands with the code.
  • The integration authoring reference documents cliCommand (spec:AST-017 FR14) when the field ships.
  • Consumer docs (cli): the CLI package installed for the computer as a supported global install, and what it does inside and outside a project.

Evidence and implementation relationship

Measured on published 0.6.8 and 0.7.0 and on main:

  • A CLI installed for the computer, run in a 0.6.8 project, scaffolded 5 of 57 page templates that fail typecheck against the project's Core, in both directions; the project's own copy scaffolded none that fail. theme add imports a theme on 0.7.0 and copies its source on 0.6.8, and both exit 0. That copy's doctor told a healthy 0.6.8 project to upgrade Core.
  • Every command's examples ran in an empty folder in about a minute, with no crash. A missing project showed up in six different ways. One fix to where Core is found made swizzle write a component copy into an empty folder, which FR3 and FR4 forbid.
  • A programmatic host matched a project's own CLI on every command example (112 on 0.7.0, 115 on 0.6.8): same exit codes, standard output, and files; only text-mode standard error differed. Outside a project, its hints named the CLI package without a version, and when told a project's CLI was declined it gave install advice that did not apply.
  • In 195 runs across empty folders, home folders, and projects, writes stayed in the working folder except a temporary cache and theme build given an absolute path.
  • A prototype global copy updated in the background with no added time per run, held its notice in JSON mode, ran one install for ten runs at once, and kept answering offline.

The implementation lands separately: the outside-project declaration and its checks, the host entry's inputs and hand-off, the agent text, project starters, and background updates.

Amendment: one picker names every printed command

Exact decision needed

How the CLI names itself in every command it prints or writes: which name wins when an integration, the door that started the run, and the package manager each offer one; what happens when integrations disagree; and which text is written bare and named only when shown.

Existing authority searched

  • architecture:cli-surface (current): INV14 finds and loads an integration manifest; INV24 limits a manifest to roots and integration-level capabilities, never an item catalog; INV22 lets a handler phrase hints with the run prefix. No record lists the manifest's fields. They are defined only by the public AstryxIntegration authoring type and its reference doc.
  • spec:AST-039 (draft) FR3 restates INV24's boundary. spec:AST-031 (draft) owns runtime named exports, which a static command name is not. spec:AST-051 (current) defines the discover named export inside its own record; FR5 follows that precedent and names cliCommand beside the rule it feeds.
  • spec:AST-017 (current) FR14: a caller-settable control that changes output is public surface and needs its accepted values, default, precedence, interactions, and error behavior. FR5 states each for cliCommand. FR19 and FR20 govern astryx.config settings and integration contributions to them; cliCommand is not a configuration setting and has no app value, so FR20's app-level refusal control does not apply, and an app does not override an integration's command.
  • spec:AST-047 FR7 and spec:AST-048 Platform support, as this pull request first amended them, named the project's run prefix whenever the project's own CLI answers. That no longer holds once an integration declares a command or a door hands the run to the project's CLI, so both now take the name FR5 picks.
  • Today's code: one function builds the printed stem, from package-manager evidence only. Many hint, error, and doctor-fix lines, a large share of the command lines in shipped docs, and the setup reminder (printed in three places, two of them at install) spell a fixed command instead. Integrations have no way to supply their command, and their docs and agent-doc lines print verbatim.

Decision

  • FR5 defines one picker for every command the CLI prints or writes. It takes the first that applies: the command the integrations the run loads declare as cliCommand in their manifest; the name the door that started the run passed (FR1); the package manager's name (the project's run prefix when the project's own CLI answers, otherwise a command that runs the answering release). The picked name replaces the command's leading astryx.
  • Integrations that declare the same command agree. When they declare different commands, the picker uses the package manager's name, even when a door started the run, and doctor warns, naming each integration and its command. A malformed declaration counts as absent, never withdraws the integration's other contributions, and doctor warns about it.
  • Covered surfaces: hints and next steps, errors and their suggestions, doctor fixes, help, docs moves, recommended commands, the project's agent-docs block, the computer-level agent text, and the setup reminder wherever it is printed. No surface spells a command name of its own.
  • Docs, guides, agent text, and the text an integration supplies (its docs and agent-doc lines) write every CLI command with bare astryx; the CLI puts the picked name in its place when it prints or writes the text. A step that installs or starts a door by its own name stays as written.
  • Machine-readable output, error envelopes included, carries commands bare.
  • FR5's order changes from "the project's run prefix, then the door's name" to "integration, door, package manager". In a project whose own CLI answers after a door handed it the run, printed commands now name the door. Both orders keep the existing invariant: the printed command, run from the same folder, reaches the same release.
  • FR8's agent text, AST-047 FR7, and AST-048 Platform support take the picked name. The FR5 verification row covers the picker's order, agreement, disagreement, malformed declarations, every printing surface, shipped text, and JSON. DEC-8 records the order.

Rejected alternatives

  • Settling a disagreement by integration order. Load order would choose which tool a project's users are told to run.
  • The door's name ahead of the integration's command. An integration whose users reach the CLI through its own command would lose it whenever another door starts a run.
  • A placeholder token in docs, or per-door copies of the text. Every author would learn a token, copies drift, and bare astryx is already how JSON carries commands.

Notes for the implementation

  • Released CLIs strip an unknown manifest key and keep every other contribution, reporting the key only in the integration's own checks. A package that adds cliCommand loses nothing on an older CLI.
  • The manifest schema types known keys strictly, so a malformed known key withdraws the whole integration today. cliCommand needs the per-field isolation agentDocs already has.
  • Rewriting shipped docs from runner-prefixed commands to bare astryx changes the text of doc content in JSON reads, not its shape. spec:AST-017 classifies that value change with the code.
  • The two install-time copies of the setup reminder run with no door, so they pick from the integration's command and then the package manager's name.

Writing rubric results for the amendment

  • R1 narration: none. FR5 and DEC-8 are present tense; Current-state impact states today's departures in the present tense.
  • R2 research: none. The survey of today's printed commands stays in this description.
  • R3 evidence naming a change: none. The FR5 row names kinds of evidence and failure signals.
  • R4 rejected alternatives: DEC-8 has one Rejected: line; the other two are here.
  • R5 pull request or issue references: none in the records (searched for # plus digits, /pull/, and /issues/).
  • R6 ruled open questions: none added; OQ1 is unchanged.

Validation of the amendment

  • pnpm check:knowledge
  • Prettier on the three changed records
  • git diff --check
  • scripts/check-knowledge.test.mjs (121 tests)
  • pnpm check:repo

Amendment: every copy hands a project's run to the project's own CLI

Exact decision needed

What happens when the CLI package itself, installed for the computer (npm i -g @astryxdesign/cli) or run through a package runner (npx @astryxdesign/cli), starts a run: which release answers inside a project that installs its own CLI, which answers outside a project, what a hand-off must keep, and what it prints.

Existing authority searched

  • spec:AST-081 as first drafted: the doors were the launcher, a programmatic host, and a project's own CLI. FR2 already required a run that starts in another copy to hand off, but the CLI package installed for the computer or fetched by a package runner was not a door, and FR3 named it only as a copy that carries no Core. FR6's update rule covered the launcher. FR5 printed no line for a run of the project's own CLI.
  • spec:AST-081 FR2's upgrade rule: upgrade started in another copy runs the release equal to the project's Core. spec:AST-040 FR13's printed command for an incomplete upgrade, a package-runner command pinned to that Core's version, relies on it.
  • spec:AST-081 FR1: a door passes nothing to the CLI through an environment variable, an option, or a configuration key. Now that the CLI package run directly is a door, that binds the hand-off too.
  • spec:AST-017 FR13 and the record's Current-state impact: which release answers a released install route is a behavior change, classified before it ships.

Measured on published 0.6.8 and 0.7.1

  • With the CLI package 0.6.8 installed for the computer, npx @astryxdesign/cli ran 0.6.8 in every folder, including a project on Core 0.7.1.
  • In a project with Core 0.6.8 and no CLI, npx @astryxdesign/cli fetched the newest release, 0.7.1, which answered with Core 0.6.8.
  • npx @astryxdesign/[email protected] in a project whose own CLI is 0.6.8 ran 0.7.0.
  • In a package with no Astryx inside a 0.7.1 project, npx @astryxdesign/cli fetched the newest CLI instead of running the project's; the two matched only because the project was on the newest release. The project's own npx astryx ran the project's.
  • A CLI package installed for the computer, newer or older than a project's own CLI, answered itself and paired its templates and docs with the project's Core.

Decision

  • New FR9: every copy of the CLI, whether installed for the computer, fetched by a package runner, or carried by a launcher or a programmatic host, that starts a run in a project that installs its own CLI hands the run to that CLI, whatever release the copy is and whatever version the command line asked for. Outside a project, the copy that started the run answers. Exceptions: the copy is the project's CLI, the door declined that CLI (FR2), or the command is upgrade (FR2).
  • A run is handed off at most once and never returns to a copy it left. The project's CLI receives exactly what a direct run would, with nothing added to its environment, options, or configuration, and the run ends with its exit status. A project CLI that cannot start fails the run with ERR_VERSIONS_UNAVAILABLE; no other copy answers in its place (FR2's existing rule).
  • In text mode a handed-off run prints exactly one standard-error line naming the project's CLI that answered and the copy the run started in. JSON runs print none; meta.answeredBy names the project's CLI when that release carries the field. FR5 now says a run started in the project's own CLI prints no line and a handed-off run prints FR9's.
  • Doors now include the CLI package installed for the computer or run through a package runner. The global copy is that package or the launcher. FR1's same-output rule compares runs with the same Core, because a CLI package installed on its own carries none.
  • FR3: outside a project, the copy that started the run answers.
  • FR6 applies unchanged to the CLI package installed for the computer. A requested version, npx @astryxdesign/cli@<version> included, is exact outside a project; inside one, FR2 and FR9 decide. A copy a package runner fetches adds no update behavior.
  • The FR9 verification row's states are the measured cases above, plus a project CLI that predates the hand-off and one that hands off itself, a declined and an unstartable project CLI, a non-zero exit, piped input, outside a project, and text and JSON. FR6's row adds both global installs. DEC-9 records the decision; OQ2 holds the open update question.

What changed for the launcher

  • It is one of two global installs. The CLI package installed for the computer gets the same hand-off and the same update rule.
  • The hand-off is part of every copy, including the one the launcher carries, so the launcher does not need its own project search for it. It still carries Core, chooses the release outside a project (FR6), and supplies the matched release in a project with Core but no CLI (FR2).
  • A run it hands to a project's own CLI prints one standard-error line in text mode. Before this amendment, that run printed nothing.
  • npx astryxdesign@<version> in a project with its own CLI gets the project's release. Outside a project it stays exact.

Contradictions for the owner

  1. "Outside a project, the copy that started the run answers" vs FR6 for the CLI package. FR6 keeps a global copy on latest by installing newer releases into the per-user cache and switching to them, and FR7 allows no other place to write. For a CLI package installed for the computer, the release that answers outside a project after an update is then the cached one, not the files the package manager installed. FR9 reads FR6 that way, and OQ2 holds the choice. The other readings: the package never updates, so a stale copy keeps answering outside projects and wherever a package runner reuses it; or it reinstalls itself, which writes outside FR7, can need administrator rights, and loses the release it switched from. No new update behavior was added.
  2. "The project's pinned version always answers" vs FR2's upgrade rule. If the hand-off also covered upgrade, spec:AST-040 FR13's printed command, which pins the release equal to the project's Core, would hand the run back to the older project CLI. That CLI prints the same command again: a loop, and the codemods never run. FR9 keeps FR2's exception.
  3. FR5's "no line for the project's own CLI" vs the required hand-off line. Settled by this decision: a run another copy hands to the project's CLI prints one line, and a run started in the project's CLI prints none.

Gaps this amendment does not close:

  • A CLI package installed on its own carries no Core, because the CLI declares Core as an optional peer. Outside a project, the commands that need Core still fail with ERR_CORE_NOT_FOUND (FR3, unchanged). Making them work through the plain package needs a packaging change this record does not decide.
  • In a project with Core but no CLI, FR2 (unchanged) still requires the matched release. A package runner's copy of another release answers only if it can obtain that release, and otherwise fails with ERR_VERSIONS_UNAVAILABLE. For some runs that turns today's mixed answer into a refusal, which spec:AST-017 classifies before it ships.

Notes for the implementation

  • A loop guard cannot travel in an environment variable or an option. FR1 forbids it, and an inherited variable would also stop the hand-off in a nested run in another project. Copies on different releases must agree on the project search (spec:AST-040 FR9 and FR11), or a hand-off can bounce; the FR9 check runs a project CLI that hands off itself.
  • Released CLIs predate the hand-off and the who-answered field, so the copy that hands off prints the line, and a run handed to a released CLI carries no meta.answeredBy.
  • In a Yarn Plug'n'Play project, the project's CLI starts under the project's own loader.
  • Only one global astryx command can exist. Installing the launcher where the CLI package is installed for the computer conflicts on that command.

Writing rubric results for the amendment

  • R1 narration: none. FR9, DEC-9, and OQ2 are present tense, and Current-state impact states today's behavior in the present tense.
  • R2 research: none. The measurements stay in this description.
  • R3 evidence naming a change: none. The FR9 row names kinds of evidence and failure signals.
  • R4 rejected alternatives: DEC-9 has one Rejected: line.
  • R5 pull request or issue references: none in the record (searched for # plus digits, /pull/, and /issues/).
  • R6 ruled open questions: none. OQ2 is unanswered and keeps its three options.

Validation of the amendment

  • pnpm check:knowledge
  • Prettier on the changed record
  • git diff --check
  • scripts/check-knowledge.test.mjs
  • pnpm check:repo

Amendment: the project's Core decides the release, and the CLI package is the global install

Exact decision needed

Three choices the previous drafts left open or got wrong once the CLI package itself is a door: which release answers a project whose CLI and Core differ; whether a separate launcher package is still needed; and which release a CLI package installed for the computer answers with outside a project (OQ2).

Existing authority searched

  • spec:AST-081 FR2 as amended: the project's own CLI answers whatever its version, so a CLI 0.6.8 with Core 0.7.0, or a workspace app on Core 0.6.8 under a root CLI 0.7.1, mixes releases. DEC-1 rejects exactly that mix.
  • spec:AST-081 FR6 and OQ2: the global copy updates through the per-user cache, but which copy answers after an update was open.
  • spec:AST-081 FR3 and the previous addendum's gaps: a CLI package installed on its own carries no Core, and a Core-only project needed the matched release only some doors could supply.

Decision

  • FR2: the project's Core decides. The release equal to the project's Core answers (installed Core, else lockfile, else newest release the declared range allows; a project with no Core is matched by its CLI). The project's own CLI answers only when it is that release. Otherwise the matched release answers: the starting copy when it is that release, else the release installed into the per-user cache, and the project's CLI hands such a run to it too. upgrade follows the same rule, so FR2's upgrade exception no longer needs separate words; a project CLI that predates the rule answers for itself and spec:AST-040 FR13 covers its report. DEC-10.
  • The project is found with the released read reach. The Core installed in the folder or four above it (or a workspace's own Core package), the CLI installed in the folder or five above it (or resolved by Plug'n'Play), else the nearest declaring package.json up to the repository root and never in the home folder unless the run starts there. A folder nested in another project answers with that project's release, so reads and the release that answers never disagree.
  • No launcher. The global copy is the CLI package installed for the computer; every copy hands off, so a launcher adds nothing. Doors, FR1, FR6, DEC-9, the non-goals, and FR6's verification row drop it.
  • FR6 and OQ2: the cache answers. Outside a project the global copy answers with the newest verified release kept in the per-user cache; until a check installs one, the installed copy answers. The package manager's installation is never changed. DEC-11; OQ2 is closed.
  • FR3: the carried Core is installed when needed. Outside a project, commands that need Core answer from the Core of the answering release, beside it or installed into the per-user cache the first time a command needs it, else ERR_VERSIONS_UNAVAILABLE. This closes the previous addendum's first gap. The second gap (Core-only projects) is closed by FR2: every copy can install the matched release.
  • FR5 picker step 3 names a command that reaches the release that answered: the project's run prefix when its own CLI answered, astryx when the global copy answered outside a project, otherwise the CLI package pinned to the answering version.
  • FR9 follows FR2: every copy hands a project's run to the release FR2 names. The one standard-error line is printed by the answering release, or by the copy that handed off when the answering release predates the line.
  • FR4: doctor outside a project reports the computer-level agent text only in a release that ships it.
  • FR7: the per-user cache holds the releases global mode installs (matched, newest, carried Core) and the update state.

Contradictions for the owner

  • None left from the previous addendum: its first contradiction is DEC-11, its second (upgrade loop) cannot arise because the pinned command reaches the release equal to the Core and that copy finds itself, and its third was settled there.
  • Classification: a mismatched project CLI, a global copy, and a package runner's copy now hand runs to another release, and commands that read Core succeed outside projects. spec:AST-017 classifies these before they ship; the code change carries a patch changeset.

Writing rubric results for the amendment

  • R1 narration: none. FR2, FR3, FR6, FR9, DEC-10, and DEC-11 are present tense.
  • R2 research: none.
  • R3 evidence naming a change: none. The FR2, FR6, and FR9 rows name kinds of evidence and failure signals.
  • R4 rejected alternatives: DEC-10 and DEC-11 have one Rejected: line each.
  • R5 pull request or issue references: none in the record.
  • R6 ruled open questions: none. OQ2 became DEC-11; OQ1 is unanswered and keeps its two options.

Validation of the amendment

  • pnpm check:knowledge
  • Prettier on the changed record

Amendment: what each door covers today, and the computer-level agent text (DEC-12)

Exact decision needed

Where the computer-level agent text lives (OQ1), and how the record states which of its rules the CLI provides now, given that the programmatic host entry, the official list, and project starters arrive through other work.

Decision

  • Current-state impact states, in the present tense, that the CLI provides FR2–FR9 through the doors that run the CLI package directly, and that FR1's host entry and the clauses that need it (a declined project CLI, door-approved integrations, the door name in the picker, the host line, INV30) arrive with the host entry. The official list is spec:AST-051 FR10's; project starters arrive with the template kind that ships them.
  • FR8 / DEC-12: the computer-level text is one skill file named astryx, in .agents/skills/ and .claude/skills/ of the home folder, written only by astryx init --user and removed only by astryx init --user --remove-agents. Neither touches a file the CLI did not write or follows a link in its place. A skill loads only when an agent uses Astryx, and the two folders reach the common coding agents. Rejected: one always-on instruction file per agent.
  • FR4: doctor outside a project reports whether that text is present and current.

Relationship to other open work

  • The home-folder refusal for a project's agent docs (FR7) and the official package list (FR8, spec:AST-051 FR10) are in their own held pull requests; this record already cites the records that own them.
  • The programmatic host entry and package sets land with the hosting pull requests.

Writing rubric results for the amendment

  • R1 narration: none; the new bullet and DEC-12 are present tense.
  • R2 research: none in the record.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: DEC-12 has one Rejected: line.
  • R5 pull request or issue references: none in the record.
  • R6 ruled open questions: none; OQ1 became DEC-12.

Validation

  • pnpm check:knowledge, Prettier, git diff --check, scripts/check-knowledge.test.mjs.

Amendment: computer-level commands are never handed off; installs show progress and heal

Exact decision needed

Three gaps the chaos run found against the record: astryx init --user run inside a project was handed to the project's release, which may predate it; a slow but moving first install gave no sign of life and could end the run without an answer; and the record was silent on Yarn Plug'n'Play projects, where a copy cannot see the project's own CLI.

Decision

  • FR9: a command that acts on the computer rather than the folder it runs in, such as astryx init --user (FR8), is never handed to a project's release. It is answered as outside a project wherever it runs, and its standard-error line says it answered for the computer.
  • FR2: while a release installs, or while the run waits for another run installing it, a text-mode run prints one line on standard error saying so; a machine-readable run prints none. A live install is waited for, a lock its run left when it stopped is taken over, a cached release whose files are damaged is installed again, and an install past a generous bound ends the run with ERR_VERSIONS_UNAVAILABLE, never by stopping the process.
  • Platform support: in a Yarn Plug'n'Play project, seeing the project's own CLI needs the project's loader, which FR2 forbids running before the hand-off, so the release equal to the project's Core answers from the per-user cache. It is the same release whenever the project's CLI matches its Core.

Writing rubric results for the amendment

  • R1 narration: none; the new sentences are present tense.
  • R2 research: none in the record.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: no new decision record.
  • R5 pull request or issue references: none.
  • R6 ruled open questions: none open.

Amendment: the computer-level text installs itself; reminders; who answers when global and project copies meet

Exact decision needed

How the computer-level agent text gets onto every computer that installs the CLI and stays current; how people and agents learn that a global copy or a project is behind; and, for every way a global copy and a project's copy can meet, which release answers and what the run prints.

Decision

  • FR8, DEC-13: the global copy writes the computer-level text on its first run and after every switch to another release, from a detached background step. Package install scripts are not used: several package managers block them by default, and any install can skip them. astryx init --user writes it in the foreground; --agent <names> limits it to those agents' files; --remove-agents records an opt-out that the global copy honors until init --user runs again. Choices live in astryx/settings.json in the per-user configuration directory. The managed markers record a hash, so a file a person edited is never overwritten or removed. A table names each agent's file.
  • FR10, DEC-14: one reminder line on standard error, text mode only, at most once a day per cause and per project: when the global copy cannot move to the newest release (it needs a newer Node, the cache cannot be written, or the registry has not been reached for 7 days; the line points at astryx doctor), or when a project's release is older than the newest (the line names the install and upgrade commands for the project's package manager). The copy that starts the run prints it, before any hand-off. With no completed check there is no known newest release, so a fresh home never prints one. Doctor reports both causes.
  • FR6: a kept release answers only on a Node it supports, so switching Node with a version manager falls back to a kept release that runs, or to that Node's own global copy.
  • FR7: the configuration directory is a named place. A cache or configuration folder set through the environment counts only when it is an absolute path.
  • FR11, DEC-15: a table with 31 rows. Each row names a case, who answers, what prints, and its test. Doctor lists every astryx on the search path and warns when the first one is not the Astryx CLI, or is a release that predates the hand-off. Paths compare without letter case where the file system ignores it.
  • DEC-5 no longer forbids naming an update command; it still forbids installing into a project. DEC-12 covers several skill folders and agent selection.

Writing rubric results for the amendment

  • R1 narration: none. The new requirements, tables, and decisions are present tense.
  • R2 research: none in the record.
  • R3 evidence naming a change: none. The test column names the proving test for each row.
  • R4 rejected alternatives: DEC-13, DEC-14, and DEC-15 each have one Rejected: line; DEC-5 and DEC-12 keep theirs.
  • R5 pull request or issue references: none in the record.
  • R6 ruled open questions: none open.

Amendment: the project's own CLI keeps answering its project (compatible form)

  • FR2, FR9, DEC-10: a project that installs its own CLI is answered by that CLI, whatever its version, and every other copy hands the run to it. The release equal to the project's Core answers only when the project's CLI cannot start. doctor warns when the project's CLI and Core differ and names the command that aligns them.
  • Core-only projects (FR2, FR5, DEC-10): a project with no CLI of its own (only Core, or a fresh clone) is answered by the copy that started the run, as released. When that copy is not the Core's release, one hint after a successful command, at most once a day per project, names the command that adds the CLI at the Core's version; meta.answeredBy.copy is starting, and doctor warns too.
  • Why: a patch release cannot change which release answers an existing install (spec:AST-017 FR12). "The project's Core decides" (the earlier amendment) moves to the next minor release for every project, Core-only ones included, as a breaking change with a migration.
  • Fallback: when the release a project needs cannot be obtained, the copy that started the run answers with one warning line and copy: fallback. A failed install is retried after 2 minutes, then after 10 minutes if it fails again.
  • Supersedes: in the earlier amendments, the bullets saying the project's Core decides even when the project's own CLI differs or the project installs only Core, and that upgrade started in another copy runs the release equal to the Core (now only when the project's own CLI cannot start).

Writing rubric results

  • R1 narration: none in the new record. Its Current-state impact states, in the present tense, where today's CLI departs from FR1–FR12. The edits to AST-047, AST-048, and AST-051 are present-tense rule text.
  • R2 research in the record: none. The measurements stay in this description; DEC-1 keeps one sentence of conclusion.
  • R3 evidence naming a change: none. Each verification row names the kind of evidence and its failure signal.
  • R4 rejected alternatives over one line or outside a decision: none. Each of the seventeen decisions has one Rejected: line; the reasoning is in this description.
  • R5 pull request or issue references remaining: none in the records (searched for # plus digits, /pull/, and /issues/).
  • R6 ruled open questions still listing options: none. No open questions remain; OQ1 became DEC-12.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract. The records name only public surfaces: the @astryxdesign/cli package installed for the computer, the @astryxdesign/cli/host entry, the manifest's outsideProject, meta.answeredBy, and error codes.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong: global mode.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; the overlaps with spec(cli-surface): INV30, how a host's package set serves the CLI #7412 and spec(cli-surface): agent docs reach every agent from the project's own files #7539 are called out above.
  • 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
  • Prettier
  • git diff --check
  • pnpm check:repo
  • scripts/check-knowledge.test.mjs (121 tests)

…oject's own release answers inside it

Add spec:AST-081 (draft), the global mode record. It owns which release
answers a run in a project and outside one, what a door may pass the CLI
through the host entry, what every command declares it does outside a
project, how a result names the release that answered and which command
name printed commands use, how a copy installed for the computer stays
current without touching projects, where any run may write, and what each
release carries for use outside a project.

spec:AST-047 FR7 and spec:AST-048's platform support take the command name
they print from AST-081 FR5, and spec:AST-051 FR6 admits a door's own
discover sources, named as the door's.
@vercel

vercel Bot commented Oct 15, 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 Oct 20, 2026 6:55pm UTC

Request Review

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

astracat-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Oct 20, 2026, 7:00 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 15, 2026
…tion may declare its own

FR5 now defines the one picker every printed command goes through. It
takes, in order, the command an integration declares in its manifest as
`cliCommand`, then the name of the door that started the run, then the
package manager's name. When the loaded integrations declare different
commands, it takes the package manager's name and doctor warns.

Every surface that prints or writes a command uses the picker: hints,
errors, doctor fixes, help, docs moves, the agent-docs block, the
computer-level agent text and the setup reminder. Docs, agent text and
integration text write commands with bare `astryx` and get the picked
name when shown; machine-readable output stays bare.

FR8's agent text and the AST-047 FR7 and AST-048 amendments take the
picked name. DEC-8 records the order. Specification only: no runtime
change and no changeset.
… CLI

Global mode works through the CLI package itself, installed for the computer
or run through a package runner, not only through the launcher.

- FR9: every copy (the CLI package installed for the computer, a package
  runner's copy, and the copy a launcher or host carries) hands a run in a
  project that installs its own CLI to that CLI, whatever release it is and
  whatever version was requested. Outside a project, the copy that started
  the run answers. A run is handed off at most once, keeps its arguments,
  folder, streams, and exit status, and prints one standard-error line in
  text mode naming who answered.
- Doors now include the CLI package installed for the computer or run
  through a package runner; the global copy is that package or the launcher.
- FR6's update rule covers the CLI package installed for the computer; a
  version requested through a package runner is exact only outside a project.
- FR1, FR3, and FR5 follow; FR9 gets a verification row and DEC-9; OQ2 asks
  how a CLI package installed for the computer follows `latest`.
…e is the global install

- FR2: in a project, the release equal to the project's Core answers (the
  installed Core, else the lockfile's Core version, else the newest release
  the declared range allows; a project with no Core is matched by its CLI).
  The project's own CLI answers only when it is that release; otherwise the
  matched release answers from the per-user cache, and the project's CLI hands
  such a run to it too. Upgrade follows the same rule.
- A folder's project is found the way the CLI finds the Core and the CLI it
  reads, so a folder nested in another project answers with that project's
  release.
- FR3: outside a project the global copy answers with the release FR6 keeps
  it on; the carried Core is installed into the cache when a command first
  needs it, else ERR_VERSIONS_UNAVAILABLE.
- No launcher package: the global copy is the CLI package installed for the
  computer (doors, FR1, FR6, DEC-9, non-goals).
- FR5 picker step 3: the run prefix for the project's own CLI, `astryx` for
  the global copy outside a project, otherwise the CLI package pinned to the
  answering version.
- FR6: the global copy answers from releases kept in the per-user cache and
  never changes the package manager's installation (OQ2 closed by DEC-11).
- FR9: every copy hands a project's run to the release FR2 names; one stderr
  line per hand-off, printed by the answering release or, for one that
  predates it, by the copy that handed off.
- FR4: doctor reports the computer-level agent text only in a release that
  ships it.
- DEC-10 (Core decides), DEC-11 (the cache answers); verification rows for
  FR2, FR6, FR9 updated.
…s one skill (DEC-12)

- Current-state impact: the CLI provides FR2–FR9 through the doors that run
  the CLI package directly; FR1's host entry and the clauses that need it
  (a declined project CLI, door-approved integrations, the door name in the
  picker, the host line, INV30) arrive with the host entry. The official
  list is AST-051 FR10's; project starters arrive with the template kind
  that ships them.
- FR8: the computer-level text is one skill file named `astryx` in
  `.agents/skills/` and `.claude/skills/` of the home folder, written only by
  `astryx init --user` and removed only by `--remove-agents`; neither touches
  a file the CLI did not write or follows a link in its place.
- FR4: doctor outside a project reports whether that text is present and
  current.
- DEC-12 records the choice; OQ1 is closed. No open questions remain.
…progress and healing; Plug'n'Play

- FR9: a command that acts on the computer, such as astryx init --user, is never handed to a project's release; it is answered as outside a project and its line says it answered for the computer.
- FR2: one stderr line while a release installs or the run waits for another run's install (text mode only); a live install is waited for, a stopped run's lock is taken over, a damaged cached release is installed again, and an install past a generous bound ends in ERR_VERSIONS_UNAVAILABLE, never by stopping the process.
- Platform support: in a Yarn Plug'n'Play project the matched release answers from the cache, because seeing the project's own CLI needs the project's loader.
FR2: an install ends when the run that started it ends, however it ends, and a run that takes over a stopped run's lock ends any install that lock records first.
…ts and computer-level names

- architecture:cli-surface: a release-choice stage before dispatch (the
  hand-off, ERR_VERSIONS_UNAVAILABLE before any write); INV2 success meta
  carries answeredBy; INV3 names ERR_PROJECT_REQUIRED and
  ERR_VERSIONS_UNAVAILABLE; INV7 command docs declare outsideProject, which
  the manifest publishes; INV13 covers the computer-level agent text; INV22
  hints take the picker's command name; owning code and deciding specs name
  foundation/release and spec:AST-081.
- contributing:cli-conventions: outsideProject in the command doc fields and
  the checklist.
- spec:AST-081 Current-state impact says those records now carry these
  rules, with the host entry's inputs recorded there with the host entry.
- FR5: the computer-level agent text names the door that wrote it, otherwise
  `astryx`, and no integration's cliCommand; cliCommand is one line of at
  most 120 characters with no surrounding whitespace.
@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

40 of 486 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 754,077
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,188
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
RichTextEditor Markdown parity: side by side probe dark 94,866
RichTextEditor Markdown parity: side by side probe light 89,762
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232
ProgressBar With Target Mark probe dark 7,895
ProgressBar With Target Mark probe light 7,895
Markdown Default neutral dark 7,573
Markdown Default neutral light 7,566

and 20 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

FR5: cliCommand is a non-blank single line of at most 120 characters, with no surrounding spaces and no Astryx agent-docs marker text, matching what the manifest parser accepts.
…inders; the global and project table

- FR8: the global copy installs and refreshes the computer-level text itself
  (first run and every release switch, in the background); `init --user`
  writes it in the foreground, `--agent <names>` limits it to those agents'
  files, and `--remove-agents` records an opt-out the global copy honors.
  Choices live in a documented settings file in the per-user configuration
  directory. Managed markers record a hash, so a person's edit is never
  overwritten. A table names each agent's file.
- FR6: a kept release answers only on a Node it supports; update notices
  point at FR10 instead of never naming a command.
- FR7: the configuration directory is a named place; relative folder
  settings from the environment are ignored; the computer-level text is
  written by `init --user` and by the global copy, never by install scripts.
- FR10: reminders, one stderr line at most once a day, text mode only, when
  the global copy cannot move to the newest release (Node, unwritable cache,
  7 days offline; points at `astryx doctor`) or a project's release is behind
  (names the install and upgrade commands). Doctor reports both.
- FR11 and its table: 31 cases where global and project copies meet, with
  who answers, what prints, and one test each; doctor lists every `astryx`
  on the search path and warns about a non-Astryx or pre-hand-off first one;
  paths compare without case where the file system ignores it.
- DEC-5 and DEC-12 updated; DEC-13 (installer), DEC-14 (reminders), DEC-15
  (the table) added. Verification rows for FR6, FR8, FR10, FR11.
…only rows

- Project definition: a workspace's own CLI package (the folder itself, or
  `packages/cli` beside the workspace) is the project's CLI.
- FR8: each file records a hash of its text inside its markers; a file that
  records none counts as edited.
- FR10: a third reminder, when the first `astryx` on the search path is a
  release that predates the hand-off, naming `npm i -g
  @astryxdesign/cli@latest`; doctor reports it in every folder.
- FR11: a release install's lock is renewed every 10 seconds; a lock from
  another computer is taken over once a waiting run sees it unrenewed for 60
  seconds. Rows that depend on an operating system's file system name the
  cross-platform smoke workflow as their only full test. G11, G21, G25,
  G26 updated; G32 (a workspace with its own CLI and Core) added.
- Re-flow of list items whose lines an earlier edit left ragged or nested
  one level too deep (FR6, FR7); no wording change there.
- The computer-level agent files table lists every agent tool the CLI
  writes for: Claude Code's own folder; the shared .agents folder for Codex,
  Gemini CLI, Copilot CLI, Cursor, OpenCode, Crush, Qwen Code, Cline, Amp,
  Goose, Roo Code, and Zed; and the single-tool folders of Continue, Kiro,
  and Windsurf, written for every agent only when that tool's folder exists.
- No copy in a folder a shared-folder tool also reads, and no always-on
  instructions file, since a tool lists such a copy twice. Files are
  regular files with strict YAML frontmatter whose name is the folder's
  name. A tool that needs its own configuration changed, such as Aider,
  gets no copy, and the CLI never edits an agent tool's configuration.
- FR10: the line for 7 days without reaching the registry.
…ettings name it

The global copy is one in npm's global folder or in a global folder that a
package manager's own settings name (Bun BUN_INSTALL/globalDir, Yarn
global-folder, pnpm PNPM_HOME/global-dir, and defaults); layout alone never
makes a copy global, and when unsure the copy is not global (no update check,
no agent text). FR10's notice reinstalls into such a folder with the plain
command. Rows G50 and G51 add the look-alike apps.
…up reminder; Core prefetch; pnpm store links

- FR2: a failed install is retried after 2 minutes, then after 10 once it
  fails again in a row; a success forgets it.
- FR2: a lock takeover ends the recorded process only when its arguments are
  exactly npm, or node running npm-cli.js, installing @astryxdesign/cli at
  the lock's release, it started after the lock, and the lock is younger than
  any install; otherwise the lock is taken over and the process left alone.
- FR2: in a project with only Core of another release, the setup reminder
  names the add-CLI command first, then astryx init.
- FR3, FR6: on a run while no Core is beside it or cached, the global copy
  installs its own release's Core into the per-user cache from a detached
  step (never in CI, never blocking, failures silent with FR2's backoff), so
  component reads outside a project work offline after one online run.
- Definitions: a package in pnpm's store links folder is global only when a
  settings-named pnpm global folder links to it.
- Row G49 follows; new rows G52, G53.
…only); npm title; invalid_cli_command follow-up

- Project definition: a folder deeper than the nearby look finds the
  project's own CLI from the declaring package.json's folder (G54).
- FR6: the global copy's Core step starts as the run ends, never holding
  anything the caller waits on; on Windows, where a detached process
  inherits the caller's pipes, only when the run writes to a terminal (G55).
- FR2: a lock takeover reads npm's process title, reported as one argument,
  as its arguments.
- Current-state impact: next-minor follow-up for `integration check
  --strict` failing on invalid_cli_command (cli-surface INV35); this release
  reports it without failing.

- FR3: an open search gets the release's Core as component does; when it
  cannot, it answers from the rest with meta.partial and one stderr line (G56).
…ing package.json

A folder deeper than the nearby look finds the project's Core, as well as
its own CLI, from the folder of the package.json the walk found, never the
carried Core in its place. New row G57.
…d is a note

- FR3: outside a project, or in a project with nothing installed (the copy
  that started the run, such as in a fresh clone), commands that need Core
  answer from the carried Core; a project's installed Core is always read in
  its place, from any depth. When the carried Core cannot be installed in a
  project, the message says the project has no Core installed and to install
  its dependencies.
- FR5: `doctor integration validate` and `integration check` report a
  malformed `cliCommand` as a note (`invalid_cli_command`) beside their
  issues, which fails nothing; `doctor` still warns.
- Follow-up: the next minor makes it a validate warning that
  `integration check --strict` fails on (cli-surface INV35).
Conflicts: docs/architecture/cli-surface.md (this record's INV13 extension, then main's INV31; main's INV31 evidence row added to the table) and the AST-051 FR6 bullet (this record's door sources, with main's "discover then reads the official list (FR11)").
… CLI

FR9: an interrupt, termination, or hangup signal sent to the copy that
started the run reaches the copy it handed the run to; an interrupt a
terminal sends to the whole process group, which that copy already gets, is
not passed on a second time while it is still stopping. New row G58.
#7494 renumbers the official-list requirement to AST-051 FR11, since FR10 is
now "A package can link its docs site"; AST-081's four references follow.
…ws Core prefetch; 5-second interrupt grace

- architecture:cli-surface INV31: the computer-level skill file AST-081 FR8
  writes (~/.agents/skills/astryx/SKILL.md, with its folder links or copy in
  other agents' skill folders) is not a project's agent docs; only
  `astryx init --user` and the global copy's background step write it.
  INV31's rule for project agent docs is unchanged. FR7's text says so.
- FR6/FR3: the global copy's background Core install never runs on Windows
  (no terminal check, per INV1); a command that reads Core installs it there
  on first need. Row G52 notes it.
- FR9: termination and hangup signals reach the handed-off CLI; a SIGINT that
  reaches only the starting copy is forwarded if that CLI is still running 5
  seconds later, so a group interrupt reaches a CLI that stops in time
  exactly once. Row G58 covers both cases.
…e run's package set

FR1: the integrations a host approves for use outside a project are resolved
by name from the package set that serves the run, in addition to what FR12
finds there (they are no longer defined as those not installed beside the
CLI). FR3 and the current-state impact follow.
@josephfarina
josephfarina marked this pull request as ready for review October 20, 2026 18:44
…back to the starting copy

FR2: when a door declines the project's own CLI and cannot run the release
equal to it, the copy that started the run answers, announced as for a
release that cannot be obtained, and the warning names the reason the
project's CLI was declined (it no longer fails with ERR_VERSIONS_UNAVAILABLE).
FR1: the reason is text the host defines; the record sets no list. The FR2
verification row names the declined-and-unavailable fallback.
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b893bee

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 20, 2026
@josephfarina
josephfarina merged commit b0a6f62 into main Oct 20, 2026
53 checks passed
@github-actions
github-actions Bot deleted the josephfarina/global-mode-spec branch October 21, 2026 06:22

This branch was successfully deployed

1 active deployment
Preview — b893bee6 Deployed Oct 20, 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