maestro-guard

SkillDev tools

Manage editing boundary restrictions

Use maestro-guard in Claude, ChatGPT or Ahel Desktop

Free. Sign in, add maestro-guard and connect your AI. About a minute.

Also: Claude Code · Cursor · Codex

Then ask your AI: use the maestro-guard skill

Details

Instructions available. Your AI can read the instructions. Execution depends on the setup they require.

Add Ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.

maestro-guardStart free

What this skill tells your AI

The instructions your AI receives, as published by catlog22/maestro-flow in .codex/skills/maestro-guard/SKILL.md and read by Ahel’s review.

Config location: .workflow/config.json → guard section

{
  "guard": {
    "enabled": false,
    "mode": "allow",
    "paths": []
  }
}

Enforcement: The workflow-guard hook (PreToolUse on Write/Edit) reads this config and blocks operations targeting files outside boundaries. Requires hooks level >= full.

Output boundary: ALL file writes MUST target .workflow/config.json (guard section) only. NEVER modify hook files, .claude/settings.json, or source code.

Phase Gates (MANDATORY, BLOCKING)

GATE 1: Parse → Config Read

  • REQUIRED: Subcommand parsed (on/off/status/allow/deny/remove/clear) or defaulted to status.
  • BLOCKED if: invalid subcommand provided.

GATE 2: Config Read → Execute

  • REQUIRED: .workflow/config.json read successfully or initialized with empty guard section.
  • BLOCKED if: file unreadable and cannot be created (E001).

GATE 3: Execute → Confirm

  • REQUIRED: Config mutation applied (for on/off/allow/deny) or status displayed (for status).
  • REQUIRED: Mode-switch request_user_input answered (for allow↔deny transitions with existing paths).
  • BLOCKED if: user declines mode switch.

Step 1: Parse subcommand

Extract from $ARGUMENTS:

  • on / off / status / allow <path> / deny <path>
  • If no subcommand, default to status

Step 2: Read config

Read .workflow/config.json. If file missing, initialize with empty guard section.

Step 3: Execute subcommand

status:

  • Display: enabled/disabled, mode (allow/deny), paths list
  • Check if workflow-guard hook is active (read .claude/settings.json for hook presence)
  • If guard enabled but hook not active, warn: "⚠ PathGuard enabled but workflow-guard hook not installed. Run maestro hooks level full to activate."

on:

  • Set guard.enabled = true
  • If guard.paths is empty, set default: ["src/", "tests/", ".workflow/"]
  • Check hook level, warn if < full
  • Write config

off:

  • Set guard.enabled = false
  • Preserve existing paths and mode
  • Write config

allow <path>:

  • Normalize path to forward slashes, ensure trailing slash for directories
  • If guard.mode is deny, request_user_input: "Switching from deny to allow mode will clear existing paths ({N} paths). Continue?" — abort if user declines. Clear guard.paths (mode switch invalidates previous path list).
  • Set guard.mode = "allow"
  • Add path to guard.paths (deduplicate)
  • Set guard.enabled = true if not already
  • Write config

deny <path>:

  • Normalize path to forward slashes, ensure trailing slash for directories
  • If guard.mode is allow, request_user_input: "Switching from allow to deny mode will clear existing paths ({N} paths). Continue?" — abort if user declines. Clear guard.paths (mode switch invalidates previous path list).
  • Set guard.mode = "deny"
  • Add path to guard.paths (deduplicate)
  • Set guard.enabled = true if not already (symmetric with allow: adding a deny path auto-enables the guard)
  • Write config

remove <path>:

  • Normalize path
  • Remove from guard.paths (if present)
  • Write config

clear:

  • Set guard.paths = []
  • Write config

Step 4: Confirm

Display updated guard configuration.

<error_codes>

  • E001: .workflow/config.json not found and cannot be created (not a maestro project)
  • W001: PathGuard enabled but workflow-guard hook not installed </error_codes>

<success_criteria>

  • Config read/written correctly
  • Hook level warning displayed when applicable
  • Updated configuration shown after changes </success_criteria>

Signals

GitHub stars
560
Forks
68
Last commit
Sep 2026
Advanced
Item type
skill
Key
maestro-guard
Source
github.com/catlog22/maestro-flow