{
"issueNumber": 533,
"branchName": "feat/533-agents-md-via-pr",
"generatedAt": "2026-04-16T12:00:00Z",
"stories": [
{
"id": "S1",
"title": "Add createBranch, getDefaultBranchSha, and enableAutoMerge methods to GitHubService with unit tests",
"priority": 1,
"dependsOn": [],
"acceptanceCriteria": [
"createBranch calls POST /repos/{owner}/{repo}/git/refs with correct ref and SHA",
"createBranch handles 422 (branch exists) by deleting and recreating",
"getDefaultBranchSha resolves default branch name and HEAD SHA",
"enableAutoMerge calls GraphQL enablePullRequestAutoMerge with SQUASH method",
"enableAutoMerge catches errors gracefully when auto-merge is not enabled on the repo",
"All three methods have unit tests in github.service.spec.ts"
],
"passes": false,
"completedAt": null
},
{
"id": "S2",
"title": "Refactor CompoundService.writeLearnings to use branch+PR+auto-merge flow instead of direct commit",
"priority": 2,
"dependsOn": [
"S1"
],
"acceptanceCriteria": [
"writeLearnings creates a branch (agents-md/issue-{N}), commits AGENTS.md to it, opens a PR, and enables auto-merge",
"Direct createOrUpdateFile to default branch is removed",
"Existing AGENTS.md content is fetched from default branch and appended correctly",
"New AGENTS.md (file doesn't exist) is handled correctly",
"compound.service.spec.ts tests updated to verify PR flow",
"npm run test passes",
"npm run lint passes",
"npm run build succeeds"
],
"passes": false,
"completedAt": null
}
]
}