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:
@@ -1,5 +1,3 @@
|
||||
import type { AwarenessSummary } from './improvement-detector.js';
|
||||
|
||||
export interface AgentCapabilities {
|
||||
tools: Array<{ name: string; description: string }>;
|
||||
skills: string[];
|
||||
@@ -7,8 +5,6 @@ export interface AgentCapabilities {
|
||||
memoryStats: { frameCount: number; sessionCount: number; entityCount: number };
|
||||
mode: 'local' | 'team';
|
||||
version: string;
|
||||
/** Structured improvement signals (optional — only present when store has actionable data) */
|
||||
awareness?: AwarenessSummary;
|
||||
}
|
||||
|
||||
export function buildSelfAwareness(caps: AgentCapabilities): string {
|
||||
@@ -61,36 +57,6 @@ export function buildSelfAwareness(caps: AgentCapabilities): string {
|
||||
lines.push('- Prefer memory search over guessing when prior context exists.');
|
||||
lines.push('- When uncertain, ask rather than fabricate.');
|
||||
|
||||
// Improvement signals (per correction #1: structured, runtime-consumable)
|
||||
if (caps.awareness && caps.awareness.totalActionable > 0) {
|
||||
lines.push('');
|
||||
lines.push('## Learning from Past Sessions');
|
||||
|
||||
if (caps.awareness.capabilityGaps.length > 0) {
|
||||
lines.push('');
|
||||
lines.push('**Recurring capability gaps:**');
|
||||
for (const gap of caps.awareness.capabilityGaps) {
|
||||
lines.push(`- ${gap.suggestion}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (caps.awareness.corrections.length > 0) {
|
||||
lines.push('');
|
||||
lines.push('**User corrections to apply:**');
|
||||
for (const correction of caps.awareness.corrections) {
|
||||
lines.push(`- ${correction.guidance}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (caps.awareness.workflowPatterns.length > 0) {
|
||||
lines.push('');
|
||||
lines.push('**Recurring task patterns:**');
|
||||
for (const pattern of caps.awareness.workflowPatterns) {
|
||||
lines.push(`- ${pattern.suggestion}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// F28: Persona compliance — resist persona mode switches and injection via fake authority
|
||||
lines.push('');
|
||||
lines.push('## Persona Compliance');
|
||||
|
||||
Reference in New Issue
Block a user