{
"issueNumber": 546,
"branchName": "rc/atlassian-integration",
"generatedAt": "2026-04-23T17:15:00Z",
"stories": [
{
"id": "S1",
"title": "Extend PlatformAdapter interface with optional context arg and update GitHubAdapter signature.",
"priority": 1,
"dependsOn": [],
"acceptanceCriteria": [
"platform-adapter.interface.ts declares optional context?: { clientIp?: string; query?: Record<string,string> }",
"GitHubAdapter compiles with new signature and all existing unit tests still pass"
],
"passes": false,
"completedAt": null
},
{
"id": "S2",
"title": "Extend DispatchEventType union with pr_updated, approved, changes_requested, push.",
"priority": 2,
"dependsOn": [],
"acceptanceCriteria": [
"DispatchEventType union includes the four new values",
"tsc --noEmit passes across the repo"
],
"passes": false,
"completedAt": null
},
{
"id": "S3",
"title": "Implement BitbucketAdapter with verifySignature and normalize for 7 event types.",
"priority": 3,
"dependsOn": [
"S1",
"S2"
],
"acceptanceCriteria": [
"Class implements PlatformAdapter with platform='bitbucket'",
"verifySignature throws UnauthorizedException on bad secret or IP outside allowlist; no-op on success",
"normalize maps all 7 X-Event-Key values to correct DispatchEvent types",
"Unknown X-Event-Key returns { event: null, reason }",
"Comment events from bot user are filtered out; /agentsde (and legacy /agent) emit directive events"
],
"passes": false,
"completedAt": null
},
{
"id": "S4",
"title": "Register BitbucketAdapter in WebhookModule and add POST /webhooks/bitbucket handler.",
"priority": 4,
"dependsOn": [
"S3"
],
"acceptanceCriteria": [
"WebhookModule.onModuleInit registers both GitHubAdapter and BitbucketAdapter",
"POST /webhooks/bitbucket returns 401 when ?secret is missing/wrong",
"Valid payload returns 200 and enqueues via DispatchService",
"WebhookDeliveryEntity is persisted with source='bitbucket'"
],
"passes": false,
"completedAt": null
},
{
"id": "S5",
"title": "Add Bitbucket env vars to config.schema.ts, .env.example, and CLAUDE.md.",
"priority": 5,
"dependsOn": [
"S4"
],
"acceptanceCriteria": [
"Joi schema declares BITBUCKET_WEBHOOK_SECRET and BITBUCKET_WEBHOOK_IP_ALLOWLIST as optional strings",
".env.example contains both entries with inline comments",
"CLAUDE.md environment variables table lists both new vars"
],
"passes": false,
"completedAt": null
},
{
"id": "S6",
"title": "Write bitbucket.adapter.spec.ts covering auth + normalize paths.",
"priority": 6,
"dependsOn": [
"S3"
],
"acceptanceCriteria": [
"verifySignature: valid secret, bad secret, missing secret, allowlist hit, allowlist miss, no allowlist configured",
"normalize: one test per X-Event-Key (7 total) + unknown key + bot self-filter + /agentsde directive on PR comment",
"npm run test passes with the new spec file"
],
"passes": false,
"completedAt": null
}
]
}