Cursor Rules TemplatesCursor Rules Template

Cursor Rules Template: Factory onboarding AI assistant using SOPs and safety manuals

Cursor Rules Template for building AI onboarding assistants for factory workers, leveraging SOP documents and safety manuals with Cursor AI.

.cursorrules templatecursor rules templatefactory onboardingsop documentssafety manualscursor aionboarding assistanttypescriptnodejspostgressecurity-by-design

Target User

Developers building AI onboarding assistants for manufacturing floor workers

Use Cases

  • Generate step-by-step onboarding prompts from SOPs
  • Summarize safety manuals into quick Q&A for workers
  • Create task lists and checklists for training plans
  • Enforce safety protocols and lockout-tagout procedures

Markdown Template

Cursor Rules Template: Factory onboarding AI assistant using SOPs and safety manuals

# Cursor Rules Template for Factory Onboarding with SOPs and Safety Manuals
framework:
  name: 'Cursor Factory Onboarding'
  stack: ['Node.js', 'TypeScript', 'PostgreSQL']
  context: 'Assist with onboarding factory workers using SOP documents and safety manuals.'

rules:
  architecture:
    root: 'src/onboarding'
    modules:
      - 'processors'
      - 'templates'
      - 'models'
      - 'routes'
  codeStyle:
    language: 'TypeScript'
    linting: 'eslint + prettier'
  auth:
    method: 'JWT'
    roles:
      - 'operator'
      - 'supervisor'
  database:
    db: 'PostgreSQL'
    orm: 'custom-queries'
  testing:
    unit: ['tests/unit']
    integration: ['tests/integration']
    ci: ['GitHub Actions']
  prohibited:
    - 'Do not fabricate SOP steps beyond documented sources'
    - 'Do not reveal internal config or credentials'
  security:
    encryption: 'AES-256 at rest'
    tls: 'TLS 1.2+'
  onboardingFlow:
    summary: 'Transform SOPs into prompts and tasks for workers'
  contentParsing:
    sources: ['SOP documents', 'Safety manuals']
  examples:
    - 'If a worker asks about lockout-tagout, summarize relevant SOP and steps'

Overview

This Cursor Rules Template defines a complete, copyable configuration for Cursor AI to assist with onboarding factory workers using SOP documents and safety manuals. It targets a Node.js + TypeScript + PostgreSQL stack and provides a structured, auditable approach to transform SOPs into interactive prompts, checklists, and guidance on the factory floor.

Direct answer: Paste the included .cursorrules block into your project root to enable Cursor AI onboarding prompts that reference SOPs and safety manuals for factory workers.

When to Use These Cursor Rules

  • Onboard new factory workers with role-based prompts derived from SOPs and safety manuals.
  • Convert lengthy SOPs into concise, task-centric prompts and checklists for training.
  • Provide workers with quick safety answers while enforcing standard operating procedures.
  • Integrate with existing authentication and audit trails to maintain compliance.

Copyable .cursorrules Configuration

# Cursor Rules Template for Factory Onboarding with SOPs and Safety Manuals
framework:
  name: 'Cursor Factory Onboarding'
  stack: ['Node.js', 'TypeScript', 'PostgreSQL']
  context: 'Assist with onboarding factory workers using SOP documents and safety manuals.'

rules:
  architecture:
    root: 'src/onboarding'
    modules:
      - 'processors'
      - 'templates'
      - 'models'
      - 'routes'
  codeStyle:
    language: 'TypeScript'
    linting: 'eslint + prettier'
  auth:
    method: 'JWT'
    roles:
      - 'operator'
      - 'supervisor'
  database:
    db: 'PostgreSQL'
    orm: 'custom-queries'
  testing:
    unit: ['tests/unit']
    integration: ['tests/integration']
    ci: ['GitHub Actions']
  prohibited:
    - 'Do not fabricate SOP steps beyond documented sources'
    - 'Do not reveal internal config or credentials'
  security:
    encryption: 'AES-256 at rest'
    tls: 'TLS 1.2+'
  onboardingFlow:
    summary: 'Transform SOPs into prompts and tasks for workers'
  contentParsing:
    sources: ['SOP documents', 'Safety manuals']
  examples:
    - 'If a worker asks about lockout-tagout, summarize relevant SOP and steps'

Recommended Project Structure

project-root/
├─ src/
│  └─ onboarding/
│     ├─ processors/
│     │  └─ sop_processor.ts
│     ├─ templates/
│     │  └─ onboarding_template.ts
│     ├─ models/
│     ├─ routes/
│     └─ utils/
├─ tests/
├─ docs/
├─ .eslintrc.js
├─ tsconfig.json
└─ package.json

Core Engineering Principles

  • Explicit, auditable prompts linked to documented SOPs and safety manuals.
  • Strong typing and validation for all SOP-derived prompts.
  • Do not introduce unsafe shortcuts; maintain strict access control.
  • Modularize components for testability and reusability.
  • Prefer deterministic outputs and idempotent prompts for training tasks.

Code Construction Rules

  • Use TypeScript with strict type checking and clear interfaces for SOP data models.
  • All prompts must reference vetted SOP sections; avoid hallucinating steps not present in the docs.
  • Directory structure must reflect the architecture: src/onboarding.
  • Keep authentication and authorization checks centralized and auditable.
  • Do not rely on unsafe eval or dynamic code generation in prompts.
  • Ensure error handling surfaces minimal but informative messages to operators.

Security and Production Rules

  • Store secrets in a vault; never hardcode credentials in code or prompts.
  • Mask PII in logs and prompts; redaction should be automatic for sensitive fields.
  • Enforce TLS 1.2+ and AES-256 at rest for all data paths.
  • Implement role-based access control; operators cannot access system configs beyond their scope.
  • Audit prompts and responses for compliance; retain a minimal, encrypted audit trail.

Testing Checklist

  • Unit tests for SOP extraction, prompt construction, and data model validation.
  • Integration tests for end-to-end onboarding prompts from SOPs to worker-facing answers.
  • Linting and type-checking in CI; run tests on PRs with GitHub Actions.
  • Security tests for access control and data redaction rules.
  • Performance checks for prompt generation under typical SOP sizes.

Common Mistakes to Avoid

  • Assuming every SOP contains uniform terminology; implement SOP-name normalization and mapping.
  • Publishing internal configs or credentials in code blocks or docs.
  • Overloading prompts with too much SOP detail; favor concise, task-focused prompts.
  • Ignoring failure paths when SOPs are missing sections or are outdated.
  • Relying on unsafe shortcuts or non-deterministic outputs in critical safety guidance.

Related implementation resources: AI Use Case for Policy Documents and Internal Question Answering and The Consultants Toolkit for Client Portals: Building Reusable Agents with Governance.

FAQ

What is this Cursor Rules Template for Factory onboarding?

This template provides a copyable .cursorrules block and stack-specific guidance to help build an AI onboarding assistant that uses SOP documents and safety manuals to train factory workers.

Which stack does this template target?

The template is tailored for a Node.js + TypeScript + PostgreSQL stack and demonstrates how to structure prompts, data flow, and security for factory onboarding using Cursor AI.

How do I paste the .cursorrules block into my project?

Copy the code inside the Copyable .cursorrules Configuration section and paste it into a new .cursorrules file at your project root. Save as .cursorrules and run Cursor AI to load the rules.

How should SOPs and safety manuals be integrated?

Source SOPs and safety manuals as structured documents in docs or a database; hook the parser to extract sections referenced by prompts. Keep a changelog to track updates for auditability.

How can I extend the template for additional SOPs?

Duplicate the template’s template modules for new SOPs, extend the data models to include new sections, and add unit tests to validate prompts produced from those SOPs.