feat(FN-1185): inject agent rating feedback into runtime instructions

- Extend agent instruction resolution to append a Performance Feedback section with average score, trend, category breakdown, and recent comments when ratings exist
- Add rating-aware instruction resolution with graceful fallback when no store is configured, agent IDs are missing, or rating lookup fails
- Wire executor custom instruction loading to fetch agent rating summaries and include them in resolved instructions
- Expand agent-instructions tests to cover feedback formatting, trend indicators, comment limits, and fallback/error paths
This commit is contained in:
gsxdsm
2026-04-08 06:18:47 -07:00
parent b949fd01ff
commit 14c0041e61
3 changed files with 312 additions and 4 deletions

View File

@@ -581,7 +581,12 @@ export class TaskExecutor {
const agents = await this.options.agentStore.listAgents({ role: role as AgentCapability });
for (const agent of agents) {
if (agent.instructionsText || agent.instructionsPath) {
return await resolveAgentInstructions(agent, this.rootDir);
try {
const ratingSummary = await this.options.agentStore.getRatingSummary(agent.id);
return await resolveAgentInstructions(agent, this.rootDir, ratingSummary);
} catch {
return await resolveAgentInstructions(agent, this.rootDir);
}
}
}
} catch {