Working Roles & Checklist

Rules Claude must follow before touching code

Rule 0: Read This File First

Before touching any code, read this entire file. No exceptions.

Rule 1

Discuss Before Execute

Propose changes first, wait for explicit "go ahead" before executing.

Rule 2

Verify Current State

Never trust memory/docs as current truth. Before fixing anything:

Rule 3

Integration Checklist

For any system-to-system integration (Airtable, APIs, webhooks):

  • Query the actual schema/endpoint before writing code
  • Check logs for existing errors
  • Identify all field mappings and verify each one
  • Test after changes — don't assume success
Rule 4

Propose New Rules

When we discover something important that should be a rule:

Rules Added From Experience

Rule 5

Field Change Impact Analysis

When creating, renaming, or modifying any field in Airtable OR TruxFlow:

  1. Identify the data flow direction (one-way? bi-directional?)
  2. List all sync code / webhooks that touch this field
  3. Check: Should this field be synced? In which direction?
  4. Update all affected code BEFORE or WITH the field change
  5. Test sync after changes
Why: Airtable sync broke because we renamed fields and added sync for fields that should only flow one direction. Nobody checked what else the change affected.
Rule 6

Update Field Registry

When writing code that syncs or maps fields between systems:

  1. Check the Field Registry first
  2. After writing code, update the registry with:
    • Field name in each system
    • Sync direction (→ outgoing, ← incoming, ↔ both)
    • Code file and line number
    • Webhook endpoint (if applicable)
Why: As TruxFlow grows (Dispatch, Accounting, etc.), field dependencies multiply. The registry is the single source of truth for "what touches what."
How to Use

Workflow

  1. Start of session: Read this file
  2. Before coding: Run through relevant checklists
  3. After incidents: Add new rules to prevent recurrence