Close the discipline seams + context economics (review findings 1–3, 5) — 0.4.0/0.5.0 - #13
Merged
Merged
Conversation
…gs 1-3 Three phases: blessed cascade/lesson writes, marker-protected handoff regeneration, baseline write-back + completed-gameplan status. Adds project ADR D-008 (marker-delimited engine regions) and gameplan decisions D3-D5. https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
…ence (Phase 0) Closes review finding 1: the two writes the workflow demanded but only hand-edits could perform. - mutations.resolve_cascade / cz_resolve_cascade: record per-dependent verdicts + Updates applied/deferred on a cascade report; defaults to the latest pending report; partial resolution keeps it pending (same predicate as cz_status and the cascade_hygiene check, now public as status_bundle.pending_cascades) - mutations.obsolete_lesson / cz_obsolete_lesson: append the documented '(obsolete <date>: <reason>)' marker; never deletes; handoff roll-up prune now tolerates the dated marker - skills (cascade, do-phase, record) no longer instruct hand-edits; record routes risks to cz_add_finding - gameplan close-out dogfoods cz_resolve_cascade on the subsys.mutations 0.2.0 bump; correction C-01 logs the D-numbering placeholder bug Tests: 84 -> 88 passing. https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
Closes review finding 2: cz_write_handoff no longer clobbers agent enrichment. - engine content lives inside a clauderizer:handoff marker block (D-008); regeneration replaces only the block, everything outside is preserved byte-for-byte - fresh handoffs include an agent-owned 'Phase Notes' scaffold outside the markers - legacy migration (gameplan decision D6): unmarked files with the generator fingerprint are replaced as engine skeletons; anything else is preserved verbatim below the new block - cz_next_phase_context's in-memory view is now the merged view, so a context fetch includes on-disk enrichment Tests: 88 -> 93 passing. https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
…ock TOML (Phase 2) Closes review finding 3, plus two bugs the dogfooding surfaced. - a green preflight run that measures a test count now refreshes the active gameplan's 'Current baseline test count' line (anti-pattern #7 applied to the system itself: this repo's hook said '0 tests' with 84 passing); red runs never write back - a gameplan with every phase complete reports 'all N phase(s) COMPLETE' with close-out guidance instead of 'no in-progress or ready phase found' - writer.set_labeled_value: structured write for '**Label**: value' lines - FIX: Profile.to_lock_toml emitted invalid TOML for backslash regexes, and load_for_repo's silent fallback meant every python-profile lock was ignored wholesale; values are now TOML-escaped with a round-trip test across all packaged profiles, and doctor flags an unparseable lock - repo lock: 'pytest -q' doubled pyproject addopts into -qq, suppressing the count summary the baseline regex parses - CHANGELOG 0.4.0; version bump Tests: 93 -> 99 passing. https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
Three phases: lesson consolidation, promotion into a project-level LESSONS.md, and a memory gauge in the status digest. Project ADR D-009: consolidation pressure, not caps. https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
…is (Phase 0) First of finding 5's three mechanisms (D-009): adds the synthesized lesson, marks every source '(obsolete: consolidated into #N)', validates all sources before writing anything. Roll-ups shrink; the log keeps the trail. Tests: 99 -> 101 passing. https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
…e 1) The enduring half of D-009: lessons that should outlive their gameplan get an L-NN entry (with provenance) in a compact on-demand project doc that every future handoff carries, across gameplans. - promote_lesson: derives category from the source block, supports distilled text override, marks the source '(promoted <date>: L-NN)' - collect_lessons prunes '(promoted' like '(obsolete' — a promoted lesson appears exactly once per handoff, in the project section - obsolete_lesson accepts L-NN ids so the project list stays curated (cz_obsolete_lesson number is now a string) - close-gameplan skill gains the curation step; do-phase nudges consolidation - dogfood: 4 enduring lessons from the two closed gameplans promoted into this repo's docs/LESSONS.md Tests: 101 -> 107 passing. https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
…gameplan (Phase 2) - cz_status / SessionStart digest report 'Memory: N active lessons, M project (~K tok handoff)' and nudge toward consolidate/promote/ obsolete past ACTIVE_LESSONS_WARN (12, documented constant); the gauge is best-effort and can never break the digest - README model + MCP surface and the CLAUDE.md stanza catch up on the 0.4.0/0.5.0 tools; CHANGELOG 0.5.0; version bump - close-out dogfood: baseline write-back corrected this gameplan's index (0 -> 109), entity bumps cascaded once per D6, post-mortem written Tests: 107 -> 109 passing. https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
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.
Two gameplans, planned and executed through Clauderizer itself, closing four findings from an external review. Tests: 84 → 109 passing.
Gameplan 1:
2026-06-09-discipline-seams(0.4.0)Finding 1 — blessed writes the workflow demanded but only hand-edits could perform:
cz_resolve_cascade: record per-dependent verdicts + Updates applied/deferred on a cascade report (defaults to latest pending; partial resolution keeps it pending under the sharedpending_cascadespredicate)cz_obsolete_lesson: the documented(obsolete <date>: <reason>)marker, through a toolFinding 2 —
cz_write_handoffclobbered enrichment:clauderizer:handoffmarker block (ADR D-008); regeneration preserves everything outside byte-for-byte; agent-owned "Phase Notes" scaffold; safe legacy migration;cz_next_phase_contextreturns the merged viewFinding 3 — stale baseline & confusing completed-gameplan status:
Bugs the dogfooding caught:
Profile.to_lock_tomlemitted invalid TOML for backslash regexes andload_for_reposilently ignored the whole lock (fixed + round-trip test across all profiles +doctorcheck);pytest -qdoubling project addopts into-qqsuppressed the count summary.Gameplan 2:
2026-06-09-context-economics(0.5.0)Finding 5 — cumulative memory had no counter-pressure (ADR D-009: consolidation pressure, not caps; nothing is ever auto-deleted):
cz_consolidate_lessons: N overlapping lessons → 1 synthesized, sources marked with the trailcz_promote_lesson+ on-demanddocs/LESSONS.md: enduring lessons becomeL-NNentries with provenance, carried by every future handoff across gameplans;cz_obsolete_lessonacceptsL-NNfor curationcz_status/SessionStart digest:Memory: N active lessons, M project (~K tok handoff), warning past 12 active lessonsdocs/LESSONS.mdBoth gameplans close with POST-MORTEMs; known remaining items (cascade report filename collision, placeholder-aware numbering, Outputs Registry writes) are on their open-threads lists.
https://claude.ai/code/session_01E58aDTpwdFL1roj6tupLRX
Generated by Claude Code