fix(review): make skill curation precision-first - #64655
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for tightening the review policy. The current prompts do contain the reported activity bias (agent/background_review.py:181-205 and :286-307), and the shared gate addresses it without changing the foreground session or tool schema.
Problems
- The updated ladders still instruct the reviewer to use skills merely previously loaded in the conversation (
agent/background_review.py:224-253,:323-348in this PR). Background-review writes are rejected unless the exact target was read withskill_viewin the current review turn (tools/skill_manager_tool.py:382-409; enforced for patch at:959-966). A quality-gated update can therefore still fail its first write attempt.
Suggested changes
- Add the explicit fresh
skill_viewrequirement for every existing target to both ladders, and cover it with a prompt-contract assertion.
Automated hermes-sweeper review.
| "pick one when a signal above fired:\n" | ||
| "to be wrong, missing a step, or outdated. Treat the proven gap as a " | ||
| "candidate and patch only if every quality-gate criterion passes.\n\n" | ||
| "After the quality gate passes, use this preference order — prefer the " |
There was a problem hiding this comment.
Add the current-review-turn read-before-write instruction before this ladder, and mirror it in the combined prompt. tools/skill_manager_tool.py:382-409 rejects background-review edits, patches, removals, and overwrites unless the exact target was loaded with skill_view in this review turn; looking back at a skill loaded in the inherited conversation does not satisfy that guard.
SummaryEight PRs address or reference this skill-lifecycle complex. Their diffs separate into class-first curation (#16026), transient-failure filtering (#23004), write hygiene (#23288), memory routing (#24846), trigger repair (#55965), precision gating (#64655), and the duplicated read-before-write implementation in #59175/#75020. Related pull requests
Duplicates#59175 and #75020 implement materially the same #58475 fix; the explicit duplicate chain is #59175 → #75020, with #59175 already closed as superseded. #23288 and #64655 overlap on reducing low-quality writes but retain distinct hygiene and persistence-gate scopes. Suggested consolidationKeep #64655 open with a salvage path: retain its precision-first quality gate and memory/skill routing, but require a fresh Complex graphflowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I429(["issue #429 (open)"])
I6051(["issue #6051 (closed)"])
I58475(["issue #58475 (open)"])
P64655["PR #64655 (open)"]
P64655 -.->|partial| I429
P64655 -.->|partial| I6051
P64655 -.->|partial| I58475
class I429 open
class I6051 closed
class I58475 open
class P64655 open
class P64655 target
click I429 "https://github.com/NousResearch/hermes-agent/issues/429"
click I6051 "https://github.com/NousResearch/hermes-agent/issues/6051"
click I58475 "https://github.com/NousResearch/hermes-agent/issues/58475"
click P64655 "https://github.com/NousResearch/hermes-agent/pull/64655"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 8 pull requests and 3 issues in this complex. Each diff was read against this issue; Assessment working set: 100 kB of PR diffs, 37 kB of issue/PR text, 14 kB of discussion (14 comments), 15 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
Summary
Nothing to save.a normal, healthy outcomeWhy
The current prompt says most sessions should produce a skill update and frames a no-op as a missed opportunity. That pressure encourages one-incident references, duplicated preferences, and speculative claims to become persistent instructions.
This change preserves self-improvement while optimizing for precision instead of write volume.
Partially addresses #57057. It complements, without duplicating, the background write-approval work in #63019 and read-before-write work in #60331.
Tests
uv run pytest tests/run_agent/test_background_review.py tests/run_agent/test_background_review_summary.py tests/run_agent/test_background_review_cost_controls.py tests/run_agent/test_background_review_cache_parity.py tests/run_agent/test_background_review_toolset_restriction.py tests/run_agent/test_review_prompt_class_first.py tests/test_background_review_list_shapes.py tests/test_background_review_session_isolation.py -q— 79 passeduv run ruff check agent/background_review.py tests/run_agent/test_review_prompt_class_first.pygit diff --cached --checkf06118a...— approvedf0a1c29...— approved