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: boolWhether 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: ApprovalLevelApproval 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: ConflictConfigConflict 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: boolOpt-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: LearningsConfigTuning 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: CommonDevAllowlistConfigCommon 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: TellConfigConfiguration 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
impl SupervisorConfig
Sourcepub fn strict_branch_guard(&self) -> bool
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.
Sourcepub fn auto_revert(&self) -> bool
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.
Sourcepub fn manual_approvals_log_enabled(&self) -> bool
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.
Sourcepub fn gate_commands(&self) -> GateCommands<'_>
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.
Sourcepub fn verify_on_commit_nudge_enabled(&self) -> bool
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
impl Clone for SupervisorConfig
Source§fn clone(&self) -> SupervisorConfig
fn clone(&self) -> SupervisorConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SupervisorConfig
impl Debug for SupervisorConfig
Source§impl Default for SupervisorConfig
impl Default for SupervisorConfig
Source§fn default() -> SupervisorConfig
fn default() -> SupervisorConfig
Source§impl<'de> Deserialize<'de> for SupervisorConfig
impl<'de> Deserialize<'de> for SupervisorConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SupervisorConfig
Source§impl PartialEq for SupervisorConfig
impl PartialEq for SupervisorConfig
Source§fn eq(&self, other: &SupervisorConfig) -> bool
fn eq(&self, other: &SupervisorConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for SupervisorConfig
impl Serialize for SupervisorConfig
impl StructuralPartialEq for SupervisorConfig
Auto Trait Implementations§
impl Freeze for SupervisorConfig
impl RefUnwindSafe for SupervisorConfig
impl Send for SupervisorConfig
impl Sync for SupervisorConfig
impl Unpin for SupervisorConfig
impl UnsafeUnpin for SupervisorConfig
impl UnwindSafe for SupervisorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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