Skip to content
Get AI Business OS

Rules It Installs

PRIMA Project Management

Claude Code loads every file in .claude/rules/ at the start of a session and follows it as a standing instruction. PRIMA Project Management installs five rule files there. Three of them are protected product files, and the other two shape how Claude saves its work as it goes.

Rule file What it does Protected
state-validation.md Backs up and checks every write to your project register Yes
workspace-identity.md Shows the workspace banner and checks the git remote before every push Yes
prima-protection.md Stops Claude editing protected product files Yes
context-checkpoint.md Saves session progress to disk as you work No
agent-output-persistence.md Saves substantial agent reports to disk No

state-validation.md replaces the AI Business OS rule with the same name. What Changes in Your Workspace lists the other files the product replaces.

This rule governs every write to .claude/state/state.json.

  • Before a write, Claude runs Scripts/backup-state.sh, checks the JSON and runs Scripts/validate-state.sh when it is present.
  • If validation fails, Claude abandons the write, shows the error and restores the backup.
  • Before a new project, Claude searches every project, archived ones included, for the same name, a common abbreviation, part of the name or an obvious variation. On a possible match it stops and asks whether to use the existing project, create a new one with a reason, or cancel.
  • Project IDs follow the format your register already uses, are never reused, and never take on a new meaning.
  • Status is one of in-progress, paused, overdue or archived. A paused project needs a pausedReason, and any other status has none.
  • Session history gains new entries at the top, holds the current calendar month, and never has an entry changed or deleted. Earlier months move to the monthly archive in .claude/state/history/ through Scripts/archive-history.sh, which is the only way an entry leaves the list.

If state.json does not exist, Claude tells you and does not create one by itself. A missing schema file still leaves the JSON check in place. Without the backup script, Claude warns you and then writes.

This rule reads the workspace object in your register.

  • At the start of /day and /status, Claude shows a banner. It reads CLIENT WORKSPACE: Example Client Ltd for a client workspace, WORKSPACE: Example Consulting for a personal one and INTERNAL: Example Consulting for an internal one.
  • Before any push by /sync or /night, Claude compares workspace.githubRepo with your git remote. When they differ, it stops the push and shows an error, so work never goes to the wrong repository.
  • When the conversation mentions another workspace or client, Claude gives a warning and carries on.
WARNING: You're in Example Consulting but discussing Northfield Print.
Verify you're working in the correct repository.

The rule also suggests a short Workspace Identity block in your workspace CLAUDE.md for your own reference. The register stays the authority.

This rule protects the product files that keep your register safe. Its own table lists seven files.

File Function
.claude/rules/state-validation.md Governs every write to the register
.claude/rules/workspace-identity.md Controls push safety and the workspace banner
.claude/rules/prima-protection.md This rule
.claude/state/state.schema.json The schema every register write is checked against
Scripts/validate-state.sh The validation script
Scripts/backup-state.sh The backup script
Scripts/archive-history.sh The script that moves older session history into the monthly archive
Scripts/migrate-to-prima.sh The one-time migration from an older register format

The product’s manifest marks five more files as protected, all for the dashboard. They are .claude/commands/dashboard.md, the dashboard template and tour in .claude/templates/, and the two scripts in Scripts/prima-dashboard/. Updates and the health check in /status use the manifest’s list of thirteen.

When you ask Claude to change a protected file, it treats the request as one that needs your explicit confirmation. Claude names the file, explains what it controls and what could break, and suggests a companion file instead. It goes ahead only when you confirm that you understand the effect. A request to change the schema always stops for confirmation.

Claude loads every .md file in .claude/rules/, so a new file adds rules without touching a protected one. Updates never change a file the product did not install.

You want to Create
Add your own validation checks .claude/rules/custom-validation.md
Add your own workspace identity rules .claude/rules/custom-identity.md

This rule has Claude save its progress to disk without interrupting you. Roughly every 20 tool calls, and always just before /night or /sync, Claude adds a section to the day’s checkpoint file. Each section covers the summary, findings, decisions with their reasons, files changed, unfinished work and the next action.

~/Documents/Agent Outputs/P012/2026-10-14-session-checkpoint.md

The folder is the project ID when your current folder matches a project’s path, and otherwise a short name from the workspace folder. Each project has one file per day, and later sessions that day add to it. /resume reads these files to bring a new session up to date.

The rule does not change your register and needs no other product. It writes outside your workspace, so git does not sync checkpoints between computers.

When Claude hands work to a subagent and the result is substantial, this rule saves the result before Claude uses it. A result counts as substantial when it comes from an Explore, Plan or Research agent. It also counts when it runs over 50 lines or holds analysis, research findings or design decisions.

~/Documents/Agent Outputs/P012/2026-10-14-1430-venue-research.md

The folder follows the same naming as checkpoints, with general when Claude cannot tell which project the work belongs to. Each file opens with a short header giving the agent type, date, project and task. Short confirmations and status lines are not saved.