#17 refactor: self-updating model catalog, then trim agent-notes to its mission - #31
Merged
Merged
Conversation
…der, hook and installer
This was referenced Jul 29, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements epic #17 — make the model catalog self-updating, then trim agent-notes back to its mission: a shared template of skills, agents, and a role→model→effort map.
144 files changed, +3,852 / −5,816 (net −1,964 LOC). Suite green:
1780 passed, 15 deselected.Three live bugs found and fixed
These were not in the original scope. They surfaced while verifying the plan's assumptions.
$15/$75instead of$5/$25. Two defects compounded:normalize_modelonly rewrote dashed pairs, soclaude-opus-5passed through untouched and then hit the*opus*catch-all in the legacy pricing row. No warning fired, because something did match. Verified against real session files, whereclaude-opus-5is the exact string reaching the pricer.claude-opus-4-10and4-11priced as legacy — surfaced only once model IDs were stored in a single canonical form. Fixed by anchoring the globs so*opus-4-1cannot swallow4-10.claude-fable-5was unreachable as a default — it declaredmodel_class: fable, but no role declarestypical_class: fable. Now classified into the frontier class and markednever_default, so it stays selectable by pin but is never auto-assigned. Fable is a frontier model, but too expensive to hand an agent by default.What changed
Catalog (#18, #20, #21, #22) —
data/models/*.yaml(14 hand-maintained files) is replaced by three layers: a committedseed.jsonsnapshot of what providers publish, arules.yamljudgment layer (classes, families, deprecation, capabilities), and an optional user override.agent-notes models refreshfetches the two provider endpoints and writes a cache;models freezepromotes that cache to the seed for committing. Refresh → review diff → freeze → commit is now the whole model-update workflow — no code change per provider release.buildnever touches the network. It reads~/.cache/agent-notes/catalog.json, falling back to the committed seed. Onlyrefreshfetches, via a lazily-imported stdliburllib.request— no new dependency.The catalog swap was gated:
test_catalog_equivalence.pyasserts the generated catalog matches the previous 14 models field-for-field. The YAMLs were deleted only after it was green.Scope narrowed to anthropic + openai — github-copilot aliases dropped. #29 (adopt models.dev) was closed as not-planned on the same grounds: every install in
state.jsonisclaudeonly, so the Bedrock/Vertex/Copilot alias tables it uniquely provided are not reachable today.Mission trim (#19, #23, #24, #25, #26) — deleted the wiki memory backend (~2,500 LOC across 8 modules, plus the
wiki-compileragent), dead code (tiers,Model.pricing,strip_memory_section,doctor_checks.py), and three skills that Superpowers ships longer versions of (tdd,brainstorming,writing-great-skills). Memory and cost-report were decoupled fromrendering.py,hook.pyandinstaller.pyand colocated underagent_notes/memory/andagent_notes/cost/.A
state.jsonwithmemory.backend: "wiki"now raises a clear migration error — never a silent switch to another backend.Credential guard (#27) — fixed false positives that were blocking work on this repo: template files (
credentials.example.yml,secrets.sample.json), source files (services/credentials.py), and keyword-only commands. A template marker must be its own dotted component, and hard-secret extensions (.enc,.key,.pem, …) are never exempt, sofoo.example.keystays blocked. A security audit of the first implementation found six bypasses —bash -c,dd if=,python -c,example.env,secret/config.py, and--flag=path— all confirmed empirically and closed.data/rules/safety.mdwas updated so the shipped doc matches the guard.Dependencies (#28) — dropped the
tomliconditional, the project's only version-conditional dependency, and raised the Python floor to 3.11 sotomllibcovers the single TOML read path.tomli-wstays: it is the Codex writer, and hand-rolling TOML escaping on a path that carries agent prompts and secret material is not worth removing a 10 KB pure-Python dependency.Verification
uv run pytest tests/ -v→ 1780 passed, 15 deselectedagent-notes buildcompared under a pinnedXDG_CONFIG_HOMEagainst agit worktreebuilt at the branch point — dist changes are limited to the deliberate ones (wiki agent and three skills removed, safety.md rules text)~/.cache/agent-notes/catalog.jsoncan no longer silently drive the test suiteFollow-up
#30 remains open — reinstall from this branch to clear the stale pre-#27 guard, then remove the two workarounds it forced (an orphaned test module with its
collect_ignoreentry, and a dead import shim in the credentials service).Closes #18, #19, #20, #21, #22, #23, #24, #25, #26, #27, #28
Note: this PR targets
develop, so GitHub will not auto-close those issues on merge — they close whendevelopreachesmain.