build-task
Autonomous task implementation - research, plan, build, review, fix, ship
What this skill does
# Build Task
Implement a task autonomously through the full development lifecycle.
## Input
<task_reference> $ARGUMENTS </task_reference>
**Formats:**
- *(empty)* → Auto-detect most recent `docs/plans/*.md`
- `docs/plans/*.md` → Blueprint file from `Skill("blueprint")`
- `#123`, `PROJ-123`, URL → Task reference (GitHub, Beads, Linear)
- `--no-ship` → Flag to skip shipping (used by run-blueprint for batch shipping)
## Step 0: Detect Input Type
```bash
# If empty, find most recent plan
ls -t docs/plans/*.md 2>/dev/null | head -1
```
**Parse flags:**
- `--no-ship`: Set `skip_ship=true`, remove flag
- `--ac "<criteria>"`: Set `ac_items` to provided criteria, remove flag
| Input | Source | Skip Steps |
|-------|--------|------------|
| Empty + plan found | `plan` | 1, 2, 5 |
| `*.md` file path | `plan` | 1, 2, 5 |
| Task reference | `task` | (none) |
| Empty + no plan | Ask user | — |
**For plans:** Extract `TASK_ID` from filename slug, `TITLE` from first `# ` heading.
---
## Workflow (Context Gathering)
### 1. Fetch Task (task source only)
```
Task (majestic-engineer:workflow:task-fetcher):
prompt: Task: <reference>
```
### 2. Claim Task (task source only)
```
Task (majestic-engineer:workflow:task-status-updater):
prompt: Action: claim | Task: <ID>
```
### 3. Set Terminal Title
Run `/rename <task-title>` to set the terminal title for visibility.
### 4. Setup Workspace
**Read config values:**
```
WORKFLOW = config_read("workflow", "branches")
BRANCH_NAMING = config_read("branch_naming", "issue-desc")
POST_CREATE = config_read("workspace_setup.post_create", "")
```
```bash
DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
```
**Then setup workspace:**
```
Task (majestic-engineer:workflow:workspace-setup):
prompt: |
Task ID: <ID>
Title: <title>
Type: <type>
Workflow: <workflow>
Branch Naming: <branch_naming>
Default Branch: <default_branch>
Post-Create Hook: <post_create>
```
### 5. Verify Branch (MANDATORY)
**After workspace setup, verify we are NOT on a protected branch:**
```bash
CURRENT_BRANCH=$(git branch --show-current)
```
| Current Branch | Action |
|----------------|--------|
| `main` | STOP - workspace setup failed |
| `master` | STOP - workspace setup failed |
| `<default_branch>` | STOP - workspace setup failed |
| Feature branch | Continue |
**If on protected branch:** STOP and report error. Do not proceed.
### 6. Resolve Toolbox
```
Task (majestic-engineer:workflow:toolbox-resolver):
prompt: |
Stage: build-task
Task Title: <title>
Task Description: <description>
```
**Stores:** `methodology`, `build_agent`, `fix_agent`, `coding_styles`, `design_system_path`, `research_hooks`, `pre_ship_hooks`, `quality_gate.reviewers`
### 7. Auto Research (if triggers match)
For each `mode: auto` hook where triggers match task text:
```
Task (majestic-engineer:workflow:context-proxy):
prompt: agent: <hook.agent> | budget: 2000 | prompt: Research for: <title> | Context: <description>
```
### 8. Context Check (Post-Research)
If research agents returned outputs and combined output > 4000 chars:
- Summarize research findings before planning (KEEP task title, description, key patterns; DISCARD verbose tool outputs)
- Preserve task title, description, and key patterns
### 9. Plan (task source only)
```
Task (majestic-engineer:workflow:context-proxy):
prompt: agent: architect | budget: 3000 | prompt: Task: <title> | Description: <description> | Research: <findings>
```
**Note:** Skip if source is `plan` - use plan file content instead.
---
## Delegate to Build Workflow Manager
Pass all gathered context to the build-task-workflow-manager agent:
```
agent build-task-workflow-manager "
Task ID: <ID or 'plan'>
Title: <title>
Branch: <branch>
Plan: <plan content>
Acceptance Criteria:
<ac_items>
Methodology: <methodology>
Build Agent: <build_agent>
Fix Agent: <fix_agent>
Coding Styles: <styles>
Design System Path: <path>
Pre-Ship Hooks: <hooks>
Quality Gate Reviewers: <reviewers>
Source: <task or plan>
Skip Ship: <skip_ship>
"
```
**AC source:**
| Input | AC Source |
|-------|-----------|
| `--ac` flag provided | Use provided AC directly |
| Plan file | Extract from `**Acceptance Criteria:**` section |
| GitHub Issue | Extract from issue body (look for AC section) |
| Linear/Beads | Extract from task description |
The agent handles:
1. Loading design system (if configured)
2. Activating coding style skills
3. Building the implementation
4. Slop removal (MANDATORY)
5. AC Verification (MANDATORY)
6. Quality gate (MANDATORY)
7. Fix loop (if needed, max 3 attempts)
8. Capture learnings
9. Pre-ship hooks
10. Shipping (PR creation)
11. Task completion (if task source)
**Agent returns:**
- AC verification results (which criteria passed/failed)
- Learnings discovered
- Status (PASS or FAIL)
**Caller responsibility:** If caller needs to persist results (e.g., update blueprint checkboxes), it handles that based on the returned results.
---
## Output
**Task source:**
```
## Build Complete: #<ID> - <title>
- Backend: <github|beads|linear>
- Branch: <branch>
- PR: #<number>
- Quality: Passed (attempt <n>)
- Next: PR awaits review, task closes on merge
```
**Plan source:**
```
## Build Complete: <title>
- Plan: <file-path>
- Branch: <branch>
- PR: #<number>
- Quality: Passed (attempt <n>)
- Next: PR awaits review
```
---
## Examples
```bash
Skill("build-task") # Auto-detect recent plan
Skill("build-task") docs/plans/add-auth.md # Explicit plan
Skill("build-task") #42 # GitHub issue
Skill("build-task") PROJ-123 # Beads/Linear
```
---
## Notes
- This command gathers context (steps 1-9), then delegates execution
- The workflow manager ensures no build/verify/ship steps are skipped
- Branch safety check prevents accidental commits to main/master
- Research agents run conditionally based on toolbox triggers
Related in Productivity
gitea-workflow
IncludedOrchestrate agile development workflows for Gitea repositories using the tea CLI. Use when working with Gitea-hosted repos and asking to 'run the workflow', 'continue working', 'what's next', 'complete the task cycle', 'start my day', 'end the sprint', 'implement the next task', or wanting guided step-by-step development assistance. Keywords: workflow, orchestrate, agile, task cycle, sprint, daily, implement, review, PR, standup, retrospective, gitea, tea.
microsoft-graph-gateway
IncludedRoute Microsoft Graph work in this workspace. Use when users want to read or write Outlook mail, calendar events, contacts, OneDrive or SharePoint files, Teams, Planner, To Do, users, groups, directory data, or arbitrary Microsoft Graph endpoints from VS Code. Prefer WorkIQ for common read scenarios. Use Microsoft Graph for write actions and gap-read scenarios that need exact Graph properties, filters, permissions, or endpoints.
copilotkit
IncludedUse when building with CopilotKit — setup, development, integrations, debugging, upgrading, or contributing. Routes to the appropriate specialized skill based on the task.
wordly-wisdom
IncludedProvides calibrated decision analysis using Charlie Munger-style multiple mental models, inversion, incentive mapping, circle-of-competence checks, misjudgment audits, second-order effects, and forecast updates. Use when the user asks for an oracle take, a hard call, a decision memo, a premortem, an outside view, a red-team, a sanity-check, what am I missing, think this through, or wants a strategy, hire, investment, plan, product, partnership, or major life choice analysed. Avoid for simple factual lookups or time-sensitive legal, medical, or market questions without fresh evidence.
swain-session
IncludedSession management and project status dashboard. Owns the full session lifecycle (start/work/close/resume), focus lane, bookmarks, worktree detection, and tab naming. Also serves as the project status dashboard — shows active epics, progress, actionable next steps, blocked items, tasks, GitHub issues, and recommendations. Worktree creation is deferred to swain-do task dispatch (SPEC-195). Triggers on: 'session', 'status', 'what's next', 'dashboard', 'overview', 'where are we', 'what should I work on', 'show me priorities', 'bookmark', 'focus on', 'session info'.
gandi
IncludedComprehensive Gandi domain registrar integration for domain and DNS management. Register and manage domains, create/update/delete DNS records (A, AAAA, CNAME, MX, TXT, SRV, and more), configure email forwarding and aliases, check SSL certificate status, create DNS snapshots for safe rollback, bulk update zone files, and monitor domain expiration. Supports multi-domain management, zone file import/export, and automated DNS backups. Includes both read-only and destructive operations with safety controls.