___ __ ______
/ | ____ ___ ____ / /_ / ____/____ _____ ___
/ /| |/ __ \/ _ \/ __ \/ __/ /___ \ / __ `/ __ `__ \
/ ___ / /_/ / __/ / / / /_ ____/ / /_/ / / / / / /
/_/ |_\__, /\___/_/ /_/\__/ /_____/\__,_/_/ /_/ /_/
/____/
AgentJam
AgentJam is an open-source, harness-agnostic runtime and governance system for AI coding agents.
It establishes a strict separation between model reasoning and project execution:
The model provides reasoning. AgentJam provides the rules, tools, current conventions, freshness requirements, language definitions, and constraints.
AgentJam prevents AI agents from introducing unvetted dependencies, inventing non-existent APIs, using outdated training memory, or generating visual slop.
Install AgentJam into Your Project
Manual Install:
go install github.com/primasdevlabs/agentjam/cmd/agentjam@latest
cd your-project
agentjam init # materialize canonical tree under .agentjam/ (optional, editable source)
agentjam install --harness cursor # or claude-code, windsurf, gemini, cline, roo-code, devin, generic, auto, all
agentjam scan # policy-scan your codebase (--offline skips PM checks)
agentjam uninstall # remove everything install wrote
For AI agents — paste this repository into Claude, Devin, Cursor, etc. and tell it:
Install AgentJam into this project. Run
go install github.com/primasdevlabs/agentjam/cmd/agentjam@latest, thenagentjam install --harness <this-environment>andagentjam scan. ReadAGENTJAM.mdfor your operational protocol before writing any code. Available commands:init(materialize canonical tree under.agentjam/),install --harness <h>(write harness-native rule files),scan [--offline](policy gate, exits 1 on strict-block),eval <file>(single-file check),validate(resource integrity),detect(stacks + harnesses),preflight(toolchain check),context(assembled snapshot),run <workflow> --list,export --harness <h>,mcp(stdio tool server),uninstall(remove installed files).
install writes domain-organized rule trees native to your harness — .cursor/rules/{skills,policies,agents}/<category>/, .claude/skills/<category>/<id>/SKILL.md + .claude/{agents,policies}/, .gemini/{skills,policies,agents}/, .windsurf/rules/, .clinerules/, .roo/rules/, .devin/{playbook.md,rules/}, .agentjam/rules/ for generic — plus AGENTJAM.md, the entry-point runbook that defines the enforce→scan→fix loop every agent must follow. Every installed file is recorded in .agentjam/installed.json so uninstall removes exactly what was written. agentjam init optionally materializes the full canonical tree under .agentjam/ (agents/, skills/, policies/, …) for editing — project root stays clean.
CLI Reference
| Command | What it does | Key flags |
|---|---|---|
version |
Print the AgentJam CLI version | — |
init |
Materialize the canonical resource tree (agents, skills, policies, workflows, …) under .agentjam/ — the editable source of truth installs render from |
--bare (config + skeleton dirs only), --force (overwrite), --only <dirs> (subset) |
install |
Write harness-native skills/agents/policies files + AGENTJAM.md runbook into the project |
--harness auto|all|cursor|claude-code|windsurf|gemini|cline|roo-code|devin|generic, --agent <id>, --dry-run |
uninstall |
Remove installed files (ledger-tracked, never touches user files) | --harness <h> (default all), --purge (also root rule files + .agentjam/), --dry-run |
scan |
Policy-scan all source files: secrets, insecure APIs, deprecated/vulnerable deps, god files, flat layout, debug leftovers, TODO density — exits 1 on strict-block | --path, --ext, --offline (skip npm/go registry checks), -v |
eval |
Evaluate a single file against loaded policies with line numbers | <file> argument |
validate |
Check canonical resource integrity (refs, enums, duplicates) — must report 0 errors | — |
detect |
Show detected AI harnesses and project stacks (JSON) | — |
preflight |
Verify required toolchain binaries for detected stacks | — |
context |
Generate the assembled context snapshot (agent + skills + policy matrix) | — |
run |
Execute a multi-step workflow; resolves agents and assembles per-step context | <workflow> argument, --list |
export |
Export flat rule files for harnesses (.cursorrules, CLAUDE.md, GEMINI.md, …) |
--harness <h>|auto|all, --agent <id> |
build-registry |
Regenerate registry.json + registry/index/ + per-type indexes |
— |
mcp |
Start the MCP stdio server exposing workspace tools (filesystem, git, terminal, github, run_workflow) | — |
run-e2e |
Execute the end-to-end system verification suite | — |
Featured Tech Stacks & Ecosystem Matrix
AgentJam provides canonical, enforceable governance rules and stack profiles for major software development stacks across web, backend, mobile, systems, and data ecosystems.
1. Web & Frontend Framework Stacks
- Next.js Stack (
stacks/nextjs)- Language: TypeScript 5+ (Strict Mode)
- Framework: Next.js 14/15 (App Router, Server Components, Server Actions, Route Handlers)
- Styling: CSS Modules, Vanilla CSS, Tailwind CSS v4
- Tooling & Testing: Biome / ESLint, Vitest, Playwright, pnpm / npm
- React SPA Stack (
stacks/react)- Language: TypeScript 5+
- Bundler & Runtime: Vite, React 19
- State & Styling: Zustand, Custom CSS Variables / CSS Modules
- Tooling & Testing: Vitest, Testing Library, Biome
- Vue 3 Stack (
stacks/vue)- Language: TypeScript 5+
- Framework & State: Vue 3 (Composition API,
<script setup>), Pinia, Vue Router - Bundler & Styling: Vite, Scoped CSS, Tailwind CSS
- Tooling & Testing: Vitest, ESLint, Prettier
2. Backend & API Stacks
- Laravel Stack (
stacks/laravel)- Language: PHP 8.3 / 8.4
- Framework: Laravel 11/12 (Modular Monolithic Architecture, Form Requests, Inertia.js / Blade)
- Database & ORM: PostgreSQL / MySQL, Eloquent ORM
- Code Quality & Testing: Laravel Pint, PHP-CS-Fixer, Pest PHP, PHPUnit
- NestJS Stack (
stacks/nestjs)- Language: TypeScript 5+
- Framework: NestJS 10/11 (Modular Clean Architecture, Controllers, DTOs, Class Validator)
- Database & ORM: Prisma ORM / TypeORM, PostgreSQL / Redis
- Tooling & Testing: Jest, Vitest, ESLint, Prettier
- Django Stack (
stacks/django)- Language: Python 3.11+
- Framework: Django 5+, Django REST Framework (DRF)
- Database & ORM: PostgreSQL, Django ORM
- Tooling & Package Management: uv, Ruff, Pytest, Black
- Ruby on Rails Stack (
stacks/rails)- Language: Ruby 3.3+
- Framework: Rails 7/8 (ActiveRecord, ActionPack, Turbo / Hotwire)
- Database: PostgreSQL, SQLite
- Tooling & Testing: RuboCop, RSpec, Bundler
- Generic Fallback Stack (
stacks/generic)- Polyglot configuration fallback for custom, legacy, or hybrid applications.
3. Systems, Mobile & Infrastructure Stacks
- Rust Systems Stack (
languages/systems/rust)- Frameworks: Actix-web, Axum, Tokio, Serde
- Tooling & Testing: Cargo, Rustfmt, Clippy,
cargo test
- Mobile Stack (
languages/mobile/)- Platforms: React Native, Expo, Flutter (Dart), Swift (iOS), Kotlin (Android)
- Conventions: Clean Architecture, Offline-first data persistence, Platform boundary security
- Infrastructure as Code Stack (
languages/infrastructure/)- Formats: HCL (Terraform), Dockerfile, CUE, Nix, YAML manifests
- Conventions: Declarative configuration, Immutable infrastructure, Zero hardcoded secrets
4. Language Ecosystem Matrix
AgentJam indexes 15 distinct language ecosystems under languages/:
systems/(Rust, C, C++, Zig, Nim, D)web/(TypeScript, JavaScript, HTML, CSS, SCSS, Less, WebAssembly)jvm/(Java, Kotlin, Scala, Groovy, Clojure)dotnet/(C#, F#, Visual Basic .NET)apple/(Swift, Objective-C, Objective-C++)mobile/(Dart, Kotlin, Swift, Java)backend/(PHP, Python, Go, Ruby, Elixir, Erlang, Crystal)data/(Python, R, Julia, SQL, MATLAB)functional/(Haskell, OCaml, Elm, Clojure, Lisp)scripting/(Bash, Zsh, Fish, PowerShell, Lua)infrastructure/(HCL, Terraform, Dockerfile, Nix, CUE)databases/(SQL, PL/pgSQL, PL/SQL, T-SQL, Cypher)smart-contracts/(Solidity, Vyper, Move, Cairo)embedded/(Embedded C, C++, Rust, MicroPython)legacy/(COBOL, Fortran, Pascal, Ada)
Technical Compatibility & Supported Environments
Supported AI Environments (integrations/)
- IDEs: VS Code, Cursor, Windsurf, Zed
- Autonomous Agents: Devin, Agentless, AutoGPT
- CLIs: Claude Code, Goose, Aider, OpenCode, Gemini CLI
- Extensions: Cline, Roo Code, GitHub Copilot Chat
- AI Platforms: Antigravity, OpenAI Assistants API, LangChain, LlamaIndex
- Generic: Standard Markdown / System Prompt fallback
Architectural Workflow
flowchart TD
subgraph Inputs["Model Reasoning Layer"]
LLM["AI Model / LLM Engine"]
end
subgraph Core["AgentJam Governance & Runtime"]
PE["pkg/policy"]
CR["Context Resolver (pkg/runtime)"]
VAL["pkg/validator"]
REG["pkg/registry"]
end
subgraph Canonical["Canonical AgentJam Assets"]
POL["Policies (Core, Design, Project)"]
AG["Agents (software-engineer, frontend-engineer, etc.)"]
SK["Skills (testing, anti-slop, etc.)"]
WF["Workflows (existing-project-audit, etc.)"]
ST["Stack Profiles (nextjs, laravel, nestjs, etc.)"]
LANG["Language Registry (15 ecosystems)"]
end
subgraph Export["Harness Adapters Layer (pkg/adapters)"]
AD_CLI["CLI Adapter (CLAUDE.md)"]
AD_IDE["IDE Adapter (.cursorrules, .vscode)"]
AD_EXT["Extension Adapter (.clinerules)"]
AD_PLAT["AI Platform Adapter (GEMINI.md)"]
end
subgraph Targets["Target AI Environments"]
T_CLAUDE["Claude Code / Goose / Aider"]
T_CURSOR["Cursor / Windsurf / VS Code"]
T_CLINE["Cline / Roo Code"]
T_ANTIGRAVITY["Antigravity / Custom Frameworks"]
end
LLM --> CR
CR --> PE
PE --> POL
CR --> AG
AG --> SK
SK --> ST
SK --> LANG
WF --> AG
PE --> VAL
VAL --> REG
REG --> Export
Export --> AD_CLI
Export --> AD_IDE
Export --> AD_EXT
Export --> AD_PLAT
AD_CLI --> T_CLAUDE
AD_IDE --> T_CURSOR
AD_EXT --> T_CLINE
AD_PLAT --> T_ANTIGRAVITY
Repository Structure
fullstack/
├── cmd/ # Executable Go binaries (cmd/agentjam)
├── pkg/ # Modular Go packages
│ ├── core/ # Go domain types, constants, errors, and utils
│ ├── parser/ # Markdown frontmatter and YAML manifest parser
│ ├── policy/ # Policy Engine & 12 anti-slop design governance evaluators
│ ├── validator/ # Repository and manifest cross-reference validator
│ ├── registry/ # Search index builder
│ ├── adapters/ # Target harness exporters (CLAUDE.md, .cursorrules, GEMINI.md)
│ ├── context/ # Context Manager & token estimator
│ ├── memory/ # Working, Episodic, and Semantic memory store
│ ├── toolchain/ # Toolchain preflight checker & PATH binary inspector
│ ├── dispatcher/ # Tool Dispatcher with safety level enforcement
│ └── runtime/ # Execution runtime, environment detector, and orchestrator
├── agents/ # Composed agent personas (software-engineer, code-reviewer, etc.)
├── skills/ # Domain-specific skill modules
├── policies/ # Non-negotiable policy governance matrix
├── workflows/ # Single and multi-agent execution flows
├── stacks/ # Stack profiles (nextjs, laravel, nestjs, react, vue, django, rails, generic)
├── languages/ # Language registry across 15 ecosystems
├── integrations/ # Target harness export adapters
└── docs/ # Canonical documentation suite
Go Packages Architecture
| Package | Path | Description |
|---|---|---|
github.com/primasdevlabs/agentjam/pkg/core |
pkg/core | Go structs and types for agents, skills, workflows, policies, stacks, and languages. |
github.com/primasdevlabs/agentjam/pkg/parser |
pkg/parser | Parser for agent.yaml, skill.yaml, workflow.yaml, SKILL.md, and Markdown frontmatter. |
github.com/primasdevlabs/agentjam/pkg/policy |
pkg/policy | Evaluator for core policies, design governance rules, and anti-slop constraints. |
github.com/primasdevlabs/agentjam/pkg/validator |
pkg/validator | Structural and cross-reference validator for AgentJam repository resources. |
github.com/primasdevlabs/agentjam/pkg/registry |
pkg/registry | Indexer building registry metadata for discovery and search. |
github.com/primasdevlabs/agentjam/pkg/adapters |
pkg/adapters | Exporters rendering canonical resources into CLAUDE.md, .cursorrules, and GEMINI.md. |
github.com/primasdevlabs/agentjam/pkg/runtime |
pkg/runtime | Execution runtime, environment detector, context, memory, and tool dispatcher orchestrator. |
Installation & Usage
Direct Installation from Git
You can install the agentjam CLI binary directly from Git using go install:
# Install latest release binary directly from GitHub
go install github.com/primasdevlabs/agentjam/cmd/agentjam@latest
# Or install a specific release tag
go install github.com/primasdevlabs/agentjam/cmd/agentjam@v1.1.3
Local Build & Verification Commands
# Build the agentjam binary locally
go build -o agentjam ./cmd/agentjam
# Run all Go unit test suites
go test ./...
# Run repository validation via Go CLI
go run ./cmd/agentjam validate
Programmatic Usage Example (Go Module)
import (
"github.com/primasdevlabs/agentjam/pkg/context"
"github.com/primasdevlabs/agentjam/pkg/dispatcher"
"github.com/primasdevlabs/agentjam/pkg/runtime"
)
// 1. Initialize Go runtime
rt := runtime.NewRuntime(workspaceRoot, dispatcher.ToolDispatcherOptions{AllowDestructive: true})
// 2. Resolve workspace context snapshot
cm := rt.GetContextManager()
snapshot := cm.BuildContextSnapshot(context.ContextOptions{ActiveAgent: "software-engineer"})
Policy Matrix & Rules Hierarchy
AgentJam enforces a strict precedence hierarchy when resolving execution guidance:
- Current Codebase State: Existing code, configuration files, and live tests.
- Project Configuration: Active
.agentjam/workspace rules and stack profile. - Pinned Rules: Explicit user-defined directives and policy overrides.
- Authoritative Documentation: Verified current official documentation.
- Current Tool & Package Metadata: Inspected package signatures and lockfiles.
- Model Knowledge: Unverified training data (lowest precedence).
Design Governance System (policies/design/)
AgentJam includes 12 declarative design policies to prevent AI-generated visual slop:
- No Emoji Icons: Prohibits UI emojis (
🚀⚡🔥). Enforces SVG icon libraries (Lucide, Heroicons, Tabler). - No Dark Mode Gradients: Rejects indigo/violet glowing card grids (
from-purple-600 to-indigo-600). - Typography Governance: Prohibits unguided font defaults. Preserves existing design system fonts (with explicit "use Noto" exception).
- No Marketing Buzzwords: Forbids filler copy ("empower", "supercharge", "seamlessly") and excessive em dashes.
Security Policy
AgentJam enforces strict security guidelines across all agent activities:
- No Hardcoded Secrets: Plain-text API keys, private tokens, or credentials must never be committed. Environment variables and
.env.exampletemplates must be used. - Parameterized Database Queries: Dynamic SQL string concatenation is forbidden. ORM models or parameterized query parameters must be used exclusively.
- Input Validation: External payloads at HTTP boundaries, queues, and webhooks must be validated using strict schemas (Zod, Valibot, FormRequest, ClassValidator, Pydantic).
- Lockfile & CVE Scanning: Third-party dependencies must be scanned for security advisories prior to release.
Report security vulnerabilities via email to security@agentjam.org.
Contributing & Community
We welcome contributions to AgentJam! You can contribute new agents, skills, tools, workflows, stack profiles, language manifests, or policy specifications.
Guidelines
- Ensure all canonical resources remain harness-neutral.
- Follow existing directory and file naming conventions.
- Verify that your changes pass all build, test, and validation checks before opening a pull request:
go build ./... go test ./... go run ./cmd/agentjam validate
For detailed contributing instructions, read docs/contributing/index.md.
Credits & License
AgentJam is built and maintained by the open-source AgentJam Community.
Licensed under the MIT License.
