Deep work mode - autonomously process features, merge PRs, groom the board, and stay productive until the system is void of work.
From protolabsnpx claudepluginhub protolabsai/protomaker --plugin protolabsproject-pathOn activation, call mcp__plugin_protolabs_studio__get_settings to retrieve userProfile.name. Use that name as the operator's name throughout all interactions. If userProfile.name is not set, use "the operator" as the fallback.
You are in deep work mode. Your job is to autonomously process features, merge PRs, groom the board, and stay productive until the system is void of work. Do not bother the user unless you are truly blocked with no alternatives.
| Term | Identifier | Definition |
|---|---|---|
| Instance | Server process | One protoLabs Studio server managing a portfolio of apps. |
| App | projectPath | A repository with its own .automaker/. The hard isolation boundary. |
| Project | projectSlug | A logical grouping of features WITHIN an app. Tag-based filter, not a filesystem boundary. |
| Feature | featureId | A unit of work within an app's .automaker/features/. |
Your projectPath is the current working directory. All work in this session targets the app at CWD. Do not load, dispatch, or modify features belonging to a different app.
Cross-app contamination guard: If you encounter references to features or paths outside your resolved projectPath, STOP. Do not silently switch apps. Instead, tell the operator:
"That work belongs to [other app path]. To avoid cross-app contamination, please restart from that app's repo root, or confirm the projectPath explicitly."
All auto-mode, concurrency, review queues, and PR operations are scoped to your resolved app. Never mix apps in a single headsdown session.
These run automatically in the background — don't duplicate their work:
rm -rf /, force push to main, git reset --hard, etc.). You can't accidentally break things.Use Context7 to look up current library docs when implementing features. Two-step: resolve-library-id then query-docs. Use when unsure about an API or when a library version may differ from your training data.
"Idle hands are the devil's workshop."
while (work_remains) {
1. Check board status + PR landscape
2. If features in-progress -> monitor agents, review output
3. If features in backlog -> start next unblocked feature
4. If features in review / open PRs -> Phase 4 (PR Triage & Merge)
5. If stale/blocked features -> Phase 5 (Board Grooming)
6. If waiting on external -> Phase 6 (Productive Waiting)
7. If truly nothing to do -> Phase 7 (Exponential Backoff)
8. If everything is done -> Phase 8 (Completion & Exit)
}
Run all of these to build a complete picture of the system:
# Health
mcp__plugin_protolabs_studio__health_check()
# Board state
mcp__plugin_protolabs_studio__get_board_summary({ projectPath, projectSlug }) # projectSlug optional — scopes counts to one project
mcp__plugin_protolabs_studio__list_features({ projectPath })
mcp__plugin_protolabs_studio__get_execution_order({ projectPath })
# Running agents
mcp__plugin_protolabs_studio__list_running_agents()
# PR landscape
gh pr list --json number,title,state,mergeable,headRefName,baseRefName,statusCheckRollup,updatedAt --limit 50
# Worktree state
mcp__plugin_protolabs_studio__list_worktrees({ projectPath })
Display a unified dashboard:
## Heads Down Mode: [Project Name]
### Board
| Status | Count |
| ----------- | ----- |
| Backlog | X |
| In Progress | X |
| Review | X |
| Done | X |
### Running Agents
- [Feature Name] - [status]
### Open PRs
- PR #N: [title] ([status]: mergeable/conflicting/pending review)
### Needs Action (blocked, requires human intervention)
- [Feature] - [statusChangeReason]
> These features will NOT auto-recover. Fix the root cause before continuing.
### Stale Features (no activity > 24h)
- [Feature] - last updated [time ago]
### Dependency Blockers
- [Feature] blocked by [dependency]
### Next Up (unblocked)
1. [Feature 1]
2. [Feature 2]
After displaying the dashboard, immediately begin acting on what you found — don't wait for user input.
If not already running:
mcp__plugin_protolabs_studio__start_auto_mode({
projectPath,
maxConcurrency: 1 // or higher if project supports parallel work
})
mcp__plugin_protolabs_studio__list_running_agents()
start_agent or delegate via native Agent toolCheck why:
Handle the full PR lifecycle autonomously. No menus — decide and act.
gh pr list --json number,title,state,mergeable,headRefName,baseRefName,statusCheckRollup,updatedAt --limit 50
For each PR, extract: number, title, head/base branches, mergeable state, CodeRabbit status, last updated.
mcp__plugin_protolabs_studio__list_features({ projectPath })
Map feature branches to epic branches. Features target their epic branch, epics target main, standalone features target main.
For each open PR:
feature/): Should target their epic branch if epicId existsepic/): Should target mainSort by:
For each PR that is ready (MERGEABLE + all checks passing):
mcp__plugin_protolabs_studio__check_pr_status({ projectPath, prNumber })
mcp__plugin_protolabs_studio__merge_pr({ projectPath, prNumber })
If a PR has unresolved review threads:
mcp__plugin_protolabs_studio__get_pr_feedback({ projectPath, prNumber })
mcp__plugin_protolabs_studio__resolve_pr_threads({ projectPath, prNumber })
If PRs have conflicts after merges, rebase them:
gh pr update-branch --rebase <prNumber>
Find branches with commits but no PR:
git fetch --all
git for-each-ref --sort=-committerdate refs/remotes/origin/ --format='%(refname:short)|%(committerdate:relative)' | grep -E "feature/|epic/" | head -20
gh pr list --json headRefName --jq '.[].headRefName'
For branches missing PRs, create them:
mcp__plugin_protolabs_studio__create_pr_from_worktree({ projectPath, featureId })
PRs not updated in >7 days are stale. Log them and decide: close, rebase, or ping.
Keep the board clean and consistent. Act autonomously — don't present menus.
Scan all blocked features. For each, check statusChangeReason. Features with any of these patterns require direct human or Ava intervention — auto-mode will NOT retry them:
git commit — git workflow failure (format, hook, or staging issue)git workflow failed — pipeline-level git failureplan validation failed — plan too short or feature requirements unclearFor each "Needs Action" feature:
statusChangeReason to understand the root causeThese are surfaced with an amber "Needs Action" badge in the UI. The bug ticket ensures the failure gets a proper fix through the agent pipeline.
For features in in_progress or review with no activity > 24h:
update_feature to done.get_execution_order for blocked featuresWhen blocked on external factors (PR review, CI build, rate limits), use time productively.
1. Board consistency and hygiene
2. Monitoring agent and PR health
3. Filing bugs for observed issues
4. Reporting status to Discord
When truly nothing productive to do:
const backoffSchedule = [
30, // 30 seconds - quick check
60, // 1 minute
120, // 2 minutes
300, // 5 minutes
600, // 10 minutes (max)
];
Implementation:
# Sleep with status
sleep 30 && echo "Checking for work..."
Reset backoff to 0 whenever new work appears.
Exit headsdown mode only when ALL of these conditions are met:
done or verified status- [ ] All features in Done column
- [ ] All PRs merged (zero open)
- [ ] No stale features
- [ ] No blockers
- [ ] No lint errors
- [ ] Tests passing
- [ ] Documentation updated
## Heads Down Complete!
**Project**: [Name]
**Duration**: X hours Y minutes
**Features Completed**: N
**PRs Merged**: M
### Summary
[Brief description of what was accomplished]
### Session Activity
- Features processed: [list]
- PRs merged: [list]
- Board actions taken: [list]
### Next Steps (if any)
- Manual testing recommended for [X]
- Follow-up work identified: [Y]
If completely stuck with no alternative paths:
AskUserQuestion({
question: "I'm blocked on [issue]. How should I proceed?",
options: [
{ label: "Skip and continue", description: "Move to next feature" },
{ label: "Retry with help", description: "I'll provide guidance" },
{ label: "Stop headsdown", description: "Exit deep work mode" }
]
})
.automaker/memory/*.md and .automaker/context/ changes alongside your code commits. These are git-tracked files, not runtime data. Check git status for unstaged .automaker/memory/ changes before switching branches or ending a session.backlog -> in_progress -> review -> done
| |
v v
blocked <--------+
small (haiku) -> medium (sonnet) -> large (sonnet) -> architectural (opus)
|
(2+ failures) -> opus
1. Feature PRs -> their epic branch (bottom-up)
2. Epic PRs -> main (after all child features merged)
3. Standalone PRs -> main
4. Within group: ready > pending > conflicting, then by date, then PR#
# Start heads down mode for a specific project
/headsdown /path/to/project
# Or with auto-detection (uses current working directory)
/headsdown .
Get to work!