VibeMode

Struct VibeMode 

Source
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

Source

pub fn new() -> Self

Create a new Vibe Mode instance

Source

pub fn with_config(config: ModeConfig) -> Self

Create a Vibe Mode with custom configuration

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn format_warnings(&self, warnings: &[String]) -> String

Display warnings in a formatted way

This method formats warnings for display to the user.

Source

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.

Source

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.

Source

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.

Source

pub fn provide_best_practices(&self) -> Vec<String>

Provide guidance on best practices

This method generates guidance on how to best use Vibe Mode.

Trait Implementations§

Source§

impl Clone for VibeMode

Source§

fn clone(&self) -> VibeMode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VibeMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VibeMode

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Mode for VibeMode

Source§

fn id(&self) -> &str

Mode identifier (e.g., “code”, “ask”, “vibe”)
Source§

fn name(&self) -> &str

Human-readable name
Source§

fn description(&self) -> &str

Mode description
Source§

fn system_prompt(&self) -> &str

Get system prompt for this mode
Source§

fn process<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, input: &'life1 str, context: &'life2 ModeContext, ) -> Pin<Box<dyn Future<Output = Result<ModeResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Process user input in this mode
Source§

fn capabilities(&self) -> Vec<Capability>

Get mode-specific capabilities
Source§

fn config(&self) -> &ModeConfig

Get mode configuration
Source§

fn can_execute(&self, operation: &Operation) -> bool

Validate if operation is allowed in this mode
Source§

fn constraints(&self) -> ModeConstraints

Get mode-specific constraints

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.