Skip to content

Latest commit

 

History

History
94 lines (80 loc) · 8.87 KB

AGENTS.md

File metadata and controls

94 lines (80 loc) · 8.87 KB

AGENTS.md

Guidance for coding agents working in the FluentUI React Native monorepo, which implements Microsoft's Fluent Design System for iOS, Android, macOS, Windows, and Win32. This file is always loaded. It holds repository safeguards and routes each task to the workflow and references it needs; load only what the task requires.

How guidance is organized

  • AGENTS.md files hold safeguards and local invariants. Copilot CLI loads applicable files from the repository, working directory, ancestors, and directories in the path of files being worked on. Read the scoped entries below when a task touches them.
  • Skills in .github/skills define task workflows.
  • Shared references in references/agents/ hold reusable recipes and repository knowledge, indexed by task.
  • Product contracts (SPEC.md, spec/, CONTRACT.md), protocols, and package documentation stay with their packages and govern component behavior.

Safeguards

These apply to every task.

  • Permissions: the repository hook approves specific operations; it is not a sandbox, and other operations use normal permission handling (R-PERM-001). Do not amend commits, discard other people's changes, or rewrite history without explicit authorization (R-PERM-002). Never print authentication tokens or commit personal permission files, account names, or credentials (R-PERM-003). Unrestricted screen capture, osascript, debugger attachment, crash-report access, certificate-trust changes, and TCC resets need separate authorization (R-PERM-007). Read the permissions reference before using gh api, Pod, process, loopback curl, or capture operations, or changing the policy.
  • Validation: run the owning workspace's declared scripts (R-VALID-001). Report each check as passed, failed, skipped, not run, or unsupported; JavaScript tests and bundles are not native qualification (R-VALID-002). Iterate with focused tests, such as yarn test <name> in the package, and finish code or configuration changes with one yarn clean-lage-cache and then yarn lage buildci (R-VALID-003, R-VALID-004).
  • Code: no barrel exports (R-REPO-001); keep React Native fork imports in platform files (R-REPO-002); add a changeset for published packages (R-REPO-003); never copy private source bodies into this public repository (R-REPO-004). Keep regular expressions linear-time and never splice values into code that runs, tests included (R-SCAN-001, R-SCAN-002; see code scanning).
  • Component generations: v0 and v1 are maintenance-only; new components use the agentic workflow (R-V0-001, R-V1-001). Classify code by imports and structure, not by path (R-CLASSIFY-001).
  • Native boundary: before changing Swift, Objective-C, C++, headers, podspecs, Windows projects, codegen specs, native registration, or a native-backed platform wrapper, use the native component skill, directly or as an overlay. iOS and macOS changes must keep both CocoaPods-module and Office bridging-header builds working; follow the Apple and Office rules.

Route the task

Classify the change with the classification guide, then use:

Task Skill
New component, or change or plan a change to an agentic component or primitive agentic-component-authoring
Agentic contract-only or contract-feasibility work agentic-component-contract-authoring
Fix or maintain an existing v0 or v1 component (not native-core /legacy) maintain-v0-v1-component
Review a component change of any generation review-component
Native component, TurboModule, service, codegen, or a native-core /legacy wrapper implement-native-component
Cross-component agentic extraction or dependency direction agentic-component-optimization
Desktop test configuration, execution, reporting, helpers, or CI desktop-testing
Change or review the desktop testing package source maintain-desktop-testing
Storybook app catalog, Metro, CocoaPods, or native builds agentic-storybook-development
Dependency vulnerability remediation fix-security-issues

Other repository work starts from the reference index: architecture, commands and validation, TypeScript, release, focus, and native guidance. Design tokens and theming start from the design package. For package-owned knowledge, follow the package guidance standard.

Scoped instructions

Path Scope
packages/agentic/components Agentic components, primitives, and contracts
packages/agentic/design Tokens, theming, styling, and color utilities
packages/agentic/desktop-driver Desktop WebDriver driver
packages/agentic/desktop-test Application-neutral desktop test harness
packages/agentic/native-core Native components and modules
packages/agentic/storybook-desktop Storybook desktop integration
packages/agentic/storybook-desktop-runtime On-device Storybook runtime
packages/framework-base Component patterns, hooks, and accessibility helpers
packages/framework/framework v1 framework package
packages/deprecated/foundation-compose v0 framework package
apps/storybook Storybook app, native workflows, and diagnostics

Quick facts

  • Yarn 4 in pnpm mode; TypeScript 7.0.2 compiled as one tsc -b project-references graph; Lage task orchestration. New packages must be added to the root tsconfig.json references.
  • yarn build builds the repository; yarn lage test and yarn lage lint test and lint packages, and yarn test <name> in a package runs only the matching test files; yarn format formats. yarn lage buildci runs the CI aggregate, including yarn check-agent-instructions. yarn clean-lage-cache clears the Lage cache before final validation.
  • Details: commands and validation, architecture, TypeScript, and release.