This prompt is for governance, compliance, and security engineering teams who need a single, version-controllable document that defines every permission boundary for an AI agent. The primary job-to-be-done is converting a raw permission specification, tool manifest, or internal policy document into a structured, auditable output that separates allowed tools, argument constraints, data scope, and explicit denial rules. The ideal user is a security engineer preparing for an audit, a compliance officer documenting agent capabilities for a regulatory review, or a platform engineer onboarding a new agent into a regulated environment where every capability must be traceable to a documented permission decision.
Prompt
Permission Boundary Documentation Prompt

When to Use This Prompt
Defines the job-to-be-done, ideal user, required context, and clear boundaries for when this prompt should and should not be deployed.
You should use this prompt when you have a concrete source of truth—such as an approved tool manifest, an MCP server configuration, or a written policy—and you need to produce a human-readable, machine-parseable permission boundary document. The prompt is designed to enforce a strict output schema that captures allowed actions, denied actions, argument constraints, data scope, and the governing policy reference for each permission. It is not a replacement for runtime enforcement; the output is a documentation artifact meant for review, version control, and audit evidence. You will get the most value when you pair this prompt with a validation step that checks the generated document against the source manifest for completeness and against a set of known disallowed actions to confirm they are explicitly denied.
Do not use this prompt as a substitute for actual permission enforcement in your agent runtime. The generated document describes what should be allowed, but it does not enforce those rules at the tool-call level. If you need runtime guardrails, pair this documentation prompt with a separate system prompt that implements deny-before-allow logic or with middleware that intercepts and validates tool calls. Also avoid using this prompt when the source permission specification is incomplete or contradictory; the model will faithfully document the ambiguity rather than resolve it, which can create a false sense of security. For high-risk deployments, always route the generated permission boundary document through a human reviewer who can verify that every declared permission aligns with the intended security posture before the document is committed to version control or submitted to auditors.
Use Case Fit
Where the Permission Boundary Documentation Prompt works, where it fails, and what you must provide before using it in a compliance or governance workflow.
Good Fit: Compliance-Ready Documentation
Use when: governance, audit, or InfoSec teams need a version-controlled, structured specification of exactly what an agent can access. Guardrail: always pair the output with a human review step and store the result in a system of record (e.g., a policy repo) alongside the active system prompt.
Bad Fit: Runtime Enforcement
Avoid when: you need a live guardrail that blocks tool calls in production. This prompt documents boundaries; it does not enforce them. Guardrail: use this output as the source of truth for a separate enforcement layer (e.g., a proxy, middleware, or a hardened system prompt with deny-before-allow logic).
Required Inputs
What you must provide: a complete list of tools, their argument schemas, data stores, and any existing access policies. Guardrail: if the input specification is incomplete or stale, the generated documentation will inherit those gaps. Validate the tool manifest against your live deployment before running the prompt.
Operational Risk: Specification Drift
What to watch: the documented permission boundary drifts from the actual deployed permissions as tools, APIs, or policies change. Guardrail: regenerate and re-review the documentation on every tool or policy change, and tie the prompt execution to your CI/CD pipeline so it cannot be skipped.
Operational Risk: Over-Confidence in Completeness
What to watch: reviewers treat the generated document as exhaustive when the model may have omitted edge cases or implicit permissions. Guardrail: include a mandatory human review checklist that explicitly probes for missing deny rules, argument constraints, and cross-tool interaction risks before signing off.
Operational Risk: Model Hallucinates Permissions
What to watch: the model invents tool names, argument constraints, or data scopes that do not exist in the input specification. Guardrail: run a structured diff between the input tool manifest and the generated documentation. Flag any tool, argument, or scope that appears in the output but not in the input for human correction.
Copy-Ready Prompt Template
A copy-ready prompt that generates a structured, auditable permission boundary document from an agent's tool and data access specification.
This prompt template produces a structured permission boundary document suitable for compliance review, security audit, and version control. It takes a raw permission specification—including allowed tools, argument constraints, data scope, and denial rules—and transforms it into a standardized, human-readable document with explicit allow/deny declarations, inheritance rules, and capability statements. The output schema is designed to be diff-friendly and machine-readable, so you can track permission changes over time and integrate the document into automated governance pipelines.
codeYou are a Permission Boundary Documentation Generator. Your task is to produce a structured, auditable permission boundary document from the provided agent specification. ## INPUT [AGENT_SPECIFICATION] ## OUTPUT_SCHEMA Return a JSON object with the following structure: { "document_metadata": { "agent_id": "string", "agent_role": "string", "document_version": "string", "generated_at": "ISO8601 timestamp", "specification_source": "string" }, "permission_scope": { "allowed_tools": [ { "tool_name": "string", "tool_description": "string", "argument_constraints": { "allowed_parameters": ["string"], "forbidden_parameters": ["string"], "value_constraints": { "parameter_name": "constraint_description" } }, "rate_limits": { "max_calls_per_session": "number or null", "cooldown_seconds": "number or null" }, "requires_human_approval": "boolean", "approval_condition": "string or null" } ], "explicitly_denied_tools": [ { "tool_name": "string", "denial_reason": "string", "denial_rule_source": "string" } ], "data_access_scope": { "readable_stores": ["string"], "writable_stores": ["string"], "tenant_isolation": "string", "pii_handling": "string" }, "delegation_rules": { "can_delegate_to": ["agent_role"], "permissions_transferred_on_handoff": ["string"], "permissions_stripped_on_handoff": ["string"] }, "capability_declaration": { "can_do": ["string"], "cannot_do": ["string"], "requires_clarification": ["string"] } }, "deny_rules": [ { "rule_id": "string", "rule_description": "string", "applies_to_tools": ["string"], "applies_to_actions": ["string"], "refusal_message": "string", "priority": "number" } ], "inheritance": { "parent_role": "string or null", "inherited_permissions": ["string"], "overridden_permissions": ["string"], "additional_restrictions": ["string"] }, "compliance_notes": { "regulatory_classifications": ["string"], "audit_log_requirements": ["string"], "review_cadence": "string" } } ## CONSTRAINTS - Every tool in the specification must appear in either allowed_tools or explicitly_denied_tools. No tool may be omitted. - If a tool is not listed in the specification, classify it as explicitly denied with denial_reason "Not present in source specification." - Argument constraints must be specific: list exact allowed parameters, forbidden parameters, and value constraints per parameter. - Deny rules must be ordered by priority (lower number = higher priority). - The capability_declaration must be derivable solely from the permission scope. Do not infer capabilities beyond what is explicitly granted. - If the specification includes tenant or user context, data_access_scope.tenant_isolation must describe how cross-tenant access is prevented. - If no delegation rules exist, set can_delegate_to to an empty array and include a note that delegation is not permitted. ## INSTRUCTIONS 1. Parse [AGENT_SPECIFICATION] completely. Identify every tool, data store, action category, and constraint mentioned. 2. For each tool, extract argument constraints, rate limits, and approval requirements. If the specification is silent on a constraint, mark it as null and note the absence in a comment field. 3. Identify all explicit denial rules. If the specification uses deny-before-allow logic, preserve that ordering in the deny_rules array. 4. Derive the capability_declaration by translating the permission scope into plain-language statements. Use "Can [action] using [tool]" and "Cannot [action]" formats. 5. Validate that the output is internally consistent: no tool appears in both allowed and denied lists, no capability contradicts a deny rule, and inheritance does not create privilege escalation. 6. If [RISK_LEVEL] is "high", add a human_review_required flag to the document_metadata and include a reviewer_signoff field. [RISK_LEVEL]: [low|medium|high]
To adapt this prompt, replace [AGENT_SPECIFICATION] with your raw permission specification—this could be a YAML manifest, a JSON tool config, a natural-language policy document, or the output of a tool discovery scan. Set [RISK_LEVEL] based on the agent's deployment context: use "high" for production agents handling sensitive data or write operations, "medium" for internal tools with limited scope, and "low" for sandboxed or read-only agents. The output JSON is designed to be committed to version control alongside your agent configuration. Run a structural validator against the output before accepting it—check that every tool in your specification appears in the output, that no tool is duplicated across allowed and denied lists, and that deny rule priorities are non-overlapping. For high-risk deployments, route the generated document through a human reviewer before it becomes the authoritative permission record.
Prompt Variables
Required inputs for the Permission Boundary Documentation Prompt. Each placeholder must be populated before the prompt is assembled and sent to the model. Missing or malformed inputs are the most common cause of incomplete permission manifests.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[AGENT_ROLE_NAME] | Identifies the agent or role whose permissions are being documented | customer-support-agent-v2 | Must match the canonical role identifier in your IAM system. Reject if empty or contains only whitespace. |
[TOOL_MANIFEST] | Complete list of available tools with their argument schemas and descriptions | {"tools": [{"name": "search_kb", "args": {"query": "string"}}]} | Must be valid JSON with a tools array. Each tool must have name and args fields. Reject if schema is unparseable. |
[ALLOWED_ACTIONS] | Explicit list of permitted actions per tool, including argument constraints | search_kb: allowed queries matching 'support-*' index pattern only | Each entry must map to a tool in TOOL_MANIFEST. Null allowed if no actions are permitted. Reject if action references unknown tool. |
[DENIED_ACTIONS] | Explicit list of blocked actions with deny-before-allow precedence | delete_ticket: denied for all ticket IDs; update_user_pii: denied globally | Must not conflict with ALLOWED_ACTIONS. Deny rules take precedence. Reject if deny targets an undeclared tool. |
[DATA_SCOPE] | Defines which data partitions, tenants, or records the role can access | tenant_id: [org-1234]; ticket_status: [open, pending]; user_pii: null | Must specify scope per data category. Use null for categories with zero access. Reject if scope references undefined data categories. |
[DELEGATION_RULES] | Specifies whether and how this role can delegate tasks to sub-agents | can_delegate: false; sub_agents: [] | Must be a boolean can_delegate with a sub_agents array. If can_delegate is true, sub_agents must be non-empty. Reject on mismatch. |
[HUMAN_APPROVAL_TRIGGERS] | Lists actions that require human approval before execution | ["delete_ticket", "update_billing", "export_user_data"] | Each trigger must reference an action in TOOL_MANIFEST. Empty array means no approval required. Reject if trigger references unknown action. |
[OUTPUT_SCHEMA_VERSION] | Schema version for the generated permission boundary document | 1.2.0 | Must follow semver format. Reject if not parseable as major.minor.patch. Used for version control and migration compatibility checks. |
Implementation Harness Notes
How to wire the Permission Boundary Documentation Prompt into a governance or CI/CD pipeline with validation, version control, and human review gates.
This prompt is designed to be a deterministic documentation generator, not an interactive assistant. It should be wired into a structured workflow where the input permission specification (tools, arguments, data scopes, deny rules) is provided by a machine-readable source of truth, such as an agent configuration file, an MCP server manifest, or a role-based access control (RBAC) policy. The primary integration point is a post-deployment or pre-review step: after an agent's permissions are defined in code, this prompt generates the human-auditable compliance artifact. Avoid using this prompt in a free-form chat interface where the input spec could be hallucinated or drift from the actual deployed configuration.
The implementation harness should enforce a strict input contract. Before calling the model, validate that the [PERMISSION_SPEC] placeholder is populated with a structured object containing at minimum: allowed_tools (with per-tool argument_constraints), data_scopes, deny_rules, and a role_id. The application layer should serialize this object into the prompt's expected format. After the model returns the [OUTPUT_SCHEMA] (the structured permission boundary document), run a schema validator to confirm the JSON structure matches the expected fields: boundary_id, role_id, effective_date, allowed_actions, denied_actions, data_access_scope, delegation_rules, and compliance_notes. If validation fails, retry once with the validation error injected into the [CONSTRAINTS] field. If it fails again, escalate for human review rather than silently accepting a malformed document.
For governance and audit workflows, integrate this prompt into a version-controlled pipeline. Store the generated permission boundary document alongside the source permission spec in a repository (e.g., as a JSON artifact in Git). Use a diff check to flag any structural changes between versions for human sign-off. The compliance_notes field should be reviewed by a responsible party before the document is published to an audit system. Do not treat the model's output as authoritative without review—this prompt documents what the spec says, but a human must confirm it matches the actual deployed agent behavior. Wire the output into your existing compliance tooling (e.g., GRC platforms, internal wikis) via a simple API integration that posts the validated JSON. For high-risk deployments, add a mandatory approval step in your CI/CD pipeline that blocks the agent release until the permission boundary document is reviewed and signed off.
Expected Output Contract
Fields, format, and validation rules for the structured permission boundary document. Use this contract to validate model output before compliance review or version control.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
permission_boundary_id | string (slug) | Must match pattern ^pb-[a-z0-9-]+$. Parse check: reject if missing or non-slug. | |
version | semver string | Must be valid semver (e.g., 1.0.0). Schema check: reject if unparseable by semver library. | |
effective_date | ISO 8601 date | Must be valid date in YYYY-MM-DD format. Parse check: reject if date is in the future without explicit future_effective flag. | |
role_name | string | Must be non-empty and match the role identifier from the system prompt. Cross-reference check: reject if role_name not in approved role registry. | |
allowed_tools | array of objects | Each object must contain tool_name (string), argument_constraints (object|null), and rate_limit (object|null). Schema check: reject if array is empty without explicit no-tools justification. | |
denied_actions | array of strings | Each string must describe a specific disallowed action. Null allowed if no explicit denials. Content check: flag if denial language is ambiguous (e.g., 'bad stuff'). | |
data_scope | object | Must contain resources (array of strings) and constraints (string). Schema check: reject if resources is empty. Human approval required if scope includes PII or PHI resources. | |
delegation_rules | object | null | If present, must contain can_delegate (boolean) and allowed_sub_roles (array of strings). Null allowed if role cannot delegate. Schema check: reject if can_delegate is true but allowed_sub_roles is empty. |
Common Failure Modes
Permission boundary documentation prompts fail in predictable ways. Here are the most common failure modes and how to guard against them before they reach compliance review.
Permission Over-Claiming in Generated Docs
What to watch: The model describes capabilities that exceed the actual permission specification, creating audit artifacts that claim broader access than deployed. This happens when the model infers capabilities from tool names or descriptions rather than strict allowlists. Guardrail: Always diff the generated documentation against the source permission manifest. Add an explicit instruction: 'Do not infer, assume, or extrapolate any capability not explicitly listed in the provided permission specification.'
Deny Rule Omission Under Ambiguous Input
What to watch: When permission specifications contain complex deny rules with conditions, the model may omit or soften denial language in the documentation, making it appear that an action is conditionally allowed when it should be unconditionally blocked. Guardrail: Require the model to list deny rules before allow rules in the output. Add a validation step that counts deny rules in the source and confirms each appears in the generated document.
Argument Constraint Drift in Documentation
What to watch: Per-tool argument constraints such as allowed value ranges, regex patterns, or enum sets are paraphrased rather than reproduced exactly, introducing gaps that downstream readers misinterpret as broader permission. Guardrail: Instruct the model to quote argument constraints verbatim from the specification using a dedicated field rather than summarizing them. Validate with exact string matching on constraint values.
Silent Scope Expansion Across Tool Categories
What to watch: When tools share similar names or belong to related categories, the model may merge their permission scopes, documenting a broader capability than any single tool actually has. This is especially common with read/write variants of the same tool. Guardrail: Require per-tool permission documentation before any cross-tool summary. Add a check that no documented capability references a tool not explicitly listed in the source allowlist.
Compliance Schema Field Population Failure
What to watch: The model produces valid JSON that matches the output schema structurally but leaves compliance-critical fields empty, null, or populated with placeholder text like 'N/A' or 'See specification.' This creates audit artifacts that pass automated validation but fail human review. Guardrail: Add field-level completeness checks in the validation layer. Require explicit 'NOT APPLICABLE' with a reason rather than empty values. Include a post-generation completeness scan instruction.
Version Drift Between Spec and Documentation
What to watch: When the permission specification is updated but the documentation prompt is not re-run, or when the prompt references a stale version identifier, the generated documentation describes an outdated permission boundary. This is the most common compliance audit failure. Guardrail: Embed the specification version hash and generation timestamp in the prompt. Include a 'Specification Version' field in the output schema. Add a CI check that blocks deployment if the documentation version does not match the current spec version.
Evaluation Rubric
Use this rubric to test the quality of generated permission boundary documentation before shipping it to auditors or committing it to version control. Each criterion targets a specific failure mode common in structured compliance output.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Schema Compliance | Output parses cleanly against the declared [OUTPUT_SCHEMA] with zero structural errors | JSON parse failure, missing required fields, or extra unexpected fields present | Automated schema validator run against raw model output; reject on any validation error |
Tool Enumeration Completeness | Every tool in the [TOOL_MANIFEST] appears in the allowed or denied list with no omissions | Tool count mismatch between manifest and documentation; silent omission of a tool | Count tools in manifest, count tools in output, assert equality; flag any tool present in manifest but absent from documentation |
Argument Constraint Accuracy | For each allowed tool, argument constraints match the [ARGUMENT_CONSTRAINTS] specification exactly | Missing constraint on a parameter, looser bounds than specified, or constraint applied to wrong tool | Per-tool field comparison between constraint spec and output; flag any deviation in type, range, or allowlist values |
Deny Rule Explicitness | Every deny rule from [DENY_RULES] appears with a unique identifier and clear trigger condition | Deny rule paraphrased beyond recognition, missing identifier, or merged with another rule | Exact string match on deny rule identifiers; semantic similarity check on trigger conditions against source spec |
Data Scope Boundary Precision | Data scope declarations reference specific stores, tables, or namespaces from [DATA_SCOPE] without generalization | Vague language like 'relevant data' or 'authorized records' replacing concrete scope identifiers | Keyword presence check for each declared data scope identifier; flag any scope described without its canonical name |
Refusal Language Auditability | Every denial includes a stable refusal message template that an auditor can trace to a specific deny rule | Refusal messages vary per invocation, lack rule reference, or contain conversational filler | Template stability check across multiple generations with same input; assert refusal text contains deny rule identifier or stable key phrase |
Version and Timestamp Presence | Output includes [PROMPT_VERSION], generation timestamp, and source manifest hash in metadata block | Missing version field, stale timestamp, or absent source hash preventing traceability | Field presence check on metadata block; assert all three fields are non-null and timestamp is within expected window |
Cross-Reference Integrity | Allowed and denied sections contain no contradictory entries for the same tool or action | Same tool appears in both allowed and denied lists, or argument constraint contradicts deny rule | Set intersection check between allowed and denied tool lists; assert empty intersection; flag any tool with conflicting entries |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base prompt and a simplified output schema. Use a single model call without validation layers. Focus on getting the permission structure right before adding compliance rigor.
Replace the full [OUTPUT_SCHEMA] with a minimal JSON object containing only allowed_tools, denied_tools, and data_scope. Skip the audit trail fields and version metadata.
Watch for
- The model inventing tools not present in your [TOOL_MANIFEST]
- Argument constraints bleeding across tool boundaries
- Missing denial rules for indirect access paths (e.g., a tool that reads from a store the agent shouldn't access)

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us