Governance
Enforce skill tool permissions in application code
Use reviewed policy tests for authorization decisions while keeping skill instructions focused on procedure.
Skill instructions can explain when an operation belongs in a workflow. The application needs a separate way to decide whether the caller is allowed to run that operation against the actual resource. By enforcing checks at the tool boundary, teams can review and test those decisions without depending on model phrasing.
Evaluate trusted policy inputs
Resolve caller identity, tenant, permitted operation, destination, and resource ownership from trusted application context. Treat model-supplied IDs as requested targets. Fetch the authoritative record and check it under the caller’s effective scope before returning information or performing a write.
Exercise denied paths with the same care as allowed paths
Construct policy cases for missing identity, a cross-tenant ID, an expired approval, and a role that permits reads but not writes. Verify both the decision and the observable state. The denial response can be useful while withholding unrelated resource details.
Where a tool has both a preview and an execution mode, test them independently. A preview might be allowed for a wider set of users, while a write requires an explicit authorization result and a matching review record.
Record policy changes near release changes
Store the policy version alongside tool and skill versions in a release record. A changed authorization decision can otherwise look like a skill regression. Review policy diffs for scope expansion and preserve an auditable decision reason for denied actions.