Skip to content

feat(platform): Phase 4 — evolution engine, CLI, integration tests#5

Merged
SamPlvs merged 1 commit into
mainfrom
claude/strange-swartz
Apr 9, 2026
Merged

feat(platform): Phase 4 — evolution engine, CLI, integration tests#5
SamPlvs merged 1 commit into
mainfrom
claude/strange-swartz

Conversation

@SamPlvs
Copy link
Copy Markdown
Owner

@SamPlvs SamPlvs commented Apr 9, 2026

Summary

Module 7: Evolution Engine

  • Full 5-step post-mortem protocol: record failure → analyze root cause → propose rule update → apply → verify
  • Root cause categories (missing_rule, incomplete_rule, ignored_rule, novel_case, regression) mapped to target documents (PRIORS.md, spec files, agent definitions)
  • Retrospective protocol for end-of-project pattern analysis
  • Evolution metrics tracking

Module 9: CLI + Draft

  • zo build <plan> — full orchestration pipeline with --gate-mode supervised|auto|full-auto
  • zo continue <project> — resume from STATE.md
  • zo maintain <project> — apply updated instructions
  • zo init <project> — scaffold project directories and template files
  • zo status <project> — display current STATE.md
  • zo draft <source-dir> --project <name> — agentic plan generation from source documents
  • Rich console output with ZO brand colors
  • Default gate mode: supervised (human required at every phase)

Integration Tests

  • 16 new integration tests covering full session lifecycle, memory+semantic integration, all 3 gate modes, plan edit detection, session recovery, comms logging, target isolation

Stats

  • 296 tests passing
  • 90% coverage (1,909 statements)
  • ruff clean
  • Version 0.4.0

Test plan

  • uv run python3 -m pytest tests/ -v — 296 passed
  • uv run ruff check src/zo/ — clean
  • Integration tests verify full pipeline flows end-to-end
  • Gate mode tests: supervised blocks all, auto respects plan, full_auto proceeds all
  • Session recovery: writes state at phase 2, new session resumes correctly
  • Evolution engine: post-mortem protocol tested with all 5 root cause categories

🤖 Generated with Claude Code

Module 7: Evolution Engine (evolution.py + _evolution_models.py)
- Full post-mortem protocol (5 steps): record failure → analyze root
  cause → propose rule update → apply update → verify
- Root cause categories: missing_rule, incomplete_rule, ignored_rule,
  novel_case, regression
- Maps categories to documents: PRIORS.md, spec files, agent definitions
- Retrospective protocol: scan decisions, identify patterns, propose
  systemic updates
- Evolution metrics: total updates, regression rate, category distribution

Module 9: CLI (cli.py + draft.py)
- zo build <plan> — launch project with full orchestration pipeline
- zo continue <project> — resume from STATE.md
- zo maintain <project> — apply updated instructions
- zo init <project> — scaffold project directory structure
- zo status <project> — show current STATE.md
- zo draft <source-dir> --project <name> — generate plan from source docs
- --gate-mode supervised|auto|full-auto (default: supervised)
- --no-tmux flag for headless operation
- Rich console output with ZO brand colors

Integration test suite (test_full_pipeline.py — 16 tests)
- Full session lifecycle (parse → init → decompose → advance → end)
- Memory + semantic index integration
- Gate mode verification (supervised/auto/full_auto)
- Plan edit detection and replan
- Session recovery flow
- Comms logging throughout pipeline
- Target isolation enforcement

296 tests, 90% coverage, ruff clean. Version 0.4.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@SamPlvs SamPlvs merged commit 5860d34 into main Apr 9, 2026
SamPlvs added a commit that referenced this pull request Apr 30, 2026
feat(platform): Phase 4 — evolution engine, CLI, integration tests
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