Skip to content

Context agent: expand module library#10

Closed
bokelley wants to merge 1 commit into
mainfrom
bokelley/context-modules
Closed

Context agent: expand module library#10
bokelley wants to merge 1 commit into
mainfrom
bokelley/context-modules

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

  • Add 6 new evaluation modules: EmbeddingMatch (cosine similarity), KeywordMatch (set intersection), BrandSafety (category blocklist), GeoFilter (allow/block lists), DaypartFilter (day-of-week + hour ranges), CatalogMatch (product catalog to content topics)
  • Each module implements the Module interface, is independently configurable, and has thorough tests
  • Add SMembers to ValkeyClient interface and MockValkeyClient
  • Fix pre-existing lint issues in agent_test.go, main.go, and sync.go

Closes #4

Test plan

  • 24 new tests across 6 test files, all passing with -race
  • golangci-lint clean
  • Existing tests still pass

🤖 Generated with Claude Code

Add EmbeddingMatch, KeywordMatch, BrandSafety, GeoFilter, DaypartFilter,
and CatalogMatch modules. Each independently testable and configurable.
Also adds SMembers to ValkeyClient interface and fixes pre-existing lint.

Closes #4

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bokelley
Copy link
Copy Markdown
Contributor Author

Closing — the context-agent was restructured while this sat, and the new layout (registry.go, targeting.go, bitmap-based property targeting) is a different shape than what these modules plug into. Rebasing 926 lines onto that new architecture isn't worthwhile; the modules would need to be redesigned against the current agent contract anyway.

The six evaluation modules here (embedding, keyword, brand-safety, geo, daypart, catalog) aren't implemented anywhere on main. Filing a design issue to decide whether/where they belong before writing any more code.

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.

Context agent: expand module library

1 participant