Skip to main content

Module steering

Module steering 

Source
Expand description

Agent Steering System

This module provides a system for guiding agent behavior and responses through configurable steering rules that can be applied based on context.

§Features

  • Always-included steering rules that apply to all interactions
  • Conditional steering rules based on file patterns (fileMatch)
  • Manual steering rules invoked via #key syntax
  • Rule inheritance from parent directories
  • File reference resolution via #[[file:<path>]] syntax

§Usage

use driven::steering::{SteeringRule, SteeringInclusion, SteeringEngine};

let mut engine = SteeringEngine::new();
engine.load_steering(Path::new(".driven/steering"))?;

// Get rules for a specific context
let context = AgentContext::new()
    .with_file(Path::new("src/main.rs"));
let rules = engine.get_rules_for_context(&context);

Structs§

AgentContext
Context for agent interactions
FileReference
File reference in a steering rule
SteeringEngine
Steering engine for managing and applying steering rules
SteeringRule
Steering rule definition

Enums§

SteeringInclusion
How a steering rule should be included