{
  "schema": "vedokrok.public-item.v1",
  "release_id": "MHC-RPUB-20260920-75ad787a",
  "url": "/knowledge/keep-agent-code-changes-behind-a-branch-and-pull-request",
  "id": "MHC-D-RESEARCH-0653",
  "version": "0.1.0",
  "title": "Keep agent code changes behind a branch and pull request",
  "summary": "A reviewable boundary is cheaper than reconstructing an autonomous overwrite.",
  "kind": "protocol",
  "body": "Route nontrivial agent changes through a dedicated branch and pull request. Preserve the diff, checks and human review before merge. Protect the default branch with the same or stronger controls used for human contributions; AI authorship is not a bypass category.",
  "limits": [
    "Emergency processes may differ, but bypasses should be explicit, authorized and auditable rather than the default agent path."
  ],
  "topics": [
    "union-ai-assisted-coding-safeguards"
  ],
  "intents": [],
  "source_ids": [
    "RS-AF6C3AA11CD6EA39",
    "RS-F8FE84C698B3B53A"
  ],
  "evidence": [
    {
      "claim": "GitHub documentation says Copilot agent pull requests should receive the same thorough review as other contributions and warns reviewers to inspect workflow changes before allowing privileged Actions runs.",
      "source_id": "RS-AF6C3AA11CD6EA39",
      "role": "supports",
      "note": "This is GitHub-specific implementation guidance; the general pattern is independent review before privileged execution.",
      "locator": "Review Copilot's changes; Manage GitHub Actions workflow runs"
    },
    {
      "claim": "NIST SSDF recommends integrating secure development practices into the software lifecycle rather than treating security as a separate late-stage review.",
      "source_id": "RS-F8FE84C698B3B53A",
      "role": "supports",
      "note": "The framework is high-level and must be tailored to the organization's development model and risk.",
      "locator": "SSDF overview"
    }
  ],
  "use_when": [
    "An agent can write directly to the shared default branch."
  ],
  "avoid_when": [
    "Emergency processes may differ, but bypasses should be explicit, authorized and auditable rather than the default agent path."
  ],
  "example": "The agent opens a PR for a dependency fix rather than committing directly to main, even when the patch is only three lines.",
  "check": "The default branch cannot receive the agent's nontrivial change without the normal review boundary.",
  "steps": [
    "Change has an isolated branch.",
    "Full diff is visible.",
    "Required checks run.",
    "Human review occurs.",
    "Protected branch rules still apply.",
    "Merge is explicit."
  ],
  "sources": [
    {
      "id": "RS-AF6C3AA11CD6EA39",
      "title": "Review output from Copilot",
      "url": "https://docs.github.com/en/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output"
    },
    {
      "id": "RS-F8FE84C698B3B53A",
      "title": "Secure Software Development Framework (SSDF) Version 1.1",
      "url": "https://csrc.nist.gov/pubs/sp/800/218/final"
    }
  ],
  "relations": [
    {
      "from": "MHC-D-RESEARCH-0653",
      "to": "MHC-D-RESEARCH-0657",
      "type": "use_before",
      "url": "/knowledge/review-the-file-list-before-reading-the-agent-s-explanation"
    }
  ],
  "collections": [
    {
      "id": "RC-E25DB1788236EF13",
      "title": "Let coding agents move fast inside a reviewable security boundary",
      "url": "/collections/let-coding-agents-move-fast-inside-a-reviewable-security-boundary"
    }
  ]
}
