Skip to content

feat: CI support for external analyzers (non-Go repos) in the reusable AI-report workflow and gaze init --ci #375

Done

Description

@jflowers

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 --ci writes 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.yml assumes Go throughout:

    • it always runs actions/setup-go;
    • it takes a Go coverprofile and checks for it with test -f "$COVERPROFILE";
    • it runs gaze report ./... --ai=opencode --coverprofile=... with no --analyzer or --language, and with the package pattern fixed to ./....
  • The scaffolded caller (internal/scaffold/assets/ci/gaze-ai-report.yml) is Go-specific. Its test job runs go 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=json

It 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 coverprofile file 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 -f check when an analyzer is set; or
    • add a coverage-path input that's checked instead.

    --coverprofile should be passed only in Go mode.

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, uploads coverage/, and passes analyzer: 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.json and no go.mod, gaze init --ci writes 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, --language and 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

Activity

  1. added
    enhancement
    ci
    on Nov 24, 2026
  2. added 4 commits that reference this issue on Nov 26, 2026
  3. added 5 commits that reference this issue on Nov 26, 2026
  4. moved this from In Review 🏁 to Done ✔️ in Unbound Force Planningon Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cienhancementfeature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions