Skip to content

fix(bin): scaffold existing PR briefs - #4129

Open
bbekdemir wants to merge 11 commits into
kunchenguid:mainfrom
bbekdemir:fm/fm-brief-existing-pr
Open

bbekdemir wants to merge 11 commits into
kunchenguid:mainfrom
bbekdemir:fm/fm-brief-existing-pr

Conversation

@bbekdemir

@bbekdemir bbekdemir commented Sep 10, 2026 •

Copy link
Copy Markdown

Summary

  • Add --existing-pr <url> with optional asserted --branch <name> and required no-mistakes --base-branch <name> support to ship-brief scaffolding.
  • Replace new-branch and new-PR instructions with an origin-hosted PR-head checkout, same-branch delivery, no-force-push, and no-second-PR contract.
  • Resolve the live PR through an interruption-clean disposable probe, reject closed, fork-hosted, default-branch, invalid-branch, base-mismatched, or wrong-push-target deliveries, and revalidate the delivery identity at the push boundary.
  • Record the canonical PR URL and exact head-based completion contract so fm-pr-check.sh can arm the merge poll.
  • Reject unresolved existing-PR base placeholders across generated Setup, Rules, and Definition of done content before spawn.
  • Put the absolute Firstmate home and task-artifact directory in every generated ship and scout brief, including absolute report and evidence paths.
  • Keep fm-brief.sh, fm-spawn.sh, and fm-dod-lib.sh aligned, with colocated behavior coverage and updated operator documentation.

Maintainer verification

Verified on 2026-09-10 against exact head dace0f4fb70d10ec3c003cb6575584f1e45f4bea.

Commands:

bin/fm-test-run.sh tests/fm-brief.test.sh tests/fm-task-delivery.test.sh
bin/fm-doc-audience-check.sh
PATH="$PWD/.tmp-lint-tools:$PATH" bin/fm-lint.sh
git diff --check
codex review --base origin/main

Results:

FM_TEST_SUMMARY total=2 failed=0 skipped_gate=0
fm-doc-audience-check: ok surfaces=97 local_links=366
fm-lint.sh: ShellCheck 0.11.0 (pinned 0.11.0)
fm-lint-workflows.sh: actionlint 1.7.12 (pinned 1.7.12)
fm-lint-workflows.sh: 3 workflow files valid
git diff --check: clean
independent exact-head Codex review: no actionable correctness defects

The GitHub PR currently reports no configured CI checks.

@mehulbhagwani

Copy link
Copy Markdown
Contributor

Rebased and hardened the implementation in bbekdemir#1, targeting bbekdemir:fm/fm-brief-existing-pr. The validated head is 18636175584ff579ab4ef99977271c4130e1a0df; it preserves the existing-PR design and adds guards/tests for branch divergence, wrong-origin pushes, closed/merged PRs, and recording the PR head as the ship branch. The temporary fork validation PR had no CI checks and was closed after syncing this head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants