Skip to main content

SupervisorConfig

Struct SupervisorConfig 

Source
pub struct SupervisorConfig {
Show 21 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 doc_tool_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, pub verify_on_commit_nudge: Option<bool>, pub strict_branch_guard: Option<bool>, pub auto_revert: Option<bool>, pub manual_approvals_log: Option<bool>, pub tell: TellConfig,
}
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.

§doc_tool_command: Option<String>

API-doc generator command used during spec audit.

Distinct from Self::doc_build_command (which builds the human-readable doc site): this one runs the per-language API-doc extractor against changed public items. Example values: "cargo doc --no-deps" (Rust), "sphinx-build -W docs docs/_build" (Python/Sphinx), "npx typedoc" (TypeScript), "javadoc" (Java), "go doc" (Go). When None, the supervisor skill renders the {{DOC_TOOL_COMMAND}} placeholder as an empty string and the surrounding prose is authored to read naturally without it.

§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.

§verify_on_commit_nudge: Option<bool>

Whether the broker emits a supervisor.verify-now nudge to the supervisor inbox when an agent publishes an agent.artifact { status: "committed" }.

The nudge makes per-commit verification fire on an explicit event rather than relying on the supervisor’s sweep cadence to notice the commit, so each agent’s commit is verified promptly instead of being batched with a slower agent’s. None (the field omitted from config) resolves to true; set verify_on_commit_nudge = false to suppress the nudge and fall back to sweep-cadence verification. Resolve the effective value with Self::verify_on_commit_nudge_enabled.

§strict_branch_guard: Option<bool>

Whether the per-worktree pre-commit branch guard refuses commits that would advance a branch other than the worktree’s assigned branch.

None (the default) resolves to true via Self::strict_branch_guard — the guard is on unless explicitly disabled. Set [supervisor] strict_branch_guard = false to opt out of enforcement (the post-commit agent.feedback detection still fires; detection without enforcement). Guards against cross-worktree contamination where a commit advances the wrong branch because linked worktrees share .git/refs.

§auto_revert: Option<bool>

Whether the supervisor reverts an opsx role-gating violation commit without first confirming with the user.

Consumed by the supervisor skill’s merge-orchestration revert flow: in block mode the guard publishes a revert-request agent.feedback to the supervisor, and the supervisor confirms with the user before running git revert UNLESS this is true. None (the default) resolves to false via Self::auto_revert — confirmation is required by default so a destructive revert never fires unattended.

§manual_approvals_log: Option<bool>

Whether manual (user-decided) approval patterns are recorded to the per-session log at .git-paw/sessions/<session>.manual-approvals.jsonl and surfaced via git paw approvals.

None (the field omitted from config) resolves to true via Self::manual_approvals_log_enabled — recording is on unless explicitly disabled. Set [supervisor] manual_approvals_log = false to suppress both the log writes AND the derived permission_pattern learnings emission. The opt-out affects writes only; git paw approvals still reads any pre-existing log. See the approval-pattern-surfacing change.

§tell: TellConfig

Configuration for the /tell user→agent routing command.

Carries the default delivery mode and the inventory-cache max age. The TOML table key is [supervisor.tell]. An absent table — every v0.5.0 config — loads TellConfig::default (mode feedback, max age 60s) and round-trips identically because TellConfig::is_default skips serialising the all-default table.

Implementations§

Source§

impl SupervisorConfig

Source

pub fn strict_branch_guard(&self) -> bool

Resolves whether the pre-commit branch guard enforces (blocks) on a branch mismatch. Defaults to true when the config field is absent.

Source

pub fn auto_revert(&self) -> bool

Resolves whether the supervisor reverts an opsx role-gating violation commit without user confirmation. Defaults to false when the config field is absent — a revert always asks first unless explicitly opted in.

Source

pub fn manual_approvals_log_enabled(&self) -> bool

Resolves whether manual-approval pattern recording is enabled.

Returns the configured Self::manual_approvals_log value, or true when the field is unset — recording is on by default.

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.

Source

pub fn verify_on_commit_nudge_enabled(&self) -> bool

Resolves whether the broker should emit a supervisor.verify-now nudge on each committed artifact.

Returns the configured Self::verify_on_commit_nudge value, or true when the field is unset — per-commit verification nudging is on by default.

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 Eq for SupervisorConfig

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 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

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