Skip to content

Close the discipline seams + context economics (review findings 1–3, 5) — 0.4.0/0.5.0 - #13

Merged
collincusce merged 9 commits into
mainfrom
claude/clauderizer-feedback-sjk1eu
Jun 9, 2026
Merged

Close the discipline seams + context economics (review findings 1–3, 5) — 0.4.0/0.5.0#13
collincusce merged 9 commits into
mainfrom
claude/clauderizer-feedback-sjk1eu

Conversation

@collincusce

Copy link
Copy Markdown
Owner

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 shared pending_cascades predicate)
  • cz_obsolete_lesson: the documented (obsolete <date>: <reason>) marker, through a tool
  • skills no longer instruct hand-edits anywhere

Finding 2 — cz_write_handoff clobbered enrichment:

  • engine content lives in a clauderizer:handoff marker block (ADR D-008); regeneration preserves everything outside byte-for-byte; agent-owned "Phase Notes" scaffold; safe legacy migration; cz_next_phase_context returns the merged view

Finding 3 — stale baseline & confusing completed-gameplan status:

  • green preflight runs write the measured test count back to the tracked baseline line; all-phases-complete gameplans report "all N phase(s) COMPLETE" with close-out guidance

Bugs the dogfooding caught: Profile.to_lock_toml emitted invalid TOML for backslash regexes and load_for_repo silently ignored the whole lock (fixed + round-trip test across all profiles + doctor check); pytest -q doubling project addopts into -qq suppressed 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 trail
  • cz_promote_lesson + on-demand docs/LESSONS.md: enduring lessons become L-NN entries with provenance, carried by every future handoff across gameplans; cz_obsolete_lesson accepts L-NN for curation
  • memory gauge in cz_status/SessionStart digest: Memory: N active lessons, M project (~K tok handoff), warning past 12 active lessons
  • dogfood: 4 enduring lessons from the closed gameplans promoted into this repo's docs/LESSONS.md

Both 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

claude added 9 commits June 9, 2026 18:44
…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
@collincusce
collincusce merged commit 7cf5ae1 into main Jun 9, 2026
3 checks passed
@collincusce
collincusce deleted the claude/clauderizer-feedback-sjk1eu branch July 28, 2026 21:30
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.

2 participants