Skip to content

feat: add calendar-upgrade skill - #4

Open
kabaros wants to merge 1 commit into
mainfrom
multi-calendar-dates-skill
Open

kabaros wants to merge 1 commit into
mainfrom
multi-calendar-dates-skill

Conversation

@kabaros

@kabaros kabaros commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a calendar-upgrade skill for moving existing DHIS2 apps onto @dhis2/multi-calendar-dates 3.x (3.2.0+) and @js-temporal/polyfill 0.5.1. This was split out of the modernise-apps skill (#2). It is a behavioural migration rather than a tooling one, and people ask for it on its own ("update multi-calendar-dates in this app").

dhis2/multi-calendar-dates#102 removed Temporal types from the library's public API. Code that gets this wrong still compiles and runs, but returns wrong dates, so every step is guarded by regression snapshots captured before the change.

  • @dhis2/ui prerequisite. Versions before 10.19.3 bring their own multi-calendar-dates 2.x. If the app is on an older 10.x, the skill bumps @dhis2/ui first in its own commit, pointing to modernise-apps' platform library bump step when that skill is installed. If the app is on 9.x or older, it stops and asks, because that is a separate breaking upgrade.
  • Library bump. Before/after snapshot tests cover every direct import (getNowInCalendar, the period helpers, useDatePicker) across gregory, ethiopian and nepali. They are captured on the installed version and re-run unmodified with --ci after the bump.
  • Helper migration. Hand-rolled calendar date formatting and arithmetic move onto formatCalendarDate, addToCalendarDate and getDaysInMonth, and the app's own helpers are deleted.
  • Direct polyfill upgrade. Apps that import @js-temporal/polyfill themselves (often pinned to 0.4.3 via resolutions) move to 0.5.1 as a real dependency, with the same snapshot treatment. CLDR 48 (Node 24) breaks Ethiopic eras in both versions (LIBS-830). The skill patches 0.4.3 only temporarily to capture the baseline, and keeps a 0.5.1 patch in its own commit, with an offer to revert it.
  • Bundle check. The skill lists the Temporal copies in the production build from its source maps, and works to get them down to the library's vendored copy plus 0.5.1.

The content is unchanged from what was in modernise-apps, reorganised into three reference files (multi-calendar-dates-bump.md, temporal-polyfill-upgrade.md and bundle-temporal-check.md), with a new SKILL.md and the @dhis2/ui prerequisite added.

Test plan

  • Run the eval (multi-calendar-dates-bump-aggregate-data-entry-app). It needs the real-aggregate-data-entry-app fixture copied into src/skills/calendar-upgrade-workspace/fixtures/.
  • npx skills add /path/to/ai-devtools --skill calendar-upgrade -y against an app on multi-calendar-dates 2.x and confirm the skill triggers on "update multi-calendar-dates".

🤖 Generated with Claude Code

Moves DHIS2 apps onto @dhis2/multi-calendar-dates 3.2.0+ and direct
@js-temporal/polyfill usage onto 0.5.1, as a behavioural migration:
before/after regression snapshots, migrating hand-rolled date code onto
formatCalendarDate/addToCalendarDate/getDaysInMonth, the Ethiopic era
patch for CLDR 48, and a source-map check of the Temporal copies in the
build. Checks @dhis2/ui is 10.19.3+ first, since older versions bring
their own multi-calendar-dates 2.x.

Split out of the modernise-apps skill, which now points to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kabaros kabaros changed the title feat: add multi-calendar-dates-upgrade skill feat: add calendar-upgrade skill Oct 15, 2026
@kabaros
kabaros force-pushed the multi-calendar-dates-skill branch from 1b9e825 to 106c0d6 Compare October 15, 2026 14:23
@kabaros
kabaros requested a review from KaiVandivier October 15, 2026 16:17
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