Repository navigation
spec(AST-081): global mode, so the CLI answers in any folder and a project's own release answers inside it - #7601
Merged
Merged
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
…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.
Contributor
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Visual Regression40 of 486 shot(s) changed. A change here is a question, not a failure: check whether the after is the
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.
8 tasks done
…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.
8 tasks done
…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.
8 tasks done
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.
Contributor
Author
|
/approve-spec b893bee |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Existing authority searched
architecture:cli-surface(current) owns the run's stages, the envelope (INV2), error codes (INV3), confined writes (INV10, which names no root), agent-docs rendering (INV13), and autolinking (INV14). It does not say which copy answers a run or what a command does outside a project.spec:AST-017(current): FR14 forbids Astryx-owned environment variables and requires a documented API for automation; FR13 makes an optional response field compatible; FR17 asks a reduced mode to show in every machine-readable result, whichmeta.answeredBy.copydoes, so FR17 needs no change; FR18 asks for explicit, call-scoped programmatic inputs, which FR1 meets with one call per process and nothing shared between processes.spec:AST-042(current) owns command admission. It needs no change: FR4 here binds every command, and its declaration check fails a new command without a value.spec:AST-047(draft) FR7 andspec:AST-048(current) platform support say printed commands use the project's run prefix. Outside a project, or in a project with no CLI, that prefix either does not exist or starts a different release, so both take the command name from FR5.spec:AST-051(current) FR6 lets only a project or an integration provide a discover source. A door's own catalog needs a third provider, named as the door's, so FR6 gains one sentence.spec:AST-050(current) FR2 andspec:AST-051FR8 already place writes in the project and in the per-user cache; FR7 names them instead of changing them.spec:AST-040FR9–FR13, merged): which project an upgrade works on, which Core it migrates to, and the incomplete-upgrade report. FR9's project search is also the one this record uses for every command.architecture:cli-surfaceINV31, merged): which files hold agent docs, whereinitwrites them, and the home-folder rule.spec:AST-051FR11, merged): the official package list, built into each release and read after every other source.architecture:cli-surfaceINV30, with rewrites of INV14 andspec:AST-051FR6): this record takes over the host entry's public contract (FR1, FR2, FR5) and keeps INV30 for the package-set mechanism. See "Relationship to spec(cli-surface): INV30, how a host's package set serves the CLI #7412" below.spec:AST-047. feat(cli): build starts a plain page from its family's default #7276 (draft) adds a family-default rule tospec:AST-048elsewhere in the record and merges cleanly with this change.spec:AST-051FR6 is also edited by docs(spec): discover lists the official packages first, from a list built into each release (AST-051) #7494 (one clause) and spec(cli-surface): INV30, how a host's package set serves the CLI #7412 (a rewrite); see below. The new record is AST-081, the next free number; no open pull request claims it.Decision
Adds
spec:AST-081(current), FR1–FR12, one verification row each:@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.doctorwarns 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, andcopyisstarting;doctorwarns 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.upgradefollows the same rule. When the matched release cannot be obtained, the copy that started the run answers, with one standard-error warning andcopy: 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_UNAVAILABLEonly 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).ERR_VERSIONS_UNAVAILABLE, except an opensearch, which answers from the rest and says what it skipped (meta.partial);doctor,swizzle, andupgradenever read it. No advice that needs a project.same,refuse, orownin its command doc, andastryx manifestpublishes it asoutsideProject. New refusals useERR_PROJECT_REQUIRED; released refusal codes stay until a declared minor.doctorchecks the computer outside a project;swizzlerefuses.meta.answeredBy(cli,core,copy:project,starting,matched,carried, orfallback), with one standard-error line when the project's own CLI was handed the run or a matched or carried release answered (FR9); astartingrun prints only FR2's daily hint. One picker names every printed command: the command the loaded integrations declare ascliCommand, else the door's name, else the package manager's name. Docs and integration text are written with bareastryxand named when shown; JSON stays bare.--json, after a failure, or whenCIis set to a true value orNO_UPDATE_NOTIFIERis 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.astryx --helpand the manifest'sglobalModefield point toastryx 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.--json, after a failure, or whenCIorNO_UPDATE_NOTIFIERturns the check off.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.jsondeclaring either, up to the repository root; a folder nested in another project answers with that project's release.Amends:
spec:AST-047FR7 and Platform support: text moves start with the command name AST-081 FR5 picks.spec:AST-048Platform support: printed commands start with the command name AST-081 FR5 picks.spec:AST-051FR6: 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.answeredByin INV2,ERR_PROJECT_REQUIREDandERR_VERSIONS_UNAVAILABLEin INV3,outsideProjectin 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 (onlyinit --userand the global copy's background step write it).contributing:cli-conventions:outsideProjectin the command doc fields and the checklist.spec:AST-048,spec:AST-051,architecture:cli-surface, andcontributing:cli-conventionsare 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-surfaceINV30 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 thatdoctorreads only the project's install. To fit, #7412 would:spec:AST-040FR9 finds (INV30 plans against the working directory);spec:AST-051FR6 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
metadoes not.Claim scope and non-goals
cliCommand), and the hand-off every copy of the CLI makes to a project's own CLI.spec:AST-040FR9–FR13), the agent-docs layout (INV31), the official list (spec:AST-051FR11), the package-set mechanism (INV30), and compatibility classification (spec:AST-017, andarchitecture:cli-surfaceINV10a for out-of-root refusals).doctor's computer check; whether a folder nested in another project answers for itself (it answers with the enclosing project's release).doctorandswizzlelive 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-surfaceINV31:initoutside 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-042FR4: admission asks for theoutsideProjectvalue 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).integration check --strictfails oninvalid_cli_command, a malformedcliCommand(FR5); this release reports it without failing, since a new failure code joins only in a minor (architecture:cli-surfaceINV35).providerId, the roots,agentDocs,issuesUrl,cliCommand). Until one exists, FR5 definescliCommand; 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.cliCommand(spec:AST-017FR14) when the field ships.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:
theme addimports a theme on 0.7.0 and copies its source on 0.6.8, and both exit 0. That copy'sdoctortold a healthy 0.6.8 project to upgrade Core.swizzlewrite a component copy into an empty folder, which FR3 and FR4 forbid.theme buildgiven an absolute path.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 publicAstryxIntegrationauthoring 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 thediscovernamed export inside its own record; FR5 follows that precedent and namescliCommandbeside 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 forcliCommand. FR19 and FR20 governastryx.configsettings and integration contributions to them;cliCommandis 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-047FR7 andspec:AST-048Platform 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.Decision
cliCommandin 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 leadingastryx.doctorwarns, naming each integration and its command. A malformed declaration counts as absent, never withdraws the integration's other contributions, anddoctorwarns about it.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.Rejected alternatives
astryxis already how JSON carries commands.Notes for the implementation
cliCommandloses nothing on an older CLI.cliCommandneeds the per-field isolationagentDocsalready has.astryxchanges the text of doc content in JSON reads, not its shape.spec:AST-017classifies that value change with the code.Writing rubric results for the amendment
Rejected:line; the other two are here.#plus digits,/pull/, and/issues/).Validation of the amendment
pnpm check:knowledgegit diff --checkscripts/check-knowledge.test.mjs(121 tests)pnpm check:repoAmendment: 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-081as 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-081FR2's upgrade rule:upgradestarted in another copy runs the release equal to the project's Core.spec:AST-040FR13's printed command for an incomplete upgrade, a package-runner command pinned to that Core's version, relies on it.spec:AST-081FR1: 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-017FR13 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
npx @astryxdesign/cliran 0.6.8 in every folder, including a project on Core 0.7.1.npx @astryxdesign/clifetched 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.npx @astryxdesign/clifetched the newest CLI instead of running the project's; the two matched only because the project was on the newest release. The project's ownnpx astryxran the project's.Decision
upgrade(FR2).ERR_VERSIONS_UNAVAILABLE; no other copy answers in its place (FR2's existing rule).meta.answeredBynames 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.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.What changed for the launcher
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
latestby 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.upgrade,spec:AST-040FR13'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.Gaps this amendment does not close:
ERR_CORE_NOT_FOUND(FR3, unchanged). Making them work through the plain package needs a packaging change this record does not decide.ERR_VERSIONS_UNAVAILABLE. For some runs that turns today's mixed answer into a refusal, whichspec:AST-017classifies before it ships.Notes for the implementation
spec:AST-040FR9 and FR11), or a hand-off can bounce; the FR9 check runs a project CLI that hands off itself.meta.answeredBy.astryxcommand can exist. Installing the launcher where the CLI package is installed for the computer conflicts on that command.Writing rubric results for the amendment
Rejected:line.#plus digits,/pull/, and/issues/).Validation of the amendment
pnpm check:knowledgegit diff --checkscripts/check-knowledge.test.mjspnpm check:repoAmendment: 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-081FR2 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-081FR6 and OQ2: the global copy updates through the per-user cache, but which copy answers after an update was open.spec:AST-081FR3 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
upgradefollows the same rule, so FR2's upgrade exception no longer needs separate words; a project CLI that predates the rule answers for itself andspec:AST-040FR13 covers its report. DEC-10.package.jsonup 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.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.astryxwhen the global copy answered outside a project, otherwise the CLI package pinned to the answering version.doctoroutside a project reports the computer-level agent text only in a release that ships it.Contradictions for the owner
spec:AST-017classifies these before they ship; the code change carries a patch changeset.Writing rubric results for the amendment
Rejected:line each.Validation of the amendment
pnpm check:knowledgeAmendment: 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
spec:AST-051FR10's; project starters arrive with the template kind that ships them.astryx, in.agents/skills/and.claude/skills/of the home folder, written only byastryx init --userand removed only byastryx 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.doctoroutside a project reports whether that text is present and current.Relationship to other open work
spec:AST-051FR10) are in their own held pull requests; this record already cites the records that own them.Writing rubric results for the amendment
Rejected:line.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 --userrun 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
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.ERR_VERSIONS_UNAVAILABLE, never by stopping the process.Writing rubric results for the amendment
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
astryx init --userwrites it in the foreground;--agent <names>limits it to those agents' files;--remove-agentsrecords an opt-out that the global copy honors untilinit --userruns again. Choices live inastryx/settings.jsonin 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.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.astryxon 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.Writing rubric results for the amendment
Rejected:line; DEC-5 and DEC-12 keep theirs.Amendment: the project's own CLI keeps answering its project (compatible form)
doctorwarns when the project's CLI and Core differ and names the command that aligns them.meta.answeredBy.copyisstarting, anddoctorwarns too.spec:AST-017FR12). "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.copy: fallback. A failed install is retried after 2 minutes, then after 10 minutes if it fails again.upgradestarted in another copy runs the release equal to the Core (now only when the project's own CLI cannot start).Writing rubric results
Rejected:line; the reasoning is in this description.#plus digits,/pull/, and/issues/).Scope
@astryxdesign/clipackage installed for the computer, the@astryxdesign/cli/hostentry, the manifest'soutsideProject,meta.answeredBy, and error codes.Validation
pnpm check:knowledgegit diff --checkpnpm check:reposcripts/check-knowledge.test.mjs(121 tests)