|
| 1 | +# App Modernization Skills |
| 2 | + |
| 3 | +This repo is the **single source of truth** for Java app modernization skill files. Changes here are automatically synced to downstream repos via GitHub Actions. |
| 4 | + |
| 5 | +## Downstream Repos |
| 6 | + |
| 7 | +| Repo | Description | |
| 8 | +|------|-------------| |
| 9 | +| [Extension repo](https://github.com/devdiv-azure-service-dmitryr/azure-java-migration-copilot-vscode-extension) | VS Code extension for Java migration | |
| 10 | +| [CLI repo](https://github.com/devdiv-azure-service-dmitryr/modernize-cli) | Modernize CLI tool | |
| 11 | + |
| 12 | +## Repo Structure |
| 13 | + |
| 14 | +``` |
| 15 | +skills/ # Skill files (source of truth) |
| 16 | +skill-mapping.csv # Maps skill files to downstream repo paths |
| 17 | +scripts/sync-skills.sh # Sync script used by GitHub Actions |
| 18 | +.github/workflows/ # GitHub Actions workflow |
| 19 | +``` |
| 20 | + |
| 21 | +## How It Works |
| 22 | + |
| 23 | +1. Edit skill files under `skills/`. |
| 24 | +2. On push to `main`, the GitHub Actions workflow reads `skill-mapping.csv` row by row and syncs each skill file to the downstream repos. |
| 25 | +3. The workflow creates a PR in each downstream repo with the updated content. |
| 26 | + |
| 27 | +Key behaviors: |
| 28 | +- **Front matter is preserved** — each downstream repo keeps its own front matter; only the body content is replaced. |
| 29 | +- **Skill comments are stripped** — blocks wrapped in `/~~ ... ~/` are not synced to downstream repos. Use these for internal notes. |
| 30 | + |
| 31 | +## Skill File Format |
| 32 | + |
| 33 | +Each skill file lives in `skills/` with its own front matter: |
| 34 | + |
| 35 | +```md |
| 36 | +--- |
| 37 | +name: Migrate Oracle to PostgreSQL |
| 38 | +description: Migrate Oracle Database to PostgreSQL database in a Java project |
| 39 | +--- |
| 40 | + |
| 41 | +Skill content here... |
| 42 | +``` |
| 43 | + |
| 44 | +### Skill Comments |
| 45 | + |
| 46 | +Use the `/~~ ... ~/` block to add comments that will **not** be synced downstream: |
| 47 | + |
| 48 | +```md |
| 49 | +/~~ |
| 50 | +~ This comment will not appear in downstream repos. |
| 51 | +~/ |
| 52 | +``` |
| 53 | + |
| 54 | +## Skill Mapping |
| 55 | + |
| 56 | +The `skill-mapping.csv` file maps each skill to its path in the downstream repos: |
| 57 | + |
| 58 | +```csv |
| 59 | +skill file path,extension repo kb file path,CLI repo skill file path |
| 60 | +oracle-to-postgresql.md,kb/database-tasks/oracle-to-postgresql.md,src/.../SKILL.md |
| 61 | +``` |
| 62 | + |
| 63 | +When adding a new skill, add a row to this CSV with the corresponding downstream paths. |
| 64 | + |
| 65 | +## GitHub Actions |
| 66 | + |
| 67 | +The sync workflow can be triggered: |
| 68 | + |
| 69 | +- **Automatically** — on any push to `main` that modifies `skills/**` or `skill-mapping.csv`. |
| 70 | +- **Manually** — via workflow dispatch with the following parameters: |
| 71 | + - **skill_branch** — Skill repo branch to sync from (default: `main`). |
| 72 | + - **extension_repo_branch** — Extension repo branch to sync into (default: `main`). Set to empty string to skip. |
| 73 | + - **cli_repo_branch** — CLI repo branch to sync into (default: `main`). Set to empty string to skip. |
| 74 | + |
| 75 | +### Prerequisites |
| 76 | + |
| 77 | +A repository secret `DOWNSTREAM_REPO_PAT` must be configured with a GitHub Personal Access Token that has write access to both downstream repos. |
0 commit comments