@@ -25,35 +25,46 @@ authoring rule in one always-loaded instruction file.
2525
2626## Load focused references
2727
28- | Work | Reference |
29- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
30- | Public props, slots, state types, native prop exposure, or exports | [ Types and slots] ( references/types-and-slots.md ) |
31- | Defaults, derived state, interaction hooks, accessibility, or slot construction | [ State and accessibility] ( references/state-and-accessibility.md ) |
32- | Tokens, style factories, theme caching, state precedence, or slot style application | [ Styles and tokens] ( references/styles-and-tokens.md ) |
33- | Pure slot rendering, component assembly, or display names | [ Rendering and assembly] ( references/rendering.md ) |
34- | Runtime tests, type tests, snapshots, Storybook stories, or validation | [ Tests and stories] ( references/tests-and-stories.md ) |
35- | Native React Native Windows Fabric components, codegen, registration, or UIA | [ Windows Fabric native components] ( references/windows-fabric-native-components.md ) |
36- | Cross-component duplication, shared helper extraction, or dependency hygiene | [ Package optimization] ( ../agentic-component-optimization/SKILL.md ) |
28+ | Work | Reference |
29+ | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
30+ | Flex component source resolution, React Native contract adaptation, provenance, or divergences | [ Flex source adaptation] ( references/spec-source-adaptation.md ) |
31+ | Public props, slots, state types, native prop exposure, or exports | [ Types and slots] ( references/types-and-slots.md ) |
32+ | Defaults, derived state, interaction hooks, accessibility, or slot construction | [ State and accessibility] ( references/state-and-accessibility.md ) |
33+ | Tokens, style factories, theme caching, state precedence, or slot style application | [ Styles and tokens] ( references/styles-and-tokens.md ) |
34+ | Pure slot rendering, component assembly, or display names | [ Rendering and assembly] ( references/rendering.md ) |
35+ | Runtime tests, type tests, snapshots, Storybook stories, or validation | [ Tests and stories] ( references/tests-and-stories.md ) |
36+ | Native React Native Windows Fabric components, codegen, registration, or UIA | [ Windows Fabric native components] ( references/windows-fabric-native-components.md ) |
37+ | Cross-component duplication, shared helper extraction, or dependency hygiene | [ Package optimization] ( ../agentic-component-optimization/SKILL.md ) |
3738
3839A new higher-order component normally needs every reference. A focused fix should load only the affected reference and
3940its immediate neighbors. Keep the component's colocated ` SPEC.md ` and companion files authoritative for its contract.
4041
4142## Workflow
4243
43- 1 . Read the repository and package instructions, the component ` SPEC.md ` , and every companion file referenced by the
44- spec. Use the package-wide optimization guidance only when the change clearly involves repeated patterns or shared
45- dependency boundaries.
46- 2 . Inspect the closest canonical implementation. Use
44+ 1 . For a higher-order component, start Agency with the repository's
45+ ` flex-authoring ` profile, invoke ` flex-components:<name> ` , and follow the
46+ [ Flex source adaptation] ( references/spec-source-adaptation.md ) reference.
47+ Record source identities without copying source bodies.
48+ 2 . Read the repository and package instructions, the component ` SPEC.md ` ,
49+ ` spec/source.json ` , and every React Native companion referenced by the
50+ spec. For a new component, draft and review those local contract files
51+ before implementation. Use the package-wide optimization guidance only when
52+ the change clearly involves repeated patterns or shared dependency
53+ boundaries.
54+ 3 . Inspect the closest canonical implementation. Use
4755 [ ` components/button ` ] ( ../../../packages/agentic/components/src/components/button ) for a styled higher-order component
4856 and [ ` primitives/icon ` ] ( ../../../packages/agentic/components/src/primitives/icon ) for a direct primitive.
49- 3 . Establish the public contract before implementation: variants, slots, native props, accessibility, interaction
57+ 4 . Establish the public contract before implementation: variants, slots, native props, accessibility, interaction
5058 states, and platform behavior.
51- 4 . Implement in dependency order: types and slots, state and accessibility, styles and slot props, pure rendering,
59+ 5 . Implement in dependency order: types and slots, state and accessibility, styles and slot props, pure rendering,
5260 component assembly, and explicit exports.
53- 5 . Preserve the specification. Record a genuine token or platform gap rather than substituting an unrelated value or
61+ 6 . Preserve the specification. Record a genuine token or platform gap rather than substituting an unrelated value or
5462 web-only behavior.
55- 6 . Add focused tests and stories that exercise the public API and the resolved native output.
56- 7 . Run the smallest declared validation command while iterating. Finish with package format, lint, build, and tests; run
63+ 7 . Add focused tests and stories that exercise the public API and the resolved native output.
64+ 8 . Reconcile and ratify the local contract against the realized public types,
65+ tests, stories, and platform evidence. Upstream changes require explicit
66+ re-review and never overwrite the local contract.
67+ 9 . Run the smallest declared validation command while iterating. Finish with package format, lint, build, and tests; run
5768 the Storybook bundle for story changes and the root build when public types, manifests, or project references change.
5869
5970Do not divide one component implementation into separate sub-agent or sub-skill phases. Its types, state, styling, and
0 commit comments