Expand description
Pillars: [AI]
MockForge AI Studio - Unified AI Copilot
This module provides a unified interface for all AI-powered features in MockForge, including natural language mock generation, AI-guided debugging, persona generation, and artifact freezing for deterministic testing.
§Features
- Natural Language Mock Generation: Generate mocks from conversational descriptions
- AI-Guided Debugging: Analyze test failures and suggest fixes
- Persona Generation: Create and tweak personas using AI
- Artifact Freezing: Convert AI outputs to deterministic YAML/JSON
- Cost & Budget Management: Track tokens and enforce budgets
§Example Usage
ⓘ
use mockforge_core::ai_studio::{ChatOrchestrator, ChatRequest};
use mockforge_core::intelligent_behavior::IntelligentBehaviorConfig;
async fn example() -> mockforge_core::Result<()> {
let config = IntelligentBehaviorConfig::default();
let orchestrator = ChatOrchestrator::new(config);
// Process a natural language command
let request = ChatRequest {
message: "Create a user API with CRUD operations".to_string(),
context: None,
};
let response = orchestrator.process(&request).await?;
Ok(())
}Re-exports§
pub use api_critique::ApiCritiqueEngine;pub use artifact_freezer::ArtifactFreezer;pub use behavioral_simulator::BehavioralSimulator;pub use budget_manager::AiFeature;pub use budget_manager::BudgetConfig;pub use budget_manager::BudgetManager;pub use budget_manager::FeatureUsage;pub use budget_manager::UsageStats;pub use chat_orchestrator::ChatContext;pub use chat_orchestrator::ChatIntent;pub use chat_orchestrator::ChatMessage;pub use chat_orchestrator::ChatOrchestrator;pub use chat_orchestrator::ChatRequest;pub use chat_orchestrator::ChatResponse;pub use config::AiStudioConfig;pub use config::FreezeMode;pub use contract_diff_handler::BreakingChange;pub use contract_diff_handler::ContractDiffFilters;pub use contract_diff_handler::ContractDiffHandler;pub use contract_diff_handler::ContractDiffIntent;pub use contract_diff_handler::ContractDiffQueryResult;pub use conversation_store::get_conversation_store;pub use conversation_store::initialize_conversation_store;pub use conversation_store::ConversationStore;pub use debug_analyzer::DebugAnalyzer;pub use debug_analyzer::DebugRequest;pub use debug_analyzer::DebugResponse;pub use debug_analyzer::DebugSuggestion;pub use debug_analyzer::LinkedArtifact;pub use debug_context::ChaosContext;pub use debug_context::ContractContext;pub use debug_context::DebugContext;pub use debug_context::PersonaContext;pub use debug_context::RealityContext;pub use debug_context::ScenarioContext;pub use debug_context_integrator::ChaosAccessor;pub use debug_context_integrator::ContractAccessor;pub use debug_context_integrator::DebugContextIntegrator;pub use debug_context_integrator::PersonaAccessor;pub use debug_context_integrator::RealityAccessor;pub use debug_context_integrator::ScenarioAccessor;pub use nl_mock_generator::MockGenerationResult;pub use nl_mock_generator::MockGenerator;pub use org_controls::OrgAiControlsConfig;pub use org_controls::OrgBudgetConfig;pub use org_controls::OrgControls;pub use org_controls::OrgControlsAccessor;pub use org_controls::OrgRateLimitConfig;pub use persona_generator::PersonaGenerationRequest;pub use persona_generator::PersonaGenerationResponse;pub use persona_generator::PersonaGenerator;pub use system_generator::SystemGenerator;
Modules§
- api_
critique - API Architecture Critique Engine
- artifact_
freezer - Artifact freezer for converting AI outputs to deterministic formats
- behavioral_
simulator - AI Behavioral Simulation Engine
- budget_
manager - Budget manager for AI usage tracking and controls
- chat_
orchestrator - Chat orchestrator for routing natural language commands
- config
- Configuration for AI Studio
- contract_
diff_ handler - Contract Diff Handler for processing natural language queries
- conversation_
store - Conversation storage for AI Studio chat sessions
- debug_
analyzer - AI-guided debugging analyzer
- debug_
context - Debug context types for AI-guided debugging
- debug_
context_ integrator - Debug context integrator for collecting context from multiple subsystems
- nl_
mock_ generator - Natural language mock generator
- org_
controls - Organization-level AI controls service
- persona_
generator - AI-powered persona generator
- system_
generator - System Generator - Natural Language to Entire System Generation
Structs§
- Anti
Pattern - Detected anti-pattern in API design
- ApiCritique
- API critique result
- AppState
- App state awareness
- Applied
System - Result of applying a system design
- Behavior
Policy - Behavior policy attached to persona
- Behavioral
Traits - Behavioral traits for the agent
- Cart
State - Cart state
- Consolidation
Opportunity - Consolidation opportunity
- Create
Agent Request - Request to create a narrative agent
- Critique
Request - Request for API critique analysis
- Freeze
Metadata - Metadata for frozen artifacts
- Freeze
Request - Request to freeze an artifact
- Frozen
Artifact - Frozen artifact result
- Generated
System - Generated system with all artifacts
- Hierarchy
Improvement - Hierarchy improvement suggestion
- Naming
Issue - Naming quality issue
- Narrative
Agent - Narrative agent that models user behavior
- Next
Action - Next action to take
- Policy
Rule - Policy rule for behavior
- Redundancy
- Detected redundancy in API
- Resource
Modeling Suggestion - Resource modeling suggestion
- Restructuring
Recommendations - Restructuring recommendations
- Simulate
Behavior Request - Request to simulate behavior
- Simulate
Behavior Response - Response from behavior simulation
- System
Artifact - System artifact (OpenAPI spec, persona, lifecycle, etc.)
- System
Generation Request - Request for system generation
- System
Metadata - System generation metadata
- Tone
Analysis - Emotional tone analysis
- Tone
Issue - Tone issue in API text
Enums§
- Intention
- User intention types