From rawgentic
Add a guard exception to the project's .rawgentic.json interactively. Use when a WAL guard or security guard blocks a legitimate operation and you want to add a per-project exception. Accepts guard type (wal or security) and a rule name or file path.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rawgentic:add-exception guard type and rule/path (e.g., "wal ssh-prod" or "security eval_injection tests/helpers.js")guard type and rule/path (e.g., "wal ssh-prod" or "security eval_injection tests/helpers.js")The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<role>
/rawgentic:add-exceptionRun through the steps below sequentially.
The user provides a guard type and a rule name or file path. Accept flexible input:
wal ssh-prod or security eval_injection tests/helpers.jsExtract:
guard_type: one of wal or securityrule_name: the guard rule that triggered the blockfile_path (security only, optional): the file path that was blockedIf the guard type is ambiguous, ask the user to clarify.
.rawgentic_workspace.json to find the active project (same resolution as other skills: conversation context -> session registry -> workspace default).<project-path>/.rawgentic.json.
/rawgentic:setup first." STOP.protectionLevel (default: strict if missing)guards.wal (explicit WAL rule override array, if present)guards.security (explicit security rule override array, if present)guards.securityExcludePaths (path exclusion globs, if present)Look up the rule name in this table. The full list of WAL rule names is defined in the PATTERN_NAMES array in hooks/wal-guard (lines 69-82). The 12 rules are:
ssh-prod, scp-prod, rsync-prod, docker-prod-operate, docker-prod-destroy, ansible-prod-mutate, kubectl-prod-operate, kubectl-prod-destroy, helm-prod-operate, helm-prod-destroy, terraform-prod-operate, terraform-prod-destroy
Each rule blocks a specific remote operations category targeting the "prod" environment.
Look up the rule name in hooks/security-patterns.json. The ruleName field identifies each rule. The 10 rules are:
eval_injection, new_function_injection, child_process_exec, react_dangerously_set_html, document_write_xss, innerHTML_xss, pickle_deserialization, os_system_injection, github_actions_workflow, github_actions_workflow_yaml
Each rule blocks writes containing specific dangerous code patterns or targeting sensitive file paths.
rule_name is not in the known set for the given guard_type: tell the user which rules are valid and ask them to pick one.eval-injection instead of eval_injection): suggest the correct name.Determine the currently active WAL rules:
guards.wal array exists in .rawgentic.json: use that list directly.protectionLevel preset:
sandbox -> no rules active (empty set)standard -> scp-prod rsync-prod docker-prod-destroy ansible-prod-mutate kubectl-prod-destroy helm-prod-destroy terraform-prod-destroystrict -> all 12 rulesCheck if the rule is currently active:
<rule_name> is not currently active under your <protectionLevel> protection level. Nothing to except." STOP.<rule_name>.Show the change:
WAL Guard Exception
===================
Protection level: <level>
Removing rule: <rule_name>
Current active rules (N):
[list]
New active rules (N-1):
[list]
This will write an explicit guards.wal array to .rawgentic.json,
overriding the <level> preset for WAL guards.
For security guards, there are two exception types. Determine which one based on the input:
Type A -- Path exclusion (when file_path is provided):
Suggest a glob pattern using this logic (mirrors suggest_glob() in hooks/security_guard_lib.py):
__tests__, test, tests, spec, specs): suggest **/<segment>/**.github/workflows: suggest .github/workflows/**Check if the glob is already in guards.securityExcludePaths. If so: tell the user it is already excepted. STOP.
Show the change:
Security Guard Path Exception
=============================
Rule that triggered: <rule_name>
Blocked file: <file_path>
Suggested glob: <glob>
Will add to guards.securityExcludePaths:
Current: [list or "none"]
Adding: <glob>
Ask the user: "Use the suggested glob <glob>, or enter a custom pattern?"
Type B -- Rule deactivation (when no file_path provided, or user requests full rule removal):
Determine currently active security rules (same logic as WAL: explicit guards.security array, or expand preset). Compute the new set with the rule removed.
Show the change:
Security Guard Rule Exception
=============================
Removing rule: <rule_name>
Current active rules (N):
[list]
New active rules (N-1):
[list]
This will write an explicit guards.security array to .rawgentic.json.
Preset expansion for security guards:
sandbox -> no rules activestandard -> eval_injection new_function_injection child_process_exec react_dangerously_set_html document_write_xss innerHTML_xssstrict -> all 10 rulesAsk the user: "Apply this change? (yes/no)"
If no: STOP. Tell the user they can re-run with different parameters.
If yes: Continue to Step 6.
Read .rawgentic.json (full read-modify-write):
For WAL rule exception:
guards.wal to the new active rule array (from Step 4).guards object does not exist, create it.For security path exception:
guards.securityExcludePaths.guards.securityExcludePaths does not exist, create it as an array with the single glob.guards object does not exist, create it.For security rule exception:
guards.security to the new active rule array.guards object does not exist, create it.Write the full file back.
Print the updated guards section from .rawgentic.json:
Updated guards configuration:
{
"guards": {
"wal": [...],
"security": [...],
"securityExcludePaths": [...]
}
}
Tell the user: "Exception added. Retry your original operation -- it should now be allowed."
npx claudepluginhub 3d-stories/rawgentic --plugin rawgenticCreates bite-sized, testable implementation plans from specs or requirements, with file structure and task decomposition. Activates before coding multi-step tasks.