fix: make story verification executable with REQUIRED bash commands in orchestrator

**Critical Changes:**
1. Workflow.md now explicitly tells orchestrator to USE BASH TOOL
2. Bash commands must be run, not just read
3. If verification fails, orchestrator must use Edit/Bash tools to fix NOW
4. Verification is MANDATORY before story marked complete

**Both workflows now enforce this:**
- super-dev-pipeline: Reconciler agent + Final Verification
- batch-super-dev: Orchestrator runs bash verification after each agent

**Version:** 6.0.0-Beta.5
This commit is contained in:
Jonah Schulte 2026-01-26 22:16:43 -05:00
parent 6664c8e3f6
commit e1c6a05259
2 changed files with 23 additions and 19 deletions

View File

@ -1308,37 +1308,34 @@ Spawning Task agent...
<check if="Task agent succeeded"> <check if="Task agent succeeded">
<output>✅ Implementation complete: {{story_key}}</output> <output>✅ Implementation complete: {{story_key}}</output>
<action>Execute Step 4.5: Smart Story Reconciliation</action> <critical>🚨 STORY RECONCILIATION - ORCHESTRATOR DOES THIS NOW (NOT AGENTS)</critical>
<action>Load reconciliation instructions: {installed_path}/step-4.5-reconcile-story-status.md</action>
<action>Execute reconciliation with story_key={{story_key}}</action>
<critical>🚨 MANDATORY STORY FILE VERIFICATION - YOU MUST RUN THESE BASH COMMANDS</critical> <output>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔧 RECONCILING STORY FILE: {{story_key}}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Main orchestrator performing reconciliation (not delegating)
</output>
<action>STEP 1: Run bash verification commands (REQUIRED):</action> <action>YOU (orchestrator) must use Bash tool NOW with this command:</action>
<bash_required> <bash_command>
# Get story file path from story_key
STORY_FILE="docs/sprint-artifacts/{{story_key}}.md" STORY_FILE="docs/sprint-artifacts/{{story_key}}.md"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "Verifying story file: $STORY_FILE"
echo "🔍 VERIFYING STORY FILE: {{story_key}}"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Check 1: Count checked tasks
CHECKED_COUNT=$(grep -c "^- \[x\]" "$STORY_FILE" 2>/dev/null || echo "0") CHECKED_COUNT=$(grep -c "^- \[x\]" "$STORY_FILE" 2>/dev/null || echo "0")
TOTAL_COUNT=$(grep -c "^- \[.\]" "$STORY_FILE" 2>/dev/null || echo "0") TOTAL_COUNT=$(grep -c "^- \[.\]" "$STORY_FILE" 2>/dev/null || echo "0")
echo "Checked tasks: $CHECKED_COUNT/$TOTAL_COUNT" echo "Checked tasks: $CHECKED_COUNT/$TOTAL_COUNT"
# Check 2: Verify Dev Agent Record filled
RECORD_FILLED=$(grep -A 20 "^### Dev Agent Record" "$STORY_FILE" 2>/dev/null | grep -c "Claude Sonnet" || echo "0") RECORD_FILLED=$(grep -A 20 "^### Dev Agent Record" "$STORY_FILE" 2>/dev/null | grep -c "Claude Sonnet" || echo "0")
echo "Dev Agent Record filled: $RECORD_FILLED" echo "Dev Agent Record: $RECORD_FILLED"
# Store results for conditional logic echo "checked_count=$CHECKED_COUNT"
echo "$CHECKED_COUNT" > /tmp/checked_count.txt echo "record_filled=$RECORD_FILLED"
echo "$RECORD_FILLED" > /tmp/record_filled.txt </bash_command>
</bash_required>
<action>STEP 2: Read bash results and decide:</action> <action>After running Bash tool, read the output and extract checked_count and record_filled values</action>
<check if="checked_count == 0 OR record_filled == 0"> <check if="checked_count == 0 OR record_filled == 0">
<output> <output>

View File

@ -243,7 +243,14 @@ Task({
🚨 **CRITICAL: This verification is MANDATORY. DO NOT skip.** 🚨 🚨 **CRITICAL: This verification is MANDATORY. DO NOT skip.** 🚨
**After all agents complete, the MAIN ORCHESTRATOR must run this verification:** **After all agents complete (including Reconciler), YOU (the main orchestrator) must:**
1. **Use the Bash tool** to run these commands
2. **Read the output** to see if verification passed
3. **If verification fails**, use Edit and Bash tools to fix it NOW
4. **Do not proceed** until verification passes
**COMMAND TO RUN WITH BASH TOOL:**
```bash ```bash
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"