Repository navigation
spec(AST-040): upgrade works on its project from any folder, and reports a CLI older than Core - #7543
Merged
Merged
Conversation
…rts a CLI older than Core Amend the record that owns what an upgrade may modify and how it reports files: - FR9: an upgrade works on the project of the folder it runs in, the nearest folder whose package.json declares an Astryx package or that its workspace lists as a member; the search stops at version-control metadata and never counts the home folder. - FR10: a named source folder is read from the folder the command runs in and stays inside the operation root. - FR11: a workspace member migrates to the Core its workspace installs. - FR12: result paths are relative to the folder the command runs in. - FR13: a CLI older than the installed Core runs the codemods it has, reports the upgrade as incomplete, and names a command that finishes it with the matching CLI release.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
4 tasks done
…the shell it targets FR13: the command that finishes an upgrade with the CLI release matching the installed Core works from any folder it is run in, upgrading the same project. It repeats the run's options, names the source folder the run scanned, and quotes each argument for the shell it targets. The human-readable output names that shell unless it is a POSIX shell. The verification row runs the printed command inside the project, above it, and in an unrelated folder.
…pied-composition paths resolve from where upgrade runs - FR9: a folder that installs Core but neither declares an Astryx package nor is a listed member is not a project; an upgrade run there works on the project above it, if any. - FR12: from a folder below the operation root, the copied-composition summary also names its files relative to the folder the command runs in. At the operation root it names them relative to the scanned source folder.
approved_by: josephfarina, approved_at: 2026-10-20.
josephfarina
marked this pull request as ready for review
October 20, 2026 16:13
Contributor
Author
|
/approve-spec ac085eb |
Contributor
PR Analysis Report
|
github-actions
Bot
deleted the
josephfarina/upgrade-project-scope-spec
branch
October 21, 2026 06:22
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
astryx upgradebehaves when it runs in a folder other than the project root, and what it reports when the running CLI is older than the installed Core:--paththe caller names is read from, and what bounds it.Existing authority searched
spec:AST-040(current) owns what an operation may modify in an existing consumer file and how modified, blocked and declined files are reported (FR7). FR2 confines an operation to its operation root, but the record does not say which folder that is whenupgraderuns below the project root. It also does not say which installed Core is the target, what result paths are relative to, or what happens when the CLI has no codemods for the installed Core. This PR amends it.architecture:cli-surface(current) confines every write (INV10) without naming the root, and owns how agent docs render (INV13), not whereupgraderuns.spec:AST-048(current) FR15 defines a folder's workspace root. FR9 reuses it rather than restating it.spec:AST-017(current) FR13 makes an optional result field a compatible change. FR13 here adds one.spec:AST-040. spec(cli-surface): agent docs reach every agent from the project's own files #7539, a draft amendment toarchitecture:cli-surface, sets whereinitwrites agent docs. It findsinit's project root by the same declaration, with the same version-control and home-folder stops, and differs in two ways: it does not count workspace members, and with no declaring folder it falls back to the nearestpackage.json. An upgrade falls back to the folder it runs in. The two rules govern different commands and do not contradict. Whetherinitshould adopt the member rule is a separate decision for that draft.Decision
Amends
spec:AST-040:Rejected alternatives
package.jsonas the project. A home folder or a tool folder with apackage.jsonwould become the project of every folder below it, and an upgrade would scan and rewrite files that belong to other projects.spec:AST-017treats as an incompatible change.Claim scope and non-goals
astryx upgradeonly. Where other commands look for the project,initincluded, stays with their owners.Evidence and implementation relationship
package.json, the nearestpackage.jsonmade the home folder the project, and an upgrade rewrote files across unrelated projects. Membership keeps hoisted workspaces working: members under overrides, resolutions, hoisted pnpm installs, peer-only declarations, and declared ranges the hoisted copy falls outside all find the Core their workspace installs, while a nested project outside any workspace finds only its own.cliBehindCoreis also in review, and implements FR13. Its command first changes to the folder the run used, so it works pasted from any folder. It targets a POSIX shell, or PowerShell on Windows, where the warning names PowerShell.Writing rubric results
Scope
package.jsonfields,pnpm-workspace.yaml, thecliBehindCoreresult field, and error codes.Validation
pnpm check:knowledgegit diff --check