{
"issueNumber": 547,
"branchName": "rc/atlassian-integration",
"generatedAt": "2026-04-23T17:11:32Z",
"stories": [
{
"id": "S1",
"title": "Extract verifyHmacSha256 to src/webhook/crypto.ts and refactor GitHubAdapter",
"priority": 1,
"dependsOn": [],
"acceptanceCriteria": [
"crypto.ts exports verifyHmacSha256(rawBody, header, secret, prefix) that throws UnauthorizedException on missing/invalid signature",
"GitHubAdapter.verifySignature delegates to the helper with prefix 'sha256='",
"Existing github.adapter.spec.ts suites pass unchanged"
],
"passes": false,
"completedAt": null
},
{
"id": "S2",
"title": "Extend DispatchEventType + platform union; add JIRA_WEBHOOK_SECRET config",
"priority": 2,
"dependsOn": [],
"acceptanceCriteria": [
"DispatchEventType includes 'issue_updated' and 'link_created'",
"'jira' is a member of the platform union in dispatch-event.dto.ts",
"JIRA_WEBHOOK_SECRET is optional in config.schema.ts and documented in .env.example + CLAUDE.md env table",
"npm run build passes"
],
"passes": false,
"completedAt": null
},
{
"id": "S3",
"title": "Implement JiraAdapter with HMAC verify and 5-event normalize",
"priority": 3,
"dependsOn": [
"S1",
"S2"
],
"acceptanceCriteria": [
"JiraAdapter implements PlatformAdapter with platform='jira'",
"verifySignature uses the shared helper and JIRA_WEBHOOK_SECRET",
"normalize maps jira:issue_created → intake, jira:issue_updated → issue_updated (inspects changelog for label transitions), jira:issue_deleted → task_cancelled, comment_created|comment_updated → issue_comment, jira:issuelink_created → link_created",
"Unknown webhookEvent returns { event: null, reason } — does not throw",
"jira.adapter.spec.ts covers all 5 events + bad/missing signature + unknown event"
],
"passes": false,
"completedAt": null
},
{
"id": "S4",
"title": "Add POST /webhooks/jira route + JiraAdapter registration + controller tests",
"priority": 4,
"dependsOn": [
"S3"
],
"acceptanceCriteria": [
"POST /webhooks/jira returns 401 on bad/missing x-hub-signature",
"Valid payload returns 200 and dispatches via DispatchService",
"WebhookDeliveryEntity persisted with source='jira'",
"JiraAdapter registered alongside GitHubAdapter in WebhookModule.onModuleInit()",
"webhook.controller.spec.ts covers the jira route scenarios",
"npm run test and npm run lint pass with zero warnings"
],
"passes": false,
"completedAt": null
}
]
}