Repository navigation
v0.6.24: Canonical topics-table fetch + generic regression markers
Canonical topics-table fetch + generic regression markers
This release strengthens how the report-builder skill consumes the thoughtleaders_topics taxonomy and tightens the skill's prompt prose so it ages better.
Skill-content only — no Python or CLI surface changes. Backward-compatible with v0.6.23 for every tl command.
What changed in the skill (PR #31)
Canonical topics-table fetch — single source of truth
The verbatim fetch SQL for thoughtleaders_topics now lives in exactly one place: skills/tl/references/postgres-schema.md → thoughtleaders_topics → Fetch query. Dependent skill text (tools/topic_matcher.md + SKILL.md T1) links to it instead of restating the command.
grep -c "SELECT id, name, description, keywords FROM thoughtleaders_topics" returns 1 across the repo — the canonical home. Future changes to the fetch shape (different columns, different LIMIT, different table) update one file, not three.
Behaviour rules at the agent consumption point
The tool prompt no longer restates SQL, but it does pin the agent-side rules for invoking the fetch — three explicit anti-patterns the canonical-home framing alone wasn't catching:
- ❌ Don't push a name-pattern
WHEREclause into the fetch query (WHERE name ILIKE '%X%' OR name ILIKE '%Y%' OR ...). The table has fewer than 20 rows; fetch all, filter client-side. - ❌ Don't run
information_schema.columnsto inspect the table. If you need column names, read the schema reference. - ❌ Don't retry with broader name patterns when the matcher emits
summary.no_match: true— that's off-taxonomy. Fall through to keyword_research (T2).
Empty-fetch ≠ off-taxonomy
A semantic distinction the prior skill text conflated:
| Fetch result | Meaning | Next step |
|---|---|---|
| Non-empty, matcher emits ≥1 strong/weak verdict | Curated match found | Use the topic's keywords[] (topic-strong path) |
Non-empty, matcher emits all none (summary.no_match: true) |
Off-taxonomy — niche has no curated topic | Fall through to keyword_research (T2) |
| Empty (zero rows) | Data-plane failure or empty taxonomy — NOT off-taxonomy | Surface the failure; re-fetch once; if still empty, escalate to the user. Do not silently fall through to T2. |
The no-WHERE canonical fetch returns the whole taxonomy in one call; a zero-row result means the table is empty, the DB returned an error, or the request was truncated — never "the niche didn't match." Off-taxonomy is the matcher's job, downstream of the fetch.
Generic regression markers
The new prompt text describes anti-pattern shapes generically rather than naming specific dated incidents. Generic teaching examples (the form of a bad WHERE clause, the form of a forbidden phrase) stay; dated/named specifics (run names, dates, exact credit costs, quoted user prompts) don't appear in new skill content going forward.
Pre-existing markers in main are untouched in this release — a future sweep can normalise the older content if desired.
Why this matters
Without this change, agents have improvised the fetch SQL — typically two or three name-pattern WHERE queries against the topics table, sometimes interleaved with an information_schema.columns inspection — each returning zero and burning round-trips. The canonical-home + behaviour-rules pairing closes that loop: the agent sees the verbatim command (in the reference), the anti-patterns (in the prompt), and the empty-fetch semantics (in both).
Upgrade
# pipx / uv tool users:
tl update
# pip users:
pip install -U thoughtleaders-cli
# Then re-sync Claude Code:
claude plugin update tl-cli@thoughtleaders-plugins
# and restart Claude Code so the new SKILL.md loads on next sessionStack
| State | |
|---|---|
| v0.6.21 | ✅ Released (PR #25 — preview-first defaults + 12 cited regressions) |
| v0.6.22 | ✅ Released (PR #29 — Phase 2 validation speed-up) |
| v0.6.23 | ✅ Released (Windows install-method detection fix) |
| v0.6.24 | This release — PR #31 |
🤖 Skill content + version bump only. No Python touched.