Skip to content

feat: per-project self-evolution — seed/load/learn + zo learnings promote#96

Merged
SamPlvs merged 1 commit into
mainfrom
claude/self-evolution
May 30, 2026
Merged

feat: per-project self-evolution — seed/load/learn + zo learnings promote#96
SamPlvs merged 1 commit into
mainfrom
claude/self-evolution

Conversation

@SamPlvs
Copy link
Copy Markdown
Owner

@SamPlvs SamPlvs commented May 30, 2026

Self-evolution — make ZO actually learn per project

The root fix for "ZO doesn't learn — I have to re-tell it every run." The machinery existed but was dead code: EvolutionEngine was never imported/called, seed_priors never invoked, _prompt_memory showed only decision summaries. Now wired end-to-end:

  • Seed_maybe_seed_priors() writes the plan's domain_priors into the project .zo/memory/PRIORS.md on first run (idempotent).
  • Load_prompt_memory injects the project's priors ("accumulated learnings — honor these…") into every lead prompt.
  • LearnEvolutionEngine wired in; _record_learning() appends a durable auto-learning prior when the autonomous loop hits DEAD_END/PLATEAU, so the next iteration/session doesn't repeat the dead-end.
  • Promote — new src/zo/promote.py + zo learnings promote: fail-closed automated sanitized promotion to platform PRIORS. Only generic-category priors that clear the client blocklist promote; domain/plan-seeded/blocklist-hit → blocked (reported, never auto-rewritten); no blocklist → nothing. (You chose "automated sanitized"; on this legal-critical public-repo path I went block-not-strip — stripping leaves garbled text and can miss adjacent project terms.) Adversarially tested.

Audit-driven cleanup (repo-cleanup-audit swarm, 6 agents — confidentiality cleared)

  • 4 latent log_error(message=) bugs fixed (no message param → TypeError in failure branches; surfaced by wiring the dead engine) + a forced-failure-branch regression test.
  • Experiment-checklist auto-refresh made best-effort (a checklist write failure can't break a registry mutation).
  • Docs-site drift: docs/ + README → 21 agents; training-checker accordion in the-team.mdx; self-evolution section + zo learnings in memory-and-continuity.mdx/COMMANDS.md.
  • Hygiene: untrack + gitignore .DS_Store, gitignore .agents//.codex//AGENTS.md, fix deprecated source_dir example in draft.py.

Verification

  • +32 tests → 812 passed / 7 skipped on Python 3.11 and 3.12. ruff src/ clean; validate-docs 0 failures.
  • PR-041 added: built ≠ wired; wiring dead code surfaces latent bugs; fail-closed > strip on public-repo paths.

Deferred (audit #13/#15/#16/#17, queued): semantic reindex at session-end, agent failure-reporting protocol, end_session DECISION_LOG/PRIORS integration, zo retrospective CLI.

🤖 Generated with Claude Code

…omote

Batch A of the process-hardening work — make ZO actually learn per
project. The EvolutionEngine + seed_priors were fully built and
unit-tested but never wired into a run (PR-009: built != wired):

- Seed: _maybe_seed_priors writes plan domain_priors into the project
  PRIORS.md on first run (idempotent).
- Load: _prompt_memory injects project priors ("accumulated learnings")
  into every lead prompt, not just decision summaries.
- Learn: EvolutionEngine wired in; _record_learning appends a durable
  auto-learning prior on the loop's DEAD_END/PLATEAU verdicts.
- Promote: new src/zo/promote.py + `zo learnings promote` — fail-closed
  sanitizer (generic-category + blocklist-clear only; block-not-strip;
  no-blocklist -> nothing). Adversarially tested.

Audit-driven cleanup (repo-cleanup-audit swarm, confidentiality cleared):
fix 4 latent log_error(message=) bugs in orchestrator failure branches
(+ regression test); make the experiment-checklist refresh best-effort;
docs-site drift (21 agents + training-checker accordion +
self-evolution/zo-learnings docs); gitignore .DS_Store/.agents/.codex/
AGENTS.md + untrack .claude/.DS_Store; fix draft.py docstring.

+32 tests (780 -> 812 on Python 3.11 & 3.12). ruff src/ clean,
validate-docs 0 failures. PR-041 captures the build-not-wired lesson.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 30, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
personal-6078e1c9 🟢 Ready View Preview May 30, 2026, 12:33 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying zero-operators with  Cloudflare Pages  Cloudflare Pages

Latest commit: 318199d
Status: ✅  Deploy successful!
Preview URL: https://20619a6c.zero-operators.pages.dev
Branch Preview URL: https://claude-self-evolution.zero-operators.pages.dev

View logs

@SamPlvs SamPlvs merged commit d828ab9 into main May 30, 2026
5 checks passed
@SamPlvs SamPlvs deleted the claude/self-evolution branch May 30, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant