fix: prefill verification criteria in Firstmate ship briefs - #206
Merged
Merged
Conversation
…o ship briefs Firstmate-repo briefs asked for a local full suite, contradicting .no-mistakes.yaml where ci.yml owns broad regression. The scaffold now appends reserved AC99 with targeted local tests, lint, and PR CI evidence when the repo argument resolves to this repository.
…horitative documentation pointers
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.
Intent
Make
bin/fm-brief.shpre-fill the correct verification criterion for ship briefs that target the Firstmate repository itself. Today the scaffold leaves- AC1: {ACCEPTANCE CRITERION}free-form, and two Firstmate-repo briefs on 2026-10-05 asked for "full suite green". That contradicts.no-mistakes.yaml(lines ~31-35:ci.ymlowns broad regression; local runs are intent-targeted). The result was hours of serial local full-suite runs on a loaded host and a mid-run reinterpretation of AC3. Change: when the target project is this Firstmate repository (detect it the way the scaffold already distinguishes projects), add one standard criterion after the task's own criteria, worded like: "AC: changed tests green viabin/fm-test-run.sh --changed,FM_LINT_JOBS=1 bin/fm-lint.shclean, and the PR's full GitHub CI suite green, recorded as an evidence line with the CI run URL and head before reporting PR-ready". Its id must not collide with the brief's own criteria and must stay parseable bybin/fm-receipt-check.sh. Briefs for other projects stay unchanged. Load the firstmate-coding-guidelines skill before editing shared tracked material. Run lint withFM_LINT_JOBS=1(host memory is constrained).Acceptance criteria:
bin/fm-receipt-check.shparses it as a criterion; a non-Firstmate ship scaffold does not contain it. Prove both with a regression test intests/that fails on the parent commit..no-mistakes.yamltest policy, with no local full-suite requirement; the docs or help that own the scaffold contract are updated.bin/fm-test-run.sh --changed,FM_LINT_JOBS=1 bin/fm-lint.shclean, and the PR's full GitHub CI suite green, recorded as an evidence line with the CI run URL and head.Implementation decisions made deliberately:
projects/<name>resolves under FM_HOME. A bare project name that is not a directory gets the plain scaffold. This is a best-effort convenience, not a safety gate, so the existing --herdr-lab explicit-flag safety contract is kept unchanged..github/workflows/ci.ymlowns broad regression. For--mode local-onlydelivery (no PR, no CI) the CI clause is dropped and evidence binds to the branch head before reporting ready in branch.bin/fm-test-run.sh --changedon this loaded host showed 8 failing scripts unrelated to fm-brief (7 fail identically on parent 1350717; fm-hermes-harness failed once under load and passed on isolated rerun); PR GitHub CI is the authoritative broad regression signal.Firstmate-Validation-Generation: 34a51385f8abca38f809168b4990c614
What Changed
Risk Assessment
✅ Low: Captain, the change is bounded, matches the amended requirements, and introduces no substantiated correctness or scope issues.
Testing
The focused regression and live CLI checks passed, including detection boundaries, delivery wording, criterion parsing, and parent failure reproduction. CLI transcripts and generated briefs were preserved; disposable setup was removed. No lint, static analysis, or full suite ran.
Evidence: Live scaffold and receipt-parser transcript
Evidence: Generated Firstmate PR brief
~/.no-mistakes/evidence/01M45W8PP4XV4YSSJ69JH301E7/live-local-brief.md)Evidence: Parent commit rejects required AC99
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed (2) ✅
bin/fm-brief.sh:481- AC99 creates a circular dependency for fresh Firstmate tasks in both no-mistakes and direct-PR modes. After local checks pass, no PR CI receipt exists yet. The generated evidence instructions require every criterion before implementation completion and planning (bin/fm-brief.sh:141-145), while direct-PR plans before pushing/opening the PR (:157) and no-mistakes starts validation after evidence and planning (:179-186). bin/fm-receipt-check.sh:639-647 rejects both operations while AC99 is missing. Thus neither path can reach the CI that would satisfy AC99 without an exception or an inaccurate success receipt. The insertion at bin/fm-brief.sh:627 makes this criterion mandatory. Reconcile pre-validation evidence with CI evidence required before PR-ready at the shared receipt-check boundary. The remedy needs authorization because introducing phased criterion handling extends the stated scaffold-only change.bin/fm-brief.sh:464- Simplification: lines 464-466 introduce physical-path equality as a second detection path when Git resolution fails, allowing a non-git copy of the code root to receive AC99. The accepted decision specifies detection when the directory's 'git common dir equals the code root's git common dir'; no requirement needs this fallback. Remove it and the associated dir_abs/root_abs variables at bin/fm-brief.sh:453, retaining only successful git-common-dir equality.🔧 Fix applied.
3 issues (1 error, 2 warnings) still open:
bin/fm-brief.sh:481- AC99 creates a circular dependency for fresh Firstmate tasks in both no-mistakes and direct-PR modes. After local checks pass, no PR CI receipt exists yet. The generated evidence instructions require every criterion before implementation completion and planning (bin/fm-brief.sh:141-145), while direct-PR plans before pushing/opening the PR (:157) and no-mistakes starts validation after evidence and planning (:179-186). bin/fm-receipt-check.sh:639-647 rejects both operations while AC99 is missing. Thus neither path can reach the CI that would satisfy AC99 without an exception or an inaccurate success receipt. The insertion at bin/fm-brief.sh:627 makes this criterion mandatory. Reconcile pre-validation evidence with CI evidence required before PR-ready at the shared receipt-check boundary. The remedy needs authorization because introducing phased criterion handling extends the stated scaffold-only change.bin/fm-brief.sh:464- Simplification: lines 464-466 introduce physical-path equality as a second detection path when Git resolution fails, allowing a non-git copy of the code root to receive AC99. The accepted decision specifies detection when the directory's 'git common dir equals the code root's git common dir'; no requirement needs this fallback. Remove it and the associated dir_abs/root_abs variables at bin/fm-brief.sh:453, retaining only successful git-common-dir equality.bin/fm-brief.sh:476- Round 1's fix introduces an inaccurate CI-enforcement claim for direct-PR briefs. A Firstmate documentation task can satisfy local AC99, open its PR, and complete while CI is pending or failing: bin/fm-pr-check.sh publishes direct-PR completion, and bin/fm-receipt-check.sh's direct-PR completion checks the PR head without checking CI. The receipts-mechanical path likewise lacks a checks-green requirement. The same claim appears at bin/fm-brief.sh:58 and is asserted in tests/fm-brief.test.sh:1040. Narrow the wording to the full-no-mistakes path where this enforcement exists. This needs review because the accepted R1 decision explicitly requested the enforcement claim; adding CI enforcement to other paths would exceed that decision.🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
TMPDIR="$PWD/.phase-test/tmp" bash .phase-test/focused.sh— executed the existing AC99 regression function against real scaffold and parser commands.Drovebin/fm-brief.shwith isolated FM_HOME for no-mistakes, direct-PR, local-only, projects alias, foreign repository, and unresolved-name targets.Executedbin/fm-receipt-check.sh --parse-criteriaon generated briefs and an AC1..AC98 brief; required AC99 through--require AC99.Executed the parent commit's scaffold and confirmed the real parser rejected its missing AC99.Executedbin/fm-brief.sh --help, preserved generated CLI evidence, and removed disposable setup; final git status was clean.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.