bib/llm: code + family anchors across the whole corpus — item tags and chunk metadata on rules, comments, IOM, eCFR, MLN #688
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Spec docs/superpowers/specs/2026-09-09-code-family-longitudinal-design.md (§Decisions 4;
bib/tag.py,llm/chunk.py,llm/index.py).Gap measured 2026-09-09. Only the
rulespgvector collection carriescodesmetadata (29,595 of 67,340 chunks);comments(918,484 chunks) andcorpus(235,140 chunks) carry none. No bib item has acode:orfamily:tag; the 177 IOM chapters (MCPM ch. 12SPJB4FX2, MBPM ch. 15YQFGB6JS= 988 corpus chunks), the 699 eCFR sections (§ 410.78SAJSGG28, § 410.26Q78GP4Z9, § 414.22T7PXFV4S) and MLN909188 (PV8APQ4A, CCM/PCM/APCM booklet) are reachable only by semantic search.What. Two anchor layers, one per consumer:
code:<hcpcs>andfamily:<key>(new namespaces inbib/tag.py), applied by a tagger that walksfr_anchors.textfor rules, chunk text for comments, attachment text for IOM/MLN, section text for eCFR. Nightly zotero-sync carries them under the P38 tag-merge rules (sup:tags stay load-bearing).codes(existing),families,elements(type=valueslugs when the chunk mentions a vocabulary value) on all three collections; one-timestack llm index --collection all --force(rules re-index ran at ≈5–6 rules/min on the 3-GPU pool in P34; comments will take days — run per docket, sealed dockets first).Done when
code_cited_sources(P48) can pull comment and IOM chunks for a code, e.g. 1,507 comment items whose chunks mention 99490/CCM appear withcodes ∋ 99490, andstack bib tags --ns codelists counts per code per source type.Anchors progress (branch worktree-p49-anchors-2, unmerged):
stack bib code-tags(7eeee59+ fixc3628d8) tags bib items from chunk anchors and FR paragraphs —code:<HCPCS>/family:<KEY>namespaces, additive and idempotent, wide items (>200 distinct codes across all sources) getfamily:tags only. Live: 67,198 items, 486,519 tags (22,111 distinctcode:, 786family:); the six CPT edition items carry their family tags. Fix round merged the per-source mappings before the cap and addedStore.add_tags(one commit per item; the first run took 34 min on per-tag commits). Next: code/family-cited sources across collections (Task 5).Merged to main as
4616d36(branch worktree-p49-anchors-2, Tasks 4–8 of the anchors plan; suite 14,944 passed). Residue parked by rulings is tracked in #705 (CPT manual as a chat source, IOM page locating, MLN resolver, shared SQL predicate, key case).