🌐 Language: English | 日本語
Shingan is an AI agent workflow static analyzer. Contributions are welcome — new rules, parser extensions, performance improvements, you name it.
- Go 1.26+
make- (optional) GCP project with Application Default Credentials for Vertex AI / Gemini smoke tests
git clone https://github.com/hatyibei/shingan.git
cd shingan
go mod tidy
go test -race ./...
go build -o shingan ./cmd/shinganOnion Architecture — strictly enforced. Only this dependency direction is allowed:
cmd/ → infrastructure/ → application/ → domain/
domain/has zero external dependencies (standard library only)application/may only importdomain/infrastructure/provides concrete implementations of interfaces defined inapplication/- Any reversed dependency is rejected on sight
See docs/architecture.md for the deep dive.
The full procedure (tier classification, ConfidenceReason selection, listener templates, test patterns) lives in docs/rule-authoring.md. Short version:
- Confirm the rule isn't already in the README's rule table
- Open an issue (
enhancement,new-rulelabels) - Implement
LocalRule/PathRule/GlobalRuleindomain/rules/<rule_id>.go(ADR-007) - Add at least 5 test cases (positive / negative / edge / Reason stamp / Meta) in
domain/rules/<rule_id>_test.go - Call
registerBuiltin(NewYourRule())frominit()— no factory edit required - Add a generator in
domain/testutil/generate.goand a pattern incmd/shingan-gen/main.go - Add
docs/rules/<rule-id>.mdand update the README rule table - Add an entry in
cmd/shingan-mcp/explain.go(keep parity) make lint && go test -race ./...must be green
go vet ./...
go test -race ./...
go test -race -tags=e2e ./... # CLI / API / Runner E2E
go build ./cmd/... # all binaries buildConventional Commits preferred:
feat:new featurefix:bug fixdocs:documentation onlytest:test additionsrefactor:behavior-preserving refactorci:CI / build changes
Contributions are provided under the MIT License.
Mutual respect and constructive discussion. Direct technical critique is welcome; personal attacks are not.