CodeGuardian Swarm – Autonomous Compliance Orchestrators
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**A distributed intelligence network of six single-purpose Claude Code subagents that verify, validate, and certify changes across codebases, network configurations, and endpoint management—engineered to Anthropic’s subagent best practices, with a built-in meta-validator that proves the agent files themselves conform to specification.**
---
Overview
Imagine a team of six tireless specialists—each with a laser-focused mission, a shared language, and an unbreakable commitment to correctness. Welcome to **CodeGuardian Swarm**, a repository that reimagines how teams verify technical changes. Instead of chasing bugs through spreadsheets, email chains, or monolithic CI pipelines that test everything at once, you deploy a **coordinated intelligence** that mimics the best parts of a rigorous code review committee—but runs autonomously, 24 hours a day, across three critical domains: code integrity, network fidelity, and endpoint management.
Each subagent in this swarm is a "guardian" with a single, narrow responsibility. One checks for regressions in pull requests. Another validates that firewall rules match declared intent. A third ensures Intune device compliance policies haven’t drifted. They don’t overlap; they _orchestrate_. When a change enters the system, the relevant guardians awaken, run their verification protocols, and report back—together, in a unified format.
The sixth agent is special: the **Validator**. It doesn’t verify code or infrastructure. It verifies the _agents themselves_—ensuring every file in this repository adheres to the architectural patterns, naming conventions, and behavioral contracts defined by Anthropic’s subagent best practices. If a guardian begins to deviate, the Validator raises an alarm. This is **self-healing metadata**.
---
Why Not Just Use a Linter?
A linter checks syntax. A test runner checks behavior. A compliance scanner checks policies. CodeGuardian Swarm checks _all three_ in a single, agent-coordinated pass, and then checks itself. This is the difference between a checklist and a constitution.
- **Linters** catch formatting errors but miss intent.
- **Static analyzers** detect antipatterns but can’t validate network topology.
- **Compliance dashboards** show drift but don’t prevent it.
CodeGuardian Swarm bridges these gaps by giving each verification domain a dedicated, reasoning-capable agent that doesn’t just flag problems—it **explains why a change is safe or unsafe** in natural language, referencing the exact line, rule, or policy that triggered the concern.
---
Key Features
🔍 Six Specialized Subagents
Each agent is a single-focus Lua-configured Claude Code instance, designed to run headless in CI/CD or as a local verification tool. They share a common input/output protocol called **SwarmSpec**, which allows them to be composed, tested, and validated independently.
- **CodeGuardian – Pull Request Validator**
Verifies that code changes don’t introduce regressions, violate architectural constraints, or bypass security hooks.
- **NetGuardian – Infrastructure Compliance Agent**
Compares declared network intent (Terraform, Ansible, or raw configuration) against live state, flagging discrepancies in firewall rules, subnet boundaries, and access control lists.
- **EndpointGuardian – Intune Policy Verifier**
Checks that device compliance policies, configuration profiles, and conditional access rules are correctly applied and haven’t drifted from declared baselines.
- **DependencyGuardian – Supply Chain Auditor**
Scans dependencies for known vulnerabilities, license compliance, and unexpected transitive changes introduced by a PR.
- **LogGuardian – Event Correlation Agent**
Analyzes logs from previous deployments to detect patterns that predict failure, such as latency spikes or error rate increases after similar changes.