4.3 KiB
Contributor review and integration handoff
Use bortstack-context/references/task-lifecycle.md for states, evidence and approval gates. Follow repository AGENTS.md and actual provider configuration. This sequence starts automatically when Commander reports task completion. It is authority for ordinary contributor finalisation under repository policy, not for merge, deployment, destructive recovery or test-resource cleanup.
Submit the completed task
- Identify the active task, accepted scope, source worktree, task branch, baseline commit, integration target, and any parallel task branches. If ambiguous, ask Commander to identify the task in plain language; preserve all work meanwhile.
- Confirm the required manual test covered the exact current candidate. "Everything works" may confirm it when the candidate and testing are clear. Record the result, environment and any limitation. Refresh the task's manual-test snapshot after edits.
- Inspect staged, unstaged and every untracked path; check conflicts, likely secrets, unexpected files and changes outside task scope. Preserve unrelated files. Never use an unreviewed blanket stage. Explain any needed choice without asking Commander to run Git.
- Run repository-required automated tests, lint/build/security checks as applicable and
git diff --check. Record commands and results. Fix only within scope and stop automated repair after two unsuccessful attempts on the same failure. - Update task, current state and handoff with branch/worktree, baseline, target, implementation commit when known, isolated test results and limitations. Stage only intended files, inspect staged diff, and commit to the task branch. Verify the commit and remaining working-tree status. A dirty worktree may contain preserved unrelated work; record it explicitly.
- Inspect the configured remote and provider capability. Push the task branch and verify the remote commit. Create or update a PR against the designated integration branch where supported; verify its URL, source/target and status. Record branch, commit, PR reference, test evidence and Captain approval pending. Set Ready for Review / Integration only after verified submission. A repository-approved local review handoff may be used without a provider; otherwise retain the truthful pre-review state. Never invent a PR or create provider settings by assumption.
- Tell Commander in ordinary language that the work is saved and submitted for Captain review, and that another independent task may begin. If any step fails, say what failed, whether the work is committed or only preserved in the worktree, and the next safe action. Do not claim review submission from a local commit or integration from a PR. Preserve branch, worktree and test resources.
After Captain approval
Captain approval is required before merging a contributor PR. Identify the current designated integration branch and baseline, check task-ID collisions and dependencies, and integrate with the repository's merge strategy. Resolve conflicts without discarding others' work. Run combined-application tests and verify affected screens, routing, navigation, APIs and dependencies where applicable; record the integration commit and results. Mark Integrated only when verification succeeds. If combined checks fail, preserve the branch and merge history or candidate, record affected files and a reconciliation plan, and leave the task open. Mark Verified / Closed only after required acceptance and human confirmation. Never force-push, destructively reset, or remove an uncommitted/unintegrated worktree without explicit Captain approval. Keep task-created Docker test containers until Commander requests cleanup.
Local-only and platform notes
GitHub and Gitea are optional. Inspect the project's provider tooling and credentials; do not assume gh, a remote or PR support. For local-only Git, provide Captain the committed branch and exact review instructions, then wait for an acknowledged local review handoff before Ready for Review / Integration. Use Git argument forms that handle paths with spaces. Codex performs Git operations on both Linux and Windows; Commander needs no shell commands. On Windows, inspect the actual Codex CLI, Git, provider and Docker setup and run an end-to-end finalisation test before claiming production readiness. If commands must be shown, provide PowerShell and Bash variants.