If a CRM change is important enough to make, it is important enough to update in code, docs, and verification.
Use this protocol whenever an AI agent changes CRM behavior, data flow, command behavior, approval rules, or operator workflows. The goal is to stop half-finished changes where the code moved but the docs, repo state, or workflow guidance did not.
Main Objective
Prevent driftKeep backend logic, repo state, docs, workflow references, and verification aligned.Applies To
AI and human operatorsThe protocol applies whether the change is made by Codex or a teammate working directly in the repo.Required Update Surfaces
Every important CRM behavior change should be reflected across these surfaces.
| Surface | Requirement |
|---|---|
| Backend logic | Update the actual application, API, script, Prisma, or automation code that implements the change. |
| Repository state | Commit the code and related supporting files in the live CRM repo so the repo matches the running behavior. |
| Documentation | Update any docs that describe the changed behavior, commands, workflow, setup, or operator expectations. |
| Command surface | Update README.md and any command help text if the change affects terminal or Codex usage. |
| Workflow references | Update docs/specs/ or workflow reference docs if the change affects how operators or agents should work. |
| Verification | Run the smallest meaningful verification for the changed area and record any gaps honestly. |
Required Sequence
Use this order so the repo stays consistent and the change can be understood later.
Inspect
Check the current implementation and docs before changing behavior.
Implement
Make the code or configuration change in the live CRM repo.
Sync schema and API
If data or backend behavior changed, update Prisma schema, routes, scripts, and related UI or API consumers.
Sync docs
Update the docs that future agents or operators will rely on.
Verify
Run relevant checks such as node --check, targeted command tests, or route validation.
Report
Summarize what changed, what was verified, and any remaining gaps.
Update Checklist
Use this as a final pass before calling a CRM change complete.
- Backend updated
- Repo updated
- Docs updated
- Workflow impact checked
- Approval rules preserved
- Verification completed
High-Risk Change Types
These changes need extra care because they affect live data, messaging, workflows, or integrations.
| Change Type | Extra Requirement |
|---|---|
| Outbound email or SMS | Confirm draft-first behavior and approval rules still hold. |
| CRM write actions | Verify attribution, required fields, and user resolution behavior. |
| Prisma or database changes | Update schema, migration artifacts, and dependent code paths. |
| Workflow or operator behavior | Update workflow docs or specs so future agents use the new process. |
| External integrations | Verify the impacted integration path or document why live verification was not completed. |
Rule For Agents
This is the simplest statement of the protocol and the part teammates should remember.
If a change is important enough to implement, it is important enough to reflect in the codebase, repository documentation, and any relevant workflow references in the same pass.