Skip to content

applyDestructiveFloor

applyDestructiveFloor(verdict, reason): object

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/rater.ts:1738

THE deterministic floor — the one place an outcome is raised to destructive.

Every gated call reaches it: a shell command through mapVerdictToAction’s preflights (preflightFloorReason), a tool call through its effective openWorldHint (openWorldToolFloorReason, §4.7.3). They differ only in the reason they compute; what the reason then does to the outcome is decided here and nowhere else. A second implementation is how a gate and a display come to disagree about what a call is, and how one of them comes to lower an outcome the other raised.

Two properties, both delegated to isBelowDestructiveFloor so they hold for every caller:

  • It only ever RAISES. A destructive, catastrophic or attack verdict passes through untouched, keeping its own explanation (and any §4.4 suggestion) — the floor is agreeing with it, not overriding it, and a floor that rewrote catastrophic would silently trade an unnegotiable escalation for a negotiable one.
  • undefined is below the floor. Nothing has assessed the call, so there is no outcome for the floor to defer to; a call nobody rated is exactly the call this rule exists to speak for. That is what lets a tool call — which no rater sees while §4.3’s scope boundary stands — be floored by the same function that floors a rated shell command.

The outcome so far, or undefined when nothing has rated the call.

"safe" | "destructive" | "catastrophic" | "attack" = ...

string = ...

string = ...

string | null

The floor reason, or null when no preflight fired (the verdict is returned as-is).

object

outcome: "safe" | "destructive" | "catastrophic" | "attack"

reason: string

optional suggestedTool?: string

applyDestructiveFloor(verdict, reason): { outcome: "safe" | "destructive" | "catastrophic" | "attack"; reason: string; suggestedTool?: string; } | undefined

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/core/shell/rater.ts:1742

THE deterministic floor — the one place an outcome is raised to destructive.

Every gated call reaches it: a shell command through mapVerdictToAction’s preflights (preflightFloorReason), a tool call through its effective openWorldHint (openWorldToolFloorReason, §4.7.3). They differ only in the reason they compute; what the reason then does to the outcome is decided here and nowhere else. A second implementation is how a gate and a display come to disagree about what a call is, and how one of them comes to lower an outcome the other raised.

Two properties, both delegated to isBelowDestructiveFloor so they hold for every caller:

  • It only ever RAISES. A destructive, catastrophic or attack verdict passes through untouched, keeping its own explanation (and any §4.4 suggestion) — the floor is agreeing with it, not overriding it, and a floor that rewrote catastrophic would silently trade an unnegotiable escalation for a negotiable one.
  • undefined is below the floor. Nothing has assessed the call, so there is no outcome for the floor to defer to; a call nobody rated is exactly the call this rule exists to speak for. That is what lets a tool call — which no rater sees while §4.3’s scope boundary stands — be floored by the same function that floors a rated shell command.

{ outcome: "safe" | "destructive" | "catastrophic" | "attack"; reason: string; suggestedTool?: string; } | undefined

The outcome so far, or undefined when nothing has rated the call.

string | null

The floor reason, or null when no preflight fired (the verdict is returned as-is).

{ outcome: "safe" | "destructive" | "catastrophic" | "attack"; reason: string; suggestedTool?: string; } | undefined