Inferensys

Prompt

Security Decision Record Generation Prompt

A practical prompt playbook for using Security Decision Record Generation Prompt in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the job, ideal user, and constraints for the Security Decision Record Generation Prompt.

This prompt is for security architects and technical decision makers who need to produce a structured, auditable Security Decision Record (SDR) from a design proposal, threat model, or architectural change request. The job-to-be-done is transforming a messy design discussion—often spread across documents, meeting notes, and Slack threads—into a single, traceable artifact that captures the security context, the options considered, the chosen approach, and the explicit rationale behind the decision. This is not a prompt for generating security requirements from scratch or for performing a live threat model; it assumes a design already exists and the architect needs to formalize the decision that was made.

Use this prompt when the decision involves a meaningful security trade-off—such as choosing an authentication protocol, accepting a residual risk, defining a data protection boundary, or selecting a cryptographic primitive—and when that decision will need to be revisited during an audit, an incident, or a future architecture review. The prompt requires several concrete inputs to be effective: a summary of the security problem or design context, a list of at least two options that were genuinely considered, the chosen option, and the constraints (regulatory, performance, operational) that shaped the trade-off. Without these inputs, the model will generate a hollow template that lacks the evidentiary weight an SDR requires.

Do not use this prompt for real-time incident response decisions, where speed and on-call runbooks take priority over structured documentation. Do not use it to replace a formal threat modeling exercise; the SDR documents a decision, not the discovery of threats. In regulated environments, the output must be reviewed and signed off by a human with the authority to accept the documented residual risk. The prompt is a drafting accelerator, not a replacement for architectural judgment or accountability. The next step after generating the SDR is to run the provided eval checks for decision traceability, assumption documentation, and option completeness before storing the record in your architecture repository.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Security Decision Record Generation Prompt delivers value and where it introduces risk. Use these cards to decide if this prompt fits your current architecture workflow.

01

Good Fit: Structured Decision Documentation

Use when: you need a consistent, auditable format for security decisions made during design review. Guardrail: the prompt excels at extracting options, rationale, and consequences from meeting notes or design docs and formatting them into a standard ADR template.

02

Bad Fit: Greenfield Threat Modeling

Avoid when: you need to discover new threats from a blank system design. Risk: the prompt documents decisions already made; it does not perform STRIDE analysis or attack-tree generation. Guardrail: pair this prompt with a dedicated threat modeling prompt before documenting security decisions.

03

Required Inputs: Decision Context and Options

Risk: garbage in, garbage out. If the prompt receives only a decision title without the options considered, constraints, and trade-offs, it will fabricate plausible-sounding rationale. Guardrail: always provide [CONTEXT], [OPTIONS_CONSIDERED], and [CONSTRAINTS] as structured inputs, not just a one-line decision.

04

Operational Risk: False Audit Trail Confidence

Risk: a well-formatted ADR can create unwarranted confidence that a thorough security review occurred. Guardrail: every generated ADR must include a mandatory human review step with explicit sign-off fields. The prompt output is a draft, not a completed review artifact.

05

Operational Risk: Assumption Drift Over Time

Risk: security decisions documented today may reference assumptions that become invalid after infrastructure changes, new threats, or compliance updates. Guardrail: include an [ASSUMPTIONS] section in every ADR with a review cadence and expiration trigger. The prompt should flag assumptions that are time-sensitive.

06

Bad Fit: Compliance Certification Evidence

Avoid when: the output will be submitted directly to auditors as evidence of compliance without human review. Risk: AI-generated rationale may misrepresent actual decision processes or omit undocumented constraints. Guardrail: use this prompt to accelerate drafting, but require a qualified security architect to verify, edit, and attest to the final record.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for generating structured Security Decision Records from architectural context.

This prompt template produces a structured Security Decision Record (SDR) from architectural design documents, threat models, or verbal design context. It forces the model to capture the decision context, options considered, trade-offs evaluated, rationale, and residual risks in a format suitable for audit review and future engineering reference. The template is designed to be wired into a review pipeline where design documents are submitted before implementation begins.

text
You are a security architect documenting a security design decision for audit and future review.

Generate a Security Decision Record (SDR) using the following structure:

## SDR-[YYYY]-[NNN]: [DECISION_TITLE]

**Status:** [Proposed | Accepted | Deprecated | Superseded]
**Date:** [YYYY-MM-DD]
**Deciders:** [DECIDER_LIST]
**Stakeholders:** [STAKEHOLDER_LIST]

### Context
[Summarize the security problem, system boundary, threat environment, and constraints that frame this decision. Reference specific design documents, threat models, or compliance requirements.]

### Decision
[State the security decision clearly. What control, pattern, technology, or policy was chosen? Be specific enough that an engineer can implement it without ambiguity.]

### Options Considered
| Option | Description | Pros | Cons |
|--------|-------------|------|------|
| [OPTION_1] | [DESCRIPTION] | [PROS] | [CONS] |
| [OPTION_2] | [DESCRIPTION] | [PROS] | [CONS] |
| [OPTION_N] | [DESCRIPTION] | [PROS] | [CONS] |

### Trade-Off Analysis
[Analyze the chosen option against alternatives across dimensions: security posture, operational complexity, performance impact, cost, team capability, compliance alignment, and future flexibility.]

### Rationale
[Explain why this decision was made. What evidence, principles, standards, or threat scenarios drove the choice? Reference specific threats mitigated and residual risks accepted.]

### Implications
[What changes does this decision require? List concrete actions: configuration changes, new infrastructure, policy updates, monitoring additions, documentation updates, or team training.]

### Residual Risks
[What risks remain after this decision is implemented? What assumptions must hold true? What compensating controls are needed? What should future reviewers watch for?]

### Validation Criteria
[How will we verify this decision was implemented correctly? List testable conditions, audit checks, or monitoring alerts that confirm the control is working.]

### Related Decisions
[Link to related SDRs, ADRs, or design documents that influenced or are influenced by this decision.]

---

**Inputs:**
- Design Context: [DESIGN_CONTEXT]
- Threat Model: [THREAT_MODEL]
- Compliance Requirements: [COMPLIANCE_REQUIREMENTS]
- Existing Decisions: [EXISTING_DECISIONS]
- Risk Tolerance: [RISK_TOLERANCE]

**Constraints:**
- [CONSTRAINT_1]
- [CONSTRAINT_2]
- [CONSTRAINT_N]

Adapt this template by replacing the square-bracket placeholders with concrete inputs from your design review process. The [DESIGN_CONTEXT] placeholder should receive the system architecture description, data flow diagrams, or component interaction summaries. The [THREAT_MODEL] placeholder accepts STRIDE analyses, attack trees, or threat modeling outputs. The [COMPLIANCE_REQUIREMENTS] field should list applicable standards such as SOC 2, PCI DSS, HIPAA, or internal policy references. If you lack a formal threat model, replace that placeholder with a description of the trust boundaries and known threats. The [RISK_TOLERANCE] input shapes how the model evaluates trade-offs—specify whether the organization prioritizes security over velocity, accepts certain residual risks, or requires compensating controls for any accepted risk.

Before deploying this prompt into a production review pipeline, implement validation checks on the output. Verify that every SDR contains all required sections, that options are compared in a structured table, and that residual risks are explicitly documented rather than hand-waved. For high-assurance environments, require human security architect review before the SDR status moves from Proposed to Accepted. Wire the output into your existing ADR repository with a naming convention that distinguishes security decisions from general architecture decisions. Test the prompt against known security decisions from past incidents to verify it surfaces the same risks and trade-offs that experienced reviewers identified.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the Security Decision Record Generation Prompt needs to produce a traceable, auditable security ADR. Each variable must be supplied or explicitly declared null before the prompt is assembled.

PlaceholderPurposeExampleValidation Notes

[SECURITY_DECISION_TITLE]

The name of the security decision being documented

Implement mTLS for all inter-service communication in the payment domain

Must be a non-empty string under 120 characters. Reject if it describes a task rather than a decision.

[SYSTEM_CONTEXT]

Architecture description, data flow diagrams, or existing design docs that frame the decision

Payment service handles PCI data. Currently uses HTTP between services within the same VPC. 12 microservices in scope.

Must be provided. Minimum 50 characters. If diagrams are referenced, include a text summary of trust boundaries and data classification.

[THREAT_MODEL_SUMMARY]

Known threats, attack surfaces, or risk register entries relevant to this decision

STRIDE analysis identified spoofing and tampering risks on inter-service calls. Internal network assumed trusted in current design.

Can be null if no formal threat model exists. If provided, must reference specific threats, not generic categories.

[COMPLIANCE_REQUIREMENTS]

Applicable regulatory, contractual, or policy requirements driving the decision

PCI DSS 4.0 Requirement 4.2.1 for encryption of cardholder data over open networks. SOC 2 CC6.1 for logical access controls.

Can be null. If provided, each requirement must include a specific control reference, not a vague standard name.

[OPTIONS_CONSIDERED]

List of alternative security approaches evaluated with pros and cons

Option A: mTLS with Vault-managed certs. Option B: Istio sidecar mTLS. Option C: JWT with short-lived tokens. Option D: Do nothing.

Must contain at least 2 options. Each option must have a one-sentence description. Reject if only one option or if 'do nothing' is omitted.

[DECISION_RATIONALE]

The reasoning for the selected option, including trade-offs accepted

Selected Option A because it provides transport-layer encryption without a service mesh dependency. Accepted operational cost of cert rotation.

Must be at least 100 characters. Must explicitly state which option was selected and which trade-offs were accepted. Reject if rationale is circular.

[ASSUMPTIONS_AND_CONSTRAINTS]

Explicit assumptions made during the decision and constraints that bound it

Assumption: All services run in Kubernetes. Constraint: Cannot introduce a service mesh in this quarter. Budget: 2 sprints for implementation.

Must list at least one assumption and one constraint. Each must be a falsifiable statement. Reject if assumptions are stated as facts.

[REVIEW_APPROVAL_STATUS]

Current state of the security review and approver information

Reviewed by Security Architecture on 2025-03-15. Approved by CISO on 2025-03-18. Pending: Platform Engineering sign-off.

Must include at least one reviewer role and date. If null, the ADR is marked as draft. Reject if approval dates are in the future.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Security Decision Record Generation Prompt into an application or review workflow with validation, traceability, and human approval gates.

This prompt is designed to be called from a security architecture review pipeline, a design review bot, or an internal developer portal where architects submit design documents. The harness should collect the required inputs—[DESIGN_DOC], [SECURITY_CONTEXT], [COMPLIANCE_STANDARDS], and [DECISION_OPTIONS]—from upstream systems or structured forms before assembling the prompt. Do not expose a free-text chat interface; the prompt requires structured context to produce an auditable Security Decision Record (SDR). The output is a JSON document conforming to the [OUTPUT_SCHEMA], which your application must validate before storage.

Wire the prompt into a workflow that enforces traceability. After the model returns the SDR, run a validation step that checks: (1) the decision_id is present and unique, (2) all options listed in options_considered have corresponding trade-offs in trade_off_analysis, (3) the rationale field references specific evidence from the [DESIGN_DOC] rather than generic statements, and (4) every assumption in the assumptions_log has an owner and validation_criteria. If validation fails, retry once with the validation errors injected into [CONSTRAINTS] as explicit correction instructions. If the retry also fails, route the record to a human security architect for manual completion rather than accepting a partial SDR. Log every generation attempt, validation result, and human escalation for audit purposes.

For model choice, use a model with strong reasoning and structured output capabilities. The prompt expects the model to compare architectural options against security properties, which requires careful trade-off reasoning rather than pattern matching. Set temperature low (0.1–0.2) to reduce variance in decision rationale. If your deployment supports structured output modes (e.g., JSON mode or function calling with a strict schema), use them to enforce the [OUTPUT_SCHEMA] at the API level rather than relying solely on prompt instructions. For high-compliance environments, store the raw prompt, the full model response, the validation results, and the final approved SDR in an append-only decisions log. This creates an evidence trail showing that the decision was generated with specific inputs, reviewed by specific validators, and approved by a named human when required. Never auto-approve SDRs that touch authentication architecture, encryption key management, or zero-trust boundaries without human review, regardless of validation scores.

IMPLEMENTATION TABLE

Expected Output Contract

Fields and validation rules for the Security Decision Record (SDR) generated by the prompt. Use this contract to validate the model output before accepting it into your ADR repository or audit trail.

Field or ElementType or FormatRequiredValidation Rule

Title

String

Must start with 'SDR-' followed by a zero-padded sequence number (e.g., SDR-0042). Must contain a concise summary of the security decision.

Status

Enum: Proposed | Accepted | Deprecated | Superseded

Must be one of the four allowed values. If Superseded, the Supersedes field must be populated.

Context

String (Markdown)

Must be non-empty and contain at least one explicit reference to a system component, threat, or compliance requirement. Length must be between 50 and 2000 characters.

Decision

String (Markdown)

Must contain a clear, affirmative statement of the chosen security approach. Cannot be a restatement of the problem. Must reference at least one specific technology, pattern, or control.

Options Considered

Array of Objects

Must contain at least 2 options. Each option object must have a 'description' (String) and 'pros' and 'cons' (Array of Strings). The chosen option must be identifiable.

Consequences

String (Markdown)

Must explicitly list positive and negative consequences of the decision. Negative consequences must include at least one specific risk, cost, or operational burden.

Compliance Mapping

Array of Strings

If provided, each string must match a known framework identifier (e.g., 'SOC2 CC6.1', 'NIST 800-53 AC-3'). Null or empty array is allowed if no specific compliance drivers exist.

Assumptions

Array of Strings

Must contain at least one assumption. Each assumption must be a falsifiable statement. Vague entries like 'The system is secure' must be rejected by the validator.

PRACTICAL GUARDRAILS

Common Failure Modes

Security ADR prompts fail in predictable ways. These cards cover the most common failure modes, why they happen, and how to prevent them before the ADR reaches an auditor or a future architect.

01

Missing Threat Context

What to watch: The model generates a decision rationale that ignores the specific threat model or assumes a generic adversary. The ADR reads like a textbook summary rather than a response to a concrete security requirement. Guardrail: Include a [THREAT_MODEL] or [SECURITY_REQUIREMENTS] input block in the prompt. Validate that every option considered in the output references at least one specific threat or control from the input.

02

Unstated Assumptions

What to watch: The ADR presents trade-offs as objective facts without surfacing the assumptions that make them true. Future readers cannot tell which conditions must hold for the decision to remain valid. Guardrail: Add an explicit assumptions field to the [OUTPUT_SCHEMA]. Use an eval check that fails the ADR if the assumptions array is empty or contains only generic statements like 'the system is secure.'

03

Option Strawmanning

What to watch: The model presents one clearly superior option alongside weak alternatives, making the decision look obvious rather than genuinely considered. This undermines audit credibility. Guardrail: Require at least [MIN_OPTIONS] (typically 3) in the prompt. Add an eval that checks each option has both a genuine strength and a genuine weakness. Flag outputs where rejected options lack any positive attributes.

04

Rationale Drift from Evidence

What to watch: The model asserts a security property without grounding it in the design document, threat model, or compliance requirement provided. The rationale sounds plausible but cannot be traced back to source material. Guardrail: Require each rationale statement to cite a specific section of the input design document or a specific control from the compliance framework. Use a grounding eval that checks for citation presence and rejects unsupported claims.

05

Overconfident Residual Risk Ratings

What to watch: The model assigns 'Low' residual risk to accepted risks without explaining the compensating controls or acknowledging uncertainty. This creates a false sense of security for auditors and future maintainers. Guardrail: Add a [RISK_SCALE] definition to the prompt that requires explicit justification for any rating below 'Medium.' Use an eval that flags residual risk ratings lacking a compensating control reference.

06

Compliance Checklisting Without Engineering Judgment

What to watch: The model maps the decision to compliance controls but fails to explain the engineering trade-off. The ADR becomes a compliance artifact rather than a design document that helps future architects understand why the system works the way it does. Guardrail: Separate the output schema into engineering_rationale and compliance_mapping fields. Validate that the engineering rationale contains at least one performance, operability, or scalability trade-off discussion.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for testing whether a generated Security Decision Record meets quality standards before it is accepted into the architecture repository.

CriterionPass StandardFailure SignalTest Method

Decision Traceability

Output references a specific architectural decision, its context, and the triggering event or requirement.

Decision is vague, untethered to any system component, or lacks a clear 'why now' trigger.

Parse check for non-empty [DECISION_STATEMENT] and [CONTEXT] fields. Human review confirms link to a real design issue.

Options Considered

At least two distinct, named alternatives are described with their trade-offs, not just the chosen option.

Only the chosen option is presented, or alternatives are straw-man arguments with no real analysis.

Schema check for [OPTIONS] array with length >= 2. Each option must have a non-empty [TRADE_OFFS] field.

Rationale Completeness

The rationale explains why the chosen option was selected over the rejected alternatives using specific criteria like security posture, complexity, or cost.

Rationale is a generic statement like 'best practice' or 'more secure' without linking to the documented trade-offs.

LLM-as-judge check: prompt a second model to verify the [RATIONALE] explicitly references criteria used to reject the other [OPTIONS].

Assumption Documentation

All critical security assumptions about the environment, threat model, or upstream dependencies are explicitly listed.

The record assumes perfect upstream security, ignores shared responsibility models, or omits trust boundary assumptions.

Parse check for non-empty [ASSUMPTIONS] array. Human review confirms no implicit trust in network, IAM, or upstream services.

Consequence and Follow-Up

Output lists specific, actionable consequences of the decision, including any new security acceptance criteria or future work.

Consequences are missing, or they are generic statements like 'monitor for issues' without specific triggers or owners.

Schema check for non-empty [CONSEQUENCES] array. Each item must include an actionable [FOLLOW_UP] or [ACCEPTANCE_CRITERIA] field.

Compliance and Policy Alignment

The decision explicitly references any applicable compliance standards, internal security policies, or regulatory requirements it satisfies or impacts.

No mention of relevant standards (e.g., SOC 2, GDPR, HIPAA) or internal policies, even when the decision clearly touches PII or access control.

Keyword and entity extraction check for policy/standard names in [COMPLIANCE] field. Flag if null when [CONTEXT] contains regulated data types.

Output Schema Validity

The generated output strictly conforms to the defined [OUTPUT_SCHEMA] with all required fields present and correctly typed.

Output is missing required fields, contains extra untyped commentary, or uses incorrect data types (e.g., string for array).

Automated JSON Schema validation against the target ADR schema. Retry prompt on first failure; escalate for human review on second failure.

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a frontier model and manual review. Drop the strict schema validation and focus on getting a well-structured ADR. Replace [OUTPUT_SCHEMA] with a simple markdown template instead of a JSON schema. Remove the eval harness checks and just review the output manually.

Watch for

  • Missing decision traceability: the model may skip the 'options considered' section
  • Overconfident rationale without evidence grounding
  • Assumptions presented as facts
  • No clear separation between the decision and the implementation plan
Prasad Kumkar

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.