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:
@@ -3,10 +3,10 @@
|
||||
* Failing-first suite for `resolveTriggerSurface` (#2871 Phase 2).
|
||||
*
|
||||
* `resolveTriggerSurface` does NOT exist yet in src/runtime-artifact-layout.cts
|
||||
* (nor in its built gsd-core/bin/lib/runtime-artifact-layout.cjs counterpart).
|
||||
* (nor in its built msd-core/bin/lib/runtime-artifact-layout.cjs counterpart).
|
||||
* Every test below is expected to FAIL until it lands — see
|
||||
* .gsd/phase/feat-2871-trigger-resolution/50-test-matrix.md (rows 1-23) and
|
||||
* .gsd/phase/feat-2871-trigger-resolution/40-design.md for the contract this
|
||||
* .msd/phase/feat-2871-trigger-resolution/50-test-matrix.md (rows 1-23) and
|
||||
* .msd/phase/feat-2871-trigger-resolution/40-design.md for the contract this
|
||||
* suite locks.
|
||||
*
|
||||
* Idiom: per-runtime `describe` + explicit field assertions, matching the
|
||||
@@ -56,10 +56,10 @@ const assert = require('node:assert/strict');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const runtimeArtifactLayout = require('../gsd-core/bin/lib/runtime-artifact-layout.cjs');
|
||||
const runtimeArtifactLayout = require('../msd-core/bin/lib/runtime-artifact-layout.cjs');
|
||||
const { resolveTriggerSurface } = runtimeArtifactLayout;
|
||||
const capabilityRegistry = require('../gsd-core/bin/lib/capability-registry.cjs');
|
||||
const capValidator = require('../gsd-core/bin/lib/capability-validator.cjs');
|
||||
const capabilityRegistry = require('../msd-core/bin/lib/capability-registry.cjs');
|
||||
const capValidator = require('../msd-core/bin/lib/capability-validator.cjs');
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '..');
|
||||
|
||||
@@ -123,7 +123,7 @@ describe('resolveTriggerSurface — claude', () => {
|
||||
const result = resolveTriggerSurface('claude', ['global', 'local'], { stems });
|
||||
assert.strictEqual(result.length, stems.length * 2);
|
||||
for (const stem of stems) {
|
||||
const trigger = `gsd-${stem}`;
|
||||
const trigger = `msd-${stem}`;
|
||||
const winner = result.find((s) => s.trigger === trigger && s.kind === 'skills' && s.scope === 'global');
|
||||
const loser = result.find((s) => s.trigger === trigger && s.kind === 'commands' && s.scope === 'local');
|
||||
assert.ok(winner, `missing global skills entry for ${trigger}`);
|
||||
@@ -179,7 +179,7 @@ describe('resolveTriggerSurface — both-scope runtimes', () => {
|
||||
];
|
||||
for (const runtime of BOTH_SCOPE_RUNTIMES) {
|
||||
const result = resolveTriggerSurface(runtime, ['global', 'local'], { stems: ['plan-phase'] });
|
||||
const group = result.filter((s) => s.trigger === 'gsd-plan-phase');
|
||||
const group = result.filter((s) => s.trigger === 'msd-plan-phase');
|
||||
assert.ok(group.length >= 2, `${runtime}: expected at least 2 candidate entries, got ${group.length}`);
|
||||
const winners = group.filter((s) => s.shadowedBy === null);
|
||||
assert.strictEqual(winners.length, 1, `${runtime}: expected exactly one unshadowed winner, got ${winners.length}`);
|
||||
@@ -229,7 +229,7 @@ describe('resolveTriggerSurface — windsurf', () => {
|
||||
const result = resolveTriggerSurface('windsurf', ['global', 'local'], { stems: ['plan-phase'] });
|
||||
assert.strictEqual(result.length, 1, `expected exactly one trigger, got ${JSON.stringify(result)}`);
|
||||
const [entry] = result;
|
||||
assert.strictEqual(entry.trigger, 'gsd-plan-phase');
|
||||
assert.strictEqual(entry.trigger, 'msd-plan-phase');
|
||||
assert.strictEqual(entry.kind, 'commands');
|
||||
assert.strictEqual(entry.scope, 'local');
|
||||
assert.strictEqual(entry.shadowedBy, null, 'windsurf must not report a shadow it does not have');
|
||||
@@ -263,14 +263,14 @@ describe('resolveTriggerSurface — nested-router runtimes (#69)', () => {
|
||||
for (const runtime of NESTED_ROUTER_RUNTIMES) {
|
||||
const result = resolveTriggerSurface(runtime, ['global'], opts);
|
||||
const skillsEntries = result.filter((s) => s.kind === 'skills');
|
||||
const router = skillsEntries.find((s) => s.trigger === 'gsd-ns-plan');
|
||||
const child = skillsEntries.find((s) => s.trigger === 'gsd-plan-phase');
|
||||
const router = skillsEntries.find((s) => s.trigger === 'msd-ns-plan');
|
||||
const child = skillsEntries.find((s) => s.trigger === 'msd-plan-phase');
|
||||
assert.ok(router, `${runtime}: missing router skills entry`);
|
||||
assert.ok(child, `${runtime}: missing child skills entry`);
|
||||
assert.strictEqual(router.registration, 'direct', `${runtime}: the router itself registers direct`);
|
||||
assert.strictEqual(router.routerTrigger, null, `${runtime}: a router has no routerTrigger of its own`);
|
||||
assert.strictEqual(child.registration, 'via-router', `${runtime}: the child is only reachable via its router`);
|
||||
assert.strictEqual(child.routerTrigger, 'gsd-ns-plan', `${runtime}: the child must name its owning router`);
|
||||
assert.strictEqual(child.routerTrigger, 'msd-ns-plan', `${runtime}: the child must name its owning router`);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -287,7 +287,7 @@ describe('resolveTriggerSurface — namespacedByDir (hostile fixture, #row 12)',
|
||||
runtime: {
|
||||
artifactLayout: {
|
||||
global: [
|
||||
{ kind: 'commands', destSubpath: 'commands/gsd', prefix: 'gsd-', nesting: 'flat', recursive: false, converter: null },
|
||||
{ kind: 'commands', destSubpath: 'commands/msd', prefix: 'msd-', nesting: 'flat', recursive: false, converter: null },
|
||||
],
|
||||
local: [],
|
||||
},
|
||||
@@ -299,11 +299,11 @@ describe('resolveTriggerSurface — namespacedByDir (hostile fixture, #row 12)',
|
||||
assert.strictEqual(result.length, 1);
|
||||
const [entry] = result;
|
||||
// The trigger (what the user types) is unaffected by the destPath branch.
|
||||
assert.strictEqual(entry.trigger, 'gsd-plan-phase');
|
||||
assert.strictEqual(entry.trigger, 'msd-plan-phase');
|
||||
// destPath must go through the namespacedByDir branch: bare filename, no
|
||||
// double-applied prefix — NOT the naive `${destSubpath}/${prefix}${stem}.md`.
|
||||
assert.strictEqual(entry.destPath, 'commands/gsd/plan-phase.md');
|
||||
assert.notStrictEqual(entry.destPath, 'commands/gsd/gsd-plan-phase.md');
|
||||
assert.strictEqual(entry.destPath, 'commands/msd/plan-phase.md');
|
||||
assert.notStrictEqual(entry.destPath, 'commands/msd/msd-plan-phase.md');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -398,7 +398,7 @@ describe('triggerPrecedence axis — validator', () => {
|
||||
const registry = { runtimes: { claude: cap } };
|
||||
const stems = ['plan-phase'];
|
||||
const result = resolveTriggerSurface('claude', ['global', 'local'], { stems, registry });
|
||||
const trigger = 'gsd-plan-phase';
|
||||
const trigger = 'msd-plan-phase';
|
||||
const winner = result.find((s) => s.trigger === trigger && s.shadowedBy === null);
|
||||
const loser = result.find((s) => s.trigger === trigger && s.shadowedBy !== null);
|
||||
assert.ok(winner, `missing unshadowed winner for ${trigger}`);
|
||||
@@ -466,7 +466,7 @@ describe('triggerPrecedence axis — resolution', () => {
|
||||
// same source stems — the one runtime shape where kind precedence (not
|
||||
// scope rank) decides the winner.
|
||||
const defaultResult = resolveTriggerSurface('codebuddy', ['global'], { stems: ['plan-phase'] });
|
||||
const defaultGroup = defaultResult.filter((s) => s.trigger === 'gsd-plan-phase');
|
||||
const defaultGroup = defaultResult.filter((s) => s.trigger === 'msd-plan-phase');
|
||||
const defaultWinner = defaultGroup.find((s) => s.shadowedBy === null);
|
||||
assert.ok(defaultWinner, 'expected a winner under the default precedence');
|
||||
assert.strictEqual(defaultWinner.kind, 'skills', 'default precedence (skills > commands) must pick skills');
|
||||
@@ -476,7 +476,7 @@ describe('triggerPrecedence axis — resolution', () => {
|
||||
const overriddenRegistry = { runtimes: { codebuddy: overriddenCap } };
|
||||
|
||||
const overriddenResult = resolveTriggerSurface('codebuddy', ['global'], { stems: ['plan-phase'], registry: overriddenRegistry });
|
||||
const overriddenGroup = overriddenResult.filter((s) => s.trigger === 'gsd-plan-phase');
|
||||
const overriddenGroup = overriddenResult.filter((s) => s.trigger === 'msd-plan-phase');
|
||||
const overriddenWinner = overriddenGroup.find((s) => s.shadowedBy === null);
|
||||
assert.ok(overriddenWinner, 'expected a winner under the overridden precedence');
|
||||
assert.strictEqual(overriddenWinner.kind, 'commands', 'reordered precedence (commands > skills) must flip the winner');
|
||||
|
||||
Reference in New Issue
Block a user