Skip to content

feat: add modernise-apps skill - #2

Draft
kabaros wants to merge 2 commits into
mainfrom
modernise-skill
Draft

kabaros wants to merge 2 commits into
mainfrom
modernise-skill

Conversation

@kabaros

@kabaros kabaros commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

implements https://dhis2.atlassian.net/browse/LIBS-866

Built with Claude, guided and tested by @kabaros

Adds a new modernise-apps skill for bringing existing DHIS2 apps up to date, covering five things an app can need any combination of, or none:

  • Yarn → pnpm — bumps cli-app-scripts, converts the lockfile, and fixes the phantom-dependency issues Yarn 1's flat hoisting used to hide.
  • @dhis2/cli-style → shared configs — replaces d2-style with the new @dhis2/config-* packages (eslint, prettier, stylelint, ls-lint, commitlint — whichever the app already had configured) and moves git hooks to native husky/lint-staged.
  • Platform library bumps — updates @dhis2/ui, @dhis2/app-runtime, and @dhis2/d2-i18n. Non-breaking (current major) by default for each; if latest would cross a major for any of them, that's treated as an explicit decision rather than taken silently.
  • README refresh — a pnpm badge alongside existing badges, an app description pulled from the App Hub when the app is published there, and the scaffold's verbose "Available Scripts" section collapsed into a concise "Get Started".
  • CI modernisation — replaces bespoke GitHub Actions workflows with the shared dhis2/workflows-platform reusable workflows wherever one exists, and bumps outdated actions and the Node version in whatever stays custom. Also documents a real gap: workflows-platform's lint.yml/lint-commits.yml/lint-pr-title.yml internally depend on @dhis2/cli-style (even on the @pnpm branch), so an app that's migrated off cli-style needs a custom commitlint step — or the pnpm-no-cli-style branch, once published — instead of adopting those three as-is.

Each task ends with an install/build/lint pass, plus an optional opt-in e2e sanity check that boots the app against a real DHIS2 server and confirms it still renders after login.

Includes 10 evals (scaffolded + real-app fixtures, individual and combined, plus dedicated CI-migration fixtures) comparing with-skill vs. baseline agent runs.

Test plan

  • npx skills add /path/to/ai-devtools --skill modernise-apps -y against a real Yarn/cli-style app and confirm all tasks complete cleanly
  • Eval suite passes (src/skills/modernise-apps-workspace)

@kabaros
kabaros marked this pull request as draft September 14, 2026 08:42
Covers two independent modernisation tasks for existing DHIS2 apps:
migrating the package manager from Yarn to pnpm, and moving off
@dhis2/cli-style onto the shared @dhis2/config-* packages (eslint,
prettier, stylelint, ls-lint, commitlint -- whichever the app already
had configured), plus a non-breaking @dhis2/ui version bump. Removes
@dhis2/cli-style only once every config it was proxying has a real
replacement.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@kabaros kabaros changed the title feat: add modernise repo skill feat: add modernise-apps skill Sep 16, 2026
…esh step

Adds a third independent modernisation task -- moving bespoke GitHub
Actions workflows onto dhis2/workflows-platform reusable workflows and
bumping outdated actions/Node versions -- documented in the new
references/ci-migration.md, including the known gap where
lint.yml/lint-commits.yml/lint-pr-title.yml internally require
@dhis2/cli-style and the pnpm-no-cli-style branch that fixes it.

Also adds a README-refresh step to the pnpm migration (pnpm badge, an
App Hub-sourced app description matched by d2.config.js's id, and a
concise "Get Started" section replacing the scaffold's verbose
per-script "Available Scripts" layout), extends the platform-library
bump step to cover @dhis2/app-runtime and @dhis2/d2-i18n alongside
@dhis2/ui (non-breaking by default, with an explicit choice offered
if latest would cross a major), and extends the eval suite with
dedicated CI-migration fixtures (a real app-management-app snapshot
and a synthetic one to avoid the confound of a baseline agent finding
an already-fixed real repo to copy).

Co-Authored-By: Claude Sonnet 5 <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.

1 participant