feat: add scout task lifecycle - #7
Merged
Merged
Conversation
This was referenced Jul 21, 2026
This was referenced Aug 1, 2026
vipentti
pushed a commit
to vipentti/firstmate
that referenced
this pull request
Aug 5, 2026
* feat: scout tasks - delegate investigations and repros with report deliverables * no-mistakes(review): Require clean promotion handoff * no-mistakes(document): Sync scout task documentation
3 of 4 tasks
|
Resolved. The middleman's surface settled as its four calls - greet, send, sendImage, press - plus the held /updates WebSocket stream carrying the fleet and a watched pane, with every failure surfaced as a typed Trouble. That shape was specced in #12 and is built and running on main. Closing as answered and superseded by #12. |
This was referenced Aug 21, 2026
notno
referenced
this pull request
in nathan-rosquist/firstmate
Sep 8, 2026
) (cherry picked from commit 1202c5e)
hooliooo
pushed a commit
to hooliooo/firstmate
that referenced
this pull request
Sep 14, 2026
…r-report-compact (kunchenguid#7) * fix(pr-report): repost findings for new attestations * no-mistakes(document): document no-attestation skip in pr-report docstring --------- Co-authored-by: johannesr <johannes.redgard@tuvsud.com>
hooliooo
added a commit
to hooliooo/firstmate
that referenced
this pull request
Sep 14, 2026
…zation Upstream PR kunchenguid#7 made the review-findings comment idempotence attestation- round-aware: the comment carries a hidden attestation-head marker, a newer attestation posts a new closed thread, and a legacy markerless comment does not suppress the current round. Port that behavior into the CI-green normalization design, reusing ATTESTATION_RE as the single owner of the attestation pattern.
hooliooo
added a commit
to hooliooo/firstmate
that referenced
this pull request
Sep 14, 2026
…zation Upstream PR kunchenguid#7 made the review-findings comment idempotence attestation- round-aware: the comment carries a hidden attestation-head marker, a newer attestation posts a new closed thread, and a legacy markerless comment does not suppress the current round. Port that behavior into the CI-green normalization design, reusing ATTESTATION_RE as the single owner of the attestation pattern.
cachemoney
added a commit
to cachemoney/firstmate
that referenced
this pull request
Sep 18, 2026
This was referenced Sep 19, 2026
NewAiCoder
referenced
this pull request
in NewAiCoder/firstmate
Sep 26, 2026
fix: sync fork main with upstream (55+ commits) via merge
|
Completed/superseded on current main: the guard now emits the foreign-owner diagnostic on every stand-down, with repeated-stop and distinct-session regression coverage in tests/fm-turnend-guard.test.sh. |
This was referenced Sep 30, 2026
Closed
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
Extend firstmate so crewmates handle ALL project-specific work, not just coding that ends in a PR. The captain asked for this and approved the proposed design including the rule-3 carve-out and promotion. New task shape 'scout' (investigations, planning, bug reproductions, audits): deliverable is a standalone report at data//report.md instead of a PR; the worktree is declared scratch from the start. Changes: (1) AGENTS.md - identity broadened from coding tasks to all project work, intake now classifies shape (ship vs scout) before readiness, scout flow documented (no validate/PR/merge stages; report -> relay to captain -> immediate teardown), promotion documented, hard rule 3 gets the deliberate scout carve-out, backlog format gains a report-link Done variant, brief section mentions --scout; (2) bin/fm-brief.sh - --scout flag writes a scout contract scaffold (never push, report definition of done, worktree-is-scratch framing); (3) bin/fm-spawn.sh - --scout flag records kind=scout in the task meta, default kind=ship for backward compatibility (absent kind in old meta files is treated as ship by teardown); (4) bin/fm-teardown.sh - scout tasks skip the unpushed-work refusal once data//report.md exists, refuse with a clear message when the report is missing, ship tasks keep the full protection unchanged; (5) new bin/fm-promote.sh - flips kind=scout to ship in meta so a scout crewmate can be promoted in place (keeping worktree and context) when its findings reveal shippable work, restoring full teardown protection. Deliberate decisions: --scout flags are parsed positionally-tolerant (filtered from args) on both fm-brief and fm-spawn; scout briefs forbid pushing to ANY remote (stronger than ship's never-push-to-default) because nothing from a scout worktree should ever leave the machine; the report-missing teardown refusal deliberately mirrors the existing refusal wording style; all scripts were smoke-tested locally (both scaffolds, promote happy/error paths, teardown refusal and carve-out paths).
What Changed
data/<id>/report.mdinstead of PR validation.--scout, persisted taskkindmetadata, and documented scout intake, supervision, teardown, and Done backlog entries.bin/fm-promote.shand updated teardown protections so scout scratch work can only be discarded after a report exists while ship tasks retain unpushed-work safeguards.Risk Assessment
✅ Low: The change is well-bounded to firstmate task orchestration scripts and documentation, and the previously flagged promotion handoff risk is addressed with explicit cleanup-before-branch guidance.
Testing
Exercised the scout flow through the actual firstmate shell scripts and treehouse-backed spawn/teardown path, captured reviewer-visible CLI transcripts, verified documented edge cases, and confirmed no transient test files remained in the working tree; all tested behavior passed.
Evidence: Scout lifecycle transcript
Shows scout brief scaffolding,fm-spawnrecordingkind=scout, teardown refusing beforedata/e2e-scout/report.md, teardown succeeding after the report despite an unpushed scratch commit, andfm-promotechanging meta tokind=shipwith ship teardown protection restored.Evidence: Scout edge-case transcript
Showsfm-brief.shaccepting--scoutbefore positional args andfm-teardown.shtreating legacy meta withoutkind=as ship-protected.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-promote.sh:22- The promoted task instructions tell firstmate to have the crewmate createfm/<id>from the current scout worktree state. Scout briefs explicitly allow arbitrary scratch edits and commits, so this can put exploratory work on the shipping branch unless promotion first requires an inventory/cleanup step or a reset/cherry-pick of only intended changes.🔧 Fix: Require clean promotion handoff
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
Inspected changed files withgit diff --name-only 8b6f11ad5518e345fd84e022d4caa0dbbabcbdee..45d4b1666643557641983374db58d046cad1c248and readAGENTS.md,bin/fm-brief.sh,bin/fm-spawn.sh,bin/fm-teardown.sh, andbin/fm-promote.sh.Ran an end-to-end scout lifecycle smoke using./bin/fm-brief.sh e2e-scout .tmp-scout-lifecycle/project --scout,./bin/fm-spawn.sh e2e-scout .tmp-scout-lifecycle/project "sh -c 'sleep 300'" --scout, scratch commit creation in the treehouse worktree, missing-report teardown refusal, report creation, successful scout teardown, and./bin/fm-promote.sh e2e-promote.Ran edge-case smoke checks for./bin/fm-brief.sh --scout e2e-edge-brief .tmp-scout-edge-cases/projectand./bin/fm-teardown.sh e2e-legacywith a legacy meta file lackingkind=.Checked for leftover working-tree artifacts withgit status --shortplus glob checks for.tmp-scout-*,data/e2e-*, andstate/e2e-*.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.