This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
boundary-action is a GitHub composite action (not Docker, not JavaScript) that wraps the boundary CLI tool for CI pipelines. It installs the boundary binary, runs boundary check, emits PR annotations for violations, writes a job summary, and exposes structured outputs.
The action is a thin adapter — all analytical intelligence lives in the boundary binary. This repo only handles: install, invoke, parse JSON output, and surface results to GitHub.
action.yml— composite action definition with inputs, outputs, and 7 sequential stepsscripts/install.sh— Linux/macOS binary installer (calls cargo-distboundary-installer.sh)scripts/install.ps1— Windows binary installer (calls cargo-distboundary-installer.ps1)testdata/go-fixture/— Go files with a deliberate domain-imports-infrastructure violation (triggers L001)testdata/go-fixture-clean/— Go files with no layer violations (used bytest-passjob).github/workflows/test.yml— three test jobs:test-pass,test-fail,test-outputs
- Independent versioning from the
boundarybinary;boundary-versioninput accepts exact tags only (no semver ranges) - Uses cargo-dist installer scripts rather than manual download URL construction
- Step 3 (
boundary check) runs withcontinue-on-error: true; Step 7 re-exits with code 1 if check failed - Outputs are parsed from
boundary check --format json --compactusingjq - Annotations map
boundaryseverity directly to GitHub::error/::warningcommands
Tests run via .github/workflows/test.yml using uses: ./ (local action reference) on ubuntu-latest:
# No local test runner — validation happens in GitHub Actions CI
# Push to a branch and open a PR to trigger the test workflowThe cargo-dist installer scripts do NOT accept version flags — the version is baked into each release's installer URL. Both installers auto-detect $GITHUB_PATH and add the install directory ($HOME/.cargo/bin) automatically. The wrapper scripts in scripts/ simply download and execute the version-specific installer.
The action parses this structure from boundary check --format json --compact:
.score.overall → score output (0-100)
.violations[] → array with .severity, .location.file, .location.line, .location.column, .message, .suggestion
.check.passed → boolean pass/fail
location.file already includes the path argument passed to boundary check (e.g., testdata/go-fixture/internal/domain/user/bad_dep.go), so no path prefix manipulation is needed in the annotations step.