- Test Full Agentic Workflow End-to-End from Scratch - Critical, High Impact
- Run complete autonomous pipeline on fresh checkout:
- Extract JIRA tickets with multi-agent verification
- Review and refine extracted answers autonomously
- Re-extract failures flagged by review agent
- Discover patterns from quality Q&A
- Convert to lightspeed-evaluation format
- Run full evaluation
- Validate autonomous quality loop works (Review Agent → Linux Expert refinement)
- Measure success rate: % tickets passing review without human intervention
- Document any manual interventions needed (should be zero for agentic POC)
- Files involved:
src/heal/bootstrap/extract_jira_tickets.pysrc/heal/bootstrap/refine_extracted_tickets.pyscripts/discover_patterns.pyscripts/convert_to_eval_format.py
- Impact: Validates fully autonomous multi-agent workflow works end-to-end
- Why: Current testing done mid-process with pre-existing data; need clean-slate validation
- Priority: CRITICAL - proves POC concept before scaling
- Status: Pending - refinement improvements not yet tested fresh
- Run complete autonomous pipeline on fresh checkout:
- Add Historical Timing Data for Better Estimates - High Impact, Low Effort
- Store historical timing data in
.diagnostics/timing_history.json- Track completion time (ms) per pattern and evaluation type
- Store: pattern_id, eval_type (full/retrieval), num_runs, duration_ms, timestamp
- Calculate estimates from historical averages
- Use moving average of last N runs for same pattern/config
- Fall back to default estimate if no historical data
- Format:
historical_avg_ms if historical_avg_ms else runs * 2 * 60000
- Update progress messages to use milliseconds instead of seconds
- Capture:
start_ms = int(time.perf_counter() * 1000) - Report:
print(f"Completed in {elapsed_ms}ms ({elapsed_ms/60000:.1f} min)")
- Capture:
- Files to modify:
src/heal/agents/okp_mcp_agent.py:diagnose_full()- add timing persistencediagnose_retrieval_only()- add timing persistence
src/heal/runners/run_pattern_fix_poc.py:- Add timing history loader/saver
- Update estimate calculations
- Impact: Users get accurate time estimates based on actual historical performance
- Why: Current estimates (
runs * 2 minutes) are hardcoded and often inaccurate - Priority: High - improves user experience during long-running batch operations
- Store historical timing data in
-
Add Event System for Real-Time Progress - Medium Impact, Medium Effort
- Implement event bus using
queue.Queue+dataclasses(seedocs/EVENT_DESIGN.md) - Define event types:
PhaseStartEvent,PhaseCompleteEvent,IterationEvent,EvaluationProgressEvent
- Emit events from pattern fix workflow
- Add event consumer for real-time monitoring
- Impact: Better real-time visibility into workflow progress
- Reference:
docs/EVENT_DESIGN.md
- Implement event bus using
-
Implement Library API - High Impact, High Effort
- Refactor scripts into importable modules (see
docs/LIBRARY_API_DESIGN.md) - Create
heal/core/with events, models, config - Extract
DiagnosticEngine,PatternFixer,BatchRunnerclasses - Maintain backward compatibility with CLI scripts
- Impact: Makes HEAL reusable across projects, not just standalone scripts
- Reference:
docs/LIBRARY_API_DESIGN.md - Timeline: 5 weeks phased implementation
- Status: Design document complete, awaiting review
- Refactor scripts into importable modules (see
-
Analyze Review Score vs Judge Score Stability - High Impact, Medium Effort
- Hypothesis: Lower review_score (extraction quality) → higher variance in judge scores across eval runs
- Data sources:
- Review scores: Saved in
config/extracted_tickets.yamlatturns[0].review_score(0.0-1.0) - Judge scores: After eval, in lightspeed-evaluation output
run_*/evaluation_*_summary.json
- Review scores: Saved in
- Analysis steps:
- Run evaluation 3 times on same tickets (to get variance)
- Extract review_score from YAML:
ticket['turns'][0]['review_score'] - Extract judge_scores from eval runs: load 3 runs of same ticket
- Calculate variance:
np.var([score_run1, score_run2, score_run3]) - Test correlation:
scipy.stats.pearsonr(review_scores, judge_variances) - Or linear regression:
scipy.stats.linregress(review_scores, judge_variances)
- Expected result: Negative correlation (low review_score → high variance)
- Additional factors to test:
- Number of refinement iterations (not currently saved - could add)
- Source document count:
len(ticket['turns'][0]['expected_urls']) - Answer length:
len(ticket['turns'][0]['expected_response']) - Problem type: from pattern discovery classification
- ML approach (simple scipy):
# Correlation test correlation, p_value = scipy.stats.pearsonr(review_scores, judge_variances) # If correlation < 0 and p < 0.05: hypothesis confirmed # Or multi-factor regression from sklearn.linear_model import LinearRegression X = np.column_stack([review_scores, num_sources, answer_lengths]) y = judge_variances model.fit(X, y) # Which factors predict instability?
- Impact: Proves ground truth quality affects eval stability; enables filtering low-quality tickets
- Use case: Filter evaluation data to only high-confidence tickets (review_score >= 0.85)
- Priority: High - could explain eval instability issues
- Status: review_score field added, ready for analysis after extraction completes
-
Add Performance Metrics to Evaluations - Medium Impact, Medium Effort
- Implement performance metrics (latency, throughput, resource usage, baseline comparison)
- Integrate with lightspeed-evaluation framework
- Add to pattern fix diagnostics for visibility
- Impact: Enables perf/scale testing required for release qualification
- Reference:
docs/PERFORMANCE_METRICS_DESIGN.md - Status: Design document complete
- Investigate Guardrail Configuration for CLA Jailbreak Protection - Medium Impact, Medium Effort
- Context: Open JIRA tickets (e.g., RSPEED-2219) document jailbreak vulnerabilities
- Current status: Jailbreaks likely work (no Llama Guard deployed locally)
- Investigation steps:
- Find where guardrails are configured:
- CLA: Check for input validation, safety filters
- lightspeed-stack: Check middleware, request handlers
- llamastack: Check inference safety settings
- Search for existing protections:
# Configuration files find . -name "*config*.yaml" -o -name "*safety*.yaml" # Code patterns grep -r "safety\|guard\|filter\|sanitize" --include="*.py" grep -r "jailbreak\|prompt.injection" --include="*.py"
- Understand current state:
- What protections exist (if any)?
- Where do they live (CLA/lightspeed-stack/llamastack)?
- Why aren't they blocking jailbreaks?
- Find where guardrails are configured:
- Potential fixes (after investigation):
- Deploy Llama Guard (if available in llamastack)
- Add pattern-based input filters (regex for common jailbreaks)
- Strengthen system prompts (though this alone is weak)
- Add response validation (detect prompt leakage)
- Scope for HEAL:
- Jailbreak tickets marked OUT_OF_SCOPE (correctly)
- Not RHEL technical questions - security tests
- Separate concern from fixing incorrect RHEL answers
- Impact: Addresses security vulnerabilities documented in open tickets
- Priority: Medium - separate from core HEAL workflow
- Status: Requires investigation before implementation
- Note: Different problem domain than HEAL (security vs correctness)
- Agentic Product Coverage and Intent Discovery - High Impact, High Effort
- Concept: Test-driven intent system that ensures CLA coverage of all Red Hat products
- Workflow:
- Product Enumeration Agent - LLM discovers all Red Hat products
- RHEL (versions 6-10), Satellite, OpenShift, Ansible Automation, etc.
- Query Solr/OKP for product list or use RH product catalog
- Test Discovery/Generation - For each product:
- Find existing tickets:
find_tickets(product="Satellite") - If gaps exist: Generate synthetic tests for untested areas
- Find existing tickets:
- Failure Detection - Test CLA knowledge:
- If tests pass: Note in comments "CLA has good {product} coverage"
- If tests fail: Identify knowledge gaps
- Intent Rule Builder - Test-driven rule creation:
- Iterate on intent rules until tests pass
- Rules guide how to answer product-specific questions
- Product Enumeration Agent - LLM discovers all Red Hat products
- Integration with HEAL:
- Intent rules feed into Pattern Discovery (product-aware grouping)
- Proactive (ensure coverage) complements reactive (fix bugs)
- Could use same agents: Linux Expert, Solr Expert, Review Agent
- Example:
# Discover products products = ["RHEL", "Satellite", "OpenShift", ...] # Find/create tests satellite_tests = find_or_create_tests(product="Satellite") # Test CLA results = test_cla(satellite_tests) # 2/3 fail on uninstall # Build intent rules (test-driven) while not all_tests_pass(): intent_rules["satellite_uninstall"] = refine_rule()
- Architecture:
- Separate interface from current HEAL workflow
- Orthogonal: HEAL fixes existing bugs, Intent System prevents future gaps
- Complementary: Intent rules improve pattern discovery accuracy
- Impact: Systematic product coverage, prevents blind spots, broadens agentic scope
- Credit: Proposed by user's friend
- Priority: Future - after core HEAL workflow validated
- Status: Design idea captured, pending HEAL core completion
-
Make JIRA Token Retrieval Cross-Platform - Low Impact, Low Effort
- Currently hardcoded to use
secret-tool(Linux/GNOME keyring only) - Add fallback to
JIRA_API_TOKENenvironment variable (cross-platform) - Or use
keyringPython library (supports macOS Keychain, Windows Credential Manager, Linux keyrings) - Files to modify:
src/heal/bootstrap/extract_jira_tickets.py-get_jira_token()function
- Impact: Makes bootstrap workflow work on macOS and Windows
- Current workaround: Set
JIRA_API_TOKENenv var manually - Priority: Low - currently works for Linux users
- Currently hardcoded to use
-
Improve Test Coverage
- Add more tests for
okp_mcp_agent.pymethods - Add integration tests for pattern fix workflow
- Add end-to-end tests for batch processing
- Add more tests for
-
Documentation Updates
- Update README with latest features
- Add user guide for batch processing
- Document timing history format
-
Error Handling
- Better error messages for common failures
- Graceful degradation when services unavailable
- Retry logic for transient failures
- Fix Python output buffering issues (line buffering + PYTHONUNBUFFERED=1)
- Add progress monitoring for evaluation runs (poll for completion files)
- Fix file pattern for progress monitoring (evaluation_*_summary.json)
- Add signal handling for cleanup on Ctrl+C (SIGINT/SIGTERM + atexit)
- Fix authentication conflicts (switch to Claude Agent SDK throughout)
- Add timestamps to evaluation progress (start/end times)
- Fix format string errors in review report (handle non-float metrics)
- Add phase completion summaries for better visibility
- Enhance branch creation to start clean from main
- Create EVENT_DESIGN.md for event system architecture
- Create LIBRARY_API_DESIGN.md for refactoring roadmap
- Create PERFORMANCE_METRICS_DESIGN.md for release testing
- Add proper pytest tests for check_answer_in_retrieved_docs()
Problem: Batch pattern fix workflow sat silently with no progress output, making it impossible to tell if running or stuck.
Root Causes:
- Python stdout buffering when output piped through
tee - Progress monitoring watching wrong files (
results.csvinstead ofevaluation_*_summary.json) - Auth conflicts between Anthropic SDK and Claude Agent SDK (ADC issues)
- No cleanup on Ctrl+C - left on pattern branches instead of returning to main
Solutions Applied:
- Added
sys.stdout.reconfigure(line_buffering=True)+PYTHONUNBUFFERED=1 - Fixed file pattern to
run_*/evaluation_*_summary.json - Switched all LLM calls to use Claude Agent SDK's
query()function - Added signal handlers (SIGINT/SIGTERM) + atexit cleanup
- Added start/end timestamps and progress updates with explicit
flush() - Enhanced output to show phase summaries instead of raw evaluation logs
User Preference: Milliseconds for all timing (not seconds), coming from nanosecond-level systems programming background
Waiting on user review for:
- Library API design (
docs/LIBRARY_API_DESIGN.md) - Performance metrics design (
docs/PERFORMANCE_METRICS_DESIGN.md)
Once approved, can proceed with implementation.