Bootstrap AI Developer Workflows (ADWs) infrastructure in any codebase. Use when user wants to: "set up ADWs", "bootstrap agentic workflows", "add AI developer workflows", "enable programmatic agent execution", "initialize ADW infrastructure", or "set up programmatic Claude Code". This enables programmatic agent orchestration via subprocess/SDK, reusable workflow templates, multi-phase workflows, and structured observability for agent executions.
Bootstraps AI Developer Workflows infrastructure for programmatic agent orchestration. Use when user requests "set up ADWs" or "bootstrap agentic workflows" to enable subprocess/SDK execution, reusable templates, and structured observability.
/plugin marketplace add JoshuaOliphant/claude-plugins/plugin install adw-bootstrap@oliphant-pluginsThis skill is limited to using the following tools:
README.mddocs/architecture.mddocs/examples.mddocs/principles.mddocs/upgrades.mddocs/usage-modes.mdreference/enhanced/adws/adw_chore_implement.pyreference/enhanced/adws/adw_modules/agent_sdk.pyreference/enhanced/adws/adw_sdk_prompt.pyreference/enhanced/adws/adw_slash_command.pyreference/enhanced/commands/feature.mdreference/enhanced/commands/prime.mdreference/enhanced/commands/start.mdreference/minimal/adws/adw_modules/agent.pyreference/minimal/adws/adw_prompt.pyreference/minimal/commands/chore.mdreference/minimal/commands/implement.mdreference/scaled/adw_modules/beads_integration.pyreference/scaled/adw_modules/git_ops.pyreference/scaled/adw_modules/github.pyBootstrap AI Developer Workflows (ADWs) infrastructure that enables programmatic agent orchestration in any codebase. Transform a regular project into one where AI agents can be invoked programmatically to plan, implement, test, and deploy features.
After setup, developers can:
./adws/adw_prompt.py "implement feature X"./adws/adw_slash_command.py /chore "task"agents/{id}/ for debuggingYou are NOT executing a rigid template substitution.
You will:
Use your reasoning. Handle novel structures, mixed languages, and edge cases that no template could anticipate.
ADWs create a two-layer architecture:
adws/, .claude/, specs/) - Templates engineering patterns, teaches agents how to operateapps/, src/, etc.) - The actual application code that agents operate onThe agentic layer wraps the application layer, providing a programmatic interface for AI-driven development.
Setup happens in phases based on project needs:
BEFORE starting fresh setup, ALWAYS check if ADWs already exist in this project.
Check for existence of:
# Primary indicator
adws/adw_modules/agent.py
# If exists, this is an ADW project - proceed to classification
If adws/ directory exists, DO NOT run fresh setup. Instead, classify and offer upgrade.
Use file presence to determine current phase:
Minimal Phase Indicators:
adws/adw_modules/agent.py (core module)adws/adw_prompt.py (basic CLI).claude/commands/chore.md (basic templates).claude/commands/implement.mdadws/adw_modules/agent_sdk.pyadws/adw_modules/state.pyEnhanced Phase Indicators:
adws/adw_modules/agent_sdk.py (SDK support)adws/adw_sdk_prompt.py (SDK CLI)adws/adw_slash_command.py (command executor)adws/adw_chore_implement.py (compound workflows)adws/adw_plan_tdd.py (TDD planning for large tasks).claude/commands/feature.md (richer templates).claude/commands/plan-tdd.md (TDD task breakdown).claude/commands/prime.mdadws/adw_modules/state.pyadws/adw_modules/worktree_ops.pyScaled Phase Indicators:
adws/adw_modules/state.py (state management)adws/adw_modules/git_ops.py (git operations)adws/adw_modules/worktree_ops.py (worktree isolation)adws/adw_modules/workflow_ops.py (workflow composition)adws/adw_modules/github.py (GitHub integration)adws/adw_sdlc_iso.py (multi-phase workflows).claude/commands/classify_issue.md (advanced templates).claude/commands/install_worktree.mdWhen existing ADW setup is detected:
🔍 Existing ADW setup detected!
Current Phase: <Minimal|Enhanced|Scaled>
Found infrastructure:
- Core modules: agent.py <and others...>
- CLI scripts: adw_prompt.py <and others...>
- Slash commands: <count> commands
- Workflows: <count> workflows
Available upgrades:
- <Next phase name>: <Brief description of what it adds>
Would you like to:
1. Upgrade to <next phase>
2. Keep current setup (no changes)
3. Add specific features
When user confirms upgrade:
Create timestamped backup:
mkdir -p .adw_backups
cp -r adws .adw_backups/adws_$(date +%Y%m%d_%H%M%S)
cp -r .claude .adw_backups/.claude_$(date +%Y%m%d_%H%M%S)
Inform user: "✅ Created backup in .adw_backups/"
Based on target phase, read appropriate references:
For Minimal → Enhanced upgrade:
For Enhanced → Scaled upgrade:
Before adding files, check if target paths exist:
# Pseudocode for detection logic
for file_to_add in new_files:
if file_exists(file_to_add):
# Compare with reference
if file_is_customized(file_to_add):
# Skip or ask user
print(f"⚠️ {file_to_add} appears customized - preserving")
else:
# Can safely update
print(f"📝 Updating {file_to_add}")
Never overwrite:
custom_ directory<file>.new insteadFor Enhanced upgrade, add:
adws/adw_modules/agent_sdk.py (if not exists)adws/adw_sdk_prompt.py (if not exists)adws/adw_slash_command.py (if not exists)adws/adw_chore_implement.py (if not exists)adws/adw_plan_tdd.py (if not exists).claude/commands/feature.md (if not exists).claude/commands/plan-tdd.md (if not exists).claude/commands/prime.md (if not exists)specs/plans/ directory (if not exists)For Scaled upgrade, add:
adws/adw_modules/state.py (if not exists)adws/adw_modules/git_ops.py (if not exists)adws/adw_modules/worktree_ops.py (if not exists)adws/adw_modules/workflow_ops.py (if not exists)adws/adw_modules/github.py (if not exists)adws/adw_modules/beads_integration.py (if not exists) - Beads issue tracker integrationadws/adw_modules/data_types.py (if not exists or needs extension)adws/adw_modules/utils.py (if not exists)adws/adw_plan_iso.py (if not exists) - Individual planning phaseadws/adw_build_iso.py (if not exists) - Individual build/implementation phaseadws/adw_test_iso.py (if not exists) - Individual testing phaseadws/adw_review_iso.py (if not exists) - Individual review phaseadws/adw_document_iso.py (if not exists) - Individual documentation phaseadws/adw_sdlc_iso.py (if not exists) - Composite SDLC workflowadws/adw_plan_build_test_review_iso.py (if not exists) - Composite workflow without documentationadws/adw_ship_iso.py (if not exists) - Shipping/merge workflowadws/adw_beads_ready.py (if not exists) - Interactive beads task picker.claude/commands/classify_issue.md (if not exists).claude/commands/classify_adw.md (if not exists).claude/commands/generate_branch_name.md (if not exists).claude/commands/patch.md (if not exists).claude/commands/install_worktree.md (if not exists).claude/commands/cleanup_worktrees.md (if not exists).claude/commands/test.md (if not exists).claude/commands/review.md (if not exists).claude/commands/document.md (if not exists).claude/commands/pull_request.md (if not exists).claude/commands/bug.md (if not exists)trees/ directory (create if not exists, add to .gitignore)For Enhanced upgrade:
For Scaled upgrade:
Add new sections to CLAUDE.md (if it exists):
Create/update README sections showing new usage patterns.
Run validation checks:
# Check all scripts are executable
# Verify imports resolve
# Test a simple prompt
./adws/adw_prompt.py "test upgrade" --model haiku
If validation passes: ✅ If validation fails: Show error and offer to rollback
🎉 Upgrade to <phase> completed successfully!
Added:
- <count> new modules
- <count> new workflows
- <count> new slash commands
Your customizations were preserved:
- <list any files that were skipped>
Backup location: .adw_backups/<timestamp>
Try the new capabilities:
- <example 1>
- <example 2>
- <example 3>
To rollback: cp -r .adw_backups/<timestamp>/* ./
Minimal → Scaled (skip Enhanced): If user wants to jump directly to Scaled, add both Enhanced and Scaled capabilities in one upgrade.
Customized setups:
If setup has significant customizations, offer to create new files with .new extension and let user merge manually.
Failed upgrades: If any step fails, automatically rollback to backup and report error.
ADWs work with any issue tracking system - not just GitHub. The Scaled phase includes abstractions for multiple issue trackers.
Built-in Support:
Extensible Pattern:
The key insight: All issue trackers provide similar information:
Create adapters that convert from tracker-specific format to a common Issue interface.
1. Define Common Issue Interface (in data_types.py):
from typing import Optional, List
from pydantic import BaseModel
class Issue(BaseModel):
"""Universal issue representation across all trackers."""
id: str # Can be number or string depending on tracker
title: str
description: Optional[str] = None
status: str # "open", "in_progress", "closed"
labels: List[str] = []
assignees: List[str] = []
url: Optional[str] = None
# Tracker-specific metadata (optional)
tracker_type: str # "github", "beads", "gitlab", etc.
raw_data: Optional[dict] = None # Original response
2. Create Tracker-Specific Integration Modules:
Each tracker gets its own module (e.g., github_integration.py, beads_integration.py):
# adws/adw_modules/beads_integration.py structure
def is_beads_issue(issue_id: str) -> bool:
"""Check if issue ID is from beads tracker."""
return "-" in issue_id and not issue_id.isdigit()
def fetch_beads_issue(issue_id: str) -> tuple[Optional[Issue], Optional[str]]:
"""Fetch beads issue and convert to universal Issue format."""
# Run beads command
# Parse output
# Return Issue object or error
def get_ready_beads_tasks() -> tuple[List[str], Optional[str]]:
"""Get list of ready task IDs."""
def update_beads_status(issue_id: str, status: str) -> tuple[bool, Optional[str]]:
"""Update issue status."""
def close_beads_issue(issue_id: str, reason: str) -> tuple[bool, Optional[str]]:
"""Close issue with reason."""
3. Create Unified Fetch Function (in workflow_ops.py):
def fetch_issue_unified(issue_id: str, logger) -> tuple[Optional[Issue], Optional[str]]:
"""Fetch issue from any tracker, returns universal Issue object."""
# Detect tracker type
if is_beads_issue(issue_id):
return fetch_beads_issue(issue_id)
elif issue_id.isdigit() or "/" in issue_id:
return fetch_github_issue(issue_id)
# Add more trackers...
else:
return None, f"Unknown issue format: {issue_id}"
4. Usage in Workflows:
# Workflows use the unified interface
issue, error = fetch_issue_unified(issue_number, logger)
if error:
logger.error(f"Failed to fetch issue: {error}")
sys.exit(1)
# Work with universal Issue object
logger.info(f"Processing: {issue.title}")
logger.info(f"Status: {issue.status}")
To add support for a new issue tracker (GitLab, Jira, etc.):
Step 1: Create integration module adws/adw_modules/{tracker}_integration.py
# Example: gitlab_integration.py
import subprocess
from typing import Optional, List
from .data_types import Issue
def is_gitlab_issue(issue_id: str) -> bool:
"""Detect GitLab issue format (e.g., 'project#123')."""
return "#" in issue_id
def fetch_gitlab_issue(issue_id: str) -> tuple[Optional[Issue], Optional[str]]:
"""Fetch from GitLab API or CLI."""
try:
# Parse project and issue number
project, number = issue_id.split("#")
# Call GitLab CLI or API
result = subprocess.run(
["glab", "issue", "view", number, "-R", project],
capture_output=True, text=True
)
if result.returncode != 0:
return None, f"GitLab CLI error: {result.stderr}"
# Parse output and create Issue object
issue = Issue(
id=issue_id,
title=parse_title(result.stdout),
description=parse_description(result.stdout),
status=parse_status(result.stdout),
labels=parse_labels(result.stdout),
tracker_type="gitlab",
url=f"https://gitlab.com/{project}/-/issues/{number}"
)
return issue, None
except Exception as e:
return None, str(e)
def get_ready_gitlab_issues(project: str) -> tuple[List[str], Optional[str]]:
"""Get ready issues from GitLab."""
# Implementation...
def update_gitlab_status(issue_id: str, status: str) -> tuple[bool, Optional[str]]:
"""Update GitLab issue status."""
# Implementation...
Step 2: Update detection in workflow_ops.py:
from .gitlab_integration import is_gitlab_issue, fetch_gitlab_issue
def fetch_issue_unified(issue_id: str, logger) -> tuple[Optional[Issue], Optional[str]]:
"""Fetch issue from any tracker."""
if is_beads_issue(issue_id):
return fetch_beads_issue(issue_id)
elif is_gitlab_issue(issue_id): # Add detection
return fetch_gitlab_issue(issue_id)
elif issue_id.isdigit() or "/" in issue_id:
return fetch_github_issue(issue_id)
else:
return None, f"Unknown issue format: {issue_id}"
Step 3: Add interactive selector (optional):
# adws/adw_gitlab_ready.py
# Similar to adw_beads_ready.py but for GitLab
Step 4: Update documentation in CLAUDE.md with new tracker usage.
Each integration module should handle errors gracefully:
# Test cases to verify:
# 1. Issue not found
# 2. Tracker CLI not installed
# 3. Network errors (for API-based)
# 4. Invalid issue format
# 5. Missing fields in response
# 6. Empty or malformed output
# Example error handling:
def fetch_tracker_issue(issue_id: str) -> tuple[Optional[Issue], Optional[str]]:
# Check CLI installed
if not shutil.which("tracker-cli"):
return None, "Tracker CLI not installed. Install with: <command>"
try:
result = subprocess.run(...)
if result.returncode != 0:
return None, f"Tracker error: {result.stderr}"
# Validate required fields present
if not title:
return None, "Could not parse issue title from tracker output"
return issue, None
except Exception as e:
return None, f"Unexpected error: {e}"
Store user's tracker preference during setup:
# In state.py or config
ISSUE_TRACKER_CONFIG = {
"type": "beads", # or "github", "gitlab", etc.
"default_project": None, # For GitLab, Jira, etc.
"cli_path": None, # Optional custom CLI path
}
# Load from .adw_config.json or similar
def get_tracker_config() -> dict:
"""Load issue tracker configuration."""
config_path = Path(".adw_config.json")
if config_path.exists():
return json.loads(config_path.read_text())
return {"type": "github"} # default
This pattern ensures:
ALWAYS ASK during Scaled setup:
How do you track issues for this project?
1. GitHub Issues (most common)
2. Beads (local/offline SQLite tracking)
3. GitLab Issues
4. Jira
5. Linear
6. Other (specify)
Enter choice [1-6]:
Based on response, set up appropriate integration module.
Before analyzing the project, understand how they track work.
Ask the user:
🎯 Issue Tracking Setup
ADW workflows can integrate with your issue tracking system.
How does your team track issues?
1. GitHub Issues (default for GitHub repos)
2. Beads (local SQLite - great for offline/personal projects)
3. GitLab Issues
4. Jira
5. Linear
6. Notion
7. Other (manual - you'll provide issue details)
8. None (pure prompt-driven, no issue integration)
Choice [1-8]:
Store the choice for later setup phases.
Before creating anything, deeply understand the target project.
Use Glob to explore:
# Find configuration files
**/{package.json,pyproject.toml,go.mod,Cargo.toml,pom.xml}
# Find source code locations
**/src/**
**/app/**
**/lib/**
# Find existing tooling
**/{Dockerfile,docker-compose.yml,.github,Makefile}
Primary language(s):
Application layer location:
src/, app/, apps/, lib/, pkg/, root?Package manager in use:
Framework/runtime:
Existing development patterns:
Project maturity:
Based on analysis, recommend:
Minimal if:
Enhanced if:
Scaled if:
Ask the user which phase to install if unclear.
Before creating anything, read and understand the reference code.
Read @reference/minimal/adws/adw_modules/agent.py
This is the core pattern. Understand:
Key abstractions:
AgentPromptRequest - Configuration for prompt executionAgentPromptResponse - Results with success/failure/retry infoprompt_claude_code() - Core execution functionprompt_claude_code_with_retry() - Execution with automatic retryRetryCode enum - Different error types for retry decisionsRead @reference/minimal/adws/adw_prompt.py
This shows how to wrap agent.py for CLI use. Understand:
# /// script)agents/{adw_id}/{agent_name}/)Read @reference/minimal/commands/chore.md
This shows how to structure slash command templates. Understand:
Read @reference/minimal/commands/implement.md
Simple implementation template showing minimal structure.
Read @reference/minimal/env.sample
Shows configuration for both usage modes:
Read @reference/enhanced/adws/adw_modules/agent_sdk.py
This shows the SDK-based approach. Understand:
Read @reference/enhanced/adws/adw_slash_command.py
Shows how to execute slash commands programmatically.
Read @reference/enhanced/adws/adw_chore_implement.py
Shows compound workflow orchestration:
Read @reference/enhanced/adws/adw_plan_tdd.py
Shows TDD planning workflow for breaking large tasks into agent-sized chunks:
specs/plans/plan-{id}.mdKey Insight: Complexity measures context switching cost and iteration depth:
Read @reference/enhanced/commands/plan-tdd.md
Template for breaking down large specifications with:
Read @reference/enhanced/commands/feature.md
More comprehensive planning template with:
Read @reference/enhanced/commands/prime.md
Context loading pattern for priming Claude with project knowledge.
Now create the ADW infrastructure, adapted to the target project.
mkdir -p adws/adw_modules
mkdir -p .claude/commands
mkdir -p specs
mkdir -p agents # For output observability
If the project already has any of these, note and work with existing structure.
Do NOT just copy the reference. Adapt it:
Understand the core patterns from the reference, then create a version that:
Key adaptations:
project_root calculationget_safe_subprocess_env()Essential components to preserve:
AgentPromptRequest and AgentPromptResponse data modelsprompt_claude_code() core functionprompt_claude_code_with_retry() with retry logicAdapt the reference to this project:
Dependencies:
poetry runPaths:
Style:
Make it executable:
chmod +x adws/adw_prompt.py
Adapt the reference template:
Codebase Structure section:
Plan Format:
Validation Commands:
Example adaptation:
# Before (generic):
- `uv run python -m py_compile apps/*.py`
# After (adapted to Next.js project):
- `npm run type-check` - Verify TypeScript types
- `npm run lint` - Run ESLint
- `npm run build` - Ensure build succeeds
Simple implementation template - minimal changes needed, maybe adapt the validation reporting to match their tooling.
Adapt to show both usage modes:
# Mode A: Claude Max Subscription (default - recommended for interactive use)
# No configuration needed if you have Claude Max subscription
# Claude Code will authenticate through your subscription
# Mode B: API-Based Programmatic Execution (for automation, CI/CD, webhooks)
# Required for headless/automated workflows
# ANTHROPIC_API_KEY=sk-ant-...
# Optional: Claude Code Path (auto-detected if not set)
# CLAUDE_CODE_PATH=claude
# Optional: Maintain working directory
# CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=true
Note: The agent module includes smart Claude CLI detection via find_claude_cli():
CLAUDE_CODE_PATH environment variablewhich claude commandIf CLAUDE.md exists, add ADW section. If not, create it with:
Essential Commands section:
## AI Developer Workflows (ADWs)
Execute Claude Code prompts programmatically:
```bash
# Direct prompt execution
./adws/adw_prompt.py "your prompt here"
./adws/adw_prompt.py "analyze this module" --model opus
# Run slash commands (after enhanced setup)
./adws/adw_slash_command.py /chore <id> "add feature X"
./adws/adw_slash_command.py /implement specs/chore-*.md
**Architecture section**:
Explain the two-layer model, observability in `agents/` directory, etc.
Use examples from THIS project structure.
### PHASE 4: Validate Minimal Setup
Before moving forward, validate everything works.
#### 4.1 Check Prerequisites
```bash
# Verify Claude Code installed
claude --version
# Check if it's available (should show help)
claude --help
If not installed, guide user to install:
# Try a simple prompt
./adws/adw_prompt.py "What is 2 + 2?"
Expected:
agents/{id}/oneoff/If subscription mode, should work with no API key. If API mode, requires ANTHROPIC_API_KEY.
Check that agents/{adw_id}/oneoff/ contains:
cc_raw_output.jsonl - Raw streaming outputcc_raw_output.json - Parsed JSON arraycc_final_object.json - Final result objectcustom_summary_output.json - High-level summaryShow:
Test the installation systematically:
# Test 1: Basic execution
./adws/adw_prompt.py "What is 2 + 2?" --model haiku --no-retry
# Test 2: Empty prompt validation
./adws/adw_prompt.py "" --no-retry
# Should show error and exit with code 1
# Test 3: Output structure
ls -la agents/*/oneoff/
# Should show 4 files: JSONL, JSON, final, summary
# Test 4: Module imports
python3 << 'PYEOF'
import sys
sys.path.insert(0, 'adws')
from adw_modules.agent import prompt_claude_code
print("✓ Agent module imports correctly")
PYEOF
Create test report:
specs/minimal-validation-results.mdSuccess Criteria:
Only proceed if user wants enhanced setup or you recommended it.
Adapt the SDK reference:
Dependencies:
claude-code-sdk Python packageAdaptation:
When to use SDK approach:
When to use subprocess approach:
Adapt for this project:
This orchestrates: planning (/chore) → implementation (/implement)
Adapt:
Create .claude/commands/feature.md:
Create .claude/commands/prime.md:
Create .claude/commands/start.md (if applicable):
Add to CLAUDE.md:
Enhanced Commands:
### Compound Workflows
# Plan and implement in one command
./adws/adw_chore_implement.py "add error handling to API"
# Feature development
./adws/adw_slash_command.py /feature <id> "user authentication"
# Prime Claude with context
./adws/adw_slash_command.py /prime
### TDD Planning for Large Tasks
# Break down large spec into agent-sized tasks
./adws/adw_plan_tdd.py "Add user authentication with JWT and OAuth2"
# From a spec file
./adws/adw_plan_tdd.py specs/feature-auth.md --spec-file
# Use Opus for complex architecture planning
./adws/adw_plan_tdd.py "Build real-time collaboration system" --model opus
# Output: specs/plans/plan-{id}.md with:
# - 25 tasks broken down (agent-optimized sizing)
# - Dependency graph and phases
# - TDD guidance for each task
# - Agent-centric complexity metrics
Architecture Deep Dive:
# Test slash command execution
./adws/adw_slash_command.py /prime
# Test compound workflow
./adws/adw_chore_implement.py "add a hello world endpoint"
Check outputs, verify everything works.
Automated test suite:
# Run all Enhanced regression tests
./adws/adw_prompt.py "test" --model haiku --no-retry # Base works
./adws/adw_slash_command.py /prime # Commands work
./adws/adw_chore_implement.py "hello world" --model haiku # Workflows work
./adws/adw_plan_tdd.py "test planning" --model haiku # TDD works
# Verify critical patterns
grep -A3 "if not plan_file.exists()" adws/adw_plan_tdd.py | grep "sys.exit(1)"
# Must show exit(1) NOT exit(0)
grep "Prompt cannot be empty" adws/adw_prompt.py
# Must have empty prompt validation
Create Enhanced validation report:
specs/enhanced-validation-results.mdIf failures occur:
Success rate target: 100% for Enhanced base functionality
Only for production/enterprise needs.
This adds:
Note: This is advanced. Most projects won't need it initially.
Guide through adding:
adws/adw_modules/state.py - Workflow state trackingadws/adw_modules/workflow_ops.py - Orchestration helpersadws/adw_triggers/ - Event-driven invocationadws/adw_tests/ - Testing suitetrees/ - Git worktree isolation.claude/hooks/ - Event handlers.claude/settings.json - Hook configurationIMPORTANT: Scaled phase has many components. Systematic validation is critical.
Generate comprehensive test cases covering:
Base (Regression):
Scaled Modules:
Scaled Workflows:
Issue Tracker Integration:
# Category 1: Regression Tests
./adws/adw_prompt.py "2+2" --model haiku --no-retry
./adws/adw_slash_command.py /prime
./adws/adw_plan_tdd.py "test" --model haiku
# Category 2: Module Imports
python3 << 'PYEOF'
import sys
sys.path.insert(0, 'adws')
from adw_modules import state, git_ops, worktree_ops, workflow_ops
from adw_modules import github, beads_integration
print("✓ All Scaled modules import")
PYEOF
# Category 3: Workflow Scripts Executable
for script in adw_plan_iso adw_build_iso adw_test_iso adw_review_iso adw_document_iso adw_sdlc_iso adw_ship_iso; do
./adws/${script}.py --help >/dev/null 2>&1 && echo "✓ ${script}.py" || echo "❌ ${script}.py FAILED"
done
# Category 4: Issue Tracker
which bd && echo "✓ Beads CLI found" || echo "⚠️ Beads CLI not found"
which gh && echo "✓ GitHub CLI found" || echo "⚠️ GitHub CLI not found"
# Category 5: Slash Commands Exist
ls .claude/commands/*.md | wc -l
# Should show 17+ command files
Create specs/scaled-validation-results.md with:
Test Summary:
Failures (if any): For each failure:
Success Criteria:
If test pass rate < 95%:
Step 1: Triage failures
Step 2: Fix critical issues first
Step 3: Create iteration report
Document in specs/scaled-iteration-N-results.md:
Step 4: Re-run full test suite
Step 5: Repeat until 95%+ pass rate
When to stop iterating:
Package manager detection:
# /// script headers with inline depspoetry add and poetry runStyle matching:
Validation commands:
Consider TypeScript version of ADWs:
Package manager:
Validation commands:
npm run test or their test commandnpm run type-check or equivalentnpm run lint or equivalentnpm run build to ensure buildsStructure awareness:
packages/ or apps/?Adapt paths:
Flexibility:
How it works:
claude -p "prompt" and it just worksSetup:
.env file neededLimitations:
How it works:
Setup:
# Create .env file
echo "ANTHROPIC_API_KEY=sk-ant-..." > .env
# Or set in environment
export ANTHROPIC_API_KEY=sk-ant-...
Use cases:
In agent.py, the environment handling already supports both:
def get_safe_subprocess_env():
env = {...}
# Only add API key if it exists
api_key = os.getenv("ANTHROPIC_API_KEY")
if api_key:
env["ANTHROPIC_API_KEY"] = api_key
# Claude Code will use subscription if no key provided
return env
Guide users:
After setup, tell the user:
AI Developer Workflows infrastructure is set up!
Created:
- adws/adw_modules/agent.py - Core subprocess execution engine
- adws/adw_prompt.py - CLI wrapper for adhoc prompts
- .claude/commands/ - Slash command templates (chore, implement)
- specs/ - Directory for implementation plans
- agents/ - Observability outputs directory
- .env.sample - Configuration template
- CLAUDE.md - Updated with ADW documentation
# Execute an adhoc prompt
./adws/adw_prompt.py "analyze the database schema"
# Create a plan for a chore
./adws/adw_slash_command.py /chore $(uuidgen | cut -c1-8) "add logging"
# Implement a plan
./adws/adw_slash_command.py /implement specs/chore-abc123-*.md
# Or do both in one command (enhanced setup)
./adws/adw_chore_implement.py "add error handling"
Agent outputs saved to:
agents/{adw_id}/{agent_name}/
cc_raw_output.jsonl - Raw streaming output
cc_raw_output.json - Parsed JSON array
cc_final_object.json - Final result object
custom_summary_output.json - High-level summary
See CLAUDE.md for:
- Complete command reference
- Architecture explanation
- Examples for this project
- Extension patterns
1. Try a simple prompt:
./adws/adw_prompt.py "what does this project do?"
2. Create your first plan:
./adws/adw_slash_command.py /chore test "add a new feature"
3. Read CLAUDE.md for more examples
4. (Optional) Upgrade to enhanced setup for more features:
- SDK support for better type safety
- Compound workflows (plan + implement in one command)
- Richer slash commands (feature planning, testing)
For API-based automation (CI/CD, webhooks):
1. Create .env file: cp .env.sample .env
2. Add your API key: ANTHROPIC_API_KEY=sk-ant-...
For interactive use with Claude Max subscription:
- No configuration needed! Just use the scripts.
# Check if installed
claude --version
# If not, guide to installation
# Make scripts executable
chmod +x adws/*.py
# Check dependencies
# For uv scripts, they auto-install on first run
# For poetry projects, run: poetry install
# Verify key is set
echo $ANTHROPIC_API_KEY
# Or check .env file
cat .env
✅ Directory structure created correctly ✅ Reference code adapted to project context ✅ Scripts are executable ✅ Automated validation tests run successfully (NEW) ✅ Test pass rate meets threshold: (NEW)
Don't wait - validate right after setup:
specs/Test the installation by actually using it:
Create detailed test reports:
For each iteration:
Check for regressions:
Know when to stop:
You're not installing a template. You're teaching a codebase how to work with programmatic agents.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.