Bug

bug is a pipeline-layer request type that diagnoses and fixes a defect through a lean version of the staged lifecycle. It runs under the orchestrator like any pipeline job, but its preset disables the exploratory and presentational stages — there is no brainstorm, no document, and no review by default — so the job goes straight from clarifying the defect to planning, executing, testing, and validating the fix.

All request types

The registry at _processes/_shared/request-types.md is the single source of truth for this type; its preset at _processes/_shared/presets/bug.md seeds the JOB.md the orchestrator's creation/bootstrap step writes.

The flow

A bug job runs the same orchestrator-driven pipeline as every pipeline type, but the preset enables only five of the eight stages. The orchestrator dispatches each enabled stage in canonical order — clarify → plan → execute → test → validate — verifies its artifact, parses its handoff, and writes the shared job state. The diagram below shows that lean spine.

Skipped by the preset. Three stages are (disabled) on a default bug job and do not appear in the flow above: brainstorm (bugs are usually scoped, not exploratory), document (the fix is usually internal), and review (the optional adversarial code-review pass stays off). The orchestrator skips any stage carrying the (disabled) marker.

What it is for

Reach for bug when you have a known defect to diagnose and fix — a regression, a crash, an incorrect result, a broken edge case. The work is typically scoped rather than open-ended, so the pipeline is deliberately lean: it skips the divergent-thinking and documentation work that a feature needs, and concentrates effort on understanding the defect, fixing it, and proving the fix with tests.

The lean shape is intentional. A bug fix usually has one correct approach once the cause is understood, so the brainstorm stage adds little; the change is usually internal, so the document stage is off; and the lighter scope means the optional review stage stays disabled unless you opt in. What stays on is the spine that catches the costly mistakes: clarify (so you do not plan a fix for code that already changed or lives elsewhere), plan, execute, test (to cover the fix), and validate (the adversarial backstop).

When a bug needs more. If a defect exposes a documentation gap, enable document by removing its (disabled) marker in JOB.md before promoting (or via the extend op-card later). The same applies to brainstorm and review — the preset only sets the lean defaults; you can widen any pipeline job.

The logic

In the registry, bug carries layer pipeline and shape pipeline. That pairing tells the orchestrator to run the staged lifecycle: at pickup it reads JOB.md → Type, looks up the layer in _processes/_shared/request-types.md, sees pipeline, and builds a stage run-plan from ## Stages instead of routing to an action prompt. Its prompt path is _processes/02_orchestrator/orchestrator.prompt.md — the same single lifecycle agent every pipeline type uses.

Stages the bug preset disables

The preset at _processes/_shared/presets/bug.md turns three stages off; the orchestrator skips every stage that carries the (disabled) marker in JOB.md → Stages.

The gates that apply

The bug preset sets the approval gates so the pipeline runs unattended through diagnosis and the fix, then pauses before anything touches the remote.

Clarify still runs first. Even on the lean pipeline, clarify is enabled — it pressure-tests the defect report against the live codebase and catches the "this is already fixed in branch X" or "this lives in a different module than you thought" cases that would otherwise waste a plan + execute cycle.

The fields

A bug job uses the standard pipeline JOB.md shape (template: _processes/_shared/templates/JOB.template.md; contract: _processes/_shared/schemas/JOB_CONTRACT.md). The values below are the preset defaults the orchestrator's creation/bootstrap step seeds; you can override any of them in the intake or while reviewing in 1_creation/.

Header

Header fields seeded for a bug job
FieldValue
Workflow version0.14
Typebug
Preset_processes/_shared/presets/bug.md
CreatedYYYY-MM-DD
Statusmirror of the queue folder (informational only)
Base branchmain
Target branchbug/<slug> (a branch is created) or N/A

## Git

Git options (bug preset)
LineValue
Create branchyes
Validate against mainyes
Commityes — committed at the post-validate git landing, gated by before_commit (D-63)
Pushyes — the job branch is pushed to origin right after the commit (D-82), on any remote host
PRyes — opened by the workflow at the same landing, gated by before_pr (merging stays yours)
PR target branch(blank) ⇒ production — the branch the PR merges INTO (0.14, D-63); distinct from Base branch (cut FROM, default main)

## Stages

All eight stages are listed in canonical order; the three the preset disables carry the (disabled) marker.

Stage states for a bug job
StageState
clarifyenabled
brainstorm(disabled)
planenabled
executeenabled
testenabled
document(disabled)
review(disabled)
validateenabled

## Approval gates

Approval gates (bug preset)
GateValue
after_creationno
after_clarifyno
after_brainstormno
before_planno
before_executionno
before_commityes
before_pryes

## Per-stage config (enabled stages only)

One sub-section per enabled stage. clarify is enabled but carries no config block — its mandate-rewrite carve-out is policy, not a toggle. The disabled stages (brainstorm, document, review) have no config block.

Per-stage config for the enabled stages of a bug job
StageConfig (preset default)
### PlanMulti-phase: no (bug fixes are usually single-phase; override per job)
### ExecuteDelegate research to sub-agents: no (override per job)
### TestUnit: yes — tests cover the fix
### ValidateCross-check against mandate: yes; Agent: claude (override to codex per job to run validate's internal code review on Codex)

How to run it

A bug job runs under the single lifecycle agent — the orchestrator. Copy its prompt path and send it to your agent:

Copy this path
_processes/02_orchestrator/orchestrator.prompt.md

Drop your defect intake as a file in jobs/0_new/, then run the orchestrator: it discovers the intake, runs its creation/bootstrap step to author the bug JOB.md from the preset, and advances the job through the lean pipeline to jobs/4_done/ in the same run — pausing only at the before_commit and before_pr Git gates.

See also