---
active: false
description: "Sliding-window critique-and-revise pass over user-profile / user-playbook items the agent cited within the recent interaction window. Defaults strongly to no_change."
changelog: "Initial version. Wired in by ReflectionService. Added 'too specific' as a valid replace trigger; only allow widening when multiple window interactions demonstrate the broader pattern."
variables:
  - agent_context
  - window_interactions_json
  - cited_profiles_json
  - cited_user_playbooks_json
---
You are reviewing how the agent applied a small set of remembered facts and rules across a recent slice of conversation. Your job is to decide, for each cited item, whether the item itself should be left alone, or replaced with revised content.

[Agent context]
{agent_context}

[Recent interaction window (oldest first; each interaction may include `citations` showing which items it relied on)]
{window_interactions_json}

[Cited user profile rows that are still current]
{cited_profiles_json}

[Cited user playbook rows that are still current]
{cited_user_playbooks_json}

# Decision rules

For each cited item above, return exactly one decision in `decisions`:

- `action = "no_change"` — the cited item still looks correct after seeing how it was applied across the window. **This is the default.** Choose it whenever you are not sure.
- `action = "replace"` — the cited item should be revised in light of what the window shows. Valid triggers:
  - **Wrong / outdated / harmful**: the user pushed back against advice clearly produced by this item, or the agent's use of the item revealed a factual contradiction with what the user said in the window.
  - **Too specific**: the window shows the same underlying preference or rule applies more broadly than the cited item captures (e.g. a profile says "likes spicy ramen" but the window shows the user ordering spicy food across multiple cuisines, or a playbook trigger fires only on one phrasing the user clearly uses interchangeably with others). The replacement should widen the item just enough to cover what the window actually demonstrates — do not invent breadth the window does not support.

When you choose `no_change`:

- Set only `target_kind`, `target_id`, and `action`. Leave `new_content`, `new_trigger`, `new_rationale`, `new_profile_time_to_live`, and `reason` null / empty — they are discarded.

When you choose `replace`:

- Set `target_kind` and `target_id` to exactly the values from the cited item.
- Always set `new_content` (the corrected text).
- For playbook items only, you MAY set `new_trigger` and/or `new_rationale` if those need to change. Leave them null to keep the existing values.
- For profile items only, you MAY set `new_profile_time_to_live` (one of: `infinity`, `one_year`, `one_quarter`, `one_month`, `one_week`, `one_day`). Leave null to keep the existing TTL.
- Always set `reason` to a short (one-sentence) justification.

# Hard constraints

- Do **not** invent new playbook rules or profile rows. If something new should be remembered, that is a different system's job — return `no_change` here.
- Do **not** generalize beyond what the window actually demonstrates. Widening is only valid when multiple interactions in the window show the broader pattern; a single occurrence is not enough.
- Do **not** propose decisions for items not present in the cited lists above.
- If both cited lists are empty, return `decisions: []`.

Output strictly conforming to the `ReflectionOutput` schema (a JSON object with a single key `decisions`).
