Skip to content

Built-in workflows ​

Shipped under .sdd/workflows/ after sdd init (from package defaults). List anytime:

bash
sdd workflows

The same command prints a cl100k token count for each workflow file and for each artifact template. When a change is active, it also counts that change's artifact files. It does not print a dollar cost.

A project initialized by an older sdd may be missing packs this CLI ships. sdd workflows names those under Not copied yet. Copy them with sdd init --here --force. That command leaves a file alone when its bytes differ from the bundled file. A file that still matches is recorded, so a later upgrade can refresh it.

Pick a pack at change start:

bash
sdd new "My title" -w feature -y
# or let recommend pick from the title
sdd new "Fix null pointer on empty list" -y

Packs ​

WorkflowBest forStages (high level)
hotfixTypos, tiny fixes, renamesintent → implement → local_verify
patchSmall bugs / scoped fixesintent → acceptance → implement → local_verify
featureNormal product featuresintent → optional clarify/brainstorm → design → optional clarify → tasks → optional clarify → implement → local_verify
greenfieldNew product from a one-line ideavision → requirements → features → architecture (then sdd backlog start F-001)
spikeTime-boxed research / PoCintent → research → outcome
enterprise-featurePlatform / regulated / multi-team workfeature → hl_arb (hard gate) → lld → db_design → code_research → stories → tasks → implement → local_verify
team-softwareAn optional stage pack you can name with -wrequirements → clarifications → hld → lld → plan → test_plan → implement → pr_review → qa_testing → qa_signoff → po_review → po_signoff. Each stage is a hard human gate

Prefer the CLI entrypoint for product bootstrap:

bash
sdd greenfield "Team expense tracker for remote startups"
# … fill stages …
sdd complete          # promotes vision/requirements/features/architecture → memory/
sdd backlog list
sdd backlog start F-001

See Greenfield guide.

How recommendation works ​

sdd new scores keywords and complexity hints in the title (e.g. “typo” → hotfix, “ARB” / “migration” → enterprise-feature). You can always force -w <name>. team-software is selected by name, or when the title contains team-software. It is one stage pack.

Roles, duties, and the workflow they follow ​

Start here

Roles and duties is the description: what a role is, what a duty is, why the split helps, and the commands that set it up. The lists on this page are the same stage map.

A role is a markdown file in .sdd/roles. A duty is the kind of work that role does. sdd setup on a terminal walks the pieces. Enter, and sdd setup --yes, write planner (planning), architect (architecture), and builder (construction) when that folder has no markdown files. Pass -w to name the workflow those lists come from. The default is feature. Role files that are already there stay as they are, and setup prints Roles are already here. One piece is sdd setup --step roles.

The three duties ​

sdd setup writes these roles. Each one proposes. The person decides.

RoleDutyJobOwnsSkillNeverAsks
plannerplanningPlan the changethe request, the planplan the changeaccept a spec, write product codeWho is this for? How will you know it worked?
architectarchitectureName the modulesthe designname the modulesaccept a spec, write product codeWhich module owns this change?
builderconstructionBuild the changethe change packbuild the changeaccept a spec, generate a release

Builder has an empty ask list.

A named stage id keeps that duty on every workflow:

DutyStage ids
planningintent, vision, requirements, feature, stories, clarify_intent, brainstorm, hl_arb, research, outcome, plan
architecturedesign, architecture, clarify_design, lld, db_design, code_research
constructiontasks, clarify_tasks, implement, local_verify, acceptance, pr_review

A stage id outside those lists takes its duty from where it sits in that workflow. Before the first architecture id, it is planning. From the first construction id onward, it is construction. Between those two, it is architecture. On team-software, clarifications and hld sit before lld, so they are planning. test_plan sits between lld and implement, so it is architecture. qa_testing, qa_signoff, po_review, and po_signoff sit at or after implement, so they are construction. stories and plan are named planning ids, so they stay planning after the architecture stages.

Which duty follows which stage ​

sdd setup -w <workflow> gives each role the stages of that one workflow. A stage id is shared, so a role that lists intent also matches hotfix, patch, feature, and spike.

WorkflowPlanner (planning)Architect (architecture)Builder (construction)
hotfixintentno stage on this workflowimplement, local_verify
patchintentno stage on this workflowacceptance, implement, local_verify
featureintent, clarify_intent, brainstormdesign, clarify_designtasks, clarify_tasks, implement, local_verify
greenfieldvision, requirements, featuresarchitectureno stage on this workflow
spikeintent, research, outcomeno stage on this workflowno stage on this workflow
enterprise-featurefeature, hl_arb, storieslld, db_design, code_researchtasks, implement, local_verify
team-softwarerequirements, clarifications, hld, planlld, test_planimplement, pr_review, qa_testing, qa_signoff, po_review, po_signoff

Name your own roles and the stages they follow:

bash
sdd role create analyst --label "Analyst" --job "Write the reading" --stages intent,design
sdd role create builder --label "Builder" --job "Build the change" --stages implement,local_verify
sdd new "Add CSV export" -w feature -y
sdd role route

--stages is a comma-separated list of stage ids. sdd role edit <name> --stages ... replaces the list. Two roles listing the same stage asks you.

Software roles and the team-software owners ​

sdd team init --template software writes six roles. Each file carries the job, what the role owns, and what it never does. Add stage ids with --stages. Until you do, sdd role route uses the workflow stage owner when a role file of that name exists. solo writes one developer whose job is "Build the accepted change on your own." research writes one researcher whose job is "Answer one question and leave the notes in the repo."

RoleJob
product-managerTurn a request into a short reading the person can accept
architectName the modules and the seams between them
product-ownerSay whether the reading matches the request
dev-leadName who builds the next piece when more than one role is involved
developerBuild the accepted change for one service
qaPropose what to try and the evidence the person can record

The shipped routing file has one rule. The skill name the next owner goes to dev-lead.

Setup's architect and the software template's architect are the same file, .sdd/roles/architect.md. Setup writes that file when .sdd/roles has no markdown files. With the software roles already present, add stages with sdd role edit architect --stages lld,pr_review.

On team-software, each stage names an owner and who they work with:

StageOwnerWorks with
requirementsproduct-managerarchitect, research-assistant
clarificationsproduct-managerresearch-assistant
hldarchitectproduct-manager
lldarchitectdeveloper
plandev-leadarchitect, developer
test_planqadeveloper
implementdeveloperdev-lead
pr_reviewarchitectdev-lead
qa_testingqadeveloper
qa_signoffqaproduct-owner
po_reviewproduct-ownerproduct-manager
po_signoffproduct-ownerqa

research-assistant is the collaborator on requirements and clarifications. Create that role when you want it in the repo. The six roles above are the ones the software template writes.

A role prepares the page. The person signs with sdd team signoff. Every team-software gate is a hard human gate. Merge stays a person action after po_signoff.

How a stage picks a role ​

sdd role route tries these, in order:

  1. A rule in .sdd/routing.yaml whose stage, artifact, owns, or skill matches.
  2. One role whose owns list names the artifact, or whose skills list names the skill. Two matches print Ask the human. and Two roles own this.
  3. One role whose stages list contains the stage id. Two matches print Ask the human. and Two roles list this stage.
  4. The workflow stage's owner, when a role file has that name.
  5. Ask the human. and No rule matched.

The handoff writes Owner from the workflow stage's owner field. Hotfix, patch, feature, greenfield, spike, and enterprise-feature leave that field unset, so the handoff has no Owner line. team-software sets it to the owner in the table above.

Stage owners ​

The people for team-software, and how to assign their stages, are in Roles and duties. A stage may name who produces it and who they work with. A gate may name who approves it. Older packs omit these fields and keep working.

yaml
owner: product-manager
collaborates: [architect]
gate:
  type: hard
  mode: human_approval
  approvers: [human]

items_from: tasks/T-*.md writes one row to items.yaml for each matching file when that stage starts. The row id is the file name without its extension. A later sync keeps done on the same id. team-software sets this on implement, and the plan stage writes tasks/T-001.md. Every team-software stage is a hard gate whose approver is human, so sdd next waits for sdd team signoff on that commit. Merge stays a person action after po_signoff.

Merge gates ​

required_gates lists the verdicts sdd merge demands for this change type. Each name needs a fresh pass or pass-with-notes on the current commit. A workflow that omits the list has no merge gates.

yaml
required_gates:
  - review
  - qa
  - domain

sdd gate record stores the verdict, the reviewer, the exact commit SHA, the time, and evidence links. sdd gate status marks a verdict stale when HEAD is no longer that SHA. sdd merge then refuses. See CLI reference.

Per-change controls ​

bash
sdd skip clarify_intent -r "scope is clear"
sdd use feature -r "grew past a patch"
sdd gate approve -n "ARB approved with condition …"