Skip to content

fix: one convention for phase report filenames - #38

Merged
MCKRUZ merged 2 commits into
masterfrom
fix/report-filename-convention
Aug 1, 2026
Merged

fix: one convention for phase report filenames#38
MCKRUZ merged 2 commits into
masterfrom
fix/report-filename-convention

Conversation

@MCKRUZ

@MCKRUZ MCKRUZ commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Closes #36.

Stacked on #37 — based on fix/complete-fix-3-receipts, so this diff shows only its own change. Merge #37 first; GitHub will retarget this to master automatically.

The problem

Three naming conventions for the same generated files, shipping together:

Source Spelling Phase 9 example
phases/*.md zero-padded phase09-report.html
phase-registry.yaml artifacts.optional unpadded phase9-report.html
docs/commands.md registry slug 09-monitoring-report.html

03-foundation.md alone used both the padded and unpadded forms.

Why it actually mattered

Not just untidiness — two things were broken:

  1. commands/sdlc-gate.md pre-checks the visual report by slug. A team following the phase definition wrote phase09-visual.html; the gate looked for 09-monitoring-visual.html and reported it missing.
  2. The registry's artifacts.optional entries were dead. They could never match a real file produced under either of the other two conventions.

The fix

All 38 references now use <slug>-report.html / <slug>-visual.html.

The slug wins because it is what generate_phase_report.py is actually invoked with (its own docstring example is build-report.html), and it is the only form that survives the non-numeric build and close phases — phase4-report.html has no meaning.

The rename was applied mechanically with the mapping derived from the registry rather than hardcoded, so it cannot silently disagree with the registry it was meant to match.

Test plan

  • Full suite: 538 passed, 6 skipped
  • Zero phase\d+-(report|visual)\.html references remain anywhere
  • The 17 surviving names reviewed by hand and all on the slug convention
  • New guard test_phase_reports_use_the_registry_slug_convention mutation-tested — reintroduced phase09-visual.html, confirmed it fails, restored

Note

Phase 2 has no -visual counterpart. That is deliberate, not a gap: its diagram artifact is separately named .sdlc/reports/architecture-diagrams.html. Left as-is.

🤖 Generated with Claude Code

Three were in use at once: phase bodies wrote phase09-report.html, the
registry's optional lists said phase9-report.html, and docs/commands.md
documented <slug>-report.html. 03-foundation.md alone used both the padded
and unpadded forms.

Two real consequences, not just untidiness. commands/sdlc-gate.md
pre-checks the visual report by slug, so a team following the phase
definition wrote phase09-visual.html while the gate looked for
09-monitoring-visual.html and reported it missing. And the registry's
artifacts.optional entries could never match a real file under either of
the other conventions, so those entries were dead.

All 38 references now use <slug>-report.html / <slug>-visual.html. The slug
wins because it is what generate_phase_report.py is invoked with and the
only form that survives the non-numeric build and close phases.

Mapping derived from the registry rather than hardcoded. Adds a check to
test_registry_docs_consistency.py, proven by reintroducing a padded name
and confirming it fails. 538 passed, 6 skipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEA6GZUG9NKNQYrJKyDGdb
@MCKRUZ
MCKRUZ deleted the branch master August 1, 2026 20:59
@MCKRUZ MCKRUZ closed this Aug 1, 2026
@MCKRUZ MCKRUZ reopened this Aug 1, 2026
@MCKRUZ
MCKRUZ changed the base branch from fix/complete-fix-3-receipts to master August 1, 2026 21:00
@MCKRUZ
MCKRUZ merged commit 9fcf03c into master Aug 1, 2026
6 checks passed
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.

bug: report filenames use three different conventions across phase files, registry and docs

1 participant