Skip to main content
Glama

Review PR Against SDLC Standard

review_pr_against_standard
Read-onlyIdempotent

Review a GitHub pull request against basic, strict, or security-focused standards, and flag CODEOWNERS ownership routing gaps.

Instructions

Review a pull request against Agentic SDLC standards.

Standards:

  • basic: Core checks (tests, description, draft status, commit count)

  • strict: basic + large diff detection, missing docs

  • security-focused: strict + mature secret-scanner CI evidence + supplemental patch heuristics, .env files, lockfile changes, dist files

Ownership check (independent of standard, runs when checkOwnership is true and a CODEOWNERS file exists): Matches changed files against .github/CODEOWNERS (or CODEOWNERS / docs/CODEOWNERS), and flags any matched owner who is neither the PR author, a requested reviewer, nor an actual reviewer.

Args:

  • owner, repo: Repository coordinates.

  • pullNumber (number): The PR to review.

  • standard: "basic" | "strict" | "security-focused". Default: "basic".

  • checkOwnership (boolean, default: true): Enable the CODEOWNERS ownership check.

Returns: Sorted findings by severity, test coverage signal, ownership routing gaps, release risk, and conclusion.

Input Schema

NameRequiredDescriptionDefault
repoNoGitHub repo. Falls back to GITHUB_REPO.
ownerNoGitHub owner. Falls back to GITHUB_OWNER.
standardNoReview standard: 'basic', 'strict', or 'security-focused'.basic
workTypeNoOptional explicit work type. When omitted, it is inferred from PR metadata and paths.
pullNumberYesThe pull request number to review.
checkOwnershipNoCheck changed files against .github/CODEOWNERS and flag owners who were neither requested nor have reviewed. Requires read access to repo contents and PR reviewers/reviews.

Output Schema

NameRequiredDescriptionDefault
titleYes
errorsYes
findingsYes
hasTestsYes
standardYes
workTypeYes
conclusionYes
pullNumberYes
releaseRiskYes
policyDigestYes
policySourcesYes
trustBoundaryNo
policyDegradedYes
codeownersFoundYes
totalChangedLinesYes
workTypeReasoningYes
appliedPolicyRulesYes
testCoverageSignalYes
workTypeConfidenceYes
ownershipRoutingGapsYes
secretScannerEvidenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.11.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.9.0
    • addedOutput schema / properties / trustBoundary
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "callerAndRepositoryContent": {
      +      "const": "untrusted",
      +      "type": "string"
      +    },
      +    "instructionHandling": {
      +      "const": "never_execute",
      +      "type": "string"
      +    },
      +    "permissionHandling": {
      +      "const": "never_expand",
      +      "type": "string"
      +    },
      +    "secretHandling": {
      +      "const": "never_reveal",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "callerAndRepositoryContent",
      +    "instructionHandling",
      +    "secretHandling",
      +    "permissionHandling"
      +  ],
      +  "type": "object"
      +}
  3. Changed17 schema fields changedv1.8.0
    • addedInput schema / properties / workType
      Added value: +{
      +  "description": "Optional explicit work type. When omitted, it is inferred from PR metadata and paths.",
      +  "enum": [
      +    "docs",
      +    "feature",
      +    "bugfix",
      +    "refactor",
      +    "security",
      +    "release",
      +    "infra"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / appliedPolicyRules
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "source": {
      +        "const": "repository",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "source"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / findings / items / properties / dimension
      Added value: +{
      +  "enum": [
      +    "intent",
      +    "scope",
      +    "evidence",
      +    "ownership",
      +    "policy",
      +    "fallback",
      +    "security"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / findings / items / properties / paths
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / findings / items / properties / reason
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / findings / items / required
      Previous value: -[
      -  "severity",
      -  "category",
      -  "description"
      -]New value: +[
      +  "severity",
      +  "category",
      +  "description",
      +  "suggestion",
      +  "dimension",
      +  "paths",
      +  "reason"
      +]
    • addedOutput schema / properties / ownershipRoutingGaps
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "owner": {
      +        "type": "string"
      +      },
      +      "paths": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "owner",
      +      "paths"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / policyDegraded
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / policyDigest
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / policySources
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "blobSha": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "digest": {
      +        "type": "string"
      +      },
      +      "kind": {
      +        "enum": [
      +          "default",
      +          "repository"
      +        ],
      +        "type": "string"
      +      },
      +      "path": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "ref": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "path",
      +      "ref",
      +      "blobSha",
      +      "digest"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / releaseRisk
      Added value: +{
      +  "enum": [
      +    "low",
      +    "moderate",
      +    "high",
      +    "critical"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / secretScannerEvidence
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "degraded": {
      +          "type": "boolean"
      +        },
      +        "providers": {
      +          "items": {
      +            "enum": [
      +              "gitleaks",
      +              "trufflehog",
      +              "secretlint",
      +              "detect-secrets",
      +              "github-secret-scanning"
      +            ],
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "reason": {
      +          "type": "string"
      +        },
      +        "signals": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "appId": {
      +                "anyOf": [
      +                  {
      +                    "maximum": 9007199254740991,
      +                    "minimum": -9007199254740991,
      +                    "type": "integer"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "provenanceVerified": {
      +                "type": "boolean"
      +              },
      +              "provider": {
      +                "enum": [
      +                  "gitleaks",
      +                  "trufflehog",
      +                  "secretlint",
      +                  "detect-secrets",
      +                  "github-secret-scanning"
      +                ],
      +                "type": "string"
      +              },
      +              "source": {
      +                "enum": [
      +                  "check_run",
      +                  "commit_status"
      +                ],
      +                "type": "string"
      +              },
      +              "state": {
      +                "enum": [
      +                  "passing",
      +                  "failing",
      +                  "pending",
      +                  "skipped"
      +                ],
      +                "type": "string"
      +              },
      +              "trusted": {
      +                "type": "boolean"
      +              },
      +              "url": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "name",
      +              "provider",
      +              "source",
      +              "appId",
      +              "trusted",
      +              "provenanceVerified",
      +              "state",
      +              "url"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "status": {
      +          "enum": [
      +            "passing",
      +            "failing",
      +            "pending",
      +            "unverified"
      +          ],
      +          "type": "string"
      +        },
      +        "verified": {
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "verified",
      +        "degraded",
      +        "providers",
      +        "signals",
      +        "reason"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / testCoverageSignal
      Added value: +{
      +  "enum": [
      +    "adequate",
      +    "missing",
      +    "not_required",
      +    "insufficient_evidence"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / workType
      Added value: +{
      +  "enum": [
      +    "docs",
      +    "feature",
      +    "bugfix",
      +    "refactor",
      +    "security",
      +    "release",
      +    "infra"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / workTypeConfidence
      Added value: +{
      +  "enum": [
      +    "high",
      +    "medium",
      +    "low"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / workTypeReasoning
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "pullNumber",
      -  "title",
      -  "standard",
      -  "conclusion",
      -  "findings",
      -  "hasTests",
      -  "totalChangedLines",
      -  "codeownersFound",
      -  "errors"
      -]New value: +[
      +  "pullNumber",
      +  "title",
      +  "standard",
      +  "conclusion",
      +  "findings",
      +  "hasTests",
      +  "totalChangedLines",
      +  "codeownersFound",
      +  "workType",
      +  "workTypeConfidence",
      +  "workTypeReasoning",
      +  "releaseRisk",
      +  "testCoverageSignal",
      +  "ownershipRoutingGaps",
      +  "errors",
      +  "secretScannerEvidence",
      +  "policyDigest",
      +  "policySources",
      +  "appliedPolicyRules",
      +  "policyDegraded"
      +]
  4. First observedv1.5.0

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so safety is covered. The description adds genuinely useful behavioral context beyond that: the CODEOWNERS file locations it consults, the exact flagging rule (owner who is neither author, requested reviewer, nor actual reviewer), and the shape of the output ('sorted findings by severity, test coverage signal, ownership routing gaps, release risk').

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first line, then organized under 'Standards', 'Ownership check', 'Args', and 'Returns' headings. The Args section largely restates schema fields and costs some space, but nothing is padded or circular.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only review tool with rich annotations and an output schema, the description supplies everything an agent needs: what each tier does, when ownership checking engages, required coordinates, and the return surface. No material gap remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, and the description earns above baseline by expanding the semantics of the 'standard' enum values into concrete check lists and explaining when the checkOwnership flag actually does something. It omits any mention of workType, but that parameter is fully documented in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Review a pull request against Agentic SDLC standards') and then enumerates exactly what each standard tier checks, so the agent knows precisely what the tool produces. It does not explicitly contrast itself with near-neighbors like quality_gate_status or release_readiness_check, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The tier definitions ('basic: Core checks', 'strict: basic + ...', 'security-focused: strict + ...') implicitly tell the agent which standard to pick for which rigour level, and the ownership check's activation conditions are stated. However, there is no explicit when-to-use guidance relative to siblings such as quality_gate_status or security_triage, so usage is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.