TASK-002: Implement Persistent Run History
- Status: Ready
- Date: 2026-04-14
- Spec: SLICE-002: Persistent Run History
- ADRs: ADR-001: Use Central App State Store, ADR-002: File-Backed Run History Store Before Database Persistence
Objective
Extend the first slice so run summaries survive app restarts and can be reviewed as a history list rather than only as the most recent summary.
Scope
- add a history abstraction in the application layer
- implement a file-backed JSON history store in infrastructure
- load persisted history on startup
- persist terminal run summaries into history
- extend app state with run history
- add a minimal UI surface for recent history
- add tests for hydration, persistence, ordering, duplication, and corruption handling
Non-Scope
- database persistence
- analytics or reporting
- advanced filtering or export
- large-scale retention management
AI Tool Guidance
Do not hand this whole task to one AI chat.
Use the smaller task pack for implementation:
- TASK-002A: History Contracts and State Extension
- TASK-002B: File-Backed History Store
- TASK-002C: Startup Hydration and Workflow Persistence Integration
- TASK-002D: History UI Projection
- TASK-002E: Tests and Corruption Handling Verification
The recommended order, cost guidance, and copy/paste prompts are documented in SLICE-002 Task Pack.
Acceptance Criteria Mapping
The implementation must satisfy all acceptance criteria from SLICE-002.