Skip to content

Add progress data to builder overview #327

Description

@waleedkadous

Parent: #323

Task

Enhance builder overview API to include progress percentage, plan phase tracking, and blocked state.

Enhance parseStatusYaml() to also extract:

  • planPhases: Array<{ id: string; title: string; status: string }> — from plan_phases: YAML block
  • protocol: string — already parsed

Enhance BuilderOverview interface with new fields:

exportinterfaceBuilderOverview{// ... existing fields ...protocol: string;planPhases: Array<{id: string;title: string;status: string}>;progress: number;// 0-100 percentageblocked: string|null;// null or gate name: "spec review", "plan review", "PR review"}

Add calculateProgress() function:

SPIR has 4 phases: specify → plan → implement → review → complete

phase valueBase %Sub-progress
specify0-25%If gate pending+requested → stuck at 20%
plan25-50%If gate pending+requested → stuck at 45%
implement50-90%50% + (completed_plan_phases / total_plan_phases) × 40%
review90-100%If gate pending+requested → stuck at 95%
complete100%Done

Blocked detection:

  • Check each gate: if status === 'pending' → check if requested_at exists
  • If requested but not approved → blocked on that gate
  • Map gate names: spec-approval → "spec review", plan-approval → "plan review", pr-ready → "PR review"

Dependencies

Depends on #326 (fix discoverBuilders — needs correct project matching first)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    projectNew project or feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions