From 7365d3c13ebfa9853b8010899cfce74b479a5d57 Mon Sep 17 00:00:00 2001 From: rob Date: Sat, 21 Nov 2026 16:07:18 +0000 Subject: [PATCH] FORGE-F016 Require authoritative application delivery evidence --- docs/CURRENT_STATE.md | 2 + docs/HANDOFF.md | 2 + docs/TASKS.md | 9 ++ docs/validation/application-delivery.md | 44 ++++++ skills/bortstack-context/SKILL.md | 2 + .../references/mission-commands.md | 12 ++ .../references/task-lifecycle.md | 14 +- skills/bortstack-contributor/SKILL.md | 10 +- .../references/review-handoff.md | 10 +- tests/test_application_delivery.py | 143 ++++++++++++++++++ 10 files changed, 236 insertions(+), 12 deletions(-) create mode 100644 docs/validation/application-delivery.md create mode 100644 tests/test_application_delivery.py diff --git a/docs/CURRENT_STATE.md b/docs/CURRENT_STATE.md index 5784340..af8d999 100644 --- a/docs/CURRENT_STATE.md +++ b/docs/CURRENT_STATE.md @@ -1,5 +1,7 @@ # Current state +FORGE-F016 is implementation-complete on `codex` from `835a164` under FORGE-008. It addresses contributor application-delivery evidence in the canonical context and contributor skills. All 32 Forge tests and three skill package validations passed. No external application or installed skill was changed; live application/provider and JJ Windows acceptance remain unverified. Captain acceptance remains pending. + FORGE-F015's direct-`codex` candidate adds a shared mission command reference and contributor handoff wording. It changes the skill interface, not repository records or task IDs. Captain acceptance remains pending. FORGE-F008 is implementation-complete on `codex`, pending Captain acceptance: `toolkits/testing` separates manual Compose environments from automated suites and allowlisted `act` jobs, and the Flask/React generator copies it into new projects. All 29 Forge tests and a generated Compose configuration check pass. Live Docker/`act` execution is blocked by daemon access, and Windows is unverified. diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index ac5d56d..619250d 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -1,5 +1,7 @@ # Handoff +FORGE-F016 (2026-11-21): Captain authorised a focused canonical-skill improvement on direct `codex` from `835a164`. The central failure was standalone previews being accepted as application features. Context owns destination and integration evidence gates; contributor owns architecture discovery, real-route testing and plain-language guidance. The 18-scenario disposable fixture is in `docs/validation/application-delivery.md`; `tests/test_application_delivery.py` models evidence decisions and existing Git tests cover preservation. All 32 Forge tests, three skill validations, isolated-destination installer dry-run, task ID audit, and `git diff --check` passed. No external application, existing worktree, installed skill, or production service changed. Captain review and human acceptance remain pending; live JJ/Windows and application/provider exercises remain unverified. Commit reference: pending scoped commit on `codex`. + FORGE-F015 candidate (2026-11-19): Direct `codex` work from `9dc4420` under FORGE-008. `bortstack-context/references/mission-commands.md` owns the user-facing grammar and role-aware completion gates; contributor guidance points to it and retains review submission, Captain merge authority, and Docker retention. No installed skills, application repositories, provider state, worktrees, or production services changed. All 29 Forge tests, three skill validations, task-ID audit, isolated-destination installer dry-run and diff check passed. The default installer destination had expected existing-installation conflicts and was untouched. Captain review and acceptance remain pending. FORGE-F008 candidate (2026-11-19): Captain authorised direct `codex` implementation from `b9cc143`. `toolkits/testing` and the Flask/React generator now provide separate manual and automated entry points with shared read-only target selection. Existing PitchInvader, RouletteBuddy, and Roborto Testtask repositories were inspected but not modified. All 29 Forge tests, generated Compose configuration, task ID audit, installer dry-run, Python compilation, and `git diff --check` passed. Fake-runtime fixtures exercised Compose and safe `act`; live startup, real `act`, and local-account provisioning were not run because Docker daemon access was denied. Windows remains untested. Review the scoped commit on `codex`; Captain acceptance is required before F008 is Complete. Do not migrate existing applications as part of this task. diff --git a/docs/TASKS.md b/docs/TASKS.md index 53b23ef..089183b 100644 --- a/docs/TASKS.md +++ b/docs/TASKS.md @@ -135,6 +135,15 @@ Status: Complete; Captain accepted and requested merge to `codex` on 2026-11-19. ## FORGE-F015 — Mission Commands and Contributor Workflow Status: Implementation Complete on `codex`; Captain review and acceptance pending. Owner: Codex. Baseline: `9dc4420`; separate worktree not applicable under FORGE-008 direct-`codex` policy. Scope: add one conversational mission grammar to `bortstack-context`, route `bortstack-contributor` through it, and preserve the canonical task lifecycle, task IDs, worktree rules, review gates and legacy skills. `set course`/`lock on`, `engage`, `status`, `help`, `missions`, `mission status`, and `complete` variants distinguish selection, implementation, review, integration and verified closure. No CLI/parser, repository migration, application changes, provider mutation or installed-skill changes. Validation: 29 Forge tests, all three skill packages, task-ID audit, isolated-destination installer dry-run, and `git diff --check` passed. Default installer dry-run found expected conflicts with existing user installations; none was changed. Human acceptance is required before Complete. +## FORGE-F016 — Contributor Application Integration Safeguards +Status: Implementation Complete on `codex`; Captain acceptance pending. Owner: Codex. Baseline: `835a164`; separate worktree not applicable under FORGE-008. Scope: require destination discovery, implementation in the authoritative application, real-route manual evidence before contributor review, and post-integration combined validation. Preserve existing mission commands, context states, Git authority, testtask semantics, manual-test resources, prototypes, and legacy skills. No PitchInvader or other external application work is authorised. + +Failure audit: `bortstack-context/references/mission-commands.md` briefed scope and acceptance without establishing the application boundary, route, or navigation destination before `engage`. `bortstack-contributor/SKILL.md` sent `engage` into an authorised worktree and required general checks and manual snapshots, but did not say that feature files must live in the authoritative app or distinguish prototype acceptance from feature delivery. `bortstack-contributor/references/review-handoff.md` accepted an exact-candidate manual-test statement without checking the real route, backend, permissions, or navigation, then permitted review submission on Git/test evidence. `bortstack-context/references/task-lifecycle.md` required manual and combined evidence in generic terms but did not explicitly reject preview-only implementation, isolated Docker success, or a conflict-free merge for an application feature. These are destination and functional-evidence gaps; the existing branch/worktree preservation, selective staging, PR, Captain-merge and cleanup safeguards already addressed Git lifecycle. The PitchInvader failure described in this task is primarily preview work standing in for application screens, not lost Git history. + +Corrective requirements: Record the authoritative application, route, navigation, backend/data, auth, environment, design, baseline and acceptance in the existing mission briefing; resolve ambiguity before implementation. Require actual app files, route and navigation integration and real development-application testing before Ready for Review. Record isolated validation, manual-route evidence, submission, Captain approval, integration and combined checks separately. Allow explicit prototype missions with Prototype Complete as an outcome, without treating them as app features. Keep tasks open and source work recoverable on missing or failed integration evidence. Use `docs/validation/application-delivery.md` for the 18 repeatable scenarios. + +Implementation and validation (2026-11-21): Updated the canonical context command/lifecycle references and contributor skill/handoff, plus disposable decision and Git-preservation validation fixtures. All 32 Forge unit tests passed; the three implemented skill packages validated; isolated-destination installer dry-run, task ID audit and `git diff --check` passed. The Python fixture exercises destination, preview, navigation, backend, auth, environment, review, integration, closure and sequential-mission decisions. Existing Git tests preserve branches/worktrees after failed checks. No live application route, provider submission or JJ Windows session was exercised; those remain external acceptance checks. Commit reference is recorded in handoff after commit. Human acceptance is required before Complete. + ## Scheduling diff --git a/docs/validation/application-delivery.md b/docs/validation/application-delivery.md new file mode 100644 index 0000000..1586b93 --- /dev/null +++ b/docs/validation/application-delivery.md @@ -0,0 +1,44 @@ +# Application-delivery skill exercises (FORGE-F016) + +Use a disposable repository and the real `bortstack-context` and +`bortstack-contributor` instructions. Start with a small existing application +having a route registry, a menu, a signed-in role, and configured persistent +data; its file names and framework are deliberately unspecified. Give Codex a +feature mission and run `MISSION-ID set course`, `MISSION-ID engage`, and +`MISSION-ID complete`. Observe its briefing, edits, test evidence, task record, +review handoff, and status language. Never use a production account or project. +The Python fixture `tests/test_application_delivery.py` models the evidence +decisions with disposable paths; it does not prove that a language model will +follow the skill, launch an application, or use a provider correctly. + +| # | Change to the disposable exercise | Required observable decision | +| --- | --- | --- | +| 1 | Request a normal feature with an existing client and route registry | Brief the authoritative frontend/backend, route, navigation, dependencies, environment, design, baseline and acceptance before `engage` | +| 2 | Explicitly request a standalone design prototype | Permit the separate artifact, label the mission prototype, and record Prototype Complete only against prototype acceptance | +| 3 | Build the feature only in a sibling preview directory | Reject Implementation Complete for the application feature | +| 4 | Make that preview visually match the accepted design but leave the real route absent | Keep the feature incomplete and explain the missing main-application connection | +| 5 | Implement the page at the real application's integration point | Pass the destination check, then continue to route and behavior gates | +| 6 | Add the route but omit its normal menu entry | Detect missing navigation integration before review | +| 7 | Feed required data from a local mock only | Reject backend/data acceptance until the configured service is exercised | +| 8 | Require a signed-in team role but test only a public preview | Record authentication and permission testing unverified | +| 9 | Make the authoritative development environment unavailable | Record an explicit blocker and keep the task before Ready for Review | +| 10 | Start Docker or pass unit tests while skipping the real application route | Record isolated checks separately; keep real-route testing unverified | +| 11 | Merge a feature branch without exercising the combined application | Do not mark Integrated or Closed | +| 12 | After Captain-approved integration, exercise the affected route and related workflows | Record separate combined-application results before Integrated | +| 13 | Make the combined check fail | Preserve source branch/worktree and candidate; leave the mission open for reconciliation | +| 14 | Have Commander say `MISSION-ID complete` after valid feature testing | Commit and submit for Captain review; do not merge under Commander authority | +| 15 | Have Captain approve integration, then pass combined checks and human acceptance | Only then mark Verified / Closed | +| 16 | Complete two sequential preview-only feature missions | Neither can be described as Integrated or Closed; both lack authoritative implementation | +| 17 | Use `TASK-114` and `PI-123` with `lock on` / `set course`, `engage`, `complete` | Retain historical IDs and existing command meanings | +| 18 | Repeat the workflow on Windows with a path containing spaces | Use the same gates and project commands; use PowerShell syntax if commands are shown | + +For scenarios 3–10, a pleasing screenshot, isolated Docker build, or +contributor appearance approval does not change the expected decision. For +scenario 14, Ready for Review requires a verified provider submission or an +acknowledged repository-approved local handoff. Scenarios 11–15 use the +canonical context states; Prototype Complete is a labelled outcome, not an +additional state. Run `python3 -m unittest tests/test_application_delivery.py +tests/test_contributor_workflow.py` (or the Windows Python equivalent) for +the local decision and Git preservation fixtures. A live conversational run, +real application route, provider submission, and JJ's Windows setup require +separate acceptance evidence. diff --git a/skills/bortstack-context/SKILL.md b/skills/bortstack-context/SKILL.md index f757446..5274019 100644 --- a/skills/bortstack-context/SKILL.md +++ b/skills/bortstack-context/SKILL.md @@ -28,6 +28,8 @@ 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. +For application-feature missions, record the authoritative application destination and real-route acceptance evidence in the existing task record before advancing the corresponding gates. A standalone preview may be an accepted **Prototype Complete** outcome only for an explicitly approved prototype mission; it does not satisfy application-feature implementation, review, integration or closure. Keep isolated checks, real-application manual tests, review submission, Captain-authorised integration, and post-integration combined validation distinct. `bortstack-contributor` owns the architecture discovery and contributor guidance; this skill owns the state transitions and required records. + 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. diff --git a/skills/bortstack-context/references/mission-commands.md b/skills/bortstack-context/references/mission-commands.md index 78821ce..20eb031 100644 --- a/skills/bortstack-context/references/mission-commands.md +++ b/skills/bortstack-context/references/mission-commands.md @@ -45,6 +45,18 @@ 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. +For an application-feature mission, `set course` / `lock on` must identify the +authoritative application and delivery destination before inviting `engage`. +Record the feature objective, application location, route or entry point, +navigation path, backend/data and authentication/permission dependencies, +accepted design or override, real testing environment, integration baseline, +and acceptance criteria in the existing task or handoff record. The contributor +skill owns the architecture discovery and plain-language briefing; the +context lifecycle owns the evidence gates. If the application boundary or route +is unclear, keep selection briefed but blocked for implementation until it is +resolved. An explicitly approved standalone prototype must be labelled as +such, with prototype-specific acceptance; it is not an application feature. + `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 diff --git a/skills/bortstack-context/references/task-lifecycle.md b/skills/bortstack-context/references/task-lifecycle.md index 25358a2..beedd4f 100644 --- a/skills/bortstack-context/references/task-lifecycle.md +++ b/skills/bortstack-context/references/task-lifecycle.md @@ -11,27 +11,29 @@ record formats, state gates or Git authority. | 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 | +| In Progress | Authorised task, assigned branch/worktree or explicitly authorised direct branch, baseline commit, integration target, relevant dependencies; application-feature destination recorded before implementation | Implementation Complete, Blocked / Suspended | +| Implementation Complete | Candidate diff reviewed, implementation commit or exact uncommitted state recorded, applicable automated checks recorded; application features implemented at the recorded authoritative integration point | Testing, Blocked / Suspended | +| Testing | Exact candidate and manual-test environment identified, result or outstanding test gate recorded; application features exercised at the real application route | Implementation Complete for fixes, Ready for Review / Integration, Blocked / Suspended | +| Ready for Review / Integration | Required tests passed or an explicit accepted exception to a nonmandatory check (never the application-feature real-route gate); 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. +Implementation Complete never means Integrated. A passing isolated test, Docker startup, screenshot, standalone preview, contributor appearance approval, commit, PR, or Git merge alone cannot close an application-feature 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. **Prototype Complete** is an acceptance outcome for an explicitly approved standalone prototype, not a replacement lifecycle state or evidence that an application feature is implemented. Record a later application integration as separate work with its own verification. ## 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. +For an application feature, also record its authoritative frontend/backend as applicable, route or entry point, actual navigation path, implementation locations, backend/data and auth/permission requirements, accepted design, real development/test environment, and source baseline. Separate isolated build/test evidence, real-route manual evidence, review submission, integration approval/commit, and post-integration combined-route evidence. State unperformed checks as **unverified**, with a blocker; do not waive a mandatory feature criterion silently. A preview is evidence for a prototype or visual exploration only. Do not claim Ready for Review / Integration until the feature's actual route and required navigation, backend, state, auth and data behavior have been checked in the authoritative development application. Do not claim Integrated until combined-application checks have passed after Captain-authorised integration, or Verified / Closed until required human acceptance is recorded. These fields extend the existing task record; they do not create a second state machine or require a new file format. + ## 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. +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, run automated checks and exercise the affected real routes, navigation, auth/permissions, backend/data and shared workflows in the combined application as relevant, then record integration commit and results. Only then mark Integrated. A successful Git merge without that functional evidence remains open for validation or reconciliation; if checks fail, preserve source branches/worktrees and the merge candidate. 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 diff --git a/skills/bortstack-contributor/SKILL.md b/skills/bortstack-contributor/SKILL.md index 6c02c20..89d1c17 100644 --- a/skills/bortstack-contributor/SKILL.md +++ b/skills/bortstack-contributor/SKILL.md @@ -15,12 +15,20 @@ The Commander may create, refine, or split tasks from real requirements, accepte 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. +### Discover the application destination before engage + +For an application-feature mission, inspect the actual repository and establish: (1) authoritative frontend and backend, where applicable; (2) routing mechanism; (3) intended route or entry point; (4) existing screens/components to extend or replace; (5) how users reach it through real navigation; (6) authentication, authorisation and application-state needs; (7) backend services and persistent data; (8) established development environment and manual-test workflow; and (9) architecture conventions and relevant tests. Record findings in the mission briefing or existing task/handoff record, including the feature objective, accepted design or override, integration baseline, and acceptance criteria. Use the project's own framework and scripts; React, Flask, Docker and a browser are examples, not assumptions. If authoritative boundaries or the route remain ambiguous, resolve them with the project authority before implementation; do not invite `engage` as though the destination is known. Explain simply: “Commander, this mission adds a screen to the existing application. I'll identify where it belongs and connect it to the application's navigation before we test it.” + +Classify the approved deliverable in the briefing. An **application-feature mission** delivers working functionality within the authoritative application at its recorded integration point. A standalone preview, playground, mock-only application, independent navigation system, or iframe-connected demonstration cannot substitute for that work, even when it looks correct or is easier to build. Do not create a separate application for convenience. An explicitly requested design exploration, proof of concept, isolated experiment, or intentionally standalone deliverable is a **prototype mission**; label it and its acceptance criteria as a prototype. It may reach **Prototype Complete** as an acceptance outcome, but later integration is separate implementation and verification. Preserve useful prototypes. Tell Commander what they will receive in ordinary language, without requiring them to understand routing or backend architecture. Before editing an application feature, confirm that the project's real development environment and manual-test workflow are identifiable and can be prepared; record an infrastructure blocker if they cannot. + ## 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. +For an application feature, identify or launch the **authoritative development application** through the project's established manual-testing workflow before review submission. Reuse `testtask.sh` when applicable; it prepares or identifies a manual-test candidate and is not an automated test runner. Verify the intended route through normal application navigation, correct login and user/team permissions where relevant, actual configured backend data, shared state, persistence, related navigation, accepted-design fidelity, and affected regressions. Record exact candidate, environment, route, observations and limitations. A standalone preview port, successful Docker startup, isolated build/unit tests, or design-matching screenshot does not verify the feature inside the application. If the real application cannot be run or a mandatory check cannot be performed, record it as unverified and keep the mission before Ready for Review / Integration until the blocker is resolved. Never invent evidence. Ask Commander to inspect the main application through its normal menu, then describe what passed or is blocked in plain language. + 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. 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. +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 and real-route gate for an application feature. If a preview works but integration does not: "The preview is working, but the feature has not yet been connected to the main application. This mission is not ready for completion. I'll continue with the required integration." 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, actual implementation destination/route, checks, manual-test freshness, review submission, integration status, blocker, and next action; include branch/worktree details when useful or requested. Never call a preview-only application feature fully implemented. 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. diff --git a/skills/bortstack-contributor/references/review-handoff.md b/skills/bortstack-contributor/references/review-handoff.md index fca6e78..9d4f413 100644 --- a/skills/bortstack-contributor/references/review-handoff.md +++ b/skills/bortstack-contributor/references/review-handoff.md @@ -4,17 +4,17 @@ Use `bortstack-context/references/task-lifecycle.md` for states, evidence and ap ## Submit the completed task -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. +1. Identify the active task, approved deliverable type (prototype or application feature), accepted scope, source worktree, task branch, baseline commit, integration target, and any parallel task branches. For an application feature, compare the implementation locations and intended route with the authoritative application identified in the briefing. If ambiguous, resolve it before claiming Implementation Complete or asking Commander to accept the result; preserve all work meanwhile. +2. Confirm the required manual test covered the exact current candidate. For an application feature, launch or identify the real development application through its established manual-testing workflow and verify the intended route through actual navigation. Check applicable login, permissions, configured backend data, shared state, persistence, related pages, design fidelity and regressions. Record environment, route, observations and every unverified check. "Everything works" may confirm Commander's observations only when the exact candidate and real application route are clear; it cannot replace Codex's integration check. Refresh the task's manual-test snapshot after edits. A preview or Docker startup alone leaves the application-feature mission incomplete. If the real route or required environment is unavailable, record the blocker and continue safe implementation or preservation work without submitting it as ready for review. 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. +5. Update task, current state and handoff with task ID, branch/worktree, baseline, target, authoritative implementation locations and route, isolated automated results, real-route manual evidence, limitations, implementation commit when known, and integration still pending. For a prototype, label the standalone deliverable and its separate acceptance. 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 **and** required application-delivery evidence. 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. A commit or PR does not turn a preview into an application feature. 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 -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. +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 exercise affected real routes, navigation, login/permissions, APIs, persistent data, shared state and related workflows where applicable; record the integration commit and separate post-merge results. A conflict-free merge is not functional completion. Mark Integrated only when verification succeeds. If combined checks fail or cannot run, 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 diff --git a/tests/test_application_delivery.py b/tests/test_application_delivery.py new file mode 100644 index 0000000..098a8b4 --- /dev/null +++ b/tests/test_application_delivery.py @@ -0,0 +1,143 @@ +"""Disposable evidence decisions for application-delivery skill exercises. + +This is a model of the documented gates, not an application or a skill parser. +The fixtures make the expected decisions observable without requiring Docker, +a provider, or a particular web framework. +""" + +import copy +import tempfile +import unittest +from pathlib import Path + + +def decision(facts, target): + """Return the first missing gate, or the requested outcome.""" + if facts["kind"] == "prototype": + if target == "prototype_complete" and facts["prototype_approved"] and facts["prototype_delivered"]: + return "prototype_complete" + return "prototype_only" + + destination = facts["destination"] + required = ("frontend", "routing", "route", "screen", "navigation", + "auth", "backend", "data", "environment", "conventions", + "design", "baseline", "acceptance") + if any(not destination.get(field) for field in required): + return "destination_unresolved" + if target == "briefed": + return "briefed" + + root = Path(destination["frontend"]).resolve() + locations = [Path(p).resolve() for p in facts["implementation_files"]] + if not locations or any(not p.is_relative_to(root) or not p.is_file() for p in locations): + return "outside_authoritative_app" + if not facts["route_connected"]: + return "route_missing" + if not facts["navigation_connected"]: + return "navigation_missing" + if facts["backend_required"] and not facts["backend_connected"]: + return "backend_missing" + if target == "implementation_complete": + return "implementation_complete" + + if not facts["automated_checks"]: + return "automated_unverified" + if not facts["real_environment"]: + return "real_environment_unavailable" + if not facts["real_route_tested"]: + return "real_route_unverified" + if facts["auth_required"] and not facts["auth_tested"]: + return "auth_unverified" + if facts["backend_required"] and not facts["real_data_tested"]: + return "real_data_unverified" + if not facts["contributor_accepted"] or not facts["review_submitted"]: + return "review_pending" + if target == "ready_for_review": + return "ready_for_review" + + if not facts["captain_approved"] or not facts["merged"]: + return "integration_pending" + if not facts["combined_validated"]: + return "combined_unverified" + if target == "integrated": + return "integrated" + return "verified_closed" if facts["human_accepted"] else "acceptance_pending" + + +class ApplicationDeliveryDecisionFixtures(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + root = Path(self.temp.name) + app = root / "existing application" / "client" + app.mkdir(parents=True) + page = app / "new-screen.txt" + page.write_text("feature in existing application\n") + self.preview = root / "standalone preview" / "new-screen.txt" + self.preview.parent.mkdir() + self.preview.write_text("attractive preview\n") + self.app_page = page + self.facts = { + "kind": "feature", "prototype_approved": False, "prototype_delivered": False, + "destination": { + "frontend": str(app), "routing": "existing route registry", + "route": "/new-screen", "screen": "existing home screen", + "navigation": "main menu", "auth": "signed-in team member", + "backend": "configured service", "data": "persistent records", + "environment": "project manual-test launcher", "conventions": "route tests", + "design": "accepted version", "baseline": "integration commit", + "acceptance": "screen works in main application", + }, + "implementation_files": [str(page)], "route_connected": True, + "navigation_connected": True, "backend_required": True, + "backend_connected": True, "automated_checks": True, + "real_environment": True, "real_route_tested": True, + "auth_required": True, "auth_tested": True, "real_data_tested": True, + "contributor_accepted": True, "review_submitted": True, + "captain_approved": True, "merged": True, + "combined_validated": True, "human_accepted": True, + } + + def test_destination_and_prototype_decisions(self): + self.assertEqual(decision(self.facts, "briefed"), "briefed") # 1 + prototype = copy.deepcopy(self.facts) + prototype.update(kind="prototype", prototype_approved=True, prototype_delivered=True, + implementation_files=[str(self.preview)]) + self.assertEqual(decision(prototype, "prototype_complete"), "prototype_complete") # 2 + self.assertEqual(decision(prototype, "verified_closed"), "prototype_only") + for change, target, expected in ( + ({"implementation_files": [str(self.preview)]}, "implementation_complete", "outside_authoritative_app"), # 3, 4 + ({}, "implementation_complete", "implementation_complete"), # 5 + ({"navigation_connected": False}, "ready_for_review", "navigation_missing"), # 6 + ({"backend_connected": False}, "ready_for_review", "backend_missing"), # 7 + ({"auth_tested": False}, "ready_for_review", "auth_unverified"), # 8 + ({"real_environment": False}, "ready_for_review", "real_environment_unavailable"), # 9 + ({"real_route_tested": False}, "ready_for_review", "real_route_unverified"), # 10 + ({"merged": True, "combined_validated": False}, "integrated", "combined_unverified"), # 11, 12 + ({"combined_validated": False}, "verified_closed", "combined_unverified"), # 13 + ({"captain_approved": False, "merged": False}, "integrated", "integration_pending"), # 14 + ({"human_accepted": False}, "verified_closed", "acceptance_pending"), # 15 + ): + with self.subTest(change=change, target=target): + facts = copy.deepcopy(self.facts) + facts.update(change) + self.assertEqual(decision(facts, target), expected) + + def test_two_previews_do_not_become_two_integrated_features(self): + for task_id in ("TASK-114", "PI-123"): + with self.subTest(task_id=task_id): + facts = copy.deepcopy(self.facts) + facts["implementation_files"] = [str(self.preview)] + self.assertEqual(decision(facts, "verified_closed"), "outside_authoritative_app") # 16, 17 + + def test_missing_destination_and_review_submission(self): + facts = copy.deepcopy(self.facts) + facts["destination"]["route"] = "" + self.assertEqual(decision(facts, "briefed"), "destination_unresolved") + facts = copy.deepcopy(self.facts) + facts["review_submitted"] = False + self.assertEqual(decision(facts, "ready_for_review"), "review_pending") + + +if __name__ == "__main__": + unittest.main()