Skip to content

feat(cli): an integration can say how its apps add a dependency (installGuidance) - #12218

Merged
josephfarina merged 1 commit into
mainfrom
integration-install-guidance
Nov 18, 2026
Merged

josephfarina merged 1 commit into
mainfrom
integration-install-guidance

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Record change: adds spec:AST-039 FR16 (an integration's installGuidance line replaces the package-manager add step) and makes AST-051 FR1/FR2, AST-048 FR21 and AST-081 FR12 name that line. Test proof: the surfaces test and the suites listed under Testing.

User need

Some teams' apps must not add a dependency with their package manager's add command: for example, apps that share one lockfile which a repository script rebuilds, where the right step is "add it to package.json, commit, run the relock script". The CLI prints install steps in several places (the setup notes template prints, the theme step init prints, doctor's theme fixes, theme hints). Today every one of them says pnpm add … / npm install …, which is the wrong step in those apps, and an agent follows it.

Problem and solution fit

An integration knows its apps' rule, so it can state it once. A new optional manifest field, installGuidance, holds one line where {packages} stands for the packages to add. Project.load already records each project's integrations for cliCommand; that one record now keeps each integration's installGuidance too, and one chooser (one line, or a conflict) serves both settings. Every printer of a step that adds packages the app lacks reads it:

  • installCommandFor returns installGuidance (bare package names filled in; the integration's own rule picks versions) beside installCommand, which keeps its value for older readers. Where a command pins a version (an official package at the project's Core, discover <package>@<version>), the guidance names that same version.
  • installStepFor (init's theme step, doctor's themes fix) prints the guidance first, then the package-manager command, then the npm install fallback with its note.
  • Template readiness notes and the template receipt, theme eject (its receipt and its "Install them first" line), doctor's core-installed, peer-dependency, theme-owners and local-theme-build fixes, theme build's missing-package suggestion and its no-Core message, render's missing-package suggestion, the theme-import error, the theme editor's notes, and discover's and the available-integration add commands. The hints that printed a fixed npm install … now print the project's step (guidance, else its package manager, else npm install with a note; render puts the note in its suggestion's reason).
  • Steps that move Astryx's own packages to another release (doctor's Core range fix, the upgrade and match lines), and adding @astryxdesign/cli at the project's Core release (the no-CLI hint, doctor's version-alignment fix), are not adds and keep the package-manager command. A peer at the wrong version gets the guidance line followed by the version it needs.

Current specification

AST-051 FR1/FR2 (discover), AST-048 FR21 (template readiness notes) and AST-081 FR12 (computer-level integrations) now say the install guidance a loaded integration gives may take the install command's place.

spec:AST-039 FR16 (added here, beside FR15 themeProvider): an integration-level fact, never per item; printed wherever the CLI prints an install step; two different lines cancel out and doctor warns; an invalid line is ignored with a warning, so the key needs no CLI floor.

Public delta and caller burden

  • Manifest: optional installGuidance?: string (one line, at most 240 code points, same line rules as cliCommand). Typed in AstryxIntegration, documented in the integration field docs.
  • Doctor: new install-guidance check, shown only when an integration gives guidance (pass naming it; warn on two different lines). invalid_install_guidance warning (project doctor) and note (doctor integration validate / integration check, marked next like invalid_cli_command).
  • JSON: the template.copy and theme.eject receipts add installGuidance only when present. No field renamed or removed.
  • Without guidance, output is unchanged except four hints that printed a fixed npm install …: doctor's core-installed and peer-dependency fixes, theme build's no-Core message and render's missing-package suggestion now print the project's package manager (or npm install with a note when its lockfiles disagree).

Design and alternatives

Same shape as cliCommand (isolated parse, per-project record, choose one or conflict). Rejected: a structured {verb, relock} object; one line covers every rule seen so far and needs no per-tool schema.

Evidence

  • Parser: valid line accepted; blank, multi-line, over-length, non-string rejected.
  • Project.load: guidance recorded and filled in; invalid one ignored with invalid_install_guidance, rest of the manifest loads; none recorded without the field.
  • chooseDeclaredValue: one line from one or more packages; conflict on different lines; failed or set-aside packages skipped.
  • Doctor: check left out / pass / warn; themes fix prints the guidance.
  • Init: step 4 prints the guidance and no pnpm add.
  • Every add-step printer (Core-matching add, project add command, theme editor line, discover add, theme eject's needs, doctor's core-installed fix, theme build's no-Core message) prints the package-manager command without guidance and the guidance with it, in one surfaces test; doctor's Core range fix keeps pnpm add …@<version>.
  • cliCommand and installGuidance read from the same record; a package that failed to load or was set aside declares neither.

Writing rubric results

Over AST-039 FR16 and its verification row, and the clauses amended to name FR16's line (AST-051 FR1 and FR2, AST-048 FR21, AST-081 FR12):

  • R1 narration: none; every clause is present tense.
  • R2 research: none.
  • R3 evidence: the FR16 verification row names tests, not changes.
  • R4 rejected alternatives: none in the records.
  • R5 change references: none.
  • R6 open questions: none.
  • R7 project status: none.

Scope

Components: cli (integration manifest, doctor, init, template readiness, theme hints)

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

vitest run --project node over the surfaces test, foundation/env, release notices, config/project, doctor and theme checks, init next steps, discover, theme eject, template copy, authoring/integration and validate-integration: 619 pass; after the review fixes, the surfaces test, doctor, theme checks, theme build's project-Core test, render, discover, foundation/env and authoring/integration: 668 pass (two heavy doctor/build tests timed out under machine load); after the third review round, rebased on main, the surfaces test, check-failures list, discover, notices, render, doctor, validate, check, project, foundation/env, authoring/integration and init next steps: all pass. cli-structure, changesets and README check pass.

@vercel

vercel Bot commented Nov 17, 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 Nov 17, 2026 10:02pm UTC

Request Review

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

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 17, 2026, 10:18 PM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision on the proposed spec:AST-039 FR16, and two fixes are needed.

AST-039 is a draft record, so FR16 has no current spec behind it yet. FR16 covers the new installGuidance manifest field, printing it in place of the package manager's install command, the install-guidance doctor check, and the two new public type members (AstryxIntegration.installGuidance, TemplateCopyResponse.data.installGuidance). An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or by naming the current record that governs it.

Blocking:

  • Several surfaces still print pnpm add … in an app whose integration sets installGuidance, so FR16's "wherever", the description and the changeset's "doctor's theme fixes, and theme hints" overstate the change: theme eject (its receipt and its "Install them first" line), doctor's theme-owners fix (packages/cli/api/doctor/theme-checks.mjs:145), the theme editor's page notes, and the discover and available-integration add commands; route them through installCommandFor / installGuidanceFor, or narrow the wording to the surfaces covered.
  • packages/cli/foundation/env/install-guidance.mjs copies the per-project record in packages/cli/foundation/env/cli-command.mjs (the map, projectKey, the set-aside rules and the one-or-conflict choice), so the two records can drift apart for one project: extend the shared record and read the guidance from it.
Claims and files checked

Review mode: full; reason: no-earlier-review

Claims:

  • installCommandFor returns the guidance beside an unchanged install command: verified (foundation/discovery/template-needs.mjs:273-285; project.test.mjs)
  • installStepFor prints the guidance first, then the command, then the npm fallback: verified (template-needs.mjs:298-301; init.next-steps.test.mjs)
  • Template notes and the template JSON receipt use it: verified (template-needs.mjs:367-375, api/template/copy/copy.mjs:187); the receipt field has no test
  • Doctor's local-theme-build fix, the theme build suggestion and the theme-import error use it: verified (theme-checks.mjs:1708, build.mjs:3512-3520, theme-imports.mjs:187-189)
  • Project.load records it per project, as for cliCommand: verified (foundation/config/project.mjs:659)
  • Printed wherever the CLI prints an install step (description, FR16): false (theme eject, doctor's theme-owners fix, the theme editor's page notes, the discover add commands)
  • Changeset, "doctor's theme fixes, and theme hints" print it: partly false (theme-checks.mjs:145; clients/cli/commands/theme.mjs:971-972)
  • Two different lines cancel out and a new doctor check warns: verified (install-guidance.mjs:78-84, doctor.mjs checkInstallGuidance; doctor.test.mjs, install-guidance.test.mjs)
  • An invalid line is ignored with a warning and the rest of the manifest loads: verified (integrations.mjs loadManifest; project.test.mjs)
  • integration check reports it as a note marked next: verified by code (validate-integration.mjs:490, :995-998); no test
  • One line, at most 240 code points, the same line rules as cliCommand: verified (schema.mjs:128-140; parse.test.mjs)
  • template.copy adds the field only when present, and nothing is renamed or removed: verified (copy.mjs:187)
  • Apps without guidance see no change: verified (installGuidanceFor returns nothing without a record; the doctor check returns null; doctor.test.mjs)
  • The listed test files pass: verified, they pass at this head

Files:

  • .changeset/integration-install-guidance.md: finding: "doctor's theme fixes, and theme hints" overstates coverage
  • docs/specs/AST-039/spec.md: finding: FR16 is a new requirement in a draft record (owner decision); its "wherever" is not met; its verification row names template tests that are not added
  • packages/cli/api/doctor/doctor.mjs: clear
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/api/doctor/theme-checks.mjs: finding: the theme-owners fix (line 145, unchanged) still prints the add command
  • packages/cli/api/doctor/theme-checks.test.mjs: clear
  • packages/cli/api/init/run/run.mjs: clear
  • packages/cli/api/integration/validate-integration.mjs: clear
  • packages/cli/api/integration/validate-integration.type.mjs: clear
  • packages/cli/api/integration/validateIntegration.doc.mjs: clear
  • packages/cli/api/template/copy/copy.mjs: clear (untested field)
  • packages/cli/api/template/template.doc.mjs: clear
  • packages/cli/api/template/template.type.mjs: clear
  • packages/cli/api/theme/build/build.mjs: clear (untested branch)
  • packages/cli/assets/docs/tree/checks.doc.mjs: clear
  • packages/cli/assets/docs/tree/troubleshooting.doc.mjs: clear
  • packages/cli/authoring/integration/integration.doc.mjs: finding: "wherever it would print an install command" overstates coverage
  • packages/cli/authoring/integration/parse.test.mjs: clear
  • packages/cli/authoring/integration/schema.mjs: non-blocking: the second 240 check never runs
  • packages/cli/authoring/integration/type.ts: finding: the same "wherever" wording as the field docs
  • packages/cli/clients/cli/commands/init.next-steps.test.mjs: clear
  • packages/cli/foundation/config/project.mjs: finding: records a second per-project map beside cliCommand's
  • packages/cli/foundation/config/project.test.mjs: clear
  • packages/cli/foundation/discovery/template-needs.mjs: clear
  • packages/cli/foundation/discovery/theme-imports.mjs: clear (untested branch)
  • packages/cli/foundation/env/install-guidance.mjs: finding: copies cli-command.mjs's per-project record
  • packages/cli/foundation/env/install-guidance.test.mjs: clear
  • packages/cli/foundation/integrations/integrations.mjs: clear
  • packages/cli/foundation/integrations/validate-contributions.mjs: clear

Automated review (maintainer link)

Comment thread docs/specs/AST-039/spec.md Resolved
@josephfarina
josephfarina force-pushed the init-install-command-pm branch from bfccc9a to 548da77 Compare November 17, 2026 03:51
@github-actions
github-actions Bot deleted the branch init-install-command-pm November 17, 2026 06:03
@josephfarina
josephfarina changed the base branch from init-install-command-pm to main November 17, 2026 06:05
@josephfarina

Copy link
Copy Markdown
Contributor Author

Owner decision (engineering owner, covering this pull request): an integration may declare one installGuidance line in its manifest, with a {packages} placeholder. The CLI prints that line in place of the package manager's install command on every surface that tells an app to add a dependency, and astryx doctor gains an install-guidance check. The field is additive and generic, with no product names. Integrations fill it only once the running CLIs understand it: a manifest key an older CLI does not know is reported as a note, never as an integration issue, in a separate change, and the share of runs on older CLIs is measured before any integration fills the field.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec e2c9cd1

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b2e372d

Storybook · Sandbox · built from this PR's head

Package size: measured; main has no measurement of the merge base to compare yet.

API changes: cli +1 · ~4 · −0; unknown (base surface unavailable): richtext, theme-butter, theme-chocolate, theme-gothic, theme-matcha, theme-neutral, theme-stone, theme-y2k

5 API changes (advisory)
Package Where Signature Usage
+ cli ./authoring · Types · interface AstryxIntegration installGuidance?: string import type {AstryxIntegration} from '@astryxdesign/cli/authoring'; const x: AstryxIntegration = {installGuidance: …}
~ cli ./api · Types · type TemplateCopyResponse data: { template: string; outputDir: string; fileName: string; filesCopied: number; demoMediaReplaced: number; demoContentReplaced: number; notes: string[]; missingPa … #7b7c20d9 → data: { template: string; outputDir: string; fileName: string; filesCopied: number; demoMediaReplaced: number; demoContentReplaced: number; notes: string[]; missingPa … #88078946 import type {TemplateCopyResponse} from '@astryxdesign/cli/api'; const x: TemplateCopyResponse = {data: …}
~ cli ./api · Types · type ThemeEjectResponse data: { slug: string; displayName: string; maintained: boolean; package: string; outputDir: string; entry: string; exportName: string; files: string[]; missingPackage … #ebb5f31c → data: { slug: string; displayName: string; maintained: boolean; package: string; outputDir: string; entry: string; exportName: string; files: string[]; missingPackage … #0cef96fc import type {ThemeEjectResponse} from '@astryxdesign/cli/api'; const x: ThemeEjectResponse = {data: …}
~ cli ./api · Types · type TonalPaletteFamilyInput kind?: "chromatic" | "neutral" | undefined → kind?: "neutral" | "chromatic" | undefined import type {TonalPaletteFamilyInput} from '@astryxdesign/cli/api'; const x: TonalPaletteFamilyInput = {kind: …}
~ cli ./api/experimental · Types · type ThemeEditPreviewAddResponse data: { folder: string; theme: string | null; added: string[]; refreshed: string[]; matched: Array<{ page: string; why: string }>; skipped: Array<{ page: string; reas … #de03d08e → data: { folder: string; theme: string | null; added: string[]; refreshed: string[]; matched: Array<{ page: string; why: string }>; skipped: Array<{ page: string; reas … #73584e3c import type {ThemeEditPreviewAddResponse} from '@astryxdesign/cli/api/experimental'; const x: ThemeEditPreviewAddResponse = {data: …}

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested. The owner approval settles spec:AST-039 FR16, and five fixes remain.

  • coreAddCommand now prints the integration's guidance for doctor's Core range fix (packages/cli/api/doctor/_adapter.mjs:753), which moves an installed Core into a theme's range, so the line drops the required range and breaks FR16's rule that release moves keep the package-manager command; drop that branch and expect pnpm add in packages/cli/test/install-guidance-surfaces.test.mjs:86-88.
  • The theme editor's page notes still print pnpm add … in an app that gives guidance, because pageNeeds prefers needs.installCommand (packages/cli/api/theme-edit/_preview-app.mjs:4063-4068); use needs.installGuidance first.
  • Miss: four hard-coded hints still print npm install <package> for a package the app lacks (packages/cli/api/doctor/doctor.mjs:359 and :1023, packages/cli/api/theme/build/build.mjs:635, packages/cli/api/render/_adapter.mjs:414), against FR16's "wherever" and the changeset's "doctor's fixes, theme hints and errors", so build them with installStepFor or narrow those claims.
  • The field docs say the guidance replaces every install command and list only three surfaces (packages/cli/authoring/integration/integration.doc.mjs:129, packages/cli/authoring/integration/type.ts:93-96), and discover's install field is still documented as a package-manager command (packages/cli/api/discover/discover.type.mjs:88), so reuse FR16's wording, with its release-move exception, in both.
  • docs/specs/AST-039/spec.md fails the formatter at the FR16 verification row (line 221), which fails the lint check; run pnpm exec prettier --write docs/specs/AST-039/spec.md.

FR16's verification row also names template and theme-editor tests that are not here yet; add them with the fixes. The earlier copy of the per-project record is fixed: the guidance now reads the shared cliCommand record.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • An integration can give one install-guidance line with a {packages} placeholder: verified (authoring/integration/schema.mjs:128-141; parse.test.mjs)
  • Template readiness and init's theme step print it: verified (foundation/discovery/template-needs.mjs:367-371, :298-301; init.next-steps.test.mjs)
  • Doctor's fixes print it: partly false (the theme fixes do; the core-installed and peer-deps fixes do not, api/doctor/doctor.mjs:359, :1023)
  • Theme hints and errors print it: partly false (the theme build suggestion and the theme-import error do; the missing-Core error does not, api/theme/build/build.mjs:635)
  • theme eject prints it: verified (api/theme/_adapter.mjs:918-922, clients/cli/commands/theme.mjs:971-972; surfaces test)
  • The theme editor's notes print it: partly false (installLine does; the page notes do not, api/theme-edit/_preview-app.mjs:4063-4068)
  • discover's add commands print it: verified (api/discover/_adapter.mjs:613-614; surfaces test)
  • The template and theme eject receipts carry it beside installCommand: verified (api/template/copy/copy.mjs:187, api/theme/eject/eject.mjs:107); the template field has no test
  • Steps that move Astryx's own packages to another release keep the package-manager command: false for doctor's Core range fix (api/doctor/_adapter.mjs:753-754; surfaces test lines 86-88)
  • Two different lines cancel out and a doctor check warns: verified (foundation/env/cli-command.mjs chooseDeclaredValue; doctor.test.mjs, install-guidance.test.mjs)
  • An invalid line is ignored with a warning and the rest of the manifest loads: verified (foundation/integrations/integrations.mjs loadManifest; project.test.mjs)
  • integration check marks the invalid-line note next: verified by reading (api/integration/validate-integration.mjs:990-998); no test
  • One per-project record serves cliCommand and installGuidance: verified (foundation/env/cli-command.mjs recordDeclaredSettings; install-guidance.test.mjs)
  • Every printer of a step that adds packages the app lacks reads it: false (the theme editor page notes and four hard-coded hints)
  • No field is renamed or removed, and callers with no guidance see no change: verified (surfaces test without guidance; the renamed recorder is internal)
  • No integration fills the field yet: verified (no shipped manifest sets it)
  • The listed test suites pass: verified at this head
  • The structure, changeset and README checks pass: not verified here

Files:

  • .changeset/integration-install-guidance.md: finding: "doctor's fixes, theme hints and errors", "the theme editor's notes" and the release-move exception are not all met
  • docs/specs/AST-039/spec.md: finding: the FR16 verification row fails the formatter; FR16 is owner-approved for this head
  • packages/cli/api/discover/_adapter.mjs: clear
  • packages/cli/api/doctor/_adapter.mjs: finding: coreAddCommand prints the guidance for a release move
  • packages/cli/api/doctor/doctor.mjs: finding: the new check is fine; the core-installed and peer-deps fixes still hard-code npm install
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/api/doctor/theme-checks.mjs: clear (the Core range fix it calls is the _adapter.mjs finding)
  • packages/cli/api/doctor/theme-checks.test.mjs: clear
  • packages/cli/api/init/run/run.mjs: clear
  • packages/cli/api/integration/validate-integration.mjs: clear (the next note has no test)
  • packages/cli/api/integration/validate-integration.type.mjs: clear
  • packages/cli/api/integration/validateIntegration.doc.mjs: clear
  • packages/cli/api/template/copy/copy.mjs: clear (the new receipt field has no test)
  • packages/cli/api/template/template.doc.mjs: clear
  • packages/cli/api/template/template.type.mjs: clear
  • packages/cli/api/theme-edit/_preview-app.mjs: finding: the page notes still use the package-manager command
  • packages/cli/api/theme-edit/_project.mjs: clear
  • packages/cli/api/theme/_adapter.mjs: clear
  • packages/cli/api/theme/build/build.mjs: finding: the suggestion is fine; the missing-Core error still hard-codes npm install
  • packages/cli/api/theme/eject/eject.mjs: clear
  • packages/cli/api/theme/theme.type.mjs: clear
  • packages/cli/api/theme/themeEject.doc.mjs: clear
  • packages/cli/assets/docs/tree/checks.doc.mjs: clear
  • packages/cli/assets/docs/tree/troubleshooting.doc.mjs: clear
  • packages/cli/authoring/integration/integration.doc.mjs: finding: "wherever it would print an install command" with three surfaces
  • packages/cli/authoring/integration/parse.test.mjs: clear
  • packages/cli/authoring/integration/schema.mjs: non-blocking: the second 240-code-point check never runs
  • packages/cli/authoring/integration/type.ts: finding: the same wording as the field docs
  • packages/cli/clients/cli/commands/init.next-steps.test.mjs: clear
  • packages/cli/clients/cli/commands/theme.mjs: clear
  • packages/cli/clients/cli/index.mjs: clear
  • packages/cli/foundation/config/project.mjs: clear
  • packages/cli/foundation/config/project.test.mjs: clear
  • packages/cli/foundation/discovery/template-needs.mjs: clear
  • packages/cli/foundation/discovery/theme-imports.mjs: clear (no test with guidance)
  • packages/cli/foundation/env/cli-command.mjs: clear (the earlier record-copy finding is fixed here)
  • packages/cli/foundation/env/cli-command.test.mjs: clear
  • packages/cli/foundation/env/install-guidance.mjs: clear
  • packages/cli/foundation/env/install-guidance.test.mjs: clear
  • packages/cli/foundation/env/package-manager.test.mjs: clear
  • packages/cli/foundation/integrations/integrations.mjs: clear
  • packages/cli/foundation/integrations/validate-contributions.mjs: clear
  • packages/cli/foundation/release/notices.mjs: clear
  • packages/cli/foundation/release/notices.test.mjs: clear
  • packages/cli/test/install-guidance-surfaces.test.mjs: finding: asserts the guidance for coreAddCommand on a release move (lines 86-88)

Automated review (maintainer link)

Comment thread packages/cli/api/doctor/_adapter.mjs Resolved
Comment thread docs/specs/AST-039/spec.md Resolved
@josephfarina
josephfarina force-pushed the integration-install-guidance branch from e2c9cd1 to 0e0fbac Compare November 17, 2026 06:36
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 0e0fbac

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested. The owner approval at this head settles spec:AST-039 FR16, and the spec record's formatting is fixed; four fixes remain.

  • coreAddCommand prints the integration's guidance for doctor's Core range fix (packages/cli/api/doctor/_adapter.mjs:753), which moves an installed Core into a theme's range, so the line drops the required range and breaks FR16's rule that release moves keep the package-manager command; drop that branch and expect pnpm add in packages/cli/test/install-guidance-surfaces.test.mjs:91-93.
  • The theme editor's page notes still print pnpm add … in an app that gives guidance, because pageNeeds prefers needs.installCommand (packages/cli/api/theme-edit/_preview-app.mjs:4064-4065); use needs.installGuidance first, or installLine(cwd, [...needs.missingPackages, ...undeclared]).
  • Miss: doctor's core-installed and peer-deps fixes (packages/cli/api/doctor/doctor.mjs:359, :1023), the theme build missing-Core error (packages/cli/api/theme/build/build.mjs:635) and render's missing-dependency suggestion (packages/cli/api/render/_adapter.mjs:414) still hard-code npm install, though FR16, the changeset and the description say every add step follows the guidance; build them with installStepFor, or narrow those claims.
  • The field docs (packages/cli/authoring/integration/integration.doc.mjs:129, packages/cli/authoring/integration/type.ts:93-96) say the guidance replaces every install command yet list only three surfaces, and the discover docs still call install a package-manager command (packages/cli/api/discover/discover.type.mjs:88); reuse FR16's wording with its release-move exception.

FR16's verification row also names template and theme-editor tests over a fixture integration, so please add one for the template setup note or the template.copy receipt and one for the theme editor page notes with guidance set. The second 240-code-point check in installGuidanceSchema (packages/cli/authoring/integration/schema.mjs:134-140) still never runs; that one is optional.

Claims and files checked

Review mode: full; reason: history

Claims:

  • Changeset: an integration can declare one installGuidance line with a {packages} placeholder — verified (schema.mjs:128-141, parse.test.mjs).
  • Changeset: template readiness, init, doctor's fixes, theme hints and errors, theme eject, the theme editor's notes and discover print the line — false in part: doctor core-installed and peer-deps, the theme build missing-Core error and the theme editor page notes do not (findings 2 and 3).
  • Changeset: the template and theme eject receipts carry installGuidance beside installCommand — verified (copy.mjs:185, eject.mjs:107).
  • Changeset: steps that move Astryx's own packages to another release keep the package-manager command — false for coreAddCommand (finding 1); verified for update notices.
  • Changeset: two different lines cancel out and the new doctor check warns — verified (doctor.mjs:1899-1930, doctor.test.mjs).
  • Changeset: an invalid line is ignored with an invalid_install_guidance warning — verified (validate-contributions.mjs:2236-2243, project.test.mjs).
  • Description: one per-project record keeps both integration settings, and one chooser serves both — verified (cli-command.mjs recordDeclaredSettings, chooseDeclaredValue).
  • Description: installCommandFor returns the guidance beside an unchanged installCommand — verified (template-needs.mjs:273-286, project.test.mjs).
  • Description: installStepFor prints the guidance, then the package-manager command, then the fallback — verified (template-needs.mjs:298-310).
  • Description: every printer of a step that adds packages the app lacks reads the guidance — false (findings 2 and 3).
  • Description: release moves keep the package-manager command — false for coreAddCommand (finding 1).
  • Description: the field is one line of at most 240 code points with the same line rules as cliCommand — verified (shared invalidAgentDocLine).
  • Description: the doctor check shows only when an integration gives guidance — verified (doctor.mjs:1930 returns null).
  • Description: the invalid-guidance note is marked next in integration check — verified by reading (validate-integration.mjs:999-1001); no test.
  • Description: receipts add the key only when present and nothing is renamed or removed — verified.
  • Description: callers without guidance see no change — verified (surfaces test, first case; the theme editor's install command gives the same strings as before).
  • Description: the listed tests pass — verified; the targeted CLI suites pass.
  • Description: no integration fills the field yet — verified (no manifest in the repository sets it).

Files:

  • packages/cli/api/doctor/_adapter.mjs: finding 1.
  • packages/cli/test/install-guidance-surfaces.test.mjs: asserts finding 1's behaviour (:91-93).
  • packages/cli/api/theme-edit/_preview-app.mjs: finding 2; the new install-command helper is equivalent.
  • packages/cli/api/doctor/doctor.mjs: new check clear; finding 3 sits in unchanged lines here.
  • packages/cli/api/theme/build/build.mjs: suggestion change clear; finding 3 sits in an unchanged line here.
  • .changeset/integration-install-guidance.md: false claims (findings 1 to 3).
  • docs/specs/AST-039/spec.md: FR16 owner-approved; formatting fixed; its verification row names tests the head lacks.
  • packages/cli/authoring/integration/integration.doc.mjs, packages/cli/authoring/integration/type.ts: finding 4.
  • packages/cli/authoring/integration/schema.mjs: optional dead length check.
  • Clear: api/discover/_adapter.mjs, api/doctor/doctor.test.mjs, api/doctor/theme-checks.mjs, api/doctor/theme-checks.test.mjs, api/init/run/run.mjs, api/integration/validate-integration.mjs, api/integration/validate-integration.type.mjs, api/integration/validateIntegration.doc.mjs, api/template/copy/copy.mjs, api/template/template.doc.mjs, api/template/template.type.mjs, api/theme-edit/_project.mjs, api/theme/_adapter.mjs, api/theme/eject/eject.mjs, api/theme/theme.type.mjs, api/theme/themeEject.doc.mjs, assets/docs/tree/checks.doc.mjs, assets/docs/tree/troubleshooting.doc.mjs, authoring/integration/parse.test.mjs, clients/cli/commands/init.next-steps.test.mjs, clients/cli/commands/theme.mjs, clients/cli/index.mjs, foundation/config/project.mjs, foundation/config/project.test.mjs, foundation/discovery/template-needs.mjs, foundation/discovery/theme-imports.mjs, foundation/env/cli-command.mjs, foundation/env/cli-command.test.mjs, foundation/env/install-guidance.mjs, foundation/env/install-guidance.test.mjs, foundation/env/package-manager.test.mjs, foundation/integrations/integrations.mjs, foundation/integrations/validate-contributions.mjs, foundation/release/notices.mjs, foundation/release/notices.test.mjs (all under packages/cli/).

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the integration-install-guidance branch from 0e0fbac to b79d35c Compare November 17, 2026 06:56
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b79d35c

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested. The owner approval at this head settles spec:AST-039 FR16, and the last review's fixes landed: the Core range fix keeps its command, and the theme editor page notes and the four hard-coded hints now follow the guidance.

  • Miss: CI's test-node (1/8) fails because the new invalid_install_guidance code is missing from packages/cli/test/integration-check-failures.json (integration-check-failures.test.mjs:295), so add it there beside invalid_cli_command.
  • Miss: with guidance, discover's add command and addMatchingCore print bare package names (packages/cli/api/discover/_adapter.mjs:613, packages/cli/foundation/release/notices.mjs:479), so an official package that releases at Core's version loses the Core pin that spec:AST-051 FR11 requires and discover <package>@<version> loses the asked version; fill {packages} with the spec the command would print (for example @astryxdesign/[email protected]), or amend FR11.
  • Miss: the theme editor's new installCommandOf (packages/cli/api/theme-edit/_preview-app.mjs:4085-4088) copies installDependenciesCommand from packages/cli/foundation/env/package-manager.mjs, so call that instead.
  • discover's docs still describe meta.available's install as a command (packages/cli/api/discover/discover.doc.mjs:94), so reuse the wording you wrote at discover.type.mjs:88.
  • Miss: discover.detail's install is still documented as the package-manager command (packages/cli/api/discover/discover.type.mjs:121, packages/cli/api/discover/detail/detail.mjs:20), though it can now hold the guidance line.
  • The description says callers without guidance see no change and that the fallback prints npm install with a note, but doctor's core-installed and peer-deps fixes, the theme build no-Core message and render now print the project's package manager without guidance, and render drops the note (packages/cli/api/render/_adapter.mjs:416), so correct the description and changeset and put the note in render's reason.

FR16's verification row also names template and theme-editor tests over a fixture integration, so please add one for the template setup note or the template.copy receipt and one for the theme editor page notes with guidance set. A few smaller points are inline.

Claims and files checked

Review mode: full; reason: history

Claims:

  • Changeset: an integration can declare one install-guidance line with a packages placeholder — verified (schema.mjs, parse.test.mjs).
  • Changeset: template readiness, init's theme step, doctor fixes, theme hints and errors, theme eject, the theme editor's notes and discover print the line — verified (surfaces, init and theme-checks tests; page notes and peer-deps by reading and a probe); the pinned versions are dropped (second finding).
  • Changeset: the template and theme eject receipts carry it beside installCommand — verified (copy.mjs:185, eject.mjs:107).
  • Changeset: steps that move Astryx's own packages to another release keep the package-manager command — verified (surfaces test for the Core range fix; update notices unchanged).
  • Changeset: two different lines cancel out and a doctor check warns — verified (doctor.test.mjs).
  • Changeset: an invalid line is ignored with a warning — verified (project.test.mjs).
  • Description: one per-project record keeps both integration settings, read by one chooser — verified (cli-command.mjs:173).
  • Description: installCommandFor returns the guidance beside an unchanged installCommand — verified (project.test.mjs).
  • Description: installStepFor prints the guidance, then the package-manager command, then the fallback with its note — verified (template-needs.mjs:298-309).
  • Description: every listed printer of an add step reads the guidance — verified.
  • Description: the hints that printed a fixed npm install print the project's step, with a note in the fallback — false for render's note (last finding).
  • Description: release moves keep the package-manager command, and a peer at the wrong version gets the line plus the version it needs — verified (probe).
  • Description: the field is one line of at most 240 code points, typed and documented — verified.
  • Description: the doctor check shows only when an integration gives guidance, and the invalid-value code is a next note in integration check — verified (doctor.test.mjs; validate-integration.mjs:996-1003 by reading); its code is missing from the failure list (first finding).
  • Description: receipts add the key only when present, and nothing is renamed or removed — verified.
  • Description: callers with no integration guidance see no change — false (last finding).
  • Description: the listed suites pass — verified locally; CI's test-node (1/8) fails on the failure-code list (first finding).
  • Description: no integration fills the field yet — verified (no manifest in the repository sets it).

Files:

  • packages/cli/foundation/integrations/validate-contributions.mjs: first finding.
  • packages/cli/api/discover/_adapter.mjs, packages/cli/foundation/release/notices.mjs: second finding.
  • packages/cli/api/theme-edit/_preview-app.mjs: third finding; two inline notes.
  • packages/cli/api/discover/discover.type.mjs: fifth finding (line 121); line 88 clear.
  • packages/cli/api/render/_adapter.mjs: last finding.
  • packages/cli/api/doctor/doctor.mjs: new check clear; one inline note on peer names.
  • docs/specs/AST-039/spec.md: FR16 owner-approved; its verification row names tests the head lacks.
  • .changeset/integration-install-guidance.md: claims verified; it does not mention the package-manager change (last finding).
  • packages/cli/authoring/integration/schema.mjs: optional dead length check, still open.
  • Clear: api/doctor/doctor.test.mjs, api/doctor/theme-checks.mjs, api/doctor/theme-checks.test.mjs, api/init/run/run.mjs, api/integration/validate-integration.mjs, api/integration/validate-integration.type.mjs, api/integration/validateIntegration.doc.mjs, api/template/copy/copy.mjs, api/template/template.doc.mjs, api/template/template.type.mjs, api/theme-edit/_project.mjs, api/theme/_adapter.mjs, api/theme/build/build.mjs, api/theme/eject/eject.mjs, api/theme/theme.type.mjs, api/theme/themeEject.doc.mjs, assets/docs/tree/checks.doc.mjs, assets/docs/tree/troubleshooting.doc.mjs, authoring/integration/integration.doc.mjs, authoring/integration/parse.test.mjs, authoring/integration/type.ts, clients/cli/commands/init.next-steps.test.mjs, clients/cli/commands/theme.mjs, clients/cli/index.mjs, foundation/config/project.mjs, foundation/config/project.test.mjs, foundation/discovery/template-needs.mjs, foundation/discovery/theme-imports.mjs, foundation/env/cli-command.mjs, foundation/env/cli-command.test.mjs, foundation/env/install-guidance.mjs, foundation/env/install-guidance.test.mjs, foundation/env/package-manager.test.mjs, foundation/integrations/integrations.mjs, foundation/release/notices.test.mjs, test/install-guidance-surfaces.test.mjs (all under packages/cli/).

Automated review (maintainer link)

Comment thread packages/cli/api/discover/_adapter.mjs Resolved
Comment thread packages/cli/api/render/_adapter.mjs Resolved
Comment thread packages/cli/api/doctor/doctor.mjs Resolved
@josephfarina
josephfarina force-pushed the integration-install-guidance branch from b79d35c to c28d837 Compare November 17, 2026 08:38
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec c28d837

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 3b7a5e2

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested, though the owner approval at this head settles spec:AST-039 FR16 and the last review's fixes landed (the failure-code list, the pinned versions in discover and addMatchingCore, the theme editor's install command, the discover docs and the description).

  • Miss: with guidance, discover and the template setup notes print the line where current spec:AST-051 FR1 and FR2 require "the package-manager command that adds it" (and spec:AST-048 FR21 and spec:AST-081 FR12 name the install command), and FR16's record stays draft after merge, so amend those clauses in this pull request to name FR16's line.
  • Miss: the no-CLI hint and doctor's version-alignment fix still print pnpm add -E @astryxdesign/cli@<core> with guidance (packages/cli/foundation/release/notices.mjs:702, packages/cli/api/doctor/doctor.mjs:462), though FR16 and the changeset say every add step and doctor fix prints the line, so either name this step in FR16's exception (current spec:AST-081 FR2 keeps the package manager there) or amend AST-081 FR2 and fill it from the guidance.
  • The theme-import error asks for the guidance with the bare package before addMatchingCore runs (packages/cli/foundation/discovery/theme-imports.mjs:187-189), so it still drops Core's release (Add @astryxdesign/theme-neutral to package.json, … where the command names @0.7.16); drop that call and let addMatchingCore return the line.

FR16's verification row also names template and theme-editor tests over a fixture integration, so please add one for the template setup note or the template.copy receipt and one for the theme editor's page notes with guidance set. CI's heavy jobs did not run on this head because the run found no room under the CI ceiling, so they need a re-run. Smaller points stay in the open inline threads on schema.mjs and doctor.mjs, and the --strict option docs still name only invalid_cli_command.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • Changeset: an integration can declare one install-guidance line with a packages placeholder — verified (schema.mjs:128, parse.test.mjs).
  • Changeset: template readiness, init's theme step, doctor's fixes, theme hints and errors, theme eject, the theme editor's notes and discover print the line — verified for each surface except doctor's version-alignment fix (second finding); the theme-import error prints it without Core's release (third finding).
  • Changeset: the template and theme eject receipts carry it beside installCommand — verified (copy.mjs:185, eject.mjs:107).
  • Changeset: steps that move Astryx's own packages to another release keep the package-manager command — verified (surfaces test).
  • Changeset: without guidance, doctor's Core and peer fixes, the theme build no-Core message and render's suggestion name the project's package manager — verified (doctor.test.mjs, surfaces test).
  • Changeset: two different lines cancel out and a doctor check warns — verified (install-guidance.test.mjs, doctor.test.mjs).
  • Changeset: an invalid line is ignored with a warning — verified (project.test.mjs).
  • Description: one per-project record keeps both integration settings, read by one chooser — verified (cli-command.mjs).
  • Description: installCommandFor returns the guidance with bare names beside an unchanged installCommand — verified (project.test.mjs).
  • Description: where a command pins a version, the guidance names the same version — verified for discover and addMatchingCore; false for the theme-import error (third finding).
  • Description: installStepFor prints the guidance, then the package-manager command, then npm install with its note — verified (template-needs.mjs:329-340).
  • Description: every printer of a step that adds packages the app lacks reads the guidance — false for the no-CLI step (second finding).
  • Description: hints that printed a fixed npm install now print the project's step, and render puts the note in its reason — verified (render/_adapter.mjs:415-421, probe).
  • Description: release moves keep the package-manager command, and a peer at the wrong version gets the line plus the version it needs — verified for release moves and peers (doctor.mjs:354-363); the no-CLI match step adds a package the project lacks (second finding).
  • Description: the field is one line of at most 240 code points, typed and documented — verified.
  • Description: the doctor check shows only with guidance, and the invalid-value code is a next note in integration check — verified (doctor.test.mjs; validate-integration.mjs:493-501, :1000-1007).
  • Description: receipts add the key only when present, and nothing is renamed or removed — verified.
  • Description: without guidance, output is unchanged except four hints — verified (the theme editor's install command keeps its text through installDependenciesCommand).
  • Description: the listed suites pass — verified locally (22 files); CI's heavy jobs did not run on this head.
  • Description: no integration fills the field yet — verified (no manifest in the repository sets it).
  • Description: stacked on the install-command fix, to be retargeted to main — outdated: the pull request targets main.

Files:

  • docs/specs/AST-039/spec.md: FR16 owner-approved; first and second findings; its verification row names tests the head lacks.
  • .changeset/integration-install-guidance.md: verified, except doctor's fixes (second finding).
  • packages/cli/api/discover/_adapter.mjs, packages/cli/foundation/release/notices.mjs: first finding; the pins are clear.
  • packages/cli/foundation/discovery/template-needs.mjs: first finding (template notes).
  • packages/cli/foundation/discovery/theme-imports.mjs: third finding.
  • packages/cli/api/doctor/doctor.mjs: new check clear; second finding (unchanged version-alignment fix); peer names non-blocking.
  • packages/cli/authoring/integration/schema.mjs: dead length check, non-blocking.
  • packages/cli/api/theme-edit/_preview-app.mjs: clear; two non-blocking notes.
  • packages/cli/api/integration/validate-integration.mjs: clear; the --strict option docs elsewhere still name only invalid_cli_command.
  • Clear (all under packages/cli/): api/discover/detail/detail.mjs, api/discover/discover.doc.mjs, api/discover/discover.type.mjs, api/doctor/doctor.test.mjs, api/doctor/theme-checks.mjs, api/doctor/theme-checks.test.mjs, api/init/run/run.mjs, api/integration/validate-integration.type.mjs, api/integration/validateIntegration.doc.mjs, api/render/_adapter.mjs, api/template/copy/copy.mjs, api/template/template.doc.mjs, api/template/template.type.mjs, api/theme-edit/_project.mjs, api/theme/_adapter.mjs, api/theme/build/build.mjs, api/theme/eject/eject.mjs, api/theme/theme.type.mjs, api/theme/themeEject.doc.mjs, assets/docs/tree/checks.doc.mjs, assets/docs/tree/troubleshooting.doc.mjs, authoring/integration/integration.doc.mjs, authoring/integration/parse.test.mjs, authoring/integration/type.ts, clients/cli/commands/init.next-steps.test.mjs, clients/cli/commands/theme.mjs, clients/cli/index.mjs, foundation/config/project.mjs, foundation/config/project.test.mjs, foundation/env/cli-command.mjs, foundation/env/cli-command.test.mjs, foundation/env/install-guidance.mjs, foundation/env/install-guidance.test.mjs, foundation/env/package-manager.test.mjs, foundation/integrations/integrations.mjs, foundation/integrations/validate-contributions.mjs, foundation/release/notices.test.mjs, test/install-guidance-surfaces.test.mjs, test/integration-check-failures.json.

Automated review (maintainer link)

Comment thread docs/specs/AST-039/spec.md Resolved
Comment thread docs/specs/AST-039/spec.md Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not finished on this head yet.

The spec owner's approval still holds at this head, since the rebase leaves the spec records unchanged and only reorders render's missing-package suggestion so the integration's line comes first. The tests for every surface the new requirement lists pass. Nothing blocks; these are worth fixing here or in a follow-up:

  • The theme editor's TypeScript hint inserts -D after the first add or install in whatever line it gets (packages/cli/api/theme-edit/_preview-app.mjs:720), so guidance such as Ask the platform team to add {packages} prints Ask the platform team to add -D typescript …; apply -D only when no guidance is set.
  • The field docs (packages/cli/authoring/integration/type.ts:97-99, packages/cli/authoring/integration/integration.doc.mjs:129) name only the release-move exception; add the exception for adding @astryxdesign/cli at the project's Core release, as the spec and changeset state.
  • The integrationCheck API's --strict docs (packages/cli/api/integration/integrationCheck.doc.mjs:45) still name only invalid_cli_command.
  • The description calls the chooser chooseInstallGuidance (it is chooseDeclaredValue), and its line about being stacked on another pull request is outdated.
Claims and files checked

Review mode: full; reason: rebase

  • Changeset: installGuidance is one manifest line with a {packages} placeholder: verified (authoring/integration/schema.mjs, foundation/integrations/integrations.mjs, authoring/integration/parse.test.mjs).
  • Changeset: template readiness, init's theme step, doctor's fixes, theme hints and errors, theme eject, the theme editor's notes and discover's add commands print the line instead of the package-manager command: verified (test/install-guidance-surfaces.test.mjs, clients/cli/commands/init.next-steps.test.mjs, api/doctor/theme-checks.test.mjs).
  • Changeset: the template and theme eject receipts carry installGuidance beside installCommand: verified (api/template/copy/copy.mjs:185, api/theme/eject/eject.mjs:107).
  • Changeset: steps that move Astryx's own packages to another release, or add @astryxdesign/cli at the project's Core release, keep the package-manager command: verified (coreAddCommand and addCliCommand never read the guidance; surfaces test).
  • Changeset: without guidance, doctor's Core and peer-dependency fixes, theme build's no-Core message and render's missing-package suggestion name the project's package manager: verified (api/doctor/doctor.mjs:403, :374, api/theme/build/build.mjs:616, api/render/_adapter.mjs:428, api/doctor/doctor.test.mjs).
  • Changeset: two different lines cancel out and a new install-guidance doctor check warns: verified (foundation/env/install-guidance.test.mjs, api/doctor/doctor.test.mjs).
  • Changeset: an invalid line is ignored with an invalid_install_guidance warning: verified (foundation/config/project.test.mjs).
  • Description: one per-project record and one chooser serve both cliCommand and installGuidance: verified (foundation/env/cli-command.mjs); the chooser is named chooseDeclaredValue, not chooseInstallGuidance.
  • Description: an add that pins a version (an official package at the project's Core, discover <package>@<version>) names that version in the line: verified (surfaces test, "names the version the command would add").
  • Description: a peer at the wrong version gets the line followed by the version it needs: verified (api/doctor/doctor.mjs:366).
  • Description: the field is one line of at most 240 code points under the same line rules as cliCommand: verified (authoring/integration/schema.mjs, parse test).
  • Description: integration check reports a malformed value as a note marked for the next minor: verified (api/integration/validate-integration.mjs:496, :1004, test/integration-check-failures.json).
  • Description: the discover, build-recommendation and computer-level-integration requirements now allow the line in place of the install command: verified (the three record diffs).
  • Description: the JSON receipts add installGuidance only when present, and no field is renamed or removed: verified.
  • Description: the listed tests and the CLI structure, changeset and README checks pass: verified (the listed test files and the three checks pass at this head).
  • Description: stacked on the install-command fix, to retarget to main later: outdated (the pull request is one commit on main and targets it).
  • .changeset/integration-install-guidance.md: clear
  • docs/specs/AST-039/spec.md: clear
  • docs/specs/AST-048-build-recommendation/spec.md: clear
  • docs/specs/AST-051-discover-integration-manager/spec.md: clear
  • docs/specs/AST-081-global-mode/spec.md: clear
  • packages/cli/README.md: clear
  • packages/cli/api/discover/_adapter.mjs: clear
  • packages/cli/api/discover/detail/detail.mjs: clear
  • packages/cli/api/discover/discover.doc.mjs: clear
  • packages/cli/api/discover/discover.type.mjs: clear
  • packages/cli/api/doctor/doctor.mjs: clear
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/api/doctor/theme-checks.mjs: clear
  • packages/cli/api/doctor/theme-checks.test.mjs: clear
  • packages/cli/api/init/run/run.mjs: clear
  • packages/cli/api/integration/validate-integration.mjs: clear
  • packages/cli/api/integration/validate-integration.type.mjs: clear
  • packages/cli/api/integration/validateIntegration.doc.mjs: clear
  • packages/cli/api/render/_adapter.mjs: clear
  • packages/cli/api/template/copy/copy.mjs: clear
  • packages/cli/api/template/template.doc.mjs: clear
  • packages/cli/api/template/template.type.mjs: clear
  • packages/cli/api/theme-edit/_preview-app.mjs: non-blocking: the TypeScript hint at line 720 inserts -D into a guidance line
  • packages/cli/api/theme-edit/_project.mjs: clear
  • packages/cli/api/theme/_adapter.mjs: clear
  • packages/cli/api/theme/build/build.mjs: clear
  • packages/cli/api/theme/eject/eject.mjs: clear
  • packages/cli/api/theme/theme.type.mjs: clear
  • packages/cli/api/theme/themeEject.doc.mjs: clear
  • packages/cli/assets/docs/tree/checks.doc.mjs: clear
  • packages/cli/assets/docs/tree/troubleshooting.doc.mjs: clear
  • packages/cli/authoring/integration/integration.doc.mjs: non-blocking: the field description names only the release-move exception
  • packages/cli/authoring/integration/parse.test.mjs: clear
  • packages/cli/authoring/integration/schema.mjs: clear
  • packages/cli/authoring/integration/type.ts: non-blocking: the JSDoc names only the release-move exception
  • packages/cli/clients/cli/commands/init.next-steps.test.mjs: clear
  • packages/cli/clients/cli/commands/integration-check.doc.mjs: clear
  • packages/cli/clients/cli/commands/theme.mjs: clear
  • packages/cli/clients/cli/index.mjs: clear
  • packages/cli/foundation/config/project.mjs: clear
  • packages/cli/foundation/config/project.test.mjs: clear
  • packages/cli/foundation/discovery/template-needs.mjs: clear
  • packages/cli/foundation/env/cli-command.mjs: clear
  • packages/cli/foundation/env/cli-command.test.mjs: clear
  • packages/cli/foundation/env/install-guidance.mjs: clear
  • packages/cli/foundation/env/install-guidance.test.mjs: clear
  • packages/cli/foundation/env/package-manager.test.mjs: clear
  • packages/cli/foundation/integrations/integrations.mjs: clear
  • packages/cli/foundation/integrations/validate-contributions.mjs: clear
  • packages/cli/foundation/release/notices.mjs: clear
  • packages/cli/foundation/release/notices.test.mjs: clear
  • packages/cli/foundation/response/response-types.doc.mjs: clear
  • packages/cli/test/install-guidance-surfaces.test.mjs: clear
  • packages/cli/test/integration-check-failures.json: clear

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one fix is needed, and the spec direction itself is approved at this head.

  • Found by CI: packages/cli/foundation/release/notices.mjs:72 imports the new packages/cli/foundation/env/install-guidance.mjs, which every CLI run loads through the update notices, so astryx --version loads 74 of the CLI's own modules against the 73 that packages/cli/clients/cli/startup-imports.test.mjs allows and the required test-node (4/9) job fails; define installGuidanceFor in packages/cli/foundation/env/cli-command.mjs, which every run already loads, or raise the limit on purpose with the reason.

Also worth fixing, though none of these blocks:

  • The theme editor's TypeScript hint inserts -D after the first add or install in whatever line it gets (packages/cli/api/theme-edit/_preview-app.mjs:720), so guidance such as Ask the platform team to add {packages} prints Ask the platform team to add -D typescript …; apply -D only when no guidance is set.
  • The field docs (packages/cli/authoring/integration/type.ts:97-99, packages/cli/authoring/integration/integration.doc.mjs:129) name only the release-move exception; add the exception for adding @astryxdesign/cli at the project's Core release, as the spec and changeset state.
  • The integrationCheck API's --strict docs (packages/cli/api/integration/integrationCheck.doc.mjs:45) still name only invalid_cli_command.
  • The description calls the chooser chooseInstallGuidance (it is chooseDeclaredValue), and its line about being stacked on another pull request is outdated.
Claims and files checked

Review mode: full; reason: rebase

  • Changeset: installGuidance is one manifest line with a {packages} placeholder: verified (authoring/integration/schema.mjs, foundation/integrations/integrations.mjs, authoring/integration/parse.test.mjs).
  • Changeset: template readiness, init's theme step, doctor's fixes, theme hints and errors, theme eject, the theme editor's notes and discover's add commands print the line instead of the package-manager command: verified (test/install-guidance-surfaces.test.mjs, clients/cli/commands/init.next-steps.test.mjs, api/doctor/theme-checks.test.mjs).
  • Changeset: the template and theme eject receipts carry installGuidance beside installCommand: verified (api/template/copy/copy.mjs:185, api/theme/eject/eject.mjs:107).
  • Changeset: steps that move Astryx's own packages to another release, or add @astryxdesign/cli at the project's Core release, keep the package-manager command: verified (coreAddCommand and addCliCommand never read the guidance; surfaces test).
  • Changeset: without guidance, doctor's Core and peer-dependency fixes, theme build's no-Core message and render's missing-package suggestion name the project's package manager: verified (api/doctor/doctor.mjs:403, :374, api/theme/build/build.mjs:616, api/render/_adapter.mjs:428, api/doctor/doctor.test.mjs).
  • Changeset: two different lines cancel out and a new install-guidance doctor check warns: verified (foundation/env/install-guidance.test.mjs, api/doctor/doctor.test.mjs).
  • Changeset: an invalid line is ignored with an invalid_install_guidance warning: verified (foundation/config/project.test.mjs).
  • Description: one per-project record and one chooser serve both cliCommand and installGuidance: verified (foundation/env/cli-command.mjs); the chooser is named chooseDeclaredValue, not chooseInstallGuidance.
  • Description: an add that pins a version (an official package at the project's Core, discover <package>@<version>) names that version in the line: verified (surfaces test, "names the version the command would add").
  • Description: a peer at the wrong version gets the line followed by the version it needs: verified (api/doctor/doctor.mjs:366).
  • Description: the field is one line of at most 240 code points under the same line rules as cliCommand: verified (authoring/integration/schema.mjs, parse test).
  • Description: integration check reports a malformed value as a note marked for the next minor: verified (api/integration/validate-integration.mjs:496, :1004, test/integration-check-failures.json).
  • Description: the discover, build-recommendation and computer-level-integration requirements now allow the line in place of the install command: verified (the three record diffs).
  • Description: the JSON receipts add installGuidance only when present, and no field is renamed or removed: verified.
  • Description: the listed tests and the CLI structure, changeset and README checks pass: verified (the listed test files and the three checks pass at this head).
  • Description: stacked on the install-command fix, to retarget to main later: outdated (the pull request is one commit on main and targets it).
  • .changeset/integration-install-guidance.md: clear
  • docs/specs/AST-039/spec.md: clear
  • docs/specs/AST-048-build-recommendation/spec.md: clear
  • docs/specs/AST-051-discover-integration-manager/spec.md: clear
  • docs/specs/AST-081-global-mode/spec.md: clear
  • packages/cli/README.md: clear
  • packages/cli/api/discover/_adapter.mjs: clear
  • packages/cli/api/discover/detail/detail.mjs: clear
  • packages/cli/api/discover/discover.doc.mjs: clear
  • packages/cli/api/discover/discover.type.mjs: clear
  • packages/cli/api/doctor/doctor.mjs: clear
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/api/doctor/theme-checks.mjs: clear
  • packages/cli/api/doctor/theme-checks.test.mjs: clear
  • packages/cli/api/init/run/run.mjs: clear
  • packages/cli/api/integration/validate-integration.mjs: clear
  • packages/cli/api/integration/validate-integration.type.mjs: clear
  • packages/cli/api/integration/validateIntegration.doc.mjs: clear
  • packages/cli/api/render/_adapter.mjs: clear
  • packages/cli/api/template/copy/copy.mjs: clear
  • packages/cli/api/template/template.doc.mjs: clear
  • packages/cli/api/template/template.type.mjs: clear
  • packages/cli/api/theme-edit/_preview-app.mjs: non-blocking: the TypeScript hint at line 720 inserts -D into a guidance line
  • packages/cli/api/theme-edit/_project.mjs: clear
  • packages/cli/api/theme/_adapter.mjs: clear
  • packages/cli/api/theme/build/build.mjs: clear
  • packages/cli/api/theme/eject/eject.mjs: clear
  • packages/cli/api/theme/theme.type.mjs: clear
  • packages/cli/api/theme/themeEject.doc.mjs: clear
  • packages/cli/assets/docs/tree/checks.doc.mjs: clear
  • packages/cli/assets/docs/tree/troubleshooting.doc.mjs: clear
  • packages/cli/authoring/integration/integration.doc.mjs: non-blocking: the field description names only the release-move exception
  • packages/cli/authoring/integration/parse.test.mjs: clear
  • packages/cli/authoring/integration/schema.mjs: clear
  • packages/cli/authoring/integration/type.ts: non-blocking: the JSDoc names only the release-move exception
  • packages/cli/clients/cli/commands/init.next-steps.test.mjs: clear
  • packages/cli/clients/cli/commands/integration-check.doc.mjs: clear
  • packages/cli/clients/cli/commands/theme.mjs: clear
  • packages/cli/clients/cli/index.mjs: clear
  • packages/cli/foundation/config/project.mjs: clear
  • packages/cli/foundation/config/project.test.mjs: clear
  • packages/cli/foundation/discovery/template-needs.mjs: clear
  • packages/cli/foundation/env/cli-command.mjs: clear
  • packages/cli/foundation/env/cli-command.test.mjs: clear
  • packages/cli/foundation/env/install-guidance.mjs: blocking: the module every run now loads through notices.mjs
  • packages/cli/foundation/env/install-guidance.test.mjs: clear
  • packages/cli/foundation/env/package-manager.test.mjs: clear
  • packages/cli/foundation/integrations/integrations.mjs: clear
  • packages/cli/foundation/integrations/validate-contributions.mjs: clear
  • packages/cli/foundation/release/notices.mjs: blocking: line 72 puts the new module on every run's startup path (74 modules against 73)
  • packages/cli/foundation/release/notices.test.mjs: clear
  • packages/cli/foundation/response/response-types.doc.mjs: clear
  • packages/cli/test/install-guidance-surfaces.test.mjs: clear
  • packages/cli/test/integration-check-failures.json: clear

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI admission refused this head's run ("CI is full"), so the required test jobs never started; re-run all jobs before merging.

No blocking finding remains. The startup-module regression from the last review is fixed: installGuidanceFor now lives in packages/cli/foundation/env/cli-command.mjs, which every run already loads, and packages/cli/clients/cli/startup-imports.test.mjs passes here. The four earlier non-blocking items (the theme editor's -D insertion, the field docs' missing CLI-add exception, the integrationCheck --strict docs and the description) are fixed too.

  • Optional, not blocking: packages/cli/foundation/env/install-guidance.test.mjs imports from ./cli-command.mjs twice; fold installGuidanceFor into the first import.
Claims and files checked

Review mode: full; reason: rebase

  • Changeset: installGuidance is one manifest line with a {packages} placeholder: verified (authoring/integration/schema.mjs:132-133, :239-251, foundation/integrations/integrations.mjs:283-299, authoring/integration/parse.test.mjs).
  • Changeset: template readiness, init's theme step, doctor's fixes, theme hints and errors, theme eject, the theme editor's notes and discover's add commands print the line instead of the package-manager command: verified (test/install-guidance-surfaces.test.mjs, clients/cli/commands/init.next-steps.test.mjs, api/doctor/theme-checks.test.mjs, and an end-to-end astryx discover run in a fixture app).
  • Changeset: the template and theme eject receipts carry installGuidance beside installCommand: verified (api/template/copy/copy.mjs:185, api/theme/eject/eject.mjs:107).
  • Changeset: steps that move Astryx's own packages to another release, or add the CLI at the project's Core release, keep the package-manager command: verified (coreAddCommand and addCliCommand never read the guidance; surfaces test and a direct probe).
  • Changeset: without guidance, doctor's Core and peer-dependency fixes, theme build's no-Core message and render's missing-package suggestion name the project's package manager: verified (api/doctor/doctor.mjs:403, :1296, api/theme/build/build.mjs:616, api/render/_adapter.mjs:428, api/doctor/doctor.test.mjs).
  • Changeset: two different lines cancel out and a new install-guidance doctor check warns: verified (foundation/env/install-guidance.test.mjs, api/doctor/doctor.test.mjs).
  • Changeset: an invalid line is ignored with an invalid_install_guidance warning: verified (foundation/config/project.test.mjs, and a doctor run on a fixture with a two-line value).
  • Description: one per-project record and one chooser serve both cliCommand and installGuidance: verified (foundation/env/cli-command.mjs:130, :173, :209).
  • Description: an add that pins a version (an official package at the project's Core, discover <package>@<version>) names that version in the line: verified (surfaces test, "names the version the command would add"; probe prints …[email protected]).
  • Description: a peer at the wrong version gets the line followed by the version it needs: verified (api/doctor/doctor.mjs:360-372).
  • Description: the field is one line of at most 240 code points under the same line rules as cliCommand: verified (authoring/integration/schema.mjs:132, parse test).
  • Description: integration check reports a malformed value as a note marked for the next minor: verified (api/integration/validate-integration.mjs:491-500, :997-1007, test/integration-check-failures.json and its test).
  • Description: the discover, build-recommendation and computer-level-integration requirements now allow the line in place of the install command: verified (the three record diffs).
  • Description: the JSON receipts add installGuidance only when present, and no field is renamed or removed: verified.
  • Description: the listed tests and the CLI structure, changeset and README checks pass: verified (23 test files, 646 passed and 2 skipped; check:cli-structure, check:changesets, check:knowledge and readme:check pass at this head).
  • .changeset/integration-install-guidance.md: clear
  • docs/specs/AST-039/spec.md: clear
  • docs/specs/AST-048-build-recommendation/spec.md: clear
  • docs/specs/AST-051-discover-integration-manager/spec.md: clear
  • docs/specs/AST-081-global-mode/spec.md: clear
  • packages/cli/README.md: clear (generated response-types block, in sync)
  • packages/cli/api/discover/_adapter.mjs: clear
  • packages/cli/api/discover/detail/detail.mjs: clear
  • packages/cli/api/discover/discover.doc.mjs: clear
  • packages/cli/api/discover/discover.type.mjs: clear
  • packages/cli/api/doctor/doctor.mjs: clear
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/api/doctor/theme-checks.mjs: clear
  • packages/cli/api/doctor/theme-checks.test.mjs: clear
  • packages/cli/api/init/run/run.mjs: clear
  • packages/cli/api/integration/integrationCheck.doc.mjs: clear
  • packages/cli/api/integration/validate-integration.mjs: clear
  • packages/cli/api/integration/validate-integration.type.mjs: clear
  • packages/cli/api/integration/validateIntegration.doc.mjs: clear
  • packages/cli/api/render/_adapter.mjs: clear
  • packages/cli/api/template/copy/copy.mjs: clear
  • packages/cli/api/template/template.doc.mjs: clear
  • packages/cli/api/template/template.type.mjs: clear
  • packages/cli/api/theme-edit/_preview-app.mjs: clear
  • packages/cli/api/theme-edit/_project.mjs: clear
  • packages/cli/api/theme/_adapter.mjs: clear
  • packages/cli/api/theme/build/build.mjs: clear
  • packages/cli/api/theme/eject/eject.mjs: clear
  • packages/cli/api/theme/theme.type.mjs: clear
  • packages/cli/api/theme/themeEject.doc.mjs: clear
  • packages/cli/assets/docs/tree/checks.doc.mjs: clear
  • packages/cli/assets/docs/tree/troubleshooting.doc.mjs: clear
  • packages/cli/authoring/integration/integration.doc.mjs: clear
  • packages/cli/authoring/integration/parse.test.mjs: clear
  • packages/cli/authoring/integration/schema.mjs: clear
  • packages/cli/authoring/integration/type.ts: clear
  • packages/cli/clients/cli/commands/init.next-steps.test.mjs: clear
  • packages/cli/clients/cli/commands/integration-check.doc.mjs: clear
  • packages/cli/clients/cli/commands/theme.mjs: clear
  • packages/cli/clients/cli/index.mjs: clear
  • packages/cli/foundation/config/project.mjs: clear
  • packages/cli/foundation/config/project.test.mjs: clear
  • packages/cli/foundation/discovery/template-needs.mjs: clear
  • packages/cli/foundation/env/cli-command.mjs: clear (now also defines installGuidanceFor, so no module joins the startup path)
  • packages/cli/foundation/env/cli-command.test.mjs: clear
  • packages/cli/foundation/env/install-guidance.test.mjs: non-blocking: two import statements from the same module
  • packages/cli/foundation/env/package-manager.test.mjs: clear
  • packages/cli/foundation/integrations/integrations.mjs: clear (five formatting-only reflows of existing lines)
  • packages/cli/foundation/integrations/validate-contributions.mjs: clear
  • packages/cli/foundation/release/notices.mjs: clear
  • packages/cli/foundation/release/notices.test.mjs: clear
  • packages/cli/foundation/response/response-types.doc.mjs: clear
  • packages/cli/test/install-guidance-surfaces.test.mjs: clear
  • packages/cli/test/integration-check-failures.json: clear

Automated review (maintainer link)

@josephfarina
josephfarina force-pushed the integration-install-guidance branch from 1dc9dd4 to 54a9081 Compare November 17, 2026 19:32
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 54a9081

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one fix is needed, and the spec direction itself is approved at this head.

  • Miss: astryx --json experimental theme preview add returns the integration's guidance line as skipped[].installCommand, with no installGuidance beside it (packages/cli/api/theme-edit/_preview-app.mjs:4080-4093), while FR16 says a receipt that has an installCommand carries the line beside it as installGuidance; keep the package-manager command in installCommand, add installGuidance to each skipped entry, and print installGuidance ?? installCommand in the notes and the run list.

Three small non-blocking notes: render's guidance suggestion keeps a reason that names only the first missing package; Miss: response-types.doc.mjs (the README's response table) and projectInstallStep's JSDoc still describe only the package-manager command; and install-guidance.test.mjs still imports from ./cli-command.mjs twice. CI admission refused this head's run ("CI is full"), so the required test jobs have not run yet; re-run all jobs after the fix.

Claims and files checked

Review mode: full; reason: rebase

  • Changeset: an integration can declare installGuidance, one line with a {packages} placeholder — verified (authoring/integration/schema.mjs:132-133, parse.test.mjs).
  • Changeset: steps that add packages the app lacks (template readiness, init's theme step, doctor fixes, theme hints and errors, theme eject, the theme editor's notes, discover) print the line — verified (test/install-guidance-surfaces.test.mjs, init.next-steps.test.mjs, theme-checks.test.mjs; discover, doctor and render run end to end).
  • Changeset: the template and theme eject receipts carry installGuidance beside installCommand — verified (copy.mjs:185, eject.mjs:107).
  • Changeset: release moves and adding the CLI at Core's release keep the package-manager command — verified (coreAddCommand, addCliCommand read no guidance; surfaces test).
  • Changeset: without guidance, doctor's Core and peer fixes, theme build's no-Core message and render's suggestion name the project's package manager — verified (doctor.mjs:403, :1296-1303, theme/build/build.mjs:616-620, :648, render/_adapter.mjs:428-431; render prints pnpm add … in a pnpm app).
  • Changeset: two different lines cancel out and a new doctor check warns — verified (checkInstallGuidance at doctor.mjs:2304, doctor.test.mjs, install-guidance.test.mjs).
  • Changeset: an invalid line is ignored with an invalid_install_guidance warning — verified (validate-contributions.mjs:2263-2270, project.test.mjs; doctor warns end to end).
  • Description: the per-project record that serves the CLI command also keeps the guidance, with one chooser for both — verified (foundation/env/cli-command.mjs:108-190).
  • Description: installCommandFor returns the guidance with bare names beside an unchanged installCommand — verified (template-needs.mjs:304, project.test.mjs).
  • Description: where a command pins a version, the guidance names the same version — verified (discover/_adapter.mjs, addMatchingCore in notices.mjs; surfaces test; discover end to end).
  • Description: installStepFor prints the guidance, then the command, then npm install with its note — verified (template-needs.mjs:331).
  • Description: every listed printer, the theme editor's notes included, reads the line — verified, but the theme editor's preview add receipt also puts it in installCommand (finding).
  • Description: a peer at the wrong version gets the line followed by the version it needs — verified (peerInstallText, doctor.mjs:366-375).
  • Description: the discover, template-readiness and computer-level integration records now allow the line in place of the command — verified (the three record diffs).
  • Description: the new requirement is integration-level, conflicts cancel with a doctor warning, and an invalid line is ignored, so the key needs no CLI floor — verified (FR16; an older CLI reports an unknown key as a note that fails nothing).
  • Description: one line, at most 240 code points, the same line rules as cliCommand — verified (schema.mjs:89-133).
  • Description: the doctor check appears only when guidance is given, passing or warning — verified (checkInstallGuidance returns null otherwise; doctor end to end).
  • Description: invalid_install_guidance is a doctor warning and a next note in integration validate and integration check — verified (validate-integration.mjs:494-500, :1000-1006; integration check --json).
  • Description: the template.copy and theme.eject receipts add installGuidance only when present and no field is renamed or removed — verified for those receipts; the preview add receipt's installCommand changes content instead (finding).
  • Description: without guidance, output is unchanged except four hints — verified (the theme editor's new dependency-install helper maps every package manager as the removed one did).
  • Description: same shape as cliCommand — verified.
  • Description: the listed tests exist and pass, and the structure, changeset and README checks pass — verified (108 test files pass in this review's runs; check:cli-structure, check:changesets, readme:check pass).
  • Description: the new and amended clauses are present tense with no narration — verified.
  • Description: one capability, no unrelated changes — verified (integrations.mjs carries only formatting of lines it touches beside the new field).
  • .changeset/integration-install-guidance.md: clear; every claim verified (below)
  • docs/specs/AST-039/spec.md: clear; FR16 and its verification row, owner-approved at this head; the receipt sentence is not met by the theme preview receipt (finding)
  • docs/specs/AST-048-build-recommendation/spec.md: clear
  • docs/specs/AST-051-discover-integration-manager/spec.md: clear
  • docs/specs/AST-081-global-mode/spec.md: clear
  • packages/cli/README.md: clear; generated table, in sync
  • packages/cli/api/discover/_adapter.mjs: clear
  • packages/cli/api/discover/detail/detail.mjs: clear
  • packages/cli/api/discover/discover.doc.mjs: clear
  • packages/cli/api/discover/discover.type.mjs: clear
  • packages/cli/api/doctor/doctor.mjs: clear
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/api/doctor/theme-checks.mjs: clear
  • packages/cli/api/doctor/theme-checks.test.mjs: clear
  • packages/cli/api/init/run/run.mjs: clear
  • packages/cli/api/integration/integrationCheck.doc.mjs: clear
  • packages/cli/api/integration/validate-integration.mjs: clear
  • packages/cli/api/integration/validate-integration.type.mjs: clear
  • packages/cli/api/integration/validateIntegration.doc.mjs: clear
  • packages/cli/api/render/_adapter.mjs: non-blocking note (one-package reason beside a multi-package line)
  • packages/cli/api/template/copy/copy.mjs: clear
  • packages/cli/api/template/template.doc.mjs: clear
  • packages/cli/api/template/template.type.mjs: clear
  • packages/cli/api/theme-edit/_preview-app.mjs: blocking finding (preview receipt's installCommand)
  • packages/cli/api/theme-edit/_project.mjs: clear
  • packages/cli/api/theme/_adapter.mjs: clear
  • packages/cli/api/theme/build/build.mjs: clear
  • packages/cli/api/theme/eject/eject.mjs: clear
  • packages/cli/api/theme/theme.type.mjs: clear
  • packages/cli/api/theme/themeEject.doc.mjs: clear
  • packages/cli/assets/docs/tree/checks.doc.mjs: clear
  • packages/cli/assets/docs/tree/troubleshooting.doc.mjs: clear
  • packages/cli/authoring/integration/integration.doc.mjs: clear
  • packages/cli/authoring/integration/parse.test.mjs: clear
  • packages/cli/authoring/integration/schema.mjs: clear
  • packages/cli/authoring/integration/type.ts: clear
  • packages/cli/clients/cli/commands/init.next-steps.test.mjs: clear
  • packages/cli/clients/cli/commands/integration-check.doc.mjs: clear
  • packages/cli/clients/cli/commands/theme.mjs: clear
  • packages/cli/clients/cli/index.mjs: clear
  • packages/cli/foundation/config/project.mjs: clear
  • packages/cli/foundation/config/project.test.mjs: clear
  • packages/cli/foundation/discovery/template-needs.mjs: clear
  • packages/cli/foundation/env/cli-command.mjs: clear
  • packages/cli/foundation/env/cli-command.test.mjs: clear
  • packages/cli/foundation/env/install-guidance.test.mjs: non-blocking note (two imports from one module)
  • packages/cli/foundation/env/package-manager.test.mjs: clear
  • packages/cli/foundation/integrations/integrations.mjs: clear
  • packages/cli/foundation/integrations/validate-contributions.mjs: clear
  • packages/cli/foundation/release/notices.mjs: clear
  • packages/cli/foundation/release/notices.test.mjs: clear
  • packages/cli/foundation/response/response-types.doc.mjs: non-blocking note (discover and template.copy rows not updated)
  • packages/cli/test/install-guidance-surfaces.test.mjs: clear; asserts the preview's installCommand holds the line, to change with the fix
  • packages/cli/test/integration-check-failures.json: clear

Automated review (maintainer link)

Comment thread packages/cli/api/render/_adapter.mjs Resolved
@josephfarina
josephfarina force-pushed the integration-install-guidance branch from 54a9081 to 32793c2 Compare November 17, 2026 20:14
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 32793c2

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 98ea3d5

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one fix is needed, and the spec direction is approved at this head.

  • Miss: packages/cli/clients/cli/commands/integration-check.test.mjs:296-298 still expects the --strict help sentence that this pull request rewrites in packages/cli/clients/cli/commands/integration-check.doc.mjs:46, so that test fails on this head while it passes on the base; update the expected string to the new sentence.

An installGuidance line without {packages} drops the package names from the template note, init's theme step and doctor's themes fix, so rejecting such a line as invalid_install_guidance, or printing the names after it, would keep those steps actionable. The branch also conflicts with main after #12057 in eight files, and CI's test jobs never started on this head because CI was full, so CI needs a re-run after the fix.

Claims and files checked

Review mode: full; reason: rebase

Claims:

  • An integration can set one installGuidance line with a {packages} placeholder, at most 240 code points, under the same line rules as cliCommand: verified: authoring/integration/schema.mjs:133, parse.test.mjs.
  • Every step that adds packages the app lacks prints the line instead of the package-manager command: template readiness, init's theme step, doctor's fixes, theme hints and errors, theme eject, the theme editor's notes and discover: verified: test/install-guidance-surfaces.test.mjs, init.next-steps.test.mjs, theme-checks.test.mjs, and a fixture app.
  • The template and theme eject receipts carry installGuidance beside an unchanged installCommand, only when it is set: verified: api/template/copy/copy.mjs:185, api/theme/eject/eject.mjs:107, fixture template --json.
  • Steps that move Astryx's packages to another release, or add the CLI at Core's release, keep the package-manager command: verified: api/doctor/_adapter.mjs:876, foundation/release/notices.mjs:563, :703, :733; surfaces test.
  • Without guidance, doctor's Core and peer fixes, theme build's no-Core message and render's missing-package suggestion print the project's package manager instead of a fixed npm install: verified: api/doctor/doctor.mjs:403, :1296; api/theme/build/build.mjs:617; api/render/_adapter.mjs:429; fixture peer fix.
  • Two different lines cancel out and a new install-guidance doctor check warns: verified: foundation/env/install-guidance.test.mjs, doctor.test.mjs.
  • An invalid line is ignored with an invalid_install_guidance warning and the rest of the manifest loads: verified: foundation/config/project.test.mjs, foundation/integrations/validate-contributions.mjs:2263-2269.
  • One per-project record and one chooser serve cliCommand and installGuidance: verified: foundation/env/cli-command.mjs:108-232.
  • Where a command pins a version, the line names the same version: verified: foundation/release/notices.mjs:487, api/discover/_adapter.mjs:657; surfaces test.
  • A peer at the wrong version gets the line followed by the version it needs: verified: api/doctor/doctor.mjs:366-374; fixture peer fix.
  • The discover, build-recommendation and global-mode records now allow the line in the command's place: verified: the four record diffs.
  • integration check reports a malformed line as a note marked for the next minor release, failing nothing today: verified: api/integration/validate-integration.mjs; fixture integration check --strict --json.
  • No JSON field is renamed or removed: verified; the experimental theme preview skipped[] receipt also gains installGuidance.
  • The listed test suites pass: partly: they pass here, but the integration check command's help test fails (finding above).

Files:

  • .changeset/integration-install-guidance.md: clear
  • docs/specs/AST-039/spec.md: clear
  • docs/specs/AST-048-build-recommendation/spec.md: clear (conflicts with main after #12057; rebase)
  • docs/specs/AST-051-discover-integration-manager/spec.md: clear
  • docs/specs/AST-081-global-mode/spec.md: clear
  • packages/cli/README.md: clear (generated table in sync)
  • packages/cli/api/discover/_adapter.mjs: clear
  • packages/cli/api/discover/detail/detail.mjs: clear
  • packages/cli/api/discover/discover.doc.mjs: clear
  • packages/cli/api/discover/discover.type.mjs: clear
  • packages/cli/api/doctor/doctor.mjs: clear
  • packages/cli/api/doctor/doctor.test.mjs: clear
  • packages/cli/api/doctor/theme-checks.mjs: non-blocking: themeInstallFix JSDoc still names only the package-manager command
  • packages/cli/api/doctor/theme-checks.test.mjs: clear
  • packages/cli/api/init/_adapter.mjs: clear
  • packages/cli/api/init/run/run.mjs: clear
  • packages/cli/api/integration/integrationCheck.doc.mjs: clear (same sentence in the API doc; no test asserts it)
  • packages/cli/api/integration/validate-integration.mjs: clear
  • packages/cli/api/integration/validate-integration.type.mjs: clear
  • packages/cli/api/integration/validateIntegration.doc.mjs: clear
  • packages/cli/api/render/_adapter.mjs: clear
  • packages/cli/api/template/copy/copy.mjs: clear
  • packages/cli/api/template/template.doc.mjs: clear
  • packages/cli/api/template/template.type.mjs: clear
  • packages/cli/api/theme-edit/_preview-app.mjs: clear
  • packages/cli/api/theme-edit/_project.mjs: clear
  • packages/cli/api/theme-edit/theme-edit.type.mjs: clear
  • packages/cli/api/theme/_adapter.mjs: clear
  • packages/cli/api/theme/build/build.mjs: clear
  • packages/cli/api/theme/eject/eject.mjs: clear
  • packages/cli/api/theme/theme.type.mjs: clear
  • packages/cli/api/theme/themeEject.doc.mjs: clear
  • packages/cli/assets/docs/tree/checks.doc.mjs: clear
  • packages/cli/assets/docs/tree/troubleshooting.doc.mjs: clear
  • packages/cli/authoring/integration/integration.doc.mjs: clear
  • packages/cli/authoring/integration/parse.test.mjs: clear
  • packages/cli/authoring/integration/schema.mjs: non-blocking: accepts a line without {packages}
  • packages/cli/authoring/integration/type.ts: clear
  • packages/cli/clients/cli/commands/init.next-steps.test.mjs: clear
  • packages/cli/clients/cli/commands/integration-check.doc.mjs: finding: its new --strict sentence breaks the help test that asserts the old one
  • packages/cli/clients/cli/commands/theme.mjs: clear
  • packages/cli/clients/cli/index.mjs: clear
  • packages/cli/foundation/config/project.mjs: clear
  • packages/cli/foundation/config/project.test.mjs: clear
  • packages/cli/foundation/discovery/template-needs.mjs: clear (conflicts with main after #12057; rebase)
  • packages/cli/foundation/env/cli-command.mjs: clear
  • packages/cli/foundation/env/cli-command.test.mjs: clear
  • packages/cli/foundation/env/install-guidance.test.mjs: clear
  • packages/cli/foundation/env/package-manager.test.mjs: clear
  • packages/cli/foundation/integrations/integrations.mjs: clear
  • packages/cli/foundation/integrations/validate-contributions.mjs: clear
  • packages/cli/foundation/release/notices.mjs: clear
  • packages/cli/foundation/release/notices.test.mjs: clear
  • packages/cli/foundation/response/response-types.doc.mjs: clear
  • packages/cli/test/install-guidance-surfaces.test.mjs: clear
  • packages/cli/test/integration-check-failures.json: clear

Automated review (maintainer link)

});

// Install guidance is one line under the same rules as an agent-docs line.
export const installGuidanceSchema = agentDocLineSchema;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking: this accepts a line with no {packages}, such as Ask the platform team (the fixture in install-guidance.test.mjs:36). Then the template note reads Install missing dependencies: Ask the platform team, and init's theme step and doctor's themes fix (api/doctor/theme-checks.mjs:1045) stop naming @astryxdesign/theme-neutral. Reject a line without {packages} as invalid_install_guidance, or print the package names after such a line.

@josephfarina
josephfarina force-pushed the integration-install-guidance branch from 98ea3d5 to 5e6dfbd Compare November 17, 2026 21:04
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 5e6dfbd

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the installGuidance direction is approved at this head, but one test needs updating before this can merge.

  • Miss: packages/cli/clients/cli/commands/integration-check.test.mjs:296-298 still expects the old --strict help sentence that packages/cli/clients/cli/commands/integration-check.doc.mjs:46 rewrites, so that test fails; update the expected string to the new sentence.

Three non-blocking notes can ride along or wait: a guidance line without {packages} drops the package names from several steps; in an app with disagreeing lockfiles, the line replaces the reason spec:AST-048 FR19 asks the template note to give; and the JSDoc of themeInstallFix and fontPackagesInstallLine still describes only the package manager's command.

Claims and files checked

Review mode: full; reason: rebase

  • Claim, changeset: an integration declares one installGuidance line with a {packages} placeholder (verified: manifest schema and type, parser tests).
  • Claim, changeset: template readiness, init's theme step, doctor's fixes, theme hints and errors, theme eject, the theme editor's notes and discover print the line (verified: surfaces, init, theme-checks tests; a fixture app's template and doctor output).
  • Claim, changeset: the template and theme eject receipts carry installGuidance beside installCommand (verified: copy and eject code; fixture JSON).
  • Claim, changeset: release moves and adding the CLI at Core's release keep the package-manager command (verified: those printers never read the line; surfaces test).
  • Claim, changeset: without guidance, four hints print the project's package manager instead of npm install (verified: fixture peer fix prints pnpm add …; tests for the others).
  • Claim, changeset: different lines cancel out and a doctor check warns (verified: fixture with two integrations; doctor tests).
  • Claim, changeset: an invalid line is ignored with an invalid_install_guidance warning (verified: fixture; project tests).
  • Claim, description: one record and one chooser serve cliCommand and installGuidance (verified).
  • Claim, description: guidance names the version a command pins (verified: Core-matched add and discover with a version).
  • Claim, description: the key needs no CLI floor (verified: an older CLI reports it as an unknown_manifest_key note and its doctor stays clean).
  • Claim, description: the doctor check shows only when guidance is given; receipts add the field only when present (verified).
  • Claim, description: the listed test suites pass (verified for the suites named; the commands-level integration check help test, not named, fails).
  • Claim, description: records follow the writing rubric and carry no internal context (verified).
  • Files with a finding: packages/cli/clients/cli/commands/integration-check.doc.mjs (blocking, its test not updated); packages/cli/authoring/integration/schema.mjs and packages/cli/foundation/discovery/template-needs.mjs (non-blocking).
  • Files clear: .changeset/integration-install-guidance.md; the four records under docs/specs/ (AST-039, AST-048, AST-051, AST-081); packages/cli/README.md (generated, in sync); packages/cli/api/discover/ (4 files); packages/cli/api/doctor/ (doctor, its test, theme-checks, its test); packages/cli/api/init/ (2 files); packages/cli/api/integration/ (4 files); packages/cli/api/render/_adapter.mjs; packages/cli/api/template/ (3 files); packages/cli/api/theme-edit/ (3 files); packages/cli/api/theme/ (5 files); packages/cli/assets/docs/tree/ (2 files); packages/cli/authoring/integration/ (doc, parse test, type); packages/cli/clients/cli/commands/ (init next-steps test, theme); packages/cli/clients/cli/index.mjs; packages/cli/foundation/config/ (2 files); packages/cli/foundation/env/ (4 files); packages/cli/foundation/integrations/ (2 files); packages/cli/foundation/release/ (2 files); packages/cli/foundation/response/response-types.doc.mjs; packages/cli/test/ (surfaces test, failure-code list).

Automated review (maintainer link)

Comment on lines +410 to +411
: installGuidance
? `Install missing dependencies: ${installGuidance}`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking (Miss): with guidance set, this branch wins over noCommandReason, so in an app with both pnpm-lock.yaml and package-lock.json the note reads Install missing dependencies: Add recharts @heroicons/react to package.json, … and no longer says why there is no command. spec:AST-048 FR19 (current, not amended here) says notes "MUST name them and say why there is no command". Either name this exception in FR19 beside the FR21 amendment, or keep the reason after the line.

@josephfarina
josephfarina force-pushed the integration-install-guidance branch from 5e6dfbd to b2e372d Compare November 17, 2026 21:52
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b2e372d

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not finished on this head yet, so wait for the required checks before merging.

The installGuidance direction is approved at this head, and the failing integration check help test from the last review is fixed. Two non-blocking notes can ride along or wait: a guidance line without {packages} drops the package names from template notes and doctor's fixes, and in an app with disagreeing lockfiles the line replaces the reason the build-recommendation record's FR19 asks the template note to give.

Claims and files checked

Review mode: full; reason: history

  • Claim, changeset: an integration declares one installGuidance line with a {packages} placeholder (verified: manifest schema and type, parser tests).
  • Claim, changeset: template readiness, init's theme step, doctor's fixes, theme hints and errors, theme eject, the theme editor's notes and discover print the line (verified: surfaces, init and theme-check tests; a fixture app's template and doctor output).
  • Claim, changeset: the template and theme eject receipts carry installGuidance beside installCommand (verified: copy and eject code; fixture JSON).
  • Claim, changeset: release moves and adding the CLI at Core's release keep the package-manager command (verified: those printers never read the line; surfaces test).
  • Claim, changeset: without guidance, four hints print the project's package manager instead of npm install (verified: fixture peer fix prints pnpm add …; tests for the others).
  • Claim, changeset: different lines cancel out and a doctor check warns (verified: fixture with two integrations; doctor tests).
  • Claim, changeset: an invalid line is ignored with an invalid_install_guidance warning (verified: fixture; project tests; integration check --strict lists it as a note).
  • Claim, description: one record and one chooser serve cliCommand and installGuidance (verified).
  • Claim, description: the line names the version a command pins (verified: Core-matched add and discover with a version).
  • Claim, description: without guidance, other output is unchanged (verified: fixture template note and themes fix match the base).
  • Claim, description: the key needs no CLI floor (verified: the base CLI ignores the key and its doctor stays clean).
  • Claim, description: the doctor check shows only when guidance is given, and receipts add the field only when present (verified).
  • Claim, description: the listed test suites and the CLI structure, changeset and README checks pass (verified: 40 test files and the three checks pass).
  • Claim, description: records follow the writing rubric and carry no internal context (verified).
  • Files with a finding (non-blocking): packages/cli/authoring/integration/schema.mjs, packages/cli/foundation/discovery/template-needs.mjs.
  • Files clear: .changeset/integration-install-guidance.md; the four records under docs/specs/ (AST-039, AST-048, AST-051, AST-081); packages/cli/README.md (generated, in sync); packages/cli/api/discover/ (4 files); packages/cli/api/doctor/ (5 files); packages/cli/api/init/ (2 files); packages/cli/api/integration/ (4 files); packages/cli/api/render/_adapter.mjs; packages/cli/api/template/ (3 files); packages/cli/api/theme-edit/ (3 files); packages/cli/api/theme/ (5 files); packages/cli/assets/docs/tree/ (2 files); packages/cli/authoring/integration/ (doc, parse test, type); packages/cli/clients/cli/commands/ (4 files); packages/cli/clients/cli/index.mjs; packages/cli/foundation/config/ (2 files); packages/cli/foundation/env/ (4 files); packages/cli/foundation/integrations/ (2 files); packages/cli/foundation/release/ (2 files); packages/cli/foundation/response/response-types.doc.mjs; packages/cli/test/ (surfaces test, failure-code list).

Automated review (maintainer link)

@josephfarina
josephfarina merged commit a6538f2 into main Nov 18, 2026
87 checks passed
@github-actions
github-actions Bot deleted the integration-install-guidance branch November 18, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — b2e372dd Deployed Nov 17, 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