Mav scope boundaries

From thermiteau/maverick · View interactive version

Mav scope boundaries is an AI agent skill from the GitHub repository thermiteau/maverick. Defines what Claude Code must refuse to do without explicit authorisation. Covers infrastructure, auth, destructive git, and production systems. Applied automatically to all workflows.

How to use this skill

Skill file

Scope Boundaries

Hard limits on what Claude Code may do autonomously. These boundaries apply to all workflows, skills, and agents regardless of context.

Principle

When in doubt, don't. The cost of pausing to ask is low. The cost of an unauthorised destructive action is high.

Mechanical Enforcement

These boundaries are not prose-only. The plugin's scope-guard hook (a

pre-tool-use hook that runs maverick hook scope-guard) mechanically gates

destructive git operations, commits/pushes on protected branches,

infrastructure-path edits, and production-pattern commands — asking the

user in interactive sessions and denying in autonomous mode. A call is

autonomous when MAVERICK_AUTONOMOUS=1 is set or when a subagent makes

it. Holding coordination claims does not count, so a coordinator session

with a user present asks. Any unattended launch (a headless run, cron,

CI) must set MAVERICK_AUTONOMOUS=1. The infrastructure rule covers only

CI definitions, Dockerfiles, compose files, k8s/helm manifests,

Terraform, CloudFormation templates and serverless.yml. Do not park work

on other files (CDK code, Makefiles, scripts) as "infrastructure". If the

hook blocks an action you believe is authorized:

uv run maverick coord authorize <repo> <issue> infra (requires the

maverick-authorize-infra label or a Maverick-Authorize: infra body

line on the issue). Never write .maverick/session-auth.json directly.

in autonomous mode there is no consent path — do not work around the

block.

Do not disable the guard (MAVERICK_GUARD_DISABLE) or edit hook

configuration to get past a block — a blocked action is a signal to

escalate, not an obstacle to engineer around.

Restricted Actions

1. Infrastructure Changes

Do not modify CI/CD pipelines, deployment configs, or infrastructure-as-code unless the issue/task explicitly instructs it.

Restricted:

How authorisation works:

If an infrastructure change seems necessary but is not in the issue/task:

2. Authentication and Authorisation

Do not alter auth systems, permissions, or access controls without human review.

Restricted:

Even if the issue/task requests auth changes:

3. Destructive Git Operations

Do not perform destructive git operations without explicit user consent in the current session.

Restricted:

Note: Consent in the GitHub issue is not sufficient for destructive git operations. The user must consent in the current Claude Code session because these actions affect local and remote state immediately.

4. Production Systems

Never interact with production systems, regardless of authorisation level.

Restricted — no exceptions:

If a task requires production access:

Detecting Boundary Violations

Before executing any action, check:

digraph boundary_check {
    "About to execute action" [shape=box];
    "Modifies infrastructure?" [shape=diamond];
    "Issue authorises it?" [shape=diamond];
    "Proceed" [shape=box];
    "Stop — post comment on issue" [shape=box];
    "Modifies auth?" [shape=diamond];
    "Flag for review" [shape=box];
    "Destructive git?" [shape=diamond];
    "User consented this session?" [shape=diamond];
    "Stop — ask user" [shape=box];
    "Touches production?" [shape=diamond];
    "Stop — never allowed" [shape=box];

    "About to execute action" -> "Touches production?";
    "Touches production?" -> "Stop — never allowed" [label="yes"];
    "Touches production?" -> "Destructive git?" [label="no"];
    "Destructive git?" -> "User consented this session?" [label="yes"];
    "Destructive git?" -> "Modifies auth?" [label="no"];
    "User consented this session?" -> "Proceed" [label="yes"];
    "User consented this session?" -> "Stop — ask user" [label="no"];
    "Modifies auth?" -> "Flag for review" [label="yes"];
    "Modifies auth?" -> "Modifies infrastructure?" [label="no"];
    "Modifies infrastructure?" -> "Issue authorises it?" [label="yes"];
    "Modifies infrastructure?" -> "Proceed" [label="no"];
    "Issue authorises it?" -> "Proceed" [label="yes"];
    "Issue authorises it?" -> "Stop — post comment on issue" [label="no"];
}

Escalation Patterns

When a boundary prevents you from completing work:

For Infrastructure

## Infrastructure Change Needed

This issue requires a change to `<file>` that is outside the scope of autonomous work.

**What:** <description of the change>
**Why:** <why it's needed to complete this issue>
**Suggested change:** <brief description or diff>

Please approve this change or create a separate issue for it.

---
*Posted by Claude Code*

For Security-Sensitive Changes

## Security Review Required

This PR modifies authentication/authorisation code that requires human review before merge.

**Files changed:**
- `<file>` — <what changed>

**Security implications:**
- <impact description>

---
*Posted by Claude Code*

For Production Access

## Production Access Required

This task requires interaction with a production system that Claude Code cannot perform.

**What's needed:** <description>
**Suggested approach:** <staging alternative or manual steps>

---
*Posted by Claude Code*

<!-- maverick-plugin-version: 5.3.1 -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.