Repository navigation
feat: AI-assisted assertion mapping with agent-level evaluation - #59
Merged
Merged
Conversation
Add AIMapperFunc callback to quality.Options as a 5th mapping pass for assertions that all mechanical passes (direct identity, indirect root, helper bridge, inline call) fail to map. AI mappings are assigned confidence 50 (lower than all mechanical passes). Library API: - AIMapperContext struct with assertion source, test body, target function, and side effects - BuildAIMapperPrompt: structured prompt for any AI backend - ParseAIMapperResponse: extract effect ID from AI response - tryAIMapping: orchestrates context building, AI call, validation - Variadic parameter on MapAssertionsToEffects for backward compat - 7 tests (match, no-match, error, nil, context, prompt, parser) Agent-level mapping: - gaze-reporter prompt updated with 'Unmapped Assertion Evaluation' section — agent reads source files for unmapped assertions and evaluates semantic relationships during /gaze command execution - All 3 prompt copies synced (scaffold, .opencode, aireport) Also includes: - Remove review-council.md from scaffold (tracked by OpenCode) - Constitution v1.3.0: review council gate as PR prerequisite - AGENTS.md: review council as PR prerequisite section - Archive 6 completed openspec changes Partially addresses unbound-force#6
jflowers
force-pushed
the
ai-assertion-mapping
branch
from
March 15, 2026 23:02
ce1b6ff to
b437cfc
Compare
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
AIMapperFunccallback as a 5th mapping pass for structurally disconnected assertionsreview-council.md(tracked by OpenCode directly)AI Assertion Mapping
The assertion mapping pipeline now has 5 passes:
The AI pass is opt-in via
quality.Options.AIMapperFunc. When nil (default), behavior is identical to before.Library API:
AIMapperContext,BuildAIMapperPrompt,ParseAIMapperResponse-- everything needed for callers to wire any AI backend.Agent-level: The gaze-reporter agent prompt now includes "Unmapped Assertion Evaluation" -- when running
/gaze, the agent reads source files for unmapped assertions and evaluates semantic relationships directly.Review Council
Two iterations of the 4-reviewer council. All HIGH/MEDIUM findings addressed:
opts.StderrthroughMapAssertionsToEffects(no moreos.Stderrglobal)ParseAIMapperResponsenon-deterministic multi-ID searchAlso includes
review-council.mdfrom embedded assets (user requested; tracked by OpenCode directly)Partially addresses #6