计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
global-agent-guardrails【效率与协作】Configure a shared guard against catastrophic shell commands in local AI agents. Use when changing block patterns, adding an agent or machine, or investigating why a command was or wasn't blocked.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Block catastrophic shell commands before execution. One patterns file can feed a shared hook script or native adapter for each agent. This guards against accidents, not malicious agents (obfuscation like python -c "shutil.rmtree(...)" can slip past regex).
A typical setup has a patterns file, a shared guard, a test suite, and adapters for supported agents. Use your own documented configuration locations; avoid publishing machine-specific wiring details.
Confirm the guard and patterns file exist, then run the project's guard test suite. Tests should report no failures.
If missing, rebuild from the wiring table or other documentation for your setup.
grep -E). Use [[:space:]], never \\s — adapters may convert [:space:] to \\s for JS/Python and compile in multiline mode.Block only catastrophic commands (irreversible data loss, disk wipes, repo deletion). Recoverable local commands stay allowed; avoid over-blocking.
Use each agent's documented hook or native blocklist mechanism. Keep shared guard behavior consistent across adapters, and merge configuration into existing settings rather than overwriting them. Use absolute paths in configs when path expansion is inconsistent across agents.
m flag and Python's re.M so ^ matches each shell line like grep.git push --force on a CLI) gets blocked. Workaround: put the text in a file and reference it.Use a safe probe in a disposable, non-git directory: ask the agent to run a command that should be blocked, and confirm the guard blocks it. A repository-related error instead of a guard block means the test did not verify the guard. Follow each agent's documented procedure and avoid bypassing permission safeguards during verification.
For a direct test, send a representative dangerous-command payload to the guard and confirm it returns the documented block result.