A Claude Code agent team with structured orchestration, review, and git management.
Find a file
2026-04-02 15:40:57 -04:00
agents done 2026-04-02 15:40:57 -04:00
rules feat: template-based dual-target generator for Claude + Codex 2026-04-02 08:51:00 -04:00
schemas Refine agent escalation contracts 2026-04-02 14:05:51 -04:00
skills Refine agent escalation contracts 2026-04-02 14:05:51 -04:00
spec feat(protocol): add authored runtime and team configs 2026-04-02 13:25:19 -04:00
.envrc updated 2026-04-02 09:19:17 -04:00
.gitignore refactor(build): drive generation from shared configs 2026-04-02 13:25:34 -04:00
CLAUDE.md feat(workflow): add flake and just entrypoints 2026-04-02 13:26:08 -04:00
flake.lock feat: add Codex CLI compatibility layer 2026-04-02 08:28:29 -04:00
flake.nix feat(workflow): add flake and just entrypoints 2026-04-02 13:26:08 -04:00
generate.sh refactor(build): drive generation from shared configs 2026-04-02 13:25:34 -04:00
install.sh refactor(build): drive generation from shared configs 2026-04-02 13:25:34 -04:00
justfile feat(workflow): add flake and just entrypoints 2026-04-02 13:26:08 -04:00
README.md Refine agent escalation contracts 2026-04-02 14:05:51 -04:00
SETTINGS.yaml feat(protocol): add authored runtime and team configs 2026-04-02 13:25:19 -04:00
TEAM.yaml Refine agent escalation contracts 2026-04-02 14:05:51 -04:00

AI.conf

A portable agent-team config repo with shared authored sources and generated target outputs. Clone it, run the flake entrypoints or the just wrapper, and the repo will generate/install the target-specific config for the supported tools.

Quick install

git clone <repo-url>
cd agent-team
nix develop              # enter devShell with yq + envsubst
nix run .#check          # validate protocols + generate artifacts
nix run .#install        # install generated outputs into the supported target config dirs

The supported user-facing entrypoints are the flake apps and the just wrapper. generate.sh and install.sh remain the internal implementation layer behind them. Works on Linux, macOS, and Windows (Git Bash).

Nix entrypoints

The flake exposes formal workflow entrypoints:

nix run .#validate   # syntax + protocol presence/basic shape checks
nix run .#build      # generate settings.json + claude/ + codex/
nix run .#check      # validate + build
nix run .#install    # run install.sh
nix flake check      # run flake checks (validate + build in sandboxed check derivations)

just is also supported as a convenience wrapper over those same flake commands:

just validate
just build
just check
just install
just clean          # removes generated artifacts: settings.json + claude/ + codex/

generate.sh and install.sh are kept as internal implementation details for portability and debugging, but they are no longer the primary documented workflow.

Maintenance

Symlink fragility: some generated target files are installed as symlinks by install.sh. Tools that rewrite those files may replace the symlink with a regular file. If repo edits stop being reflected in an installed target config, re-run ./install.sh to restore the symlink.

Agents

Agent Model policy Role
grunt fast Cheap implementer for trivial, tightly scoped work.
worker balanced Standard implementer for normal development tasks.
senior strong Expensive implementer for ambiguous, architectural, or high-risk work.
debugger balanced Diagnoses and fixes bugs with minimal targeted changes.
documenter balanced Writes and updates docs. Never modifies source code.
architect strong Triage, research coordination, architecture design, wave decomposition. Read-only.
researcher balanced Parallel fact-finding. One instance per research question. Read-only.
reviewer balanced Code quality review + AC verification + claim checking. Read-only.
auditor balanced Security analysis + runtime validation. Read-only, runs in background.

Skills

Skill Purpose
orchestrate Orchestration framework — load on demand to decompose and delegate complex tasks
conventions Core coding conventions and quality priorities shared by all agents
worker-protocol Output format, feedback handling, and operational procedures for worker agents
qa-checklist Self-validation checklist workers run before returning results
message-schema Typed YAML frontmatter envelopes for all inter-agent communication
project Instructs agents to check for and ingest a project-specific skill file before starting work

Rules

Global instructions are modularized in rules/. Each file covers a focused topic (git workflow, Nix preferences, response style, etc.). Agent-team specific protocols live in skills, not rules. Target adapters decide how those rules are surfaced.

Target usage

Claude Code

Load the orchestrate skill when a task is complex enough to warrant delegation:

/skill orchestrate

Once loaded, Claude acts as orchestrator — decomposing tasks, selecting agents, reviewing output, and managing the git flow. Agents are auto-delegated based on task type; you don't invoke them directly.

For simple tasks, invoke an agent directly:

/agent worker Fix the broken pagination in the user list endpoint
/agent grunt Rename this variable consistently in one file
/agent senior Untangle this multi-file initialization bug

Codex CLI

Agents are available as named agents in the installed Codex config. Invoke them with:

codex --agent worker "Fix the broken pagination in the user list endpoint"

Dual-target generation

This repo uses two authored protocol files:

  • SETTINGS.yaml for runtime policy (filesystem, approvals, network, model intent)
  • TEAM.yaml for team inventory metadata (agents, skills, rules)

Long-form instructions remain authored in Markdown (agents/*.md, skills/*/SKILL.md, rules/*.md).

Runtime policy is documented in spec/agent-runtime-v1.md and described by schemas/agent-runtime.schema.json. Team inventory is documented in spec/team-protocol-v1.md. generate.sh derives target-specific outputs for the currently supported adapters.

What gets generated

Source Generated Location
TEAM.yaml + agents/*.md claude/agents/*.md Claude adapter output
TEAM.yaml + agents/*.md codex/agents/*.toml Codex adapter output
SETTINGS.yaml settings.json (compatibility artifact, generated) repo root
SETTINGS.yaml claude/settings.json Claude adapter output
SETTINGS.yaml codex/config.toml Codex adapter output
TEAM.yaml + rules/*.md codex/AGENTS.md Codex adapter output
TEAM.yaml + skills/*/SKILL.md installed skill dirs target install output

All final config files are generated artifacts. The authored protocol sources are SETTINGS.yaml, TEAM.yaml, and Markdown instruction content. The primary workflows are nix run .#build / nix run .#install or the equivalent just commands.

Narrow compatibility caveats:

  • TEAM schema is intentionally rigid/repo-specific in v1. Inventory changes require schema updates in lockstep.
  • Claude generated agent frontmatter is normalized by generator serialization (field order/quoting), which may produce non-semantic diffs.
  • Codex skill installation is TEAM-authoritative when TEAM.yaml is present. Legacy directory fallback is used only when TEAM is absent or unparseable.

Shared runtime intent is generated conservatively across tools:

Shared source Claude adapter Codex adapter
runtime.filesystem = read-only permissions.defaultMode = "plan" sandbox_mode = "read-only"
runtime.filesystem = workspace-write permissions.defaultMode = "acceptEdits" sandbox_mode = "workspace-write"
runtime.approval = manual partially represented approval_policy = "on-request"
runtime.approval = guarded-auto partially represented approval_policy = "untrusted"
runtime.approval = full-auto partially represented approval_policy = "never"

The adapters do not expose identical config surfaces. For example, Codex does not support Claude-style per-tool allow / deny / ask patterns directly. The shared protocol keeps the intent portable, then adapters derive the closest target behavior. Use target-specific fields only where there is no shared equivalent:

targets:
  codex:
    approval_policy: untrusted
    network_access: false
  claude:
    claude_md_excludes:
      - .claude/agent-memory/**

Shared protocol

The protocol source is YAML because it is easier to read and annotate than JSON or TOML while still being easy to validate with JSON Schema.

The protocol is intentionally small in v1:

  • portable model tier and reasoning level
  • filesystem access intent
  • approval intent
  • network access
  • portable tool classes
  • protected paths
  • dangerous shell command prompts
  • limited target-specific escape hatches

Example:

version: 1

model:
  class: balanced
  reasoning: medium

runtime:
  filesystem: workspace-write
  approval: guarded-auto
  network_access: false
  tools:
    - shell
    - read
    - edit
    - write
    - glob
    - grep
    - web_fetch
    - web_search

safety:
  protected_paths:
    - ~/.ssh/**
    - ~/.aws/**
    - ~/.gnupg/**
    - "**/.env*"
  dangerous_shell_commands:
    ask:
      - rm *
      - git reset --hard*
      - sudo *

Model mapping by target

Claude adapter Codex adapter
opus gpt-5.4
sonnet gpt-5.3-codex
haiku gpt-5.1-codex-mini

Template variables

Agent body text uses ${VAR} placeholders that are expanded per-target by generate.sh:

Variable Claude adapter Codex adapter
${PLANS_DIR} .claude/plans plans
${WEB_SEARCH} via WebFetch/WebSearch via web search
${SEARCH_TOOLS} Use Grep/Glob/Read Search the codebase

Skills and rules are tool-agnostic and shared as-is — do not add tool-specific references to them.

Project-specific config

Each project repo can extend the team with local config in .claude/:

  • .claude/CLAUDE.md — project-specific instructions (architecture notes, domain conventions, stack details)
  • .claude/agents/ — project-local agent overrides or additions
  • .claude/skills/project.md — skill file that agents automatically ingest before starting work (see the project skill)

Commit .claude/ with the project so the team has context wherever it runs.

Memory

Two memory systems coexist:

  • Manual memory (.claude/memory/) — curated context files with YAML frontmatter, indexed by MEMORY.md. Loaded as part of the CLAUDE.md hierarchy on every session. Use this for project decisions, user preferences, and reference pointers.
  • Agent memory (.claude/agent-memory/) — Claude Code's built-in runtime memory, written automatically by agents with memory: project scope. Excluded from CLAUDE.md context via claudeMdExcludes to avoid polluting the context window.

Commit both directories with the repo so memory persists across machines and sessions.