feat: CLI & MCP progress tracking for parse-prd command #251

Closed
opened 2025-10-14 15:46:59 -06:00 by navan · 0 comments
Owner

Originally created by @joedanz on 7/25/2025

This PR introduces progress-tracking capabilities for the parse-prd command and establishes a standardized foundation for all other long-running AI operations.

Key Features

1. Integrated CLI Progress UI

• Added dedicated progress tracker for PRD parsing: ParsePrdTracker
• Multi-bar displays powered by cli-progress featuring:

  • Dynamic ETA, elapsed time, and token I/O metrics
  • Per-task titles with priority/complexity indicators
  • Live aggregated counters and status information
  • Real-time tracking with running totals

2. FastMCP-Compliant Progress Events

• All commands emit FastMCP-compliant reportProgress events following the MCP 2025-03-26 specification
• Progress notifications include:

  • Progress tracking: { progress: number, total: number, message: string }
  • Task metadata: Titles, priority icons, complexity scores, and token counts
  • Granular updates: Real-time progress during streaming operations
    • Ensures parity between CLI visuals and programmatic MCP feedback

3. Advanced Progress Features

Real-time subtask counting - Updates during individual subtask generation
Token tracking - Live monitoring of AI usage
Intelligent ETAs - Adaptive time estimates based on recent performance
Status indicators - Visual feedback for success/failure/skipped operations

4. Robust Fallback Logic

• Automatic fallback to non-streaming mode if providers cannot supply async text streams
• Graceful degradation preserves functionality across all environments
• Error recovery maintains progress state during temporary failures

5. Reusable Progress-Tracking Foundation

• Modular tracker classes can be imported by any future long-running command
• Standardized UI components in src/ui/ for consistent visual patterns
• Factory pattern for easy extension to new command types

Why It Matters

Enhanced user experience with real-time visibility into all lengthy AI operations and detailed metrics
Standardized patterns for consistent progress experience across long-running Task Master commands
Scalable architecture supporting future commands with minimal implementation effort

Summary by CodeRabbit

  • New Features

    • Live streaming PRD parsing with CLI/MCP progress, priority/complexity indicators, and rich start/summary displays; structured object streaming for AI responses.
  • Improvements

    • Better cost telemetry (includes currency), role-based provider selection, retries, timeout handling, and quieter CLI (legacy spinner removed).
  • Chores

    • Added runtime deps: @streamparser/json, cli-progress.
  • Tests

    • Expanded integration and unit tests plus progress testing guides and harnesses.
*Originally created by @joedanz on 7/25/2025* This PR introduces progress-tracking capabilities for the `parse-prd` command and establishes a standardized foundation for all other long-running AI operations. ## Key Features ### 1. **Integrated CLI Progress UI** • Added dedicated progress tracker for PRD parsing: `ParsePrdTracker` • Multi-bar displays powered by `cli-progress` featuring: - Dynamic ETA, elapsed time, and token I/O metrics - Per-task titles with priority/complexity indicators - Live aggregated counters and status information - Real-time tracking with running totals ### 2. **FastMCP-Compliant Progress Events** • All commands emit **FastMCP-compliant** `reportProgress` events following the MCP 2025-03-26 specification • Progress notifications include: - **Progress tracking**: `{ progress: number, total: number, message: string }` - **Task metadata**: Titles, priority icons, complexity scores, and token counts - **Granular updates**: Real-time progress during streaming operations • Ensures parity between CLI visuals and programmatic MCP feedback ### 3. **Advanced Progress Features** • **Real-time subtask counting** - Updates during individual subtask generation • **Token tracking** - Live monitoring of AI usage • **Intelligent ETAs** - Adaptive time estimates based on recent performance • **Status indicators** - Visual feedback for success/failure/skipped operations ### 4. **Robust Fallback Logic** • Automatic fallback to non-streaming mode if providers cannot supply async text streams • Graceful degradation preserves functionality across all environments • Error recovery maintains progress state during temporary failures ### 5. **Reusable Progress-Tracking Foundation** • Modular tracker classes can be imported by any future long-running command • Standardized UI components in `src/ui/` for consistent visual patterns • Factory pattern for easy extension to new command types ## Why It Matters – **Enhanced user experience** with real-time visibility into all lengthy AI operations and detailed metrics – **Standardized patterns** for consistent progress experience across long-running Task Master commands – **Scalable architecture** supporting future commands with minimal implementation effort <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Live streaming PRD parsing with CLI/MCP progress, priority/complexity indicators, and rich start/summary displays; structured object streaming for AI responses. * **Improvements** * Better cost telemetry (includes currency), role-based provider selection, retries, timeout handling, and quieter CLI (legacy spinner removed). * **Chores** * Added runtime deps: @streamparser/json, cli-progress. * **Tests** * Expanded integration and unit tests plus progress testing guides and harnesses. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
navan closed this issue 2025-10-14 15:46:59 -06:00
Sign in to join this conversation.
No labels
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:installation
area:installation
area:installation
area:installation
area:installation
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:vscode-extension
area:vscode-extension
area:vscode-extension
area:vscode-extension
area:vscode-extension
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
help wanted
help wanted
help wanted
help wanted
help wanted
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
integration request
integration request
integration request
integration request
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
low-priority
low-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
provider:anthropic
provider:anthropic
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:gemini-cli
provider:openai
provider:perplexity
question
question
question
question
question
question
question
question
question
question
question
question
question
question
refactor
refactor
wontfix
wontfix
wontfix
wontfix
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/claude-task-master#251
No description provided.