Skip to content

fix: repair brief worker scaffold parser - #5

Open
ItsFlow wants to merge 2 commits into
mainfrom
fm/fm-brief-syntax-repair
Open

fix: repair brief worker scaffold parser#5
ItsFlow wants to merge 2 commits into
mainfrom
fm/fm-brief-syntax-repair

Conversation

@ItsFlow

@ItsFlow ItsFlow commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Intent

Urgently repair the worker-launch blocker in bin/fm-brief.sh introduced by ec09871. Make the smallest syntax-only correction without redesigning the brief generator or changing unrelated behavior; identify the malformed shell construct; preserve worktree isolation, status reporting, decision escalation, and each delivery-specific completion contract. Require bash -n, repository-pinned ShellCheck/lint, existing brief-generator tests, isolated no-mistakes/direct-PR/local-only/scout scaffolding, and a strengthened parser regression test. Commit, push through the complete no-mistakes pipeline, open a PR, and reach green CI without merging.

What Changed

  • Rewords the no-mistakes brief completion contract to avoid the apostrophe form that broke bin/fm-brief.sh parsing while preserving the authority-check meaning.
  • Strengthens brief-generator regression coverage so generated no-mistakes briefs assert the apostrophe-safe authority wording and reject the broken form.
  • Updates the ask-user authority fixture expectation to match the repaired generated brief text.

Risk Assessment

✅ Low: The change is tightly scoped to removing the apostrophe that broke parsing in the DOD=$(cat <<EOF ... EOF) block and updating targeted regression assertions, with no behavior drift found.

Testing

bash -n and the selected brief-generator/authority tests passed, generated brief artifacts demonstrate the user-facing scaffold contracts across no-mistakes/direct-PR/local-only/scout modes, and the worktree stayed clean; I did not run local lint/static analysis per the validation rule, but PR CI records the lint job passing while the required no-mistakes PR gate remains failed.

Evidence: Selected parser and behavior test transcript
$ bash -n bin/fm-brief.sh
bash -n: exit 0

$ bin/fm-test-run.sh --json /var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/fm-brief-selected-tests.json tests/fm-brief.test.sh tests/fm-ask-user-authority.test.sh
FM_TEST_BEGIN 2026-07-29T22:51:42Z tests/fm-brief.test.sh family=pure-contract-unit expected_gate_skip=none
ok - fm-brief.sh: bash -n succeeds
ok - fm-brief.sh: --help renders the complete header
ok - fm-brief.sh: no-mistakes/direct-PR/local-only briefs generate cleanly
ok - fm-brief.sh: faster paths use configured authority without stacked review
ok - fm-brief.sh: no-mistakes DOD wording avoids the apostrophe regression
ok - fm-brief.sh: ship project-memory wording carries the AGENTS.md authoring bar
ok - fm-brief.sh: --herdr-lab emits the complete hard safety contract
ok - fm-brief.sh: --herdr-lab uses its quoted Firstmate-owned helper path
ok - fm-brief.sh: ship and scout scaffolds make omitted Herdr intent fail-visible
ok - fm-brief.sh: Herdr lab contract covers scouts and rejects secondmate misuse
ok - fm-brief.sh: --no-projects scaffolds a project-less charter and guards misuse
ok - fm-brief.sh: marked requests avoid generic acknowledgements and preserve material reporting
ok - fm-brief.sh: custom pause verb renders in every scaffold
ok - fm-brief.sh: investigation and visual-review completions load the shared decision policy
ok - fm-brief: scout and secondmate code paths still scaffold well-formed briefs
FM_TEST_END 2026-07-29T22:51:43Z tests/fm-brief.test.sh exit=0 duration_ms=926 gate_skip=false
FM_TEST_BEGIN 2026-07-29T22:51:43Z tests/fm-ask-user-authority.test.sh family=pure-contract-unit expected_gate_skip=none
ok - ask-user authority has one conditional owner and a concise always-loaded boundary
ok - required concrete defect correction stays within yolo authority
ok - continuous frame-by-frame proof escalates when only checkpoints were requested
ok - repeated abstraction-preserving findings escalate before another fix round
ok - genuinely security-sensitive action still escalates
ok - explicitly requested complex architecture stays autonomous
ok - reviewer risk labels remain evidence rather than expansion authority
ok - contract-expansion escalation carries all five decision elements
ok - primary workers and secondmates receive the authority rule through their normal instruction owners
FM_TEST_END 2026-07-29T22:51:43Z tests/fm-ask-user-authority.test.sh exit=0 duration_ms=110 gate_skip=false
FM_TEST_SUMMARY total=2 failed=0 skipped_gate=0 duration_ms=1117
FM_TEST_SUMMARY_FAMILY family=pure-contract-unit count=2 duration_ms=1036 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-brief.test.sh duration_ms=926
FM_TEST_SLOWEST rank=2 script=tests/fm-ask-user-authority.test.sh duration_ms=110
fm-test-run: wrote timing artifact: /var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/fm-brief-selected-tests.json
Evidence: Selected test timing artifact
{
  "families": [
    {
      "count": 2,
      "duration_ms": 1036,
      "failed": 0,
      "name": "pure-contract-unit"
    }
  ],
  "finished_at": "2026-07-29T22:51:43Z",
  "run_id": "fm-test-run-1785365502704-47738",
  "scripts": [
    {
      "duration_ms": 926,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "path": "tests/fm-brief.test.sh"
    },
    {
      "duration_ms": 110,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "path": "tests/fm-ask-user-authority.test.sh"
    }
  ],
  "selection": "scripts",
  "started_at": "2026-07-29T22:51:42Z",
  "summary": {
    "duration_ms": 1117,
    "failed": 0,
    "skipped_gate": 0,
    "total": 2
  }
}
Evidence: Generated brief end-to-end transcript
$ FM_HOME=/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home bin/fm-brief.sh evidence-nm unknown-proj
warn: project "unknown-proj" not in registry; defaulting to no-mistakes off
scaffolded: /var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-nm/brief.md (ship, mode=no-mistakes; replace {TASK})
$ FM_HOME=/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home bin/fm-brief.sh evidence-direct direct-proj
scaffolded: /var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-direct/brief.md (ship, mode=direct-PR; replace {TASK})
$ FM_HOME=/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home bin/fm-brief.sh evidence-local local-proj
scaffolded: /var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-local/brief.md (ship, mode=local-only; replace {TASK})
$ FM_HOME=/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home bin/fm-brief.sh evidence-scout unknown-proj --scout
scaffolded: /var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-scout/brief.md (scout; replace {TASK})

# Contract checks across generated briefs
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-nm/brief.md:14:**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-direct/brief.md:14:**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-local/brief.md:14:**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-nm/brief.md:27:   States: working, needs-decision, blocked, paused, done, failed.
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-direct/brief.md:26:   States: working, needs-decision, blocked, paused, done, failed.
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-local/brief.md:26:   States: working, needs-decision, blocked, paused, done, failed.
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-scout/brief.md:23:   States: working, needs-decision, blocked, paused, done, failed.
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-nm/brief.md:40:   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-scout/brief.md:33:   append `needs-decision: {summary of options}` and stop. Firstmate will reply with the decision.
68:After /no-mistakes reports CI green (the CI-ready return point - do not wait for it to keep monitoring in the background until merge), append `done: PR {url} checks green` and stop. You are finished.
55:When it is implemented and committed, push your branch and open a PR with `gh-axi`, then append `done: PR {url}` to the status file and stop.
54:The task is complete only when committed on your branch `fm/evidence-local`. Do NOT push, do NOT open a PR, do NOT merge.
13:This is a SCOUT task: the deliverable is a written report, not a PR.
66:- Avoid `--yes`: it would silently bypass the authority check that firstmate applies and any required captain escalation.
Evidence: Generated no-mistakes brief
You are a crewmate: an autonomous worker agent managed by firstmate. Work on your own; do not wait for a human.

# Task
{TASK}

# Herdr lifecycle declaration - NOT ENABLED
**HARD SAFETY GATE:** this scaffold cannot inspect the task text that replaces `{TASK}` later.
If the task will start, stop, delete, restart, profile, or otherwise drive Herdr lifecycle behavior, stop and regenerate the brief with `--herdr-lab` before dispatch.
Do not add Herdr lifecycle commands to this unguarded brief by hand.

# Setup
You are in a disposable git worktree of unknown-proj, at a detached HEAD on a clean default branch.

**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
The path check is authoritative: `git rev-parse --git-dir` and `git rev-parse --git-common-dir` can help inspect the repo, but they do not prove you are outside the primary checkout.
If the top-level path is the primary checkout or not the worktree you were launched in, STOP - do not branch or commit here - append `blocked: launched in primary checkout, not an isolated worktree` to the status file and stop.

1. First action: create your branch: `git checkout -b fm/evidence-nm`
2. Run `no-mistakes doctor`; if it reports the repo is not initialized here, run `no-mistakes init`.

# Rules
1. Never push to the default branch. Never merge a PR.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/state/evidence-nm.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   When firstmate replies or a blocker clears and you resume, append `resolved: {how it was decided or unblocked}` (add the same `[key=<slug>]` if you opened it with one) so the decision or blocker is durably closed and does not keep resurfacing.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

# Project memory
If `AGENTS.md` or `CLAUDE.md` already exists, or if this task produced durable project-intrinsic knowledge, run `/Users/panda/.no-mistakes/worktrees/46f9a46e1e7f/01KYR00EJY1RPJ62AFGZCSMXYJ/.n/worktrees/9efe4c8dc6d0/01KYR10AZV6VM6VR1EEP3A72SJ/bin/fm-ensure-agents-md.sh .` in the worktree.
Record only project knowledge useful to almost every future session.
For anything the codebase already shows, prefer a pointer to the authoritative file, command, or doc over copying the detail.
If you touch a project `AGENTS.md` that lacks `## Maintaining this file`, add that short self-governance section from `/Users/panda/.no-mistakes/worktrees/46f9a46e1e7f/01KYR00EJY1RPJ62AFGZCSMXYJ/.n/worktrees/9efe4c8dc6d0/01KYR10AZV6VM6VR1EEP3A72SJ/bin/fm-ensure-agents-md.sh` in the same pass.
Keep it proportionate: skip `AGENTS.md` edits for trivial tasks that produced no durable project knowledge.

# Definition of done
The task is complete only when committed on your branch.
When you believe it is complete, append `done: {summary}` to the status file and stop.
Firstmate will then instruct you to run /no-mistakes to validate and ship a PR.

You drive no-mistakes by responding to its gates, not by implementing fixes.
Follow the guidance no-mistakes itself provides for the mechanics: it loads when you invoke /no-mistakes, and `no-mistakes axi run --help` plus the `help` lines in each `axi` response are authoritative and version-matched to the installed binary.
Do not hand-edit, commit, or fix findings yourself while a run is active - the pipeline applies every fix.

Two firstmate-specific rules layer on top of that guidance:
- ask-user findings are never yours to answer: escalate to firstmate (rule 6) and stop.
  Firstmate applies the authority contract in its `AGENTS.md` and obtains any required captain decision.
  When the decision comes back, feed it to the gate with `no-mistakes axi respond` and let the pipeline apply it - do not route the question to "the user" or implement the fix yourself.
- Avoid `--yes`: it would silently bypass the authority check that firstmate applies and any required captain escalation.

After /no-mistakes reports CI green (the CI-ready return point - do not wait for it to keep monitoring in the background until merge), append `done: PR {url} checks green` and stop. You are finished.
Evidence: Generated direct-PR brief
You are a crewmate: an autonomous worker agent managed by firstmate. Work on your own; do not wait for a human.

# Task
{TASK}

# Herdr lifecycle declaration - NOT ENABLED
**HARD SAFETY GATE:** this scaffold cannot inspect the task text that replaces `{TASK}` later.
If the task will start, stop, delete, restart, profile, or otherwise drive Herdr lifecycle behavior, stop and regenerate the brief with `--herdr-lab` before dispatch.
Do not add Herdr lifecycle commands to this unguarded brief by hand.

# Setup
You are in a disposable git worktree of direct-proj, at a detached HEAD on a clean default branch.

**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
The path check is authoritative: `git rev-parse --git-dir` and `git rev-parse --git-common-dir` can help inspect the repo, but they do not prove you are outside the primary checkout.
If the top-level path is the primary checkout or not the worktree you were launched in, STOP - do not branch or commit here - append `blocked: launched in primary checkout, not an isolated worktree` to the status file and stop.

1. First action: create your branch: `git checkout -b fm/evidence-direct`

# Rules
1. Never push to the default branch (push only your `fm/evidence-direct` branch). Never merge a PR.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/state/evidence-direct.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   When firstmate replies or a blocker clears and you resume, append `resolved: {how it was decided or unblocked}` (add the same `[key=<slug>]` if you opened it with one) so the decision or blocker is durably closed and does not keep resurfacing.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

# Project memory
If `AGENTS.md` or `CLAUDE.md` already exists, or if this task produced durable project-intrinsic knowledge, run `/Users/panda/.no-mistakes/worktrees/46f9a46e1e7f/01KYR00EJY1RPJ62AFGZCSMXYJ/.n/worktrees/9efe4c8dc6d0/01KYR10AZV6VM6VR1EEP3A72SJ/bin/fm-ensure-agents-md.sh .` in the worktree.
Record only project knowledge useful to almost every future session.
For anything the codebase already shows, prefer a pointer to the authoritative file, command, or doc over copying the detail.
If you touch a project `AGENTS.md` that lacks `## Maintaining this file`, add that short self-governance section from `/Users/panda/.no-mistakes/worktrees/46f9a46e1e7f/01KYR00EJY1RPJ62AFGZCSMXYJ/.n/worktrees/9efe4c8dc6d0/01KYR10AZV6VM6VR1EEP3A72SJ/bin/fm-ensure-agents-md.sh` in the same pass.
Keep it proportionate: skip `AGENTS.md` edits for trivial tasks that produced no durable project knowledge.

# Definition of done
This project ships **direct-PR**: you raise the PR yourself, without the no-mistakes pipeline.
The task is complete only when committed on your branch.
When it is implemented and committed, push your branch and open a PR with `gh-axi`, then append `done: PR {url}` to the status file and stop.
Do NOT run /no-mistakes. The configured merge authority decides whether to merge the PR; firstmate relays the outcome.
Evidence: Generated local-only brief
You are a crewmate: an autonomous worker agent managed by firstmate. Work on your own; do not wait for a human.

# Task
{TASK}

# Herdr lifecycle declaration - NOT ENABLED
**HARD SAFETY GATE:** this scaffold cannot inspect the task text that replaces `{TASK}` later.
If the task will start, stop, delete, restart, profile, or otherwise drive Herdr lifecycle behavior, stop and regenerate the brief with `--herdr-lab` before dispatch.
Do not add Herdr lifecycle commands to this unguarded brief by hand.

# Setup
You are in a disposable git worktree of local-proj, at a detached HEAD on a clean default branch.

**Verify isolation before anything else.** Run `pwd -P` and `git rev-parse --show-toplevel`; both must resolve to the disposable task worktree you were launched in, such as a treehouse pool path or an Orca-managed worktree, not the primary checkout firstmate operates from.
The path check is authoritative: `git rev-parse --git-dir` and `git rev-parse --git-common-dir` can help inspect the repo, but they do not prove you are outside the primary checkout.
If the top-level path is the primary checkout or not the worktree you were launched in, STOP - do not branch or commit here - append `blocked: launched in primary checkout, not an isolated worktree` to the status file and stop.

1. First action: create your branch: `git checkout -b fm/evidence-local`

# Rules
1. Never push to any remote and never open a PR. Work only on your `fm/evidence-local` branch; firstmate handles the merge into local `main`.
2. Stay inside this worktree; modify nothing outside it.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/state/evidence-local.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on (setup done, bug reproduced, fix implemented, validation passed) and the
   needs-decision/blocked/paused/done/failed states. No step-by-step FYI progress lines;
   firstmate reads your pane for that.
   A mid-task `working:` line (including setup complete) is nonterminal: do not end the
   turn after it; continue the same stage until a defined `done:` gate under Definition of done.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset,
   a scheduled window): firstmate then leaves your idle pane alone and rechecks it on a long
   cadence instead of treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs above the implementation worker (product choices, destructive actions, ask-user findings),
   append `needs-decision: {summary of options}` and stop. Firstmate will apply the configured authority and reply with the decision.
   When firstmate replies or a blocker clears and you resume, append `resolved: {how it was decided or unblocked}` (add the same `[key=<slug>]` if you opened it with one) so the decision or blocker is durably closed and does not keep resurfacing.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

# Project memory
If `AGENTS.md` or `CLAUDE.md` already exists, or if this task produced durable project-intrinsic knowledge, run `/Users/panda/.no-mistakes/worktrees/46f9a46e1e7f/01KYR00EJY1RPJ62AFGZCSMXYJ/.n/worktrees/9efe4c8dc6d0/01KYR10AZV6VM6VR1EEP3A72SJ/bin/fm-ensure-agents-md.sh .` in the worktree.
Record only project knowledge useful to almost every future session.
For anything the codebase already shows, prefer a pointer to the authoritative file, command, or doc over copying the detail.
If you touch a project `AGENTS.md` that lacks `## Maintaining this file`, add that short self-governance section from `/Users/panda/.no-mistakes/worktrees/46f9a46e1e7f/01KYR00EJY1RPJ62AFGZCSMXYJ/.n/worktrees/9efe4c8dc6d0/01KYR10AZV6VM6VR1EEP3A72SJ/bin/fm-ensure-agents-md.sh` in the same pass.
Keep it proportionate: skip `AGENTS.md` edits for trivial tasks that produced no durable project knowledge.

# Definition of done
This project ships **local-only**: no remote, no PR, no pipeline.
The task is complete only when committed on your branch `fm/evidence-local`. Do NOT push, do NOT open a PR, do NOT merge.
Keep your branch a clean fast-forward onto the current default branch - if `main` has advanced, rebase onto it so the eventual merge stays a fast-forward.
When it is implemented and committed, append `done: ready in branch fm/evidence-local` to the status file and stop.
The configured merge authority approves the ready branch, then firstmate merges it into local `main` through the guarded fast-forward path.
Evidence: Generated scout brief
You are a crewmate: an autonomous worker agent managed by firstmate. Work on your own; do not wait for a human.

# Task
{TASK}

# Herdr lifecycle declaration - NOT ENABLED
**HARD SAFETY GATE:** this scaffold cannot inspect the task text that replaces `{TASK}` later.
If the task will start, stop, delete, restart, profile, or otherwise drive Herdr lifecycle behavior, stop and regenerate the brief with `--herdr-lab` before dispatch.
Do not add Herdr lifecycle commands to this unguarded brief by hand.

# Setup
You are in a disposable git worktree of unknown-proj, at a detached HEAD on a clean default branch.
This is a SCOUT task: the deliverable is a written report, not a PR.
The worktree is your laboratory - install, run, edit, and make scratch commits freely; all of it is discarded at teardown.
The report is the only thing that survives, so anything worth keeping must be in it.

# Rules
1. Never push to any remote and never open a PR.
2. Stay inside this worktree; the only files you may write outside it are the report and the status file below.
3. Use gh-axi for GitHub operations and chrome-devtools-axi for browser operations.
4. Report status by appending one line:
   `echo "{state}: {one short line}" >> '/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/state/evidence-scout.status'`
   States: working, needs-decision, blocked, paused, done, failed.
   Each append wakes firstmate, so report sparingly: only phase changes a supervisor
   would act on and the needs-decision/blocked/paused/done/failed states. No step-by-step
   FYI progress lines; firstmate reads your pane for that.
   Use `paused: {why}` - distinct from `blocked:` - ONLY when you are deliberately idling on a
   known external wait you expect to clear on its own (an upstream release, a rate-limit reset):
   firstmate then leaves your idle pane alone and rechecks it on a long cadence instead of
   treating it as a possible wedge. Use `blocked:` when you are stuck and need help.
5. If you hit the same obstacle twice, append `blocked: {why}` and stop; firstmate will help.
6. If a decision belongs to a human (product choices, destructive actions),
   append `needs-decision: {summary of options}` and stop. Firstmate will reply with the decision.
   When firstmate replies or a blocker clears and you resume, append `resolved: {how it was decided or unblocked}` (add the same `[key=<slug>]` if you opened it with one) so the decision or blocker is durably closed and does not keep resurfacing.
7. Never stop, restart, or update the shared `no-mistakes` daemon - it is one instance serving
   every lane/home, so restarting it kills other lanes' in-flight pipeline runs. On ANY no-mistakes
   daemon error, append `blocked: {the daemon error}` and stop; only firstmate manages the daemon.

# Definition of done
Write your findings to `/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home/data/evidence-scout/report.md`.
The report must stand alone: what you did, what you found, the evidence (commands run, output, file:line references), and what you recommend.
Before reporting done, read and follow `/Users/panda/.no-mistakes/worktrees/46f9a46e1e7f/01KYR00EJY1RPJ62AFGZCSMXYJ/.n/worktrees/9efe4c8dc6d0/01KYR10AZV6VM6VR1EEP3A72SJ/.agents/skills/decision-hold-lifecycle/SKILL.md` and pass its shared completion gate for the report and any visual review.
When the report is complete, append `done: {one-line conclusion}` to the status file and stop.
If your findings reveal work that should ship (e.g. you reproduced a bug and the fix is clear), say so in the report; firstmate may promote this task in place, and you would then receive mode-specific ship instructions as a follow-up message.
Evidence: PR and CI status transcript

PR checks show 9 passed, 1 failed; the failed check is PR must be raised via no-mistakes.

$ gh-axi pr view 5
pull_request:
  number: 5
  title: "fix(brief): repair worker scaffold parser"
  state: open
  author: ItsFlow
  draft: no
  merged: no
  checks: "9 passed, 1 failed, 10 total"
  body: "## Summary\n\n- repair the malformed no-mistakes definition-of-done heredoc wording\n- add parser and generated-brief regression coverage\n- preserve the ask-user authority contract wording\n\n## Tests\n\n- `bash -n bin/fm-brief.sh`\n- `bin/fm-test-run.sh tests/fm-brief.test.sh tests/fm-ask-user-authority.test.sh`\n"
  comment_count: 0 — use --comments to see full comments
  review_count: 0 — use --reviews to see full reviews

$ gh-axi pr checks 5
summary: "9 passed, 1 failed, 10 total"
checks[10]{name,conclusion}:
  PR must be raised via no-mistakes,fail
  Lint shell scripts,pass
  Test coverage guard,pass
  Behavior portable parallel 1,pass
  Behavior portable parallel 2,pass
  Behavior portable serial,pass
  Behavior tests (Herdr),pass
  Stock macOS Bash snapshot compatibility,pass
  Repo invariants,pass
  Behavior timing aggregate,pass
help[2]:
  Run `gh-axi pr view 5` to see PR details
  Run `gh-axi pr merge 5` to merge when ready

$ gh-axi run view 30489124908
run:
  id: 30489124908
  title: "fix(brief): repair worker scaffold parser"
  status: completed
  conclusion: success
  workflow: CI
  branch: fm/fm-brief-syntax-repair
  created: 2h ago
jobs[9]{id,name,status,conclusion}:
  90702277937,Behavior portable parallel 1,completed,success
  90702277969,Behavior tests (Herdr),completed,success
  90702277987,Behavior portable parallel 2,completed,success
  90702278062,Repo invariants,completed,success
  90702278076,Test coverage guard,completed,success
  90702278090,Lint shell scripts,completed,success
  90702278116,Stock macOS Bash snapshot compatibility,completed,success
  90702278128,Behavior portable serial,completed,success
  90705564663,Behavior timing aggregate,completed,success

$ gh-axi run view 30489124720
run:
  id: 30489124720
  title: PR #5 body compliance - opened - event 10 (run 30489124720)
  status: completed
  conclusion: failure
  workflow: Require no-mistakes
  branch: fm/fm-brief-syntax-repair
  created: 2h ago
jobs[1]{id,name,status,conclusion}:
  90702277908,PR must be raised via no-mistakes,completed,failure
Evidence: Require no-mistakes failure log

Source: Require no-mistakes failure log (local file: /var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/require-no-mistakes-failure-log.txt)

The failing workflow reports: `This PR was not raised through no-mistakes.`
- Evidence: [PR #5](https://github.com//pull/5) - Outcome: ⚠️ 1 error across 1 run (3m2s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 error
  • 🚨 Required PR validation is not green: gh-axi pr checks 5 reports 9 passed, 1 failed, 10 total, with PR must be raised via no-mistakes failing. The failing run says the PR body lacks the no-mistakes signature and reports This PR was not raised through no-mistakes, so the author intent requirement to push through the complete no-mistakes pipeline and reach green CI is not satisfied.
  • bash -n bin/fm-brief.sh
  • bin/fm-test-run.sh --json /var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/fm-brief-selected-tests.json tests/fm-brief.test.sh tests/fm-ask-user-authority.test.sh
  • Generated end-user briefs with FM_HOME=/var/folders/tc/llfmckm54ls5tzxm08q758lm0000gn/T/no-mistakes-evidence/01KYR10AZV6VM6VR1EEP3A72SJ/generated-brief-home bin/fm-brief.sh for no-mistakes, direct-PR, local-only, and scout paths, then checked isolation/status/decision/DOD wording and apostrophe regressions.
  • /opt/homebrew/bin/gh-axi pr view 5
  • /opt/homebrew/bin/gh-axi pr checks 5
  • /opt/homebrew/bin/gh-axi run view 30489124908
  • /opt/homebrew/bin/gh-axi run view 30489124720 --log
  • git status --short
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@ItsFlow ItsFlow changed the title fix(brief): repair worker scaffold parser fix: repair brief worker scaffold parser Jul 29, 2026
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