AGENT SKILL

组件与基础元素实现

agentic-component-authoring

实现、修改或规划 packages/agentic/components 中组件和基础元素(primitives)的变更,包括每一个新组件。涵盖公共 API、插槽(slots)、状态、token 样式、渲染、测试和 stories。不适用于仅契约的工作、只读审查、v0/v1 维护或 Storybook 应用工具链。

License 许可
MIT
最近更新
2026-11-14
Stars
★ 1.4k
Forks
179

01 前言 Front Matter

name
agentic-component-authoring
license
MIT
description
Implement, change, or plan changes to components and primitives in packages/agentic/components, including every new component. Covers public APIs, slots, state, token styling, rendering, tests, and stories. Not for contract-only work, read-only reviews, v0/v1 maintenance, or the Storybook app toolchain.

03 SKILL.md 正文

Agentic component authoring

Build components in packages/agentic/components as React Native adaptations of the Fluent UI v9 component pattern. New components always use this workflow; v0 and v1 are maintenance-only. This skill routes the work. Load only the references the current change needs.

Choose the component kind

  • Higher-order components live in src/components. Read the package instructions and the higher-order component reference. The component's SPEC.md and spec/ companions are its contract.
  • Primitives live in src/primitives. Read the package instructions and the primitive reference. A primitive's colocated CONTRACT.md is its contract; primitives have no upstream-backed SPEC.md.
  • Changes spanning components, repeated helpers, or dependency boundaries also use the optimization skill. Do not audit the whole package for a small edit.
  • Read-only reviews use review-component. Storybook application, native project, bundling, or CocoaPods work uses the Storybook skill.
  • Native views, codegen, or registration also use the native component skill as an overlay.

Load focused references

Work Reference
Source interpretation, provenance, contract drafting, or divergences Contract authoring
Public props, slots, state types, native prop exposure, or exports Types and slots
Defaults, derived state, interaction hooks, accessibility, or slots State and accessibility
Focus, focus visuals, keyboard activation, or native focus refs Common focus authoring, then Windows/Win32 or macOS
Tokens, theme caching, state precedence, or slot style application Styles and tokens and design tokens and styling
Pure slot rendering, component assembly, or display names Rendering and assembly
Runtime tests, type tests, snapshots, Storybook stories, or validation Tests and stories
Native React Native Windows Fabric components, codegen, registration, or UIA Windows Fabric native components

A new higher-order component normally needs the types, state, styles, rendering, and tests references, plus focus guidance when it is focusable. Load the Windows Fabric reference only for native Windows views. A focused fix loads only the affected reference and its immediate neighbors.

Workflow

For a plan-only request, follow steps 1 to 4 without editing, then return the planned contract revision, the references used, the implementation order, and the validation plan.

  1. Read the package instructions and the component's contract: SPEC.md, spec/source.json, and every React Native companion it references for a higher-order component, or CONTRACT.md for a primitive.
  2. Higher-order components: use an existing reviewed contract directly when its source evidence and requested behavior are unchanged. If the contract is absent, stale, still a draft, or accompanied by new source evidence, run the contract authoring workflow and complete its pre-code review gate first (R-AGENTIC-001 in the package instructions).
  3. Inspect the closest canonical implementation: packages/agentic/components/src/components/button for a styled higher-order component, or packages/agentic/components/src/primitives/icon for a direct primitive.
  4. Establish the public contract before implementation: variants, slots, native props, accessibility, interaction states, and platform behavior.
  5. Implement in dependency order: types and slots, state and accessibility, styles and slot props, pure rendering, component assembly, and explicit exports.
  6. Preserve the contract. Record a genuine token or platform gap rather than substituting an unrelated value or web-only behavior.
  7. Add focused tests and stories that exercise the public API and the resolved native output.
  8. Reconcile and ratify the local contract against the realized public types, tests, stories, and platform evidence. Upstream changes require explicit re-review and never overwrite the local contract.
  9. Iterate with focused validation (R-VALID-004): yarn test <component> from the package, yarn build after type changes, and yarn test --findRelatedTests <files> after editing shared code. Before handover, run the package format, lint, build, and whole test suite, the Storybook bundle for story changes, and the root build when public types, manifests, or project references change. Then run yarn clean-lage-cache and yarn lage buildci once as final acceptance (R-VALID-003) and report results truthfully (R-VALID-002).

Do not divide one component implementation into separate sub-agent or sub-skill phases. Its types, state, styling, and rendering form one contract and should remain in one implementation context.

04 同仓库更多 Skills

microsoft
microsoft/fluentui-react-native

组件代码审查

review-component

审查任意代际(v0、v1、智能体、基础组件或原生支持)的组件代码或变更,但不编辑文件。对每处变更进行分类,应用相应的检查清单和原生覆盖层,并报告带验证状态且有证据支撑的发现。

软件开发工程师代码仓库协作管理
★ 1.4k
microsoft
microsoft/fluentui-react-native

v0/v1 组件维护

maintain-v0-v1-component

修复或维护现有的 v0(foundation-compose)或 v1(framework compose/compressible)组件,包括其平台变体。先对所属代际进行分类,再仅加载对应的配方。不适用于新组件、agentic 组件、只读审查或纯原生更改。

软件开发工程师代码实现
★ 1.4k
microsoft
microsoft/fluentui-react-native

桌面测试工具链维护

maintain-desktop-testing

更改、审查或规划对 desktop-driver、desktop-test、storybook-desktop 或 storybook-desktop-runtime(包括原生辅助函数)的源代码更改。应用包不变量、文档规范、原生与消费者验证,以及 changesets。

软件开发工程师开发环境与工具链管理
★ 1.4k
microsoft
microsoft/fluentui-react-native

原生组件实现

implement-native-component

实现或更改原生组件、TurboModules、原生服务、codegen specs,或原生支撑的平台包装器(Swift、Objective-C、C++/WinRT、podspecs、Windows 项目)。同时提供适用于 v0、v1 和 agentic 工作的原生覆盖清单。不适用于 Storybook 工具链故障。

软件开发工程师代码实现
★ 1.4k
microsoft
microsoft/fluentui-react-native

依赖安全漏洞修复

fix-security-issues

审计并修复依赖安全公告(漏洞),同时遵守包年龄策略、移除未使用的易受攻击能力、对 Yarn resolutions 去重,并验证受影响的工具链。

安全工程师安全公告与漏洞管理
★ 1.4k
microsoft
microsoft/fluentui-react-native

桌面测试配置与运行

desktop-testing

使用 desktop-test、desktop-driver 和 storybook-desktop 配置、运行或排查原生桌面测试,涵盖应用目标与测试套件、辅助函数、权限、WDIO 套件、Storybook 故事测试与冒烟运行、报告以及 CI。不适用于包源代码更改或 Storybook 应用构建工具链。

测试工程师测试与质量保障
★ 1.4k