Repository navigation
feat: surface classification_counts in quality and wire analyzer into /gaze report - #281
Conversation
… /gaze report - Add ClassificationCounts to taxonomy.PackageSummary (omitempty, external-only) - Tally classification_counts in adapter.BuildQualityFromMappings (dedup by effect ID) - Teach gaze-reporter analyzer/language detection and external classification sourcing - Sync third embedded prompt copy and document the JSON schema field - Dispatch crap/quality external path on --language alone, matching docscan Assisted-by: deepseek-v4-pro Generated with AI assistance (deepseek-v4-pro)
|
🤖 Finished Review · ✅ Success · Started 4:38 PM UTC · Completed 4:59 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $10.18 |
|
Risk Assessment: moderate (2/5) DetailsModerate risk, consistent with prior assessment. The raw file count (22) and lines changed (1013) appear elevated, but the effective footprint is smaller: 4 files are OpenSpec artifacts, 3 files are byte-identical copies of the same gaze-reporter prompt update, and ~190 lines are spec/documentation. The actual Go production code change is ~90 lines. cmd/gaze/main.go remains a high-churn hotspot warranting scrutiny, but the modifications are narrow. No protected paths, no CI/dependency changes, no security-sensitive files. Previous runRisk Assessment: moderate (2/5) DetailsModerate risk, consistent with prior assessment. The raw file count (22) and lines changed (927) appear elevated, but the effective footprint is smaller: 4 files are OpenSpec artifacts, and 3 files are byte-identical copies of the same gaze-reporter prompt update. The actual Go production code change is ~80 lines. cmd/gaze/main.go remains a high-churn hotspot warranting scrutiny, but the modifications are narrow. No protected paths, no CI/dependency changes, no security-sensitive files. Previous run (2)Risk Assessment: moderate (2/5) DetailsModerate risk. The raw file count (19) and lines changed (896) appear elevated, but the effective footprint is smaller: 5 files are OpenSpec artifacts, and 3 files are byte-identical copies of the same agent prompt update. The actual Go production code change is ~80 lines. cmd/gaze/main.go is a high-churn hotspot warranting scrutiny, but the modifications are narrow. No protected paths, no CI/dependency changes, no security-sensitive files. |
ReviewFindingsMedium
Low
Next steps:
Previous runReviewFindingsMedium
Low
Next steps:
Previous run (2)ReviewFindingsMedium
Low
Next steps:
|
marcusburghardt
left a comment
There was a problem hiding this comment.
PR Review: #281 — feat: surface classification_counts in quality and wire analyzer into /gaze report
Verdict: COMMENT
Clean, well-scoped change that surfaces classify_signals classification counts through the external-analyzer quality path and wires analyzer/language detection into the gaze-reporter agent. The core implementation (countClassifications, BuildQualityFromMappings wiring, omitempty pointer design) is correct. All #278 acceptance criteria are satisfied. CI passes across Go 1.24 and 1.25.
Findings
| # | Finding | Severity |
|---|---|---|
| 1 | CLI reference docs don't document --language alone as external-path trigger |
MEDIUM |
| 2 | runReport --language gap (documented D7 deferral, needs follow-up issue) |
MEDIUM |
| 3 | Missing TestQualityWithLanguageOnly_TriggersExternalPath regression test |
LOW |
| 4 | ClassificationCounts sub-type not defined in json-schemas.md |
LOW |
See inline comments for details.
This review was generated by /uf.review-pr (AI-assisted).
…ionCounts sub-type Addresses PR unbound-force#281 review feedback from @marcusburghardt and @fullsend-ai-review[bot]. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
…on test Mirrors TestCrapWithLanguageOnly_TriggersExternalPath to verify runQuality dispatches to the external analyzer path when only --language is set. Addresses PR unbound-force#281 review feedback from @marcusburghardt. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
… countClassifications coverage Addresses PR unbound-force#281 review-council feedback from divisor-testing (The Tester). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
|
🤖 Finished Review · ✅ Success · Started 11:56 AM UTC · Completed 12:12 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $9.15 |
… errors Addresses PR unbound-force#281 review feedback from @fullsend-ai-review[bot]. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
|
🤖 Review · ❌ Terminated · Started 1:23 PM UTC · Ended 1:39 PM UTC Commit: |
|
Addressed in Re: |
There was a problem hiding this comment.
Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:
cmd/gaze/external_analyzer_test.go(file-level): Line 498 · [low] test adequacy
TestQualityWithExternalAnalyzer_RejectsTarget and TestQualityWithExternalAnalyzer_RejectsAIMapper only exercise the --analyzer path (analyzerFlag: "some-analyzer"). They do not test the --language-only path (languageFlag set, analyzerFlag empty) despite error messages being updated to mention "--analyzer or --language". Since runQuality now dispatches to runQualityWithExternalAnalyzer when either flag is set, the rejection logic is reachable via --language alone but untested.
Suggested fix: Add subtests or separate test cases that set languageFlag without analyzerFlag and verify the same rejection errors for --target and --ai-mapper.
|
🤖 Finished Review · ✅ Success · Started 1:23 PM UTC · Completed 1:39 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.24 |
…ionCounts sub-type Addresses PR #281 review feedback from @marcusburghardt and @fullsend-ai-review[bot]. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
…on test Mirrors TestCrapWithLanguageOnly_TriggersExternalPath to verify runQuality dispatches to the external analyzer path when only --language is set. Addresses PR #281 review feedback from @marcusburghardt. Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
… countClassifications coverage Addresses PR #281 review-council feedback from divisor-testing (The Tester). Signed-off-by: Jay Flowers <[email protected]> Assisted-by: deepseek-v4-pro
|
🤖 Finished Retro · ✅ Success · Started 1:44 PM UTC · Completed 1:57 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.17 |
Retro: PR #281 — feat: surface classification_counts in quality and wire analyzer into /gaze reportWorkflow OverviewPR #281 was a human-authored PR by @jflowers addressing issue #278 — surfacing Timeline
What Went Well
Evidence for Existing Issues
Proposals filed
|
Summary
Closes #278 — surface the
classify_signalsclassification ingaze qualityand wire--analyzerinto the default/gazereport.External analyzers (e.g. Python via snake-eyes) emit
classify_signalslabels, but those labels were never surfaced: the/gazeFull Mode report derived its Classification Summary from the Go-onlygaze analyze --classify, which does not register--analyzer/--language, so external-analyzer projects got a degraded classification section.This change:
classification_countsobject (contractual/incidental/ambiguous) totaxonomy.PackageSummary, populated only by the external-analyzer quality path.adapter.BuildQualityFromMappings, deduplicating by side-effect ID.gaze-reporteragent to detect the analyzer/language (.gaze.yamlanalyzers:map first, project-marker heuristic fallback) and pass--analyzer/--languagetocrap,quality, anddocscan. Full Mode now sources the Classification Summary fromclassification_countsfor external projects instead of the degraded proxy.gaze crap/gaze qualityhonor--languagealone (tier-3 PATH-convention discovery), matchinggaze docscan.classification_countsin theQualitySchemaand documents it indocs/reference/json-schemas.md.How to Test
go build ./...go test -race -count=1 ./internal/adapter/... ./internal/taxonomy/... ./internal/report/... ./internal/quality/...go test -race -count=1 -short ./cmd/gaze/...go test -race -count=1 ./internal/aireport/...(verifiesTestEmbeddedPromptMatchesScaffold— the third embedded prompt copy is byte-identical to the scaffold canonical)Acceptance scenarios (from the OpenSpec delta):
TestCountClassifications— dedupe by ID (1/1/1), unclassified-ignored (1/0/0), nil-when-nothing.TestBuildQualityFromMappings— classification counts 2/1/0 flow into the summary.TestQualitySchema_ValidatesClassificationCounts— schema validates both presence and omission.TestWriteJSON_Structure— Go-native JSON omitsclassification_counts.TestCrapWithLanguageOnly_TriggersExternalPath—--languagealone routes to the external path.How to Demo
gaze quality --analyzer <binary> --language python(or a.gaze.yamlwithanalyzers: {python: {command: snake-eyes, args: ["--stdio"]}}) at a project with an external analyzer that reportsclassify_signals.quality_summarynow contains"classification_counts": {"contractual": N, "incidental": N, "ambiguous": N}./gazeFull Mode on an external-analyzer project: the Classification Summary is now sourced fromclassification_countsrather than a Go-only fallback.Key Files Changed
internal/taxonomy/types.go—ClassificationCountsstruct +classification_counts,omitemptypointer field onPackageSummary.internal/adapter/quality.go—countClassificationshelper;BuildQualityFromMappingspopulates the summary.internal/adapter/quality_internal_test.go— tally + summary tests.cmd/gaze/main.go—runCrap/runQualityhonor--languagealone; language-specificinitExternalSessionerror.cmd/gaze/external_analyzer_test.go—--language-only external-path regression test.internal/report/schema.go/internal/report/report_test.go—classification_countsschema property + validation test.internal/quality/quality_test.go— Go-native omission assertion.internal/scaffold/assets/agents/gaze-reporter.md,.opencode/agents/gaze-reporter.md,internal/aireport/assets/agents/gaze-reporter.md— analyzer/language detection + Full Mode classification sourcing (three byte-identical copies).internal/scaffold/assets/commands/gaze.md,.opencode/commands/gaze.md—/gazecommand description update.docs/reference/json-schemas.md—classification_countsfield documented.openspec/changes/quality-classification-counts/— proposal, design, spec, tasks.Known Issues
The following findings from the review council were acknowledged but not resolved:
docs:issue must be filed inunbound-force/websitefor theclassification_countsfield and/gazeexternal-analyzer classification sourcing before this PR merges.runReport(cmd/gaze/main.go) still gates external dispatch on--analyzeronly (pre-existing, out of scope for this change).This PR was generated by /uf.finale (AI-assisted).