Skip to content

Add template-version header to generated skills for drift detection - #33

Merged
dmccoystephenson merged 1 commit into
mainfrom
feature/template-version-header
May 25, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
feature/template-version-header

Conversation

@dmccoystephenson

@dmccoystephenson dmccoystephenson commented May 25, 2026 •

Copy link
Copy Markdown
Member

Summary

Every newly generated <slug>-dev-loop skill now starts with two HTML comments recording the template state at generation time:

<!-- template-version: {{TEMPLATE_VERSION}} -->
<!-- generated-at: {{GENERATED_AT}} -->

TEMPLATE_VERSION resolves to the short SHA of the create-dev-loop repo at generation time (git -C <path-to-create-dev-loop> rev-parse --short HEAD); GENERATED_AT resolves to an ISO-8601 UTC timestamp. Both are HTML comments so they don't render in the skill's prose but are grep-able for drift detection.

The substitution-table descriptions tell the generating agent exactly how to derive each value at Step 4 time — the issue mentioned Step 6, but Step 4 is the natural integration point (where ALL placeholders are populated). The end behavior matches the issue's intent.

Closes #22

Test plan

Deferred AC

  • AC Create a private GitHub repo for each new dev loop skill #4 (example-h-dev-loop Phase 9 drift-detection step) belongs in the dmccoystephenson/example-h-dev-loop repo, not this one — Phase 9 of example-h-dev-loop explicitly forbids self-modification from inside a cycle. Filing a follow-up issue against that repo is the right channel; recording it here as deferred.

drafted by Claude on behalf of Daniel Stephenson

Closes #22

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@dmccoystephenson dmccoystephenson left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review rubric:

  • Scope: PASS — 2 files; each addition directly maps to AC 1–3 or the CLAUDE.md PR-27 rule.
  • Tests-new: PASS — both new placeholders have substitution-table rows with concrete shell commands (git rev-parse --short HEAD and date -u +%Y-%m-%dT%H:%M:%SZ) that make them executable rather than aspirational.
  • Tests-fix: N/A — not a bug fix.
  • Sibling structure: PASS — new substitution rows match the format of neighboring rows (single-line markdown table cells with command-in-backticks).
  • Sibling renames: N/A.
  • Docs: PASS — Phase 7 sources (create-dev-loop.md, README.md) reviewed; README is high-level overview and doesn't mention HTML-comment headers (correctly out of scope for the README). RESEARCH.md §8 gets an Implementations entry per PR-27 rule.
  • Issue resolution: PARTIAL-but-disclosed — AC 1, 2, 3 met; AC 4 (cdl-dev-loop Phase 9 drift detection) explicitly deferred in PR body because it modifies a different repo's skill, which the cdl-dev-loop skill itself forbids self-modifying.
  • Validation: PASS — grep -oP '\{\{[A-Z_]+\}\}' shows both {{TEMPLATE_VERSION}} and {{GENERATED_AT}} in template body and substitution table; no fenced blocks introduced inside the outer template (HTML comments don't need escaping).
  • {{EXTERNAL_SIGNAL_LABEL}}: N/A — no CI for this repo; manual validation against the diff served as the anchor.
  • Placeholder-consistency: PASS — both new placeholders documented; no orphan rows.
  • Escaping: PASS — HTML comments are not fenced code blocks; no triple-backtick escape concern.

Adversarial probe — 'The issue says Step 6; you put it in Step 4. Is that a deviation?' Yes, but the deviation is rationalized in the PR body: Step 4 is where ALL placeholders are populated, so adding two placeholders there is consistent with the existing architecture. The end behavior (header populated at generation time with the right SHA) matches the issue's intent. If a reviewer pushes back, an inline reference in Step 6 pointing at Step 4 is a 1-line fix.

@dmccoystephenson
dmccoystephenson merged commit c6d4261 into main May 25, 2026
@dmccoystephenson
dmccoystephenson deleted the feature/template-version-header branch May 25, 2026 18:55
dmccoystephenson added a commit that referenced this pull request Aug 3, 2026
)

Closes #22

Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Add template-version header to generated skills for drift detection

1 participant