trw_learn_update
Update an existing engineering learning record to reflect resolved issues, obsolete patterns, or improved insights, and adjust its recall ranking through feedback signals.
Instructions
Update an existing learning — status, fields, or feedback signal.
Use when:
The issue a learning describes has been fixed (status="resolved").
A pattern is no longer applicable (status="obsolete").
Detail or summary can be sharpened now that root cause is clearer.
You want to boost/demote an entry's recall ranking via feedback.
Output: dict with fields {status: "updated"|"not_found"|"invalid", error?: str, field_updated?: str}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Replace the entry's tag set. Passing `[]` clears all tags. Callers are responsible for dedup/normalization. | |
| type | No | Updated type — "incident", "pattern", "convention", "hypothesis", or "workaround". | |
| detail | No | Updated detail text (replaces existing detail). | |
| domain | No | Updated domain tags. | |
| impact | No | Updated impact score (0.0-1.0). | |
| status | No | New status — "active", "resolved", or "obsolete". Resolved/obsolete entries stop appearing in recall. | |
| expires | No | Updated expiration date/condition. | |
| summary | No | Updated summary text (replaces existing summary). | |
| feedback | No | Signal whether this learning was helpful or unhelpful — "helpful" or "unhelpful". Affects recall ranking via feedback-aware decay (PRD-CORE-132). | |
| task_type | No | Updated task type identifier. | |
| assertions | No | Replace assertions on this entry (PRD-CORE-086 FR12). Empty list removes all. | |
| confidence | No | Updated confidence — "unverified", "low", "medium", "high", or "verified". | |
| nudge_line | No | Updated nudge text (max 80 chars, auto-truncated). | |
| supersedes | No | id of a PRIOR learning that THIS learning replaces/corrects (PRD-CORE-194 FR04). Closes the prior record's validity window (sets its invalid_from + invalidated_by=this id) and RETAINS it — never a delete. Fires ONLY when explicitly passed; a routine field edit never closes a window. | |
| learning_id | No | ID of the learning to update (e.g., "L-abc12345"). | |
| team_origin | No | ||
| phase_origin | No | ||
| phase_affinity | No | Updated phase affinities. | |
| protection_tier | No | Updated protection tier. |