This document answers common questions about the Thread-Based Engineering plugin. Questions are organized by topic for easy navigation.
- General Questions
- Getting Started
- Thread Types
- Commands and Usage
- Agents
- Scripts
- Hooks and Ralph Wiggum
- Best Practices
- Technical Questions
- Costs and Billing
Thread-Based Engineering is a mental framework for understanding and improving your ability to work with AI coding assistants like Claude. It was created by IndyDevDan.
A "thread" is a unit of engineering work over time:
- You show up at the START (prompt/plan)
- AI Agent does the MIDDLE (tool calls)
- You show up at the END (review/validate)
The framework defines 7 thread types that represent different patterns of working with AI agents.
This is an educational toolkit for Claude Code that teaches the 7 thread types through practical, executable examples. It includes:
- 7 slash commands (one per thread type)
- 4 custom agents
- 5 helper scripts
- Comprehensive documentation
No. Claude Code works fine without any plugins. This plugin is for learning the Thread-Based Engineering framework and demonstrating advanced patterns.
No. This is a community/educational plugin that works with Claude Code, which IS an official Anthropic product.
Without this plugin, you can still do everything demonstrated here. The plugin provides:
- Pre-built examples to learn from
- Ready-to-use scripts for parallel/fusion patterns
- Documentation explaining the concepts
- A structured way to learn the framework
-
Required:
- Claude Code (
npm install -g @anthropic-ai/claude-code) - Git Bash (on Windows) or Terminal (Mac/Linux)
- Claude Code (
-
Optional but helpful:
- jq (for fusion-aggregator script)
- A code editor (VS Code recommended)
- Start Claude Code:
claude - Type:
/agent-threads:base - If you see the Base Thread explanation, it's working.
Basic familiarity with the command line helps. You should know:
- How to open a terminal
- How to navigate directories (
cd) - How to run commands
No coding experience is required to USE the plugin, but the Developer Guide assumes some programming knowledge.
Yes! Use Git Bash (comes with Git for Windows). Don't use Command Prompt or PowerShell - the scripts are written in bash.
| Thread | One-Line Summary |
|---|---|
| Base | One prompt, AI works, you review |
| Parallel | Multiple AIs working at the same time |
| Chained | Multiple steps with human review between each |
| Fusion | Multiple AIs on same task, combine best results |
| Big | AI using other AIs to help |
| Long | AI working for extended time with validation loops |
| Zero-Touch | Full automation, no human review needed |
Start with Base Thread. It's the foundation for everything else. Get comfortable with:
- Writing clear prompts
- Understanding tool calls
- Reviewing AI output
Then progress to Parallel and Chained before attempting the advanced patterns.
Ralph Wiggum is a technique for Long Threads where deterministic code (scripts) controls when the AI continues or stops working.
Key insight: "Code + Agents > Agents Alone"
An AI might stop early thinking it's done. The Ralph Wiggum pattern uses a Stop Hook to run validation checks. If checks fail, the AI continues working. If checks pass, the AI can stop.
Named after a community contributor who popularized the technique.
Zero-Touch is the theoretical ideal where you trust the AI so much that human review is optional. This requires:
- Comprehensive automated tests
- Strong type checking
- Thorough linting
- Complete validation pipeline
In practice, most work still needs human review. Zero-Touch is a goal to work toward, not where you start.
| Situation | Use This Thread |
|---|---|
| Quick question or simple task | Base |
| Need to review multiple areas | Parallel |
| High-risk or production changes | Chained |
| Want multiple perspectives | Fusion |
| Complex multi-step work | Big |
| Overnight or long-running work | Long |
| Mature codebase, repetitive tasks | Zero-Touch |
- Start Claude Code:
claude - Type the command:
/agent-threads:base - Optionally add arguments:
/agent-threads:base src/auth/
Commands provide:
- Structured prompts for specific tasks
- Tool restrictions for safety
- Pre-built explanations and examples
You can always just type natural language instead.
Yes! Commands are just Markdown files in the commands/ directory.
See the Developer Guide for how to edit them.
$ARGUMENTS is a placeholder that gets replaced with whatever you type after
the command name.
Example:
- You type:
/agent-threads:base src/api/ $ARGUMENTSbecomes:src/api/- Claude sees: "Analyze src/api/"
Agents are specialized AI helpers with defined roles and restricted tools. Think of them as team members with specific jobs:
@researcher- Explores codebases (read-only)@reviewer- Analyzes code quality (read-only)@builder- Implements changes (can write)@validator- Runs tests (can run bash)
| Use Command When | Use Agent When |
|---|---|
| Learning a concept | Doing specialized work |
| Running a demo | Delegating specific tasks |
| Following a pattern | Orchestrating multiple AIs |
Yes! In Big Threads, agents can spawn sub-agents. The primary Claude can use
@researcher to find code, then @reviewer to analyze it.
| Agent | Model | Reason |
|---|---|---|
| researcher | haiku | Speed matters for exploration |
| reviewer | sonnet | Needs thorough analysis |
| builder | sonnet | Quality code generation |
| validator | haiku | Simple test execution |
This optimizes for cost and performance.
No. Scripts are optional helpers that demonstrate patterns. You can:
- Run them directly
- Use them as learning examples
- Ignore them entirely
Yes! The scripts are standalone bash programs. You can run them directly:
./scripts/parallel-runner.sh "your task" 3jq is only needed for fusion-aggregator.sh. Options:
- Install jq (recommended)
- Skip the fusion script
- Aggregate results manually
Absolutely! See the Developer Guide for how to create custom scripts.
A hook is code that runs automatically when certain events happen in Claude Code. Like a tripwire that triggers a script.
The main hook is the Stop Hook in hooks/hooks.json. It runs ralph-loop.sh
whenever Claude tries to stop working.
Sometimes Claude thinks it's done when it isn't:
- Tests are still failing
- TODOs remain in the code
- Lint errors exist
The Stop Hook validates work before allowing stop.
The hook is loaded when the plugin is installed, but it only does anything if your project has tests/linting that the script can check.
Yes:
- Edit
hooks/hooks.json - Remove or comment out the Stop section
- Reinstall the plugin
- Be specific: "Review src/auth.js" not "Review the code"
- State the goal: "Find security vulnerabilities" not "Look at this"
- Provide context: "This handles user login" helps Claude understand
- Set expectations: "List top 3 issues" gives structure
Start with 2-3. Factors to consider:
- Your computer's resources
- API rate limits
- Task complexity
Boris Cherny runs 5+ in terminal plus 5-10 in background, but he's advanced.
Add checkpoints for:
- Production changes
- Security-sensitive code
- Work you can't easily undo
- Learning/teaching scenarios
Skip checkpoints for:
- Experimental work
- Well-tested codebases
- Low-risk changes
- Add comprehensive tests (aim for high coverage)
- Add type checking (TypeScript, mypy)
- Add linting (ESLint, Prettier)
- Add security scanning
- Make validation automatic (CI/CD)
- Gradually reduce manual reviews
Plugin files stay in the original directory where you installed from:
agent-threads/
├── .claude-plugin/plugin.json
├── commands/
├── agents/
├── hooks/
├── scripts/
└── ...
When you run /plugin install ., Claude Code:
- Records the plugin location
- Scans for commands, agents, skills, hooks
- Makes them available in sessions
Yes! Each plugin has its own namespace:
/agent-threads:base(this plugin)/other-plugin:command(another plugin)
claude /plugin uninstall agent-threadsNo. The plugin is purely local. All data goes through Claude Code's normal API connection to Anthropic.
The plugin itself is free. However, using Claude Code uses Anthropic API credits, which do cost money based on:
- Model used (Haiku < Sonnet < Opus)
- Amount of text processed
- Number of tool calls
- Use Haiku for simple tasks
- Be specific in prompts (less exploration needed)
- Set max-turns to limit long sessions
- Don't run unnecessary parallel agents
Check Anthropic's current pricing at https://www.anthropic.com/pricing
| Thread | Cost Factor | Why |
|---|---|---|
| Base | Low | Single session |
| Parallel | Medium-High | Multiple sessions |
| Chained | Medium | Sequential sessions |
| Fusion | High | Multiple sessions + aggregation |
| Big | High | Nested sub-agents |
| Long | Very High | Extended duration |
| Zero-Touch | Varies | Depends on validation |
If your question isn't answered here:
-
Check the documentation:
-
Search the Glossary:
- Glossary - All terms defined
-
Check Claude Code docs:
-
Ask Claude directly:
- Claude can explain concepts from the plugin
- Try: "Explain what a Parallel Thread is"
FAQ for Thread-Based Engineering Plugin v1.0.0