Files
agent-radar 2ed3415fb7
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
2026-09-01 20:17:27 +08:00

3.0 KiB

AGENTS.md

Scope

This file applies to packages/ui/*.

packages/ui/* is for shared frontend foundations, not app-specific product workflows.

If you are editing packages/ui/system/*, also read packages/ui/system/AGENTS.md.

Current packages

  • packages/ui/system as @tutti-os/ui-system
  • packages/ui/i18n-runtime as @tutti-os/ui-i18n-runtime
  • packages/ui/notifications as @tutti-os/ui-notifications
  • packages/ui/react-hooks as @tutti-os/ui-react-hooks

@tutti-os/ui-system owns shared CSS tokens, theme styles, icon exports, presentation primitives, and reusable business display components. @tutti-os/ui-i18n-runtime owns host-agnostic i18n runtime helpers and scoped runtime composition for reusable frontend packages. @tutti-os/ui-notifications owns host-agnostic notification service contracts and DI tokens for reusable frontend services. @tutti-os/ui-react-hooks owns host-agnostic React hook helpers for reusable frontend packages, such as external-store snapshot and selector patterns. These packages do not own business logic, app-specific workflows, host runtime calls, workflow-owned domain modules, or domain-specific composed modules.

Public API rules

Shared UI packages should expose narrow, stable surfaces:

  • prefer adding exports to an existing package barrel before introducing a new public subpath
  • do not expose src/* layout as public API
  • do not encourage per-file deep imports
  • if package exports change intentionally, update the matching package exports and boundary check script

Action rules

  • keep runtime helpers and hooks low-level, generic, and frontend-foundation-focused
  • keep @tutti-os/ui-react-hooks focused on host-agnostic React hook patterns, not on domain hooks or non-React utilities
  • when a shared frontend package needs external-store subscription wiring, prefer @tutti-os/ui-react-hooks over adding a new direct useSyncExternalStore wrapper locally
  • keep adapter-level getSnapshot() identity fixes in the owning package; @tutti-os/ui-react-hooks does not replace reference-stable derived snapshots inside non-React adapters
  • reusable packages outside packages/ui/* should consume @tutti-os/ui-system primitives and token-backed Tailwind utilities before adding package-local CSS
  • if repeated package-local CSS needs emerge, move the shared foundation into @tutti-os/ui-system
  • put @tutti-os/ui-system component, token, metadata, storyboard, and skill rules in packages/ui/system, not in this parent document

Testing defaults

  • Run pnpm typecheck
  • Run pnpm check:ui-boundaries
  • If a change affects desktop integration, also run pnpm --filter @tutti-os/desktop build