Skip to content

feat(brief): add PR-body Intent contract to PR-producing ship briefs#278

Open
Bre77 wants to merge 1 commit into
kunchenguid:mainfrom
Bre77:fm/fm-brief-prbody-rule-s5
Open

feat(brief): add PR-body Intent contract to PR-producing ship briefs#278
Bre77 wants to merge 1 commit into
kunchenguid:mainfrom
Bre77:fm/fm-brief-prbody-rule-s5

Conversation

@Bre77

@Bre77 Bre77 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What

  • Crewmate briefs carried no durable rule for PR-body shape, so auto-generated bodies could open with prose walls or the raw task prompt at the top.
    • Fix: the ship-brief scaffold (bin/fm-brief.sh) now emits a # PR body contract section for both PR-producing modes (no-mistakes and direct-PR).
    • The crewmate must make the opening ## Intent / ## What section a scannable tree (typically 3-8 top-level bullets, nested 2-3 levels), restructuring with gh-axi pr edit when the auto-generated body needs it.
    • Top-level bullets name the issues addressed; sub-bullets carry fix approach, implications, and explicit scope boundaries; the shape flexes by change type rather than following a rigid template.
    • Long-form narrative or the original prompt may sit only at the bottom of the body inside a collapsed <details> block.
    • Repos with their own strict upstream PR template win: the crewmate follows that template with a concise, human description instead.
  • AGENTS.md section 11 gains one pointer sentence naming the scaffold as the contract owner (one-owner rule; the rule text is not duplicated there).
  • Scope: local-only briefs deliberately get no PR-body section (no PR exists), and scout/secondmate briefs are untouched.

Testing

  • bash tests/fm-brief.test.sh - 4/4 pass, including the new test_pr_body_contract_by_mode (section present for no-mistakes and direct-PR, absent for local-only).
  • shellcheck bin/*.sh bin/backends/*.sh tests/*.sh (v0.10.0) - clean, invoked exactly as CI does.
  • The new block reuses the $(cat <<EOF) pattern with no apostrophes, so the existing bash -n regression guard for issue firstmate's fm-brief.sh scaffold script has a bug #166 covers it.
Full narrative / original brief

Captain's rule (2026-07-06): the PR body's opening section (## Intent, or ## What on direct-PR bodies) must open with a scannable tree, not prose walls - top-level bullets for the issues addressed, sub-bullets for fix approach, implications, and scope boundaries, typically 3-8 top-level bullets nested 2-3 levels max.
The structure flexes with the change type (bug fix: issue -> root cause -> fix -> implication; feature: goal -> approach -> limits; ops: what -> why -> blast radius).
Long-form narrative and/or the original task prompt are permitted but must sit at the bottom of the body inside a collapsed details block, never at the top.
All other sections (What Changed, Risk Assessment, Testing, evidence details, post-deploy ops notes) are preserved as-is.
Captain's addendum: the tree-Intent contract applies only where we own the PR template; repos with their own strict upstream PR template follow that template instead, and those descriptions stay concise and human - explain why and toward what goal, not a line-by-line tour of the diff.

🤖 Generated with Claude Code

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.

1 participant