Repository navigation
docs: teach gaze-reporter agent to use fix_strategy and assess testability - #51
Merged
jflowers merged 2 commits intoMar 15, 2026
Merged
Conversation
…ility Update the gaze-reporter agent prompt to: - Consume fix_strategy and fix_strategy_counts from CRAP JSON - Show Remediation Breakdown in CRAP mode reports - For add_tests functions, examine source file signatures via Read tool and recommend interface extraction when concrete external types are detected (addressing the 'needs architecture change' scenario from unbound-force#50) - Map each fix_strategy to specific recommendation language This leverages AI judgment for coupling assessment rather than requiring static analysis in the CRAP scoring engine.
Sync the gaze-reporter prompt to all three locations: - internal/scaffold/assets/agents/gaze-reporter.md (canonical) - .opencode/agents/gaze-reporter.md (scaffold drift parity) - internal/aireport/assets/agents/gaze-reporter.md (aireport drift parity) Add retroactive openspec change artifacts (proposal, design, specs, tasks) per the spec-first development requirement.
jflowers
force-pushed
the
reporter-fix-strategy-awareness
branch
from
March 15, 2026 14:33
6ceea56 to
d48e1c5
Compare
This was referenced Mar 15, 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.
Summary
fix_strategyandfix_strategy_countsfrom CRAP JSON outputadd_testsfunctions, the agent examines source file signatures and recommends interface extraction when concrete external types are detectedMotivation
Issue #50 identified that functions needing architecture changes (interface extraction, DI) before testing can't be detected mechanically without type-signature analysis. Rather than adding a complex static analysis feature to the CRAP engine, this teaches the AI agent to perform the assessment at report time using the Read tool.
When the agent encounters a function with
fix_strategy: "add_tests", it reads the source file and checks if the function takes concrete external types (*http.Client,*sql.DB,*exec.Cmd). If so, it recommends refactoring before writing tests: "Refactor [function] to accept an interface instead of [concrete type], then add tests."Changes
Two additions to
internal/scaffold/assets/agents/gaze-reporter.md:fix_strategy_countswhen presentRelated
fix_strategyfield