Usage
~software-delivery-tdd/workflow
When to use
when a software delivery plan exists and needs to be executed slice-by-slice using TDD when you want automated Red-Green-Refactor cycles with human sign-off after each slice
When not to use
when no delivery plan exists yet (use software-plan-iterative first) when the task does not follow TDD methodology when you want to implement without test-first discipline
Configuration
software-slice-selectorsoftware-test-creatorsoftware-delivery-completersoftware-test-executorsoftware-test-reviewersoftware-implementorsoftware-code-refactorergeneral |
Pipeline
SelectSlice — the software-slice-selectoragent marks the just-completed slice or slice batch (if any), updates the completed slices list, reads the plan and prior context to pick the next unfinished execution unit, and reports whether more slices remain — or signals Done when all slices are complete Red phase — the software-test-creatoragent writes failing tests for the slice; the software-test-executoragent executes the relevant tests to confirm they actually fail; the software-test-revieweragent evaluates test quality and can loop the creator back for revisions Green phase — the software-implementoragent writes the minimum code to pass; the software-test-executoragent executes the relevant tests to verify the implementation; if tests fail the loop sends control back to the implementor Refactor phase — the software-code-refactoreragent improves code quality; the software-test-executoragent executes the relevant tests to verify no regressions; if tests fail the loop sends control back to the refactorer Slice human review — a structured interview lets the human accept the execution unit, accept and commit it, or send it back to the Red phase with revision notes; choosing "Accept and Commit" routes through a CommitSlice agent that stages and commits the changes before continuing; on acceptance (with or without commit), control returns to SelectSlice which handles both completion tracking and next-unit selection Delivery completion — once SelectSlicereports that all execution slices are complete, the software-delivery-completeragent checks the delivery plan's Definition of Done and other plan-level completion criteria, performs any minor closeout work needed, and produces a final completion report Final human review — a structured interview lets the human accept the delivery, accept and commit the closeout changes, or request a limited closeout pass for minor follow-up items; choosing "Accept and Commit" routes through a CommitCompletion agent that stages and commits the closeout work; choosing "Closeout" loops back to the delivery completer with notes on what to address. This closeout loop is intentionally bounded: if substantial unfinished work remains, the completer should report that clearly rather than beginning a new large implementation cycle
software-test-executor
fidelity="full"thread-idslice-selectortest-creatortest-executortest-reviewerimplementorrefactorerdelivery-completertest-executorCommitSliceCommitCompletionmax-session-turnsCreateTestsImplementRefactorCompleteDelivery
workflow_set_contextworkflow_get_contextworkflow_get_outputcurrent_sliceslice.scopeslice.acceptance_criteriaslice.packagescompleted_slicesworkflow_get_outputhuman.feedbackcompletion.*workflow_set_route
select-slice-prompt
select-slice-promptworkflow_get_context
key "current_slice" — the most recently selected execution unit (treat as just-completed when re-entering after acceptance; empty on first invocation) key "completed_slices" — the list of previously completed slice names
Append the just-completed slice or the underlying slices represented by a just-completed combined unit to the completed list (if provided) Read the delivery plan and identify the next unfinished execution unit, combining adjacent compatible slices when appropriate to normalize overly narrow planning granularity Report the updated completed list, selected execution unit details (name, included slices, scope, acceptance criteria, packages), and whether more slices remain — or signal that all slices are complete
workflow_set_context
key "human.feedback" — set to "" key "slice.test_files" — set to "" key "slice.test_command" — set to ""
workflow_set_context
key "completed_slices" — the updated completed slices list returned by the skill If a slice or slice batch was selected, also store: key "current_slice" — the selected execution unit name or identifier key "slice.scope" — the scope description key "slice.acceptance_criteria" — the acceptance criteria key "slice.packages" — the packages, crates, modules, or directories involved
workflow_set_routeworkflow_set_route
create-tests-prompt
create-tests-promptworkflow_get_context
key "current_slice" — the slice name key "slice.scope" — what the slice covers key "slice.acceptance_criteria" — the criteria the tests must verify key "slice.packages" — the packages or directories involved
workflow_get_outputworkflow_get_context
workflow_set_context
key "slice.test_files" — the list of test file paths created or modified key "slice.test_command" — the specific command to run only these tests
review-tests-prompt
review-tests-promptworkflow_get_context
key "current_slice" — the slice name key "slice.scope" — what the slice covers key "slice.acceptance_criteria" — the criteria the tests must verify key "slice.packages" — the packages or directories involved key "slice.test_files" — the test file paths to review key "slice.test_command" — the command used to run the tests
workflow_get_output
workflow_set_routeworkflow_set_route
run-tests-prompt
run-tests-promptworkflow_get_context
key "slice.test_command" — the test command to run key "slice.test_files" — the test file paths key "slice.scope" — what the slice covers key "slice.packages" — the packages or directories involved key "current_slice" — the slice name (for the report header)
workflow_set_route
implement-prompt
implement-promptworkflow_get_context
key "current_slice" — the slice name key "slice.scope" — what the slice covers key "slice.acceptance_criteria" — the criteria being implemented key "slice.packages" — the packages or directories to work in key "slice.test_files" — the test files that must pass
workflow_get_output
Make all existing tests pass Be minimal — do not add functionality beyond what the tests require Follow existing code conventions in the codebase Scope changes to the packages and directories listed in "slice.packages"
refactor-prompt
refactor-promptworkflow_get_context
key "current_slice" — the slice name key "slice.scope" — what the slice covers key "slice.packages" — the packages or directories to work in key "slice.test_files" — the test files that must keep passing
workflow_get_output
Eliminate duplication Improve naming and readability Simplify complex logic Ensure the code follows existing patterns and conventions Keep changes scoped to the packages and directories in "slice.packages" Keep all tests passing after every change
slice-review
slice-reviewpreamble: |
The TDD cycle (Red-Green-Refactor) for this slice is complete and all tests are passing.
Please review the tests, implementation, and refactored code before proceeding.
questions:
- header: Decision
question: Is the completed slice acceptable?
type: single-select
options:
- label: Accept and Commit
- label: Accept
- label: Revise
store: human.decision
- header: Revision Notes
question: What specific changes should be made?
type: freeform
store: human.feedback
show-if: "human.decision == Revise"commit-slice-prompt
commit-slice-promptworkflow_get_context
key "current_slice" — the slice name key "slice.scope" — what the slice covers key "slice.packages" — the packages or directories involved
git statusgit diff --stat
git log --oneline -20git commit
complete-delivery-prompt
complete-delivery-promptworkflow_get_context
key "current_slice" — the most recently completed execution unit key "completed_slices" — the completed plan slice identifiers key "completion.feedback" — any final-review follow-up notes from a prior closeout pass
workflow_get_output
delivery-completion-review
delivery-completion-reviewpreamble: |
All execution slices are complete. The delivery completer has checked the delivery plan's
Definition of Done and other plan-level completion criteria, and has performed any minor
closeout work it could.
Please review the final completion report and the repository state before deciding how to finish.
Use "Closeout" only for small remaining wrap-up items such as documentation touch-ups,
verification gaps, generated artifacts, formatting or lint fixes, or other limited
plan-completion tasks. If substantial feature work is still missing, the delivery plan
likely needs to be extended or revisited outside this closeout loop.
questions:
- header: Final Decision
question: What should happen next for final delivery closeout?
type: single-select
options:
- label: Accept and Commit
- label: Accept
- label: Closeout
store: completion.decision
- header: Closeout Notes
question: What minor closeout items should be addressed?
type: freeform
store: completion.feedback
show-if: "completion.decision == Closeout"commit-completion-prompt
commit-completion-promptgit statusgit diff --stat
git log --oneline -20git commit
.stencila/workflows/software-delivery-tdd/WORKFLOW.md