feedback_summary
Summarize recent user feedback to identify patterns and insights for improvement.
Instructions
Get summary of recent feedback
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recent | No |
Implementation Reference
- scripts/feedback-loop.js:1115-1150 (handler)The function `feedbackSummary` in `scripts/feedback-loop.js` calculates and formats the feedback summary report, including statistics like positive/negative feedback, approval rates, and delegation metrics.
function feedbackSummary(recentN = 20) { const { FEEDBACK_LOG_PATH } = getFeedbackPaths(); const entries = readJSONL(FEEDBACK_LOG_PATH); if (entries.length === 0) { return '## Feedback Summary\nNo feedback recorded yet.'; } const recent = entries.slice(-recentN); const positive = recent.filter((e) => e.signal === 'positive').length; const negative = recent.filter((e) => e.signal === 'negative').length; const pct = Math.round((positive / recent.length) * 100); const analysis = analyzeFeedback(FEEDBACK_LOG_PATH); const lines = [ `## Feedback Summary (last ${recent.length})`, `- Positive: ${positive}`, `- Negative: ${negative}`, `- Approval: ${pct}%`, `- Overall approval: ${Math.round(analysis.approvalRate * 100)}%`, ]; if (analysis.delegation) { lines.push(`- Delegation attempts: ${analysis.delegation.attemptCount}`); lines.push(`- Delegation accepted/rejected/aborted: ${analysis.delegation.acceptedCount}/${analysis.delegation.rejectedCount}/${analysis.delegation.abortedCount}`); lines.push(`- Delegation verification failure rate: ${Math.round((analysis.delegation.verificationFailureRate || 0) * 100)}%`); } if (analysis.boostedRisk) { lines.push(`- Boosted risk base rate: ${Math.round((analysis.boostedRisk.baseRate || 0) * 100)}%`); lines.push(`- Boosted risk mode: ${analysis.boostedRisk.mode}`); if (analysis.boostedRisk.highRiskDomains.length > 0) { const topDomain = analysis.boostedRisk.highRiskDomains[0]; lines.push(`- Highest-risk domain: ${topDomain.key} (${Math.round(topDomain.riskRate * 100)}%)`); } } - adapters/mcp/server-stdio.js:331-332 (handler)The `callToolInner` function in `adapters/mcp/server-stdio.js` maps the MCP tool `feedback_summary` to the `feedbackSummary` function, passing the `recent` argument.
case 'feedback_summary': return toTextResult(feedbackSummary(Number(args.recent || 20)));