Skip to content

docs: add headless component authoring skill - #36502

Open
Dmytro Kirpa (dmytrokirpa) wants to merge 6 commits into
microsoft:masterfrom
dmytrokirpa:dmytrokirpa/headless-component-skill
Open

docs: add headless component authoring skill#36502
Dmytro Kirpa (dmytrokirpa) wants to merge 6 commits into
microsoft:masterfrom
dmytrokirpa:dmytrokirpa/headless-component-skill

Conversation

@dmytrokirpa

@dmytrokirpa Dmytro Kirpa (dmytrokirpa) commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a Copilot skill for authoring and extending headless v9 component primitives
  • document base-hook, data-attribute, packaging, bundle-size, test, Storybook, CSS Module, and accessibility requirements
  • define a three-PR gh stack workflow separating component-package tests, base APIs from the dependent headless package
  • register the skill for Copilot and Claude entry points

Validation

  • verified all documented headless library, stories, and docsite Nx targets exist
  • verified installed gh stack and Beachball flags used by the workflow
  • checked skill metadata, mirror pointer, portable paths, and diff formatting

No Beachball change file is required because this change does not modify a published package.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 806b7b8e-562f-4b2a-b4f5-b9d06fc6131f
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Pull request demo site: URL

Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread .agents/skills/headless-component/SKILL.md
Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread .agents/skills/headless-component/SKILL.md
Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread .agents/skills/headless-component/SKILL.md
Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread .agents/skills/headless-component/SKILL.md Outdated

Copilot AI 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.

Pull request overview

Adds guidance for authoring and extending headless Fluent UI v9 components.

Changes:

  • Documents implementation, testing, packaging, and accessibility requirements.
  • Defines stacked-PR and validation workflows.
  • Registers the skill for Copilot and Claude.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
AGENTS.md Registers the new slash command.
.agents/skills/headless-component/SKILL.md Defines the authoring workflow and requirements.
.claude/skills/headless-component/SKILL.md Adds the Claude skill pointer.
Suppressed comments (3)

.agents/skills/headless-component/SKILL.md:467

  • Headless and v9 stories intentionally keep interaction assertions in tests rather than Storybook play functions. Requiring play here would make generated stories violate that convention; keep the story interactive/demonstrable and put the role, ARIA, data-state, and inverse-action assertions in unit or Cypress coverage.
7. Exercise the primary interaction instead of rendering only static variants.
   Interactive stories should drive the real component behavior and assert the
   resulting role/ARIA/data state in a `play` function. Cover the inverse action
   too; if the behavior requires a real browser primitive unavailable to the
   Storybook test runner, cover it in Cypress and keep the story demonstrable.

.agents/skills/headless-component/SKILL.md:571

  • This preview package is currently 0.2.4 and follows zero-semver: new headless components have shipped as patches (for example TagPicker and MenuButton in library/CHANGELOG.md:12-28). minor would incorrectly advance 0.2.x to 0.3.0 for a normal additive primitive.
yarn beachball change --no-commit --branch master \
  --package @fluentui/react-headless-components-preview --type minor \
  --message "feat(react-headless-components-preview): add <ComponentName>"

.agents/skills/headless-component/SKILL.md:591

  • This rule incorrectly assigns minor to new primitives in the 0.x headless preview package. Keep minor for new exports in stable v9 component packages, but use patch for additive headless-preview APIs under its zero-semver policy; otherwise future skill runs will create the wrong release bump.
- New public base exports and new headless primitives are normally `minor`
  changes. Use `patch` only when correcting an existing contract without adding
  public API, and never use `major` without explicit approval.

Comment on lines +78 to +82
7. Plan the change as two stacked PRs before editing:
- **bottom PR — component package:** base hook/types/renderer/context exports
and their package-local tests, API docs, bundle-size coverage, manifest
updates, and change file
- **top PR — headless package:** stable headless primitive, `data-*`
Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread .agents/skills/headless-component/SKILL.md
Comment thread .agents/skills/headless-component/SKILL.md
Comment thread .agents/skills/headless-component/SKILL.md
Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread .agents/skills/headless-component/SKILL.md Outdated
Comment thread AGENTS.md
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: dcfddc5e-0bfa-49f1-b0db-8e9ff5a0329c

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Suppressed comments (2)

.agents/skills/headless-component/SKILL.md:575

  • Beachball already records the package name, and the adjacent headless example uses the package-agnostic feat: form. Drop the repeated package scope here so the generated release note stays concise and consistent.
  --message "feat(react-<name>): expose headless base APIs"

.agents/skills/headless-component/SKILL.md:84

  • The PR description says this skill defines a two-PR component/headless stack, but this requirement adds a third regression-test PR and the workflow section repeats that three-PR shape. Please align the PR description and documented workflow so contributors know which stack is intended.
7. Plan the change as three stacked PRs before editing:
   - **bottom PR — regression test:** lock down the existing behavior that the
     base extraction must preserve; do not change production code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants