Strongtie Design System
Getting StartedComponents

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Setup Guide
  • Package Installation
  • Code Quality Setup
  • Migration Guide
  • Resources
Registry
  • Getting Started
  • Combobox
  • Datepicker
  • MultiSelect
  • Tab Nav
  • Tree
Guides
  • Framework Recommendations
Foundations
  • States
  • Variables
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Command
  • Combobox
  • Context Menu
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • Hover Card
  • Input
  • Input Group
  • Item
  • Kbd
  • Label
  • Menubar
  • Multi Select
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Switch
  • Table
  • Tabs
  • Tab Nav
  • Textarea
  • Toaster
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
2026 Simpson Strong-Tie
  1. Docs
  2. AGENTS.md Template

AGENTS.md Template

PreviousNext

Standard AGENTS.md content for AI-assisted development. Copy this template into your project's AGENTS.md file.

This document provides the standard content that should be added to every application's AGENTS.md file after initial project setup. Copy the section below and append it to your project's existing AGENTS.md.

Download: You can also download the template directly for easy copy-paste.

Prerequisites

Before adding this section, ensure your AGENTS.md already contains:

  1. Project-specific build commands (npm run dev, npm run build, etc.)
  2. Project structure overview
  3. Import alias configuration
  4. Naming conventions
  5. TypeScript guidelines
  6. React guidelines
  7. Styling guidelines
  8. Code quality standards
  9. Testing guidelines
  10. Pre-commit checklist

Template Content

Copy everything below and append to your AGENTS.md:

---
 
## Design Consistency Standards
 
These rules ensure consistency across all applications. For detailed rationale and examples, see the centralized Design Standards Documentation.
 
### React Compiler Optimization
 
This project uses React Compiler (`babel-plugin-react-compiler`):
 
**DO NOT USE:**
 
- `useMemo()` - compiler handles memoization automatically
- `useCallback()` - compiler optimizes callback references
- `React.memo()` - rarely needed with compiler optimization
 
**DO USE:**
 
- `React.lazy()` for code splitting (unrelated to memoization)
- Standard hooks: `useState`, `useEffect`, `useRef`
 
---
 
### State Management
 
**Decision Tree:**
 
1. Is this server data (from API)? → **TanStack Query**
2. Is this component-local UI state? → **useState**
3. Is this session-level shared state (auth, tenant, theme)? → **React Context**
4. Is this complex, computed, or cross-component state? → **Zustand**
 
**Anti-Patterns:**
 
- Never store API responses in `useState`
- Never duplicate TanStack Query cache in local state
- Never create Context for single-component state
 
---
 
### Form Implementation
 
**Before implementing any form:**
 
| Condition                     | Solution              |
| ----------------------------- | --------------------- |
| 1-3 fields AND no validation  | `useState`            |
| 4+ fields OR validation rules | React Hook Form + Zod |
 
**Complex Form Requirements:**
 
1. Create schema in `/schemas/{feature}-schema.ts`
2. Use `zodResolver` with React Hook Form
3. Use shadcn/ui Form components (`FormField`, `FormItem`, `FormControl`, `FormMessage`)
 
---
 
### TanStack Query
 
**Required Patterns:**
 
- Use query key factory from `hooks/query-keys.ts`
- Create custom hooks for all queries (never use `useQuery` directly in components)
- Implement optimistic updates for mutations
- Handle all three states: loading, error, empty
 
**Before creating a query:**
 
1. Check `hooks/query-keys.ts` for existing key
2. Check `/hooks/use-*.ts` for existing hook
3. Add query key first, then create hook
 
---
 
### Error Handling
 
**Architecture:**
 
| Error Type            | Handler                   |
| --------------------- | ------------------------- |
| React component crash | Error Boundary            |
| API error (expected)  | Query error state + Toast |
| Validation error      | Form field errors         |
| Network error         | Toast notification        |
 
**Error Message Pattern:**
 
- APIs return error codes, not user messages
- UI maps codes to user-friendly messages via `lib/error-messages.ts`
- Never display raw API error messages to users
 
---
 
### Accessibility Requirements
 
**Icon-Only Buttons:**
 
```typescript
// REQUIRED - use aria-label
<Button variant="ghost" size="icon" aria-label="Delete project">
  <Trash2 className="h-4 w-4" />
</Button>
 
// ALTERNATIVE - use sr-only span
<Button variant="ghost" size="icon">
  <Trash2 className="h-4 w-4" />
  <span className="sr-only">Delete project</span>
</Button>
 
// NEVER - no accessible name
<Button variant="ghost" size="icon">
  <Trash2 className="h-4 w-4" />
</Button>
```

Required for All Components:

  • Form inputs must have labels
  • Images must have meaningful alt text (or alt="" for decorative)
  • Interactive elements must be keyboard accessible
  • Focus states must be visible
  • Color cannot be the only indicator of state

Loading States

Use Skeleton when:

  • Content layout is known/predictable
  • Preventing layout shift matters
  • Data typically loads in < 3 seconds

Use Spinner when:

  • Layout is unpredictable
  • Action-triggered loading (button clicks)
  • Overlay/blocking operations

Always provide:

  • Loading state (Skeleton or Spinner)
  • Error state (with retry action)
  • Empty state (with call-to-action)

Bundle Chunking

Production builds use manual chunk splitting for optimal caching:

ChunkContents
vendor-reactReact core, React Router
vendor-chartsRecharts, D3 (lazy-load)
vendor-editorPlate.js, Slate (lazy-load)
vendor-formsReact Hook Form, Zod
vendor-queryTanStack Query
vendor-radixRadix UI primitives
vendor-utilsdate-fns, clsx, Lucide
vendor-authOIDC authentication

Heavy chunks (vendor-charts, vendor-editor) should be lazy-loaded with React.lazy().


Component Checklist

Before completing any component:

  • Named export (not default)
  • Props use readonly modifier
  • Sub-components defined at module level (not nested)
  • Loading state handled (Skeleton)
  • Error state handled (with retry)
  • Empty state handled (with CTA)
  • Icon buttons have aria-label
  • Form inputs have labels
  • Uses shadcn/ui components where applicable
  • Uses cn() for conditional classes
  • Uses @/ import aliases

Git Workflow

Branch Naming:

  • Always use feature branches - never commit directly to main
  • Branch names must follow the pattern: ^(feature|hotfix)\/[a-z0-9\-]+$
  • Lowercase only, alphanumeric with hyphens

Preferred Formats:

TypePatternExample
Feature with ticketfeature/ticket-####-descriptionfeature/ticket-1234-add-user-auth
Feature without ticketfeature/descriptionfeature/add-dark-mode
Hotfix with tickethotfix/ticket-####-descriptionhotfix/ticket-5678-fix-login-bug
Hotfix without tickethotfix/descriptionhotfix/fix-null-pointer

Branch Rules:

  • feature/ - New features, enhancements, refactoring
  • hotfix/ - Bug fixes, urgent patches
  • Description should be concise but meaningful
  • Use hyphens to separate words (not underscores or camelCase)

Commit Guidelines:

  • Write clear, concise commit messages
  • Use present tense ("Add feature" not "Added feature")
  • Reference ticket numbers when applicable
  • Keep commits focused - one logical change per commit

Pull Request Requirements:

  • Create PRs for all changes
  • PRs require review before merging
  • Ensure CI checks pass before requesting review
  • Squash commits when merging to keep history clean

Customization Notes

When adding this section to a project, you may need to customize:

  1. Bundle Chunking Table - Adjust based on project dependencies (remove unused chunks, add project-specific ones)

  2. Query Key Location - If your project uses a different path for query keys, update the reference

  3. Schema Location - If schemas are stored elsewhere, update /schemas/ references

  4. Error Messages Location - Update lib/error-messages.ts path if different

  5. React Compiler - If the project doesn't use React Compiler, remove that section and add guidance for manual memoization


Verification Checklist

After adding the section, verify:

  • Section appears after existing content with proper --- separator
  • All code blocks render correctly
  • Tables are properly formatted
  • Links to centralized documentation are correct
  • Project-specific paths are accurate
  • Bundle chunks match project's vite.config.ts
Simpson Strong-Tie Design SystemCDN Migration Guide

On This Page

PrerequisitesTemplate ContentLoading StatesBundle ChunkingComponent ChecklistGit WorkflowCustomization NotesVerification Checklist

Contribute

  • Report an issue
  • Request a feature
  • Edit this page