mirror of
https://github.com/proffesor-for-testing/agentic-qe.git
synced 2026-09-19 08:45:47 +08:00
fd2f37eaa0
Changes: - Fix README.md agent counts (48 QE agents = 41 main + 7 subagents) - Fix README.md skill counts (15 QE-specific skills) - Fix v3/README.md agent counts (47 → 48) - Fix init-wizard.ts hooks from 'npx @agentic-qe/v3' to 'npx agentic-qe' - Complete v2 → v2/ folder reorganization (54 items moved) - Update root package.json to point to v3 as main version Verified claims: - 48 QE agents (41 main + 7 TDD subagents) - 15 QE-specific skills - 12 DDD bounded contexts - ~5,600+ tests - HNSW, ReasoningBank, Queen Coordinator features exist Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
36 lines
1.3 KiB
Bash
Executable File
36 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# Hook: Post-Task - Emit agent completion event to visualization
|
|
# Receives JSON via stdin from Claude Code hook system
|
|
|
|
# Read input from stdin
|
|
INPUT=$(cat)
|
|
|
|
# Try to get the agent ID from the temp file or generate from description
|
|
if [ -f "/tmp/aqe-viz/current-agent-$$" ]; then
|
|
AGENT_ID=$(cat "/tmp/aqe-viz/current-agent-$$")
|
|
rm -f "/tmp/aqe-viz/current-agent-$$"
|
|
else
|
|
# Fallback: extract from input
|
|
DESC=$(echo "$INPUT" | jq -r '.tool_input.description // .tool_input.prompt // "task-agent"' 2>/dev/null | head -c 50)
|
|
AGENT_ID=$(echo "$DESC" | tr ' ' '-' | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9-]//g' | head -c 30)
|
|
AGENT_ID="${AGENT_ID:-task-agent}-recent"
|
|
fi
|
|
|
|
# Check if task was successful (from tool response)
|
|
SUCCESS=$(echo "$INPUT" | jq -r '.tool_response.success // .result.success // "unknown"' 2>/dev/null)
|
|
|
|
# Calculate approximate duration (we don't have exact timing, use 0)
|
|
DURATION=0
|
|
|
|
# Emit completion or error event based on success status (non-blocking, background)
|
|
(
|
|
if [ "$SUCCESS" = "false" ]; then
|
|
ERROR_MSG=$(echo "$INPUT" | jq -r '.tool_response.error // .result.error // "Task failed"' 2>/dev/null)
|
|
npx tsx scripts/emit-agent-event.ts error "$AGENT_ID" "$ERROR_MSG" 2>/dev/null
|
|
else
|
|
npx tsx scripts/emit-agent-event.ts complete "$AGENT_ID" "$DURATION" 2>/dev/null
|
|
fi
|
|
) &
|
|
|
|
exit 0
|