fix(brief): bound crewmate work and add task budgets#423
Open
stoneymarrow wants to merge 12 commits into
Open
Conversation
97a028a to
075a3d3
Compare
Owner
|
Thanks for the PR! This branch currently has a merge conflict with the base branch. When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again. Noted for firstmate#423 at |
…ocale-safe Herdr regex
4cd8433 to
4e1014b
Compare
Open
5 tasks
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
Add explicit stop conditions and bounded work caps to firstmate's standard ship and scout crewmate brief scaffolds, closing the gap where new obstacles can consume unbounded time without a supervisor-actionable update. Include a default of roughly two hours or 50 significant actions with no supervisor-actionable phase change, while making clear that expected waiting on validation or long test suites is not exhaustion. Add an optional --budget '' task-specific hard cap that renders in the same block. Report early and stop if the task is clearly larger than briefed. Preserve the existing status protocol, isolation assertion, Herdr-lab gate, delivery-mode definitions of done, and shared scaffold structure. Keep the change focused, extend the existing fm-brief tests for ship and scout defaults, the budget override, and unregressed sections, and keep shell scripts shellcheck-clean. Document --budget in AGENTS.md section 11 and docs/scripts.md as an optional per-task control for unattended or long-running task shapes, and fix the fm-brief.sh usage() range so --help includes its entire script contract.
What Changed
--budget '<text>'hard cap, complete brief help output, and reject missing, unquoted, or secondmate budget arguments.Risk Assessment
✅ Low: Captain, the change is well-bounded, preserves existing brief and delivery-mode invariants, and includes focused validation and regression coverage.
Testing
The successful full-suite baseline was supplemented with the focused fm-brief test and end-to-end CLI generation across ship, scout, direct-PR, local-only, and Herdr-lab modes. Retained Markdown and help artifacts demonstrate the bounded stop behavior and preserved contracts; all checks passed with no worktree residue.
Evidence: Default ship brief
Evidence: Budgeted scout brief
Evidence: Direct-PR brief
Evidence: Local-only brief
Evidence: Herdr-lab brief
Evidence: Complete fm-brief help output
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed ✅
bin/backends/herdr.sh:710- The implementation changes the bare-prompt regex from^[❯›]to locale-safe^(❯|›), butdocs/configuration.mdstill recommends the old override. Under byte-oriented locales, that documented override can match unrelated UTF-8 rows and weaken the composer-state injection guard. Update the documented value and explanation.bin/fm-brief.sh:98- Ship/scout parsing ignores extra positional arguments. An unquoted invocation such as--budget hard stop at 30 minutessucceeds but renders onlyTask-specific budget: hard, silently weakening the intended cap. Reject more than two ship/scout positional arguments so missing quotes fail visibly.🔧 Fix: Captain, validate brief arguments and document locale-safe Herdr regex
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"Configured baseline:command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"(reported successful).bash tests/fm-brief.test.shGenerated default ship, budgeted scout, direct-PR, local-only, and Herdr-lab briefs withFM_HOME=<evidence-home> bin/fm-brief.sh ....bin/fm-brief.sh --helpInspected generated Markdown for bounded stop conditions, validation-wait exemption, task-specific budget, status protocol, isolation assertion, scout contract, Herdr gate, and delivery-mode definitions of done.rg -n --fixed-strings -- '--budget' AGENTS.md docs/scripts.md bin/fm-brief.sh tests/fm-brief.test.shgit rev-parse HEAD && git status --shortto confirm the target commit and no worktree testing residue.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.