Files
bortstack-forge/skills/bortstack-context/references/task-lifecycle.md
T

6.9 KiB

Shared task lifecycle

This is the canonical lifecycle for bortstack-context. Repository rules may use different labels, but must preserve these gates. Contributor, design, and new-project skills refer here instead of defining competing states. The task record is authoritative; Git and provider state are evidence to inspect, not a substitute for it.

mission-commands.md is the user-facing command interface to these states. It changes terminology and conversation flow without changing IDs, files, record formats, state gates or Git authority.

States and evidence

State Entry evidence Permitted next state
Created Unique stable ID, scope, owner, dependencies, acceptance criteria; no implementation authority implied In Progress, Blocked / Suspended
In Progress Authorised task, assigned branch/worktree or explicitly authorised direct branch, baseline commit, integration target, relevant dependencies Implementation Complete, Blocked / Suspended
Implementation Complete Candidate diff reviewed, implementation commit or exact uncommitted state recorded, applicable automated checks recorded Testing, Blocked / Suspended
Testing Exact candidate and manual-test environment identified, result or outstanding test gate recorded Implementation Complete for fixes, Ready for Review / Integration, Blocked / Suspended
Ready for Review / Integration Required tests passed or an explicit accepted exception; intended files committed; branch and commit recorded; push and PR verified where the provider supports them, or a repository-approved local review handoff acknowledged In Progress for requested changes, Integrated after Captain approval and combined verification, Blocked / Suspended
Integrated Captain-authorised integration commit on designated target, combined application tests and affected workflow checks passed, conflicts resolved without discarding work Verified / Closed, In Progress for reconciliation if later verification fails
Verified / Closed Required acceptance criteria and human acceptance recorded, integration evidence linked, task-owned cleanup performed only when authorised Terminal; reopen through an explicit new record or documented correction
Blocked / Suspended Actual step, reason, preserved branch/worktree/commit, owner and resumption action recorded Previous active state after blocker resolution, or an explicitly authorised replacement state

Implementation Complete never means Integrated. A passing isolated test or Git merge alone cannot close a task. A failed combined-application check leaves the task open; record the merge candidate and failure, and return to In Progress for reconciliation or Blocked / Suspended. Never rewrite a successful state merely to hide failed evidence.

Required task record

Record the task ID, state, owner, branch and worktree, baseline commit, integration target, dependencies, implementation commit, provider remote and PR reference where applicable, isolated automated and manual tests, Captain approval, integration commit, combined tests and affected UI/API/dependency checks, acceptance outcome, and any cleanup instruction. Use not applicable or pending rather than inventing a value. Keep private credentials out of records. For a direct-branch task, record that authorisation and use not applicable for the separate worktree/PR fields.

Start and finalisation gates

Before starting another implementation, inspect all worktrees and status, task records and handoffs. A prior task may be left pending review while an independent task starts, but its intended work must be committed and submitted for review, integrated, or explicitly suspended with exact recoverable state. Do not abandon a finished uncommitted worktree. Parallel tasks may use different branches from the latest appropriate integration baseline; record dependencies and targets. Do not use another task's unintegrated commit as an implicit baseline.

When a contributor says the task is complete or testing works, the contributor skill starts the finalisation sequence automatically. Verify the task and manual test result; inspect staged, unstaged and untracked paths, conflicts and likely secrets; run required checks; stage only intended files; commit; push and create/update a PR when supported; verify the remote commit and PR; record evidence and transition to Ready for Review / Integration. A completion statement is authority for ordinary task finalisation under the repository's contributor policy, not authority to merge, deploy, force-push, delete test resources, or change provider settings. If a gate fails, preserve everything and record the actual state. Stop automated repair after two unsuccessful attempts on the same failure.

Captain approval is required before merging a contributor PR. After approval, identify the designated integration target and current baseline, integrate using repository policy, resolve conflicts without silently losing changes, test the combined application and affected screens, routes, navigation, APIs and dependencies as relevant, then record integration commit and results. Only then mark Integrated. Human acceptance and remaining criteria control Verified / Closed. Never use destructive reset, forced push, or destructive worktree cleanup without explicit Captain approval. Keep pending-review branches and worktrees recoverable.

Identifiers and reconciliation

New IDs follow the repository's documented project prefix and sequence, for example PI-042, RB-018, or Forge's historical FORGE-F###. Inventory existing task records before allocation. Recognise TASK-001 and other historical IDs without changing them. Compare IDs from both sides before task-record integration; scripts/context_audit.py or an equivalent read-only check reports duplicate headings and locations. Pause the affected task-record merge and warn Captain. If a true collision needs resolution, Captain chooses which record keeps its ID and authorises a new unused ID for the other. Search the affected branch/worktree for task headings, filenames, branch names, handoffs, decisions, PR text and references; preview the exact replacements, update them consistently, then repeat collision and reference checks. Never rewrite historical records automatically or run a central allocator.

Test resources and platforms

Record individual task tests separately from combined integration tests. Keep contributor-created temporary Docker containers available until the contributor explicitly requests removal, subject to safety constraints; task completion alone is not cleanup authority. Use platform-independent Git operations and paths, quote paths with spaces, and provide PowerShell/Bash variants where commands differ. Do not infer Windows compatibility from Linux checks; JJ's Codex CLI, Git and Docker finalisation path must be exercised on Windows before declaring the contributor skill production-ready.