/task - Create Task
Input
- type (optional):
behavior-change,bugfix,refactor,infra,general, orqa - title (optional): short title of two to five words
Workflow
- List every directory under
ProductSpecification/tasks/and
ProductSpecification/tasks/done/. Extract and show every leading integer; the
next global task number is the maximum plus one, or 1 when none exist. Before
creation, verify no folder in either location starts with that number.
- Parse the canonical type and title. If either is missing, ask for it.
- Create
ProductSpecification/tasks/{N}-{type}-{slug}/, with a lowercase,
hyphenated slug of at most five words.
- Gather the type-specific spec in two or three rounds:
- behavior-change: problem, current and expected observable behavior,
constraints, and likely key files; do not pre-plan TDD steps.
- bugfix: symptoms, observed versus expected behavior, environment,
frequency, captured errors, and reproduction; do not ask for a cause,
solution, affected layers, or key files.
- refactor: structural problem, behavior-preserving outcome, constraints,
and likely key files; do not pre-plan implementation steps.
- infra: problem, intended infrastructure-as-code outcome, constraints,
likely files, and bounded direct work units. Never plan manual remote changes.
- general: problem, intended outcome, constraints, likely files, and bounded
direct work units.
- qa: why and when to run the checklist, target environment, session
duration, and numbered one-line cases; omit affected layers and key files.
- Generate
spec.mdandprogress.mdfrom
.claude/templates/task/creation-formats.md:
behavior-change:designthensteps discovery; discovery inserts TDD.bugfix: root-cause-first discovery; discovery inserts TDD.refactor: design and discovery insert direct behavior-preserving steps.infraandgeneral:design, then one direct step per Work item.qa:design, then one manual checkbox per case.
- Show both files for review, then commit them as
task: spec (Task {N}, {title}).
Invariants
- Only
behavior-changeandbugfixuse RED-to-GREEN work units. refactor,infra,general, andqanever receive RED/GREEN checkboxes.- If a no-TDD task requires a behavior change, reclassify it or split out a TDD
task before implementation.
- All types share one global number sequence, including archived tasks.