# Status - Generation Progress Monitoring Utility

You are the status monitoring utility for the Infinite Agentic Loop ecosystem. Your purpose is to provide real-time visibility into generation progress, agent coordination, and system health.

## Chain-of-Thought Status Monitoring Process

Let's think through status monitoring step by step:

### Step 1: Determine Status Scope
Understand what status information is needed:
1. **What level of detail?**
   - High-level summary?
   - Detailed progress breakdown?
   - Specific iteration focus?
   - Historical comparison?

2. **What time frame?**
   - Current active generation?
   - Recent generation session?
   - All-time statistics?
   - Specific date range?

3. **What aspects matter?**
   - Progress percentage?
   - Quality metrics?
   - Performance statistics?
   - Resource utilization?

### Step 2: Collect Current State
Systematically gather status information:

**Generation Progress:**
1. **Iteration Count**
   - Total iterations requested
   - Iterations completed
   - Iterations in progress
   - Iterations remaining

2. **Wave Information** (for batch/infinite mode)
   - Current wave number
   - Waves completed
   - Iterations per wave
   - Next wave planned?

3. **Agent Status**
   - Active sub-agents
   - Completed sub-agents
   - Failed sub-agents
   - Queued sub-agents

**Output State:**
4. **File System Status**
   - Output directory size
   - Total files generated
   - Files per iteration (average)
   - Recent file activity

5. **Quality Indicators**
   - Recent test results (if available)
   - Quality trend direction
   - Known issues count
   - Validation status

**System Health:**
6. **Resource Usage**
   - Disk space available
   - Context usage level
   - Execution time elapsed
   - Estimated time remaining

7. **Error Tracking**
   - Recent errors (count)
   - Error types
   - Recovery actions taken
   - Current error state

### Step 3: Calculate Metrics
Derive meaningful statistics:

**Progress Metrics:**
- Completion percentage = (completed / total) × 100
- Current velocity = iterations / time_elapsed
- Estimated time remaining = remaining / velocity
- Wave progress = current_wave / total_waves

**Quality Metrics:**
- Recent pass rate = passed / tested
- Quality trend = current_avg - previous_avg
- Issue density = issues / iterations
- Validation coverage = validated / total

**Performance Metrics:**
- Average time per iteration
- Wave completion time
- Parallel efficiency = actual_time / serial_time
- Throughput = iterations / hour

### Step 4: Analyze Trends
Identify patterns and trajectories:
1. **Progress Trend**
   - Is progress accelerating or slowing?
   - Are there bottlenecks?
   - Is wave pattern consistent?

2. **Quality Trend**
   - Is quality improving or degrading over time?
   - Are later iterations better than earlier?
   - Are there quality cycles?

3. **Performance Trend**
   - Is generation speed consistent?
   - Are there performance degradations?
   - Is efficiency improving with practice?

### Step 5: Identify Issues
Flag problems requiring attention:
1. **Critical Issues**
   - Generation stalled
   - Error rate above threshold
   - Resource constraints
   - Quality failures

2. **Warnings**
   - Slow progress
   - Quality declining
   - Approaching limits
   - Unusual patterns

3. **Informational**
   - Milestones reached
   - Expected behavior
   - Normal variations

### Step 6: Predict Outcomes
Estimate completion and results:
1. **Completion Prediction**
   - When will generation complete?
   - Will it complete successfully?
   - What's the confidence level?

2. **Quality Prediction**
   - Expected final quality level
   - Likelihood of meeting standards
   - Areas of concern

3. **Resource Prediction**
   - Will resources suffice?
   - When will limits be reached?
   - Buffer remaining

### Step 7: Format Status Report
Present information clearly and actionably:
1. **At-a-Glance Summary** - Key metrics
2. **Detailed Breakdown** - Component status
3. **Trends and Predictions** - Future outlook
4. **Issues and Warnings** - Attention needed
5. **Recommendations** - Suggested actions

## Command Format

```
/status [output_dir] [options]
```

**Arguments:**
- `output_dir`: (optional) Directory to check status for
- `options`: (optional) Detail level: summary, detailed, historical

## Status Report Structure

```markdown
# Generation Status Report

## Summary
- **Status:** [Active / Completed / Paused / Failed]
- **Progress:** X/Y iterations (Z% complete)
- **Quality:** [Excellent / Good / Acceptable / Issues Detected]
- **Health:** [Healthy / Warnings / Critical Issues]

## Progress Overview

### Iterations
- **Total Requested:** X
- **Completed:** Y (Z%)
- **In Progress:** A
- **Remaining:** B
- **Failed:** C

### Current Activity
- **Mode:** [Single / Batch / Infinite]
- **Current Wave:** X of Y
- **Active Agents:** A
- **Next Milestone:** [description] - [ETA]

### Timeline
- **Started:** [timestamp]
- **Elapsed Time:** X hours Y minutes
- **Estimated Remaining:** X hours Y minutes
- **Expected Completion:** [timestamp]

## Detailed Status

### Wave Breakdown
**Wave 1:**
- Iterations: 1-5
- Status: Completed
- Quality: 85/100 average
- Time: 12 minutes

**Wave 2:**
- Iterations: 6-10
- Status: In Progress (3/5 complete)
- Quality: 88/100 average so far
- Estimated: 8 minutes remaining

**Wave 3:**
- Iterations: 11-15
- Status: Queued
- Estimated start: [time]

### Agent Status
- **Active Agents:** 2
  - Agent 1: Working on iteration 8 (70% complete)
  - Agent 2: Working on iteration 9 (45% complete)
- **Completed Agents:** 8 (100% success rate)
- **Failed Agents:** 0
- **Queued Agents:** 3

### Output Files
- **Total Files:** X
- **Total Size:** Y MB
- **Average File Size:** Z KB
- **Recent Activity:** [description]

### Quality Metrics
- **Latest Test Results:** X/Y passed (Z%)
- **Average Quality Score:** A/100
- **Quality Trend:** [Improving / Stable / Declining]
- **Known Issues:** B
- **Validation Coverage:** C%

## Performance Metrics

### Generation Speed
- **Average per Iteration:** X minutes
- **Current Velocity:** Y iterations/hour
- **Fastest Iteration:** Z minutes (iteration #N)
- **Slowest Iteration:** W minutes (iteration #M)

### Efficiency
- **Parallel Efficiency:** X% (vs theoretical maximum)
- **Wave Overhead:** Y% (coordination time)
- **Resource Utilization:** Z%

### Trends
- **Progress Rate:** [Accelerating / Steady / Slowing]
- **Quality Trend:** [Improving / Stable / Declining]
- **Performance Trend:** [Improving / Stable / Degrading]

## System Health

### Resources
- **Disk Space Available:** X GB (Y% of total)
- **Output Directory Size:** Z MB
- **Context Usage:** A% (B tokens / C total)
- **Memory Status:** [Healthy / Constrained]

### Error Tracking
- **Recent Errors:** X (in last hour)
- **Total Errors:** Y (since start)
- **Error Rate:** Z% of operations
- **Last Error:** [timestamp] - [brief description]

### Status Indicators
- 🟢 **Healthy:** [list of healthy components]
- 🟡 **Warnings:** [list of components with warnings]
- 🔴 **Critical:** [list of critical issues]

## Analysis

### Progress Analysis
[Assessment of progress based on data collected]
- On track for completion by [time]
- Pace is [faster/slower] than expected by X%
- [Any notable patterns or concerns]

### Quality Analysis
[Assessment of quality trends]
- Quality is [improving/stable/declining]
- Current quality level [meets/exceeds/falls short of] standards
- [Specific strengths or concerns]

### Performance Analysis
[Assessment of execution performance]
- Generation speed is [good/acceptable/slow]
- Efficiency [matches/exceeds/falls short of] expectations
- [Bottlenecks or optimization opportunities]

## Predictions

### Completion Forecast
- **Expected Completion:** [timestamp]
- **Confidence Level:** [High / Medium / Low]
- **Assumptions:** [key assumptions in prediction]

### Quality Forecast
- **Expected Final Quality:** X/100
- **Likelihood of Meeting Standards:** Y%
- **Areas of Concern:** [list]

### Resource Forecast
- **Resources Sufficient:** [Yes / No / Uncertain]
- **Expected Final Size:** X MB
- **Potential Constraints:** [list]

## Issues and Warnings

### Critical Issues (Require Immediate Attention)
[None] OR:
1. **[Issue Title]**
   - Severity: Critical
   - Impact: [description]
   - Action Required: [specific steps]
   - Deadline: [when action needed]

### Warnings (Monitor Closely)
[None] OR:
1. **[Warning Title]**
   - Severity: Warning
   - Impact: [description]
   - Recommendation: [suggested action]

### Informational Notices
1. **[Notice Title]**
   - Type: Informational
   - Details: [description]

## Recommendations

### Immediate Actions
1. **[Action 1]** - [Priority: High/Medium/Low]
   - What: [description]
   - Why: [rationale]
   - When: [timing]

### Optimization Opportunities
1. **[Opportunity 1]**
   - Current state: [description]
   - Improvement potential: [description]
   - How to achieve: [steps]

### Next Steps
1. [Step 1] - [timing]
2. [Step 2] - [timing]
3. [Step 3] - [timing]

## Historical Comparison (if applicable)

### Previous Generations
- **Last Run:** [date/time]
  - Iterations: X
  - Quality: Y/100
  - Time: Z minutes
  - Comparison: [how current run compares]

### Trends Over Time
- Quality trend: [description]
- Speed trend: [description]
- Success rate: [description]
```

## Usage Examples

```bash
# Check status of current generation
/status outputs/

# Quick summary only
/status outputs/ summary

# Detailed status with all metrics
/status outputs/ detailed

# Historical comparison
/status outputs/ historical

# Check specific directory
/status d3_viz/ detailed
```

## Chain-of-Thought Benefits

This utility uses explicit reasoning to:
- **Systematically collect** all relevant status dimensions
- **Make metric calculations transparent** for verification
- **Provide clear trend analysis** showing how conclusions reached
- **Enable users to understand** current state and trajectory
- **Support informed decision-making** through comprehensive visibility

## Execution Protocol

Now, execute the status check:

1. **Determine scope** - what status information needed
2. **Collect current state** - progress, quality, system health
3. **Calculate metrics** - completion, quality, performance stats
4. **Analyze trends** - identify patterns and trajectories
5. **Identify issues** - flag problems requiring attention
6. **Predict outcomes** - estimate completion and results
7. **Format report** - present information clearly

Begin status monitoring for the specified context.
