🌐 Language: English | 日本語
ShinganはAIエージェントワークフロー静的解析ツールです。新ルール追加、パーサー拡張、パフォーマンス改善など、ContributionはWelcomeです。
- Go 1.26以上
- make
- (optional) Vertex AI/Gemini 動作確認用にGCPプロジェクトとADC
git clone https://github.com/hatyibei/shingan.git
cd shingan
go mod tidy
go test -race ./...
go build -o shingan ./cmd/shinganOnion Architecture 厳守。層構造は以下のみ許容:
cmd/ → infrastructure/ → application/ → domain/
domain/は外部依存ゼロ(標準ライブラリのみ)application/はdomain/のみimport可infrastructure/がapplication/で定義された interface の具象実装- 逆方向の依存を作ると即座にリジェクト
詳細は docs/architecture.md。
詳しい手順 + tier 振り分け + ConfidenceReason 選び方は docs/rule-authoring.md を参照。要約:
- README の解析ルール表で既出でないか確認
- Issue 起票 (
enhancement,new-ruleラベル) domain/rules/<rule_id>.goにLocalRule/PathRule/GlobalRuleinterface 実装 (ADR-007)domain/rules/<rule_id>_test.goに最低 5 ケース (positive / negative / edge / Reason stamp / Meta)init()でregisterBuiltin(NewYourRule())を呼ぶ — factory 編集不要domain/testutil/generate.goに generator +cmd/shingan-gen/main.goに pattern 追加docs/rules/<rule-id>.md新規 + README ルール表更新cmd/shingan-mcp/explain.goに説明追加 (parity 維持)make lint && go test -race ./...グリーン
go vet ./...
go test -race ./...
go test -race -tags=e2e ./... # CLI/API/Runner E2E
go build ./cmd/... # 全バイナリビルド確認Conventional Commits推奨:
feat:新機能fix:バグ修正docs:ドキュメントのみtest:テスト追加refactor:挙動を変えないリファクタci:CI/ビルド変更
Contributionは MIT License の下で提供されます。
相互尊重、建設的議論。技術的な指摘は遠慮なく、人格攻撃はNG。