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,19 +5,19 @@
* Prompt-layer drift guard for #3409 — shell guards that cannot observe
* their own failure arm.
*
* Design: .gsd/phase/feat-3409-unreachable-shell-guard-lint/40-design.md
* Test matrix: .gsd/phase/feat-3409-unreachable-shell-guard-lint/50-test-matrix.md
* Design: .msd/phase/feat-3409-unreachable-shell-guard-lint/40-design.md
* Test matrix: .msd/phase/feat-3409-unreachable-shell-guard-lint/50-test-matrix.md
*
* RETIRED — Detector A (`--pick` + `|| echo` on one line), #3884.
* `gsd-tools.cjs`'s `--pick <field>` extractor used to coerce a missing/
* `msd-tools.cjs`'s `--pick <field>` extractor used to coerce a missing/
* absent field to the empty string and exit **0**, which made the `|| echo D`
* arm in `$(gsd_run query V --pick F 2>/dev/null || echo D)` unreachable on
* arm in `$(msd_run query V --pick F 2>/dev/null || echo D)` unreachable on
* field absence — the exact defect Detector A existed to flag (this file's
* own prior header quoted the premise verbatim: "the `|| echo D` arm can
* fire only on a typo in the verb name, never on the field absence it was
* written to handle"). ADR-3473 §8.4 ("Failure is a value") makes `--pick`
* exit **non-zero** on an absent field (see
* `.gsd/phase/feat-3884-failure-is-a-value/40-design.md` rows B6-B14), so
* `.msd/phase/feat-3884-failure-is-a-value/40-design.md` rows B6-B14), so
* that premise is now FALSE: the `|| echo D` arm is reachable, and the shape
* Detector A forbade is the CORRECT idiom going forward. Keeping Detector A
* would forbid the fix, so it is removed rather than updated — see this
@@ -118,7 +118,7 @@
* over fixed literals, then a single trailing `(.*)$` — again one
* quantifier, no nesting.
*
* ESCAPE MARKER. A line carrying `# gsd-scan-ignore: <reason>` is exempt
* ESCAPE MARKER. A line carrying `# msd-scan-ignore: <reason>` is exempt
* ONLY when `<reason>` names an issue (`#NNN`, N a positive integer) or an
* `http(s)://` URL with an actual host after the scheme — the repo's
* existing precedent from `tests/commit-files-pathspec.test.cjs`
@@ -138,7 +138,7 @@
* predicate this mirrors: that guard's marker parser tokenizes the whole
* line to rule out a marker surviving inside quoted argv text (a commit
* MESSAGE quoting the token). This guard's two detectors never process
* commit-message-shaped free text, so a plain `#\s*gsd-scan-ignore:` literal
* commit-message-shaped free text, so a plain `#\s*msd-scan-ignore:` literal
* match is sufficient here and is not widened to match that guard's
* quote-awareness it has no corresponding hazard for.
*
@@ -169,7 +169,7 @@
* regexes, which need no literal tokenizer — shared here only for the walk
* and the report sanitizer).
*
* Surfaces scanned (SCAN_DIRS): `gsd-core/workflows`, `commands`, `agents`,
* Surfaces scanned (SCAN_DIRS): `msd-core/workflows`, `commands`, `agents`,
* `skills` — the prompt-layer markdown that ships to every runtime.
* SCAN_EXT: `.md` only.
*
@@ -316,12 +316,12 @@ function detectGlobOperand(line) {
// ─── Escape marker ─────────────────────────────────────────────────────────
//
// `# gsd-scan-ignore: <reason>`. Two `\s*` quantifiers over fixed literals,
// `# msd-scan-ignore: <reason>`. Two `\s*` quantifiers over fixed literals,
// then a single trailing `(.*)$` — one quantifier, no nesting. Lines are
// split via `/\r?\n/` (see findUnreachableGuardDrift) before this ever runs,
// so `.` never has to reason about a trailing `\r` — the pitfall the CRLF
// coverage in the test matrix (P1-P4) exists to catch.
const MARKER_RE = /#\s*gsd-scan-ignore:\s*(.*)$/;
const MARKER_RE = /#\s*msd-scan-ignore:\s*(.*)$/;
// DELIBERATE DIVERGENCE from tests/commit-files-pathspec.test.cjs's own
// `ISSUE_REF_RE` (`/#\d+|https?:\/\//`), which this predicate started as a
@@ -348,7 +348,7 @@ const ISSUE_REF_RE = /#[1-9]\d*|https?:\/\/[^\s]+/;
// `scanTree` (scripts/lib/drift-scan.cjs) builds its repo-relative path via
// `path.relative()`, which uses NATIVE separators: on Windows that is
// `gsd-core\workflows\plan-phase.md`, while the committed baseline stores
// `msd-core\workflows\plan-phase.md`, while the committed baseline stores
// POSIX paths. Normalized UNCONDITIONALLY — never gated on
// `process.platform` — for the exact reason `lint-planning-prompt-drift.cjs`
// documents at its own `toPosixRel`: a platform-conditional normalizer is
@@ -359,7 +359,7 @@ function toPosixRel(relPath) {
}
// Prompt-layer markdown that ships to every runtime.
const SCAN_DIRS = ['gsd-core/workflows', 'commands', 'agents', 'skills'];
const SCAN_DIRS = ['msd-core/workflows', 'commands', 'agents', 'skills'];
const SCAN_EXT = new Set(['.md']);
const BASELINE_REL_PATH = path.join('scripts', 'baselines', 'unreachable-guard-drift-baseline.json');
@@ -389,7 +389,7 @@ const RATCHET_OWNER_ISSUE = '#3409';
* baseline JSON shape and the `--json` report shape are unchanged by
* Detector A's retirement.
* - `malformed`: `[{ file, line, text, reason }]` — an ATTEMPTED
* `# gsd-scan-ignore:` declaration whose reason names no issue and no
* `# msd-scan-ignore:` declaration whose reason names no issue and no
* URL. Checked on EVERY line independent of whether that line also
* matches a detector (a comment-only malformed declaration is still a
* malformed declaration) — never ratchet-eligible.
@@ -456,7 +456,7 @@ function scanRepo(root) {
* Frozen outcome-reason enum. CONTRIBUTING.md's "Prohibited: Raw Text
* Matching on Test Outputs" requires a typed structured surface wherever
* this module produces human-readable text — mirrors
* `gsd-core/bin/verify-reapply-patches.cjs`'s own `REASON` map exactly:
* `msd-core/bin/verify-reapply-patches.cjs`'s own `REASON` map exactly:
* `main()`'s `--json` mode and every `loadBaseline` per-error object carry
* one of these codes instead of free prose, and tests assert on the code,
* never on the rendered message. Adding a new reason requires updating this
@@ -713,11 +713,11 @@ function main() {
if (update) {
if (malformed.length > 0) {
if (!json) {
process.stderr.write('unreachable-guard-drift: malformed `# gsd-scan-ignore:` declaration(s) — fix these before regenerating the baseline (they are never ratchet-eligible):\n');
process.stderr.write('unreachable-guard-drift: malformed `# msd-scan-ignore:` declaration(s) — fix these before regenerating the baseline (they are never ratchet-eligible):\n');
for (const m of malformed) {
process.stderr.write(` ${sanitizeForReport(m.file)}:${m.line} ${sanitizeForReport(m.text)}\n`);
}
process.stderr.write('\n remedy: the reason after `# gsd-scan-ignore:` must name a tracking issue (#NNN) or an http(s):// URL.\n');
process.stderr.write('\n remedy: the reason after `# msd-scan-ignore:` must name a tracking issue (#NNN) or an http(s):// URL.\n');
}
emitJson({ reason: REASON.FAIL_MALFORMED_MARKER, violations: [], malformed, stale: [], baselineErrors: [] });
process.exitCode = 1;
@@ -768,7 +768,7 @@ function main() {
process.stderr.write('Detector B (cat/ls over a glob operand): under a nullglob set elsewhere in the same shell\n');
process.stderr.write('session, an unmatched glob reads from stdin (cat) or lists the cwd (ls) — use an array\n');
process.stderr.write('expansion or an existence test instead.\n');
process.stderr.write(`Or, if this is a deliberate wrong-example, declare it with # gsd-scan-ignore: #NNN, or add an\n`);
process.stderr.write(`Or, if this is a deliberate wrong-example, declare it with # msd-scan-ignore: #NNN, or add an\n`);
process.stderr.write(`acknowledged entry to ${BASELINE_REL_PATH} via --update:\n`);
for (const v of fresh) {
process.stderr.write(` ${sanitizeForReport(v.file)}:${v.line} [${v.kind}] ${sanitizeForReport(v.found)} ${sanitizeForReport(v.text)}\n`);
@@ -784,11 +784,11 @@ function main() {
}
if (malformed.length > 0) {
process.stderr.write('\nunreachable-guard-drift: malformed `# gsd-scan-ignore:` declaration(s) — never ratchet-eligible, must be fixed directly:\n');
process.stderr.write('\nunreachable-guard-drift: malformed `# msd-scan-ignore:` declaration(s) — never ratchet-eligible, must be fixed directly:\n');
for (const m of malformed) {
process.stderr.write(` ${sanitizeForReport(m.file)}:${m.line} ${sanitizeForReport(m.text)}\n`);
}
process.stderr.write('\n remedy: the reason after `# gsd-scan-ignore:` must name a tracking issue (#NNN) or an http(s):// URL.\n');
process.stderr.write('\n remedy: the reason after `# msd-scan-ignore:` must name a tracking issue (#NNN) or an http(s):// URL.\n');
}
}