Repository navigation
feat(bin): resolve delivery per task and add the no-mistakes-prod-only project policy - #1480
Closed
kunchenguid wants to merge 2 commits into
Closed
kunchenguid wants to merge 2 commits into
kunchenguid wants to merge 2 commits into
Conversation
…licy Project delivery mode and yolo were project-wide, and `fm-brief.sh` and `fm-spawn.sh` each resolved them from `data/projects.md` independently. A task that had to ship differently could only be steered by hand-editing its brief, while its recorded state kept the project default, so the later lifecycle followed a contract the worker was never given. Add `bin/fm-task-delivery.sh` as the single owner of one task's concrete delivery resolution, recorded once at intake in `state/<id>.delivery` and read unchanged by brief generation and dispatch. It accepts a task-specific captain instruction naming a concrete mode and yolo value, validates exact values, publishes the complete record through an exclusive link, and refuses malformed, partial, conflicting, duplicate, corrupted, symlinked, wrong-identity, scout-inapplicable, and secondmate-inapplicable input before any brief, task copy, home, endpoint, or metadata exists. Add `no-mistakes-prod-only` as a fourth registry policy for a remote-backed project: internal-only tooling, automation, contributor or operator process, and release or submission work ships direct-PR, while product-facing, mixed, and uncertain work runs the pipeline. It resolves per task from an explicit surface classification that firstmate makes at intake, never from file location or project name, and a ship task on such a project refuses until that classification exists. It is also the stated default for a newly added or created remote-backed project; existing registry entries keep the meaning they already have and are never migrated, and yolo stays off unless the captain says otherwise. Secondmate seeding preserves the policy verbatim and prepares the clone for the pipeline path it may take, batch dispatch resolves each task's own record, and teardown clears the record with the rest of the task's state.
…oject The generated definition of done is now shaped by the task's own resolution, so a brief that opens with "This project ships" can contradict the project's registered policy on a conditional project or under a task-specific instruction.
Owner
Author
|
Superseded by captain decision 2026-08-02 after design scout We are not continuing this PR. A fresh implementation will land the revised contract:
Salvage for the replacement: project-management skill prose and test scenarios only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Delivery mode and yolo were project-wide.
bin/fm-brief.shandbin/fm-spawn.sheach resolved them fromdata/projects.mdindependently, so a task that had to ship differently could only be steered by hand-editing its brief while its recorded state kept the project default, and the later lifecycle followed a contract the worker was never given.Reproduced first through the public interfaces in an isolated home: with a project registered at the legacy default, an adjusted brief said direct-PR while the dispatched task recorded
mode=no-mistakes yolo=off. Three separate layers: the intake selection was never recorded, the project-default lookup was split across two callers, and the durable task record is what teardown, local merges, and the fleet view consume.What this adds
bin/fm-task-delivery.shis the single owner of one task's concrete delivery resolution, recorded once at intake instate/<id>.deliveryand read unchanged by brief generation and dispatch:no-mistakes-prod-onlyis a fourth registry policy for a remote-backed project: internal-only tooling, automation, contributor or operator process, and release or submission work ships direct-PR, while product-facing, mixed, and uncertain work runs the pipeline. It resolves per task from firstmate's explicit classification, never from file location or project name, and a ship task on such a project refuses until that classification exists. It is also the stated default for a newly added or created remote-backed project, while existing entries keep the meaning they already have and are never migrated, and yolo stays off unless the captain says otherwise.Generic consumers follow: secondmate seeding preserves the policy verbatim and prepares the clone for the pipeline path it may take, batch dispatch resolves each task's own record, and teardown clears the record with the rest of the task's state.
Backward compatibility
An omitted task record resolves exactly as before, including
bin/fm-project-mode.sh's own warning and safe default for an unregistered project. A registry line with no bracket keeps its legacyno-mistakes offmeaning; the parser never reinterprets an existing record.Verification
tests/fm-task-delivery.test.sh(new): every mode and both yolo values, all three surface classifications, project-default fallback, brief-and-metadata agreement, refusals before any mutation, policy drift, scout and secondmate refusal, batch isolation, local-only containment, new-project default registration, and secondmate seeding.bin/fm-test-run.sh --changed --base origin/main: 58 suites, 1180 assertions, 0 failures.bin/fm-lint.shandbin/fm-doc-audience-check.shclean.One behavior change worth noting: a brief's definition of done now says "This task ships ...", because the mode is the task's resolution rather than the project's.