Where 5D Enforces Authority
An explanation matched to the tested 5D release: where the library evaluates a proposed action, what the verdict means, and what remains the host application's responsibility.
Minimal public integration
from fivedrisk.hooks import gate
@gate(tool_name="write_to_database", autonomy_context=2)
async def write_record(table: str, data: dict) -> None:
... Written for fivedrisk==0.7.0. Verify against the immutable source and public documentation before use.
The boundary is a point in the execution path
5D belongs between a proposed agent action and the tool or system that could execute it. The application supplies action context. The public library classifies and scores that action, applies policy, and returns a band that the application maps to execution, review, or block behavior.
This keeps authority in code and policy. A model may contribute evidence where an integration explicitly asks for it, but a model observation is not itself permission.
Five dimensions describe action risk
The public model scores data sensitivity, tool privilege, reversibility, external impact, and autonomy context on a common low-to-high risk scale. The dimensions make the reason for a band inspectable instead of compressing the decision into an unexplained answer.
The configured policy determines thresholds and red lines. That policy must be tested against the actions and failure modes that matter in the host deployment.
The host remains accountable for enforcement
A library verdict has effect only when the host places it on every relevant execution path and refuses to execute blocked or unresolved actions. Bypassed tools, stale policy, invalid identity context, or a disconnected human-review path remain integration failures.
Use the public evidence records to distinguish demonstrated implementation behavior from simulated composition and conceptual mapping.
What this page does not establish
- 5D assesses whether an action is dangerous, out of policy, or out of pattern. It does not judge whether the underlying decision is correct or high quality.
- The host application still owns tool execution, identity validation, human-review workflow, and recovery from downstream failures.
- A permitted action can still be wrong, ineffective, or harmful for reasons outside the configured policy.