Artifact 68d2ea96bd756554c17a2896321c559dcfdfcd39c632b799773131ad945c7b72:
- File
src/ctx.c
-
2026-11-11 03:24:46
— part of check-in
[efad0e0a17]
on branch rule-judge
— Ask about a rule only with the person's own words as evidence; monthly review; scan on any turn
A judge command (ctx rules judge-with CMD, any command that answers on stdout) checks active rules in projects with new turns, at most weekly per rule and 20 per run, beside the person's latest 60 turns there. It flags a rule only with a quote of at least four words and 24 characters found exactly in one of those turns, so it cannot invent a contradiction or stitch one from two turns. A failing or unreadable answer records nothing. Instruction files (CLAUDE.md, AGENTS.md) are never judged.
The SessionStart offer then asks about at most one flagged rule, once in 30 days, with the quote, at a natural break; the answer runs ctx rules keep (not asked again for 90 days) or retire. ctx rules review lists up to 30 rules not reviewed or kept in 90 days, and the offer mentions it once a month.
The hourly scan, which archives, imports rules, proposes, judges and syncs, now also rides on Stop events: sessions that run for days and start once got it only on resume or compaction.
In an experiment on 42 labelled rules (bench/rules/stale_judge.py), Sonnet flagged 3, all stale; Haiku flagged 9 with 3 wrong. An independent audit found seven problems, all fixed with tests: instruction files judged, malformed answers recorded as checks, same-day turns reversed, a crash on an early model failure, a short-quote bar, quotes spanning turns, raw wait status in messages.
A kept table records checks, so the user version rises to 5. (user: dmestas, size: 261332) [annotate] [blame] [check-ins using]
- 2026-11-11 03:38:11 — part of check-in [15c4935f34] on branch trunk — Ask about a rule only with the person's own words as evidence; monthly review; scan on any turn (user: context-bot, size: 261332) [annotate] [blame] [check-ins using]
-
2026-11-11 03:24:46
— part of check-in
[efad0e0a17]
on branch rule-judge
— Ask about a rule only with the person's own words as evidence; monthly review; scan on any turn