Wavemill is a CLI tool for autonomous AI-powered software development workflows. It combines Claude/Codex AI agents with Linear project management to automatically process backlogs, expand issues, and ship features in parallel.
This repo also includes traditional LLM workflow helpers for Claude and Codex: backlog triage, planning, bugfixes, and doc generation via slash commands.
Text-first website/docs content for wavemill.org lives in docs/.
- Local entrypoint:
docs/index.md - Getting started:
docs/getting-started.md - Feature workflow:
docs/feature-workflow.md - Autonomous mode:
docs/mill-mode.md - Deployment and DNS:
docs/deploy.md
- Node.js >= 18
- npm
- Linear API key (
LINEAR_API_KEYenv var) - tmux (for wavemill mill:
brew install tmux) - jq (for JSON processing:
brew install jq) - Optional: GitHub CLI (
gh) for repo automation - Claude desktop app (for Claude commands) or Codex CLI (for Codex slash commands)
git clone <this repo> && cd wavemill
./install.shThis makes wavemill globally accessible. Test with:
wavemill help- Set Linear API key:
export LINEAR_API_KEY="your-key-here"
# Add to ~/.zshrc or ~/.bashrc for persistence- Initialize config in your repo:
cd ~/your-repo
wavemill init
# Edit .wavemill-config.json — set linear.project and adjust any defaults# Start continuous autonomous loop
wavemill mill
# Or expand issues interactively
wavemill expandSettings are loaded in layers (later wins):
- Hardcoded defaults
~/.wavemill/config.json(user-level, shared across repos).wavemill-config.json(per-repo, in project root)- Environment variables (always override)
See wavemill-config.schema.json for the full schema.
When working in worktrees, you can configure auto-approval for read-only commands to reduce friction:
Quick setup:
- Add to
.wavemill-config.json:
{
"permissions": {
"autoApprovePatterns": [
"git status*",
"gh pr view*",
"find *",
"ls *",
"cat *"
],
"worktreeMode": {
"enabled": true,
"autoApproveReadOnly": true
}
}
}- Generate agent-specific settings:
# For Claude Code
npx tsx tools/generate-claude-permissions.ts
# For Codex
npx tsx tools/generate-codex-permissions.ts- Apply settings to your agent (see Worktree Auto-Approve Guide)
Benefits:
- Read-only commands (
git status,gh pr view,find, etc.) auto-approve - Speeds up autonomous workflows
- Maintains safety - destructive commands still require confirmation
- Works with both Claude Code and Codex
Full documentation: docs/permissions.md
Fully autonomous task execution system that continuously processes your Linear backlog.
What it does:
- Fetches prioritized tasks from Linear backlog (auto-detects project from
.wavemill-config.json) - Ranks tasks using intelligent priority scoring (considers: Linear priority, task packet completeness, foundational work, dependencies, estimates)
- Auto-expands issues without detailed descriptions (using Claude + issue-writer prompt)
- Launches parallel agent workers in tmux windows (default: 3 concurrent tasks)
- Monitors PR creation and merge status
- Auto-cleans completed tasks (closes tmux windows, removes worktrees, updates Linear to "Done")
- Prompts for next batch with 10s auto-continue
Usage:
cd ~/my-repo
wavemill mill
# With custom settings:
MAX_PARALLEL=5 wavemill millControls:
Ctrl+B D- Detach from tmux (loop continues in background)touch ~/.wavemill/.stop-loop- Stop loop after current cycleCtrl+C- Interrupt and reset in-progress tasks to Backlog
Features:
- Conflict avoidance - Won't run multiple tasks on same area/component
- Migration conflict prevention - Pre-assigns migration numbers to parallel tasks
- Validation gates - Checks CI status and merge target before marking tasks "Done"
- State persistence - Tracks all work in
.wavemill/workflow-state.json - Project context learning - Automatically maintains
.wavemill/project-context.mdwith architectural decisions, patterns, and lessons learned from each completed task
Environment variables:
MAX_PARALLEL- Number of parallel tasks (default: 3)SESSION- Tmux session name (default: wavemill)AGENT_CMD- Agent to use (default: claude, can be: codex)WORKTREE_ROOT- Worktree location (default: ../worktrees)BASE_BRANCH- Base branch (default: main)POLL_SECONDS- PR polling interval (default: 10)DRY_RUN- Dry run mode (default: false)REQUIRE_CONFIRM- Require confirmations (default: true)
Interactively expand multiple Linear issues with detailed task packets.
What it does:
- Fetches Linear backlog (auto-detects project from repo)
- Filters to issues WITHOUT detailed task packets
- Ranks by priority score (same algorithm as wavemill mill)
- Shows up to 9 candidates
- Lets you select up to 3 issues
- Expands each with Claude using issue-writer prompt
- Extracts and applies suggested labels
- Updates both description and labels in Linear
Usage:
cd ~/my-repo
wavemill expand
# With custom project:
PROJECT_NAME="My Project" wavemill expandEnvironment variables:
PROJECT_NAME- Linear project name (auto-detected from.wavemill-config.json)MAX_SELECT- Max issues to select (default: 3)MAX_DISPLAY- Max issues to display (default: 9)
Output example:
Issues needing expansion (ranked by priority, showing up to 9):
1. HOK-219 - Build Registration Dashboard (score: 85)
2. HOK-217 - Add Usage Credits System (score: 75)
3. HOK-216 - Create Welcome Email (score: 70)
Enter up to 3 numbers to expand (e.g. 1 3 5), or press Enter to skip:
> 1 2 3
Processing HOK-219...
✓ Expanded and updated in Linear
→ Adding labels...
✓ Added: Risk: Medium
✓ Added: Layer: UI
✓ Added: Area: Dashboard
Manage subsystem documentation for AI agent consumption. Implements a three-tier memory system:
- Hot memory:
project-context.md(always loaded) - Cold memory:
.wavemill/context/{subsystem}.md(loaded on-demand) - Agent memory: Session-specific context
Subcommands:
wavemill context init- Bootstrap subsystem specs from codebase analysiswavemill context update <subsystem>- Refresh a specific subsystem specwavemill context check- Drift detection (stale/orphaned/undocumented subsystems)wavemill context search <query>- Keyword search across specs
Examples:
# Initialize subsystem documentation
wavemill context init
# Check for stale documentation
wavemill context check
# Update a specific subsystem
wavemill context update linear-api
# Search for "error handling"
wavemill context search "error handling"How it works:
- Detects subsystems from directory structure, file patterns, and git analysis
- Generates structured markdown specs with tables and architectural constraints
- Auto-updates specs after PR merges (when using
wavemill mill) - Keyword search returns ranked results with relevant snippets
Spec format: Each subsystem spec includes:
- Purpose and key files
- Architectural constraints (DO/DON'T)
- Known failure modes
- Testing patterns
- Dependencies
- Recent changes
See CLAUDE.md for detailed documentation on subsystem specs and the context system.
The wavemill CLI is a thin wrapper around these core scripts:
wavemill-mill.sh- Main loop implementationwavemill-orchestrator.sh- Parallel task launcher (tmux)wavemill-expand.sh- Issue expansion implementationwavemill-common.sh- Shared utilities (DRY)
Shared functions in wavemill-common.sh:
detect_project_name()- Auto-detect Linear project from.wavemill-config.jsonis_task_packet()- Check if issue has detailed descriptionscore_and_rank_issues()- Priority scoring algorithmexpand_issue_with_tool()- Expand issues using expand-issue.tswrite_task_packet()- Backwards-compatible wrapperextract_labels_from_description()- Parse labels from expanded issues
wavemill/
├── wavemill # Main CLI entry point
├── install.sh # Installation script
├── shared/lib/ # Core autonomous workflow scripts
│ ├── wavemill-mill.sh # Continuous task execution loop
│ ├── wavemill-orchestrator.sh # Parallel task launcher (tmux)
│ ├── wavemill-expand.sh # Batch issue expansion tool
│ ├── wavemill-common.sh # Shared functions (DRY)
│ └── linear.js # Linear API client
├── tools/ # TypeScript wrappers for Linear API
│ ├── expand-issue.ts # Expand single issue with Claude CLI
│ ├── add-issue-label.ts # Add labels to Linear issues
│ ├── list-backlog-json.ts # Fetch backlog as JSON
│ └── get-issue-json.ts # Fetch single issue as JSON
├── commands/ # Claude slash commands (symlinked)
└── codex/ # Codex commands and prompts
- Linear errors: confirm
LINEAR_API_KEYis exported and the project name in config exists.