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:
@@ -15,7 +15,7 @@
|
||||
*
|
||||
* Shape (b) — per-expression quasi check: quasis[i+1].raw starts with `/`
|
||||
* and contains `.md` or `.json` at the end of a path component. Catches
|
||||
* `${computePathPrefix(t)}/commands/gsd/x.md` without config-dir markers.
|
||||
* `${computePathPrefix(t)}/commands/msd/x.md` without config-dir markers.
|
||||
*
|
||||
* Config-dir substrings (`/.claude`, `/commands`, `/skills`, etc.) are NOT
|
||||
* content markers — removed to eliminate diagnostic/log FPs.
|
||||
@@ -25,9 +25,9 @@
|
||||
*
|
||||
* INVALID (violation expected):
|
||||
* - path.join(home, '.claude') interpolated into a template containing @~/
|
||||
* - computePathPrefix(...) interpolated into a template with /commands/gsd/x.md
|
||||
* - computePathPrefix(...) interpolated into a template with /commands/msd/x.md
|
||||
* (shape b: quasi immediately after starts with /…\.md)
|
||||
* - getGlobalConfigDir() in @${fn()}/commands/gsd/help.md (shape b)
|
||||
* - getGlobalConfigDir() in @${fn()}/commands/msd/help.md (shape b)
|
||||
*
|
||||
* VALID (no violation):
|
||||
* - path.basename(p) in any content template — basename cannot contain separators (N1).
|
||||
@@ -42,7 +42,7 @@
|
||||
* - Template with a bare `@` that is not an @-reference (@-narrowing precision)
|
||||
* - path.resolve(configDir) in `${fn()}/.claude/x` — no .md/.json and no
|
||||
* @-ref markers → not flagged (narrowed from Tier 2 / config-dir markers)
|
||||
* - os.homedir() in `${fn()}/.claude/gsd-core/commands` — same: no .md/.json
|
||||
* - os.homedir() in `${fn()}/.claude/msd-core/commands` — same: no .md/.json
|
||||
*/
|
||||
|
||||
const { test, describe } = require('node:test');
|
||||
@@ -94,7 +94,7 @@ describe('normalize-path-in-content invalid cases', () => {
|
||||
{
|
||||
// computePathPrefix is a PATH_RETURNING_FNS entry; its result used
|
||||
// directly in a template with a .md path reference is flagged.
|
||||
code: `const body = \`\${computePathPrefix(t)}/commands/gsd/x.md\`;`,
|
||||
code: `const body = \`\${computePathPrefix(t)}/commands/msd/x.md\`;`,
|
||||
errors: [{ messageId: 'pathInContent' }],
|
||||
},
|
||||
],
|
||||
@@ -115,30 +115,30 @@ describe('normalize-path-in-content invalid cases', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('invalid: getGlobalConfigDir("claude") in @${fn()}/commands/gsd/help.md — shape (b) fires: quasi after expr starts with /commands/gsd/help.md', () => {
|
||||
test('invalid: getGlobalConfigDir("claude") in @${fn()}/commands/msd/help.md — shape (b) fires: quasi after expr starts with /commands/msd/help.md', () => {
|
||||
ruleTester.run('normalize-path-in-content', normalizePathInContent, {
|
||||
valid: [],
|
||||
invalid: [
|
||||
{
|
||||
// Shape (b): quasi[1] = '/commands/gsd/help.md' starts with '/' and ends with '.md'
|
||||
// Shape (b): quasi[1] = '/commands/msd/help.md' starts with '/' and ends with '.md'
|
||||
// → QUASI_MD_JSON_RE matches → path call is flagged regardless of config-dir markers.
|
||||
// Note: bare '@' in quasi[0] is NOT a content marker (only @~, @$, @/ are);
|
||||
// this case is detected by shape (b) alone.
|
||||
code: `const ref = \`@\${getGlobalConfigDir('claude')}/commands/gsd/help.md\`;`,
|
||||
code: `const ref = \`@\${getGlobalConfigDir('claude')}/commands/msd/help.md\`;`,
|
||||
errors: [{ messageId: 'pathInContent' }],
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test('valid (narrowed): os.homedir() in template /.claude/gsd-core/commands — no .md/.json and no @-ref → NOT flagged after Tier 2 marker removal', () => {
|
||||
test('valid (narrowed): os.homedir() in template /.claude/msd-core/commands — no .md/.json and no @-ref → NOT flagged after Tier 2 marker removal', () => {
|
||||
// /.claude was a Tier 2 marker but was removed to eliminate diagnostic FPs.
|
||||
// Shape (b) requires /…\.md or /…\.json immediately after the expression.
|
||||
// /.claude/gsd-core/commands has no .md/.json → VALID.
|
||||
// /.claude/msd-core/commands has no .md/.json → VALID.
|
||||
ruleTester.run('normalize-path-in-content', normalizePathInContent, {
|
||||
valid: [
|
||||
{
|
||||
code: `const body = \`\${os.homedir()}/.claude/gsd-core/commands\`;`,
|
||||
code: `const body = \`\${os.homedir()}/.claude/msd-core/commands\`;`,
|
||||
},
|
||||
],
|
||||
invalid: [],
|
||||
@@ -180,7 +180,7 @@ describe('normalize-path-in-content valid cases', () => {
|
||||
ruleTester.run('normalize-path-in-content', normalizePathInContent, {
|
||||
valid: [
|
||||
{
|
||||
code: `const body = \`\${toPosixPath(path.resolve(configDir))}/commands/gsd/x.md\`;`,
|
||||
code: `const body = \`\${toPosixPath(path.resolve(configDir))}/commands/msd/x.md\`;`,
|
||||
},
|
||||
],
|
||||
invalid: [],
|
||||
@@ -191,7 +191,7 @@ describe('normalize-path-in-content valid cases', () => {
|
||||
ruleTester.run('normalize-path-in-content', normalizePathInContent, {
|
||||
valid: [
|
||||
{
|
||||
// Log line: no @, $HOME, .md, /gsd etc. in the template quasis
|
||||
// Log line: no @, $HOME, .md, /msd etc. in the template quasis
|
||||
code: `console.log(\`built \${path.join(a, b)}\`);`,
|
||||
},
|
||||
],
|
||||
@@ -228,7 +228,7 @@ describe('normalize-path-in-content valid cases', () => {
|
||||
ruleTester.run('normalize-path-in-content', normalizePathInContent, {
|
||||
valid: [
|
||||
{
|
||||
// No @, $HOME, ~/., .md, /gsd, etc. → not considered content
|
||||
// No @, $HOME, ~/., .md, /msd, etc. → not considered content
|
||||
code: `const msg = \`Processing \${path.join(a, b)} now\`;`,
|
||||
},
|
||||
],
|
||||
@@ -253,7 +253,7 @@ const ref = \`@\${posixTarget}/.claude/x.md\`;`,
|
||||
ruleTester.run('normalize-path-in-content', normalizePathInContent, {
|
||||
valid: [
|
||||
{
|
||||
code: `const body = \`@\${toPosixPath(resolveAgentDir('opencode', { homedir: () => home }))}/agents/gsd.md\`;`,
|
||||
code: `const body = \`@\${toPosixPath(resolveAgentDir('opencode', { homedir: () => home }))}/agents/msd.md\`;`,
|
||||
},
|
||||
],
|
||||
invalid: [],
|
||||
@@ -318,7 +318,7 @@ const ref = \`@\${posixTarget}/.claude/x.md\`;`,
|
||||
// contains "PROJECT.md / REQUIREMENTS.md" (bare prose), but the quasi
|
||||
// after the expression does NOT start with '/' → shape (b) does not fire.
|
||||
// And no @-ref / $HOME / ~/ markers → shape (a) does not fire.
|
||||
code: `const msg = \`Left existing \${path.basename(outputPath)} untouched (no GSD markers found). Broad project context lives in PROJECT.md / REQUIREMENTS.md; pass --force to overwrite.\`;`,
|
||||
code: `const msg = \`Left existing \${path.basename(outputPath)} untouched (no MSD markers found). Broad project context lives in PROJECT.md / REQUIREMENTS.md; pass --force to overwrite.\`;`,
|
||||
},
|
||||
],
|
||||
invalid: [],
|
||||
@@ -355,15 +355,15 @@ const ref = \`@\${posixTarget}/.claude/x.md\`;`,
|
||||
});
|
||||
});
|
||||
|
||||
test('invalid (N4 confirm): ${computePathPrefix(t)}/commands/gsd/x.md — still flagged after N1/N2 via shape (b)', () => {
|
||||
test('invalid (N4 confirm): ${computePathPrefix(t)}/commands/msd/x.md — still flagged after N1/N2 via shape (b)', () => {
|
||||
ruleTester.run('normalize-path-in-content', normalizePathInContent, {
|
||||
valid: [],
|
||||
invalid: [
|
||||
{
|
||||
// Shape (b): quasi[1] = '/commands/gsd/x.md' starts with '/' and ends with '.md'
|
||||
// Shape (b): quasi[1] = '/commands/msd/x.md' starts with '/' and ends with '.md'
|
||||
// → QUASI_MD_JSON_RE matches → flagged. (/commands/ is no longer in CONTENT_MARKERS
|
||||
// but shape (b) per-expression check catches this case.)
|
||||
code: `const body = \`\${computePathPrefix(t)}/commands/gsd/x.md\`;`,
|
||||
code: `const body = \`\${computePathPrefix(t)}/commands/msd/x.md\`;`,
|
||||
errors: [{ messageId: 'pathInContent' }],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user