FORGE-F015 Add mission commands to context and contributor skills

This commit is contained in:
rob
2026-11-19 15:10:12 +00:00
parent 9dc4420373
commit 835a164418
9 changed files with 140 additions and 7 deletions
+8 -1
View File
@@ -1,6 +1,6 @@
---
name: bortstack-context
description: Manage project context, task lifecycle, isolated worktrees, design approvals, and safe handoffs in new or existing repositories.
description: Manage project context and mission commands for task lifecycle, worktrees, approvals, and safe handoffs in new or existing repositories.
---
# Bortstack Context
@@ -19,6 +19,13 @@ Follow `references/task-lifecycle.md` for identifier allocation, collision handl
## Task lifecycle
Use **mission** as the standard user-facing term for a development task. Read
`references/mission-commands.md` when selecting, briefing, engaging, reporting,
or completing missions; it defines `missions`, `mission status`, and the
`MISSION-ID action [options]` conversation grammar. Keep technical task IDs,
filenames, branch names, and historical records intact. The command interface
uses the lifecycle below; it does not create a second state system.
`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. 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`.
@@ -0,0 +1,111 @@
# Mission commands
This is the conversational interface to the existing task lifecycle in
`task-lifecycle.md`. Interpret commands with Codex's normal language
capabilities; no CLI or parser is required. **Mission** is the user-facing name
for a development task. Say mission ID, mission roster (`TASKS.md`), active
mission, mission briefing, mission worktree, mission awaiting Captain review,
and mission accomplished when the task is Verified / Closed. Preserve technical
terms in Git commands, filenames, repository records, API contracts, and
diagnostics. Never rename historical IDs, branches, `TASKS.md`, or task records.
## Selection and help
The form is `MISSION-ID action [options]`. Accept `set course`, `lock on`,
`engage`, `status`, `help`, and `complete`; `set course` and `lock on` are exact
aliases. Accept `set course direct`, `set course worktree`, and `set course auto`.
The default mode is auto. Accept `complete no-cleanup` and `complete review-only`.
Continue to understand existing natural language such as “lock on to PI-042,”
“engage task 042,” “finished testing,” and “everything works.” Interpret the
intent and role before acting; do not require exact command syntax.
- `missions`: read the mission roster and current repository evidence; show
available, active, blocked, and awaiting-Captain-review missions, with IDs
and the next action. Do not label an unsubmitted branch as awaiting review.
- `mission status`: show the selected mission, mode, actual lifecycle state,
branch/worktree or direct checkout, last validation, blocker, and next action.
If selection is unclear, ask which mission; do not select one by recency.
- `MISSION-ID status`: inspect that mission's current record and Git/provider
evidence; do not infer success from a status label alone.
- `MISSION-ID help`: explain the commands for that mission, permitted modes,
current state, and which role can submit, integrate, and close it.
Record selection and working mode in the existing task and handoff records,
not a second state store. Where the repository uses another context format,
record the same facts in its maintained equivalent. A selected mission is not
automatically In Progress.
## Set course / lock on
Find exactly one mission ID, including historical IDs. Read objective, scope,
non-goals, acceptance criteria, dependencies, decisions and blockers; inspect
the current branch, worktrees, uncommitted files, prior mission handoffs and
repository permissions. If the ID or authority is ambiguous, ask rather than
altering work. Select and record the authorised mode, then give a concise
briefing and the next command, `MISSION-ID engage`. Do not implement or create
a task worktree merely from selection.
`direct` uses the current authorised development/integration branch. Permit it
only when repository policy and the person's permissions allow it, the checkout
is suitable, and concurrent/unrelated work is protected. `worktree` means a
dedicated task branch and separate worktree under repository policy; reuse an
existing valid one and never check a branch out twice. `auto` applies repository
policy first, then Captain direction, contributor permissions, complexity,
concurrency, worktree state and file conflicts. Prefer direct for genuinely
small, low-risk Captain-authorised work where allowed; prefer isolation when
concurrent work, integration risk or uncertainty exists. Explicit direct never
overrides mandatory isolation or protected-branch rules. For Commander, select
the repository's safe contributor workflow, normally worktree, without making
them choose a technical mode. Explain a disallowed mode in plain language.
## Engage
`MISSION-ID engage` begins or resumes an authorised, briefed mission. Confirm
the selected ID and mode, accepted scope, required decisions/dependencies,
repository status, other unfinished missions, and the intended branch/worktree
before editing. Create or reuse only the worktree authorised by the selected
mode. Follow project instructions and approved design, preserve unrelated work,
validate the candidate, and keep state and handoff current. Isolated checks do
not establish integrated success. A direct request to implement without the
exact phrase can also authorise work under repository policy; preserve the same
preflight and gates.
## Complete
`MISSION-ID complete` starts finalisation for that exact mission. It is a
person's readiness signal, not a shortcut to Verified / Closed. Identify the
worktree and baseline; inspect staged, unstaged, untracked and temporary files;
check scope, likely secrets, acceptance criteria, automated and manual testing;
stage only intended changes; commit where authorised; record commits and
evidence; then apply the role's review or integration authority. Stop on a
failed gate, preserve recoverable work, and report the actual state. Never
claim mission accomplished solely because Git succeeded.
For a Captain-issued complete, the exact command can authorise routine
finalisation and integration into the designated development/integration branch
when the repository permits it and source, target, scope and checks are clear.
Inspect branch protection and unrelated changes first. Merge with the
repository's strategy, preserve history, run combined tests and affected
workflow checks, and record the integration commit. If the target is protected,
the source/target is ambiguous, a required gate fails, or repository policy
requires a separate approval, stop before that operation and present the
concrete candidate. A completed direct-branch change still needs combined
verification and human acceptance. Never infer permission to push, deploy,
force-push, reset, or bypass protection from `complete`.
For Commander-issued complete, follow `bortstack-contributor/references/review-handoff.md`:
verify the exact candidate, commit/push/submit review where authorised, and
report **mission awaiting Captain review** only after submission is verified.
It never authorises a contributor merge, deployment, or closure. Existing
natural completion language starts the same sequence.
`complete review-only` prepares and verifies the review handoff, stopping
before merge and closure even for Captain. `complete no-cleanup` performs the
otherwise authorised finalisation but retains eligible mission worktrees,
containers and temporary resources. Without that option, cleanup is still
limited to resources explicitly owned by the mission and eligible under
repository policy after verified integration and acceptance. Never delete a
dirty/unintegrated worktree, persistent data, or unrelated resources. Retain
contributor-created manual-test containers until Commander explicitly asks for
their removal, including after mission completion. Record what was retained or
removed and the actual final state.
@@ -2,6 +2,10 @@
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 |
+4 -4
View File
@@ -1,6 +1,6 @@
---
name: bortstack-contributor
description: Guide an authorised contributor through scoped project tasks, isolated implementation, validation, and review handoff under Bortstack Context.
description: Guide an authorised contributor through mission briefing, scoped implementation, validation, and Captain review handoff under Bortstack Context.
---
# Bortstack Contributor
@@ -13,14 +13,14 @@ Read the repository's `AGENTS.md` and maintained context files, inspect Git stat
The Commander may create, refine, or split tasks from real requirements, accepted design decisions, or verified issues. Check for duplicates, define scope, non-goals, acceptance, dependencies, and status; task creation does not authorise implementation. The Commander may make in-scope product and visual decisions. Escalate security/auth, broad database architecture, privacy/legal, commercial commitments, destructive data changes, and production operations to Captain. Profile does not imply ownership or contributor permission; read the project's explicit permissions.
`lock on` briefs the task and risks without implementation. `engage` implements a briefed, accepted task in its dedicated branch and separate worktree. A read-only design contribution need not create a worktree; file changes do. A design-dependent implementation needs an approved design or recorded explicit override under context. Use the smallest relevant specialist skill for UI design, feature work, debugging, or visual QA.
Use **mission** in user-facing conversation; preserve technical task IDs, filenames and historical records. Read `bortstack-context/references/mission-commands.md` for `missions`, `mission status`, and `MISSION-ID action [options]`. `set course` and `lock on` both select and brief without implementation; record the selected mission and mode, then invite `MISSION-ID engage`. Default to the repository's safe contributor worktree mode without asking Commander to choose Git mechanics. If Commander requests direct work without authority, explain the permitted route. `engage` implements a briefed, accepted mission in its authorised worktree. A read-only design contribution need not create a worktree; file changes do. A design-dependent implementation needs an approved design or recorded explicit override under context. Use the smallest relevant specialist skill for UI design, feature work, debugging, or visual QA.
## 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. 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 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.
When Commander says `MISSION-ID complete`, "task complete", "finished testing", "everything works", or equivalent, automatically start `references/review-handoff.md`. `complete review-only` still prepares review without merge; `complete no-cleanup` retains eligible temporary resources. Treat a completion 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 mission/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 mission 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 mission can begin once the previous one is submitted for review, integrated, or explicitly suspended with recoverable work. Never merge a Commander's PR without Captain approval. Clean a mission 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.
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.
Speak to Commander in ordinary language. For success: "Commander, your changes passed testing and are saved. Your mission is awaiting Captain review. You can begin another independent mission." 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 mission ID, 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,6 +1,6 @@
# 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.
Use `bortstack-context/references/task-lifecycle.md` for states, evidence and approval gates, and `bortstack-context/references/mission-commands.md` for conversational commands. Follow repository `AGENTS.md` and actual provider configuration. This sequence starts automatically when Commander reports mission completion, including `MISSION-ID complete` or familiar natural language. If the mission is unclear, ask which one before staging or committing. `complete review-only` stops before integration and closure; `complete no-cleanup` retains eligible resources. Contributor finalisation is not authority for merge, deployment, destructive recovery or test-resource cleanup.
## Submit the completed task
@@ -10,7 +10,7 @@ Use `bortstack-context/references/task-lifecycle.md` for states, evidence and ap
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.
7. Tell Commander in ordinary language that the work is saved and the mission is awaiting Captain review, and that another independent mission 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