Skip to content

spec(AST-093): a native component lives in the folder where core keeps it (FR1) - #8593

Closed
cixzhang wants to merge 1 commit into
mainfrom
docs/ast093-fr1-family-folder
Closed

cixzhang wants to merge 1 commit into
mainfrom
docs/ast093-fr1-family-folder

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

Where do a native component's views and spec live when core keeps that component in another component's folder, as core keeps AvatarStatusDot in packages/core/src/Avatar/ and ListItem in packages/core/src/List/?

Existing authority searched

Decision

One rule, in the same words in both records:

  • AST-093 FR1 opens: "Each native component's views and spec live in one folder of its language's implementation: the folder where core keeps the component, which is <Name>/ when core keeps it in its own folder, and core's folder otherwise (core's Avatar/AvatarStatusDot, List/ListItem)." The Swift path Sources/Astryx/<Name>/<Name>.spec.md is the common case. The rule also covers a component core keeps in a folder named for no component, such as i18n/InternationalizationProvider.
  • FR1's verification row names the member case.
  • architecture:knowledge-contracts Owning code: "A platform implementation's record instead sits in the folder where core keeps the component, which is <PublicName>/ when core keeps it in its own folder, and core's folder otherwise (spec:AST-093 FR1)." This is the counterpart of its parent/member consumer-doc rule, which native folders don't have.

Rejected alternatives

  • Moving the Swift AvatarStatusDot to its own AvatarStatusDot/ folder. That would separate it from Avatar, where core and the shipped Swift view both keep it, against the recorded owner decision.

Claim scope and non-goals

The sentence governs only where a native component's views and record live when core keeps the component in another component's folder. Components core keeps in their own folder are unchanged.

Evidence and implementation relationship

Writing rubric results

  • R1 narration: none. The sentences state where the views and record live.
  • R2 research in the record: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: none in the record.
  • R5 pull request or issue references remaining: none in the record.
  • R6 ruled open questions still listing options: none.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge
  • Prettier
  • git diff --check

@vercel

vercel Bot commented Oct 26, 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 27, 2026 4:58am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 27, 2026, 5:45 AM UTC

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · bbc5934

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded failure. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

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

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 about the new AST-093 FR1 sentence on where a native component's record lives: an engineering owner records it by commenting /approve-spec ac12db4edade2da01bf9928fdd9326792ab7c4c7 on this pull request (the author may do so as an engineering owner), and a new commit needs the command again. Whatever the decision, these record fixes are needed:

  • Read as written, the sentence applies only when core keeps a component's record in another folder, so ListItem and the other members core keeps without a record (Tab, TableRow and more) still get a native folder of their own, while the description, #8288's checker and #8370 put a Swift ListItem record in List/; if that is the intent, key the sentence on where core keeps the component.
  • The sentence moves only the record while FR1 still opens with each native component having its own folder, so saying the member's views and record live in that folder would also cover the Swift Avatar/AvatarStatusDot.swift.
  • The Owning code section of docs/architecture/knowledge-contracts.md still requires a consumer-doc entry in the folder for a parent/member record, which native folders don't have, so it needs the same exception for platform folders, or FR1 should defer to it.
  • FR1's verification row should name the member case.

[Automated review]

Comment on lines +61 to +63
the component's views. When core keeps a component's record in another
component's folder (core's `Avatar/AvatarStatusDot`), the native record lives
in that same folder. `<Name>` is the core component's name. The spec is a

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Read as written, this applies only when core keeps the component's record in another folder. Core keeps ListItem, Tab, TableRow and 25 other components in another component's folder with a consumer doc but no record, so FR1 still sends their native records to <Name>/, while the description's scope, #8288's checker and #8370 put a Swift ListItem record in List/. The sentence also moves only the record, though FR1's first sentence still gives each native component its own folder. If the description's scope is the intent, something like:

When core keeps a component in another component's folder (core's Avatar/AvatarStatusDot and List/ListItem), the native component's views and record live in that same folder.

@cixzhang
cixzhang force-pushed the docs/ast093-fr1-family-folder branch from ac12db4 to b688b54 Compare October 27, 2026 01:35
@cixzhang cixzhang changed the title spec(AST-093): a native record lives where core keeps its component (FR1) spec(AST-093): a native component lives in the folder where core keeps it (FR1) Oct 27, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 new AST-093 FR1 sentence, its verification row and the matching knowledge-contracts Owning code sentence, which change two current records: an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), and a new commit needs it again. The record fixes asked for on the earlier head are all in place. One fix remains whatever the decision: FR1 moves a native component only out of another component's folder, while the Owning code sentence and #8288's checker put every platform record wherever core keeps the component, so the two disagree for a component core keeps in a folder named for no component, such as i18n/InternationalizationProvider; state one rule in the same words in both records.

[Automated review]

Comment on lines +685 to +686
that root. A platform implementation's record instead sits in the folder
where core keeps its component (`spec:AST-093` FR1). Public semantic module records are nested at least one directory

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This reaches further than FR1's new sentence: FR1 moves a native component only when core keeps it in another component's folder, so a component core keeps in a folder named for no component (core's i18n/InternationalizationProvider) keeps <Name>/ under FR1 but goes to i18n/ here, and #8288's checker follows this wording. "Where core keeps" is also two folders for Heading (source Heading/, consumer doc Text/Heading.doc.mjs). One rule in the same words in both records would close it, for example:

a native component's views and record live in its core component's own folder when core has one, and otherwise in the folder where core keeps it

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

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 rewritten AST-093 FR1 opening, its verification row and the matching knowledge-contracts Owning code sentence, which change two current records: an engineering owner records it by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), and a new commit needs it again. The fix asked for on the previous head is in place: both records now state one rule in the same words, so a component core keeps in a folder named for no component, such as i18n/InternationalizationProvider, gets the same folder from both. Nothing else is needed from the author.

[Automated review]

@cixzhang cixzhang closed this Nov 1, 2026
@cixzhang cixzhang reopened this Nov 1, 2026
@cixzhang

cixzhang commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: native specs now live under docs/specs/components (#9007), so a native record's folder no longer depends on where core keeps its code.

@cixzhang cixzhang closed this Nov 1, 2026

This branch was successfully deployed

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