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:
shumeiko.it
2026-10-20 00:54:58 +02:00
parent b734c1d3d2
commit 2e1999a3f6
112 changed files with 336 additions and 16165 deletions

View File

@@ -11,8 +11,8 @@
## 0. Where We Are
This branch turns the commercial Waggle OS codebase into an open-source **community edition**.
The conversion is in progress: the code still contains tiers, Stripe, KVARK, team mode and the
hive-mind memory substrate. Work packages remove or replace them one by one.
The conversion is in progress: the code still contains team mode and the hive-mind memory
substrate. Work packages remove or replace them one by one.
Sources of truth, in order:
1. The agreed scope ("Waggle OSS Agreed Scope Annex", held by the project owner).
@@ -63,7 +63,6 @@ npm workspaces with the root `package-lock.json`. Node `^20.19.0 || >=22.12.0`.
| `packages/agent`, `core`, `server`, `shared`, `sdk`, `weaver`, `marketplace`, `cli`, `launcher` | Keep. |
| `packages/memory-contract`, `packages/memory-mem0` | Keep. The memory contract and its mem0 implementation (ADR-0007). |
| `packages/waggle-dance`, `packages/worker` | Postponed: team mode stays in the repo, is not built or shipped (ADR-0003). |
| `packages/optimizer` | Excluded: part of self-learning (ADR-0004). Removed in P1.4. |
| `packages/hive-mind-*`, `memory-mcp`, `wiki-compiler` | Excluded once P1.5 moves all memory access to the contract. |
| `packages/admin-web`, `apps/www` | Excluded. |
| `apps/browser-ext` | Not decided. Do not extend it. |
@@ -94,10 +93,10 @@ packages/core/src/ # config, cron-store, file-store, vault, logger, te
packages/shared/src/ # shared types, Zod schemas, MCP catalog
```
To be removed by work packages, so do not build on them: `packages/shared/src/tiers.ts`
(P0.1), `packages/agent/src/kvark-tools.ts` and the evolution / improvement / correction
modules (P1.4), `packages/server/src/stripe/` and `packages/server/src/kvark/` (P1.1),
`packages/core/src/compliance/` and `install-audit.ts` (P1.2).
Already removed: tiers and Stripe (P0.1); KVARK, enterprise packs, the compliance
subsystem, self-learning and `packages/optimizer` (P1.4, P1.6, ADR-0004). Still to be
removed, so do not build on them: `install-audit.ts`, `team-sync` and `migration` in core
(P1.2), the team server runtime (P1.1).
---