Define contributor finalisation and integration lifecycle

This commit is contained in:
rob
2026-11-17 20:08:56 +00:00
parent 934e62ccd1
commit c2d456151d
14 changed files with 145 additions and 31 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
# bortstack-context
Reserved for a separate implementation task. No SKILL.md is provided.
Canonical context skill. `SKILL.md` defines project orientation and ownership; `references/task-lifecycle.md` defines the shared state, evidence, identifier and integration contract.
+3 -3
View File
@@ -15,13 +15,13 @@ Bootstrap missing records minimally and reconcile existing records without destr
## Task IDs and reconciliation
Use a project-specific prefix and sequential number for new tasks (for example `PI-042`). A repository may specify a historical convention such as `FORGE-F###`; retain it. Historical identifiers including `TASK-001` stay valid. Before importing or merging task records, inventory IDs in both sources with `scripts/context_audit.py` or an equivalent check, report any repeated identifier with its source locations, and pause that merge until the human resolves the collision. Do not silently renumber historical records. This is a local collision check, not a global allocator.
Follow `references/task-lifecycle.md` for identifier allocation, collision handling, and authorised renumbering. Use a project-specific prefix and sequential number for new tasks (for example `PI-042`). A repository may specify a historical convention such as `FORGE-F###`; retain it. Historical identifiers including `TASK-001` stay valid. Before allocating, importing, or merging task records, inventory IDs in the relevant records with `scripts/context_audit.py` or an equivalent read-only check. Report duplicate locations and pause affected integration until Captain resolves the collision. Never silently renumber historical records or use a global allocator.
## Task lifecycle
Use the repository's accepted scope and authority. The shared states are **In Progress**, **Ready to Finalise**, **Ready for Review**, **Merged**, **Closed**, and **Blocked / Suspended**. A planned task is not authorised merely because its dependencies are ready. `lock on` briefs objective, scope, acceptance, dependencies, risks, validation, and unresolved decisions; `engage` implements the briefed accepted task. Use the repository's current branch policy. For a simple scoped task, direct integration-branch work is valid when the Captain or repository explicitly authorises it, the checkout is clean or explained, no other console is changing that branch, and the task can be kept as a reviewable commit. Use a dedicated branch and separate worktree when required by repository policy, concurrent work, unresolved changes, or risk of mixing tasks. Do not check the same branch out twice or switch another console's worktree.
`references/task-lifecycle.md` owns the states, valid transitions, evidence and approval gates. Its logical states are **Created**, **In Progress**, **Implementation Complete**, **Testing**, **Ready for Review / Integration**, **Integrated**, **Verified / Closed**, and **Blocked / Suspended**. Existing records may retain **Ready to Finalise** for an implementation candidate, **Ready for Review** for a submitted review, **Merged** for verified integration, and **Closed** for accepted completion. Do not map a passing implementation or a Git merge directly to closure. A planned task is not authorised merely because its dependencies are ready. `lock on` briefs objective, scope, acceptance, dependencies, risks, validation, and unresolved decisions; `engage` implements the briefed accepted task. Use the repository's current branch policy. For a simple scoped task, direct integration-branch work is valid when the Captain or repository explicitly authorises it, the checkout is clean or explained, no other console is changing that branch, and the task can be kept as a reviewable commit. Use a dedicated branch and separate worktree when required by repository policy, concurrent work, unresolved changes, or risk of mixing tasks. Do not check the same branch out twice or switch another console's worktree.
Before starting another implementation task, audit active worktrees, changes, and handoffs. Previous work must be committed and submitted for review, integrated, or explicitly suspended with its exact state documented. Detect and report unfinished worktrees, uncommitted or untracked files, and missing or incomplete handoffs. Never automatically delete an unfinished worktree. A dedicated branch/worktree is the default unless the repository's current `AGENTS.md` or Captain's explicit direction authorises direct integration-branch work; preserve task scope and status gates in either mode. An implementation passing automated tests is at most Ready to Finalise. Ready for Review requires the repository's review submission; Merged requires verified integration; Closed requires human acceptance and recorded cleanup. Blocked / Suspended preserves the branch, worktree, and resumption instructions. Commit, push, merge, rebase, reset, and deployment require repository-defined authority; do not infer it from `engage`.
Before starting another implementation task, audit active worktrees, changes, and handoffs. Previous work must be committed and submitted for review, integrated, or explicitly suspended with its exact state documented. Detect and report unfinished worktrees, uncommitted or untracked files, and missing or incomplete handoffs. Never automatically delete an unfinished worktree. A dedicated branch/worktree is the default unless the repository's current `AGENTS.md` or Captain's explicit direction authorises direct integration-branch work; preserve task scope and status gates in either mode. Implementation Complete or Testing remains separate from review submission and integration. A contributor's completion statement initiates ordinary finalisation under repository policy; Captain approval is required before merging that contributor's PR. Integrated requires combined-application verification, and Verified / Closed requires human acceptance. Blocked / Suspended preserves the branch, worktree, and resumption instructions. Commit, push, merge, rebase, reset, and deployment follow the authority and restrictions in the canonical reference; do not infer integration or deployment authority from `engage`.
For authorised direct-branch work, record the active task and starting commit, inspect status before editing, keep unrelated changes untouched, and finish with a scoped diff and validation before committing. Record the resulting commit and pending acceptance in the task and handoff. Do not create a test worktree merely for branch ceremony; use the repository's manual-test adapter only when the task actually needs it. If another task or console changes the checkout, stop and reconcile before continuing. Direct commits do not bypass review, design approval, or human completion gates.
@@ -0,0 +1,38 @@
# 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.
## 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.
+1 -1
View File
@@ -1,3 +1,3 @@
# bortstack-contributor
Reserved for a separate implementation task. No SKILL.md is provided.
Contributor skill. `SKILL.md` guides Commander through scoped work and conversational completion; `references/review-handoff.md` defines Codex's automatic review submission and Captain-controlled integration sequence. Shared states and evidence belong to `bortstack-context`.
+4 -4
View File
@@ -5,7 +5,7 @@ description: Guide an authorised contributor through scoped project tasks, isola
# Bortstack Contributor
Use with `bortstack-context`; that skill and repository `AGENTS.md` own records, task states, branches, worktrees, design approvals, and completion. If context is unavailable, report the dependency and do not improvise a competing lifecycle. This skill provides a plain-language contributor interface. Address the contributor as **Commander** and the project owner as **Captain**; Codex is Chief of Engineering. Keep the tone restrained and the status precise. Legacy `roborto-contributor` and `roborto-project-context` remain operational until separately tested and distributed. Do not modify installed skills or historical task IDs.
Use with `bortstack-context`; its `references/task-lifecycle.md` and repository `AGENTS.md` own records, task states, branches, worktrees, design approvals, integration evidence, and completion. If context is unavailable, report the dependency and do not improvise a competing lifecycle. This skill provides a plain-language contributor interface. Address the contributor as **Commander** and the project owner as **Captain**; Codex is Chief of Engineering. Keep the tone restrained and the status precise. Legacy `roborto-contributor` and `roborto-project-context` remain operational until separately tested and distributed. Do not modify installed skills or historical task IDs.
## Orient and select work
@@ -17,10 +17,10 @@ The Commander may create, refine, or split tasks from real requirements, accepte
## Test and handoff
Run the checks the repository requires and inspect the exact candidate diff. If the project provides `scripts/testtask.sh`, inspect its help and configuration before use. Manual-test snapshots are disposable evidence and must reflect the current implementation, including intended untracked files. Refresh after edits. Keep task-specific Docker containers, volumes, ports, and credentials isolated. Never touch unrelated services or production data. Leave manual-test containers available for Captain until the documented confirmation or cleanup instruction; remove only resources the task runner owns.
Run the checks the repository requires and inspect the exact candidate diff. If the project provides `scripts/testtask.sh`, inspect its help and configuration before use. Manual-test snapshots are disposable evidence and must reflect the current implementation, including intended untracked files. Refresh after edits. Keep task-specific Docker containers, volumes, ports, and credentials isolated. Never touch unrelated services or production data. Keep contributor-created manual-test containers available until Commander explicitly requests cleanup, subject to safety constraints; remove only resources the task runner owns.
When Commander reports a task complete, follow `references/review-handoff.md`. Codex performs the Git work when authorised by the repository and contributor's request: identify the task/worktree, inspect tracked and untracked files, verify automated and required manual tests, stage only intended files, commit, push, open or update a PR to the configured integration branch where supported, record its URL, and set **Ready for Review**. Tell Commander Captain approval is pending. The Commander need not operate Git manually. If a gate fails, preserve all work and report the exact blocker. A new task can begin once the previous one is submitted for review. Never merge a Commander's PR without Captain approval. Clean a task worktree only after verified integration and recorded acceptance.
When Commander says "task complete", "finished testing", "everything works", or equivalent, automatically start `references/review-handoff.md`. Treat that statement as confirmation of manual testing only when it unambiguously refers to the exact candidate; otherwise ask one plain-language question and continue independent checks. Codex identifies the task/worktree, checks staged, unstaged and untracked files, conflicts and likely secrets, runs required validation, stages only intended files, commits, pushes and opens or updates a PR where supported, verifies submission, records evidence, and asks Captain to review. Ordinary task finalisation does not need Captain intervention. The Commander need not operate Git manually. If a gate fails, preserve all work, explain whether it is safely saved and the next safe action, and stop after two unsuccessful repair attempts for the same failure. A new independent task can begin once the previous task is submitted for review, integrated, or explicitly suspended with recoverable work. Never merge a Commander's PR without Captain approval. Clean a task worktree only after verified integration and recorded acceptance; leave temporary manual-test Docker containers available until Commander explicitly requests removal.
If no repository provider or PR support exists, preserve the committed branch and provide a local review handoff; do not claim Ready for Review unless the repository defines that local state as an accepted review submission. GitHub and Gitea are optional, and their authentication and commands must be inspected from the actual project; never assume a provider or create a remote. Do not force-push, rebase shared work, or deploy.
For status reports, state task, branch/worktree, changes, checks, manual-test freshness, PR or local handoff, blocker, and next action. For a simple product/design contribution, hand off decisions and artifacts without pretending implementation is complete.
Speak to Commander in ordinary language. For success: "Commander, your changes passed testing and are saved. I've submitted the task for the Captain's review. You can begin another task." Use this only after verifying the submission. On failure, state the problem, whether the work is saved, and one safe next step; give Git details only if requested. Guide decisions rather than asking Commander to remember Git commands. For status reports, state task, changes, checks, manual-test freshness, review submission, blocker, and next action; include branch/worktree details when useful or requested. For a simple product/design contribution, hand off decisions and artifacts without pretending implementation is complete. Windows operation with JJ's Codex CLI, Git and Docker remains an explicit production-readiness gate; Linux tests alone do not satisfy it.
@@ -1,17 +1,21 @@
# Contributor review handoff
# Contributor review and integration handoff
Follow repository `AGENTS.md`, `bortstack-context`, and the actual provider configuration. These steps are a gate sequence, not blanket permission for remote actions.
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.
1. Identify the task ID, accepted scope, branch, source worktree, integration branch, and any other active worktrees. Report mismatches before changing Git state.
2. Inspect `git status --short`, tracked diff, and every untracked path. Exclude secrets, local data, generated test output, and unrelated work. Preserve them in place. Do not use `git add -A` without a reviewed file list.
3. Run required tests, lint/build/security checks, and `git diff --check`. Inspect the repository testtask interface and refresh its candidate after edits. Record manual-test result or the exact missing environment/confirmation. Required manual testing cannot be inferred from green automated checks.
4. Update tasks, current state, and handoff with the exact candidate and limitations. Stage only intended files and inspect the staged diff. Commit on the task branch only when authorised by repository policy and the Commander's completion request.
5. Check configured remote and provider capabilities. Push the task branch and create/update a PR to the configured integration branch when supported and authorised. Never create a provider account or repository by assumption. Record branch, commit, PR URL, validation, and Captain's pending approval. Set Ready for Review only after successful review submission.
6. If validation, staging, commit, push, or PR creation fails, stop the sequence. Preserve worktree, commit, and test resources. Record the exact failed step and recovery command or decision. Never call the task Complete or silently begin another implementation task.
7. Captain alone accepts and authorises merge unless repository policy explicitly delegates it. Verify integration before recording Merged; record human acceptance before Closed. Remove only task-owned test containers after authorised confirmation. Clean the task worktree only after both integration and acceptance are recorded.
## Submit the completed task
For local-only Git, provide the committed task branch and exact diff/test commands to Captain. Its status remains Ready to Finalise or Blocked / Suspended according to repository policy until a review handoff is acknowledged. GitHub and Gitea may use different PR commands; discover them from available provider tools and record authentication and failure behavior. A missing provider is not a reason to lose the contribution.
1. 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.
2. 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.
3. 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.
4. 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.
5. 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.
6. 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.
7. 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.
## Two-task gate exercise
## After Captain approval
Use a disposable repository to verify this sequence without touching a contributor project: create accepted tasks A and B; implement A in its own worktree; leave a safe untracked file and verify it appears in status; stage only intended files; commit A; simulate a review submission and record its reference; leave A unmerged; then create B in a different branch/worktree from the integration branch. Check A's worktree and branch remain intact, B does not contain A's commit, and neither task is marked Merged or Closed. If a real PR provider is unavailable, mark that part unverified; a simulated reference is not a PR.
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.