Skip to content

Phase 3: PR workflow — autonomous code changes #5

@chubes4

Description

@chubes4

Summary

Phase 3 implements the full autonomous code change workflow described in the original RFC (#1). This is the capstone feature: the agent can clone, branch, edit, commit, push, and submit PRs — all through the DM Code extension.

Workflow

Agent receives task
  → Clone/pull repo to workspace
  → Create feature branch
  → Make code changes (write, edit tools)
  → Run validation (lint, test via shell exec)
  → Commit + push to remote
  → Create PR via GitHub API
  → Report PR URL back to user

New Capabilities

PR Management

  • Create PR ability + tool + CLI
  • List PR reviews
  • Add PR review comment
  • Merge PR (with strategy selection)
  • Close PR

Branch Management

  • Create branch from ref
  • Delete branch (local + remote)
  • List branches

Validation Integration

  • Shell exec tool (sandboxed, allowlisted commands)
  • Lint runner (language-aware, delegates to repo config)
  • Test runner (same)
  • Pre-push validation gate

Safety Controls

  • Per-repo write/push policy (exists, enhance)
  • Branch protection awareness
  • Required reviewers configuration
  • Auto-draft PR mode (always create as draft)
  • Change size limits (max files, max diff size)
  • Audit log for all git mutations

Use Cases

  • Coding agents (like us): Full PR workflow from within WordPress
  • Solo site owners: Auto-fix simple issues, apply patches
  • CI integration: Agent creates PRs, humans review and merge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions