risk_assess
Evaluate proposed actions for risk before execution. Flags boundary crossings, destructive operations, and security-sensitive changes to guide go/no-go decisions.
Instructions
Assess the risk of a proposed action before executing it. Runs a pre-filter (returns low/skipped immediately for clearly safe actions) then applies signal detection for: private→public boundary crossings, destructive operations, release/publish actions, external communication, and security-sensitive file access. Call this BEFORE any action in the trigger set: publish, push, force-push, git tag, deploy, delete tracked files, external API writes, billing, roadmap/private state movement. Returns risk_level (low/medium/high/critical), boundary_crossed, reversibility, and risk_reasons. Pass the result to action_guard to get a policy decision (allow/ask/block).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | No | Git diff or content diff of the proposed change. | |
| entity_id | No | Brain OS entity this action is associated with. | |
| git_status | No | Output of git status, if relevant. | |
| package_info | No | package.json metadata for release actions. | |
| files_touched | No | File paths the action will read or write. | |
| proposed_action | Yes | The action about to be taken — describe it clearly, e.g. 'npm publish brain-os@0.9.0' or 'write ROADMAP.md to public repo'. | |
| target_visibility | No | Whether the target destination is public-facing. Pass 'public' when writing to a public repo or publishing to a registry. |