Skip to content

Retrofit reconciles newly-added fill-in docs instead of shipping raw skeletons#43

Merged
drabaioli merged 2 commits into
mainfrom
gh_issue_41_retrofit_reconcile_adds
Jul 1, 2026
Merged

Retrofit reconciles newly-added fill-in docs instead of shipping raw skeletons#43
drabaioli merged 2 commits into
mainfrom
gh_issue_41_retrofit_reconcile_adds

Conversation

@drabaioli

Copy link
Copy Markdown
Owner

Summary

In upgrade mode, /cdd-retrofit compares each CDD-managed file three ways against the baseline. A file the template has accrued since the target's baseline shows up as an add — and it may be a fill-in skeleton whose placeholder defaults make false claims about a mature project (the motivating case: engineering-practices.md arriving with <test command>/<ci workflow> placeholders and provisional <Enforced once…> markers, claiming no gate exists in a project already running pytest, ruff, and CI).

This change stops shipping those adds raw:

  • .claude/commands/cdd-retrofit.md §4.4 — for every proposed add, scan the staged render for residual <...> tokens (the two identifiers are already substituted, so anything left is genuine fill-in content). If present, make a lightweight best-effort reconciliation pass filling fields confidently detectable from the target's actual state, under the same per-file approval as any other write. Never fabricate a value; leave what you can't determine and let the summary flag it. Includes a worked engineering-practices.md example.
  • .claude/commands/cdd-retrofit.md §5 — new "Added — needs reconciliation" report category, distinct from clean adds, so residual-placeholder files read as an action item rather than a silent success.
  • Process doc §6 — upgrade-mode existing-project paragraph updated to describe the reconcile-don't-ship-raw behavior; install mode stays deliberately exempt (the whole template lands as skeleton by design there, and the first /cdd-next-step doc-reconciliation task is the intended mechanism).
  • doc/features/template.md — upgrade-mode bullet reconciled to reflect the added-skeleton behavior (pre-PR reconciliation).

Best-effort by design; /cdd-pre-pr remains the systematic backstop.

Testing

  • bash -n clean across scripts/tools/demo
  • command-set drift: clean; prompt-seam: clean
  • install-smoke, worktree-resume, template-smoke, end-to-end bootstrap smoke, demo seed-overlay smoke: all pass

Prompt/doc-only change (interpreted by the LLM at retrofit time); no harness tests prompt semantics, and the structural seam/drift guardrails pass — matching the repo norm for prompt edits.

Closes #41

🤖 Generated with Claude Code

drabaioli and others added 2 commits July 1, 2026 22:12
…skeletons (#41)

In upgrade mode, files newer than the target's baseline are added. When such a
file is a fill-in skeleton, its placeholder defaults make false claims about a
mature project (the motivating case: engineering-practices.md landing with
unfilled <test command>/<ci workflow> placeholders and provisional <Enforced
once…> markers in a project already enforcing pytest, ruff, and CI).

cdd-retrofit.md §4.4 now scans each staged added file for residual <...> tokens
(genuine fill-in, since the render already substitutes the two identifiers),
makes a best-effort reconciliation of the fields it can confidently detect from
project state under the existing per-file approval, and §5 flags any file left
with residual placeholders/provisional markers under a distinct 'added — needs
reconciliation' category. Kept lightweight; /cdd-pre-pr stays the backstop.
Install mode is exempt (whole template lands as skeleton by design).

Process-first: the process doc's §6 existing-project section carries the
matching sentence. Roadmap Phase 10 records what landed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The upgrade-mode bullet in doc/features/template.md summarized the
three-way comparison but was silent on the newly-added-file case. Add a
clause noting that files the template accrued since the baseline are
reconciled rather than shipped raw, with residual-placeholder files
flagged in the summary.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@drabaioli drabaioli merged commit 7bf089b into main Jul 1, 2026
1 check passed
@drabaioli drabaioli deleted the gh_issue_41_retrofit_reconcile_adds branch July 1, 2026 20:37
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.

Retrofit ships newly-added skeleton docs with unfilled placeholders into mature projects

1 participant