Skip to content

Split category Shapes from Review criteria; bump Opus 4.7 to 4.8 - #40

Merged
andreujuanc merged 2 commits into
masterfrom
feat/categories-shapes-review-split
May 29, 2026
Merged

andreujuanc merged 2 commits into
masterfrom
feat/categories-shapes-review-split

Conversation

@andreujuanc

Copy link
Copy Markdown
Owner

Summary

  • Split each category file in internal/ai/prompts/categories/ into a ## Shapes or common patterns section (used by the AOI scan) and a ## Review criteria section (used by deep review). The loader can now pull a whole section or a single subcategory.
  • AOI scan now injects only the Shapes; deep review injects the Shapes plus Review criteria scoped to the AOI's category/subcategory instead of the whole category file.
  • Folded the injected criteria into the review cache key so editing a category file invalidates stale cached reviews.
  • Replaced Opus 4.7 with Opus 4.8 in the model registry. Default strong model is now claude-code/claude-opus-4-8 (keyless, no API key needed). Existing configs are untouched and keep working.

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.
@andreujuanc
andreujuanc merged commit 7c098f9 into master May 29, 2026
2 checks passed
@andreujuanc
andreujuanc deleted the feat/categories-shapes-review-split branch May 29, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant