Skip to content

TASK-002: Implement Persistent Run History

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:

  1. TASK-002A: History Contracts and State Extension
  2. TASK-002B: File-Backed History Store
  3. TASK-002C: Startup Hydration and Workflow Persistence Integration
  4. TASK-002D: History UI Projection
  5. 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.

Docs-first project memory for AI-assisted implementation.