core-utils
    Preparing search index...

    Module @clipboard-health/ai-rules

    @clipboard-health/ai-rules

    Pre-built AI agent rules for consistent coding standards.

    npm install --save-dev @clipboard-health/ai-rules
    
    1. If you have an existing AGENTS.md and/or CLAUDE.md file in your repository, rename it to OVERLAY.md. The sync-ai-rules script you'll add below appends this file's contents to each generated file so it's loaded into LLM agent contexts.

    2. Choose the profile that matches your project type:

      Profile Includes Use For
      common common TypeScript libraries, generic projects
      frontend common + frontend React apps, web apps
      backend common + backend NestJS services, APIs
      fullstack common + frontend + backend Monorepos, fullstack apps
      datamodeling datamodeling DBT data modeling

      Rule categories:

      • common: TypeScript, testing, code style, error handling, key conventions
      • frontend: React patterns, hooks, performance, styling, data fetching, custom hooks
      • backend: NestJS APIs, three-tier architecture, controllers, services
      • datamodeling: data modeling, testing, yaml documentation, data cleaning, analytics
    3. Add it to your package.json:

      {
      "scripts": {
      "sync-ai-rules": "node ./node_modules/@clipboard-health/ai-rules/scripts/sync.js [PROFILE_NAME]",
      "postinstall": "npm run sync-ai-rules"
      }
      }
    4. Run:

      npm install  # Runs postinstall automatically
      
    5. Commit the generated files:

      git add .
      git commit -m "feat: add AI coding rules"

    When we release new rules or improvements:

    # Update the package
    npm update @clipboard-health/ai-rules

    # The postinstall script automatically copies the latest files
    npm install

    # Review the changes
    git diff .

    # Commit the updates
    git add .
    git commit -m "chore: update AI coding rules"

    See package.json scripts for a list of commands.