refactor: hard-fork GSD -> MSD (Make Software Done)

Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD
across contents and paths, upstream package/repo coordinates -> @golem15/msd-core
and golem15com/msd-core. Deep links into upstream history, sibling upstream
packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is.

Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line,
package/plugin identity, regenerated lockfile, install-tree fixtures, derived
registries and benchmark baseline; migration checksum baseline re-locked
(MSD keeps its own install state, so no install had applied the old sums);
sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
Jakub Zych
2026-10-06 01:47:40 +02:00
parent fe069b2a56
commit a9a7a328e6
2763 changed files with 78465 additions and 78434 deletions

View File

@@ -5,9 +5,9 @@
* markdown-generation logic for the three third-party discoverability catalogs
* (issue #2182, plus #2904):
*
* - `docs/registries/capabilities.json` → "GSD Community Capability Registry"
* - `docs/registries/eos.json` → "GSD EoS Registry" (PR2)
* - `docs/registries/reviewers.json` → "GSD Reviewer Lane Registry" (issue #2904)
* - `docs/registries/capabilities.json` → "MSD Community Capability Registry"
* - `docs/registries/eos.json` → "MSD EoS Registry" (PR2)
* - `docs/registries/reviewers.json` → "MSD Reviewer Lane Registry" (issue #2904)
*
* The vocabulary constants below are ADDITIVE CONTRACTS that track the
* runtime/ADR closed vocabularies they describe — they are a documentation-
@@ -43,8 +43,8 @@
* it as `argv` | `none`, mirroring `HOST_INTEGRATION_AXES.effortSurface`
* in `src/host-integration.cts`.
* - `CAPABILITY_REQUIRED` / `EOS_REQUIRED` / `REVIEWER_REQUIRED` mirror the
* required top-level fields for each entry type, including `enginesGsd`
* (ADR-1244 D1 "Versioned capability manifest" — the `engines.gsd`
* required top-level fields for each entry type, including `enginesMsd`
* (ADR-1244 D1 "Versioned capability manifest" — the `engines.msd`
* semver-range gate, modelled on VS Code's `engines.vscode`).
* - `REVIEWER_LANE_TRANSPORTS` / `REVIEWER_EVIDENCE_CLASSES` /
* `REVIEWER_SLUG_RE` / `REVIEWER_FLAG_RE` / `REVIEWER_SECTION_MAX` mirror
@@ -122,10 +122,10 @@ const OPTIONAL_AXES = Object.freeze({
// of the Capability schema.
//
// These constants are ADDITIVE CONTRACTS mirroring the canonical runtime
// vocabulary in `gsd-core/bin/lib/capability-validator.cjs`, exactly the way
// vocabulary in `msd-core/bin/lib/capability-validator.cjs`, exactly the way
// `AXES` mirrors `HOST_INTEGRATION_AXES`. They are hand-written mirrors, NOT
// imports: this module is documented pure (no `fs`/`process`), and requiring a
// `gsd-core/bin/lib` runtime module from a docs-pipeline script would invert
// `msd-core/bin/lib` runtime module from a docs-pipeline script would invert
// that. Parity is enforced instead by `tests/registry-reviewer-parity.test.cjs`.
//
// `REVIEWER_SLUG_RE` deliberately does NOT reuse the registry's kebab-case `id`
@@ -151,12 +151,12 @@ const REVIEWER_SECTION_MAX = 200;
// — as `eos` already does with `protocolVersion`.
const BASE_REQUIRED = Object.freeze([
'id', 'name', 'type', 'repo', 'description', 'author', 'license',
'enginesGsd', 'install', 'uninstall', 'interactions', 'discussion',
'enginesMsd', 'install', 'uninstall', 'interactions', 'discussion',
]);
const CAPABILITY_REQUIRED = Object.freeze([...BASE_REQUIRED]);
const EOS_REQUIRED = Object.freeze([...BASE_REQUIRED, 'protocolVersion']);
// A lane is installed with `gsd capability install`, owns a repo, a license and
// an `engines.gsd` range exactly as a Feature Capability does — so it requires
// A lane is installed with `msd capability install`, owns a repo, a license and
// an `engines.msd` range exactly as a Feature Capability does — so it requires
// the same twelve top-level fields. Only `interactions` differs.
const REVIEWER_REQUIRED = Object.freeze([...BASE_REQUIRED]);
@@ -240,15 +240,15 @@ function fenceFor(value) {
return '`'.repeat(Math.max(3, longest + 1));
}
// A single `engines.gsd` range clause: optional comparison operator, optional
// A single `engines.msd` range clause: optional comparison operator, optional
// leading `v`, exactly three dot-separated numeric segments, optional
// prerelease (`-...`) and build (`+...`) suffixes. Operator alternation order
// matters — `>=`/`<=` must be tried before `>`/`<` or the longer operator
// would never match.
const GSD_RANGE_CLAUSE_RE = /^(>=|<=|>|<|=|\^|~)?v?\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
const MSD_RANGE_CLAUSE_RE = /^(>=|<=|>|<|=|\^|~)?v?\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$/;
/**
* Validate the SHAPE of an `engines.gsd`-style semver range string (ADR-1244
* Validate the SHAPE of an `engines.msd`-style semver range string (ADR-1244
* D1). Self-contained — no `semver` dependency, modelled on the constraint
* parsing in `scripts/check-env.cjs` (`satisfiesConstraint`), but this
* function validates that the range is well-formed rather than comparing it
@@ -257,13 +257,13 @@ const GSD_RANGE_CLAUSE_RE = /^(>=|<=|>|<|=|\^|~)?v?\d+\.\d+\.\d+(-[0-9A-Za-z.-]+
* @param {string} range
* @returns {boolean}
*/
function isValidGsdRange(range) {
function isValidMsdRange(range) {
if (typeof range !== 'string') return false;
const trimmed = range.trim();
if (trimmed === '') return false;
if (trimmed === '*') return true;
const clauses = trimmed.split(/\s+/);
return clauses.length > 0 && clauses.every((clause) => clause !== '' && GSD_RANGE_CLAUSE_RE.test(clause));
return clauses.length > 0 && clauses.every((clause) => clause !== '' && MSD_RANGE_CLAUSE_RE.test(clause));
}
/**
@@ -595,10 +595,10 @@ function validateEntries(entries, opts) {
}
checkMaxLength('license', 120);
if (!missing.has('enginesGsd') && !isValidGsdRange(entry.enginesGsd)) {
addError('enginesGsd', 'enginesGsd must be a valid semver range');
if (!missing.has('enginesMsd') && !isValidMsdRange(entry.enginesMsd)) {
addError('enginesMsd', 'enginesMsd must be a valid semver range');
}
checkMaxLength('enginesGsd', 100);
checkMaxLength('enginesMsd', 100);
for (const field of ['install', 'uninstall']) {
if (missing.has(field)) continue;
@@ -639,7 +639,7 @@ function validateEntries(entries, opts) {
// Per-type page presentation AND per-type interaction summary both live in
// this ONE table (Map, for the same CodeQL reason as TYPE_RULES): title/
// addNoun drive the page header, buildSummary drives the per-entry "Every
// interaction with GSD" line. Folding both into a single lookup means a
// interaction with MSD" line. Folding both into a single lookup means a
// future fourth registry type MUST supply its own buildSummary or the
// `RENDER_META.get` miss below throws — it cannot silently inherit
// capability's (or any other type's) rendering the way the old if/else-if/
@@ -648,7 +648,7 @@ const RENDER_META = new Map([
[
'capability',
{
title: 'GSD Community Capability Registry',
title: 'MSD Community Capability Registry',
addNoun: 'capability',
buildSummary(entry, interactions) {
let summary =
@@ -668,7 +668,7 @@ const RENDER_META = new Map([
[
'eos',
{
title: 'GSD EoS Registry',
title: 'MSD EoS Registry',
addNoun: 'integration',
buildSummary(entry, interactions) {
// Required AXES keys always render, in their fixed order; an OPTIONAL_AXES
@@ -691,7 +691,7 @@ const RENDER_META = new Map([
[
'reviewer',
{
title: 'GSD Reviewer Lane Registry',
title: 'MSD Reviewer Lane Registry',
addNoun: 'reviewer lane',
buildSummary(entry, interactions) {
let summary =
@@ -731,7 +731,7 @@ function renderMarkdown(entries, opts) {
});
const isEos = opts.type === 'eos';
// An unrecognized type must fail loudly rather than silently render a
// "GSD Community Capability Registry" page — mirroring the validateEntries
// "MSD Community Capability Registry" page — mirroring the validateEntries
// unknown-type guard above. This function writes a COMMITTED catalog file,
// so a silent wrong-title render is the worst failure mode available.
// Message shape mirrors gen-registry.cjs#renderFor's existing
@@ -747,7 +747,7 @@ function renderMarkdown(entries, opts) {
lines.push(`# ${meta.title}`);
lines.push('');
lines.push(
"> **Not an endorsement.** Inclusion means only that a maintainer merged a PR linking the author's repository — GSD has not reviewed, tested, or verified any listing. See the [registry README](./README.md).",
"> **Not an endorsement.** Inclusion means only that a maintainer merged a PR linking the author's repository — MSD has not reviewed, tested, or verified any listing. See the [registry README](./README.md).",
);
lines.push('');
lines.push(`_To add your ${meta.addNoun}, see the [registry README](./README.md)._`);
@@ -758,17 +758,17 @@ function renderMarkdown(entries, opts) {
return `${lines.join('\n')}\n`;
}
lines.push('| Name | What it is | Latest release | GSD compat | Discussion |');
lines.push('| Name | What it is | Latest release | MSD compat | Discussion |');
lines.push('|---|---|---|---|---|');
for (const entry of sorted) {
// entry.repo/enginesGsd/discussion are regex-constrained (validateEntries)
// entry.repo/enginesMsd/discussion are regex-constrained (validateEntries)
// and used as link DESTINATIONS / badge URLs here — never mdInline those,
// it would corrupt the URL. entry.name/description are untrusted free-text
// link TEXT / body copy and MUST be escaped.
lines.push(
`| [${mdInline(entry.name)}](https://github.com/${entry.repo}) | ${mdInline(entry.description)} | ` +
`![release](https://img.shields.io/github/v/release/${entry.repo}?sort=semver&include_prereleases) | ` +
`\`${entry.enginesGsd}\` | [discuss](${entry.discussion}) |`,
`\`${entry.enginesMsd}\` | [discuss](${entry.discussion}) |`,
);
}
lines.push('');
@@ -788,7 +788,7 @@ function renderMarkdown(entries, opts) {
// contains Markdown metacharacters, so one pass over the assembled string
// equally neutralizes every embedded free-text/vocab value (notably eos's
// interactions.axes.dispatch, a free-form untrusted string).
lines.push(`- **Every interaction with GSD:** ${mdInline(meta.buildSummary(entry, interactions))}`);
lines.push(`- **Every interaction with MSD:** ${mdInline(meta.buildSummary(entry, interactions))}`);
// Code-span content (install/uninstall) is NOT mdInline-escaped — it is a
// verbatim shell snippet, not inline prose. Instead each block picks a
@@ -807,8 +807,8 @@ function renderMarkdown(entries, opts) {
lines.push(
isEos
? `- **GSD compatibility:** \`${entry.enginesGsd}\`, protocol v${entry.protocolVersion}`
: `- **GSD compatibility:** \`${entry.enginesGsd}\``,
? `- **MSD compatibility:** \`${entry.enginesMsd}\`, protocol v${entry.protocolVersion}`
: `- **MSD compatibility:** \`${entry.enginesMsd}\``,
);
lines.push(`- **License:** ${mdInline(entry.license)}`);
lines.push(`- **Discussion / ranking:** ${entry.discussion}`);
@@ -837,7 +837,7 @@ module.exports = {
REVIEWER_SECTION_MAX,
INTERACTION_STRING_MAX,
INTERACTION_ARRAY_MAX,
isValidGsdRange,
isValidMsdRange,
validateEntries,
renderMarkdown,
};