Skip to main content

InstructionsConfig

Struct InstructionsConfig 

Source
pub struct InstructionsConfig {
    pub enabled: bool,
    pub byte_budget: usize,
    pub root_markers: Vec<String>,
    pub root_stop_pattern: Option<String>,
    pub extra_roots: Vec<PathBuf>,
    pub global_file: bool,
    pub extends_dirs: Vec<PathBuf>,
}
Expand description

How project-instruction discovery behaves. All fields have defaults; a caller (the CLI today, a settings layer later) overrides them.

Fields§

§enabled: bool

Master switch (default true). --no-project-instructions sets it false.

§byte_budget: usize

Byte budget for the assembled injected body (applied at render time, ADR-0023). Default 64 KiB; 0 means unbounded.

§root_markers: Vec<String>

Directory markers whose presence marks a project root (default [".git"]).

§root_stop_pattern: Option<String>

ADR-0023 root-detection rule 2 (activated by ADR-0024 §1.4 / Task 31 S2): a regex matched against each ancestor’s absolute path during the ascent — a match makes that directory the project root, exactly like a marker hit. The escape hatch for VCS-less trees (monorepo segments, /workspace/<p>). An invalid pattern degrades to no-pattern (the settings loader already warned about it).

§extra_roots: Vec<PathBuf>

Seam (ADR-0023 implementation note): extra roots to also discover from. Honored by the walk, but no --add-dir CLI flag ships until the tool-jail-widening task.

§global_file: bool

Read the global ~/.locode/AGENTS.md (lowest precedence). Default true.

§extends_dirs: Vec<PathBuf>

Resolved extends dotfolders from settings (ADR-0024 §1.2 amendment). Each contributes its AGENTS.md below the global file, in list order, so the user’s own global file still wins and the repo chain wins over both (ADR-0023 amendment 2026-07-24).

This field is why load order is an invariant rather than a convention (ADR-0025 §6.1): the value comes from SettingsLoad::extends_dirs, so discovery cannot run before settings resolve.

Trait Implementations§

Source§

impl Clone for InstructionsConfig

Source§

fn clone(&self) -> InstructionsConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for InstructionsConfig

Source§

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

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

impl Default for InstructionsConfig

Source§

fn default() -> Self

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

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.