Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions agent/background_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,14 @@ def _digest_history(messages_snapshot: List[Dict], tail: int = 24) -> List[Dict]
"ACTIVE — most sessions produce at least one skill update, even if "
"small. A pass that does nothing is a missed learning opportunity, "
"not a neutral outcome.\n\n"
"Relevance gate (mandatory): before any skill_manage(write_file), "
"skill_manage(patch), or skill_manage(create), verify that the "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This says the gate applies before “any” mutation, but skill_manage(action="edit") is also a supported full SKILL.md rewrite (tools/skill_manager_tool.py:864). Please cover edit too, preferably by phrasing this as every mutating skill action.

"content is directly about the skill's documented purpose and scope. "
"A skill about X should not receive references about Y, even if Y is "
"interesting research. When in doubt, do not write — 'nothing to "
"save' is the correct outcome for sessions that did not involve the "
"skill's domain. Topical mismatch is the most common false positive; "
"refusing to write is a valid, valuable action.\n\n"
"Target shape of the library: CLASS-LEVEL skills, each with a rich "
"SKILL.md and a `references/` directory for session-specific detail. "
"Not a long flat list of narrow one-session-one-skill entries. This "
Expand Down Expand Up @@ -290,8 +298,15 @@ def _digest_history(messages_snapshot: List[Dict], tail: int = 24) -> List[Dict]
"how you should behave? Save facts about the user and durable "
"preferences with the memory tool.\n\n"
"**Skills**: how to do this class of task. Be ACTIVE — most "
"sessions produce at least one skill update. A pass that does "
"nothing is a missed learning opportunity, not a neutral outcome.\n\n"
"sessions produce at least one skill update. A pass that "
"does nothing is a missed learning opportunity, not a neutral outcome.\n\n"
"Relevance gate (mandatory): before any skill_manage(write_file), "
"skill_manage(patch), or skill_manage(create), verify that the "
"content is directly about the skill's documented purpose and scope. "
"A skill about X should not receive references about Y, even if Y is "
"interesting research. When in doubt, do not write — 'nothing to "
"save' is the correct outcome. Topical mismatch is the most common "
"false positive; refusing to write is a valid, valuable action.\n\n"
"Target shape of the skill library: CLASS-LEVEL skills with a rich "
"SKILL.md and a `references/` directory for session-specific detail. "
"Not a long flat list of narrow one-session-one-skill entries.\n\n"
Expand Down
Loading