You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add haiku explanation type with flexible prompt composition (#6)
## Summary
Adds haiku explanation type and flexible prompt composition system that
allows explanation types to override audience-specific guidance.
## Changes Made
### Core Implementation
- Added `ExplanationType.HAIKU` enum value
- Implemented explanation-type audience overrides in prompt system
- Created haiku-specific prompt configuration that bypasses assembly
guidance
### Testing & Evaluation
- Added `prompt_testing/test_cases/haiku_tests.yaml` with test scenarios
- Enhanced `claude_reviewer.py` with haiku-specific evaluation criteria
- Updated `prompt_advisor.py` to handle nested audience configurations
### Code Quality & Reuse
- Added structure-aware class methods to `Prompt` class:
- `get_audience_metadata_from_dict()` - Works with raw prompt
dictionaries
- `has_audience_override()` - Checks for explanation-specific overrides
- `get_all_audience_locations()` - Finds all audience guidance locations
- Prevents duplication between runtime and testing framework
### Debug Support
- Added configurable logging via `LOG_LEVEL` environment variable
- Debug logging shows actual prompts sent to Claude
### Documentation
- Updated `claude_explain.md` with flexible prompt system documentation
## Test Plan
- All existing tests pass
- Haiku test cases added covering simple to complex algorithms
- Prompt testing framework handles new structure
- Debug logging works for both assembly and haiku modes
0 commit comments