Repository navigation
feat(bin): require PP Brain and memory grounding in ship and scout briefs - #8
Merged
Merged
Conversation
fm-brief.sh generated every crewmate and scout brief with no instruction to consult PP Brain or the local memory store, so grounding in prior organisational knowledge only happened incidentally, when a worker invoked a skill that already required it. Add a short Grounding section to ship and scout briefs requiring a search of both stores before the first substantive action, treating the Task section as a starting point rather than a substitute, and reporting what was found and what it changed (or that both were silent). Also encode the documented retrieval-path gotcha: a Brain search must populate both query and prompt.
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.
Adds a
# Groundingsection to the crewmate ship-brief and scout-brief templates thatbin/fm-brief.shgenerates, requiring the worker to search PP Brain and firstmate's local memory store for prior decisions, refuted approaches, and known traps before its first substantive action.Why it matters: worker use of PP Brain today is incidental - it only happens when a dispatched task invokes a skill (
implement-ticket,investigate-incident, ...) that already requires it. Two recent failures were caused by acting without prior knowledge that was in fact recorded: a ticket was implemented when a merge request for it already existed, and an investigation was dispatched into an alert that already had two reports and an open decision. Nothing in the scaffold guaranteed the search would happen on any other kind of task.This change touches only
bin/fm-brief.shand its test; it does not change the secondmate charter template or any other generated section.Change
bin/fm-brief.sh# Groundingsection in the shared ship-brief heredoc (all three--modevalues) and the scout-brief heredoc, plus a one-line header-comment note documenting the placement decisiontests/fm-brief.test.shtest_grounding_section_requires_search_and_reportingThe Grounding section requires three things: search PP Brain's
search_knowledgewith bothqueryandpromptpopulated (passing only one silently drops two of six retrieval paths) and the local memory store; treat the brief's# Tasksection as a starting point rather than a substitute; and report what was found and what it changed in the next status line, or state plainly that both were silent. The third requirement is deliberate - a section that only says "search Brain" produces a search with no accountability for what it found.Validation
bin/fm-lint.sh(pinned ShellCheck 0.11.0 + actionlint 1.7.12): clean.bash tests/fm-brief.test.sh: 22/22, including the new test, which exercises the generated brief text through the script's own CLI output rather than asserting on implementation source bytes.# Groundingsection: three single-sentence lines, no stray formatting, no unreplaced heredoc markers.Placement rationale
The Grounding section was added to ship briefs (all three delivery modes) and scout briefs, but deliberately not to the secondmate charter template.
Ship briefs got it because the duplicate-merge-request failure that motivated this change was itself a mechanical ship task, not an investigation - limiting the requirement to scouts would have missed the exact failure mode it exists to prevent.
The secondmate charter was excluded because a secondmate never performs a task's first substantive action itself: it delegates project work to its own crewmates through the normal firstmate lifecycle, and each of those crewmates receives its own generated ship or scout brief, which already carries this same Grounding section. Adding the section to the charter too would be a second, structurally unused copy of the same contract that nothing ever reads.
Out of scope
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
test✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
🤖 Generated with Claude Code