pub struct VibeMode { /* private fields */ }Expand description
Vibe Mode for free-form exploration and rapid prototyping
Vibe Mode provides capabilities for:
- Natural language code generation without formal specs
- Rapid iteration and exploration
- Spec conversion for transitioning to spec-driven development
- Warnings about limitations and best practices
Implementations§
Source§impl VibeMode
impl VibeMode
Sourcepub fn with_config(config: ModeConfig) -> Self
pub fn with_config(config: ModeConfig) -> Self
Create a Vibe Mode with custom configuration
Sourcepub fn generate_code_from_description(
&self,
description: &str,
) -> Result<String>
pub fn generate_code_from_description( &self, description: &str, ) -> Result<String>
Generate code from natural language without formal specs
This method generates code directly from natural language descriptions without requiring formal specifications.
Sourcepub fn iterate_rapidly(&self, iteration_input: &str) -> Result<String>
pub fn iterate_rapidly(&self, iteration_input: &str) -> Result<String>
Support rapid iteration by accepting natural language input
This method enables quick prototyping by accepting natural language input and generating code without formal review cycles.
Sourcepub fn generate_with_iterations(
&self,
description: &str,
iterations: usize,
) -> Result<String>
pub fn generate_with_iterations( &self, description: &str, iterations: usize, ) -> Result<String>
Generate code with multiple iterations
This method supports generating code through multiple rapid iterations, allowing developers to refine and improve the generated code.
Sourcepub fn accept_natural_language(&self, input: &str) -> Result<String>
pub fn accept_natural_language(&self, input: &str) -> Result<String>
Accept natural language input and generate code
This method is the core of Vibe Mode - it accepts natural language input without requiring formal specifications and generates code.
Sourcepub fn convert_to_specs(&self, project_code: &str) -> Result<String>
pub fn convert_to_specs(&self, project_code: &str) -> Result<String>
Convert a Vibe Mode project to spec-driven format
This method converts existing code and context from Vibe Mode to a formal spec-driven development format.
Sourcepub fn preserve_code_and_context(
&self,
code: &str,
context: &ModeContext,
) -> Result<String>
pub fn preserve_code_and_context( &self, code: &str, context: &ModeContext, ) -> Result<String>
Preserve all code and context during conversion
This method ensures that all code and context is preserved when converting from Vibe Mode to spec-driven format.
Sourcepub fn generate_specs_from_code(&self, code: &str) -> Result<String>
pub fn generate_specs_from_code(&self, code: &str) -> Result<String>
Generate initial specs from code
This method analyzes code and generates initial specifications that can be refined and expanded.
Sourcepub fn convert_project_to_specs(
&self,
code: &str,
context: &ModeContext,
) -> Result<String>
pub fn convert_project_to_specs( &self, code: &str, context: &ModeContext, ) -> Result<String>
Support converting Vibe Mode projects to spec-driven format
This method provides a complete conversion workflow from Vibe Mode to spec-driven development.
Sourcepub fn generate_warnings(&self) -> Vec<String>
pub fn generate_warnings(&self) -> Vec<String>
Generate warnings about Vibe Mode limitations
This method creates warnings about the limitations of Vibe Mode and best practices for using it.
Sourcepub fn generate_specific_warnings(&self, context: &str) -> Vec<String>
pub fn generate_specific_warnings(&self, context: &str) -> Vec<String>
Generate warnings about specific limitations
This method generates warnings about specific limitations based on the context of use.
Sourcepub fn format_warnings(&self, warnings: &[String]) -> String
pub fn format_warnings(&self, warnings: &[String]) -> String
Display warnings in a formatted way
This method formats warnings for display to the user.
Sourcepub fn add_warnings_to_response(&self, response: &mut ModeResponse)
pub fn add_warnings_to_response(&self, response: &mut ModeResponse)
Include warnings in all responses
This method adds warnings to a response to inform users about Vibe Mode limitations.
Sourcepub fn add_specific_warnings_to_response(
&self,
response: &mut ModeResponse,
context: &str,
)
pub fn add_specific_warnings_to_response( &self, response: &mut ModeResponse, context: &str, )
Include specific warnings based on context
This method adds context-specific warnings to a response.
Sourcepub fn validate_operation(&self, operation: &Operation) -> Result<()>
pub fn validate_operation(&self, operation: &Operation) -> Result<()>
Validate that an operation is allowed in Vibe Mode
This method checks if an operation can be executed in Vibe Mode.
Sourcepub fn provide_best_practices(&self) -> Vec<String>
pub fn provide_best_practices(&self) -> Vec<String>
Provide guidance on best practices
This method generates guidance on how to best use Vibe Mode.