decision_record
Record a user's judgment on a task or project, including kind, reason, and optional auto-expiry, to preserve decisions and avoid re-litigation. Writes a decision journal entry to the target's note.
Instructions
Record agent memory of user judgment on a task or project — kind, reason, and an optional auto-expiry. Writes a decision-journal fenced block to the target's note (preserving any existing user prose), so future scans (e.g. project_health) can honor the decision instead of re-litigating it. Discriminates on targetKind: 'task' or 'project'. Do NOT use this for short-lived state — prefer waiting-on for follow-ups, or task_update for routine field changes. Pass idempotency_key to coalesce retries so the same decision is recorded only once. Returns { targetKind, targetId, decision } with the persisted entry. Side effects: writes the target's note via task_update / project_update; sets meta.syncPending = true. Example: { "targetKind": "project", "targetId": "abc", "decision": { "kind": "stall-is-intentional", "reason": "Strategic pause until Q3" } }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| decision | Yes | The decision payload. `recordedAt` is set automatically on write. | |
| targetId | Yes | ID of the task or project. Must match `targetKind` — agent-side validation, but the adapter call surfaces NotFound if the ID is wrong. | |
| targetKind | Yes | Whether the decision attaches to a task or a project. | |
| idempotency_key | No | Idempotency key for retry-safe writes. Append-shaped tools like this one duplicate silently on retry without a key; supply a stable per-decision identifier and identical retries within the TTL window replay the original envelope with meta.idempotentReplay = true instead of appending another journal entry. See docs/idempotency.md. |