This prompt is designed for security review agents and autonomous audit orchestrators that must convert a high-level audit scope into a structured, executable work plan. The ideal user is an engineering lead or security architect integrating an AI agent into a continuous security review pipeline. The required context includes a defined audit objective, a list of available security tools and their capabilities, the target system's architecture, and a clear risk tolerance or rules of engagement. The prompt decomposes the objective into four sequential phases: reconnaissance, vulnerability assessment, finding documentation, and remediation planning. The output is a risk-prioritized task list with evidence collection steps, tool assignments, and explicit approval gates for any destructive or high-impact testing.
Prompt
Security Audit Task Breakdown Prompt

When to Use This Prompt
Defines the job-to-be-done, ideal user, required context, and explicit boundaries for the Security Audit Task Breakdown Prompt.
Use this prompt when you need a machine-readable audit plan that a downstream agent runtime can execute step by step. The generated plan is suitable for ingestion by a state machine or workflow engine that can manage tool calls, check preconditions, and enforce approval gates. The harness must validate that the output contains no hallucinated tools, that all destructive tests are flagged for human approval, and that the task ordering respects data dependencies between phases. For example, a vulnerability assessment task should not appear before its prerequisite reconnaissance task is complete. The prompt is most effective when the audit scope is well-defined but the specific steps require expert decomposition.
Do not use this prompt for real-time incident response, where predefined runbooks and human judgment must take precedence over generated plans. It is also unsuitable for physical security audits, social engineering assessments, or any context where the model's lack of real-world grounding could produce dangerous recommendations. For high-risk production environments, always pair the generated plan with a human review step before execution begins. The plan is a starting point for expert refinement, not a replacement for security engineering judgment.
Use Case Fit
Where the Security Audit Task Breakdown Prompt works, where it fails, and the operational preconditions required before wiring it into a production agent harness.
Good Fit: Scoped Security Assessments
Use when: The audit scope is well-defined (specific systems, networks, or compliance boundaries) and the agent has access to asset inventories, architecture diagrams, or policy documents. The prompt excels at turning a scoped objective into a phased work plan with evidence collection steps.
Guardrail: Always validate that the generated plan respects scope boundaries. A plan that expands scope without authorization can trigger unauthorized testing or legal exposure.
Bad Fit: Zero-Knowledge Black-Box Testing
Avoid when: The agent has no information about the target environment and must perform pure reconnaissance from scratch. The prompt assumes some initial context (system type, compliance framework, known assets) to produce a meaningful task breakdown.
Guardrail: Gate the prompt behind a context-completeness check. If asset inventory or scope documentation is missing, route to a clarification prompt first rather than generating a shallow or hallucinated plan.
Required Inputs: Scope, Assets, and Rules of Engagement
Required: A clear audit objective, a list of in-scope systems or assets, the applicable compliance framework or threat model, and explicit rules of engagement (what can be tested, when, and how). Without these, the decomposition will be generic or unsafe.
Guardrail: Implement a precondition validation step that checks for each required input before calling the decomposition prompt. Return a structured missing-inputs list rather than proceeding with incomplete context.
Operational Risk: Destructive Test Approval Gaps
Risk: The prompt may generate subtasks that include active vulnerability scanning, exploitation attempts, or configuration changes without flagging them as destructive or gating them behind approval. In production, this can cause outages, data loss, or legal violations.
Guardrail: Post-process every generated subtask through a destructive-action classifier. Any step tagged as destructive must be wrapped in a human-approval gate with a timeout that defaults to skip, not execute.
Operational Risk: Evidence Chain Gaps
Risk: The prompt may produce a plan where findings are documented but the evidence linking each finding to a specific collection step is missing. This breaks audit defensibility and makes remediation tracking unreliable.
Guardrail: Require the output schema to include an evidence_source field for every finding subtask, mapping back to a prior collection step. Validate that no finding is orphaned from its evidence before the plan is approved for execution.
Operational Risk: Stale or Hallucinated Tool References
Risk: If the prompt is not constrained by an actual tool manifest, it may generate subtasks that reference nonexistent scanners, APIs, or internal tools. The agent will fail at runtime or silently skip critical steps.
Guardrail: Always provide a [AVAILABLE_TOOLS] schema as part of the prompt input and validate the output plan against it. Any subtask referencing an unavailable tool should be flagged for human reassignment or tool provisioning before execution begins.
Copy-Ready Prompt Template
A copy-ready template for decomposing a security audit scope into a structured, risk-prioritized work plan.
The following prompt template is designed to be copied directly into your AI harness. It instructs the model to act as a security audit planner and decompose a high-level audit scope into a structured set of subtasks. The template uses square-bracket placeholders that you must replace with your specific audit scope, available tools, and output requirements before sending it to the model. The prompt enforces a strict JSON output schema so that the resulting task plan can be parsed and executed by a downstream agent orchestrator without manual reformatting.
codeYou are a security audit planning agent. Your job is to decompose the provided audit scope into a structured, executable work plan. You must produce a risk-prioritized sequence of subtasks covering reconnaissance, vulnerability assessment, finding documentation, and remediation planning. You must only use the tools listed in [TOOL_INVENTORY]. Do not invent or assume capabilities not present in that list. ## AUDIT SCOPE [SYSTEM_DESCRIPTION] ## CONSTRAINTS - Target environment: [TARGET_ENVIRONMENT] - Compliance framework (if any): [COMPLIANCE_FRAMEWORK] - Out-of-scope items: [OUT_OF_SCOPE] - Risk level: [RISK_LEVEL] ## AVAILABLE TOOLS [TOOL_INVENTORY] ## OUTPUT SCHEMA Return a single JSON object with the following structure: { "audit_plan": { "objective": "string", "scope_boundaries": ["string"], "tasks": [ { "task_id": "string", "phase": "reconnaissance | vulnerability_assessment | finding_documentation | remediation_planning", "description": "string", "tool": "string from TOOL_INVENTORY or 'manual'", "inputs": ["string"], "expected_outputs": ["string"], "dependencies": ["task_id"], "risk_priority": "critical | high | medium | low", "is_destructive": true | false, "requires_approval": true | false, "approval_rationale": "string if requires_approval is true, otherwise null", "evidence_required": ["string"] } ], "execution_order": ["task_id"], "approval_gates": [ { "before_task_id": "string", "reason": "string", "approver_role": "string" } ] } } ## RULES 1. Every task must reference a tool from TOOL_INVENTORY or be marked as 'manual'. 2. Mark any task that modifies the target system, runs exploits, or could cause disruption as `is_destructive: true` and `requires_approval: true`. 3. Include an `approval_rationale` for every task that requires approval. 4. Tasks must be ordered by dependency and risk priority. Critical-risk tasks come first within their dependency group. 5. Do not include tasks for out-of-scope items. 6. If the audit scope is too vague to decompose safely, return a JSON object with a single `clarification_needed` field containing a list of specific questions.
To adapt this template, start by replacing [SYSTEM_DESCRIPTION] with a concrete description of the target system, including its architecture, exposed services, and data sensitivity. Populate [TOOL_INVENTORY] with the exact list of tools your agent has access to, such as nmap, sqlmap, burp_scanner, or aws_inspector. If your audit must align with a specific compliance framework like SOC 2 or PCI DSS, specify it in [COMPLIANCE_FRAMEWORK] so the model can generate evidence collection steps that map to control requirements. Before integrating this prompt into a production harness, validate that the output schema is enforced by a JSON schema validator and that any task flagged as is_destructive: true triggers a hard stop in your orchestration layer until a human approves it. Do not remove the clarification_needed escape hatch; it prevents the model from hallucinating a plan when the scope is insufficiently defined.
Prompt Variables
Each placeholder must be populated before the prompt is sent. Incomplete or vague variables produce incomplete or unsafe audit plans. Validate every field against the rules below before execution.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[AUDIT_SCOPE] | Defines the system, network, application, or codebase boundary under review. | Production Kubernetes cluster (us-east-1), including the ingress controller and service mesh. | Must be a non-empty string. Reject if scope is 'everything' or unbounded. Parse for specific resource identifiers. |
[AUDIT_OBJECTIVE] | States the goal: compliance check, pentest prep, architecture review, or vulnerability assessment. | Identify misconfigurations and known vulnerabilities exploitable by an external attacker. | Must map to one of the allowed objective types in the harness enum. Reject ambiguous objectives like 'make it secure'. |
[COMPLIANCE_STANDARD] | Optional regulatory or policy framework to map findings against. | PCI DSS 4.0, SOC 2 Type II, or null. | If provided, must match a known standard tag in the compliance registry. Null allowed. If null, the plan skips compliance mapping steps. |
[AVAILABLE_TOOLS] | List of tools, APIs, and capabilities the agent is authorized to use. | ['nmap', 'kubectl', 'trivy', 'sqlmap', 'zap'] | Must be a valid JSON array of strings. Harness must reject any tool not in the approved tool registry. Destructive tools must be flagged. |
[DESTRUCTIVE_TOOLS] | Explicit list of tools that can alter state or cause disruption. | ['sqlmap', 'hydra'] | Must be a subset of [AVAILABLE_TOOLS]. Any step using these tools must be wrapped in an approval gate in the generated plan. |
[EVIDENCE_REQUIREMENTS] | Specifies the type of proof required for each finding. | Screenshot, raw tool output, timestamp, and a reproducible command. | Must be a non-empty string. Harness should check that every finding in the output plan includes a step to collect these evidence types. |
[OUTPUT_SCHEMA] | The exact JSON schema the final audit plan must conform to. | See output-contract table for field definitions. | Must be a valid JSON Schema object. Harness must validate the generated plan against this schema. Reject if schema is missing required fields like 'tasks' or 'approval_gates'. |
[RISK_TOLERANCE] | Defines the threshold for automated vs. manual actions. | 'low' (only safe scans), 'medium' (auto-run non-destructive), or 'high' (auto-run all approved). | Must be one of the enum values: 'low', 'medium', 'high'. If 'high', a secondary human approval flag must be set to true in the harness config. |
Implementation Harness Notes
How to wire the Security Audit Task Breakdown Prompt into an agent orchestrator with validation, gating, and safe execution controls.
This prompt is designed to be called by an agent orchestrator, not a human chat interface. The orchestrator must treat the prompt's output as a structured work plan that requires validation before any task is executed. The primary integration point is a planning module that receives a high-level audit scope and returns a JSON task graph. The harness must parse this graph, validate its structure, and then hand validated subtasks to an execution engine that respects the risk-prioritized ordering and approval gates.
The harness must enforce several critical checks before execution begins. First, validate that the output contains a valid task graph with no cycles in the dependency structure—use a topological sort to confirm a valid execution order exists. Second, scan every subtask for destructive or high-risk actions (e.g., active vulnerability scanning, exploitation attempts, configuration changes) and flag them for human approval. A simple keyword and pattern matcher can catch common destructive actions, but a secondary LLM call with a classification prompt is more robust for novel phrasings. Third, confirm that every subtask has a defined completion criterion and that evidence collection steps precede any analysis or documentation steps that depend on them. If any of these checks fail, the harness must reject the plan and either request a replan or escalate to a human operator.
For model choice, use a model with strong reasoning and JSON output capabilities. The prompt includes an [OUTPUT_SCHEMA] placeholder that should be populated with a strict JSON schema definition. Enable structured output mode if the model supports it. Set a retry policy: if the model returns malformed JSON or fails schema validation, retry up to two times with the validation errors included in the retry prompt. After two failures, log the full response and escalate. All prompt calls, outputs, validation results, and approval decisions must be logged with timestamps and trace IDs for auditability. Never execute a destructive or high-risk subtask without a recorded human approval. For evidence collection steps, store outputs in a structured evidence log that downstream analysis and documentation subtasks can reference, ensuring traceability from findings back to the collected evidence.
Expected Output Contract
The model must return a valid JSON object matching this schema. Any deviation should be caught by the harness validation layer before execution.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
audit_plan_id | string (UUID v4) | Must match UUID v4 regex. Harness generates and injects this value; model output must echo it back exactly. | |
scope_summary | string | Non-empty string, max 500 characters. Must not contain unresolved placeholders or hallucinated system details not present in [AUDIT_SCOPE]. | |
subtasks | array of objects | Array length must be between 3 and 50. Each element must conform to the subtask object schema defined in this contract. | |
subtasks[].task_id | string (kebab-case) | Must match pattern ^task-[a-z0-9]+(-[a-z0-9]+)*$. Must be unique within the subtasks array. | |
subtasks[].phase | enum string | Must be one of: reconnaissance, vulnerability_assessment, finding_documentation, remediation_planning. Phase ordering must be logical (reconnaissance before vulnerability_assessment, etc.). | |
subtasks[].description | string | Non-empty, max 300 characters. Must describe a single verifiable action. Harness checks for vague verbs like 'check' or 'review' without a concrete target. | |
subtasks[].evidence_required | array of strings | Array length >= 1. Each string must name a specific artifact type (e.g., 'nmap_scan_output', 'config_snapshot', 'code_diff'). No generic placeholders like 'evidence_1'. | |
subtasks[].is_destructive | boolean | Must be true or false. If true, harness must flag this task for human approval before execution and the field destructive_action_description becomes required. | |
subtasks[].destructive_action_description | string | null | Required and non-empty when is_destructive is true. Must be null when is_destructive is false. Harness must reject non-null descriptions on non-destructive tasks. | |
subtasks[].risk_priority | enum string | Must be one of: critical, high, medium, low. Tasks flagged as is_destructive: true cannot have a risk_priority of low. Harness must enforce this constraint. | |
subtasks[].depends_on | array of strings (task_id references) | Array of task_id values from other subtasks. Must not contain self-references. Harness must validate that all referenced task_ids exist in the subtasks array and that no cycles are formed. | |
subtasks[].estimated_tool | string | null | If provided, must match an entry in the [AVAILABLE_TOOLS] list. Harness must reject hallucinated tool names. Null is allowed when no specific tool is required. | |
subtasks[].completion_criteria | string | Non-empty, max 200 characters. Must describe a verifiable condition (e.g., 'nmap scan returns open port list for all hosts in scope'). Harness should flag criteria that cannot be programmatically verified. | |
metadata.generated_at | string (ISO 8601) | Must be a valid ISO 8601 datetime string. Harness injects this; model must echo it back. | |
metadata.model_version | string | Must match the value provided in [MODEL_VERSION] input parameter. Harness must reject mismatches. |
Common Failure Modes
What breaks first when a security audit task breakdown prompt runs in production, and how to prevent it.
Hallucinated Destructive Tests
What to watch: The model generates subtasks for active exploitation, penetration testing, or destructive scans without explicit authorization. This is the highest-risk failure mode in security contexts. Guardrail: Add a hard constraint in the prompt template that destructive or intrusive steps must be flagged with requires_approval: true and never executed without human sign-off. Validate the output schema to ensure this field is present and respected.
Scope Creep and Over-Execution
What to watch: The decomposition expands beyond the defined audit scope, adding tasks for systems, subnets, or assets not listed in the input. This wastes tokens and can trigger unauthorized access attempts. Guardrail: Include a [SCOPE_BOUNDARY] variable in the prompt and instruct the model to explicitly map each subtask back to a scoped asset. Post-generation, run a validator that checks every task's target against the allowed asset list.
Missing Evidence Collection Steps
What to watch: The plan jumps directly to vulnerability assessment or remediation without first defining reconnaissance and evidence-gathering subtasks. This produces findings without traceable proof. Guardrail: Structure the output schema to require an evidence_collection phase before any assessment or remediation phase. Use a schema validator to reject plans where finding tasks lack a preceding evidence task dependency.
Incorrect Dependency Ordering
What to watch: The task graph places remediation before assessment, or documentation before evidence collection. This creates circular dependencies or impossible execution sequences. Guardrail: Enforce a strict phase ordering in the prompt (Reconnaissance → Assessment → Documentation → Remediation) and validate the output's dependency graph for cycles. Reject any plan where a task depends on an output from a later phase.
Vague or Non-Atomic Subtasks
What to watch: The model produces high-level tasks like "Review the system" that cannot be executed by a tool or a human without further decomposition. This defeats the purpose of task breakdown. Guardrail: Include a constraint that each subtask must be a single, verifiable action with a defined tool or manual procedure. Add an eval check that measures task atomicity by ensuring each task contains exactly one action verb and one target.
Ignoring Compliance Framework Requirements
What to watch: The decomposition omits steps required by the specified compliance framework (e.g., PCI DSS evidence collection, HIPAA risk rating). The resulting audit plan is incomplete for its regulatory context. Guardrail: Pass the [COMPLIANCE_FRAMEWORK] as an explicit input and include a checklist of mandatory phase outputs in the prompt. Validate the generated plan against a framework-specific checklist of required task categories before accepting the output.
Evaluation Rubric
Score each generated audit plan against these criteria before approving it for execution. A plan must score at least 18 out of 20 to proceed without human modification.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Scope Coverage | Plan covers all items in [AUDIT_SCOPE] with no omissions | Missing scope items or undocumented exclusions | Diff [AUDIT_SCOPE] items against plan sections; flag gaps |
Destructive Test Flagging | All destructive or intrusive tests are marked with requires_approval: true | Penetration test, fuzzing, or live exploit step missing approval flag | Scan plan for destructive keywords; assert requires_approval field present |
Evidence Collection Completeness | Every finding step includes an evidence collection method and output artifact | Step describes a check but omits how evidence is captured | Validate each task has evidence_method and output_artifact fields populated |
Risk-Prioritized Ordering | Tasks are ordered by risk level with high-risk items scheduled first | Low-risk reconnaissance tasks appear after exploitation steps | Parse risk_level values; verify descending order in task sequence |
Dependency Soundness | All inter-task dependencies reference valid predecessor task IDs | Dependency on nonexistent task ID or circular dependency detected | Build dependency graph; check for cycles and missing node references |
Remediation Planning | Each finding type includes a corresponding remediation planning subtask | Critical vulnerability finding has no linked remediation step | Join finding tasks to remediation tasks; assert 1:1 mapping for high-severity items |
Approval Gate Placement | Human approval gates precede all irreversible or high-impact actions | Approval gate appears after destructive action in task sequence | Check task ordering; assert approval task ID < destructive task ID in sequence |
Tool and Capability Realism | All referenced tools exist in [AVAILABLE_TOOLS] list with no hallucinations | Plan references nmap when only web scanner is available | Cross-reference tool names in plan against [AVAILABLE_TOOLS] manifest |
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
Use the base prompt with a frontier model and lighter output validation. Remove the strict JSON schema requirement during early exploration. Replace the full [AUDIT_SCOPE] with a narrow test case (single service, known vulnerability class). Accept markdown task lists instead of structured JSON to iterate faster on decomposition logic.
Prompt snippet
codeYou are a security audit planner. Given the following audit scope, produce a prioritized task breakdown. Focus on reconnaissance, vulnerability assessment, and finding documentation steps. Flag any step that involves destructive testing. Scope: [NARROW_TEST_SCOPE]
Watch for
- Tasks that are too coarse ("audit the network") instead of atomic
- Missing destructive test flags when scope includes production systems
- No distinction between automated and manual steps

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