AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-495
  5. plan
  6. prd.json
prd.json(1.4 KB)ยท Apr 14, 2026
{
  "issueNumber": 495,
  "branchName": "fix/495-token-usage-recording",
  "generatedAt": "2026-04-14T12:00:00Z",
  "stories": [
    {
      "id": "S1",
      "title": "Wire TokenUsageModule into InvokeModule",
      "priority": 1,
      "dependsOn": [],
      "acceptanceCriteria": [
        "TokenUsageModule is listed in InvokeModule imports array",
        "Application compiles without circular dependency errors"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S2",
      "title": "Inject TokenUsageService and call record() in InvocationResultListener",
      "priority": 2,
      "dependsOn": [
        "S1"
      ],
      "acceptanceCriteria": [
        "TokenUsageService is lazy-loaded via ModuleRef in onModuleInit()",
        "record(taskId, phase, usage) is called when result.usage is non-null",
        "record() is not called when usage is null or missing"
      ],
      "passes": false,
      "completedAt": null
    },
    {
      "id": "S3",
      "title": "Add unit test for token usage recording in InvocationResultListener",
      "priority": 3,
      "dependsOn": [
        "S2"
      ],
      "acceptanceCriteria": [
        "Test asserts record() is called with correct taskId, phase, and usage payload",
        "Test asserts record() is not called when usage is null",
        "npm run test passes"
      ],
      "passes": false,
      "completedAt": null
    }
  ]
}
PlanPr description