Skip to content

spec: AST-060 integration package init - #6963

Closed
josephfarina wants to merge 2 commits into
mainfrom
spec/AST-060-integration-init
Closed

josephfarina wants to merge 2 commits into
mainfrom
spec/AST-060-integration-init

Conversation

@josephfarina

@josephfarina josephfarina commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Writing rubric results

  • R1 narration: present tense throughout, no "today"/"before this record"/"when this ships" ✅
  • R2 research: no external research needed; the five manual steps and the gap are observable from the quick-start doc and the CLI ✅
  • R3 evidence: names the quick-start doc, the findPackageDir error, and the npm pkg set exports gap; no PR references ✅
  • R4 rejected alternatives: DEC-1 (top-level command), DEC-2 (manifest creation), DEC-3 (CLI peer) each have one line ✅
  • R5 no PR/issue refs ✅
  • R6 one open question for the approver: is the add theme exports exception (AST-050 FR7) a durable rule or a temporary exception?

Review state

This is a spec-only PR, up for an approval owner's review. The record is authority: current with approved_by and approved_at left empty, so it cannot merge before an owner approves: check:knowledge reports the empty fields, and the owner gate waits for an approval on the exact head. On approval, approved_by and approved_at are filled in on a new head and the approving owner posts /approve-spec <sha> for that head.

The code PR is #6961.

@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 12, 2026 8:05pm UTC

Request Review

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

astracat-bot Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 12, 2026, 8:25 PM UTC

@github-actions github-actions Bot added the spec-auto-merge Auto-merge was enabled by the spec owner gate label Oct 5, 2026
@josephfarina
josephfarina marked this pull request as draft October 5, 2026 23:45
@github-actions github-actions Bot removed the spec-auto-merge Auto-merge was enabled by the spec owner gate label Oct 5, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for capturing this — the first-run problem is real: the quick-start's five manual steps, especially the empty exports map, are easy to miss, and integration add can't help until they are done. Placing init inside the integration group and leaving manifest creation to add both fit the current design well.

Approval needs a maintainer decision first. No current spec yet authorizes integration init, its Core-only peer and install-by-default behavior, or creating exports (current CLI architecture says writers never create exports). A maintainer needs to either promote a corrected version of this spec as the governing authority — including how the exports rule is resolved — or confirm the subcommand should be admitted under the existing subcommand process without a new system spec. I've recorded that question for the maintainers; this isn't a request to remove or split the work for missing spec alone.

Before the spec can become that authority, please also address the contract gaps detailed in the review: state the defaults and overwrite rules for name/version/exports, define the peer value for --no-install and what happens if narrowing fails, define install failure and invalid-input behavior including what remains on disk, fully define the integration.init receipt fields, name the programmatic function and batching consideration, and bring the record into template form (platform support, decision log, present-tense wording). Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@josephfarina
josephfarina force-pushed the spec/AST-060-integration-init branch from 6fd3c0b to e1e29cf Compare October 6, 2026 21:10
@josephfarina
josephfarina force-pushed the spec/AST-060-integration-init branch from e1e29cf to 6c99fd2 Compare October 6, 2026 22:24
@josephfarina
josephfarina force-pushed the spec/AST-060-integration-init branch from 6c99fd2 to 7652c80 Compare October 7, 2026 00:49
@josephfarina
josephfarina force-pushed the spec/AST-060-integration-init branch 2 times, most recently from 7652c80 to 0736e0d Compare October 7, 2026 18:56
@josephfarina josephfarina changed the title spec: AST-060 integration package init (draft) spec: AST-060 integration package init Oct 7, 2026
@josephfarina
josephfarina marked this pull request as ready for review October 7, 2026 20:05
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

44 of 448 shot(s) changed.

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

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 754,077
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,188
Chat Full AI Chat probe light 238,081
Chat Full AI Chat probe dark 237,048
Markdown Default probe light 159,625
Markdown Default probe dark 158,986
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
Chat Default neutral dark 33,205
Chat Default neutral light 32,876
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232
ProgressBar With Target Mark probe dark 7,895
ProgressBar With Target Mark probe light 7,895
TableRowExpansion Detail Panel neutral dark 5,150
TableRowExpansion Detail Panel neutral light 4,068

and 24 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | 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.

Thanks for capturing this — the first-run problem is real: the quick-start's five manual steps, especially the empty exports map, are easy to miss, and integration add can't help until they are done. Placing init inside the integration group and leaving manifest creation to add both fit the current design well.

Approval needs a maintainer decision first. No current spec yet authorizes integration init, its Core-only peer and install-by-default behavior, or creating exports (current CLI architecture says writers never create exports, because adding a map makes existing deep imports private). A maintainer needs to either promote a corrected version of this spec as the governing authority — including how the exports rule is resolved — or confirm the subcommand should be admitted under the existing subcommand process without a new system spec. I've recorded that question for the maintainers; this isn't a request to remove or split the work for missing spec alone.

Before the spec can become that authority, please also address the contract gaps detailed in the review: state the defaults and overwrite rules for name, version, and exports (including existing packages that already publish without a map), define the peer value for --no-install and what happens when narrowing or install fails, define install-failure and invalid-input behavior including what remains on disk, fully define the integration.init receipt fields, name the programmatic function and record the batching classification, and bring the record into template form (platform support, decision log, present-tense wording). Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@josephfarina
josephfarina force-pushed the spec/AST-060-integration-init branch from 4db85c1 to 7fe551d Compare October 8, 2026 17:22
@github-actions github-actions Bot added spec-auto-merge Auto-merge was enabled by the spec owner gate and removed needs:spec-owner-review Current knowledge records await owner approval labels Oct 8, 2026
@josephfarina
josephfarina marked this pull request as draft October 8, 2026 17:24
@github-actions github-actions Bot removed the spec-auto-merge Auto-merge was enabled by the spec owner gate label Oct 8, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the update — the detection contract, narrowed peer guard, grounded Core-peer decision, and completed receipt/mode cases close the substantive items from earlier rounds, and the first-run problem remains well captured.

Approval still needs a maintainer decision first. No current spec yet authorizes integration init, its install-by-default behavior, its receipt and install error, or the add-time Core-peer rule, and creating exports still contradicts current CLI architecture until the proposed amendment is promoted. A maintainer needs to either promote a corrected version of this spec — including updating the existing architecture rule for the new-package exports allowance and explicitly deciding the pre-existing theme exports exception now written into the same rule — as the governing authority, or confirm the subcommand should be admitted under the existing subcommand process without a new system spec (and say where the peer and guard rules would then live). That question is recorded for the maintainers; this is not a request to remove or split the work for missing spec alone.

Before the record can become that authority, please also settle the remaining wording items in the review: state whether the theme exports exception is a durable rule or a temporary follow-up (creating a map on an existing package makes unlisted deep imports private), state the Core-peer result when a first relevant add ran without Core installed, replace the two private mechanism phrases with observable guarantees, and finish the decision-log and platform form. Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@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.

Thanks for the update — the clarified satisfied-dependency rule (declared and resolvable, with no moving a declared entry), the two-tier package-name rule with Node core module names, and the completed peer-dependencies-meta refusal scope all tighten the contract, and the first-run problem remains well captured.

Approval still needs a maintainer decision first. No current spec yet authorizes integration init, its install-by-default behavior, its receipt and install error, its package-name rules, or the add-time Core-peer rule, and creating exports still contradicts current CLI architecture until the proposed amendment is promoted. A maintainer needs to either promote a corrected version of this spec — including updating the existing architecture rule for the new-package exports allowance and explicitly deciding the pre-existing theme exports exception now written into the same rule — as the governing authority, or confirm the subcommand should be admitted under the existing subcommand process without a new system spec (and say where the peer, guard, and name rules would then live). That question is recorded for the maintainers; this is not a request to remove or split the work for missing spec alone.

Before the record can become that authority, please also settle the remaining wording items in the review: state whether the theme exports exception is a durable rule or a temporary follow-up (creating a map on an existing package makes unlisted deep imports private), state the Core-peer result when a first relevant add ran without Core installed, add a verification state that distinguishes the two package-name tiers, replace the two private mechanism phrases with observable guarantees, and finish the decision-log and platform form. Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@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.

Thanks for the update — stating that any relevant add writes the Core peer while none is present (including a later add once Core is installed), adding verification states that distinguish a new name from a legacy existing name, and removing the internal flag and spawn-level wording all tighten the contract, and the first-run problem remains well captured.

Approval still needs a maintainer decision first. No current spec yet authorizes integration init, its install-by-default behavior, its receipt and install error, its package-name rules, or the add-time Core-peer rule, and creating exports still contradicts current CLI architecture until the proposed amendment is promoted. A maintainer needs to either promote a corrected version of this spec — including updating the existing architecture rule for the new-package exports allowance and explicitly deciding the pre-existing theme exports exception now written into the same rule — as the governing authority, or confirm the subcommand should be admitted under the existing subcommand process without a new system spec (and say where the peer, guard, and name rules would then live). That question is recorded for the maintainers; this is not a request to remove or split the work for missing spec alone.

Before the record can become that authority, please also settle the remaining wording items in the review: state whether the theme exports exception is a durable rule or a temporary follow-up (creating a map on an existing package makes unlisted deep imports private), restate the Windows shim sentence as the observable guarantee, and finish the decision-log and platform form (canonical references, approval-head deciders, and the browser-evidence line). Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@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.

Thanks for capturing this — the first-run problem is well framed: the five manual steps, especially the empty exports map, are easy to miss, and integration add cannot help until they are done.

Approval still needs a maintainer decision first. No current spec yet authorizes integration init, its install-by-default behavior, its receipt and install error, its package-name rules, or the add-time Core-peer rule, and creating exports still contradicts current CLI architecture until the proposed amendment is promoted. A maintainer needs to either promote a corrected version of this spec — including updating the existing architecture rule for the new-package exports allowance and explicitly deciding the pre-existing theme exports exception now written into the same rule — as the governing authority, or confirm the subcommand should be admitted under the existing subcommand process without a new system spec (and say where the peer, guard, and name rules would then live). That question is recorded for the maintainers; this is not a request to remove or split the work for missing spec alone.

Before the record can become that authority, please also settle the remaining items in the review: state whether the theme exports exception is a durable rule or a temporary follow-up (creating a map on an existing package makes unlisted deep imports private), and finish the template form (a canonical reference per decision, the decider form the approval head will carry, the browser-evidence line under Platform support, and a typed open question). Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@josephfarina
josephfarina force-pushed the spec/AST-060-integration-init branch 2 times, most recently from 7c66142 to daa0b3d Compare October 9, 2026 05:23

@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.

Thanks for the update — moving the browser-evidence line under Platform support, tightening the existing-package name tier with explicit states, and bringing a blank existing name under the strict rules when init fills it all improve the contract, and the first-run problem remains well captured: the five manual steps, especially the empty exports map, are easy to miss, and integration add cannot help until they are done.

Approval still needs a maintainer decision first. No current spec yet authorizes integration init, its install-by-default behavior, its receipt and install error, its package-name rules, or the add-time Core-peer rule, and creating exports still contradicts current CLI architecture until the proposed amendment is promoted. A maintainer needs to either promote a corrected version of this spec — including updating the existing architecture rule for the new-package exports allowance and explicitly deciding the pre-existing theme exports exception now written into the same rule — as the governing authority, or confirm the subcommand should be admitted under the existing subcommand process without a new system spec (and say where the peer, guard, and name rules would then live). That question is recorded for the maintainers; this is not a request to remove or split the work for missing spec alone.

Before the record can become that authority, please also settle the remaining items in the review: state whether the theme exports exception is a durable rule or a temporary follow-up (creating a map on an existing package makes unlisted deep imports private), finish the decision-log form (a canonical reference per decision and the decider form the approval head will carry) and add the open question's type, and add a verification state for the blank-name fill. Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@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.

Thanks for the update — adding the verification state for a valid blank-name fill (from the argument or the directory, with fieldsAdded naming name) and typing the open question both tighten the record, and the first-run problem remains well captured: the five manual steps, especially the empty exports map, are easy to miss, and integration add cannot help until they are done.

Approval still needs a maintainer decision first. No current spec yet authorizes integration init, its install-by-default behavior, its receipt and install error, its package-name rules, or the add-time Core-peer rule, and creating exports still contradicts current CLI architecture until the proposed amendment is promoted. A maintainer needs to either promote a corrected version of this spec — including updating the existing architecture rule for the new-package exports allowance and explicitly deciding the pre-existing theme exports exception now written into the same rule — as the governing authority, or confirm the subcommand should be admitted under the existing subcommand process without a new system spec (and say where the peer, guard, and name rules would then live). That question is recorded for the maintainers; this is not a request to remove or split the work for missing spec alone.

Before the record can become that authority, please also settle the remaining items in the review: state whether the theme exports exception is a durable rule or a temporary follow-up (creating a map on an existing package makes unlisted deep imports private), finish the decision-log form (a canonical reference per decision and the decider form the approval head will carry), and add a verification state showing a strict-invalid name filled into a blank existing name is refused with the file untouched. Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@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.

Thanks for the update — adding the verification state for a strict-invalid name filled into a blank existing name (refused, with the file untouched) closes that contract gap, and the first-run problem remains well captured: the five manual steps, especially the empty exports map, are easy to miss, and integration add cannot help until they are done.

Approval still needs a maintainer decision first. No current spec yet authorizes integration init, its install-by-default behavior, its receipt and install error, its package-name rules, or the add-time Core-peer rule, and creating exports still contradicts current CLI architecture until the proposed amendment is promoted. A maintainer needs to either promote a corrected version of this spec — including updating the existing architecture rule for the new-package exports allowance and explicitly deciding the pre-existing theme exports exception now written into the same rule — as the governing authority, or confirm the subcommand should be admitted under the existing subcommand process without a new system spec (and say where the peer, guard, and name rules would then live). That question is recorded for the maintainers; this is not a request to remove or split the work for missing spec alone.

Before the record can become that authority, please also settle the remaining items in the review: state whether the theme exports exception is a durable rule or a temporary follow-up (creating a map on an existing package makes unlisted deep imports private), and finish the decision-log form on the approval head (a canonical reference per decision and the decider form that head will carry). Happy to re-review once the direction is settled and those are tightened.

[Automated review]

@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 needs a maintainer decision first: no current spec authorizes astryx integration init (its install default, receipt and install error, name rules, or the add-time Core peer), and creating exports in a new package.json contradicts the current CLI architecture rule (INV16) until a maintainer updates it. A maintainer needs to either promote a corrected AST-060 together with that INV16 update — including a ruling on whether the add theme exports exception is durable or temporary — or admit the subcommand through the existing subcommand process and say where the add-time peer, guard, and name rules live. Independently of that decision, these need fixing before the record can become current:

  • Package-manager detection installs with npm when lockfiles tie, the fallback the current build-recommendation spec rejects because it writes a second lockfile (AST-048 DEC-7); reuse AST-048 FR17/FR19 and decide what init does when the package manager is ambiguous.
  • With --no-install, the receipt reads the same as an already-satisfied package, so a skipped install looks “unchanged”; AST-017 FR17 asks the result to say the install was skipped.
  • Each decision still marks its decider “(proposed)” with no Reference line, and the INV16 text says “tracked as a follow-up”; state the settled form and the rule itself on the approval head.

[Automated review]

Comment on lines +75 to +76
4. When nothing breaks the tie, the result is ambiguous and init installs
with npm.

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.

This installs with npm when lockfiles tie. The current build-recommendation spec already decides the CLI's “project's package manager” (spec:AST-048 FR17, FR19), and its DEC-7 rejects exactly this fallback because installing with the wrong manager writes a second lockfile and dependency tree. Please delegate detection to AST-048 FR17/FR19 and give init an ambiguous-case rule consistent with DEC-7 (for example: write the fields, skip the install, and name the disagreeing lockfiles in notes), or record why init must differ so an owner can reconcile both records. The unbounded walk (line 65) and the runner fallback (line 78) also differ from FR17's workspace-root bound and npm default.

Comment on lines +140 to +141
"Unchanged" means `fieldsAdded` is empty, `installed` is false, and
`packageCreated` is false.

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.

With --no-install on a package whose fields are already complete but whose CLI and Core are not installed, the receipt is fieldsAdded: [], installed: false, packageCreated: false — this “unchanged” tuple, which FR3 uses for a package with satisfied dependencies. spec:AST-017 FR17 asks a result produced under a reduced-capability control to identify the mode and what it omitted. Consider a field such as installSkipped, or a required notes entry, when --no-install skips a needed install; keep that case out of “unchanged” and add it to the FR4/FR5 verification rows.

Comment on lines +168 to +170
on an existing package, with one exception: `add theme` may create an exports
map on an existing package containing only theme subpaths (AST-050 FR7;
tracked as a follow-up for INV16 alignment). A writer that creates a new

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.

“Tracked as a follow-up for INV16 alignment” describes project tracking, so it would go stale inside a current invariant, and AST-060's OQ1 still leaves the exception's durability open. Once an owner rules, state the ruling here instead: a durable exception owned by spec:AST-050 FR7 (with its deep-import consequence), or a temporary one with its end condition — or split it out of this change.


### DEC-1 — Subcommand of integration, not a top-level command

**Decider:** josephfarina (proposed) · **Date:** 2026-10-05

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.

All five decisions read “josephfarina (proposed)” with a separate date and no **Reference:** line. Current system specs give each decision a **Reference:** line (here spec:AST-060/DEC-n) and a **Decider:** line with the name and date, and none keeps a “(proposed)” marker, which would read as unapproved once this record is current. Please settle every decision's form on the approval head.

@josephfarina

Copy link
Copy Markdown
Contributor Author

Parking this for now; it's tracked separately and can be reopened when picked up.

This branch was successfully deployed

1 active deployment
Preview — 2eac9210 Deployed Oct 12, 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. needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant