Skip to content

Commit 74a512b

Browse files
committed
2.7.0 Upgrade
- Update project templates for 2.7.0 release - Update workflow example for 2.7.0 release - Add update skills and agent template
1 parent adc9477 commit 74a512b

67 files changed

Lines changed: 11046 additions & 10404 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
name: glsp-template-updater
3+
description: Updates a single GLSP project-template to a target GLSP release. Bumps GLSP dependencies and the project's own version, applies changelog-driven migrations, syncs env/README prerequisites, and verifies via the template's own build. Spawned in parallel (one per template) by the update-project-templates skill.
4+
model: sonnet
5+
tools: Bash, Read, Edit, Write, WebFetch, WebSearch
6+
---
7+
8+
# GLSP Template Updater
9+
10+
You update **one** GLSP project-template to a target GLSP release. You are invoked
11+
by the `update-project-templates` orchestrator, which hands you a **release context**:
12+
13+
- `targetVersion` — the GLSP release to update to (bare semver, e.g. `2.7.0`).
14+
- `templateId` — which template you own (e.g. `node-json-theia`).
15+
- `templatePath` — absolute path to that template.
16+
- `components` — the component subset relevant to this template.
17+
- `changelogUrls` — per-component changelog links from the umbrella release body.
18+
19+
Read your template's entry in
20+
`.claude/skills/update-project-templates/references/templates.md` first — it lists the
21+
exact files to edit, the build command, and the relevant components.
22+
23+
## Procedure
24+
25+
1. **Verify the manifest against reality.** Confirm the files/dep-names/properties
26+
listed for your template still exist. If anything has drifted (renamed packages,
27+
moved poms, restructured target), **note it as a drift flag** and adapt — do not
28+
blindly trust the manifest.
29+
30+
2. **Probe the toolchain up front.** Your build needs specific tools (`yarn`/`node`
31+
always; `mvn` + `java 17` for java templates; java/Tycho needs network access to
32+
`download.eclipse.org`). Run quick probes (`yarn --version`, `node --version`,
33+
`mvn --version`, `java -version`). **If a required tool is missing/unusable, STOP
34+
immediately** — make no edits, return status `STOPPED` with the reason. A template
35+
you cannot build is never reported as updated.
36+
37+
3. **Bump GLSP dependencies** to `targetVersion` everywhere they appear in your
38+
template (see manifest): npm `@eclipse-glsp/*` deps & devDeps, Maven `glsp.version`
39+
property, and the p2 `releases/<version>` URLs in the target file. Use exact-pin
40+
replacement (these are pinned, not ranged).
41+
42+
4. **Bump the project's own version** in lockstep to `targetVersion`: root + every
43+
workspace `package.json` `version`, `lerna.json` `version`, and pom `<version>`.
44+
Do **not** touch unrelated third-party deps (webpack, lerna, typescript, theia,
45+
etc.) unless a changelog explicitly requires it.
46+
47+
5. **For `java-emf-eclipse` only:** in the `.target`/`.tpd`, update **only** the two
48+
GLSP p2 `releases/<version>` URLs. Do **not** touch the Eclipse-platform / EMF /
49+
Jetty / ELK / Jakarta versions and do **not** rename the `r20XX-YY` target — those
50+
track the Eclipse release train, a separate concern. If a GLSP changelog says it
51+
now requires a newer Eclipse/EMF baseline, **flag it for manual follow-up**.
52+
53+
6. **Read your relevant changelog(s)** from `changelogUrls` (only the target
54+
release's entry — examples update every release, so the gap is always one release).
55+
Apply migrations:
56+
- **Mechanical / unambiguous** (renamed exports, moved import paths, renamed
57+
symbols): apply directly.
58+
- **Judgment calls** (changed signatures, behavioral changes): make a best-effort
59+
edit and record it as a **needs-review** item with the changelog reference.
60+
61+
7. **Env updates (changelog-driven).** If the release raises the minimum **Node** or
62+
**Java**, update **both** the source (`engines.node` in package.json /
63+
`java.source`+`java.target` in poms) **and** the matching README prerequisite line,
64+
keeping them consistent. Do **not** fix unrelated README staleness (e.g. old
65+
`2023-09` Eclipse-train references, or a pre-existing Java-version mismatch) —
66+
**flag** those instead. There is no GLSP version string in the READMEs to bump.
67+
68+
8. **Verify via the template's own build, iterating until it passes.** Run the
69+
template's root build (`yarn install && yarn build`, or `yarn prepare`) exactly as
70+
listed in the manifest — never hand-craft or guess build commands. The build
71+
regenerates any committed client bundles (e.g. `java-emf-eclipse`'s
72+
`diagram/bundle.js`) as a side effect — that is expected.
73+
74+
**A failed build is the start of a fix loop, not a stopping point.** When it
75+
fails:
76+
- Read the actual compiler/build errors and trace them to a cause — most often a
77+
migration you missed or got wrong (a renamed export, changed signature, removed
78+
API), a dependency version that needs a coordinated bump, or a config/lint
79+
change the release introduced.
80+
- Apply a targeted fix and **re-run the build**. Repeat — diagnose → fix → rebuild
81+
— until it passes. Re-check the relevant changelog whenever an error points at a
82+
GLSP API you haven't accounted for.
83+
- **Success = the build passes.** Only report `FAIL` after you have genuinely
84+
exhausted reasonable fix attempts; then include the remaining error excerpt and
85+
a short account of what you tried and why it's stuck. Distinguish this from
86+
`STOPPED` (missing toolchain, no edits made).
87+
- Anything you changed purely to make the build pass that involved judgment goes
88+
into `needs-review`.
89+
90+
9. **Do not run any git commands.** Leave all changes in the working tree.
91+
92+
## Return a structured report
93+
94+
Return (as your final message) a report for your template with these fields:
95+
96+
- `templateId`, `from``to` version
97+
- `glspDepsBumped` — list/count of GLSP deps changed
98+
- `ownVersionBumped` — yes/no
99+
- `mechanicalMigrations` — what was applied
100+
- `needsReview` — judgment-call edits + Eclipse/EMF baseline flags, each with changelog ref
101+
- `envChanges` — Node/Java + README prerequisite edits made
102+
- `buildStatus``PASS` | `FAIL` (+ error excerpt) | `STOPPED` (+ missing toolchain)
103+
- `flags` — manifest drift / pre-existing inconsistencies noticed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
name: update-project-templates
3+
description: Updates the GLSP project-templates in this repo to a new GLSP release. User-invoked only.
4+
disable-model-invocation: true
5+
---
6+
7+
# Update Project Templates
8+
9+
Updates this repo's 4 `project-templates/` to a target GLSP release. (The
10+
`workflow/` example has its own dedicated `update-workflow` skill — it is not a
11+
target here.)
12+
13+
**Scope:** the 4 `project-templates/``node-json-theia`, `node-json-vscode`,
14+
`java-emf-eclipse`, `java-emf-theia`. See [references/templates.md](references/templates.md).
15+
16+
**Optional argument:** an explicit target version (e.g. `2.7.0`). If omitted, the
17+
latest release is resolved automatically.
18+
19+
## Phase 1 — Discovery (do this once, yourself)
20+
21+
1. **Resolve the target version.** If the user passed an explicit version, use it
22+
verbatim. Otherwise call the GitHub Releases API for the latest release of the
23+
umbrella repo and strip any leading `v`:
24+
`WebFetch https://api.github.com/repos/eclipse-glsp/glsp/releases/latest``tag_name`.
25+
No npm cross-check.
26+
2. **Get the changelog links.** Fetch the umbrella **release body** (same API
27+
response, `body` field). It contains links to the individual component repos'
28+
changelogs. Extract them.
29+
3. **Assemble the release context**: `targetVersion`, the changelog URLs, and the
30+
per-template component→repo map from [references/templates.md](references/templates.md).
31+
32+
Only the **target release's** changelog matters — examples are updated every release,
33+
so the gap is always exactly one release. Do not compute a "from" version.
34+
35+
## Phase 2 — Fan-out (4 parallel subagents)
36+
37+
Spawn **4 `glsp-template-updater` subagents in parallel — one per template**, in a
38+
single message. Hand each the release context plus its `templateId`, `templatePath`,
39+
relevant `components`, and `changelogUrls`. Add any per-template note as extra
40+
instructions. The subagents edit + verify only; **they run no git commands**.
41+
42+
Cross-cutting rules the subagents enforce (already in the agent definition, restated
43+
here so you can sanity-check their reports):
44+
- **Success = the template's own build passes.** A failed build triggers an
45+
iterative diagnose→fix→rebuild loop in the subagent; `FAIL` is reported only after
46+
reasonable fix attempts are exhausted, never after a single failed build.
47+
- **Stop a template entirely if its required toolchain is missing** (`mvn`/`java 17`
48+
for java templates, `yarn`/`node` for all) — reported as `STOPPED`, no edits.
49+
- GLSP deps **and** the project's own version bump in lockstep to `targetVersion`;
50+
unrelated third-party deps are left alone unless a changelog mandates a change.
51+
52+
## Phase 3 — Synthesis (you)
53+
54+
**Do no git operations.** Leave all changes in the working tree for the user to
55+
review and commit. Collect the per-template reports into one consolidated summary:
56+
57+
- Top line: **N/4 built successfully**.
58+
- Per template: `from → to`, GLSP deps bumped, own-version bumped (y/n), mechanical
59+
migrations applied, **needs-review** items (with changelog refs), env/README
60+
changes, **build status** (`PASS` / `FAIL` + excerpt / `STOPPED` + missing tool).
61+
- A consolidated **flags** section: manifest drift, required Eclipse/EMF baseline
62+
bumps, and pre-existing inconsistencies the subagents noticed.
63+
64+
Make non-`PASS` builds and needs-review items impossible to miss.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Project-Template Manifest
2+
3+
Per-template static data for `update-project-templates`. Paths are relative to the repo
4+
root. **Verify each entry against the actual files before editing** and flag drift —
5+
this manifest can go stale if the repo is restructured.
6+
7+
All GLSP deps and each project's own `version` are currently pinned in lockstep
8+
(`2.6.0` at time of writing). Bump both to the target version.
9+
10+
---
11+
12+
## `node-json-theia``project-templates/node-json-theia`
13+
14+
- **Build:** `yarn install && yarn build` (root `package.json`; also a `prepare`).
15+
- **Toolchain:** node (`>=20`), yarn.
16+
- **Components / changelogs:** `client`, `server-node`, `theia-integration`.
17+
- **GLSP deps (npm, exact-pinned):**
18+
- root `package.json`: `@eclipse-glsp/config` (devDep)
19+
- `tasklist-glsp-client/package.json`: `@eclipse-glsp/client`
20+
- `tasklist-glsp-server/package.json`: `@eclipse-glsp/server` (devDep)
21+
- `tasklist-theia/package.json`: `@eclipse-glsp/*` (theia-integration etc.)
22+
- **Own version:** root + `lerna.json` + every workspace `package.json`
23+
(`tasklist-glsp-client`, `tasklist-glsp-server`, `tasklist-theia`,
24+
`tasklist-browser-app`).
25+
- **Env:** `engines.node` (root). README prerequisite: `Node.js >=20`.
26+
27+
## `node-json-vscode``project-templates/node-json-vscode`
28+
29+
- **Build:** `yarn install && yarn build` (root `package.json`).
30+
- **Toolchain:** node (`>=20`), yarn.
31+
- **Components / changelogs:** `client`, `server-node`, `vscode-integration`.
32+
- **GLSP deps (npm):**
33+
- root `package.json`: `@eclipse-glsp/config` (devDep)
34+
- `tasklist-glsp-client/package.json`: `@eclipse-glsp/client`
35+
- `tasklist-glsp-server/package.json`: `@eclipse-glsp/server`
36+
- `tasklist-vscode/webview/package.json`, `tasklist-vscode/extension/package.json`:
37+
`@eclipse-glsp/*` (vscode-integration etc.)
38+
- **Own version:** root + `lerna.json` + workspaces (`tasklist-glsp-server`,
39+
`tasklist-glsp-client`, `tasklist-vscode/webview`, `tasklist-vscode/extension`).
40+
- **Env:** `engines.node` (root). README prerequisite: `Node.js >=20`.
41+
42+
## `java-emf-eclipse``project-templates/java-emf-eclipse`
43+
44+
- **Build:** `yarn install && yarn build` (root → `build:client` = yarn install of
45+
`glsp-client`; `build:server` = `cd glsp-server && mvn --batch-mode clean verify`).
46+
The client `prepare`/`copyClient` regenerates the committed
47+
`glsp-server/org.eclipse.glsp.example.javaemf.editor/diagram/bundle.js` etc. — that
48+
is expected output of a passing build.
49+
- **Toolchain:** node, yarn, **`mvn` + Java 17**, network to `download.eclipse.org`
50+
(Tycho resolves a p2 target platform).
51+
- **Components / changelogs:** `client`, `eclipse-integration` (ide), java/emf server
52+
(delivered via p2, not Maven coords).
53+
- **GLSP version locations:**
54+
- TS client: `glsp-client/package.json` (+ `tasklist-glsp/`, `tasklist-eclipse/`,
55+
and `@eclipse-glsp/config`).
56+
- **p2 target (GLSP-only edit):** `glsp-server/org.eclipse.glsp.example.javaemf.target/r2025-12.target`
57+
**and** `.../r2025-12.tpd` — update **only** the two GLSP p2 release URLs:
58+
`download.eclipse.org/glsp/server/p2/releases/<version>` and
59+
`download.eclipse.org/glsp/ide/p2/releases/<version>/`.
60+
- **Do NOT** touch Eclipse-platform / EMF / Jetty / ELK / Jakarta unit versions or
61+
rename the `r20XX-YY` target — Eclipse release train, separate concern. Flag any
62+
required baseline bump.
63+
- **Own version:** TS client `package.json`s + all poms `<version>`
64+
(parent + `org.eclipse.glsp.example.javaemf.{server,editor,target}` poms).
65+
- **Env:** `java.source`/`java.target` in poms (currently 17). README prerequisites:
66+
`Node.js >=20`, `Java >=21` (note: README says 21 but poms compile 17 — pre-existing
67+
mismatch; flag, do not silently "fix" as part of a GLSP update).
68+
69+
## `java-emf-theia``project-templates/java-emf-theia`
70+
71+
- **Build:** `yarn install && yarn build` (root → `build:server` =
72+
`cd glsp-server && mvn --batch-mode clean verify`; `build:client` = yarn install of
73+
`glsp-client`).
74+
- **Toolchain:** node, yarn, **`mvn` + Java 17** (Maven shade build, no p2/Tycho).
75+
- **Components / changelogs:** `client`, `theia-integration`, java/emf server.
76+
- **GLSP version locations:**
77+
- Maven: `glsp-server/pom.xml``<glsp.version>` property (drives the
78+
`org.eclipse.glsp.*` artifacts).
79+
- TS client: `glsp-client/package.json` (+ `tasklist-glsp/`, `tasklist-theia/`,
80+
`tasklist-browser-app/`, and `@eclipse-glsp/config`).
81+
- **Own version:** TS client `package.json`s + `glsp-server/pom.xml` `<version>`.
82+
- **Hardcoded server-jar filename** (`org.eclipse.glsp.example.javaemf-<version>-glsp.jar`,
83+
not build-validated — bump in lockstep with the pom):
84+
- `glsp-client/tasklist-theia/src/node/glsp-server-contribution.ts` (`JAR_FILE`)
85+
- `glsp-server/.vscode/tasks.json` (`java -jar` task)
86+
- **Env:** `java.source`/`java.target` (pom). README prerequisites: `Node.js >=20`,
87+
`Java >=21` (same pre-existing 21-vs-17 mismatch; flag only).
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
name: update-workflow
3+
description: Updates the GLSP workflow example in this repo to a new GLSP release by porting the release delta from the upstream dev examples. Interactive, human-in-the-loop. User-invoked only.
4+
disable-model-invocation: true
5+
---
6+
7+
# Update Workflow Example
8+
9+
Updates the `workflow/` example to a target GLSP release. This is **not** a trivial
10+
bump-and-fix: the `workflow/` example is a **condensed fork** of the upstream dev
11+
examples that live across the GLSP source repos. The job is to **port the release's
12+
delta** from those upstream dev examples into this condensed fork, then do the
13+
mechanical version bump.
14+
15+
This skill runs **in the main agent, no subagent — interactively, with a checkpoint
16+
per target.** It involves real judgment; keep the human in the loop.
17+
18+
**Optional argument:** an explicit target version (e.g. `2.7.0`). If omitted, the
19+
latest release is resolved automatically.
20+
21+
See [references/workflow-mapping.md](references/workflow-mapping.md) for the
22+
target→upstream mapping, per-target filtering rules, and dependency order.
23+
24+
## Phase 1 — Resolve version & acquire upstream sources
25+
26+
1. **Resolve the target version:** explicit
27+
arg wins, else GitHub Releases API on `eclipse-glsp/glsp`
28+
(`https://api.github.com/repos/eclipse-glsp/glsp/releases/latest``tag_name`,
29+
strip leading `v`). Also note the umbrella **release body** changelog links —
30+
used as a secondary reference (below).
31+
2. **Shallow-clone the 3 upstream repos** at the release tag into a temp dir
32+
(`/tmp/glsp-update-<version>/`): `glsp-client`, `glsp-server-node`,
33+
`glsp-theia-integration`. Also fetch the **previous** release tag in each (needed
34+
for the delta). Tag convention is `v<version>`; list tags and fall back to bare
35+
`<version>` if needed. Clean up the temp dir on success; leave it on failure.
36+
37+
## Phase 2 — Per-target porting (dependency order, checkpoint each)
38+
39+
Process targets **in dependency order**: `workflow-glsp``workflow-server`
40+
`workflow-theia``workflow-browser-app`. For **each** target:
41+
42+
1. **Compute the release delta** in the upstream example:
43+
`git diff <v_prev>..<v_new> -- <upstream example path>` (see mapping file). This
44+
delta is the work-list — pre-existing condensation differences are not in it.
45+
2. **Classify each hunk** using the target's filtering rule (mapping file):
46+
`PORT` (applies to shared code or the variant this fork keeps) /
47+
`EXCLUDE` (scoped to a browser entry point or a connection variant this fork does
48+
not have — record the reason) / `UNCERTAIN` (needs human judgment). Read the full
49+
current upstream source only to adapt a hunk that doesn't map cleanly onto the
50+
local structure, and consult the changelog to interpret ambiguous hunks.
51+
3. **Checkpoint — present the plan and pause for approval:** list what will be ported,
52+
what is excluded and why, and every `UNCERTAIN` item with a recommendation. Wait
53+
for the user to approve / adjust before editing.
54+
4. **Apply** the approved changes to the local target. Run a **scoped compile**
55+
(e.g. `tsc -b` for that package) as an early signal. Then move to the next target.
56+
57+
## Phase 3 — Mechanical bump (after the source-merge)
58+
59+
After the source-merge, bump versions deterministically. The `workflow/` example is a
60+
yarn + lerna workspace (node only — no Maven/Java/p2 here). Apply all of:
61+
62+
- **GLSP dependencies → target version, lockstep, exact-pinned** everywhere they
63+
appear: every `@eclipse-glsp/*` dep and devDep across the root `package.json`
64+
(`@eclipse-glsp/config`) and the four workspace `package.json`s — currently
65+
`@eclipse-glsp/client` (`workflow-glsp`), `@eclipse-glsp/server` +
66+
`@eclipse-glsp/layout-elk` (`workflow-server`), `@eclipse-glsp/theia-integration`
67+
(`workflow-theia`). **Include any NEW `@eclipse-glsp/*` deps** the source-merge
68+
introduced — set them to the target version too.
69+
- **Each package's own `version` → target version, lockstep:** root `package.json`,
70+
`lerna.json`, and all four workspace `package.json`s (`@eclipse-glsp-examples/*`).
71+
Note the workspaces also reference each other by version (e.g. `workflow-theia`
72+
depends on `workflow-glsp`/`workflow-server`) — bump those inter-package refs too.
73+
- **Leave unrelated third-party deps alone** (theia, webpack, lerna, typescript,
74+
`@types/node`, …) unless a changelog explicitly mandates a change.
75+
- **Env / README:** if the changelog raises the minimum **Node**, update both
76+
`engines.node` (root `package.json`) and the matching README prerequisite line,
77+
keeping them consistent. Flag other README staleness rather than editing it.
78+
79+
## Phase 4 — Final build & report
80+
81+
1. **Authoritative gate:** full root `yarn install && yarn build` (the `prepare` step
82+
also runs `check:theia-version`). Use the **iterative diagnose→fix→rebuild loop**;
83+
a failed build is the start of a fix loop, not a stop. Because this is
84+
human-in-the-loop, **escalate genuinely ambiguous failures to the user** instead of
85+
looping blindly. `STOPPED` only if the toolchain (node/yarn) is unavailable.
86+
**Success = the full build passes.**
87+
2. **No git operations** — leave everything in the working tree for the user to review
88+
and commit. Produce a report: per target — hunks ported, hunks excluded (+reason),
89+
`UNCERTAIN` items and how they were resolved; version/env/README bumps; final build
90+
status; and the temp-clone path (note if it was left behind on failure).

0 commit comments

Comments
 (0)