expansion-grant-guard
Expansion Grant Guard
What it does
When an agent delegates work to a sub-agent (or expands context via DAG recall), it needs a controlled way to grant scoped permissions. Expansion Grant Guard maintains a YAML-based grant ledger that issues time-limited, token-budgeted grants — ensuring sub-agent operations stay within defined boundaries.
Inspired by lossless-claw's delegation grant system, where a parent agent issues a signed grant specifying what a sub-agent can access, how many tokens it may consume, and when the grant expires.
When to invoke
- Before any sub-agent expansion or delegation — issue a grant first
- When a sub-agent requests resources — validate the grant before proceeding
- When checking token budgets — verify remaining budget in the grant
- Periodically to clean up expired grants — auto-expiry sweep
How to use
python3 guard.py --issue --scope "dag-recall" --budget 4000 --ttl 30 # Issue a grant
More from archieindian/openclaw-superpowers
context-window-management
Prevents context overflow on long-running OpenClaw sessions. Use when approaching context limits.
28heartbeat-governor
Enforces per-skill execution budgets for scheduled cron skills — pauses runaway skills that exceed their token or wall-clock budget before they drain your monthly API allowance.
27using-superpowers
Bootstrap skill — teaches the agent how to find and invoke skills. Use when starting any new task or session.
23long-running-task-management
Breaks multi-hour tasks into checkpointed stages with resume capability. Use when a task is expected to take more than 30 minutes or multiple sessions.
22fact-check-before-trust
Triggers a secondary verification pass for any agent output containing factual claims, numbers, dates, or named entities before the output is acted on
21persistent-memory-hygiene
Keeps OpenClaw's memory store clean, structured, and useful. Use at session end and during periodic maintenance.
20