Skip to content

Feedback Agent

The Feedback Agent is an autonomous Claude Code instance that processes user feedback (bug reports and feature requests) submitted through the Rondo Club UI. It runs on a Mac Mini every 30 minutes, creating pull requests for resolved items and posting follow-up questions when it needs more information.

User submits feedback → WordPress REST API → Feedback queue (status: approved)
Mac Mini launchd (every 30 min) → bin/get-feedback.sh --loop --optimize
Fetch oldest approved item
Set status to in_progress
Pipe to Claude Code --print
┌────────────┬──────────┴──────────┐
RESOLVED NEEDS_INFO DECLINED
↓ ↓ ↓
Create PR Post comment Set declined
Set resolved Set needs_info
Store PR URL
When no feedback left:
Run optimization review
StatusMeaning
newJust submitted by a non-admin user, awaiting approval
approvedReady for agent pickup
in_progressCurrently being processed by the agent
needs_infoAgent posted a question, waiting for user reply
resolvedAgent created a PR or the issue was fixed
declinedNot actionable

Comments enable a conversation thread between the agent and users on feedback items.

List comments: GET /rondo/v1/feedback/{id}/comments

Returns an array of comments ordered by date ascending:

[
{
"id": 1,
"content": "Can you clarify which page this happens on?",
"author_id": 1,
"author_name": "Admin",
"author_type": "agent",
"created": "2026-02-14 12:00:00"
}
]

Create comment: POST /rondo/v1/feedback/{id}/comments

{
"content": "It happens on the People list page",
"author_type": "user"
}

When a user replies to a needs_info feedback item, the status automatically transitions back to approved so the agent picks it up again.

The feedback API includes two agent-specific fields in the meta response:

  • pr_url — URL of the GitHub PR created by the agent
  • agent_branch — Git branch name used by the agent

These are stored as post meta (_feedback_pr_url, _feedback_agent_branch) and can be set via the update endpoint.

FlagDescription
--runProcess one feedback item with Claude Code
--loopProcess all approved items until none remain
--optimizeWhen no feedback, review one file for optimization
--status=XFilter by status (default: approved)
--type=XFilter by type: bug or feature_request
--id=XProcess a specific feedback item
--jsonOutput raw JSON (no Claude processing)
  • Lock file at /tmp/rondo-feedback-claude.lock prevents concurrent runs
  • Crash cleanup resets feedback status to approved if the script exits unexpectedly
  • ensure_clean_main() aborts if the working directory is dirty
  • Branch cleanup deletes merged feedback/* and optimize/* branches after each run
  • Status set to in_progress before Claude runs, preventing other instances from picking up the same item

The agent’s instructions live at .claude/agent-prompt.md. Key rules:

  • Create branch feedback/{id}-{slugified-title}
  • Make changes, build, commit, push, create PR via gh pr create
  • Do NOT deploy — only create PRs
  • Output STATUS: RESOLVED + PR_URL: or STATUS: NEEDS_INFO + QUESTION:

When --optimize is set and no feedback items are found, the script reviews one file per run:

  1. Build a queue of PHP includes and React source files
  2. Track reviewed files in logs/optimization-tracker.json
  3. Claude reviews one file using .claude/optimize-prompt.md
  4. If improvements found, creates a PR on optimize/{module-name} branch
  5. Max 1 optimization PR per run

The plist template is at bin/com.rondo.feedback-agent.plist. To install on the Mac Mini:

Terminal window
# Copy to LaunchAgents
cp bin/com.rondo.feedback-agent.plist ~/Library/LaunchAgents/
# Load the job
launchctl load ~/Library/LaunchAgents/com.rondo.feedback-agent.plist
# Check status
launchctl list | grep rondo
# Unload if needed
launchctl unload ~/Library/LaunchAgents/com.rondo.feedback-agent.plist
  • Claude Code CLI installed and authenticated (Max OAuth)
  • gh CLI authenticated with GitHub
  • SSH keys configured for git push
  • .env configured with API credentials
  • jq installed (brew install jq)
  • logs/feedback-processor.log — Main script log
  • logs/launchd-stdout.log — launchd stdout capture
  • logs/launchd-stderr.log — launchd stderr capture
  • logs/optimization-tracker.json — Tracks which files have been reviewed
  • Shows PR link when meta.pr_url is set
  • Shows “Waiting for your response” banner when status is needs_info
  • Shows conversation thread with agent/user messages
  • Shows reply form when status is needs_info
  • Includes needs_info (“Info nodig”) in status dropdown
  • Shows PR column with link to GitHub PR