| true |
| workflow_call |
roles |
| inputs |
secrets |
| mode |
| description |
required |
default |
type |
report (file issue) | autofix (open PR) |
false |
report |
string |
|
|
| APP_PRIVATE_KEY |
COPILOT_GITHUB_TOKEN |
|
|
|
|
all |
|
| permissions |
| contents |
issues |
pull-requests |
read |
read |
read |
|
| engine |
copilot |
| inlined-imports |
true |
| strict |
false |
| network |
|
| imports |
gominimal/ch-oracles/shared/principles.md@main |
gominimal/ch-oracles/shared/rigor.md@main |
gominimal/ch-oracles/shared/repo-conventions.md@main |
gominimal/ch-oracles/shared/safe-output-create-issue.md@main |
gominimal/ch-oracles/shared/runtime-setup.md@main |
gominimal/ch-oracles/shared/go-runtime-setup.md@main |
gominimal/ch-oracles/shared/go-build-commands.md@main |
gominimal/ch-oracles/shared/build-matrix.md@main |
|
| safe-outputs |
| github-app |
create-issue |
update-issue |
create-pull-request |
| app-id |
private-key |
repositories |
${{ vars.APP_ID }} |
${{ secrets.APP_PRIVATE_KEY }} |
${{ github.event.repository.name }} |
|
|
|
|
| max |
draft |
labels |
1 |
${{ false }} |
agent:lint:go |
agent:autofix |
|
|
|
| tools |
| github |
bash |
| allowed |
list_issues |
search_issues |
issue_read |
list_pull_requests |
create_issue_comment |
|
|
gofmt -l . |
gofmt -w . |
goimports -l . |
goimports -w . |
go vet ./... |
staticcheck ./... |
go build ./... |
go test ./... |
cat /tmp/previous-findings.json |
git diff --stat |
git status |
gh issue view * |
|
|
You are the Go style agent. Read inputs.mode and act accordingly.
-
gofmt -l . — list files needing format (empty output means clean).
-
goimports -l . — list files needing import reorder.
-
go vet ./... — capture vet findings.
-
staticcheck ./... — capture staticcheck findings.
-
If all four are clean, emit noop and exit 0.
-
Pick the single highest-impact finding group and file one issue:
<!-- finding-id: lint::go::<file-path>::<rule-id-or-check> -->
Title: [lint:go] <file-path>: <rule-id> (<count> occurrences).
Body sections:
- Findings — file:line, check id (e.g.,
SA1006, S1000), message.
- Suggested fix — for gofmt/goimports, the auto-format diff; for
staticcheck, the upstream recommendation.
- Reproduce locally — exact command.
- Severity —
LOW for gofmt/goimports, MEDIUM for go vet and
staticcheck S (style) checks, HIGH for staticcheck SA
(correctness) checks.
Apply dedup before emitting.
gofmt -w . (in-place).
goimports -w . if installed (skip otherwise).
- Verification gate:
test -z "$(gofmt -l .)" — must exit 0.
go vet ./... — must exit 0.
staticcheck ./... — must exit 0. If staticcheck fails, do not open
the PR; staticcheck has no --fix mode and surfaces semantic issues.
go build ./... — must exit 0.
go test ./... — must exit 0.
- Open one PR via
create-pull-request:
- Title:
[lint:go] auto-applied gofmt + goimports.
- Body: summary of files touched,
Closes #<n> if applicable.
- Labels:
agent:lint:go, agent:autofix.
- Auto-merge: NOT enabled.
chore-style-go: noop (no findings)
chore-style-go: report — issue #<n> opened/updated (<rule-id>)
chore-style-go: autofix — PR #<n> opened (<file-count> files touched)
chore-style-go: autofix — report_incomplete (<failing-step>)
- Do not modify
go.mod or go.sum.
- Do not auto-apply go vet or staticcheck suggestions.
- Do not open more than one PR or issue per run.