session-memory: session-quality filter (WP-0005 T01)

detect/quality.py: is_real_coding_session drops health-checks / smoke-tests /
interrupted / trivially-short sessions (event floor, repo present, substantive
tool activity, non-trivial prompt). Wired into run_detect so signals only form
over real sessions — fixes the abandoned false-positive. [detect.quality] knobs;
existing detect/curate fixtures made realistic. 8 new tests; suite 80/80.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 11:07:22 +02:00
parent 56b2f576de
commit 70433cda61
7 changed files with 241 additions and 2 deletions

View File

@@ -31,6 +31,13 @@ enabled = true
root = "~/.grok/sessions"
glob = "*/*/chat_history.jsonl"
# Detect phase (AGENTIC-WP-0005): quality filter — drop non-coding/trivial sessions
# before signals form, so health-checks don't mint false-positive patterns.
[detect.quality]
min_events = 20 # below this many events, not a real coding session
min_substantive = 3 # require >= this many substantive (edit/read/shell) tool calls
min_prompt_len = 25 # first prompt shorter than this is treated as trivial
# Curate phase (AGENTIC-WP-0004): catalog location + promotion evidence bar.
[curate]
catalog_dir = "session_memory/catalog" # files-first Pattern Catalog (committed)