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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user