Skip to content

feat: Task history + sub-tasks — persistence, hierarchy, scope inheritance #111

@Abernaughty

Description

@Abernaughty

Summary

Implement persistent task history with summary details for completed tasks, and sub-task creation with scope/context inheritance. Enables the key workflow: PR review feedback → create sub-task to address it.

Context

Per the Dashboard Workflow Roadmap, Section 8. Currently, task state is ephemeral — when a task completes, its data is only in memory/SSE. This adds persistence and hierarchy.

Design

Task History

Persistent record for each completed task:

Sub-Task Creation

Sub-tasks can be created from completed tasks, inheriting context:

  • Scope inheritance: Same workspace or narrower. Cannot widen scope beyond parent's workspace unless wider scope is in approved directories list.
  • Context inheritance: Sub-task Architect receives parent task's blueprint + QA verdict + files as L1 memory context.
  • PR review → sub-task: Natural workflow for addressing PR feedback — create sub-task from PR review, inherit parent task scope, Architect sees review comments.

Data Model

class TaskRecord(TypedDict):
    task_id: str
    parent_task_id: str | None   # Enables hierarchy
    objective: str
    workspace: str
    status: str                  # completed, failed, escalated
    duration_seconds: float
    total_cost: float
    blueprint_summary: dict
    acceptance_results: list[dict]
    output_artifacts: list[dict]  # files, PRs, commands
    created_at: str
    completed_at: str

Sub-tasks appear nested under parent in task history view.

Storage

  • Phase 2: Local JSON or SQLite
  • Phase 3: Migrate to persistent database alongside pgvector

Acceptance Criteria

  • Task history persistence (all completed tasks saved)
  • Task history UI in dashboard — list view with summary cards
  • Click-to-expand detail view for each historical task
  • parent_task_id field on task model
  • Sub-task creation flow: "Create sub-task" button on completed tasks
  • Scope inheritance enforcement (same or narrower workspace)
  • Context inheritance: parent blueprint + QA verdict passed to sub-task Architect as L1 memory
  • PR review → sub-task creation workflow
  • Nested display of sub-tasks under parent in history
  • Search/filter task history by workspace, status, date

Dependencies

Effort

Large (2-3 sessions)

Source

Dashboard Workflow Roadmap, Section 8 — Task History & Sub-Tasks

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions