code-conductor
CLAUDE.md112 starsChanged 16 months agoMITView on GitHub
Code Conductor is an AI agent coordination system designed to orchestrate multiple AI coding agents (like Claude Code, Conductor, Warp) working on the same codebase. It provides GitHub-native task management with automatic conflict prevention through git worktrees. IMPORTANT: This is a template repository. When you encounter Code Conductor files in a project, they have been imported to enable automated agent coordination. Work autonomously based on GitHub Issues with the conductor:task label and the guidance in these files. CRITICAL: When starting…
- Reads credentials
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
37 rules. About 0 are common, 24 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈24
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 13
CRITICAL: When starting work on any task, check if .conductor/documentation-map.yaml exists.
- Very specific: line 20
If this file exists, load it to understand the project context before beginning work.
- Very specific: line 125
When modifying code-conductor itself:
- Distinctive: line 132
Run validation after changes:
- Distinctive: line 152
IMPORTANT: Always run from the project root directory where Code Conductor is configured!
- Distinctive: line 156
Start every Code Conductor session with:
- Distinctive: line 211
When working in a project with Code Conductor:
- Very specific: line 213
Start work: Use ./conductor start [role] from the project root
- Very specific: line 214
Track progress: Use ./conductor progress to post updates to GitHub
- Very specific: line 215
Check status: Use ./conductor status to see your current task
- Very specific: line 216
Complete work: Use ./conductor complete to finish and create PR
- Very specific: line 217
Fix issues: Use ./conductor recover if you encounter problems
- Distinctive: line 219
Validate changes: Always run the project's test/lint commands before committing
- Very specific: line 224
Auto-generate tasks: When running init tasks, use python .conductor/scripts/generate-tasks-from-map.py --auto (if available)
- Distinctive: line 231
CRITICAL: Before creating any new GitHub issue, you MUST check for duplicates:
- Distinctive: line 247
Check issue body content for overlapping requirements
- Distinctive: line 248
Look for issues that might encompass your proposed task
- Distinctive: line 251
No existing issue covers the same functionality
- Distinctive: line 252
Not a subset of an existing larger task
- Distinctive: line 256
Add a comment to the existing issue with additional details
- Distinctive: line 257
Consider if the existing issue should be expanded
- Distinctive: line 258
Do NOT create a duplicate
- Distinctive: line 275
Before adding todos: Check if similar tasks already exist in your list
- Distinctive: line 276
Consolidate related items: Instead of multiple similar todos, create one comprehensive task
- Distinctive: line 278
Remove obsolete items: If an external issue is closed or no longer relevant, remove related todos
- Distinctive: line 305
Only create a Personal Access Token if you need:
- Very specific: line 315
Create role definition: .conductor/roles/[role-name].md
- Very specific: line 316
Update setup.py to include in role options
- Very specific: line 317
Add example tasks in .conductor/examples/
- Very specific: line 322
Update validation in validate-config.py
- Distinctive: line 326
Add patterns for new frameworks/languages
- Distinctive: line 327
Update role recommendations based on stack
- Distinctive: line 342
Always use GitHub CLI commands for state changes to ensure consistency
- Distinctive: line 344
Test with multiple Python versions (3.9-3.12)
- Distinctive: line 345
Ensure GitHub Actions workflows remain functional
- Distinctive: line 346
Keep agent bootstrap process simple and universal
- Distinctive: line 350
When working autonomously, validate your actions:
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Code Conductor is an AI agent coordination system designed to orchestrate multiple AI coding agents (like Claude Code, Conductor, Warp) working on the same codebase. It provides GitHub-native task management with automatic conflict prevention through git worktrees.
IMPORTANT: This is a template repository. When you encounter Code Conductor files in a project, they have been imported to enable automated agent coordination. Work autonomously based on GitHub Issues with the conductor:task label and the guidance in these files.
Documentation Map
CRITICAL: When starting work on any task, check if .conductor/documentation-map.yaml exists. This file contains:
- Comprehensive project analysis and structure
- Technology stack details and dependencies
- List of completed vs. pending features
- Implementation status and critical paths
- Architectural decisions and constraints
If this file exists, load it to understand the project context before beginning work. This map is created by the [INIT] discovery task and provides essential context for all subsequent tasks.
Key Development Commands
Running Tests
# Run all tests
python -m pytest tests/ -v
# Run specific test file
python tests/test_basic.py
python tests/test_stack_detection.pyLinting and Formatting
# Check code formatting (without making changes)
black --check .conductor/scripts/ setup.py
# Apply formatting
black .conductor/scripts/ setup.py
# Run linting
flake8 .conductor/scripts/ setup.py --max-line-length=88 --extend-ignore=E203,W503Validation Commands
# Validate conductor configuration
python .conductor/scripts/validate-config.py
# Check system dependencies
python .conductor/scripts/dependency-check.py
# Run health check
python .conductor/scripts/health-check.pyArchitecture Overview
Core Components
- Setup System (
setup.py)- Interactive/auto configuration wizard
- Detects technology stack automatically
- Configures agent roles based on project type
- Creates GitHub workflows for automation
- Task Management (GitHub Issues)
- GitHub Issues with
conductor:tasklabel serve as tasks - Issues have unique numbers, descriptions, success criteria
- GitHub's atomic operations prevent race conditions
- Native integration with GitHub Projects and Actions
- GitHub Issues with
- Agent Roles (
.conductor/roles/)dev.md- Default generalist role for most tasks- Specialized roles:
devops,security,frontend,mobile,ml-engineer,data code-reviewer- AI-powered PR reviews (always included)- Hybrid model: prefer
devrole unless task requires specialization
- Agent Coordination (
.conductor/scripts/)conductor- Universal agent command (primary interface)task-claim.py- Task assignment via GitHub Issue assignmenthealth-check.py- Monitor agent heartbeatscleanup-stale.py- Remove abandoned work- Git worktrees provide isolation between agents
- GitHub Integration
- Issues become tasks via
conductor:tasklabel - Actions run health checks every 15 minutes
- AI code reviews on all PRs
- Status dashboard via
conductor:statusissue
- Issues become tasks via
Key Design Patterns
- Atomic Operations: GitHub's issue assignment API ensures atomic task claiming
- Worktree Isolation: Each agent works in separate git worktree (
worktrees/agent-{role}-{task_id}) - Heartbeat System: Agents update timestamps; stale work auto-cleaned after timeout
- File Conflict Prevention: Worktree isolation ensures agents work on separate branches
- Self-Healing: GitHub Actions monitor health, clean stale work, process issues
Configuration Structure
# .conductor/config.yaml
project_name: string
documentation:
main: string (path to main docs)
additional: [array of paths]
technology_stack:
languages: [detected languages]
frameworks: [detected frameworks]
tools: [detected build tools]
roles:
default: "dev"
specialized: [list of specialized roles]
github_integration:
enabled: boolean
issue_to_task: boolean
pr_reviews: boolean
worktree_retention_days: number (default 7)Development Workflow
When modifying code-conductor itself:
- Make changes in appropriate files:
- Core scripts:
.conductor/scripts/ - Role definitions:
.conductor/roles/ - Setup logic:
setup.py
- Core scripts:
- Run validation after changes:
python .conductor/scripts/validate-config.py black .conductor/scripts/ setup.py flake8 .conductor/scripts/ setup.py --max-line-length=88 python -m pytest tests/ -v - Test setup flow:
# Create test environment mkdir /tmp/test-conductor && cd /tmp/test-conductor git init # Copy conductor files and run setup python setup.py --auto
<!-- CONDUCTOR:START -->🤖 AI Agent Quick Start
IMPORTANT: Always run from the project root directory where Code Conductor is configured!
🚀 The Universal Kickoff Prompt
Start every Code Conductor session with:
Ultrathink: What task will create the most value? Find it, claim it, complete it.This prompt triggers deep analysis, focuses on value, and guides you through the complete workflow.
Essential Commands
# Start work as your role (from project root)
./conductor start [role]
# Check your current task status
./conductor status
# Update progress on current task
./conductor progress # or: ./conductor p
# Complete task and create PR
./conductor complete
# List available tasks
./conductor tasks
# Diagnose and fix issues
./conductor recover # or: ./conductor debug, ./conductor fixAvailable Roles
dev- General development (default)frontend(aliases: fe, front) - UI/React/Vue workbackend(aliases: be, back) - API/server workdevops(aliases: ops) - Infrastructure/CIsecurity(alias: sec) - Security tasksmobile- iOS/Android developmentml(aliases: ai, ml-engineer) - Machine learningdata- Data engineering/analytics
Example Session
cd /path/to/project # MUST be in project root
./conductor start frontend
# ... work on task ...
./conductor progress # Post update to GitHub
# ... continue work ...
./conductor complete<!-- CONDUCTOR:END -->Autonomous Operation Guidelines
IMPORTANT: Code Conductor is designed for FULLY AUTONOMOUS OPERATION. AI agents should complete entire workflows without waiting for human approval.
When working in a project with Code Conductor:
- Start work: Use
./conductor start [role]from the project root - Track progress: Use
./conductor progressto post updates to GitHub - Check status: Use
./conductor statusto see your current task - Complete work: Use
./conductor completeto finish and create PR - Fix issues: Use
./conductor recoverif you encounter problems - Work in isolation: The conductor command creates your worktree automatically
- Validate changes: Always run the project's test/lint commands before committing
Full Autonomy Principles
- No human gates: Tasks should be completable end-to-end without human intervention
- Auto-generate tasks: When running init tasks, use
python .conductor/scripts/generate-tasks-from-map.py --auto(if available) - Self-validation: Agents validate their own work before marking tasks complete
- Continuous flow: Complete tasks, create PRs, and move to the next task without pausing
- Trust the process: The system has guardrails; agents should proceed confidently
Creating New Tasks - IMPORTANT Duplicate Prevention
CRITICAL: Before creating any new GitHub issue, you MUST check for duplicates:
- Search existing issues thoroughly:
# Check all open conductor tasks gh issue list --label "conductor:task" --state open --limit 100 # Search by keywords gh issue list --search "your keywords here" --state all # Check closed issues too gh issue list --label "conductor:task" --state closed --limit 50 - Analyze similarity:
- Compare titles for semantic similarity
- Check issue body content for overlapping requirements
- Look for issues that might encompass your proposed task
- Only create if truly unique:
- No existing issue covers the same functionality
- Not a subset of an existing larger task
- Adds distinct value to the project
- If similar issue exists:
- Add a comment to the existing issue with additional details
- Consider if the existing issue should be expanded
- Do NOT create a duplicate
Example duplicate check:
# Before creating "Add user authentication"
gh issue list --search "auth OR authentication OR login" --state all
# Before creating "Improve error handling"
gh issue list --search "error OR exception OR handling" --state all
# Review the results carefully before proceedingManaging Your Todo List - Prevent Internal Duplicates
IMPORTANT: Also maintain a clean internal todo list:
- Before adding todos: Check if similar tasks already exist in your list
- Consolidate related items: Instead of multiple similar todos, create one comprehensive task
- Clean up completed work: Mark todos as completed immediately after finishing
- Remove obsolete items: If an external issue is closed or no longer relevant, remove related todos
Example todo management:
BAD:
- Add login functionality
- Implement user authentication
- Create auth system
- Add password reset
GOOD:
- Implement complete authentication system (login, logout, password reset)This prevents both external (GitHub issues) and internal (todo list) duplication.
GitHub Authentication
Code Conductor uses GitHub's built-in authentication for all operations. No manual token setup is required for most users!
Default Setup (Recommended)
The workflows generated by Code Conductor automatically use GitHub Actions' built-in ${{ github.token }}, which provides:
- ✅ Read/write access to issues, pull requests, and code
- ✅ Ability to create and manage labels
- ✅ No setup required - works out of the box!
Advanced Setup (Optional)
Only create a Personal Access Token if you need:
- Higher API rate limits (5,000/hour instead of 1,000/hour)
- Cross-repository access
- Ability to trigger other workflows
For detailed setup instructions and troubleshooting, see .conductor/GITHUB_TOKEN_SETUP.md.
Common Tasks
Adding a New Role
- Create role definition:
.conductor/roles/[role-name].md - Update setup.py to include in role options
- Add example tasks in
.conductor/examples/
Modifying Task Processing
- Core logic in
task-claim.pyfor assignment - State management via GitHub Issues and labels
- Update validation in
validate-config.py
Extending Stack Detection
- Detection logic in
setup.py(detect_technology_stack function) - Add patterns for new frameworks/languages
- Update role recommendations based on stack
Uninstalling Code Conductor
To remove Code Conductor from a project:
python uninstall.py # Interactive removal
python uninstall.py --force # Remove without confirmation
python uninstall.py --dry-run # Preview what will be removedThe uninstaller safely removes all conductor components while preserving user files.
See uninstall.py for implementation details.
Important Notes
- Always use GitHub CLI commands for state changes to ensure consistency
- Maintain backward compatibility with existing conductor setups
- Test with multiple Python versions (3.9-3.12)
- Ensure GitHub Actions workflows remain functional
- Keep agent bootstrap process simple and universal
Self-Validation Protocols
When working autonomously, validate your actions:
Pre-Work Validation
# Before starting any task
validations = {
"environment": check_dependencies(),
"github_auth": verify_github_cli_auth(),
"available_tasks": check_unassigned_issues(),
"git": verify_clean_worktree()
}
if all(validations.values()):
proceed_with_task()
else:
handle_validation_failure(validations)Post-Work Validation
# After completing changes
post_checks = {
"tests": run_project_tests(),
"lint": run_linting_commands(),
"build": verify_build_success(),
"pr_created": verify_pull_request_created()
}Fallback Decision Tree
Validation Failed?
├─ Missing dependency → Install or use alternative
├─ GitHub auth failed → Run 'gh auth login' or check credentials
├─ No available tasks → Create new issue or wait for assignments
├─ Test failure → Fix or document known issue
└─ Build failure → Rollback and try simpler approachDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

