mockforge_intelligence/voice/mod.rs
1//! Pillars: [AI][DevX]
2//!
3//! Voice + LLM Interface for MockForge
4//!
5//! This module provides voice input capability that allows users to build mocks
6//! conversationally using natural language commands. It leverages MockForge's
7//! existing LLM infrastructure to interpret voice commands and generate mock APIs.
8//!
9//! # Features
10//!
11//! - **Natural Language Command Parsing**: Interpret voice commands using LLM
12//! - **OpenAPI Spec Generation**: Generate OpenAPI 3.0 specs from voice commands
13//! - **Conversational Mode**: Support multi-turn conversations for iterative refinement
14//! - **Single-Shot Mode**: Process complete commands in one go
15//!
16//! Issue #562 phase 7 moved the 6 leaf voice files into this crate. The 7th file,
17//! `workspace_builder.rs`, stays in `mockforge_core::voice_workspace` because it
18//! depends on `multi_tenant`, `scenarios`, `workspace`, `contract_drift`, and
19//! `reality_continuum` — all still core-only. The `mockforge_core::voice::*`
20//! shim consolidates both halves so callers see one unified public API.
21//!
22//! ## Do not extract `voice_workspace` into this crate
23//!
24//! See the matching rationale in `mockforge_core::voice` (the shim) for the
25//! full cycle diagram. Short version: `voice_workspace` calls the live
26//! `MultiTenantWorkspaceRegistry` engine, and the 5 modules it depends on are
27//! domain primitives that belong in core. Importing them here would invert
28//! the established `core → intelligence` dep direction
29//! (already in use via `contract_drift` re-exporting `threat_modeling`) and
30//! reintroduce the cycle that Issue #562 phase 1 broke. Issue #562 is
31//! complete; the location of `voice_workspace` is a feature, not debt.
32
33pub mod command_parser;
34pub mod conversation;
35pub mod hook_transpiler;
36pub mod spec_generator;
37pub mod workspace_scenario_generator;
38
39pub use command_parser::{
40 ApiRequirement, EntityRequirement, ParsedCommand, ParsedContinuumRule, ParsedDriftBudget,
41 ParsedRealityContinuum, ParsedServiceBudget, ParsedWorkspaceCreation, ParsedWorkspaceScenario,
42 PersonaRequirement, ScenarioRequirement, VoiceCommandParser,
43};
44pub use conversation::{ConversationContext, ConversationManager, ConversationState};
45pub use hook_transpiler::HookTranspiler;
46pub use spec_generator::VoiceSpecGenerator;
47pub use workspace_scenario_generator::{
48 GeneratedWorkspaceScenario, WorkspaceConfigSummary, WorkspaceScenarioGenerator,
49};