Autonomous AI coding agents powered by Claude Code
Turn Claude into a self-directed software development team that plans features, executes work in parallel, and maintains quality through comprehensive automated reviews.
,---.
/ |
/ |
Istari / |
/ |
___,' |
< -' :
`-.__..--'``-,_\_
|o/ <o>` :,.)_`>
:/ ` ||/)
(_.).__,-` |\
/( `.`` `| :
\'`-.) ` ; ;
| ` /-<
| ` / `.
,-_-..____ /| ` :__..-'\
/,'-.__\\ ``-./ :` ; \
`\ `\ `\\ \ : ( ` / , `. \
\` \ \\ | | ` : : .\ \
\ `\_ )) : ; | | ): :
(`-.-'\ || |\ \ ` ; ; | |
\-_ `;;._ ( ` / /_ | |
`-.-.// ,'`-._\__/_,' ; |
\:: : / ` , / |
|| | ( ,' / / |
|| ,' / SSt|
Istari is a complete AI-driven software development workflow built on Claude Code. It provides eight slash commands that transform feature requests into production-ready code through:
- Intelligent decomposition of Jira tickets into dependency-aware tasks ("beads")
- Parallel autonomous execution by multiple AI agents coordinating via message passing
- Built-in quality gates including TDD, static analysis, and multi-tool code reviews
- Institutional knowledge capture through daily learning files and procedural memory
- Zero-conflict collaboration via file reservation system for parallel agents
The result: Define a feature once, then let multiple Claude instances work autonomously in parallel while you focus on higher-level decisions.
Istari establishes a comprehensive AI coding environment by integrating:
- beads/beads_viewer - Task management with dependency tracking and robot planner for optimal work ordering
- ultimate_bug_scanner - Pre-commit static analysis detecting 1000+ bug patterns across 7 languages
- mcp_agent_mail - Inter-agent messaging and file reservation system for conflict-free parallel work
- cass_memory_system - Procedural memory for storing coding standards and lessons learned
- coding_agent_session_search - Historical session search for finding past solutions
- ripgrep (rg) - Fast code search across large codebases
- ast-grep (sg) - Structural code search using AST patterns
- fzf - Fuzzy file finding for rapid navigation
- lazygit - Interactive git TUI for reviewing changes
- jq - JSON processing for parsing tool outputs
- Copilot CLI - Oracle for complex queries (defaults to grok-code-fast-1 for speed)
- Superpowers - Claude Code plugin for TDD guidance and code review
- Compound Engineering - Claude Code plugin for plan expansion
- Context7 - MCP server providing up-to-date library documentation (requires API key)
- Atlassian - MCP server for Jira/Confluence integration (OAuth)
- Destructive Command Guard (dcg) - Rust CLI tool preventing destructive git/filesystem/database operations
This toolchain enables autonomous multi-agent execution where multiple Claude instances can:
- Work in parallel without conflicts (via agent_mail file reservations)
- Make informed decisions (via Context7, Confluence, procedural memory)
- Maintain quality (via TDD, bug scanning, multi-tool reviews)
- Operate safely (via Destructive Command Guard blocking dangerous operations)
- Learn and improve (via daily learning files shared across agents)
- Consult oracles when stuck (via Copilot CLI)
Option A: Clone the repository (recommended)
# Clone istari repository
cd ~/your-workspace
git clone https://github.com/Contrast-Security-OSS/istari.git
# Use istari-update to install commands
cd istari
/istari-update ~/.claudeOption B: Manual download
# Create .claude/commands directory in parent of your projects
cd ~
mkdir -p .claude/commands
# Download all 8 command files
cd .claude/commands
curl -O https://raw.githubusercontent.com/Contrast-Security-OSS/istari/main/istari-setup.md
curl -O https://raw.githubusercontent.com/Contrast-Security-OSS/istari/main/istari-plan.md
curl -O https://raw.githubusercontent.com/Contrast-Security-OSS/istari/main/istari-work.md
curl -O https://raw.githubusercontent.com/Contrast-Security-OSS/istari/main/istari-update.md
curl -O https://raw.githubusercontent.com/Contrast-Security-OSS/istari/main/istari-upgrade.md
curl -O https://raw.githubusercontent.com/Contrast-Security-OSS/istari/main/istari-review.md
curl -O https://raw.githubusercontent.com/Contrast-Security-OSS/istari/main/istari-skill-builder.md
curl -O https://raw.githubusercontent.com/Contrast-Security-OSS/istari/main/istari-help.mdWhy parent directory? Claude Code searches upward from your project for .claude/commands, making these commands available across all your projects from a single location.
Open Claude Code in any project and type / - you should see all 8 commands:
/istari-setup- Install and verify prerequisites/istari-plan- Decompose tickets into beads/istari-work- Execute beads autonomously/istari-update- Sync commands from repo/istari-upgrade- Update tool versions/istari-review- Comprehensive PR review/istari-skill-builder- Generate skills from patterns/istari-help- Display command reference
In Claude Code, run:
/istari-setup
This will interactively install all toolchain components (see detailed breakdown below). This only needs to be run once unless a tool installation needs to be repaired. You are then ready to use /istari-plan to plan new work and /istari-work to get one or more Claude Code instances working on the plan in your project.
What it does: Verifies and installs all required tools, plugins, and MCP servers.
Interactive workflow:
- Detects your OS (macOS/Linux) and package manager
- Checks each tool and offers to install missing components
- Configures Claude Code plugins (Superpowers, Compound Engineering)
- Sets up MCP servers (Context7, Atlassian) with API credentials
- Generates comprehensive status report
Side effects and required credentials:
-
Copilot CLI configuration - Creates
~/.copilot/config.jsonwith:{ "model": "grok-code-fast-1", "temperature": 0.2, "maxTokens": 8192 }You can change the model later, but grok-code-fast-1 is recommended for speed.
-
Claude Code configuration - Updates
~/.claude.jsonwith:{ "maxTokens": 200000 }This enables extended context for large codebases.
-
Context7 API key - You'll be prompted to:
- Visit https://context7.com/dashboard
- Create a free account
- Generate an API key
- Enter it during setup
Context7 provides real-time documentation for any library, eliminating hallucinated API calls.
-
Atlassian OAuth - After installation, run
/mcpin Claude Code to:- Authenticate via browser OAuth flow
- Grant access to your Jira/Confluence instance
This enables automatic Jira ticket fetching and Confluence wiki queries.
-
Agent mail server - Starts a background process on
localhost:8765for inter-agent messaging.
When to run: Once per machine, or when adding new projects that need the toolchain.
What it does: Decomposes Jira tickets or feature descriptions into structured, dependency-aware beads.
Input formats:
/istari-plan PROJ-123
/istari-plan Implement two-factor authentication with TOTP support
Workflow:
- Fetches ticket details (if Jira ID) or creates new ticket (if description)
- Loads context from:
- Recent learnings (
.claude/learnings/) - Procedural memory (cass)
- Confluence wiki (via Atlassian MCP)
- Existing codebase (via ripgrep/ast-grep)
- Recent learnings (
- Interactive brainstorming with Superpowers:
- Clarifying questions about requirements
- Technical constraints discussion
- Risk identification
- Plan expansion with Compound Engineering:
- Breaks feature into granular tasks
- Identifies dependencies
- Estimates complexity
- Bead creation with:
- Clear acceptance criteria
- Dependency links
- Priority/complexity scores
- Robot plan generation showing:
- Actionable beads (no blockers)
- Blocked beads (waiting on dependencies)
- Optimal execution order for parallelization
Outputs:
.beads/directory with task definitions.beads/robot-plan.jsonfor dynamic work selection.claude/learnings/YYYY-MM-DD.mdwith planning insights
Side effects:
- May create new Jira ticket if free-form description provided
- Commits planning artifacts to git (update your .gitignore file to ignore /docs/plans if this isn't desired)
- Syncs beads to remote repository
When to run: Once per feature/ticket before starting implementation.
What it does: Activates autonomous agent mode to execute beads using TDD and quality gates.
Prerequisites:
- Must have beads created (run
/istari-planfirst) - Must be on a feature branch (format:
JIRA-ID_feature-name)
Autonomous workflow:
-
Initialization:
- Loads procedural memory and recent learnings
- Registers with agent_mail using unique name (e.g.,
claude_dev_purple_falcon_20251222_143052) - Checks inbox for coordination messages
-
Bead selection:
- Runs
bv --robot-planto get fresh work landscape - Selects highest-impact actionable bead (unblocks most work)
- Announces work start via agent_mail
- Runs
-
File reservation:
- Uses
ast-grepandripgrepto identify affected files - Checks reservations via
am check_reservation <pattern> - Reserves files exclusively via
am reserve <pattern> - If conflict: Messages other agent to coordinate or selects different bead
- Uses
-
TDD implementation:
- Uses Superpowers for Red-Green-Refactor guidance
- Searches codebase for existing patterns (ripgrep/ast-grep)
- Writes failing test first
- Implements minimal code to pass
- Refactors for quality
- Consults Copilot CLI oracle if stuck after 2 attempts
-
Quality gates (MANDATORY - ALL must pass):
- ✅ All tests passing
- ✅ UBS scan clean or warnings-only
- ✅ Superpowers review
- ✅
/review(Claude built-in) - ✅
/security-review - ✅
/workflow:review(Compound Engineering) - ✅ All critical issues resolved
Agents cannot skip reviews - failure to run all reviews means the bead is incomplete.
-
Commit and learn:
- Creates descriptive commit message linking to bead ID
- Pushes to feature branch
- Documents learnings in
.claude/learnings/YYYY-MM-DD.md(you may also want to add this to .gitignore) - Stores patterns in procedural memory (cass)
-
Cleanup:
- Closes bead
- Releases file reservations
- Syncs beads to git
- Announces completion via agent_mail
-
Loop or finish:
- If more beads: Returns to step 2
- If last bead: Creates comprehensive PR with review evidence
Multi-agent parallelization:
- Run
/istari-workin multiple Claude Code windows simultaneously - Agents coordinate via agent_mail to avoid file conflicts
- Each agent works on different beads in parallel
- Shared learning files provide context continuity
Side effects:
- Commits code to feature branch
- Creates/updates
.claude/learnings/files (committed to git) - Sends messages via agent_mail (local server only)
- May create PR when all beads complete
- Updates procedural memory (persists across sessions)
Error handling:
- Tests fail after 2 attempts: Consults Copilot oracle
- File reservation conflict: Coordinates via agent_mail or switches beads
- Review critical issues: Max 2 fix attempts, then asks user for override
- Out-of-scope review issues: Offers to create separate cleanup bead
When to run:
- After
/istari-plancreates beads - Can run multiple instances for parallel execution
- Continues autonomously until all beads complete or user intervention needed
What it does: Updates istari commands and skills in a target .claude directory.
Input:
/istari-update
/istari-update ~/my-project/.claude
Workflow:
- Verifies running from istari repository
- Prompts for target .claude directory (or uses provided path)
- Validates target is a .claude directory
- Copies all 8 command files to target/commands/
- Copies skills to target/skills/istari/
- Verifies installation
Use cases:
- After pulling updates to istari repository
- Setting up istari in a new project
- Resetting commands to repo versions
When to run: After updating the istari repository to get latest command versions.
What it does: Detects installed tool versions and offers semantic version upgrades.
Workflow:
- Scans for installed tools (cargo, npm, brew, Claude plugins)
- Queries registries for latest versions
- Parses and compares semantic versions
- Categorizes updates as patch/minor/major
- Interactive prompts per category (patch → minor → major)
- Applies selected upgrades
Features:
- Semantic version intelligence (understands 1.2.3 → 1.2.4 is patch)
- Risk-based categorization (patch = low risk, major = breaking)
- Optional lock file snapshot before upgrades
- Supports: cargo crates, npm packages, brew formulas, Claude plugins
When to run: Monthly maintenance or when tools feel outdated.
What it does: Orchestrates 5 code review tools on a GitHub PR.
Input:
/istari-review https://github.com/org/repo/pull/123
Review tools:
- Claude's built-in
/review - Claude's built-in
/security-review - Superpowers code review
- Compound Engineering review agents
- Uncle Bob Clean Code review (Java files only)
Workflow:
- Parses PR URL and fetches metadata via gh CLI
- Identifies Java files for Uncle Bob review
- Runs all reviews sequentially
- Displays results on screen with clear section headers
- No files written (all output to console)
When to run: Before merging a PR to catch issues across multiple dimensions.
What it does: Analyzes work patterns and generates personalized Claude skills.
Data sources:
.claude/learnings/- Execution reality (what actually happened)docs/plans/- Design intent (what was planned)cass_memory_system- Historical knowledge (what we know works)
Workflow:
- Collects data from all sources (last 30-90 days)
- AI analyzes patterns and detects repeated workflows (3+ occurrences)
- Scores patterns by frequency, complexity, automation potential
- Early rejection: User decides which candidates to generate
- AI generates complete skill markdown files with YAML frontmatter
- Iterative editing: User requests changes, AI applies, repeat
- Late rejection: User approves or rejects final version
- Installs approved skills to
~/.claude/skills/(local only)
Features:
- Two-stage rejection (before and after generation)
- Natural language edit requests
- Installs locally (not in istari repo)
- Skills ready to use immediately
When to run: Monthly or when you notice repeated manual workflows.
What it does: Displays comprehensive help for all istari commands.
Output:
- Command descriptions
- Usage examples
- Typical workflow guide
- Getting started sequence
When to run: Anytime you need a quick reference.
# Morning: Check what needs planning
cd ~/projects/myapp
git checkout -b AUTH-456_two-factor-auth
# Plan the feature
/istari-plan AUTH-456
# [Claude interactively plans, creates 8 beads with dependencies]
# Start autonomous execution (can run in multiple windows)
# Window 1:
/istari-work
# Window 2 (parallel agent):
/istari-work
# [Both agents coordinate via agent_mail, work on different beads]
# [Agent 1: Implements backend TOTP generation]
# [Agent 2: Implements frontend UI (waits for backend)]
# [Both run TDD, quality gates, document learnings]
# End of day: Review PR created by agents
gh pr view
# Next day: Agents read yesterday's learnings automatically
/istari-workIstari captures institutional knowledge automatically:
-
Daily learning files (
.claude/learnings/YYYY-MM-DD.md) - Readable markdown logs of:- What worked well
- Challenges encountered and solutions
- Code patterns discovered
- Retrospective notes
-
Procedural memory (cass) - Queryable database of:
- Coding standards
- Testing patterns
- Common pitfalls
- Project conventions
Both systems are automatically consulted at the start of each /istari-plan and /istari-work session, ensuring agents learn from past work.
Commands not showing in / menu:
- Verify
.claude/commandsis in parent directory of your projects - Restart Claude Code
- Check file permissions on command files
Context7 API errors:
- Verify API key is valid at https://context7.com/dashboard
- Check MCP configuration:
cat ~/.claude.json | grep context7 - Re-run
/istari-setupto reconfigure
Agent mail connection failures:
- Check if server is running:
curl http://localhost:8765/ - Restart server:
am server restart - Check logs:
am server logs
Tools not found after setup:
- Check PATH includes cargo/bin:
echo $PATH | grep cargo - Source shell config:
source ~/.zshrc(or ~/.bashrc) - Re-run setup:
/istari-setup
Reviews being skipped:
- Section 6 of
/istari-workis MANDATORY - Agents must run ALL 4 reviews before commit
- Check success criteria checklist at end of work session
Destructive Command Guard blocking legitimate commands:
- Review the command that was blocked in the error message
- If it's a false positive, you can customize protection packs in
~/.config/dcg/config.toml - See https://github.com/Dicklesworthstone/destructive_command_guard for configuration details
- Disable specific packs or use environment variables for one-time overrides
Istari commands are designed to be forked and customized for your team's workflow. Common customizations:
- Change default Copilot model in setup
- Add team-specific quality gates
- Customize bead complexity estimation
- Add additional MCP servers for team tools