Skip to content

Bro doesn't write bro_verification_pass ledger event before closing task #91

@ZaxShen

Description

@ZaxShen

Observed

Two real-world v0.3.x dogfood runs (`/tmp/tmb-marketplace-test-rc` and `/tmp/tmb-marketplace`) showed bro flipping a task to `status='closed'` without logging a corresponding `bro_verification_pass` (or `_fail`) ledger event.

Most recent run (`/tmp/tmb-marketplace`):

```
ledger:
1 tmb_onboarding_complete
2 scope_gate_waived
3 planning_complete
-- (missing) bro_verification_pass --

tasks:
1 feat/python-cli-todo status=closed commit_sha=2626b7a
```

Bro DID verify in the conversation (re-ran tests, confirmed all subcommands worked, checked unknown-id error path) — but the audit trail row for that verification didn't land in the ledger.

Why this matters

Per the doctrine in `CLAUDE.md` and `docs/architecture/FLOWS.md` Flow 2 + 8:

validation_attempts is reserved for the push gate's structured verdicts. Bro-verification fails are recorded as `discussions(kind='note')` rather than validation_attempts.

But there's no symmetric guidance for bro-verification PASS. Currently bro just flips the task to `closed` and the audit goes silent. The only proof verification happened lives in the conversation transcript, which evaporates.

Impact

  • Future querying ("did bro actually verify task X before closing?") has no SQL answer
  • `issue_report_md` / `issue_snapshot_md` show planning_complete but no verification event in their narrative
  • Hard to distinguish "task closed because verified" from "task closed because bro skipped verification"

Fix scope

Update `skills/tmb_planning-simple/SKILL.md` and `skills/tmb_planning-difficult/SKILL.md` § Bro verification protocol § Step V3 ("All three pass → emit task_update_status(closed)") to ALSO emit:

```
ledger_log(
agent='bro', from_node='bro',
issue_id=, branch_id=,
event_type='bro_verification_pass',
summary='Task verified PASS at <commit_sha>: '
)
```

For the fail path (V3 "Any check fails"), emit `bro_verification_fail` instead, then the existing `discussion_append(kind='note')` for the failure detail (keep both — ledger for the verdict event, discussion for the human-readable feedback).

Could be batched with the `task_update_status` call to keep latency neutral.

Acceptance

After a clean simple-task run, the ledger should show 4 events instead of 3: onboarding/scope-gate/planning_complete/bro_verification_pass.

Origin

Found by @ZaxShen during v0.3.2 marketplace test — task closed cleanly but ledger was missing the verification audit row.

Metadata

Metadata

Assignees

Labels

DoctrineDoctrine clarification or contract changePriority: MediumMedium priority — quality / UXWorkflowBro / SWE / pr-reviewer doctrine + planning skills

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions