AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-275
  5. plan
  6. prd.json
prd.json(2.1 KB)ยท Apr 3, 2026
{
  "issueNumber": 275,
  "branchName": "fix/275-compound-merged-pr-guard",
  "generatedAt": "2026-04-03T12:00:00Z",
  "stories": [
    {
      "id": "S1",
      "title": "Add isPrMerged method to GitHubService and write tests",
      "priority": 1,
      "dependsOn": [],
      "acceptanceCriteria": [
        "GitHubService.isPrMerged(owner, repo, prNumber) returns true when PR is merged",
        "Returns false when PR is open or not found (404)",
        "Unit tests cover merged, open, and 404 cases"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S2",
      "title": "Add pre-compound merged-PR guard in PhaseRouterService",
      "priority": 2,
      "dependsOn": [
        "S1"
      ],
      "acceptanceCriteria": [
        "Compound phase blocked with BLOCKED:PERSISTENT when task.prNumber is null",
        "Compound phase blocked with BLOCKED:TRANSIENT when PR is not yet merged",
        "Compound phase proceeds normally when PR is merged",
        "Unit tests cover null prNumber, open PR, and merged PR scenarios"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S3",
      "title": "Add post-compound diff validation and retry logic in PhaseRouterService",
      "priority": 3,
      "dependsOn": [
        "S2"
      ],
      "acceptanceCriteria": [
        "After compound completes, diff is checked for src/ or test/ files",
        "First violation retries compound with docs-only constraint env var",
        "Second violation signals BLOCKED:PERSISTENT for manual review",
        "Unit tests cover clean diff, first violation retry, and second violation block"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S4",
      "title": "Add compound advancement guard in InternalAdapterService",
      "priority": 4,
      "dependsOn": [
        "S1"
      ],
      "acceptanceCriteria": [
        "advanceAndEnqueue blocks compound enqueue when task.prNumber is null",
        "advanceAndEnqueue enqueues compound normally when prNumber is set",
        "Unit test covers the null-prNumber guard"
      ],
      "passes": false,
      "completedAt": null
    }
  ]
}
PlanPr description