Purpose
Implement an existing CHANGE record after confirming selected work with the user. If the CHANGE has TASK records, implement eligible TASK records first; otherwise implement the CHANGE directly.
Input
Use the text after this skill invocation to select the CHANGE record.
Statuses
- Allowed CHANGE statuses:
Proposed,Blocked,Done,Abandoned. - Allowed TASK statuses:
Todo,Blocked,In Progress,Done,Cancelled. - Treat dependency readiness as derived from linked CHANGE or TASK statuses, not from
Blockedalone. - CHANGE
Blockedmeans waiting on CHANGE dependencies listed inBlocked By. - TASK
Blockedmeans waiting on TASK dependencies listed inBlocked By.
Workflow
- Read
.backtrail/changes.md,.backtrail/tasks.md,.backtrail/adl.md, and.backtrail/features.mdwhen they exist. - Select work.
- If input starts with
CHANGE-00014,CHANGE 00014,C-00014,#14,#014,014, or14, prefer the matching CHANGE record when it exists. - Otherwise, list eligible CHANGE records: status neither
DonenorAbandoned, and notBlockedunless every CHANGE listed inBlocked ByisDone. - If no eligible CHANGE records exist, stop and report that no implementable CHANGE exists.
- If exactly one eligible CHANGE record exists, select it automatically.
- If two or more eligible CHANGE records exist, ask the user to choose one. Use
request_user_inputwhen available.
- If input starts with
- Stop unless the selected CHANGE exists.
- If the selected CHANGE is
Blocked, read every CHANGE listed inBlocked By.- If any blocker is missing, stop and report the missing CHANGE links.
- If any blocker status is not
Done, stop and report the blocking CHANGE ids and statuses. - If every blocker is
Done, update the selected CHANGE file and.backtrail/changes.mdfromBlockedtoProposedbefore continuing.
- If the selected CHANGE links ADRs, stop unless every linked ADR exists and has status
Accepted. - If the selected CHANGE links FEATUREs, stop unless every linked FEATURE exists and has status
Accepted. - Read the selected CHANGE, linked TASKs, and linked ADRs or FEATUREs, if any.
- Linked TASKs are defined only by the selected CHANGE file's canonical
## Taskssection. - Canonical TASK link format:
- [TASK-NNNNN](tasks/task-NNNNN-title-slug.md). - Ignore TASK ids outside the
## Taskssection for CHANGE-to-TASK linkage. - Stop if
.backtrail/tasks.mdlists tasks for the selected CHANGE that are missing from the CHANGE## Taskssection; ask to fix task links first. - Stop if the
## Taskssection contains malformed links, duplicate TASK ids, missing TASK files, or TASK records whoseChangefield does not match the selected CHANGE.
- Linked TASKs are defined only by the selected CHANGE file's canonical
- Choose implementation mode.
- If the CHANGE has linked TASK records that are not
DoneorCancelled, implement TASK mode. - If the CHANGE has no linked TASK records, implement CHANGE mode.
- If every linked TASK is
DoneorCancelled, skip code changes and continue to CHANGE completion checks.
- If the CHANGE has linked TASK records that are not
- TASK mode:
- Unless the user explicitly states otherwise, select and implement only one TASK per invocation.
- Validate each linked TASK belongs to the selected CHANGE and does not expand CHANGE scope.
- Treat TASK records with status
Cancelledas excluded work. Stop if cancelled work is required for CHANGE acceptance. - Unblock TASK records before selection when every TASK listed in
Blocked ByisDone; update each unblocked TASK file and.backtrail/tasks.mdfromBlockedtoTodo. - Eligible TASKs have status
TodoorIn Progressand no unfinished blockers. - If no eligible TASK exists, stop and report remaining TASK blockers and statuses.
- If exactly one eligible TASK exists, select it automatically. If two or more eligible TASKs exist, ask the user to choose one; include parallel TASKs as separate choices.
- Summarize selected TASK goal, scope, acceptance criteria, verification, dependency context, and parent CHANGE context.
- Prepare step-by-step TASK implementation plan.
- Ask whether to implement the selected TASK now.
- Use Yes/No buttons when
request_user_inputis available. Yes: continue to implementation.No: stop without changing files.
- Use Yes/No buttons when
- Before code changes, update the selected TASK file and
.backtrail/tasks.mdstatus toIn Progressunless alreadyIn Progress. - Implement only selected TASK scope and run its verification.
- If verification passes, update the selected TASK file and
.backtrail/tasks.mdstatus toDone. - If verification passes, read each TASK listed in selected TASK
Blocks; when all its blockers areDone, update that TASK file and.backtrail/tasks.mdfromBlockedtoTodo. - If verification fails, leave selected TASK as
In Progressand report failures. - After a TASK reaches
Done, if every linked TASK for the CHANGE isDoneorCancelled, run CHANGE-level verification when specified. If it passes, update the CHANGE file and.backtrail/changes.mdstatus toDone; otherwise leave CHANGE status unchanged and report failures.
- CHANGE mode:
- Summarize decision context, change scope, implementation steps, verification, dependencies, and rollback. For standalone CHANGE records, state that no ADR or FEATURE gate applies.
- Prepare step-by-step CHANGE implementation plan.
- Ask whether to implement the selected CHANGE now.
- Use Yes/No buttons when
request_user_inputis available. Yes: continue to implementation.No: stop without changing files.
- Use Yes/No buttons when
- Implement the CHANGE and run its verification.
- If verification passes, update the CHANGE file and
.backtrail/changes.mdstatus toDone. - If verification fails, leave status unchanged and report failures.
- When TASK or CHANGE implementation reaches
Done, propose a commit message for the finished work based on finished scope - If the CHANGE reaches
Done, read each CHANGE listed inBlocks.
- If the blocked CHANGE is missing, report the missing link and continue without inventing a record.
- If every CHANGE listed in that record's
Blocked Byfield isDone, update that CHANGE file and.backtrail/changes.mdstatus fromBlockedtoProposed. - If any blocker is not
Done, leave the dependent CHANGE asBlockedand report remaining blockers.
- If the CHANGE reaches
Doneand implements linked FEATUREs, update those FEATURE files and.backtrail/features.mdstatus toImplemented.
Question UX
- Use
request_user_inputwhen available for two or three meaningful choices. - For yes/no decisions, present
YesandNochoices. - If
request_user_inputis unavailable, ask one concise plain-text question with numbered choices. - Do not claim that a skill can switch modes or force button rendering.
Guardrails
- Do not infer missing CHANGE records.
- If implementation needs to change an ADR decision, stop and ask for a new or updated ADR.
- If implementation needs to change a FEATURE scope, acceptance criteria, or status gate, stop and ask for a new or updated FEATURE.
- If implementation needs a different scope than the CHANGE describes, stop and ask whether to update the CHANGE first.
- In TASK mode, do not implement outside selected TASK scope.
- In TASK mode, default to one TASK at a time. Do not batch multiple TASKs unless explicitly requested.
- Do not mark a CHANGE
Doneuntil every linked TASK isDoneorCancelledand CHANGE-level verification passes when specified.