Project Structure๏
Overview of the ai-slop-gate directory layout.
For architectural decisions, see ai_slop_gate_snapshot.json (v7.4.0).
Top-Level๏
ai-slop-gate/
โโโ ai_slop_gate/ # Core Python package
โโโ rulesets/ # Static analysis rule definitions
โ โโโ eslint/ # ESLint rules for JS/TS safety
โโโ ci/ # CI configuration
โโโ docs/ # Project documentation
โโโ scripts/ # Utility and build scripts
โโโ action.yml # GitHub Action definition
โโโ policy.yml # Default policy configuration
โโโ Dockerfile
โโโ docker-compose.yml
โโโ pyproject.toml
โโโ requirements.txt
โโโ pytest.ini
โโโ eslint.config.js
โโโ package.json
โโโ renovate.json
ai_slop_gate/๏
ai_slop_gate/
โโโ cli/ # CLI layer (thin โ arg parsing and wiring only)
โ โโโ main.py # Entrypoint: python -m ai_slop_gate.cli.main
โ โโโ run.py # run command: run_analysis()
โ โโโ args.py # Argument definitions
โ โโโ context.py # Runtime context object
โ โโโ logger.py # Logging configuration
โ โโโ utils.py
โ
โโโ engine/
โ โโโ provider_factory.py # Instantiates providers by name from registry
โ
โโโ domain/ # Business logic โ no IO
โ โโโ observation.py # Observation dataclass (immutable)
โ โโโ observation_factory.py
โ โโโ observation_result.py
โ โโโ decision.py # Decision dataclass (allow|advisory|blocking)
โ โโโ policy.py # PolicyRule dataclass
โ โโโ policy_engine.py # Evaluates List[Observation] โ Decision
โ โโโ checks.py # CheckReport
โ โโโ check_mapper.py
โ โโโ signals.py # Signal type definitions
โ โโโ contracts.py # Policy evaluation contracts
โ โโโ compliance/ # Compliance sidecar
โ โโโ config.py
โ โโโ detector.py
โ โโโ enforcement.py
โ โโโ gateway.py
โ โโโ pipeline.py
โ โโโ profile_resolver.py
โ โโโ profiles.py
โ โโโ rules.py
โ
โโโ providers/
โ โโโ base.py # BaseProvider ABC + ProviderObservation dataclass
โ โโโ registry.py # Provider registry
โ โโโ cached_provider.py # CachedProvider wrapper (LLM only)
โ โโโ rate_limit_guard.py
โ โ
โ โโโ llm/ # LLM providers (kind = "llm")
โ โ โโโ llm_provider.py # LlmProvider base: chunked file scanning, prompt loading
โ โ โโโ gemini.py # GeminiProvider
โ โ โโโ groq.py # GroqProvider
โ โ โโโ ollama.py # OllamaProvider (local, no API key required)
โ โ โโโ prompts/ # Provider-specific prompt files
โ โ โโโ gemini/
โ โ โ โโโ deep.prompt
โ โ โโโ groq/
โ โ โ โโโ deep.prompt
โ โ โ โโโ fast.prompt
โ โ โโโ ollama/
โ โ โโโ qwen.prompt
โ โ โโโ mistral.prompt
โ โ
โ โโโ static/ # Static and infra providers
โ โโโ static.py # StaticProvider
โ โโโ static_security.py # StaticSecurityProvider
โ โโโ static_pipeline.py # StaticPipelineProvider (CI/CD)
โ โโโ static_python.py # StaticPythonProvider (AST)
โ โโโ static_js.py # StaticJSProvider
โ โโโ static_ts_js.py # StaticTSJSProvider
โ โโโ static_docker.py # StaticDockerProvider
โ โโโ cpp_static.py # StaticCppProvider
โ โโโ csharp_static.py # StaticCSharpProvider
โ โโโ java_static.py # StaticJavaProvider
โ โโโ ruby_static.py # StaticRubyProvider
โ โโโ eslint.py # ESLintProvider
โ โโโ k8s_static.py # KubernetesStaticProvider
โ โโโ k8s_runtime.py # K8sRuntimeProvider (kind = "infra")
โ โโโ terraform_static.py # TerraformStaticProvider
โ โโโ terraform_plan.py # TerraformPlanProvider
โ โโโ supply_chain.py # SupplyChainProvider
โ โโโ trivy.py # TrivyProvider (CVE scanning)
โ โโโ sbom.py # SBOMProvider (Syft, SPDX)
โ โโโ dead_code.py # DeadCodeProvider
โ
โโโ reporters/
โ โโโ base.py # Reporter ABC: report(CheckReport) -> None
โ โโโ console.py # ConsoleReporter
โ โโโ github_pr.py # GitHubPRReporter
โ โโโ github_checks.py # GitHubChecksReporter
โ โโโ gitlab_mr.py # GitLabMRReporter
โ โโโ formatter.py # PR comment formatting
โ โโโ stdout.py
โ
โโโ github/
โ โโโ pr_commenter.py # GitHub PR comment delivery
โ
โโโ cache/ # LLM response cache (file + memory backends)
โ
โโโ fixtures/ # Test fixtures and sample data
โ โโโ k8s/ # Kubernetes fixture files
โ
โโโ tests/
โโโ unit/
โ โโโ adapters/
โ โโโ cache/
โ โโโ cli/
โ โโโ domain/
โ โ โโโ compliance/
โ โโโ loader/
โ โโโ policy_engine/
โ โโโ profiles/
โ โโโ providers/
โ โโโ reporters/
โโโ integration/
rulesets/eslint/๏
Pre-configured ESLint rule sets for JavaScript/TypeScript static analysis:
File |
Purpose |
|---|---|
|
Standard coding patterns |
|
Production-ready safety checks |
|
Leaked credential detection |