Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ packages/
├── plugins/ @red-codes/plugins — Plugin ecosystem (discovery, registry, validation, sandboxing)
├── renderers/ @red-codes/renderers — Renderer plugin system (registry, TUI renderer)
├── sdk/ @red-codes/sdk — Agent SDK for programmatic governance integration
├── swarm/ @red-codes/swarm — Shareable agent swarm templates
├── scheduler/ @red-codes/scheduler — Task scheduler, queue, lease manager, and worker orchestration
└── telemetry-client/ @red-codes/telemetry-client — Telemetry client (identity, signing, queue, sender)

Expand Down
11 changes: 2 additions & 9 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ packages/
│ └── types.ts # Storage type definitions
├── telemetry/src/ # @red-codes/telemetry — Runtime telemetry and logging
├── telemetry-client/src/ # @red-codes/telemetry-client — Telemetry client (identity, signing, queue, sender)
├── swarm/src/ # @red-codes/swarm — Shareable agent swarm templates
│ ├── config.ts # Swarm configuration
│ ├── manifest.ts # Swarm manifest parsing
│ ├── scaffolder.ts # Swarm scaffolding
│ ├── types.ts # Swarm type definitions
│ └── index.ts # Module re-exports
├── sdk/src/ # @red-codes/sdk — Agent SDK for programmatic governance
│ ├── sdk.ts # SDK implementation
│ ├── session.ts # Session management
Expand Down Expand Up @@ -254,8 +248,7 @@ Each workspace package maps to a single architectural concept:
- **packages/telemetry/** — Runtime telemetry and logging
- **packages/telemetry-client/** — Telemetry client (identity, signing, queue, sender)
- **packages/sdk/** — Agent SDK for programmatic governance integration
- **packages/swarm/** — Shareable agent swarm templates (config, manifest, scaffolder)
- **packages/scheduler/** — Task scheduler, queue, lease manager, and worker orchestration for swarm
- **packages/scheduler/** — Task scheduler, queue, lease manager, and worker orchestration
- **apps/cli/** — CLI entry point and commands (published as `@red-codes/agentguard`)
- **packages/invariant-data-protection/** — Data protection invariant plugin
- **apps/mcp-server/** — MCP governance server (15 governance tools)
Expand Down Expand Up @@ -379,7 +372,7 @@ pnpm test --filter=@red-codes/kernel # Test a single package
**Test structure:**
- **Vitest workspace** (`vitest.workspace.ts`): orchestrates tests across all packages
- **TypeScript tests** (distributed across `packages/*/tests/` and `apps/*/tests/`): vitest
- **Coverage areas**: adapters (file, git, shell, claude-code, copilot-cli, hook integrity), kernel (AAB, engine, monitor, blast radius, heartbeat, integration, e2e pipeline, conformance, tiers, intent drift, enforcement audit, interventions), CLI commands (args, guard, inspect, init, simulate, ci-check, claude-hook, claude-init, export/import, policy-validate, policy-verify, diff, evidence-pr, traces, plugin, auto-setup, config, demo, migrate), decision records, domain models, events, evidence packs (explainable, explanation chain), evidence summary, execution log, export-import roundtrip, impact forecast, invariants, matchers (path-matcher, command-scanner, policy-matcher, benchmark), notification formatter, plugins (discovery, registry, sandbox, validation), policy evaluation (including composer, pack loader, policy packs, evaluation trace, forecast conditions, gate conditions, persona, trust, pack versioning), renderers, replay (engine, comparator, processor), simulation (filesystem, git, package, dependency graph), SQLite storage (migrations, session, sink, store, cross-run, factory, aggregation queries, commands), swarm (scaffolder, config, manifest), telemetry (event queue, event sender, anonymize, cloud sink, event mapper), TUI renderer, violation mapper, VS Code event reader, YAML loading
- **Coverage areas**: adapters (file, git, shell, claude-code, copilot-cli, hook integrity), kernel (AAB, engine, monitor, blast radius, heartbeat, integration, e2e pipeline, conformance, tiers, intent drift, enforcement audit, interventions), CLI commands (args, guard, inspect, init, simulate, ci-check, claude-hook, claude-init, export/import, policy-validate, policy-verify, diff, evidence-pr, traces, plugin, auto-setup, config, demo, migrate), decision records, domain models, events, evidence packs (explainable, explanation chain), evidence summary, execution log, export-import roundtrip, impact forecast, invariants, matchers (path-matcher, command-scanner, policy-matcher, benchmark), notification formatter, plugins (discovery, registry, sandbox, validation), policy evaluation (including composer, pack loader, policy packs, evaluation trace, forecast conditions, gate conditions, persona, trust, pack versioning), renderers, replay (engine, comparator, processor), simulation (filesystem, git, package, dependency graph), SQLite storage (migrations, session, sink, store, cross-run, factory, aggregation queries, commands), telemetry (event queue, event sender, anonymize, cloud sink, event mapper), TUI renderer, violation mapper, VS Code event reader, YAML loading

## CI/CD & Automation

Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ Install in 30 seconds. Your agents can't break what matters.</p>
AI coding agents (Claude Code, Codex CLI, GitHub Copilot CLI, Google Gemini CLI, OpenCode, Goose, and more) run autonomously — writing files, executing commands, pushing code. AgentGuard prevents them from doing catastrophic things: no accidental pushes to main, no credential leaks, no runaway destructive loops. 26 built-in safety checks, zero config required.

**For individuals:** stop your AI from wrecking your machine or repo.
**For teams:** run fleets of agents safely at scale, with audit trails that pass compliance.

> **See it live** — We run 100+ autonomous AI agents building AgentGuard itself, governed 24/7.
> Every deny, every escalation, every code review — visible in real time.
> **[Watch the live swarm &rarr;](https://agentguard-cloud-office-sim.vercel.app)**
**For teams:** govern agents at scale, with audit trails that pass compliance.

## What Problem Does AgentGuard Solve?

Expand Down Expand Up @@ -121,7 +117,6 @@ agentguard cloud login # Opens browser → authenticate → CLI

| Link | Description |
|------|-------------|
| **[Live Office](https://agentguard-cloud-office-sim.vercel.app)** | **Watch our 100+ agent swarm build software 24/7** — real-time governance visualization |
| [Dashboard](https://agentguard-cloud-dashboard.vercel.app) | Team dashboard — runs, violations, analytics |

## Agent Identity
Expand All @@ -144,7 +139,6 @@ Identity consists of a **role** (`developer`, `reviewer`, `ops`, `security`, `ci
| **48 event kinds** | Full lifecycle telemetry: `ActionRequested → ActionAllowed/Denied → ActionExecuted` |
| **Real-time cloud dashboard** | Telemetry streams to your team dashboard; opt-in, anonymous by default |
| **Multi-tenant** | Team workspaces, GitHub/Google OAuth, SSO-ready |
| **Live Office visualization** | [24/7 live view](https://agentguard-cloud-office-sim.vercel.app) of our actual 100+ agent swarm — watch AI build software under governance |
| **Agent SDK** | Programmatic governance for custom integrations and RunManifest-driven workflows |
| **Agent identity** | Declare agent role + driver for governance telemetry — automatic prompt or CLI flag |
| **Pre-push hooks** | Branch protection enforcement via git pre-push hooks, configured from agentguard.yaml |
Expand Down Expand Up @@ -357,7 +351,7 @@ rules:
| `recursive-operation-guard` | Low | `find -exec`, `xargs` with write/delete |
| `lockfile-integrity` | Low | `package.json` changes without lockfile sync |
| `no-verify-bypass` | High | `git push/commit --no-verify` — prevents skipping pre-push/pre-commit hooks |
| `no-self-approve-pr` | Critical | Agents merging or approving PRs they authored — enforces separation of duties in multi-agent swarms |
| `no-self-approve-pr` | Critical | Agents merging or approving PRs they authored — enforces separation of duties in multi-agent setups |
| `cross-repo-blast-radius` | High | Caps cumulative unique files written across all repos in a session (default: 50 files) |

## Architecture
Expand Down Expand Up @@ -539,7 +533,6 @@ agentguard cloud login # Connect after you have an API key
| Resource | URL |
|----------|-----|
| Dashboard | [agentguard-cloud-dashboard.vercel.app](https://agentguard-cloud-dashboard.vercel.app) |
| **Live Office** | **[agentguard-cloud-office-sim.vercel.app](https://agentguard-cloud-office-sim.vercel.app)** — watch our swarm build software 24/7 |
| Website | [agentguardhq.github.io/agentguard](https://agentguardhq.github.io/agentguard/) |
| Docs | [docs/](docs/) |
| Architecture | [docs/unified-architecture.md](docs/unified-architecture.md) |
Expand All @@ -557,7 +550,7 @@ agentguard cloud login # Connect after you have an API key
| [Octi Pulpo](https://github.com/AgentGuardHQ/octi-pulpo) | Coordination — pipeline controller, model routing |
| [ShellForge](https://github.com/AgentGuardHQ/shellforge) | Orchestration — multi-runtime agent execution |
| [Preflight](https://github.com/AgentGuardHQ/preflight) | Protocol — universal design-before-you-build standard |
| [Extensions](https://github.com/AgentGuardHQ/agentguard-extensions) | Drivers, integrations, policies, example swarms |
| [Extensions](https://github.com/AgentGuardHQ/agentguard-extensions) | Drivers, integrations, policies |

## License

Expand Down
11 changes: 5 additions & 6 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

AgentGuard is the **Execution Control Plane for autonomous AI agents** — the independent governance layer that sits between autonomous agents and the real world. All agent side effects must pass through deterministic governance before reaching the environment, regardless of which orchestration framework, cloud provider, or AI model powers the agents.

**Strategic positioning**: Autonomous Execution Governance (AEG). Like Okta for the application layer, AgentGuard controls the trust boundary without replacing the underlying systems. The OSS repo houses Layer 1 (Kernel — the moat) and Layer 2 (Studio Runtime — adapters, swarm templates, execution profiles, and the `agentguard init studio` wizard that bootstraps governed workspaces).
**Strategic positioning**: Autonomous Execution Governance (AEG). Like Okta for the application layer, AgentGuard controls the trust boundary without replacing the underlying systems. The OSS repo houses Layer 1 (Kernel — the moat) and Layer 2 (Studio Runtime — adapters, execution profiles, and the `agentguard init studio` wizard that bootstraps governed workspaces).

**Core thesis**: Once autonomous agents start modifying production systems, organizations need deterministic execution governance. Prompt alignment cannot solve this. Only a reference monitor architecture — default-deny, tamper-evident, fully auditable — provides the guarantees enterprises require. Orchestration is commoditizing (LangGraph, CrewAI, AutoGen, platform-level tools); governance remains scarce.

Expand Down Expand Up @@ -41,7 +41,7 @@ AgentGuard is the **Execution Control Plane for autonomous AI agents** — the i
| MCP governance server (15 tools) | Implemented | Production |
| Plugin ecosystem (discovery, registry, sandboxing) | Implemented | Production |
| 8 policy packs (essentials, strict, ci-safe, enterprise, open-source, soc2, hipaa, eng-standards) | Implemented | Production |
| 26-agent autonomous swarm templates | Implemented | Production |
| Multi-agent governance templates | Implemented | Production |
| KE-1 Structured matchers (Aho-Corasick, globs, reason codes) | **Shipped v2.3.0** | `packages/matchers/` |
| All 46 event kinds mapped to cloud AgentEvent | **Shipped v2.3.0** | `packages/telemetry/src/event-mapper.ts` |
| Agent SDK for programmatic governance | **Shipped v2.3.0** | Programmatic governance integration |
Expand All @@ -61,7 +61,7 @@ AgentGuard is the **Execution Control Plane for autonomous AI agents** — the i
| No-verify-bypass invariant (#24) — blocks `git push/commit --no-verify` | **Shipped v2.6.0** | `packages/invariants/src/definitions.ts` |
| Read-only operations permitted on protected paths | **Shipped v2.7.0** | `packages/adapters/src/file.ts` (closes #648) |
| Install attribution telemetry — opt-in postinstall ping (version, OS, Node, CI env, anon ID) | **Shipped v2.7.0** | `apps/cli/src/postinstall.ts` (PR #991) |
| `agentguard init studio` wizard, execution profiles, swarm template schema | **Shipped v2.7.0** | `apps/cli/src/commands/init.ts`, `packages/swarm/` (PR #987) |
| `agentguard init studio` wizard + execution profiles | **Shipped v2.7.0** | `apps/cli/src/commands/init.ts` (PR #987) |
| OpenCode driver support | **Shipped v2.7.0** | Agent driver registry (PR #1019) |
| Codex CLI adapter (PreToolUse/PostToolUse hook commands) | **Shipped v2.8.0** | `packages/adapters/src/codex-cli.ts` (PR #1024) |
| Gemini CLI adapter (BeforeTool/AfterTool hook commands) | **Shipped v2.8.0** | `packages/adapters/src/gemini-cli.ts` (PR #1024) |
Expand Down Expand Up @@ -197,7 +197,7 @@ This sprint implements the architectural upgrades required for AgentGuard to fun

**Traction note (2026-03-24)**: npm reports ~1,761 weekly downloads, but investigation shows the majority are internal Vercel CI builds of `agentguard-cloud` which pins `@red-codes/agentguard@2.0.0`. Each Vercel build (ephemeral containers, preview deploys, branch builds) triggers a fresh `npm install`. Real external adoption is likely in the low hundreds. This makes install attribution tracking and the user capture funnel critical — without them, we cannot distinguish real adoption from CI noise. The version drift (cloud at 2.0.0 vs OSS at 2.4.0) should also be resolved.

**Release cadence**: v3.0 (KE-2 ActionContext + stranger test + capture funnel), v3.1 (Runner + `apps/runner`), v3.2+ (advanced integrations). Note: `agentguard init studio` wizard, execution profiles, swarm template schema, and install attribution all shipped early in v2.7.x ahead of schedule; Codex CLI + Gemini CLI + DeepAgents adapters shipped in v2.8.x (latest: v2.8.4).
**Release cadence**: v3.0 (KE-2 ActionContext + stranger test + capture funnel), v3.1 (Runner + `apps/runner`), v3.2+ (advanced integrations). Note: `agentguard init studio` wizard, execution profiles, and install attribution all shipped early in v2.7.x ahead of schedule; Codex CLI + Gemini CLI + DeepAgents adapters shipped in v2.8.x (latest: v2.8.4).

### Next — Pull-Based Runner (Phase 6.5 — `apps/runner`)

Expand Down Expand Up @@ -225,9 +225,8 @@ Depends on: v3.0 released + Cloud Phase 2A (orchestrator + runner protocol).

Shipped ahead of schedule in v2.7.x; dependency on v3.0 stranger test waived for early delivery.

- [x] ~~**`agentguard init studio` wizard**~~ — ✅ Done 2026-03-26 — detects project type (monorepo/single), CI/CD, test framework, agent runtimes; offers execution profile + swarm preset selection (full/qa-focused/dev-ops/minimal); `--non-interactive` mode for CI; optional Cloud connection (PR #987)
- [x] ~~**`agentguard init studio` wizard**~~ — ✅ Done 2026-03-26 — detects project type (monorepo/single), CI/CD, test framework, agent runtimes; offers execution profile selection (full/qa-focused/dev-ops/minimal); `--non-interactive` mode for CI; optional Cloud connection (PR #987)
- [x] ~~**Execution profiles**~~ — ✅ Done 2026-03-26 — `ci-safe` and `enterprise` profiles shipped; 6 profiles total via `agentguard init --profile <name>` (PR #987)
- [x] ~~**Swarm template schema**~~ — ✅ Done 2026-03-26 — canonical JSON schema for swarm manifest, squad manifest, swarm config with zero-dependency runtime validator (PR #987)

### Next — Capability-Scoped Sessions (Phase 7)

Expand Down
12 changes: 1 addition & 11 deletions apps/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Every governance session requires an agent identity. Resolution order:

If no identity is set, PreToolUse hooks **block all actions** with a message directing the agent to identify itself. The `.agentguard-identity` file is session-scoped and gitignored — it is blanked on session start/stop to prevent stale values.

For autonomous agent swarms, pass identity via env var per-process or `--agent-name` flag:
For multi-agent setups, pass identity via env var per-process or `--agent-name` flag:

```bash
aguard guard --agent-name "builder-agent-3" --policy agentguard.yaml
Expand Down Expand Up @@ -217,16 +217,6 @@ aguard status # Confirms: ⚡ Token optimization active

Works with git, npm, cargo, tsc, docker, kubectl, and more. No configuration needed — AgentGuard detects RTK automatically.

## Agent Swarm

AgentGuard ships with a 26-agent autonomous development swarm:

```bash
aguard init swarm # Scaffolds agents, skills, and governance into your repo
```

Agents handle implementation, code review, CI triage, security audits, planning, docs, and more — all under governance.

## Links

- [GitHub](https://github.com/AgentGuardHQ/agentguard)
Expand Down
1 change: 0 additions & 1 deletion apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"@red-codes/policy": "workspace:*",
"@red-codes/renderers": "workspace:*",
"@red-codes/storage": "workspace:*",
"@red-codes/swarm": "workspace:*",
"@red-codes/telemetry": "workspace:*",
"@red-codes/telemetry-client": "workspace:*",
"@types/better-sqlite3": "^7.6.0",
Expand Down
Loading
Loading