## 1. Trace Query API - [x] 1.1 Add a `DiagnosisTraceResponse` DTO that represents session summary, ordered agent steps, ordered tool invocations, and derived summary counts. - [x] 1.2 Add `DiagnosisTraceService` that loads `DiagnosisSession`, `AgentStep`, and `ToolInvocation` records by session id and builds the response. - [x] 1.3 Add `DiagnosisTraceController` with `GET /api/diagnosis/{sessionId}/trace`. - [x] 1.4 Return 404 through `SessionNotFoundException` when the requested diagnosis session does not exist. ## 2. Demo Profile And Acceptance Case - [x] 2.1 Add `src/main/resources/application-mvp-demo.yml` with MVP demo profile overlays and mock logs/metrics enabled. - [x] 2.2 Add `mvp/demo/README.md` documenting prerequisites, startup, chat request, trace query, and feedback submission. - [x] 2.3 Add a concrete payment-timeout acceptance case with request/response expectations. ## 3. Tests And Verification - [x] 3.1 Add focused unit tests for `DiagnosisTraceService` success and missing-session behavior. - [x] 3.2 Run targeted tests for the new trace service. - [x] 3.3 Run compile verification. - [x] 3.4 Run GitNexus change detection before commit or handoff. ## 4. Notes And Flow Records - [x] 4.1 Update MVP engineering notes with the demo/trace decision. - [x] 4.2 Update OpenSpec tasks as work completes. - [x] 4.3 Record verification results in devflow acceptance notes.