Repository navigation
Split category Shapes from Review criteria; bump Opus 4.7 to 4.8 - #40
Merged
Merged
Conversation
Split each category file under internal/ai/prompts/categories/ into a `## Shapes or common patterns` section (pattern lists for the recall- biased AOI scan) and a `## Review criteria` section (verdict guidance for the precision-biased deep review), and teach the loader to address sections and subcategories independently. This gives the upcoming Claude-Red coverage pass a clean home to fill in verdict guidance without bloating the cheap AOI tagger, and lets each pass pull only the content it needs. Loader (internal/ai/categories.go): - Add AllCategoryShapes, GetCategoryShapes, GetShape, GetReviewCriteria with a prefix-matching section parser and subcategory bold-block extraction. Unmigrated files (no Shapes heading) fall back to whole- body-as-Shapes so patterns never silently vanish. - Remove AllCategories / GetCategory / GetCategories (no compat shims; not deployed). Callers: - AOI scan (scanner.go) injects Shapes only. - Deep review (prompts.go) composes Evaluation Criteria scoped per AOI (category, subcategory): a flagged-pattern echo plus verdict guidance. Subcategory-less AOIs fall back to whole-category Shapes. Cache: fold the composed Evaluation Criteria content into the individual and grouped review cache keys, so editing a category file — or the scoping itself — invalidates stale entries. The static prompt-template hash did not cover this runtime-composed section. Migration of the 23 category files is pure restructure — bullets carried in verbatim, Review criteria starts empty (filled later, separate plan). Validated (gate #1, -count=1 reps): AOI and deep review both at parity with no false-positive regression, across gemini-3.1-flash-lite and claude-opus-4-7.
Opus 4.8 was released. Swap the two claude-opus-4-7 registry entries (anthropic + claude-code) to claude-opus-4-8, rename the models.json tuning block, and refresh the example references in claudecode.go and token-bench. Default strong model bumps to claude-code/claude-opus-4-8. claude-code is keyless, so a fresh install keeps working without an API key and default-relying upgraders don't break on load. Users who prefer the metered Anthropic API can pick anthropic/claude-opus-4-8 in the picker. Existing configs are left untouched: model refs are stored as free-form "provider/model-id" strings and ParseModelRef doesn't validate against the registry, so a config still pointing at claude-opus-4-7 keeps running (it just loses pricing-table cost reporting and drops out of the picker). No auto-migration.
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.
Summary
internal/ai/prompts/categories/into a## Shapes or common patternssection (used by the AOI scan) and a## Review criteriasection (used by deep review). The loader can now pull a whole section or a single subcategory.claude-code/claude-opus-4-8(keyless, no API key needed). Existing configs are untouched and keep working.