Skip to content

buildRaterSystemPrompt

buildRaterSystemPrompt(grantedTools?, options?): string

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

Build the rater’s system prompt: the invariant RATER_SYSTEM_PREAMBLE, the four outcome definitions (with §4.1’s recoverability question spelled out in RATER_CATASTROPHIC_GUIDANCE and §4.1.1’s structural test in RATER_ATTACK_GUIDANCE), the rules that make destructive the catch-all and uncertainty a destructive rather than an outcome of its own, and — when the caller supplies them — the already-granted tools of §4.4 (buildGrantedToolsGuidance).

destructive is defined last and by exclusion on purpose: the two severe outcomes have to be on the page before “everything else” can mean anything, and defining the catch-all in terms of the other three is what makes it structurally impossible for a command to fall outside the four.

There is no strictness parameter: §1 removed strictness levels along with severity thresholds, so the rating criteria are the same at every rated rung.

[[EXT-127]] — there is no negotiation-context parameter either, and its absence is the whole of deliverable (a). The classifier rates the command and nothing else: no justification, no transcript, no user messages, so there is nothing for a block about weighing them to govern. The question those blocks existed to answer — is this what the user asked for? — is now the alignment checker’s, assembled across message roles rather than stacked into this one prompt (import(‘./alignment.js’).buildAlignmentMessages).

negotiable appends RATER_NEGOTIABLE_REJECTION_GUIDANCE — §5.2’s rules for wording a rejection the agent will read — and it survives the split unchanged, because it is keyed on whether the rejection is addressed to the agent at all, which is what the RUNG says, and not on whether this rating happens to be a later round. It only ever APPENDS, so a negotiating rung’s system prompt still has the plain one as its prefix.

[[EXT-106]]’s carved SWAPS a block rather than appending one: §4.6.1’s deception guidance asserts that a floor already fired, and on a command the user-provenance carve-out lifted that floor from, the assertion is backwards. See RATER_DECEPTION_GUIDANCE_CARVED.

readonly GrantedToolSummary[]

§4.4’s already-granted built-ins, or nothing.

negotiable — whether a rejection will be handed back to the agent (§5.2), i.e. the rung negotiates (import(‘#src/config.js’).isNegotiatingRung). carved — [[EXT-106]] §4.6, whether the user-provenance carve-out lifted the open-world floor on this command (import(‘./provenance.js’).isOpenWorldCarved). A plain boolean here rather than the provenance itself, because this is a prompt and not a decision: the floor is decided by mapVerdictToAction from the raw command and the user’s own words, and nothing a caller passes here can move it. A wrong true asks the rater for MORE severity, which is the direction a prompt may safely be wrong in.

boolean

boolean

string