comments: position classification + thematic tagging #254
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?
Objective
Classify each comment by position and tag with policy themes.
Position Scale (5-point)
Theme Tags
Method
Weighted regex pattern matching (hti5 approach) — curated keyword lists per position/theme, score threshold for assignment. Deterministic and reproducible.
Status: groundwork exists, the analysis run does not.
skin_subs.rulemaking_commentsalready has theposition,position_score, andthemescolumns, but holds only a 15-row pilot (no writer script survives in-tree). Inputs are ready at scale: every comment's combined text is in bib/Zotero (#253, closed) and the corpus is downloaded (#251, closed). Remaining work: the classifier itself over the ~23k target-docket comments.Pipeline implemented in
452f1587b8:rex.comments.classify— relevance filter + LLM classification (forced tool call via the provider-agnosticprisma.llmlayer): 5-point position, the 9 theme tags, stakeholder type (#255), provisions (#256), and commenter/organization from letterhead/signature (#416). Enum-validated output.dev/scripts/classify_comments.py— per-docket driver: text from bib (combined.md note preferred, inline abstract fallback), resumable JSONL cache, loadsskin_subs.rulemaking_commentsviaduckdb_batchand sweeps the DEMO pilot rows.Blocked on Anthropic API credits ("credit balance is too low"). Once topped up, the full run is one command (~$2 on haiku):
The thematic-tagging half of this issue will be implemented on the new llm module (RAG against the Zotero corpus, closed vocab) — see milestones P33–P35 and #575 specifically. Position classification can then consume the same retrieval + structured-output engine. Spec:
docs/superpowers/specs/2026-07-16-llm-module-design.md.Status audit (2026-08-13, repo-verified): PARTIAL — machinery complete, never executed. classify.py (positions/themes/stakeholders/provisions) + classify_comments.py runner + table loader all exist, but data/cms/comments-classified-CMS-2025-0304.jsonl is 0 bytes and skin_subs.rulemaking_comments has 384 rows with 0 non-null position. Also: 2 of the body's 11 themes exist only as PROVISIONS, and the body specified deterministic weighted-regex while the impl is LLM tool-calling (prisma provider — note the llm-module-local-only policy applies to the llm module, not prisma). P36 (#588) corrected this docket's rule identity to CMS-1832-P (PFS) — re-check the prompt's framing before running.