+
Skip to content

Conversation

cwang
Copy link
Owner

@cwang cwang commented Aug 3, 2025

Introduces a structured, multi-layered guidance system that replaces direct LLMClient usage with a flexible orchestration architecture. This prepares the foundation for PR2 guide prompts and future intelligent guidance layers.

Key Changes

New Orchestration Architecture

  • GuidanceSource Interface: Common contract for all guidance providers
  • GuidanceOrchestrator: Manages multiple sources, priority ordering, and composition
  • BaseLLMGuidanceSource: Wraps existing LLMClient functionality
  • AnalysisContext & GuidanceResult: Structured data flow between components

AutopilotMonitor Migration

  • Replaced direct LLMClient usage with GuidanceOrchestrator
  • Maintains full backward compatibility with existing AutopilotDecision interface
  • Added guidance debug info and source attribution
  • Preserves all existing functionality and behavior

Benefits

  • Extensible: Easy to add new guidance sources (patterns, context-aware, etc.)
  • Composable: Multiple intelligence layers with priority-based selection
  • Testable: Clean separation of concerns for isolated testing
  • Transparent: Source attribution and analysis metadata
  • Performance: Short-circuit capability for fast pattern detection

Test Coverage

  • Comprehensive tests for BaseLLMGuidanceSource (8 tests)
  • Full GuidanceOrchestrator test suite (15 tests)
  • Updated AutopilotMonitor tests (14 tests)
  • All existing functionality validated (318 tests passing)

This refactor enables the planned PR2 guide prompt feature and establishes the foundation for multi-layered intelligence in the autopilot system.

🤖 Generated with Claude Code

@cwang cwang force-pushed the autopilot-guide-prompt-critique branch from 0c453a0 to b8e77ef Compare August 3, 2025 09:10
…ovements

Introduces a structured, multi-layered guidance system and fixes autopilot timing
to only trigger after Claude responses, not during user input prompts.

- **GuidanceSource Interface**: Common contract for all guidance providers
- **GuidanceOrchestrator**: Manages multiple sources, priority ordering, and composition
- **BaseLLMGuidanceSource**: Wraps existing LLMClient functionality
- **AnalysisContext & GuidanceResult**: Structured data flow between components

- Replaced direct LLMClient usage with GuidanceOrchestrator
- Fixed timing to only trigger on `busy → idle` (not `busy → waiting_input`)
- Maintains full backward compatibility with existing AutopilotDecision interface
- Added guidance debug info and source attribution

- Fixed all linting errors and improved formatting
- Replaced `any` types with `unknown` for better type safety
- Comprehensive test coverage (23 new tests, 318 total passing)
- Clean TypeScript compilation

- Restructured PR sequence: Guide Prompt (PR2), Patterns (PR3), Context (PR4)
- Updated timelines and implementation roadmap

- **Extensible**: Easy to add new guidance sources (patterns, context-aware, etc.)
- **Composable**: Multiple intelligence layers with priority-based selection
- **Testable**: Clean separation of concerns for isolated testing
- **Transparent**: Source attribution and analysis metadata
- **Performance**: Short-circuit capability for fast pattern detection
- **Better UX**: Autopilot only provides guidance when Claude is truly idle

This refactor establishes the foundation for PR2 guide prompt feature and
future multi-layered intelligence in the autopilot system.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@cwang cwang force-pushed the autopilot-guide-prompt-critique branch from b8e77ef to d59463f Compare August 3, 2025 09:17
@cwang cwang merged commit a957106 into main Aug 3, 2025
3 checks passed
@cwang cwang deleted the autopilot-guide-prompt-critique branch August 3, 2025 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载