record_decision
Records one validated judgment call in a plan's hash-chained decision stream for auditable tracking, returning a decision ID or refusal code.
Instructions
Record one judgment call in plan_name's hash-chained stream.
Authorizes decision:record on the plan first (a plan the caller may not
see is refused exactly as a plan that does not exist is), then validates the
ruling, the rationale, the evidence, the decision class and the story key,
then applies the per-principal rate limit, then appends one record and
writes one audit record.
Refusals never raise and return {"recorded": false, "error": <code>}
with one of not_authorized, empty_ruling, empty_rationale,
empty_evidence, invalid_decision_class, unknown_story,
rate_limited (plus retry_after_seconds) or record_refused (the
v2 validator refused a record that passed the checks above -- defence in
depth, never expected).
Success returns {"recorded": true, "decision_id": <32 hex>, "seq": <int>}.
The record: tier follows the bound principal (human for a human,
auto for an agent -- the v2 chain refuses tier="human" from a
non-human principal, so "always human" would be misattribution); the
caller's identity is stamped from the bound principal (S2) and never from an
argument, so an actor argument is ignored; rule carries empty layer,
persona and policy shas and PIPELINE_RECORD_DECISION_MODEL (or
"unspecified"); alternatives carries the rationale as its single
element "rationale: <text>" (an alternatives entry is capped at 200
characters, so the text keeps 189 of them -- a dedicated rationale field is a
later S3 revision); outcome is empty. The question is accepted and
not persisted: the v2 record has no field for it.
Rate limiting: PIPELINE_RECORD_DECISION_PER_MINUTE calls per minute per
principal subject, default 30; a malformed or non-positive value means 30.
The window is in-process memory, so it resets when the process restarts and
is not shared between processes.
Attribution under the shared-secret provider: the caller resolves to
LOCAL_OPERATOR, so a record cannot tell an agent session from a human
one. Agent attribution needs the OIDC identity seam (S2).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"plan_name": "<plan_name>",
"story_key": "<story_key>",
"decision_class": "<decision_class>",
"question": "<question>",
"ruling": "<ruling>",
"rationale": "<rationale>",
"evidence": "<evidence>",
"ignored": "<ignored>"
},
"name": "record_decision"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ruling | Yes | ||
| ignored | Yes | ||
| evidence | Yes | ||
| question | Yes | ||
| plan_name | Yes | ||
| rationale | Yes | ||
| story_key | Yes | ||
| reversible | No | ||
| decision_class | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||