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

@@ -1,5 +1,5 @@
'use strict';
process.env.GSD_TEST_MODE = '1';
process.env.MSD_TEST_MODE = '1';
/**
* instruction-surface-disclosure.security.test.cjs — behavioral tests for a FIFTH disclosed
@@ -15,7 +15,7 @@ process.env.GSD_TEST_MODE = '1';
* instruction surface at all.
*
* Implements every row carrying a Test name in
* `.gsd/phase/feat-3248-disclose-instruction-surfaces/50-test-matrix.md`, derived from
* `.msd/phase/feat-3248-disclose-instruction-surfaces/50-test-matrix.md`, derived from
* `40-design.md`'s behavior table. Rows 18-20 and 23-25 are the load-bearing ones: they encode
* ADR-2363 D4 — instruction surfaces must never perturb `disclosureSignature`/`hasExecutable`, and
* no pre-existing consent record may be disturbed by a manifest gaining a `skills`/`agents` array.
@@ -36,7 +36,7 @@ const fc = require('fast-check');
const { cleanup } = require('./helpers.cjs');
const trust = require('../gsd-core/bin/lib/capability-trust.cjs');
const trust = require('../msd-core/bin/lib/capability-trust.cjs');
// ─── Fixture builders ──────────────────────────────────────────────────────
// House convention (tests/reviewer-manifest-body.test.cjs, tests/reviewer-trust-disclosure.test.cjs):
@@ -59,7 +59,7 @@ function skillsAndAgentsManifest(mutator) {
requires: [],
version: '1.0.0',
skills: ['ui-phase', 'ui-review'],
agents: ['gsd-ui-checker'],
agents: ['msd-ui-checker'],
};
if (mutator) mutator(manifest);
return manifest;
@@ -94,7 +94,7 @@ describe('A. Happy path', () => {
// src/capability-trust.cts). Disclosing it would name a surface that does not exist, so it
// must yield NO instruction surfaces at all.
test('declared agent names yield no instruction surfaces', () => {
const d = trust.discloseExecutableSurfaces({ id: 'x', agents: ['gsd-ui-checker'] });
const d = trust.discloseExecutableSurfaces({ id: 'x', agents: ['msd-ui-checker'] });
assert.deepEqual(d.instructionSurfaces, []);
});
@@ -319,14 +319,14 @@ describe('F. Independence — signature stability', () => {
// specifically — a regression that made `agents` collected again would still need a separate
// D4 test to catch a signature perturbation.
test('agents do not perturb the disclosure signature', () => {
const withAgents = { id: 'x', role: 'feature', version: '1.0.0', agents: ['gsd-ui-checker'] };
const withAgents = { id: 'x', role: 'feature', version: '1.0.0', agents: ['msd-ui-checker'] };
const withoutAgents = { id: 'x', role: 'feature', version: '1.0.0' };
assert.equal(trust.signatureForManifest(withAgents), trust.signatureForManifest(withoutAgents));
});
test('agents do not perturb the disclosure signature of an executable-surface-bearing manifest', () => {
const withAgents = executableSurfaceManifest((m) => {
m.agents = ['gsd-ui-checker'];
m.agents = ['msd-ui-checker'];
});
const withoutAgents = executableSurfaceManifest();
assert.equal(trust.signatureForManifest(withAgents), trust.signatureForManifest(withoutAgents));
@@ -449,7 +449,7 @@ describe('F. Independence — signature stability', () => {
test('signature matches the pre-change oracle for a skill-bearing manifest', () => {
const manifestWithSkills = executableSurfaceManifest((m) => {
m.skills = ['ui-phase', 'ui-review'];
m.agents = ['gsd-ui-checker'];
m.agents = ['msd-ui-checker'];
});
// The oracle does not know `skills`/`agents`/`reviewer` exist at all — it only ever reads
// hooks/commands/mcpServers — so its output for the skill-bearing manifest IS the reference
@@ -589,7 +589,7 @@ describe('K. Consent prompt', () => {
test('a capability with both executable and instruction surfaces renders both', () => {
const manifest = executableSurfaceManifest((m) => {
m.skills = ['ui-phase'];
m.agents = ['gsd-ui-checker'];
m.agents = ['msd-ui-checker'];
});
const d = trust.discloseExecutableSurfaces(manifest);
assert.equal(d.hasExecutable, true, 'precondition: this manifest takes the executable branch');
@@ -604,7 +604,7 @@ describe('K. Consent prompt', () => {
});
// Row 26c — the CLI edge calls `summarizeDisclosure(res.disclosure || {})`
// (gsd-core/bin/lib/capability-command-router.cjs), so a BARE `{}` carrying no arrays at all
// (msd-core/bin/lib/capability-command-router.cjs), so a BARE `{}` carrying no arrays at all
// reaches both renderers whenever a lifecycle result has no disclosure. Reading
// `.instructionSurfaces.length` off that object unguarded would throw a TypeError at the consent
// prompt — a crash on the exact path that is supposed to inform the user.
@@ -777,7 +777,7 @@ describe('M. Property-based (fast-check)', () => {
//
// #3248 BLOCKER finding: `summarizeDisclosure`'s lines are joined with `\n` and written RAW to
// stderr on the needs-consent path (`capability-command-router.cjs`). An unescaped newline in a
// manifest-supplied value forged lines indistinguishable from genuine GSD disclosure text, and an
// manifest-supplied value forged lines indistinguishable from genuine MSD disclosure text, and an
// unescaped ANSI/control sequence could rewrite already-printed terminal lines. `renderValueForPrompt`
// is the fix: every manifest-supplied value rendered into a consent-prompt line is escaped and
// length-bounded first. The DISCLOSURE OBJECT itself still carries values VERBATIM (unchanged) —
@@ -790,7 +790,7 @@ describe('M. Property-based (fast-check)', () => {
describe('N. Consent-prompt injection safety', () => {
// Every character that must never survive into a rendered consent-prompt line: C0, DEL, C1, the
// bidi/isolate controls, and the line/paragraph separators. A raw newline forges a line that is
// indistinguishable from genuine GSD disclosure text; a raw ESC lets a manifest value rewrite lines
// indistinguishable from genuine MSD disclosure text; a raw ESC lets a manifest value rewrite lines
// already printed to the terminal. Defined independently of `src/capability-trust.cts`'s own
// `UNSAFE_PROMPT_CHARS` (not imported) so this test does not just echo the implementation back at
// itself — it is an independent restatement of the same forbidden-character contract.