refactor: remove self-learning and the optimizer package (P1.4)
Self-learning is excluded from the community edition (ADR-0004); the project owner reworks it separately. Cost tracking stays. - agent: delete behaviour evolution (evolve-schema, iterative GEPA, compose-evolution, evolution gates, orchestrator and deploy), improvement and correction detection, AgentLearning, the eval-dataset builder, optimization-capture and the agent_insights tool. Secret detection moves from eval-dataset to secret-patterns. The LLM wiring keeps only the Haiku adapter and judge call used by skill audit and hygiene, so @ax-llm/ax is now declared by agent instead of server. - server: delete /api/evolution/*, the evolution and optimizer services, GEPA expansion of the first chat message, the prompt_optimization and monthly_assessment jobs, the idle-session reviewer and its session-reviewer persona, prompt injection of past corrections and thumbs-down recorded as correction signals. Existing job rows of the removed types are ignored, not deleted. - core: delete OptimizationLogStore; stop re-exporting the improvement signal and evolution run stores. - web: delete the Evolution screen and the two job types in the automation editor. - delete packages/optimizer. Also logs UF-027 (self-learning loops read data nothing collects) and UF-028 (the Settings prompt-shape choice is ignored by chat).
This commit is contained in:
@@ -90,59 +90,4 @@ describe('Self-Awareness', () => {
|
||||
expect(result).toContain('acquire_capability');
|
||||
expect(result).toContain('uncertain');
|
||||
});
|
||||
|
||||
it('includes improvement signals when awareness has actionable data', () => {
|
||||
const caps: AgentCapabilities = {
|
||||
tools: [],
|
||||
skills: [],
|
||||
model: 'test',
|
||||
memoryStats: { frameCount: 10, sessionCount: 2, entityCount: 3 },
|
||||
mode: 'local',
|
||||
version: '1.0.0',
|
||||
awareness: {
|
||||
capabilityGaps: [{
|
||||
id: 1,
|
||||
toolName: 'pdf_reader',
|
||||
occurrences: 3,
|
||||
suggestion: 'User has needed "pdf_reader" 3 times. Consider using acquire_capability to find it.',
|
||||
}],
|
||||
corrections: [{
|
||||
id: 2,
|
||||
patternKey: 'tone:too_formal',
|
||||
detail: 'Keep it casual',
|
||||
occurrences: 4,
|
||||
guidance: 'Keep it casual (corrected 4 times)',
|
||||
}],
|
||||
workflowPatterns: [],
|
||||
totalActionable: 2,
|
||||
},
|
||||
};
|
||||
|
||||
const result = buildSelfAwareness(caps);
|
||||
expect(result).toContain('Learning from Past Sessions');
|
||||
expect(result).toContain('pdf_reader');
|
||||
expect(result).toContain('Keep it casual');
|
||||
expect(result).toContain('Recurring capability gaps');
|
||||
expect(result).toContain('User corrections to apply');
|
||||
});
|
||||
|
||||
it('omits improvement section when awareness has zero actionable signals', () => {
|
||||
const caps: AgentCapabilities = {
|
||||
tools: [],
|
||||
skills: [],
|
||||
model: 'test',
|
||||
memoryStats: { frameCount: 10, sessionCount: 2, entityCount: 3 },
|
||||
mode: 'local',
|
||||
version: '1.0.0',
|
||||
awareness: {
|
||||
capabilityGaps: [],
|
||||
corrections: [],
|
||||
workflowPatterns: [],
|
||||
totalActionable: 0,
|
||||
},
|
||||
};
|
||||
|
||||
const result = buildSelfAwareness(caps);
|
||||
expect(result).not.toContain('Learning from Past Sessions');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user