Skip to content

feat: agent controller L2 - verify and propose (draft PR) #2580

Open

Description

@codeforester

Goal

After the external agent implements, run verification and open a draft PR that passes preflight.

Background

Second slice of the loop contract. Uses PR preflight (#2570) so the loop does not recreate the superseded-PR churn measured on 2026-10-14.

Next-release planning review of 2026-10-14/15 against main at 7faf6dfb. Tracking: #2555.

Prerequisites: #2578, #2570.

Scope

  • Run issue-declared validation plus basectl check and basectl test for the touched project.
  • Collect evidence into the ledger; refuse to propose on failing verification.
  • Run PR preflight, then create a draft PR with the evidence in the body and the loop run ID.
  • Enforce path allow/deny and files-touched limits from the issue assignment.

Acceptance Criteria

  • A fixture run proposes a draft PR only with passing verification and clean preflight.
  • A path outside the allow-list stops the run with a clear finding.
  • PR body contains validation evidence per the PR contract.

Validation

bats <new controller BATS file>
shellcheck <changed shell files>
python -m pytest <new controller tests>
env -u BASE_HOME ./bin/base-test
git diff --check

Non-Goals

  • Does not merge.
  • Does not mark the PR ready for review.

Project Fields

  • Status: Backlog
  • Priority: P1
  • Area: CLI
  • Initiative: Agentic Coding Platform
  • Size: M
  • Milestone: v1.13.0
  • Category: enhancement

Agent Assignment

Assignee: codeforester. Blocked on #2578 and #2570.

Plan revision (2026-10-16)

Keep this in v1.13.0. Add prerequisites #2579, #2571, #2572, #2582, #2599, and #2602 in addition to #2578 and #2570. The controller may create a draft PR only after the claim/readback, structured issue/PR gates, replayable evidence, authority checks, and crash-safe ledger contract are available. A failing, stale, ambiguous, or unredacted result must stop the run; a draft PR is never a merge or release authorization.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Projects

  • Status
    Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions