Skip to content

init: stamp the version when writing the skill, not when authoring the template - #15

Merged
mohameduk merged 1 commit into
mainfrom
init-stamp-version
Aug 28, 2026
Merged

mohameduk merged 1 commit into
mainfrom
init-stamp-version

Conversation

@mohameduk

Copy link
Copy Markdown
Owner

The staleness check added in #14 shipped broken and would have gone off on the next release.

ubag_skill_version was a literal in the template, so a skill written today says 0.6.0 no matter when it was written. check() compares that stamp to the installed version. Publish 0.6.1 and every freshly written skill reports itself stale one second after ubag init created it, on both SDKs, for everyone.

A check that fires on files it just wrote is a check people turn off, which costs more than never having built it.

Invisible right now only because the literal and the installed version happen to be the same number. It was going to surface on the release that puts ubag init in front of users for the first time.

Fix

The stamp is substituted at write time from a {{ubag_version}} placeholder. install() and check() take an optional version so a bump is testable without publishing anything.

Verified across a simulated release:

stamp in the written skill:   ubag_skill_version: 0.6.0
check today:                  UBAG skills are current (0.6.0).
check as if 0.6.1 shipped:    ubag-publisher: 0.6.0, SDK is 0.6.1
                              ubag-agent: 0.6.0, SDK is 0.6.1

Tests

Three new on each side:

  • a skill written at one version is stale at the next, and names the old one
  • the placeholder never reaches a written file
  • the shipped template still contains the placeholder

That last one guards the direction that caused this. Bake a literal back into the template and substitution silently becomes a no-op with every other test still green.

Python 105 passed, Node 113 passed.

🤖 Generated with Claude Code

…e template

The staleness check shipped broken and would have gone off on the next release.

ubag_skill_version was a literal in the template, so a skill written today says
0.6.0 no matter when it was written. check() compares that stamp to the
*installed* version. Publish 0.6.1 and every freshly written skill reports itself
stale one second after `ubag init` created it, on both SDKs, for everyone. A
check that fires on files it just wrote is a check people turn off, which costs
more than never having built it.

Invisible right now only because the literal and the installed version happen to
be the same number. It was going to surface on the release that puts `ubag init`
in front of users for the first time.

The stamp is now substituted at write time from a {{ubag_version}} placeholder.
install() and check() take an optional version so the bump is testable without
publishing anything, and both SDKs gained the same three tests:

  a skill written at one version is stale at the next, and names the old one
  the placeholder never reaches a written file
  the shipped template still contains the placeholder

That last one guards the direction that caused this. Bake a literal back into
the template and substitution silently becomes a no-op with every other test
still green.

Python 105 passed, Node 113 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mohameduk mohameduk mentioned this pull request Aug 28, 2026
@mohameduk
mohameduk merged commit f8d6374 into main Aug 28, 2026
6 checks passed
@mohameduk mohameduk mentioned this pull request Aug 28, 2026
mohameduk added a commit that referenced this pull request Sep 16, 2026
init: stamp the version when writing the skill, not when authoring the template
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.

1 participant