Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions demos/larql_polysemantic_hierarchical/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ def print_gram_heatmap(gram: np.ndarray) -> None:
"""Print |gram|² as a 4-tier 12×12 ASCII heatmap with hierarchy labels."""
gsq = np.abs(gram) ** 2
print(" |gram[i,j]|² (# ≥ 0.7, o ∈ [0.3, 0.7), . ∈ [0.05, 0.3), blank < 0.05)")
print(
" The dot tier includes values arbitrarily close to the blank threshold"
" (e.g. 0.055, 0.063 below); the tabulated decimal is the source of truth."
)
print(" ", "".join(f"{i:>3}" for i in range(12)))
for i in range(12):
row = "".join(f" {heatmap_tier(gsq[i, j])}" for j in range(12))
Expand Down
15 changes: 14 additions & 1 deletion openspec/changes/tech-debt-backlog/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ picked up.
example-driven (could miss tasks without `§N.M`-style
anchors)".)

- [ ] 7.20 **Re-tier the heatmap legend in the larql-polysemantic-
- [x] 7.20 **Re-tier the heatmap legend in the larql-polysemantic-
hierarchical demo to disambiguate the 0.055 rows.** Severity:
LOW. Surface:
`demos/larql_polysemantic_hierarchical/demo.py:85,99`. The
Expand All @@ -1629,6 +1629,19 @@ picked up.
`logs/pr-review-2026-05-29.log`, "the 0.055 rows sit just
above the heatmap's 0.05 display tier, which could briefly
confuse a cross-checking reader".)
Took option (b): added one extra `print(...)` line in
`print_gram_heatmap` (`demos/larql_polysemantic_hierarchical/demo.py`)
immediately after the existing tier-legend line, noting that the
dot tier includes values arbitrarily close to the blank threshold
(with the `0.055` / `0.063` cells called out by example) and that
the tabulated decimal is the source of truth. The four-tier
cutoffs themselves are unchanged so the demo's heatmap output is
visually stable for downstream readers; the `heatmap_tier`
docstring stays canonical (no duplication of the new explanatory
text). Verified the demo runs end-to-end (`PASS` on the empirical-
vs-analytic threshold) and the full suite stays green
(1282 passed, 8 skipped). No code or test changes beyond the
legend-print addition.

## Feedback triage — 2026-06-05

Expand Down
Loading