Skip to main content

Rules

Persistent instructions (coding standards, conventions, patterns) that are always available to agents. Rules are included in the agent's context automatically.

Rule Reference

RuleDescription
agent-orchestrationAgent delegation patterns, sub-agent spawning conventions, result aggregation, and multi-agent coordination protocols.
api-designEndpoint versioning, request validation, idempotency keys, structured error responses, auth, CORS, CSP, pagination, and webhook security.
browser-verificationWhen and how to verify UI changes in the browser via automation MCP -- dev server lifecycle, navigation, interaction, visual regression, screenshot evidence.
code-standardsTypeScript strict mode, naming conventions (camelCase/PascalCase/SCREAMING_SNAKE), and function/file length limits.
component-conventionsComponent structure, typed props/emits, design tokens, WCAG AA accessibility, loading/error/empty states, form UX, and 60fps render targets.
dependency-managementLockfile hygiene, new-dependency justification, CVE patching timelines (48h for critical), and bundle size budgets.
error-handlingStructured error hierarchy, typed error codes, exponential backoff for retries, and correlation IDs for tracing.
feature-flagsFlag naming (FF_AREA_FEATURE), storage, evaluation, gradual rollout, dependencies, kill switches, 30-day cleanup deadlines, and audit.
git-conventionsGit workflow, branch naming, commit message conventions, and merge strategy.
i18nInternationalization, RTL support, locale management, and ICU message format.
learning-consultWhen and how to consult project learnings during development.
migrationsBackward-compatible schema changes, idempotent scripts, rollback plans, and deploy-then-migrate ordering.
observabilityStructured JSON logging, OpenTelemetry, SLO/SLI, distributed tracing, alerting, dashboards, and no PII in logs.
performance-budgetsCore Web Vitals, API latency, database query budgets, bundle size, and enforcement mechanisms.
security-patternsInput validation, output encoding, auth enforcement, AI/agentic security, and OWASP alignment.
testingDeterministic, isolated, fast tests with clear naming, regression coverage, no network in unit tests, no any.
themingDark mode, prefers-color-scheme, CSS custom properties, and semantic color tokens.
tooling-hierarchyPriority order for knowledge: project specs > codebase > library docs (Context7 MCP) > web research; GitHub CLI-first.

Rule Types

Rules have different application scopes:

  • Always-apply -- active in every conversation (e.g., code-standards, git-conventions)
  • Glob-scoped -- active only when files matching specific patterns are in context (e.g., component-conventions for *.tsx)
  • Agent-attached -- referenced by specific agents

Canonical Location

Rules live in .agents/rules/hatch3r-{id}.md with YAML frontmatter specifying id, type, description, and optional globs or alwaysApply flags.

Customization

Override rule behavior per-project using .hatch3r/rules/{id}.customize.yaml. See Customization.