Overview
| Comment: | Reduce rule redundancy: covered-by-global retirement, identical-copy collapse, global-rule offers, restore |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
0f26acda1d309aa47f068aa581c3bec4 |
| User & Date: | context-bot on 2026-11-19 17:17:42.318 |
| Other Links: | manifest | tags |
Context
|
2026-11-19
| ||
| 19:00 | Archive pic conversations from rows in pic.sqlite check-in: 1521145a06 user: context-bot tags: trunk | |
| 18:39 |
Archive pic conversations from rows in pic.sqlite (picu_pi_session_line)
pic is moving its conversations off ~/.pic/sessions files into a table of ~/.pic/pic.sqlite holding the same Pi v3 lines. ctx now reads those rows: each decoded line goes through the existing Pi path, so turns get the same pi- - The session id comes from the header row, kept in a per-conversation cursor (ctx_pic_cursor) with the last seq read and the workspace; a conversation whose header can't be decoded is skipped.
- pic.sqlite is opened read-only, the conversation list is read first and rows in chunks, so no read is held across ctx's commits; a WAL database with no -wal or -shm is read immutable and re-checked after each read.
- An unchanged database (size, mtime and change counter) is skipped on the hourly scan.
- ctx exclude --project and --remove work for pic conversations by their workspace.
- Deflated rows are inflated with zlib, with size checks; a bad row is skipped with a warning.
- CTX_PIC_DB sets the path (default ~/.pic/pic.sqlite); empty skips it. | |
| 17:17 | Reduce rule redundancy: covered-by-global retirement, identical-copy collapse, global-rule offers, restore check-in: 0f26acda1d user: context-bot tags: trunk | |
| 17:07 |
Reduce rule redundancy: covered-by-global retirement, identical-copy collapse, global-rule offers, restore
A benchmark on real rules found reworded duplicates inside a project are rare; the redundancy is project rules that restate the global CLAUDE.md, identical copies, and one rule saved in several projects. - ctx rules restore KEY undoes any retirement or replacement, and neither automatic check retires that rule again while its text and the global text are unchanged. - Identical copies in one project collapse after each import (frontmatter and spacing ignored); a copy comes back when the rule it was collapsed into leaves force. - ctx rules covered sends active project rules to the automatic judge in bounded batches and retires one only with a verbatim quote of at least 20 characters from the global CLAUDE.md; the rule comes back when the quote leaves the global text, and a verdict is skipped if the rule changed during the call. - The decisions page offers groups of the same rule in several projects as one global rule; make global acts only on the listed keys, needs two projects, and refuses CLAUDE.md, AGENTS.md, global rules and rules with an until date. - ctx rules activity lists collapses, covered retirements and restores. tools/rule_redundancy.sh reports what each step would do on a copy of an archive. On a copy of the live archive: 380 active rules, 3 retired as covered, 0 identical copies, 10 cross-project groups offered. closed check-in: 35bb724e4f user: dmestas tags: rule-redundancy | |
| 15:42 | Keep a retired memory rule retired while its file is unchanged check-in: 8c855fd9ae user: context-bot tags: trunk | |