name: zgent-feedback
description: File production feedback about a zgent's behavior. Routes to CSO for diagnosis and artifact tuning. Usage: /zgent-feedback
user-invocable: true
allowed-tools: Bash, Read, Write
argument-hint: " "
File Zgent Feedback
Route Steve's production experience to CSO as a structured feedback bead.
Instructions
Parse the argument. The first word is the zgent name, the rest is the description.
- If no argument provided, ask: "Which zgent, and what happened?"
- Validate the zgent name exists:
ls -d /root/projects/$ZGENT_NAME 2>/dev/null || echo "NOT_FOUND" - If not found, list known zgents and ask for clarification.
Query claude-monitor for corroborating evidence.
curl -s "http://localhost:3000/api/v1/search?q=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$DESCRIPTION'))")&limit=3" 2>/dev/null- If CM is not running, try CASS:
cass search "$DESCRIPTION" --limit 3 --json 2>/dev/null - If neither works, proceed without CM data. Note "(no CM corroboration)" in the bead.
- If CM is not running, try CASS:
Infer related artifacts. Map keywords in the description to likely artifact IDs:
- "bead" / "beads" / "work authorization" →
rule:beads-first - "tmux" / "send-keys" / "bash tool" →
rule:tmux-first - "permission" / "denied" / "settings" →
setting:permissions - "identity" / "who are you" / "role" →
gate:claude-md-identity - If no keywords match, set to
["unknown — CSO to diagnose"]
- "bead" / "beads" / "work authorization" →
Determine priority.
- Default: P2
- Escalate to P1 if related artifacts include
rule:beads-firstorrule:tmux-first(critical gates)
Create the feedback bead in CSO's beads.
BEAD_ID="cso-f$(date +%s | tail -c 4)" TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)Append to
/root/projects/CSO/.beads/issues.jsonl:{ "id": "$BEAD_ID", "title": "$ZGENT_NAME: <short summary from description>", "type": "feedback", "priority": $PRIORITY, "status": "open", "description": "Steve reports: $DESCRIPTION. CM sessions: $CM_SESSIONS.", "source": { "reporter": "steve", "zgent": "$ZGENT_NAME", "raw_feedback": "$DESCRIPTION", "cm_sessions": $CM_SESSION_LIST, "filed_at": "$TIMESTAMP" }, "related_artifacts": $RELATED_ARTIFACTS, "lifecycle": { "stage": "awaiting_diagnosis", "stages": ["awaiting_diagnosis", "diagnosed", "artifact_tuned", "regression_test_written", "resolved"] } }Confirm to Steve. Output:
Filed: $BEAD_ID — $ZGENT_NAME: <short summary> CM match: <session timestamps if found, or "no CM corroboration"> Related artifacts: <list> Priority: P$PRIORITY Routed to CSO for diagnosis and artifact tuning.