feat(engine): state-mutation surface — phase lifecycle, finding resolve, drift hint (0.3.0) - #12
Merged
Merged
Conversation
…ve, drift hint, init fixes (0.3.0) From a second dogfooding session's P0-P4: - cz_transition_phase: blessed phase-status write (fixes cz_status freezing at Phase 0) - cz_resolve_finding: update finding status/note without hand-editing HARDENING - status drift hint: flag planned entities while phases are complete - preflight_advisory + init --workflow: clean_tree/tests advisory for docs/audit - init resolves engine cmd from sys.executable bindir; stops clobbering profile.lock - dogfood: marked Clauderizer's own Phase 0 complete via the new tool - +12 tests (84 total)
collincusce
pushed a commit
that referenced
this pull request
Jun 21, 2026
…verified User-run verification (2026-06-21): - O-07 resolved: 2 real hosts read the emitted config + surface the clauderizer MCP (Cursor prompts as slash commands = D-034 Tier-3 live + dev build; VS Code sees the MCP). No emitter corrections needed. - Criterion 4: Cursor Composer 2.5 Fast (non-Claude) drove a full gameplan end-to-end. Adherence findings (lesson #12 + output): 0 MCP calls, recovered via uvx clauderize ops CLI fallback (validates L-05), but hand-edited tracked docs. O-11 resolved. - Residual: O-10 amp shape untested; engine_stale clears on restart. All 5 P9 criteria met; phase 9 -> complete. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Fixes the state-mutation surface — the cluster a second dogfooding session root-caused (P0–P4). Diagnosis, verified in code: the read/knowledge surface is strong, but structured state drifted wherever the blessed write was missing (phases) or destructive (
init/profile.lock). The headline symptom:cz_statusreporting "Phase 0, nothing started" on a finished audit, because nothing could advance a phase.P0 — Phase lifecycle (the silent-misdirect fix)
cz_transition_phase(phase_n, to_status)—not_started/ready/in_progress/complete/blocked/failed(+ aliasesstart/done/block…), auto-stamps Started/Completed, updates both trackers. Phases hadcz_add_phasebut no way to advance them →cz_statusfroze. This is the write that keeps it honest.Phase 0 READYtono in-progress/ready phase(i.e. stopped lying on a shipped tool).P1 — Make drift visible (light, conservative)
cz_status/ SessionStart digest now emit⚠ Drift: N entities still 'planned' while M phase(s) complete — cz_transition_status to reconcile. Fires only when there's completed work and untouched entities, so it informs without crying wolf.P2 — Workflow-aware, non-crying-wolf preflight
init --workflow {code,docs,audit}+ apreflight_advisoryconfig list: failing advisory checks becomewarn, notfail. Docs/audit makeclean_treeadvisory (a dirty tree is normal when accumulating deliverables);auditalso makestestsadvisory.P3 —
initthat doesn't fight its usersys.executable) before PATH/uvx — reliable for venv/WSL even off PATH.profile.lock.tomlon re-run (was overwriting the per-project overrides my ownload_for_reporeads back — the fix was half a feature). Preserved now; delete to re-derive.P4 — Finding lifecycle
cz_resolve_finding(id, status, note)— update a finding's status + dated resolution note inHARDENING.md, honoring its "mark resolved, never delete" policy through a blessed path instead of a forbidden hand-edit. Append-only preserved.Deferred (consciously)
18 MCP tools now; +12 tests (84 total);
uv build+twine checkclean. Ships as 0.3.0 — cut av0.3.0Release to publish.🤖 Generated with Claude Code
https://claude.ai/code/session_01HiQppNdrQhiZ5vwMEdSCzT
Generated by Claude Code