AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-443
  5. plan
  6. prd.json
prd.json(1.6 KB)· Apr 13, 2026
{
  "issueNumber": 443,
  "branchName": "feat/443-event-bus-service",
  "generatedAt": "2026-04-13T00:00:00Z",
  "stories": [
    {
      "id": "S1",
      "title": "Create typed event map and EventBusService with Redis pub/sub",
      "priority": 1,
      "dependsOn": [],
      "acceptanceCriteria": [
        "event-bus.events.ts defines EventMap with all 6 event names and typed payloads",
        "EventBusService.emit() publishes to Redis channel with agentsde:events: prefix",
        "EventBusService.emit() catches Redis errors, logs, and swallows — never throws",
        "EventBusService.on() subscribes and dispatches to registered handlers",
        "Multiple handlers per event all invoked; error in one does not crash others",
        "onModuleDestroy() gracefully quits both pub and sub Redis connections"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S2",
      "title": "Create @Global() EventBusModule, register in AppModule, add unit tests",
      "priority": 2,
      "dependsOn": [
        "S1"
      ],
      "acceptanceCriteria": [
        "EventBusModule is @Global() and exports EventBusService",
        "Module factory-provides two ioredis clients from REDIS_HOST/REDIS_PORT/REDIS_DB config",
        "EventBusModule imported in AppModule",
        "Unit tests cover: emit publishes, handler receives, multi-handler, error isolation, emit swallows errors, onModuleDestroy quits clients",
        "npm run build passes",
        "npm run test passes",
        "npm run lint passes with zero warnings"
      ],
      "passes": false,
      "completedAt": null
    }
  ]
}
PlanPr description