diff --git a/home/roles/development/skills/parallel_beads.md b/home/roles/development/skills/parallel_beads.md index e4d36a4..56ae0a2 100644 --- a/home/roles/development/skills/parallel_beads.md +++ b/home/roles/development/skills/parallel_beads.md @@ -41,17 +41,41 @@ Work on bead [BEAD_ID]: [BEAD_TITLE] - Run `bd show [BEAD_ID]` to understand the acceptance criteria - Note any external issue references (GitHub issues, Linear tickets, etc.) -3. **Implement the changes**: +3. **Extract validation criteria**: + - Check for a plan: `thoughts/beads-[BEAD_ID]/plan.md` + - If plan exists: + - Read the plan and find the "Automated Verification" section + - Extract each verification command (lines starting with `- [ ]` followed by a command) + - Example: `- [ ] Tests pass: \`make test\`` → extract `make test` + - If no plan exists, use best-effort validation: + - Check if `Makefile` exists → try `make test` and `make lint` + - Check if `flake.nix` exists → try `nix flake check` + - Check if `package.json` exists → try `npm test` + - If none found, note "No validation criteria found" + +4. **Implement the changes**: - Work in the worktree directory - Complete all acceptance criteria listed in the bead - - Run any relevant tests or checks -4. **Commit and push**: + After implementation, run validation: + - Execute each validation command from step 3 + - Track results in this format: + ``` + VALIDATION_RESULTS: + - make test: PASS + - make lint: FAIL (exit code 1: src/foo.ts:23 - missing semicolon) + - nix flake check: SKIP (command not found) + ``` + - If any validation fails: + - Continue with PR creation (don't block) + - Document failures in bead notes: `bd update [BEAD_ID] --notes="Validation failures: [list]"` + +5. **Commit and push**: - Stage all changes: `git add -A` - Create a descriptive commit message - Push the branch: `git push -u origin bead/[BEAD_ID]` -5. **Create a PR**: +6. **Create a PR**: - Detect hosting provider from origin URL: `git remote get-url origin` - If URL contains `github.com`, use `gh`; otherwise use `tea` (Gitea/Forgejo) - PR title: "[BEAD_ID] [BEAD_TITLE]" @@ -73,6 +97,15 @@ Work on bead [BEAD_ID]: [BEAD_TITLE] ## Changes - [List of changes made] + + ## Validation + [Include validation results from step 4] + + | Check | Status | Details | + |-------|--------|---------| + | make test | PASS | | + | make lint | FAIL | src/foo.ts:23 - missing semicolon | + | nix flake check | SKIP | command not found | EOF )" ``` @@ -90,18 +123,33 @@ Work on bead [BEAD_ID]: [BEAD_TITLE] [Any linked issues from the bead] ## Changes - - [List of changes made]" + - [List of changes made] + + ## Validation + [Include validation results from step 4] + + | Check | Status | Details | + |-------|--------|---------| + | make test | PASS | | + | make lint | FAIL | src/foo.ts:23 - missing semicolon | + | nix flake check | SKIP | command not found |" ``` -6. **Update bead status**: +7. **Update bead status**: - Mark the bead as "in_review": `bd update [BEAD_ID] --status=in_review` - Add the PR URL to the bead notes: `bd update [BEAD_ID] --notes="$(bd show [BEAD_ID] --json | jq -r '.notes') PR: [PR_URL]"` -7. **Report results**: - - Return: PR URL, bead ID, success/failure status +8. **Report results**: + - Return: + - PR URL + - Bead ID + - Implementation status (success/failure/blocked) + - Validation summary: `X passed, Y failed, Z skipped` + - List of any validation failures with details - If blocked or unable to complete, explain what's blocking progress + - If validation failed, include the specific failures so the main agent can summarize them for the user ``` ### Launching Subagents @@ -164,23 +212,30 @@ After reviews complete: - Bead ID - PR URL - Status (success / failed / blocked) + - Validation summary (X/Y passed) - Review summary - Any failures or blockers encountered + If any validation failures occurred, list them in a "Validation Failures" section so the user can address them. + Example output: ``` ## Parallel Beads Summary -| Bead | PR | Bead Status | Review | -|------|-----|-------------|--------| -| beads-abc | #123 | in_review | Approved | -| beads-xyz | #124 | in_review | Needs changes | -| beads-123 | - | open (failed) | Blocked by missing dependency | +| Bead | PR | Bead Status | Validation | Review | +|------|-----|-------------|------------|--------| +| beads-abc | #123 | in_review | 3/3 passed | Approved | +| beads-xyz | #124 | in_review | 2/3 passed | Needs changes | +| beads-123 | - | open (failed) | - | Blocked by missing dependency | + +### Validation Failures +- beads-xyz: `make lint` failed - src/foo.ts:23 missing semicolon ### Failures/Blockers - beads-123: Could not complete because [reason] ### Next Steps +- Fix validation failures before merging - Review PRs that need changes - Address blockers for failed beads - Run `/reconcile_beads` after PRs are merged to close beads