CredVault

Pragma Agent Rules

Rules tell Comp / the Pragma AI agent how to behave in your workspace. They are durable preferences — coding style, safety constraints, project conventions — that should apply across conversations.

Manage rules from Settings → AI (Rules section).

What A Rule Is

A rule is a short instruction the agent should follow, for example:

  • Prefer TypeScript over JavaScript in this repo
  • Never commit .env files
  • Ask before running destructive shell commands
  • Follow the existing component patterns in frontend/

Rules are not a replacement for secrets management or access control. They guide behavior; they do not replace permissions.

When Rules Apply

Rules typically apply when:

  • You start or continue an agent conversation in that workspace
  • The agent plans edits, commands, or reviews
  • Project conventions matter more than a one-off prompt

If a prompt conflicts with a rule, treat rules as standing policy and clarify in the conversation when you intentionally override them.

How To Write Good Rules

  • Keep each rule specific and testable
  • Prefer “do / don’t” language over vague goals
  • Separate style rules from safety rules
  • Update rules when the project conventions change

Examples

Good ruleWhy it helps
Use pnpm, not npm, in this repoPrevents wrong package manager commands
Ask before git push --forceSafety for shared branches
Match existing Vue SFC structure in frontend/appKeeps diffs consistent

What Users Should Know

  1. Rules improve consistency across sessions.
  2. Too many vague rules confuse the agent — fewer clear rules work better.
  3. Pair rules with codebase context so the agent sees the right files.
  4. For tool access, configure MCP servers separately.