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:
@@ -10,7 +10,7 @@ const { test, describe, beforeEach, afterEach } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { runGsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
||||
const { runMsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
||||
|
||||
describe('generate-claude-md', () => {
|
||||
let tmpDir;
|
||||
@@ -29,7 +29,7 @@ describe('generate-claude-md', () => {
|
||||
'# Test Project\n\n## What This Is\n\nA small test project.\n'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -39,16 +39,16 @@ describe('generate-claude-md', () => {
|
||||
|
||||
const claudePath = path.join(tmpDir, '.claude', 'CLAUDE.md');
|
||||
const content = fs.readFileSync(claudePath, 'utf-8');
|
||||
assert.ok(content.includes('## GSD Workflow Enforcement'));
|
||||
assert.ok(content.includes('## MSD Workflow Enforcement'));
|
||||
// #3584: generated CLAUDE.md must emit the runtime-routable hyphen-form
|
||||
// (Claude/Cursor/OpenCode/Kilo etc.); the legacy colon form is no longer
|
||||
// dispatched by current skill installs.
|
||||
assert.ok(content.includes('/gsd-quick'));
|
||||
assert.ok(content.includes('/gsd-debug'));
|
||||
assert.ok(content.includes('/gsd-execute-phase'));
|
||||
assert.ok(!content.includes('/gsd:quick'));
|
||||
assert.ok(!content.includes('/gsd:execute-phase'));
|
||||
assert.ok(content.includes('Do not make direct repo edits outside a GSD workflow'));
|
||||
assert.ok(content.includes('/msd-quick'));
|
||||
assert.ok(content.includes('/msd-debug'));
|
||||
assert.ok(content.includes('/msd-execute-phase'));
|
||||
assert.ok(!content.includes('/msd:quick'));
|
||||
assert.ok(!content.includes('/msd:execute-phase'));
|
||||
assert.ok(content.includes('Do not make direct repo edits outside a MSD workflow'));
|
||||
});
|
||||
|
||||
test('adds workflow enforcement section when force-updating an existing marker-less CLAUDE.md', () => {
|
||||
@@ -56,11 +56,11 @@ describe('generate-claude-md', () => {
|
||||
path.join(tmpDir, '.planning', 'PROJECT.md'),
|
||||
'# Test Project\n\n## What This Is\n\nA small test project.\n'
|
||||
);
|
||||
// #1098: a hand-crafted file (no GSD markers) is only overwritten with --force.
|
||||
// #1098: a hand-crafted file (no MSD markers) is only overwritten with --force.
|
||||
fs.mkdirSync(path.join(tmpDir, '.claude'), { recursive: true });
|
||||
fs.writeFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), '## Local Notes\n\nKeep this intro.\n');
|
||||
|
||||
const result = runGsdTools('generate-claude-md --force', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md --force', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -68,7 +68,7 @@ describe('generate-claude-md', () => {
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
assert.ok(content.includes('## Local Notes'));
|
||||
assert.ok(content.includes('## GSD Workflow Enforcement'));
|
||||
assert.ok(content.includes('## MSD Workflow Enforcement'));
|
||||
});
|
||||
|
||||
test('#1098: does NOT clobber an existing marker-less CLAUDE.md without --force', () => {
|
||||
@@ -80,7 +80,7 @@ describe('generate-claude-md', () => {
|
||||
fs.mkdirSync(path.join(tmpDir, '.claude'), { recursive: true });
|
||||
fs.writeFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), handCrafted);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -88,21 +88,21 @@ describe('generate-claude-md', () => {
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
assert.strictEqual(content, handCrafted, 'hand-crafted file must be left byte-identical');
|
||||
assert.ok(!content.includes('## GSD Workflow Enforcement'), 'GSD sections must NOT be injected');
|
||||
assert.ok(!content.includes('## MSD Workflow Enforcement'), 'MSD sections must NOT be injected');
|
||||
});
|
||||
|
||||
test('#1098: updates an existing GSD-managed CLAUDE.md (has markers) without --force', () => {
|
||||
test('#1098: updates an existing MSD-managed CLAUDE.md (has markers) without --force', () => {
|
||||
fs.writeFileSync(
|
||||
path.join(tmpDir, '.planning', 'PROJECT.md'),
|
||||
'# Test Project\n\n## What This Is\n\nA small test project.\n'
|
||||
);
|
||||
// First generation creates a GSD-managed file (with markers).
|
||||
const first = runGsdTools('generate-claude-md', tmpDir);
|
||||
// First generation creates a MSD-managed file (with markers).
|
||||
const first = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(first.success, `Command failed: ${first.error}`);
|
||||
assert.strictEqual(JSON.parse(first.output).action, 'created');
|
||||
|
||||
// Re-running updates it in place — markers present, so no --force needed.
|
||||
const second = runGsdTools('generate-claude-md', tmpDir);
|
||||
const second = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(second.success, `Command failed: ${second.error}`);
|
||||
assert.strictEqual(JSON.parse(second.output).action, 'updated');
|
||||
});
|
||||
@@ -112,7 +112,7 @@ describe('generate-claude-md', () => {
|
||||
path.join(tmpDir, '.planning', 'PROJECT.md'),
|
||||
'# Test Project\n\n## What This Is\n\nA small test project.\n'
|
||||
);
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
const output = JSON.parse(result.output);
|
||||
assert.ok(
|
||||
@@ -125,7 +125,7 @@ describe('generate-claude-md', () => {
|
||||
});
|
||||
|
||||
describe('new-project workflow includes CLAUDE.md generation', () => {
|
||||
const workflowPath = path.join(__dirname, '..', 'gsd-core', 'workflows', 'new-project.md');
|
||||
const workflowPath = path.join(__dirname, '..', 'msd-core', 'workflows', 'new-project.md');
|
||||
const commandsPath = path.join(__dirname, '..', 'docs', 'COMMANDS.md');
|
||||
|
||||
test('new-project workflow generates instruction file before final commit', () => {
|
||||
@@ -165,15 +165,15 @@ describe('generate-claude-md skills section', () => {
|
||||
});
|
||||
|
||||
test('includes skills fallback when no skills directories exist', () => {
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
assert.ok(output.sections_fallback.includes('skills'));
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
assert.ok(content.includes('<!-- GSD:skills-start'));
|
||||
assert.ok(content.includes('<!-- GSD:skills-end -->'));
|
||||
assert.ok(content.includes('<!-- MSD:skills-start'));
|
||||
assert.ok(content.includes('<!-- MSD:skills-end -->'));
|
||||
assert.ok(content.includes('No project skills found. Add skills to any of'));
|
||||
});
|
||||
|
||||
@@ -185,7 +185,7 @@ describe('generate-claude-md skills section', () => {
|
||||
'---\nname: api-payments\ndescription: Payment gateway integration.\n---\n\n# API Payments\n'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const output = JSON.parse(result.output);
|
||||
@@ -206,7 +206,7 @@ describe('generate-claude-md skills section', () => {
|
||||
'---\nname: data-sync\ndescription: ERP synchronization flows.\n---\n\n# Data Sync\n'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
@@ -222,10 +222,10 @@ describe('generate-claude-md skills section', () => {
|
||||
'---\nname: automation\ndescription: Project Codex skill.\n---\n\n# Automation\n'
|
||||
);
|
||||
|
||||
const homeDir = fs.mkdtempSync(path.join(require('os').tmpdir(), 'gsd-claude-skills-home-'));
|
||||
fs.mkdirSync(path.join(homeDir, '.claude', 'gsd-core', 'skills', 'import-only'), { recursive: true });
|
||||
const homeDir = fs.mkdtempSync(path.join(require('os').tmpdir(), 'msd-claude-skills-home-'));
|
||||
fs.mkdirSync(path.join(homeDir, '.claude', 'msd-core', 'skills', 'import-only'), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(homeDir, '.claude', 'gsd-core', 'skills', 'import-only', 'SKILL.md'),
|
||||
path.join(homeDir, '.claude', 'msd-core', 'skills', 'import-only', 'SKILL.md'),
|
||||
'---\nname: import-only\ndescription: Deprecated import-only skill.\n---\n'
|
||||
);
|
||||
|
||||
@@ -235,7 +235,7 @@ describe('generate-claude-md skills section', () => {
|
||||
process.env.USERPROFILE = homeDir;
|
||||
|
||||
try {
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
@@ -251,25 +251,25 @@ describe('generate-claude-md skills section', () => {
|
||||
}
|
||||
});
|
||||
|
||||
test('skips gsd- prefixed skill directories', () => {
|
||||
const gsdSkillDir = path.join(tmpDir, '.claude', 'skills', 'gsd-plan-phase');
|
||||
test('skips msd- prefixed skill directories', () => {
|
||||
const msdSkillDir = path.join(tmpDir, '.claude', 'skills', 'msd-plan-phase');
|
||||
const userSkillDir = path.join(tmpDir, '.claude', 'skills', 'my-feature');
|
||||
fs.mkdirSync(gsdSkillDir, { recursive: true });
|
||||
fs.mkdirSync(msdSkillDir, { recursive: true });
|
||||
fs.mkdirSync(userSkillDir, { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(gsdSkillDir, 'SKILL.md'),
|
||||
'---\nname: gsd-plan-phase\ndescription: GSD internal skill.\n---\n'
|
||||
path.join(msdSkillDir, 'SKILL.md'),
|
||||
'---\nname: msd-plan-phase\ndescription: MSD internal skill.\n---\n'
|
||||
);
|
||||
fs.writeFileSync(
|
||||
path.join(userSkillDir, 'SKILL.md'),
|
||||
'---\nname: my-feature\ndescription: Custom project skill.\n---\n'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
assert.ok(!content.includes('gsd-plan-phase'));
|
||||
assert.ok(!content.includes('msd-plan-phase'));
|
||||
assert.ok(content.includes('my-feature'));
|
||||
assert.ok(content.includes('Custom project skill'));
|
||||
});
|
||||
@@ -282,7 +282,7 @@ describe('generate-claude-md skills section', () => {
|
||||
'---\nname: complex-skill\ndescription: First line of description.\n Continued on second line.\n And a third line.\n---\n'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
@@ -301,7 +301,7 @@ describe('generate-claude-md skills section', () => {
|
||||
fs.writeFileSync(path.join(dir1, 'SKILL.md'), skillContent);
|
||||
fs.writeFileSync(path.join(dir2, 'SKILL.md'), skillContent);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
@@ -312,7 +312,7 @@ describe('generate-claude-md skills section', () => {
|
||||
|
||||
test('updates existing skills section on regeneration', () => {
|
||||
// First generation — no skills
|
||||
runGsdTools('generate-claude-md', tmpDir);
|
||||
runMsdTools('generate-claude-md', tmpDir);
|
||||
let content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
assert.ok(content.includes('No project skills found'));
|
||||
|
||||
@@ -324,7 +324,7 @@ describe('generate-claude-md skills section', () => {
|
||||
'---\nname: new-skill\ndescription: Just added.\n---\n'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
@@ -341,13 +341,13 @@ describe('generate-claude-md skills section', () => {
|
||||
'---\nname: ordering-test\ndescription: Verify section order.\n---\n'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir);
|
||||
const result = runMsdTools('generate-claude-md', tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const content = fs.readFileSync(path.join(tmpDir, '.claude', 'CLAUDE.md'), 'utf-8');
|
||||
const archIdx = content.indexOf('## Architecture');
|
||||
const skillsIdx = content.indexOf('## Project Skills');
|
||||
const workflowIdx = content.indexOf('## GSD Workflow Enforcement');
|
||||
const workflowIdx = content.indexOf('## MSD Workflow Enforcement');
|
||||
assert.ok(archIdx < skillsIdx, 'Skills section should come after Architecture');
|
||||
assert.ok(skillsIdx < workflowIdx, 'Skills section should come before Workflow Enforcement');
|
||||
});
|
||||
@@ -365,7 +365,7 @@ describe('generate-claude-md skills section', () => {
|
||||
/**
|
||||
* Bug #3163: generate-claude-md should write to AGENTS.md on Codex runtime.
|
||||
*
|
||||
* When config.runtime === 'codex' (or GSD_RUNTIME=codex), the generate-claude-md
|
||||
* When config.runtime === 'codex' (or MSD_RUNTIME=codex), the generate-claude-md
|
||||
* handler must resolve the output path to AGENTS.md, not CLAUDE.md.
|
||||
*/
|
||||
|
||||
@@ -373,7 +373,7 @@ const { describe, test, beforeEach, afterEach } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
const { runGsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
||||
const { runMsdTools, createTempProject, cleanup } = require('./helpers.cjs');
|
||||
|
||||
describe('bug #3163: generate-claude-md uses AGENTS.md for Codex runtime', () => {
|
||||
let tmpDir;
|
||||
@@ -399,7 +399,7 @@ describe('bug #3163: generate-claude-md uses AGENTS.md for Codex runtime', () =>
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir, { HOME: tmpDir });
|
||||
const result = runMsdTools('generate-claude-md', tmpDir, { HOME: tmpDir });
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const parsed = JSON.parse(result.output);
|
||||
@@ -416,7 +416,7 @@ describe('bug #3163: generate-claude-md uses AGENTS.md for Codex runtime', () =>
|
||||
assert.ok(!fs.existsSync(path.join(realTmpDir, 'CLAUDE.md')), 'CLAUDE.md must not be created for Codex runtime');
|
||||
});
|
||||
|
||||
test('writes to AGENTS.md when GSD_RUNTIME=codex env var is set (env takes precedence over config)', () => {
|
||||
test('writes to AGENTS.md when MSD_RUNTIME=codex env var is set (env takes precedence over config)', () => {
|
||||
const configPath = path.join(tmpDir, '.planning', 'config.json');
|
||||
// Config says runtime: claude but env overrides to codex
|
||||
fs.writeFileSync(
|
||||
@@ -425,7 +425,7 @@ describe('bug #3163: generate-claude-md uses AGENTS.md for Codex runtime', () =>
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir, { HOME: tmpDir, GSD_RUNTIME: 'codex' });
|
||||
const result = runMsdTools('generate-claude-md', tmpDir, { HOME: tmpDir, MSD_RUNTIME: 'codex' });
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const parsed = JSON.parse(result.output);
|
||||
@@ -436,7 +436,7 @@ describe('bug #3163: generate-claude-md uses AGENTS.md for Codex runtime', () =>
|
||||
`Expected output path to be AGENTS.md but got: ${parsed.claude_md_path}`
|
||||
);
|
||||
assert.ok(fs.existsSync(expectedAgentsPath), 'AGENTS.md must exist after generation');
|
||||
assert.ok(!fs.existsSync(path.join(realTmpDir, 'CLAUDE.md')), 'CLAUDE.md must not be created when GSD_RUNTIME=codex');
|
||||
assert.ok(!fs.existsSync(path.join(realTmpDir, 'CLAUDE.md')), 'CLAUDE.md must not be created when MSD_RUNTIME=codex');
|
||||
});
|
||||
|
||||
test('--output flag overrides runtime detection when explicitly provided', () => {
|
||||
@@ -448,7 +448,7 @@ describe('bug #3163: generate-claude-md uses AGENTS.md for Codex runtime', () =>
|
||||
);
|
||||
|
||||
// When --output is explicitly provided, it must be honoured regardless of runtime
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
['generate-claude-md', '--output', 'EXPLICIT-OUTPUT.md'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir }
|
||||
@@ -472,7 +472,7 @@ describe('bug #3163: generate-claude-md uses AGENTS.md for Codex runtime', () =>
|
||||
'utf-8'
|
||||
);
|
||||
|
||||
const result = runGsdTools('generate-claude-md', tmpDir, { HOME: tmpDir });
|
||||
const result = runMsdTools('generate-claude-md', tmpDir, { HOME: tmpDir });
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const parsed = JSON.parse(result.output);
|
||||
@@ -491,7 +491,7 @@ describe('bug #3163: generate-claude-md uses AGENTS.md for Codex runtime', () =>
|
||||
|
||||
// ─── Bug #2565: generate-claude-profile runtime-aware target ─────────────
|
||||
// #2565 is the same divergence class as #3163 above, but in the sibling
|
||||
// handler cmdGenerateClaudeProfile (the /gsd-profile-user surface) instead
|
||||
// handler cmdGenerateClaudeProfile (the /msd-profile-user surface) instead
|
||||
// of cmdGenerateClaudeMd. The #3163 fix did not propagate here, so
|
||||
// generate-claude-profile kept writing .claude/CLAUDE.md on Codex installs.
|
||||
// These tests pin the parity contract: both handlers MUST resolve the
|
||||
@@ -539,7 +539,7 @@ describe('bug #2565: generate-claude-profile uses AGENTS.md for Codex runtime',
|
||||
writeConfig({ runtime: 'codex', claude_md_path: './CLAUDE.md' });
|
||||
const analysisPath = writeAnalysis();
|
||||
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
['generate-claude-profile', '--analysis', analysisPath],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir }
|
||||
@@ -557,30 +557,30 @@ describe('bug #2565: generate-claude-profile uses AGENTS.md for Codex runtime',
|
||||
'CLAUDE.md must not be created for Codex runtime');
|
||||
});
|
||||
|
||||
test('project scope: GSD_RUNTIME=codex env var overrides config.runtime=claude', () => {
|
||||
test('project scope: MSD_RUNTIME=codex env var overrides config.runtime=claude', () => {
|
||||
writeConfig({ runtime: 'claude', claude_md_path: './CLAUDE.md' });
|
||||
const analysisPath = writeAnalysis();
|
||||
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
['generate-claude-profile', '--analysis', analysisPath],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, GSD_RUNTIME: 'codex' }
|
||||
{ HOME: tmpDir, MSD_RUNTIME: 'codex' }
|
||||
);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const parsed = JSON.parse(result.output);
|
||||
const realTmpDir = fs.realpathSync(tmpDir);
|
||||
assert.strictEqual(parsed.claude_md_path, path.join(realTmpDir, 'AGENTS.md'),
|
||||
`Expected AGENTS.md under GSD_RUNTIME=codex but got: ${parsed.claude_md_path}`);
|
||||
`Expected AGENTS.md under MSD_RUNTIME=codex but got: ${parsed.claude_md_path}`);
|
||||
assert.ok(!fs.existsSync(path.join(realTmpDir, 'CLAUDE.md')),
|
||||
'CLAUDE.md must not be created when GSD_RUNTIME=codex');
|
||||
'CLAUDE.md must not be created when MSD_RUNTIME=codex');
|
||||
});
|
||||
|
||||
test('project scope: --output flag overrides runtime detection when explicitly provided', () => {
|
||||
writeConfig({ runtime: 'codex', claude_md_path: './CLAUDE.md' });
|
||||
const analysisPath = writeAnalysis();
|
||||
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
['generate-claude-profile', '--analysis', analysisPath, '--output', 'EXPLICIT-OUTPUT.md'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir }
|
||||
@@ -597,7 +597,7 @@ describe('bug #2565: generate-claude-profile uses AGENTS.md for Codex runtime',
|
||||
writeConfig({ runtime: 'claude', claude_md_path: './.claude/CLAUDE.md' });
|
||||
const analysisPath = writeAnalysis();
|
||||
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
['generate-claude-profile', '--analysis', analysisPath],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir }
|
||||
@@ -619,7 +619,7 @@ describe('bug #2565: generate-claude-profile uses AGENTS.md for Codex runtime',
|
||||
const analysisPath = writeAnalysis();
|
||||
const codexHome = path.join(tmpDir, 'codex-config');
|
||||
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
['generate-claude-profile', '--analysis', analysisPath, '--global'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, CODEX_HOME: codexHome }
|
||||
@@ -643,7 +643,7 @@ describe('bug #2565: generate-claude-profile uses AGENTS.md for Codex runtime',
|
||||
// on Windows too — Node's os.homedir() reads USERPROFILE on Windows and
|
||||
// HOME on POSIX, so HOME alone leaves the real user profile in place on
|
||||
// Windows and the path assertion fails cross-platform.
|
||||
const result = runGsdTools(
|
||||
const result = runMsdTools(
|
||||
['generate-claude-profile', '--analysis', analysisPath, '--global'],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir, USERPROFILE: tmpDir }
|
||||
@@ -665,7 +665,7 @@ describe('bug #2565: generate-claude-profile uses AGENTS.md for Codex runtime',
|
||||
writeConfig({ runtime: 'codex' });
|
||||
const analysisPath = writeAnalysis();
|
||||
|
||||
const mdResult = runGsdTools('generate-claude-md', tmpDir, { HOME: tmpDir });
|
||||
const mdResult = runMsdTools('generate-claude-md', tmpDir, { HOME: tmpDir });
|
||||
assert.ok(mdResult.success, `generate-claude-md failed: ${mdResult.error}`);
|
||||
const mdParsed = JSON.parse(mdResult.output);
|
||||
|
||||
@@ -673,7 +673,7 @@ describe('bug #2565: generate-claude-profile uses AGENTS.md for Codex runtime',
|
||||
// starts from the same empty-project state (independent parity read).
|
||||
try { fs.unlinkSync(mdParsed.claude_md_path); } catch { /* already gone */ }
|
||||
|
||||
const profileResult = runGsdTools(
|
||||
const profileResult = runMsdTools(
|
||||
['generate-claude-profile', '--analysis', analysisPath],
|
||||
tmpDir,
|
||||
{ HOME: tmpDir }
|
||||
|
||||
Reference in New Issue
Block a user