Skip to content

fix: SingleBead harness — template syntax, phase sync, cleanup hardening#69

Merged
mrmaxsteel merged 4 commits intomainfrom
fix/singlebead-harness
Mar 9, 2026
Merged

fix: SingleBead harness — template syntax, phase sync, cleanup hardening#69
mrmaxsteel merged 4 commits intomainfrom
fix/singlebead-harness

Conversation

@mrmaxsteel
Copy link
Owner

Summary

  • Fixed mindspec complete syntax in all 6 instruct templates to include <bead-id> (root cause of SingleBead test timeout after Spec 080 merge)
  • Added completion reminder after mindspec next so agents see correct syntax before coding
  • Synced epic mindspec_phase metadata on bead completion (Spec 080 follow-up)
  • Hardened branch cleanup (git branch -D instead of -d)
  • Fixed detectSkipComplete false positive (require exit=0 for mindspec next)
  • Fixed assertBeadsState to use bd show <id> --json instead of broken bd list --json --parent

Test plan

  • SingleBead 3/3 PASS with forward ratios 92.6%, 86.4%, 96.7%
  • All deterministic tests pass (go test ./internal/harness/ -short)
  • make build clean

🤖 Generated with Claude Code

mrmaxsteel and others added 4 commits March 9, 2026 08:41
…tes + assertion fixes

Three fixes for the SingleBead LLM test regression:

1. **Instruct template syntax**: All templates showed `mindspec complete "msg"` but
   the CLI requires `mindspec complete <bead-id> "msg"`. The implement template now
   uses `{{.ActiveBead}}` to show the exact bead ID. Also added `bd update --metadata`
   to the Forbidden Actions list (agents were corrupting epic phase metadata).

2. **Analyzer false positive**: `detectSkipComplete` now requires exit=0 for
   `mindspec next` events. A failed `next` (e.g., post-complete exploration)
   no longer starts a new skip_complete tracking cycle.

3. **assertBeadsState**: Switched from `bd list --json --parent --status` (which
   has a known bug where --json is ignored with filter flags) to per-bead
   `bd show <id> --json` queries. Also fixed JSON array unmarshaling (bd show
   returns `[{...}]` not `{...}`).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- next.go: emit completion reminder with bead ID after `mindspec next`
  so agents see correct `mindspec complete <id>` syntax before coding
- complete.go: sync epic mindspec_phase metadata on bead completion
  (Spec 080) so DerivePhase returns correct phase downstream
- gitops.go: use `git branch -D` (force) instead of `-d` to avoid
  "not fully merged" errors during cleanup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mrmaxsteel mrmaxsteel merged commit 95262d2 into main Mar 9, 2026
6 checks passed
@mrmaxsteel mrmaxsteel deleted the fix/singlebead-harness branch March 9, 2026 09:00
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