Maestro guard

From catlog22/maestro-flow · View interactive version

Maestro guard is an AI agent skill from the GitHub repository catlog22/maestro-flow. Manage editing boundary restrictions

How to use this skill

Skill file

<purpose>

Configure directory-level write boundaries enforced by the workflow-guard PreToolUse hook.

Subcommands: on, off, status, allow <path>, deny <path>, remove <path>, clear.

</purpose>

<context>

$ARGUMENTS — Parse subcommand and optional path argument.

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.

</context>

<invariants>

  1. Config-only mutation — guard MUST only modify the guard section of .workflow/config.json; NEVER touch other config sections or files
  2. Non-destructive — off MUST preserve existing paths and mode; NEVER clear the path list when disabling
  3. Mode switch confirmation — switching between allow/deny mode MUST require request_user_input confirmation when existing paths will be cleared
  4. Hook dependency — guard MUST warn when enabled but workflow-guard hook is not active (hooks level < full)
  5. Path normalization — all paths MUST use forward slashes with trailing slash for directories; NEVER store raw backslash paths

</invariants>

<execution>

Phase Gates (MANDATORY, BLOCKING)

GATE 1: Parse → Config Read

GATE 2: Config Read → Execute

GATE 3: Execute → Confirm

Step 1: Parse subcommand

Extract from $ARGUMENTS:

Step 2: Read config

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

Step 3: Execute subcommand

status:

on:

off:

allow <path>:

deny <path>:

remove <path>:

clear:

Step 4: Confirm

Display updated guard configuration.

</execution>

<error_codes>

</error_codes>

<success_criteria>

</success_criteria>

<completion>

Next-step routing

| Condition | Suggestion |

|-----------|-----------|

| Guard enabled, hook not installed | maestro hooks level full |

| Want to verify guard works | Edit a file outside allowed paths |

</completion>

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.