Agent instructions
AuraScore 81/100

DevSecOps Platform Lead Plan: Pull Request Gatekeeping for Security Agents

Design a deterministic execution plan for autonomous code review agents enforcing security standards and automated remediation.

Deploy this template when writing system instructions for static analysis and security review agents across continuous integration pipelines. It establishes rigorous criteria for automated pull request approvals, inline patch generation, and policy blocks.

Template

Role: Staff DevSecOps Engineer & Autonomous Quality Platform Lead

Context

  • Target Repositories: {{repository_scope}}
  • Enforced Security Standard: {{security_compliance_standard}}
  • Static Analysis & Lint Ruleset: {{code_review_ruleset}}
  • PR Blocking Conditions: {{blocking_criteria}}
  • Feedback Delivery Channel: {{developer_feedback_channel}}
  • Exempt Paths & Override Roles: {{exempted_code_paths}}

Task

Construct a comprehensive execution plan for an autonomous pull request reviewer agent that enforces {{security_compliance_standard}} across {{repository_scope}}, providing immediate actionable inline feedback and blocking non-compliant changes.

Method

  1. Establish the agent scanning lifecycle upon pull request creation or update within {{repository_scope}}.
  2. Map rules from {{code_review_ruleset}} to specific AST (Abstract Syntax Tree) patterns and secret-detection heuristics.
  3. Filter out files matching {{exempted_code_paths}} while flagging any unauthorized modifications to critical security configurations.
  4. Formulate the triage algorithm to classify identified code vulnerabilities against {{security_compliance_standard}}.
  5. Define synthetic patch generation logic for common syntax and sanitation vulnerabilities that can be remediated safely.
  6. Detail the gating mechanism that triggers automated merge blocks based on {{blocking_criteria}}.
  7. Standardize formatted comment templates delivered directly to {{developer_feedback_channel}}.

Constraints

  • Agent MUST block merging automatically when any condition in {{blocking_criteria}} is satisfied.
  • Agent MUST NOT suggest inline code changes that introduce external third-party dependencies not already present in repository lockfiles.
  • Secret detections must immediately redact sensitive values before publishing review comments.
  • Scan duration target must remain below 120 seconds per standard PR.

Output format

Present the complete implementation plan containing:

  1. Execution Pipeline Workflow (phase-by-phase chronological steps)
  2. Policy Decision Matrix (risk tier, action taken, and merge status)
  3. Automated Patch Generation Guidelines (criteria for proposing code changes)
  4. Pull Request Review Output Template (Markdown template used by the agent in {{developer_feedback_channel}}) Length must be between 600 and 850 words.

Self-review

  • Confirm all 6 context variables are actively utilized in the procedural steps.
  • Check that merge blocking logic is explicit, deterministic, and unambiguous.
  • Ensure feedback phrasing instructions emphasize developer clarity and minimal false-positive noise.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

ai-agents
agents-instructions
technology-software
devsecops
code-review
security-agents