feat(skills): Add validation status to parallel_beads PR descriptions

Enhances the parallel_beads workflow to capture and report validation status:

- Add step 3 to extract validation criteria from plans or use best-effort
  fallbacks (make test, nix flake check, npm test)
- Update step 4 to run validation and track PASS/FAIL/SKIP results
- Add Validation section with table to PR body templates (gh and tea)
- Enhance result reporting to include validation summary
- Add Validation column and Validation Failures section to summary table

Implements bead: nixos-configs-39m

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-12 18:29:25 -08:00
parent 47aaad2eb5
commit ba4922981b

View File

@@ -41,17 +41,41 @@ Work on bead [BEAD_ID]: [BEAD_TITLE]
- Run `bd show [BEAD_ID]` to understand the acceptance criteria - Run `bd show [BEAD_ID]` to understand the acceptance criteria
- Note any external issue references (GitHub issues, Linear tickets, etc.) - 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 - Work in the worktree directory
- Complete all acceptance criteria listed in the bead - 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` - Stage all changes: `git add -A`
- Create a descriptive commit message - Create a descriptive commit message
- Push the branch: `git push -u origin bead/[BEAD_ID]` - 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` - Detect hosting provider from origin URL: `git remote get-url origin`
- If URL contains `github.com`, use `gh`; otherwise use `tea` (Gitea/Forgejo) - If URL contains `github.com`, use `gh`; otherwise use `tea` (Gitea/Forgejo)
- PR title: "[BEAD_ID] [BEAD_TITLE]" - PR title: "[BEAD_ID] [BEAD_TITLE]"
@@ -73,6 +97,15 @@ Work on bead [BEAD_ID]: [BEAD_TITLE]
## Changes ## 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 |
EOF EOF
)" )"
``` ```
@@ -90,18 +123,33 @@ Work on bead [BEAD_ID]: [BEAD_TITLE]
[Any linked issues from the bead] [Any linked issues from the bead]
## Changes ## 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` - 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') - Add the PR URL to the bead notes: `bd update [BEAD_ID] --notes="$(bd show [BEAD_ID] --json | jq -r '.notes')
PR: [PR_URL]"` PR: [PR_URL]"`
7. **Report results**: 8. **Report results**:
- Return: PR URL, bead ID, success/failure status - 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 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 ### Launching Subagents
@@ -164,23 +212,30 @@ After reviews complete:
- Bead ID - Bead ID
- PR URL - PR URL
- Status (success / failed / blocked) - Status (success / failed / blocked)
- Validation summary (X/Y passed)
- Review summary - Review summary
- Any failures or blockers encountered - 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: Example output:
``` ```
## Parallel Beads Summary ## Parallel Beads Summary
| Bead | PR | Bead Status | Review | | Bead | PR | Bead Status | Validation | Review |
|------|-----|-------------|--------| |------|-----|-------------|------------|--------|
| beads-abc | #123 | in_review | Approved | | beads-abc | #123 | in_review | 3/3 passed | Approved |
| beads-xyz | #124 | in_review | Needs changes | | beads-xyz | #124 | in_review | 2/3 passed | Needs changes |
| beads-123 | - | open (failed) | Blocked by missing dependency | | beads-123 | - | open (failed) | - | Blocked by missing dependency |
### Validation Failures
- beads-xyz: `make lint` failed - src/foo.ts:23 missing semicolon
### Failures/Blockers ### Failures/Blockers
- beads-123: Could not complete because [reason] - beads-123: Could not complete because [reason]
### Next Steps ### Next Steps
- Fix validation failures before merging
- Review PRs that need changes - Review PRs that need changes
- Address blockers for failed beads - Address blockers for failed beads
- Run `/reconcile_beads` after PRs are merged to close beads - Run `/reconcile_beads` after PRs are merged to close beads