Skip to main content

Workspace rules

Workspace rules are the file-based control over what the agent may touch in a project. Where autonomy decides how much the agent asks, the rules decide what is allowed, blocked, or requires confirmation — regardless of the autonomy level.

They live in .imaginne/RULES.yaml, inside the workspace, under the firewall: block.

Example​

.imaginne/RULES.yaml
firewall:
# Block entirely (the agent never touches these):
deny:
- "secrets/**"
- ".env*"
# Require confirmation before acting:
confirm:
- "infra/**"
- "*.tf"
# Explicitly allow (e.g., permitted extensions):
allow:
- "*.md"
- "*.py"
# Confine the agent to the workspace (default: true)
strict_workspace: true

The fields​

FieldEffect
denyPatterns the agent may never read/write/run. A hard block.
confirmPatterns that always require your confirmation before the action.
allowPatterns that are explicitly permitted (e.g., allowed file types).
strict_workspaceWhen true (default), the agent is confined to the workspace — reading, writing, or running outside it is denied. Set false to loosen this (use with care).

The rules are enforced on every tool call: a path in deny blocks the action; a path in confirm opens an approval request.

Relationship to autonomy and policy​

  • Autonomy (see) — how often the agent asks for confirmation (low/medium/high).
  • Workspace rules (this page) — what is allowed, blocked, or sensitive, per project.
  • Organization policy (see) — limits set by the admin for the whole organization.

The three add up: even at high autonomy, a deny still blocks, and the fixed safety limits (catastrophic commands, system paths, credentials such as .ssh/.aws/.env) still apply — see Autonomy and Security.

Create and edit​

  • The .imaginne/ directory (including RULES.yaml) is created by the /init command in the TUI (/init default for a scaffold, /init this to analyze the project and generate suitable rules).
  • It's an ordinary file: edit it, and the changes take effect on the next agent runs in that project.
Per project

Each workspace has its own RULES.yaml. Use it to protect sensitive folders (secrets, infrastructure) and to confidently open up the rest.

See also​