Make contrib/claude the single source of truth for v2 frontend work on the compliance-portal app and packages/ui/src/v2, treating console and the legacy @probo/ui tree as non-compliant code to migrate rather than precedent. Rewrite ui.md around the v2 kit: flat folders, Base UI as the headless layer styled thinly (controlled open/onOpenChange, no imperative ref or cloneElement plumbing), tailwind-variants only, separate components over structure-changing variants, and bundle-safe skeletons that never drag Base UI into the loading path. Add a naming/suffix taxonomy to react-components.md, replacing the Table/Row and connection-item Card suffixes with List/ListItem, and add an error/fallback props convention. Document _lib and _locales special folders plus routes.ts placement in app-arborescence.md, with at most one _locales per routes.ts. Add error-handling.md (reusable ErrorBoundary usable at any level plus async try/catch) and i18n.md (i18next key-based catalogs). Update the relay file-organization and fragment examples, the connection-item cursor rule, and the AGENTS.md index to match. Signed-off-by: Émile Ré <emile@probo.com>
4.5 KiB
4.5 KiB
AGENTS.md
Detailed guides for specific subsystems live in contrib/claude/:
contrib/claude/make.md— GNUmakefile targets, codegen, overridable variablescontrib/claude/api-surface.md— GraphQL / MCP / CLI / n8n sync rulescontrib/claude/go-style.md— Go project deps, style (declarations, calls, imports, errors, naming, logging, safe URL construction)contrib/claude/ts-style.md— TypeScript style (safe URL construction)contrib/claude/go-testing.md— Go test conventions (parallel, require vs assert, naming)contrib/claude/go-service.md— Go service orchestration (Run, graceful shutdown, crash propagation)contrib/claude/go-worker.md— Go worker pattern (poll-based, bounded concurrency, FOR UPDATE SKIP LOCKED)contrib/claude/httpclient.md— HTTP client (kit/httpclient, SSRF protection by default, connector wiring)contrib/claude/gid.md— Global identifiers (GID layout, TenantID, entity type registry)contrib/claude/coredata.md— Data access layer (Scoper, SQL patterns, filters, order fields, migrations)contrib/claude/logging.md— Structured logging (PII-free rules, field helpers, logger wiring)contrib/claude/graphql.md— Go GraphQL backend (gqlgen, @goModel, connection types, cursor pagination)contrib/claude/mcp.md— MCP API patterns (specification.yaml, mcpgen, resolvers, type helpers)contrib/claude/cli.md— CLI command patterns (cobra, huh prompts, pagination, output formatting)contrib/claude/authorization.md— IAM policy-based authorization (policies, conditions, roles, AuthorizationAttributer)contrib/claude/validation.md— Validation framework (fluent API, validators, error codes, propagation)contrib/claude/e2e.md— End-to-end testing (factory builders, RBAC tests, tenant isolation, assertions)contrib/claude/agent.md— Agent orchestration framework (tools, handoffs, execution)contrib/claude/app-arborescence.md— Frontend app folder layout (pages, routes at resource folders, loaders, skeletons, _components, _lib, _locales)contrib/claude/relay.md— Frontend Relay client (queries, fragments, mutations, pagination)contrib/claude/react-components.md— React component shape (file/export, props, configure vs data via hooks, naming/suffix taxonomy, error props)contrib/claude/ui.md— @probo/ui v2 kit (Base UI headless, Tailwind, tailwind-variants, flat folders, bundle-safe skeletons)contrib/claude/v2-colors.md— v2 color system (Radix scale, step usage, do/don't)contrib/claude/error-handling.md— Frontend error handling (ErrorBoundary at any level, error/fallback props, async try/catch)contrib/claude/i18n.md— Frontend i18next (key-based translations, _locales/.json per routes.ts)contrib/claude/config.md— Configuration propagation (all files to update when config changes)contrib/claude/file-naming.md— File naming conventions (template files, extensions)contrib/claude/prompt-style.md— Agent prompt template structure (role/task/instructions XML style)contrib/claude/prompt-style.md— Agent prompt template structure (role/task/instructions XML style)contrib/claude/commit.md— Commit message conventionscontrib/claude/license.md— ISC license header (all file types)contrib/claude/release/README.md— Release process (per-track version bump, changelog, tag, push)contrib/claude/sandbox.md— Lima sandbox environments (create, manage, access services)contrib/claude/n8n.md— n8n community node (resources, operations, GraphQL helpers)