Repository navigation
Description
Problem
Gaze can report on TypeScript and Python through external analyzers (reading-stone and snake-eyes). The CI path doesn't support them yet:
-
gaze init --ciwrites nothing in a non-Go repository. It skips with this warning:Warning: skipping CI scaffolding (--ci): the reusable gaze AI-report workflow analyzes ./... from the repository root and requires a Go module there. -
reusable_gaze_ai_report.ymlassumes Go throughout:- it always runs
actions/setup-go; - it takes a Go
coverprofileand checks for it withtest -f "$COVERPROFILE"; - it runs
gaze report ./... --ai=opencode --coverprofile=...with no--analyzeror--language, and with the package pattern fixed to./....
- it always runs
-
The scaffolded caller (
internal/scaffold/assets/ci/gaze-ai-report.yml) is Go-specific. Itstestjob runsgo test -coverprofile=coverage.out ./....
So a TypeScript or Python repository can't use the shared workflow and has to write its own.
Evidence: reading-stone
Gaze v2.5.0 already works on zero-dot-force/reading-stone locally, outside the reusable workflow:
npx vitest run --coverage # analyzer reads coverage/coverage-final.json itself
gaze report ./src/... --analyzer gaze-analyzer-typescript --format=jsonIt took about 17 seconds and filled in every section: crap, quality, classify and docscan. The only gaps are in the CI scaffolding and the reusable workflow. See zero-dot-force/reading-stone#40 for that repository's interim plan.
Proposal
1. Reusable workflow: optional external-analyzer inputs
Each input's default keeps today's Go behavior unchanged:
| Input | Default | Purpose |
|---|---|---|
analyzer |
"" |
Passed as --analyzer. Empty means Go-native analysis. |
language |
"" |
Passed as --language. Depends on #282 to work without --analyzer. |
packages |
./... |
Package pattern; e.g. ./src/... keeps scaffolded .opencode/ code out of the report. |
setup |
"" |
Optional shell run before gaze report, to install and put the analyzer on PATH (e.g. npm ci && npm run build && npm link, or uv tool install snake-eyes). |
node-version / python-version |
"" |
Optional toolchain setup for the analyzer. When empty, the step is skipped. |
The coverage contract also needs to cover analyzers.
-
Go: keep the
coverprofilefile check. -
With an analyzer: the artifact holds whatever that analyzer reads. For reading-stone that's
coverage/coverage-final.json; for snake-eyes it's its coverage data. Either:- drop the
test -fcheck when an analyzer is set; or - add a
coverage-pathinput that's checked instead.
--coverprofileshould be passed only in Go mode. - drop the
Go is still needed to go install gaze, so setup-go stays. Only the analysis toolchain changes.
2. gaze init --ci: scaffold for non-Go repositories
When there's no go.mod, look for a known project marker instead of skipping:
package.json: a Node caller that runs the test suite with coverage, uploadscoverage/, and passesanalyzer: gaze-analyzer-typescript;pyproject.toml: a Python caller wired to snake-eyes in the same way.
Each gets its own golden file next to testdata/golden-gaze-ai-report.yml. Keep the current warning for repositories with no recognized marker.
3. Docs
Update docs/guides/ci-integration.md, the protocol or report reference and the README to cover the external-analyzer CI path.
Acceptance
- A Go caller's behavior and the existing golden file are unchanged.
- In a repository with
package.jsonand nogo.mod,gaze init --ciwrites a caller workflow that runs the reusable workflow with reading-stone. It's report-only, with thresholds commented out as they are today. - The reusable workflow passes
--analyzer,--languageand the package pattern through, and runs the report on a TypeScript repository. This is shown by a dogfood or fixture job. - The skipped-report path (no
opencode-config) still checks that the coverage artifact arrived, for both modes.
Related
- gaze report: honor --language alone for external analyzer dispatch #282:
gaze reportshould honor--languagealone. Without it, callers must pass--analyzer. - feat:
gaze init --ciscaffolds the reusable AI-report caller workflow #306: the originalgaze init --cifeature. - ci: run Gaze on reading-stone with reading-stone as the TypeScript analyzer zero-dot-force/reading-stone#40: the first non-Go consumer.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone ✔️
Activity
feat(unbound-force#375): add external-analyzer CI support to reusable…
fix(unbound-force#375): install analyzers in the report job and harde…
fix(unbound-force#375): address review advisories — Node 24 LTS defau…
fix(unbound-force#375): complete review-advisory sweep — quote versio…
openspec(#375): propose ci-external-analyzer-support
feat(#375): add external-analyzer CI support to reusable workflow and…
fix(#375): install analyzers in the report job and harden the CI handoff
fix(#375): address review advisories — Node 24 LTS default, single re…
fix(#375): complete review-advisory sweep — quote version inputs, pin…
ci: default reusable AI report gaze-version to v2.7.0
spec: add the Gaze AI report to ci-gaze-report (Gaze v2.7.0)
spec: add the Gaze AI report to ci-gaze-report (Gaze v2.7.0)
spec: add the Gaze AI report to ci-gaze-report (Gaze v2.7.0)
feat(init): enforce per-variant --gaze-version floor for Node/Python …