save_decision
Capture or revise decision proposals with rationale, anchors, sources, and owner. It compares existing records, avoids duplicates, preserves history, and queues changes for review.
Instructions
Capture or revise a decision proposal with rationale, anchors, optional owner, sources, and a known actor. Compare matching get_context records and pending proposals before saving. When new evidence changes the same lesson's assumptions, scope, or recommended action, pass its existing id, including for accepted records. Preserve supported rationale and sources and replace obsolete instructions. Create a new record for a genuinely distinct lesson; skip unchanged restatements. No setup or map required. Writes a local record and preserves content history. Changes create a pending proposal while the last accepted revision remains operative; unchanged content does not re-verify or refresh it. Use review_decision for authorized acceptance or reaffirmation. A proposal cannot supersede a record with an operative accepted revision; review its replacement and retire the original separately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Pass the matching record's existing id when evidence changes that lesson's assumptions, scope, or recommended action, including for accepted records. Changed content becomes a proposal while the accepted version remains operative; unchanged content leaves review and freshness untouched. | |
| dir | Yes | Absolute path to the project root directory | |
| body | Yes | The knowledge itself: what was tried/decided, why, and what to avoid. Must contain information NOT derivable by reading the code. Aim for 1500 characters or fewer; up to 2500 is accepted with a warning above the target. Matching context and hooks include the full body. Preserve exceptions; use sources for supporting references. | |
| actor | No | Known person or agent recording this revision. Omit if unknown; do not infer from Git identity. | |
| files | No | Repo-relative files or directory prefixes this applies to. Matching is shared by retrieval, hooks, review, and drift checking; changes flag the decision for re-verification. | |
| force | No | Save even when a near-duplicate was detected | |
| owner | No | Responsible person or team, when known. Null clears it. Required for acceptance. | |
| title | Yes | Short, specific headline (max 80 characters). Generates a stable id on creation; revising the title keeps the existing id. | |
| sources | No | Known PR, issue, incident, discussion, or document references. Omit to preserve; [] clears. At least one is required for acceptance. | |
| category | Yes | ||
| supersedes | No | Id of an unreviewed record or proposal with no accepted revision to replace. Operative accepted decisions require separate review and retirement. |