ship-a-feature
A 4-stage pipeline for shipping a feature end-to-end: spec → implement → review → deploy. The dispatcher auto-advances tasks through these stages when each stage's required_artifacts validate.
Phase 1 status: pre-installed but inactive. The kernel migration's tasks.workflow_template_id + current_step_key columns hold the binding; Phase 2 lands the loader that reads this file's AGENT_ACTIONS_N blocks into board.db::board_templates.
Stages
Stage 1 — Specify
The PM (or PM-equivalent subagent) writes the spec: goal, approach, acceptance criteria, success metrics. Output is a markdown file. The dispatcher checks the file path matches .md$ and the acceptance_criteria_count is ≥1 before advancing.
Stage 2 — Implement
The engineer (or engineer-equivalent subagent) writes the code in a git worktree, runs tests, opens a PR. Required artifacts: metadata.pr_url matching GitHub, tests_run ≥ 1, changed_files_count ≥ 1. On failure, retries once (back to implement); on second failure, falls to block for human review.
Stage 3 — Review
The reviewer (or reviewer-equivalent subagent) does the editorial + security pass. Must explicitly set metadata.approved=true AND metadata.security_audit_passed=true. Approval gate fires before done so a human signs off. On rejection, kicks back to implement (engineer iterates).
Stage 4 — Deploy
The deployer ships it. Requires deploy_status=success AND a deploy_url. On failure, blocks for human investigation.
Pipeline total budget cap (recommendation)
Sum of stage caps: ~$12.50 per feature run. The board enforces per-stage caps; cumulative spend across stages rolls up via SUM(task_runs.usd_spent) for the parent task.
When to use this template vs not
✓ Use it when the work follows the standard ship-a-feature shape: discrete spec, code change, review, deploy.
✗ Skip it when:
- It's research-only (no code change → use
daily-research-brief instead)
- It's a documentation-only change (no review needed → just create a task with assignee=writer)
- It's a hotfix (the pipeline is too slow for incidents → create direct + auto-approve)
1---2name: ship-a-feature3description: workflow template — PM specs, engineer implements, reviewer approves, deployer ships; pre-installed with the board, activates in Phase 2 when the workflow_template kind enum lands4---56# ship-a-feature78A 4-stage pipeline for shipping a feature end-to-end: spec → implement → review → deploy. The dispatcher auto-advances tasks through these stages when each stage's `required_artifacts` validate.910**Phase 1 status:** pre-installed but inactive. The kernel migration's `tasks.workflow_template_id` + `current_step_key` columns hold the binding; Phase 2 lands the loader that reads this file's `AGENT_ACTIONS_N` blocks into `board.db::board_templates`.1112## Stages1314### Stage 1 — Specify1516<!-- AGENT_ACTIONS_1: {17 "step_key": "spec",18 "assignee_default": "pm",19 "skills": ["board-worker", "product-spec"],20 "workspace": "scratch",21 "required_artifacts": {22 "metadata.spec_doc_path": "\\.md$",23 "metadata.acceptance_criteria_count": "[1-9][0-9]*"24 },25 "on_success": "implement",26 "on_failure": "block",27 "max_runtime_seconds": 1800,28 "budget_usd_cap": 1.5029} -->3031The PM (or PM-equivalent subagent) writes the spec: goal, approach, acceptance criteria, success metrics. Output is a markdown file. The dispatcher checks the file path matches `.md$` and the acceptance_criteria_count is ≥1 before advancing.3233### Stage 2 — Implement3435<!-- AGENT_ACTIONS_2: {36 "step_key": "implement",37 "assignee_default": "engineer",38 "skills": ["board-worker", "engineer-typescript", "engineer-rust"],39 "workspace": "worktree",40 "required_artifacts": {41 "metadata.pr_url": "^https://github\\.com/",42 "metadata.tests_run": "[1-9][0-9]*",43 "metadata.changed_files_count": "[1-9][0-9]*"44 },45 "on_success": "review",46 "on_failure": "implement",47 "max_runtime_seconds": 7200,48 "max_retries": 2,49 "budget_usd_cap": 8.0050} -->5152The engineer (or engineer-equivalent subagent) writes the code in a git worktree, runs tests, opens a PR. Required artifacts: `metadata.pr_url` matching GitHub, `tests_run ≥ 1`, `changed_files_count ≥ 1`. On failure, retries once (back to implement); on second failure, falls to `block` for human review.5354### Stage 3 — Review5556<!-- AGENT_ACTIONS_3: {57 "step_key": "review",58 "assignee_default": "reviewer",59 "skills": ["board-worker", "security-pr-audit", "github-code-review"],60 "workspace": "scratch",61 "required_artifacts": {62 "metadata.approved": "true",63 "metadata.security_audit_passed": "true"64 },65 "on_success": "deploy",66 "on_failure": "implement",67 "max_runtime_seconds": 3600,68 "budget_usd_cap": 2.00,69 "requires_approval_on": ["running→done"]70} -->7172The reviewer (or reviewer-equivalent subagent) does the editorial + security pass. Must explicitly set `metadata.approved=true` AND `metadata.security_audit_passed=true`. Approval gate fires before `done` so a human signs off. On rejection, kicks back to `implement` (engineer iterates).7374### Stage 4 — Deploy7576<!-- AGENT_ACTIONS_4: {77 "step_key": "deploy",78 "assignee_default": "deployer",79 "skills": ["board-worker", "deploy-prod"],80 "workspace": "scratch",81 "required_artifacts": {82 "metadata.deploy_status": "^success$",83 "metadata.deploy_url": "^https?://"84 },85 "on_success": null,86 "on_failure": "block",87 "max_runtime_seconds": 1800,88 "budget_usd_cap": 1.0089} -->9091The deployer ships it. Requires `deploy_status=success` AND a `deploy_url`. On failure, blocks for human investigation.9293## Pipeline total budget cap (recommendation)9495Sum of stage caps: ~$12.50 per feature run. The board enforces per-stage caps; cumulative spend across stages rolls up via `SUM(task_runs.usd_spent)` for the parent task.9697## When to use this template vs not9899✓ **Use it when** the work follows the standard ship-a-feature shape: discrete spec, code change, review, deploy.100101✗ **Skip it when**:102- It's research-only (no code change → use `daily-research-brief` instead)103- It's a documentation-only change (no review needed → just create a task with assignee=writer)104- It's a hotfix (the pipeline is too slow for incidents → create direct + auto-approve)