fix: show documented decision-key placement in brief status examples - #12
Open
BohnBawerick wants to merge 2 commits into
Open
fix: show documented decision-key placement in brief status examples#12BohnBawerick wants to merge 2 commits into
BohnBawerick wants to merge 2 commits into
Conversation
Generated ship, scout, dreamer, and secondmate briefs now include literal needs-decision and resolved lines with [key=<slug>] before the colon, matching the documented position.
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
Fix the brief scaffold's status-protocol examples so workers see the documented [key=...] placement on needs-decision and resolved lines.
Context (established and verified 2026-08-16 - do not re-derive):
Requirements:
Acceptance criteria:
What Changed
bin/fm-brief.shto show literalneeds-decision [key=<slug>]: ...andresolved [key=<slug>]: ...examples across all brief scaffolds (ship,scout,dreamer, andsecondmate).test_status_protocol_shows_documented_decision_key_placementintests/fm-brief.test.shto verify that all scaffold variants render the documented key placement.Risk Assessment
✅ Low: The change cleanly updates brief scaffolds to show documented decision-key placements while preserving optional-key self-close phrasing, covered by comprehensive scaffold generation tests.
Testing
Executed targeted colocated test suites covering fm-brief scaffold generation, decision-key classification, resolve-key handling, and decision hold lifecycle. Scaffolded scratch test briefs for ship, scout, dreamer, and secondmate modes to verify end-to-end rendering of literal before-colon [key=<slug>] examples for both needs-decision and resolved status protocol lines.Evidence: Scaffold status protocol excerpts across all brief variants
Source: Scaffold status protocol excerpts across all brief variants
=== SHIP BRIEF STATUS PROTOCOL EXCERPT (sample-ship) === 6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings), appendneeds-decision [key=<slug>]: {summary of options}and stop. Firstmate will apply the configured authority and reply with the decision. A decision or blocker you opened stays open until aresolvedline carrying its exact key lands (e.g.resolved [key=<slug>]: {how it cleared}); a laterdone:orworking:line never closes it, even when the answer is what started that work. Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, appendresolved: {how it cleared}yourself (key it with[key=<slug>]if you opened it with one, omit it otherwise) as you resume. === SCOUT BRIEF STATUS PROTOCOL EXCERPT (sample-scout) === 6. If a decision belongs to a human (product choices, destructive actions), appendneeds-decision [key=<slug>]: {summary of options}and stop. Firstmate will reply with the decision. A decision or blocker you opened stays open until aresolvedline carrying its exact key lands (e.g.resolved [key=<slug>]: {how it cleared}); a laterdone:orworking:line never closes it, even when the answer is what started that work. Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, appendresolved: {how it cleared}yourself (key it with[key=<slug>]if you opened it with one, omit it otherwise) as you resume. === DREAMER BRIEF STATUS PROTOCOL EXCERPT (sample-dreamer) === 6. If a decision belongs above you (product choices, destructive actions, ask-user findings), appendneeds-decision [key=<slug>]: {summary of options}and stop. Firstmate will apply the configured authority and reply. A decision or blocker you opened stays open until aresolvedline carrying its exact key lands (e.g.resolved [key=<slug>]: {how it cleared}); a laterdone:orworking:line never closes it, even when the answer is what started that work. Firstmate's reply normally writes that closing line at answer time; when a blocker or wait clears WITHOUT a firstmate reply, appendresolved: {how it cleared}yourself (key it with[key=<slug>]if you opened it with one, omit it otherwise) as you resume. === SECONDMATE CHARTER ESCALATION PROTOCOL EXCERPT (sample-secondmate) === For a captain decision, appendneeds-decision [key=<slug>]: {summary of options}. This is also how you return the answer to a marked from-firstmate request above. A marked request requires one correlated answer after the work; it does not require a separate receipt or start acknowledgement. Never appendworking:merely to acknowledge receipt or announce that a marked request has started. When a routed-work phase has a supervisor-actionable material change worth reporting under the rule above, give that reported phase a stable key. If its first reportable event isworking [key=<work-slug>]: {material phase}, use the same key on its laterpaused,done,failed,needs-decision, orblockedevent so the earlier working phase is superseded. When a keyed phase ends without another reportable state, appendresolved [key=<work-slug>]: {why it is no longer active}.resolvedseparately closes an escalated decision or blocker, and only aresolvedline carrying that decision's exact key (e.g.resolved [key=<slug>]: {how it cleared}) closes it: a laterdoneorworkingevent never does, even when the answer is what started that work. The main firstmate's answer normally writes that closing line at answer time; when a blocker or wait clears WITHOUT an answer from the main firstmate, appendresolved: {how it cleared}yourself (key it with[key=<slug>]if you opened it with one, omit it otherwise) as your domain resumes.Evidence: Rendered ship brief scaffold
Source: Rendered ship brief scaffold
Evidence: Rendered scout brief scaffold
Source: Rendered scout brief scaffold
Evidence: Rendered dreamer brief scaffold
Source: Rendered dreamer brief scaffold
Evidence: Rendered secondmate charter scaffold
Source: Rendered secondmate charter scaffold
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
bin/fm-brief.sh:289- The self-close instruction was changed from a keyless-primary template ('appendresolved: {how it cleared}yourself (keyed with[key=<slug>]if you opened it with one)') to a keyed-primary template ('appendresolved [key=<slug>]: {how it cleared}yourself (same[key=<slug>]if you opened it with one)') in all four scaffolds (lines 289, 374, 464, 587). Concrete trace: a worker opens a keyless blocker via the still-keyless rule-5 template ('blocked: flaky registry'), the wait clears without a firstmate reply, and the parenthetical now has no antecedent key. Per bin/fm-classify-lib.sh a bare 'resolved:' closes the 'default' decision opened by the keyless 'blocked:', but a worker following the new template literally may invent a slug ('resolved [key=registry-wait]: ...'), which closes nothing and leaves a stale open decision in the tracker. The old wording made the correct keyless close the copy-paste default. Consider restoring the optional-key phrasing (e.g. 'key it with[key=<slug>]if you opened it with one, omit it otherwise') while keeping the new literal keyed examples.🔧 Fix: restore optional-key self-close phrasing in brief scaffolds
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
./tests/fm-brief.test.sh./tests/fm-classify-decision-key.test.sh./tests/fm-send-resolve-key.test.sh./tests/fm-decision-hold-lifecycle.test.sh./tests/fm-dreamer.test.sh./bin/fm-brief.sh sample-ship sample-repo --mode no-mistakes./bin/fm-brief.sh sample-scout sample-repo --scout./bin/fm-brief.sh sample-dreamer sample-repo --dreamer./bin/fm-brief.sh sample-secondmate --secondmate sample-repo✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.