feat: phase 10 — LlmBridge, ProposedCommand, parser, AI safety floor#9
Merged
feat: phase 10 — LlmBridge, ProposedCommand, parser, AI safety floor#9
Conversation
Implements all Phase 10 features completing Milestone M3 (LLM bridge): - `parser.rs`: POSIX shell tokenizer + code-fence stripper (`parse_command_response` → `Vec<String>`) - `proposed.rs`: `ProposedCommand` + `CommandSource::AiGenerated`; `apply_ai_safety_floor` raises `Allow` → `Confirm` for all AI output; `ProposedCommand::evaluate_safety` integrates with `SafetyPolicyEngine` - `bridge.rs`: generic `LlmBridge<C: LlmClient>` orchestrates context → composer → client → parser → `ProposedCommand`; `translate_nl` (NL session mode) and `assist_on_127` (exit-127 mode); graceful degradation: `LlmError::Http` propagated for caller fallback - `phase10_integration.rs`: 23 integration tests (+ 6 mockito-backed Ollama tests under `--features ollama`); live-daemon tests `#[ignore]` - `phase10.rs` example: runnable demo of all Phase 10 features - `README.md`: updated status (M3 complete, 506 tests, 96%+ coverage) - `LLM_GUIDE.md`: installation, configuration, API usage, troubleshooting - `PLAN.md`: roadmap through Phase 20 (M4 TUI, M5 remote LLM, M6 plugins) CI: fmt ✓ · clippy -D warnings ✓ · 506 tests · 96.48% coverage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Dead code lint (-D dead_code) in CI flagged the helper function. It was never called — removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements all Phase 10 features completing Milestone M3 (LLM bridge):
parser.rs: POSIX shell tokenizer + code-fence stripper (parse_command_response→Vec<String>)proposed.rs:ProposedCommand+CommandSource::AiGenerated;apply_ai_safety_floorraisesAllow→Confirmfor all AI output;ProposedCommand::evaluate_safetyintegrates withSafetyPolicyEnginebridge.rs: genericLlmBridge<C: LlmClient>orchestrates context → composer → client → parser →ProposedCommand;translate_nl(NL session mode) andassist_on_127(exit-127 mode); graceful degradation:LlmError::Httppropagated for caller fallbackphase10_integration.rs: 23 integration tests (+ 6 mockito-backed Ollama tests under--features ollama); live-daemon tests#[ignore]phase10.rsexample: runnable demo of all Phase 10 featuresREADME.md: updated status (M3 complete, 506 tests, 96%+ coverage)LLM_GUIDE.md: installation, configuration, API usage, troubleshootingPLAN.md: roadmap through Phase 20 (M4 TUI, M5 remote LLM, M6 plugins)CI: fmt ✓ · clippy -D warnings ✓ · 506 tests · 96.48% coverage