Skip to main content

SupervisorConfig

Struct SupervisorConfig 

Source
pub struct SupervisorConfig {
Show 15 fields pub enabled: bool, pub cli: Option<String>, pub test_command: Option<String>, pub lint_command: Option<String>, pub build_command: Option<String>, pub doc_build_command: Option<String>, pub spec_validate_command: Option<String>, pub fmt_check_command: Option<String>, pub security_audit_command: Option<String>, pub agent_approval: ApprovalLevel, pub auto_approve: Option<AutoApproveConfig>, pub conflict: ConflictConfig, pub learnings: bool, pub learnings_config: LearningsConfig, pub common_dev_allowlist: CommonDevAllowlistConfig,
}
Expand description

Supervisor mode configuration.

Supervisor mode puts git-paw in front of the agent CLI as a coordinating layer that can enforce approval policy and run a verification command after each agent completes a task.

Fields§

§enabled: bool

Whether supervisor mode is enabled by default for this repo.

§cli: Option<String>

Override the CLI used when launching the supervisor (e.g. "claude"). None resolves to the normal CLI selection flow at runtime.

§test_command: Option<String>

Test command to run after each agent completes (e.g. "just check"). None skips the verification step.

§lint_command: Option<String>

Pre-stage lint invocation for the five-gate verification workflow.

Drives gate 1’s lint sub-step. Example values per common stack: "cargo clippy -- -D warnings" (Rust), "npm run lint" (Node), "ruff check ." (Python), "golangci-lint run" (Go). When None, the supervisor skill renders the placeholder as (not configured) and the supervisor agent skips the tooling invocation.

§build_command: Option<String>

Compile-step command when build is distinct from test.

Drives gate 1’s compile sub-step. Example values: "cargo build" (Rust), "npm run build" (Node), "mvn package" (Java), "go build ./..." (Go). When None, the supervisor skill renders the placeholder as (not configured) and the supervisor agent skips the tooling invocation.

§doc_build_command: Option<String>

Documentation-build command for gate 4 (doc audit).

Example values: "mdbook build docs/" (mdBook), "sphinx-build" (Sphinx), "mkdocs build" (MkDocs), "npx typedoc" (TypeDoc). When None, the supervisor skill renders the placeholder as (not configured) and the supervisor agent skips the tooling invocation; the manual doc-surface review still applies.

§spec_validate_command: Option<String>

Spec-validator command for gate 3 (spec audit).

Typically takes a change name as argument; the supervisor agent substitutes {{CHANGE_ID}} at verification time using the change it is currently auditing. Example values: "openspec validate {{CHANGE_ID}} --strict" (OpenSpec). When None, the supervisor skill renders the placeholder as (not configured) and the supervisor agent skips the tooling invocation; the manual scenario-coverage check still applies.

§fmt_check_command: Option<String>

Formatter-check command for gate 1’s pre-stage.

Example values: "cargo fmt --check" (Rust), "prettier --check ." (Node), "gofmt -l ." (Go), "black --check ." (Python). When None, the supervisor skill renders the placeholder as (not configured) and the supervisor agent skips the tooling invocation.

§security_audit_command: Option<String>

Security-audit tooling for gate 5.

Example values: "cargo audit" (Rust), "npm audit" (Node), "bandit -r ." (Python), "gosec ./..." (Go). When None, the supervisor skill renders the placeholder as (not configured) and the supervisor agent skips the tooling invocation; the manual OWASP-category diff review still applies.

§agent_approval: ApprovalLevel

Approval policy applied to agent actions.

§auto_approve: Option<AutoApproveConfig>

Auto-approval configuration for safe permission prompts.

When present, the supervisor automatically approves stalled agents whose pending command matches an entry in the safe-command whitelist. See AutoApproveConfig for the per-field semantics.

§conflict: ConflictConfig

Conflict detector configuration.

Drives the broker-internal subsystem that auto-emits agent.feedback and agent.question for forward, in-flight, and ownership conflicts between agents. Active only when SupervisorConfig::enabled is true; otherwise the detector subsystem is not started and no auto-warnings fire.

§learnings: bool

Opt-in flag for the learnings aggregator subsystem (learnings-mode).

When true (and [broker] enabled = true), the broker starts a learnings aggregator that observes the session and appends human-readable summaries to .git-paw/session-learnings.md. Defaults to false — pre-v0.5 configs load without producing learnings.

§learnings_config: LearningsConfig

Tuning knobs for the learnings aggregator.

Honoured only when Self::learnings is true. Missing fields fall back to LearningsConfig::default. The TOML table key is [supervisor.learnings_config] to avoid colliding with the boolean learnings field.

§common_dev_allowlist: CommonDevAllowlistConfig

Common dev-command allowlist configuration.

Controls whether the supervisor seeds a curated preset of dev-loop prefix patterns (cargo build, git commit, …) into .claude/settings.json::allowed_bash_prefixes on session start. See CommonDevAllowlistConfig for field semantics.

Implementations§

Source§

impl SupervisorConfig

Source

pub fn gate_commands(&self) -> GateCommands<'_>

Borrowed view of the seven gate-command templates suitable for passing to crate::skills::render. Each field maps directly to the matching Option<String> on this struct.

Trait Implementations§

Source§

impl Clone for SupervisorConfig

Source§

fn clone(&self) -> SupervisorConfig

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 SupervisorConfig

Source§

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

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

impl Default for SupervisorConfig

Source§

fn default() -> SupervisorConfig

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

impl<'de> Deserialize<'de> for SupervisorConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for SupervisorConfig

Source§

fn eq(&self, other: &SupervisorConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SupervisorConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for SupervisorConfig

Source§

impl StructuralPartialEq for SupervisorConfig

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,