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

@@ -2,7 +2,7 @@
/**
* command-contract-helpers.cjs (ADR-0002)
*
* Single source of truth for the commands/gsd/*.md contract constants and
* Single source of truth for the commands/msd/*.md contract constants and
* parsers shared by scripts/lint-command-contract.cjs and
* tests/command-contract.test.cjs.
*
@@ -54,7 +54,7 @@ function executionContextRefs(content) {
const trailingProse = line.length > token.length;
const normalized = token
.replace(/^@(?:~|\$HOME)\//, '')
.replace(/^(?:\.claude\/)?(?:gsd-core\/)?/, '');
.replace(/^(?:\.claude\/)?(?:msd-core\/)?/, '');
refs.push({ token, normalized, trailingProse });
}
}
@@ -64,7 +64,7 @@ function executionContextRefs(content) {
/**
* workflowPathRefs(content)
*
* Locates every gsd-core-relative workflow path referenced in a markdown
* Locates every msd-core-relative workflow path referenced in a markdown
* string, whether the reference is an eager @-include (already covered by
* executionContextRefs) or a *lazy* path mentioned only in prose/code — a
* path a command reads on demand via Read/Bash rather than an @-inclusion
@@ -77,8 +77,8 @@ function executionContextRefs(content) {
*
* A. Any path whose segments include `workflows/`, optionally preceded by
* an eager `@`, a home-dir prefix (`~/` or `$HOME/`), `.claude/`, and/or
* `gsd-core/` — e.g. `@~/.claude/gsd-core/workflows/scan.md`,
* `gsd-core/workflows/x.md`, or a bare `workflows/x.md`.
* `msd-core/` — e.g. `@~/.claude/msd-core/workflows/scan.md`,
* `msd-core/workflows/x.md`, or a bare `workflows/x.md`.
* B. Same as A but without the eager `@` — a lazy reference read on
* demand rather than inlined at load time.
* C. Parent-relative sub-file paths with no `workflows/` prefix at all —
@@ -105,14 +105,14 @@ function workflowPathRefs(content) {
refs.push(normalized);
}
const shapeARe = /@?(?:(?:~|\$HOME)\/)?(?:\.claude\/)?(?:gsd-core\/)?workflows\/[A-Za-z0-9._/-]+\.md(?![A-Za-z0-9_])/g;
const shapeARe = /@?(?:(?:~|\$HOME)\/)?(?:\.claude\/)?(?:msd-core\/)?workflows\/[A-Za-z0-9._/-]+\.md(?![A-Za-z0-9_])/g;
let m;
while ((m = shapeARe.exec(content)) !== null) {
const normalized = m[0]
.replace(/^@/, '')
.replace(/^(?:~|\$HOME)\//, '')
.replace(/^\.claude\//, '')
.replace(/^gsd-core\//, '');
.replace(/^msd-core\//, '');
addRef(normalized);
}
@@ -125,12 +125,12 @@ function workflowPathRefs(content) {
}
/**
* unreachableWorkflows(loaderContents, gsdFiles, workflowPaths)
* unreachableWorkflows(loaderContents, msdFiles, workflowPaths)
*
* Computes reachability over the gsd-core file graph and reports which
* Computes reachability over the msd-core file graph and reports which
* `workflowPaths` are never reached, starting only from `loaderContents`
* (commands/agents/skills — the files a runtime actually loads) and walking
* `workflowPathRefs` edges transitively through `gsdFiles`.
* `workflowPathRefs` edges transitively through `msdFiles`.
*
* The seed set is deliberately restricted to loaders and never includes a
* workflow's own content. Seeding from workflows too would let two failure
@@ -143,7 +143,7 @@ function workflowPathRefs(content) {
* mean "a runtime can actually get here," not merely "something points to
* it."
*
* `gsdFiles` covers all of `gsd-core/**`, not just `workflows/`, because a
* `msdFiles` covers all of `msd-core/**`, not just `workflows/`, because a
* `references/` or `templates/` file can itself name a workflow path and
* needs to be walked through to propagate reachability — restricting the map
* to `workflows/` would silently break any chain that passes through a
@@ -152,7 +152,7 @@ function workflowPathRefs(content) {
* `visited` guards the walk against reference cycles (including the
* mutual/self cases above) so traversal always terminates.
*/
function unreachableWorkflows(loaderContents, gsdFiles, workflowPaths) {
function unreachableWorkflows(loaderContents, msdFiles, workflowPaths) {
const visited = new Set();
const queue = [];
@@ -164,8 +164,8 @@ function unreachableWorkflows(loaderContents, gsdFiles, workflowPaths) {
const p = queue.pop();
if (visited.has(p)) continue;
visited.add(p);
if (gsdFiles.has(p)) {
for (const ref of workflowPathRefs(gsdFiles.get(p))) queue.push(ref);
if (msdFiles.has(p)) {
for (const ref of workflowPathRefs(msdFiles.get(p))) queue.push(ref);
}
}
@@ -351,7 +351,7 @@ function extractMarkers(content, knownMarkers) {
* parseAgentContracts(markdown)
*
* Parses the `## Agent Registry` pipe table in
* gsd-core/references/agent-contracts.md into structured rows, keyed by
* msd-core/references/agent-contracts.md into structured rows, keyed by
* lowercased, underscore-joined column headers (`Completion Markers` ->
* `completion_markers`). Column set is read from the header row itself, so
* the table can grow a `Consumed By` / `Kind` column later without this
@@ -703,7 +703,7 @@ function contractViolations({ registry, producerMarkers, candidateMarkers, consu
* prose — so every backtick span is inspected and only tokens that look like
* repo-relative markdown paths (`^[\w][\w./-]*\.md$` — no spaces, no glob
* stars) are returned. A glob (`*-VERIFICATION.md`) or a command
* (`gsd_run query verification.status`) describes the consumption mechanism
* (`msd_run query verification.status`) describes the consumption mechanism
* in prose; it is not a file the check can open, and is ignored.
*/
function parseConsumedByCell(value) {
@@ -797,8 +797,8 @@ function readTagViolations({ registry, agentTexts, consumerTexts } = {}) {
* silently.
*/
const NON_AGENT_TOKENS = new Set([
// Display headings the /gsd:graphify command itself renders from
// `gsd_run graphify build` CLI output — tool output shown to the user,
// Display headings the /msd:graphify command itself renders from
// `msd_run graphify build` CLI output — tool output shown to the user,
// not an agent return any spawner dispatches on.
'GRAPHIFY BUILD COMPLETE',
'GRAPHIFY BUILD FAILED',
@@ -831,7 +831,7 @@ function unmatchedConsumerTokens({ consumerTexts, vocabulary } = {}) {
const reported = new Set();
for (const [file, text] of consumers.entries()) {
if (!file.startsWith('gsd-core/workflows/') && !file.startsWith('commands/')) continue;
if (!file.startsWith('msd-core/workflows/') && !file.startsWith('commands/')) continue;
if (typeof text !== 'string') continue;
tokenRe.lastIndex = 0;
let m;
@@ -898,7 +898,7 @@ const VIOLATION_KINDS = Object.freeze({
* new kind cannot ship without its remedy.
*/
const REMEDIES = Object.freeze({
parse_error: 'fix the malformed row in gsd-core/references/agent-contracts.md',
parse_error: 'fix the malformed row in msd-core/references/agent-contracts.md',
unclosed_fence: 'close the unterminated code fence in this agent file',
declared_marker_not_emitted:
'remove the marker from the registry row, or emit it as an in-fence example in the agent file',