feat: per-project self-evolution — seed/load/learn + zo learnings promote#96
Merged
Conversation
…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>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Deploying zero-operators with
|
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
EvolutionEnginewas never imported/called,seed_priorsnever invoked,_prompt_memoryshowed only decision summaries. Now wired end-to-end:_maybe_seed_priors()writes the plan'sdomain_priorsinto the project.zo/memory/PRIORS.mdon first run (idempotent)._prompt_memoryinjects the project's priors ("accumulated learnings — honor these…") into every lead prompt.EvolutionEnginewired in;_record_learning()appends a durableauto-learningprior when the autonomous loop hits DEAD_END/PLATEAU, so the next iteration/session doesn't repeat the dead-end.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-auditswarm, 6 agents — confidentiality cleared)log_error(message=)bugs fixed (nomessageparam →TypeErrorin failure branches; surfaced by wiring the dead engine) + a forced-failure-branch regression test.docs/+ README → 21 agents; training-checker accordion inthe-team.mdx; self-evolution section +zo learningsinmemory-and-continuity.mdx/COMMANDS.md..DS_Store, gitignore.agents//.codex//AGENTS.md, fix deprecatedsource_direxample indraft.py.Verification
src/clean; validate-docs 0 failures.Deferred (audit #13/#15/#16/#17, queued): semantic reindex at session-end, agent failure-reporting protocol,
end_sessionDECISION_LOG/PRIORS integration,zo retrospectiveCLI.🤖 Generated with Claude Code