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:
@@ -1,11 +1,11 @@
|
||||
/**
|
||||
* Drift guard for gsd:plan-phase workflow (#22)
|
||||
* Drift guard for msd:plan-phase workflow (#22)
|
||||
*
|
||||
* Validates that the plan-phase workflow contains the key structural elements
|
||||
* added for issue #22 Change #1:
|
||||
*
|
||||
* (A) intel.enabled gate — when intel.enabled is true, plan-phase regenerates
|
||||
* API-SURFACE.md via `gsd-tools intel api-surface` and injects it into the
|
||||
* API-SURFACE.md via `msd-tools intel api-surface` and injects it into the
|
||||
* planner's required reading as a HINT (prefer symbols, may be incomplete,
|
||||
* absence = unknown, never exhaustive).
|
||||
*
|
||||
@@ -28,13 +28,13 @@ const { readWorkflowCombined } = require('./helpers.cjs');
|
||||
const WORKFLOW_PATH = path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'gsd-core',
|
||||
'msd-core',
|
||||
'workflows',
|
||||
'plan-phase.md'
|
||||
);
|
||||
|
||||
/**
|
||||
* plan-phase.md was fragmented (#2993) into gsd-core/workflows/plan-phase/steps/*.md.
|
||||
* plan-phase.md was fragmented (#2993) into msd-core/workflows/plan-phase/steps/*.md.
|
||||
* Content this drift guard asserts on may now live in the host file, an extracted
|
||||
* step file, or be split across both (e.g. a rule-label count). Guards that need to
|
||||
* see the full picture read this combined blob instead of `workflow` alone so they
|
||||
@@ -62,10 +62,10 @@ describe('plan-phase workflow: intel.enabled gate for API-SURFACE injection (#22
|
||||
);
|
||||
});
|
||||
|
||||
test('workflow runs gsd-tools intel api-surface to regenerate surface', () => {
|
||||
test('workflow runs msd-tools intel api-surface to regenerate surface', () => {
|
||||
assert.ok(
|
||||
workflow.includes('intel api-surface'),
|
||||
'workflow must call `gsd_run intel api-surface` (or equivalent) to regenerate API-SURFACE.md'
|
||||
'workflow must call `msd_run intel api-surface` (or equivalent) to regenerate API-SURFACE.md'
|
||||
);
|
||||
});
|
||||
|
||||
@@ -205,7 +205,7 @@ describe('plan-phase workflow: top-level spawn guard (#913)', () => {
|
||||
test('workflow contains ALL RUNTIMES orchestrator rule labels (count preserved)', () => {
|
||||
// Must have all 7 agent-spawn wait rules still present (none dropped during rename).
|
||||
// #2993 fragmentization moved some spawn sites (e.g. chunked planning) into
|
||||
// gsd-core/workflows/plan-phase/steps/*.md, so the count is taken across the
|
||||
// msd-core/workflows/plan-phase/steps/*.md, so the count is taken across the
|
||||
// host file AND every extracted step file — not the host alone.
|
||||
const combined = readPlanPhaseCombined();
|
||||
const allRuntimesCount = (combined.match(/ORCHESTRATOR RULE — ALL RUNTIMES/g) || []).length;
|
||||
@@ -294,21 +294,21 @@ describe('plan-phase workflow: attempt-based Agent availability gate (#922)', ()
|
||||
/**
|
||||
* Regression test for bug #2948
|
||||
*
|
||||
* `/gsd:spike --wrap-up` was silently no-oping because:
|
||||
* 1. `commands/gsd/spike.md` listed `--wrap-up` as a flag but had no dispatch block.
|
||||
* 2. `workflows/spike.md` still referenced the deleted `/gsd-spike-wrap-up` entry-point
|
||||
* instead of the correct `/gsd:spike --wrap-up` form.
|
||||
* `/msd:spike --wrap-up` was silently no-oping because:
|
||||
* 1. `commands/msd/spike.md` listed `--wrap-up` as a flag but had no dispatch block.
|
||||
* 2. `workflows/spike.md` still referenced the deleted `/msd-spike-wrap-up` entry-point
|
||||
* instead of the correct `/msd:spike --wrap-up` form.
|
||||
*
|
||||
* Fix:
|
||||
* - `commands/gsd/spike.md` now has a dispatch block that routes `--wrap-up` to
|
||||
* - `commands/msd/spike.md` now has a dispatch block that routes `--wrap-up` to
|
||||
* spike-wrap-up.md, and spike-wrap-up.md is listed in execution_context so the
|
||||
* runtime can find it.
|
||||
* - `workflows/spike.md` companion references updated from `/gsd-spike-wrap-up` to
|
||||
* `/gsd:spike --wrap-up`.
|
||||
* - `workflows/spike.md` companion references updated from `/msd-spike-wrap-up` to
|
||||
* `/msd:spike --wrap-up`.
|
||||
*/
|
||||
|
||||
// allow-test-rule: source-text-is-the-product (see #2948)
|
||||
// commands/gsd/*.md files ARE what the runtime loads — testing their
|
||||
// commands/msd/*.md files ARE what the runtime loads — testing their
|
||||
// frontmatter and section content tests the deployed system-prompt contract.
|
||||
|
||||
'use strict';
|
||||
@@ -318,8 +318,8 @@ const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const SPIKE_CMD_PATH = path.join(__dirname, '..', 'commands', 'gsd', 'spike.md');
|
||||
const SPIKE_WORKFLOW_PATH = path.join(__dirname, '..', 'gsd-core', 'workflows', 'spike.md');
|
||||
const SPIKE_CMD_PATH = path.join(__dirname, '..', 'commands', 'msd', 'spike.md');
|
||||
const SPIKE_WORKFLOW_PATH = path.join(__dirname, '..', 'msd-core', 'workflows', 'spike.md');
|
||||
|
||||
/**
|
||||
* Parse YAML frontmatter + body from a markdown file.
|
||||
@@ -379,10 +379,10 @@ function parseExecutionContextRefs(section) {
|
||||
.map(l => l.slice(1).trim());
|
||||
}
|
||||
|
||||
describe('bug-2948: /gsd:spike --wrap-up dispatch wiring', () => {
|
||||
describe('commands/gsd/spike.md — frontmatter and section contract', () => {
|
||||
describe('bug-2948: /msd:spike --wrap-up dispatch wiring', () => {
|
||||
describe('commands/msd/spike.md — frontmatter and section contract', () => {
|
||||
test('spike.md command file exists and has valid frontmatter', () => {
|
||||
assert.ok(fs.existsSync(SPIKE_CMD_PATH), 'commands/gsd/spike.md should exist');
|
||||
assert.ok(fs.existsSync(SPIKE_CMD_PATH), 'commands/msd/spike.md should exist');
|
||||
const fm = parseFrontmatter(fs.readFileSync(SPIKE_CMD_PATH, 'utf-8'));
|
||||
assert.ok(fm.name, 'frontmatter must have a name field');
|
||||
});
|
||||
@@ -431,24 +431,24 @@ describe('bug-2948: /gsd:spike --wrap-up dispatch wiring', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('gsd-core/workflows/spike.md — companion references', () => {
|
||||
describe('msd-core/workflows/spike.md — companion references', () => {
|
||||
test('spike workflow file exists', () => {
|
||||
assert.ok(fs.existsSync(SPIKE_WORKFLOW_PATH), 'gsd-core/workflows/spike.md should exist');
|
||||
assert.ok(fs.existsSync(SPIKE_WORKFLOW_PATH), 'msd-core/workflows/spike.md should exist');
|
||||
});
|
||||
|
||||
test('does NOT reference the deleted /gsd-spike-wrap-up entry-point', () => {
|
||||
test('does NOT reference the deleted /msd-spike-wrap-up entry-point', () => {
|
||||
const fm = parseFrontmatter(fs.readFileSync(SPIKE_WORKFLOW_PATH, 'utf-8'));
|
||||
assert.ok(
|
||||
!fm._body.includes('/gsd-spike-wrap-up'),
|
||||
'workflows/spike.md must not reference the deleted /gsd-spike-wrap-up command; use /gsd:spike --wrap-up instead'
|
||||
!fm._body.includes('/msd-spike-wrap-up'),
|
||||
'workflows/spike.md must not reference the deleted /msd-spike-wrap-up command; use /msd:spike --wrap-up instead'
|
||||
);
|
||||
});
|
||||
|
||||
test('references /gsd:spike --wrap-up as the canonical wrap-up invocation', () => {
|
||||
test('references /msd:spike --wrap-up as the canonical wrap-up invocation', () => {
|
||||
const fm = parseFrontmatter(fs.readFileSync(SPIKE_WORKFLOW_PATH, 'utf-8'));
|
||||
assert.ok(
|
||||
fm._body.includes('/gsd:spike --wrap-up'),
|
||||
'workflows/spike.md must reference /gsd:spike --wrap-up as the canonical wrap-up command'
|
||||
fm._body.includes('/msd:spike --wrap-up'),
|
||||
'workflows/spike.md must reference /msd:spike --wrap-up as the canonical wrap-up command'
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -469,9 +469,9 @@ describe('bug-2948: /gsd:spike --wrap-up dispatch wiring', () => {
|
||||
// Per CONTRIBUTING.md exception matrix.
|
||||
|
||||
/**
|
||||
* GSD Tests — /gsd:sketch --wrap-up silently no-ops (#2949)
|
||||
* MSD Tests — /msd:sketch --wrap-up silently no-ops (#2949)
|
||||
*
|
||||
* The --wrap-up flag was documented in commands/gsd/sketch.md but never dispatched.
|
||||
* The --wrap-up flag was documented in commands/msd/sketch.md but never dispatched.
|
||||
* The sketch-wrap-up.md micro-skill entry point was deleted in #2790 and the dispatch
|
||||
* wiring was never added to the command or workflow.
|
||||
*/
|
||||
@@ -484,11 +484,11 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT = path.resolve(__dirname, '..');
|
||||
const SKETCH_COMMAND = path.join(ROOT, 'commands/gsd/sketch.md');
|
||||
const SKETCH_WORKFLOW = path.join(ROOT, 'gsd-core/workflows/sketch.md');
|
||||
const SKETCH_COMMAND = path.join(ROOT, 'commands/msd/sketch.md');
|
||||
const SKETCH_WORKFLOW = path.join(ROOT, 'msd-core/workflows/sketch.md');
|
||||
|
||||
describe('bug-2949: sketch --wrap-up dispatch wiring', () => {
|
||||
test('commands/gsd/sketch.md contains --wrap-up dispatch logic', () => {
|
||||
test('commands/msd/sketch.md contains --wrap-up dispatch logic', () => {
|
||||
const content = fs.readFileSync(SKETCH_COMMAND, 'utf8');
|
||||
assert.ok(
|
||||
content.includes('--wrap-up'),
|
||||
@@ -501,7 +501,7 @@ describe('bug-2949: sketch --wrap-up dispatch wiring', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('commands/gsd/sketch.md has sketch-wrap-up in execution_context section', () => {
|
||||
test('commands/msd/sketch.md has sketch-wrap-up in execution_context section', () => {
|
||||
const content = fs.readFileSync(SKETCH_COMMAND, 'utf8');
|
||||
// Find execution_context block
|
||||
// eslint-disable-next-line local/no-unbounded-quantifier -- parses this repo's own command .md content, fixed-size author-controlled content
|
||||
@@ -514,19 +514,19 @@ describe('bug-2949: sketch --wrap-up dispatch wiring', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('workflows/sketch.md does NOT contain old /gsd-sketch-wrap-up form', () => {
|
||||
test('workflows/sketch.md does NOT contain old /msd-sketch-wrap-up form', () => {
|
||||
const content = fs.readFileSync(SKETCH_WORKFLOW, 'utf8');
|
||||
assert.ok(
|
||||
!content.includes('/gsd-sketch-wrap-up'),
|
||||
'workflows/sketch.md must not reference the old /gsd-sketch-wrap-up command'
|
||||
!content.includes('/msd-sketch-wrap-up'),
|
||||
'workflows/sketch.md must not reference the old /msd-sketch-wrap-up command'
|
||||
);
|
||||
});
|
||||
|
||||
test('workflows/sketch.md DOES contain new /gsd:sketch --wrap-up form', () => {
|
||||
test('workflows/sketch.md DOES contain new /msd:sketch --wrap-up form', () => {
|
||||
const content = fs.readFileSync(SKETCH_WORKFLOW, 'utf8');
|
||||
assert.ok(
|
||||
content.includes('/gsd:sketch --wrap-up'),
|
||||
'workflows/sketch.md should reference /gsd:sketch --wrap-up (the new form)'
|
||||
content.includes('/msd:sketch --wrap-up'),
|
||||
'workflows/sketch.md should reference /msd:sketch --wrap-up (the new form)'
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -543,20 +543,20 @@ describe('bug-2949: sketch --wrap-up dispatch wiring', () => {
|
||||
'use strict';
|
||||
|
||||
// allow-test-rule: source-text-is-the-product (see #3156)
|
||||
// commands/gsd/*.md files are the deployed skill surface. Their frontmatter
|
||||
// commands/msd/*.md files are the deployed skill surface. Their frontmatter
|
||||
// IS the runtime contract. Checking frontmatter fields checks deployed behaviour.
|
||||
|
||||
/**
|
||||
* #3156 — plan-phase auto-dispatches to gsd-planner subagent on OpenCode,
|
||||
* #3156 — plan-phase auto-dispatches to msd-planner subagent on OpenCode,
|
||||
* losing Task tool access.
|
||||
*
|
||||
* Root cause: commands/gsd/plan-phase.md had `agent: gsd-planner` in its
|
||||
* Root cause: commands/msd/plan-phase.md had `agent: msd-planner` in its
|
||||
* frontmatter. Per OpenCode docs, `agent: <name>` in a command causes
|
||||
* auto-dispatch to a subagent context where the Agent (Task spawner) tool is
|
||||
* unavailable. Orchestrator commands that need to spawn subagents via the
|
||||
* Agent tool must NOT carry an `agent:` frontmatter directive.
|
||||
*
|
||||
* This test parses the YAML frontmatter of every commands/gsd/*.md file and
|
||||
* This test parses the YAML frontmatter of every commands/msd/*.md file and
|
||||
* asserts:
|
||||
* 1. No command file has an `agent:` frontmatter directive at all.
|
||||
* (The directive causes OpenCode to auto-dispatch, breaking any command
|
||||
@@ -571,7 +571,7 @@ const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const ROOT = path.join(__dirname, '..');
|
||||
const COMMANDS_DIR = path.join(ROOT, 'commands', 'gsd');
|
||||
const COMMANDS_DIR = path.join(ROOT, 'commands', 'msd');
|
||||
|
||||
/** Parse the YAML frontmatter block between the first two `---` delimiters. */
|
||||
function parseFrontmatter(content) {
|
||||
@@ -619,7 +619,7 @@ const commandFiles = fs
|
||||
// OpenCode interprets `agent: <name>` as "auto-dispatch to this subagent",
|
||||
// which removes the Agent (subagent-spawner) tool from the command's context.
|
||||
// Any orchestrator command is immediately broken. Commands that need to run in
|
||||
// the main agent context (i.e., all GSD commands) must omit this directive.
|
||||
// the main agent context (i.e., all MSD commands) must omit this directive.
|
||||
|
||||
describe('#3156 — no command file may have an `agent:` frontmatter directive', () => {
|
||||
for (const { name, content } of commandFiles) {
|
||||
@@ -682,7 +682,7 @@ describe('#3156 — orchestrator commands (allowed-tools: Agent) must not have a
|
||||
/**
|
||||
* Tests for #2310: plan-phase chunked mode + filesystem fallback.
|
||||
*
|
||||
* Context: on Windows (and occasionally other platforms), gsd-planner's
|
||||
* Context: on Windows (and occasionally other platforms), msd-planner's
|
||||
* Task() call may never return even though the subagent finished writing all
|
||||
* PLAN.md files to disk. The orchestrator hangs indefinitely. Two mitigations:
|
||||
*
|
||||
@@ -703,12 +703,12 @@ const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const PLAN_PHASE = path.join(
|
||||
__dirname, '..', 'gsd-core', 'workflows', 'plan-phase.md'
|
||||
__dirname, '..', 'msd-core', 'workflows', 'plan-phase.md'
|
||||
);
|
||||
|
||||
const PLANNER_AGENT = path.join(__dirname, '..', 'agents', 'gsd-planner.md');
|
||||
const PLANNER_CHUNKED_REF = path.join(__dirname, '..', 'gsd-core', 'references', 'planner-chunked.md');
|
||||
const CONFIG_SCHEMA = path.join(__dirname, '..', 'gsd-core', 'bin', 'lib', 'config-schema.cjs');
|
||||
const PLANNER_AGENT = path.join(__dirname, '..', 'agents', 'msd-planner.md');
|
||||
const PLANNER_CHUNKED_REF = path.join(__dirname, '..', 'msd-core', 'references', 'planner-chunked.md');
|
||||
const CONFIG_SCHEMA = path.join(__dirname, '..', 'msd-core', 'bin', 'lib', 'config-schema.cjs');
|
||||
const CONFIGURATION_MD = path.join(__dirname, '..', 'docs', 'CONFIGURATION.md');
|
||||
|
||||
describe('plan-phase.md — filesystem fallback (#2310)', () => {
|
||||
@@ -716,10 +716,10 @@ describe('plan-phase.md — filesystem fallback (#2310)', () => {
|
||||
|
||||
test('step 9 checks PLAN.md count on disk when planner return lacks completion marker', () => {
|
||||
assert.ok(
|
||||
content.includes('DISK_PLANS=$(gsd_run query find-phase') &&
|
||||
content.includes('DISK_PLANS=$(msd_run query find-phase') &&
|
||||
content.includes("jq -r '.plan_count_all // 0')"),
|
||||
'step 9a must check disk for PLAN.md files via DISK_PLANS variable ' +
|
||||
'(sourced from gsd_run query find-phase\'s plan_count_all, ADR-3180 §7.5)'
|
||||
'(sourced from msd_run query find-phase\'s plan_count_all, ADR-3180 §7.5)'
|
||||
);
|
||||
});
|
||||
|
||||
@@ -807,7 +807,7 @@ describe('plan-phase.md — chunked mode flag and config (#2310)', () => {
|
||||
|
||||
describe('plan-phase.md — chunked mode implementation (#2310)', () => {
|
||||
// #2993 fragmentization moved §8.5 (chunked planning mode) out of the host file
|
||||
// into gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md. These
|
||||
// into msd-core/workflows/plan-phase/steps/chunked-planning-mode.md. These
|
||||
// assertions now read the combined host + step-files blob (readPlanPhaseCombined,
|
||||
// defined at module scope) so they keep guarding the same property regardless of
|
||||
// which file the content physically lives in.
|
||||
@@ -864,13 +864,13 @@ describe('plan-phase.md — chunked mode implementation (#2310)', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('gsd-planner.md — references planner-chunked.md (#2310)', () => {
|
||||
describe('msd-planner.md — references planner-chunked.md (#2310)', () => {
|
||||
const plannerContent = fs.readFileSync(PLANNER_AGENT, 'utf-8');
|
||||
|
||||
test('gsd-planner.md references planner-chunked.md for chunked return formats', () => {
|
||||
test('msd-planner.md references planner-chunked.md for chunked return formats', () => {
|
||||
assert.ok(
|
||||
plannerContent.includes('planner-chunked.md'),
|
||||
'gsd-planner.md must reference planner-chunked.md for ## OUTLINE COMPLETE / ## PLAN COMPLETE formats'
|
||||
'msd-planner.md must reference planner-chunked.md for ## OUTLINE COMPLETE / ## PLAN COMPLETE formats'
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -939,8 +939,8 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ROOT = path.join(__dirname, '..');
|
||||
const COMMAND_PATH = path.join(ROOT, 'commands', 'gsd', 'plan-phase.md');
|
||||
const WORKFLOW_PATH = path.join(ROOT, 'gsd-core', 'workflows', 'plan-phase.md');
|
||||
const COMMAND_PATH = path.join(ROOT, 'commands', 'msd', 'plan-phase.md');
|
||||
const WORKFLOW_PATH = path.join(ROOT, 'msd-core', 'workflows', 'plan-phase.md');
|
||||
const DOCS_COMMANDS_PATH = path.join(ROOT, 'docs', 'COMMANDS.md');
|
||||
|
||||
function read(filePath) {
|
||||
@@ -974,7 +974,7 @@ describe('enh #3209: plan-phase ADR ingest express path', () => {
|
||||
});
|
||||
|
||||
// #2993 fragmentization moved the ADR ingest express-path step (former §3.6) out
|
||||
// of the host file into gsd-core/workflows/plan-phase/steps/adr-ingest-express-path.md.
|
||||
// of the host file into msd-core/workflows/plan-phase/steps/adr-ingest-express-path.md.
|
||||
// These three tests read the combined host + step-files blob (readPlanPhaseCombined,
|
||||
// defined at module scope) so they keep guarding the same property regardless of
|
||||
// which file the content physically lives in.
|
||||
@@ -1010,35 +1010,35 @@ describe('enh #3209: plan-phase ADR ingest express path', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('docs COMMANDS advertises --ingest flag for /gsd-plan-phase', () => {
|
||||
test('docs COMMANDS advertises --ingest flag for /msd-plan-phase', () => {
|
||||
const commands = read(DOCS_COMMANDS_PATH);
|
||||
assert.ok(commands.includes('--ingest <path-or-glob>'),
|
||||
'docs/COMMANDS.md must document --ingest for /gsd-plan-phase');
|
||||
'docs/COMMANDS.md must document --ingest for /msd-plan-phase');
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// ────────────────────────────────────────────────────────────────────────
|
||||
// Folded from tests/bug-621-plan-phase-gap-analysis-gsd-run.test.cjs — consolidation epic #1969 (B4 #1973)
|
||||
// Folded from tests/bug-621-plan-phase-gap-analysis-msd-run.test.cjs — consolidation epic #1969 (B4 #1973)
|
||||
// ────────────────────────────────────────────────────────────────────────
|
||||
{
|
||||
const { describe: __foldDescribe } = require('node:test');
|
||||
__foldDescribe("folded:bug-621-plan-phase-gap-analysis-gsd-run (consolidation epic #1969 B4 #1973)", () => {
|
||||
__foldDescribe("folded:bug-621-plan-phase-gap-analysis-msd-run (consolidation epic #1969 B4 #1973)", () => {
|
||||
// allow-test-rule: source-text-is-the-product (see #621)
|
||||
// The post-planning-gaps gap-analysis invocation is deployed workflow text the
|
||||
// runtime executes; the contract is that it routes through the gsd_run launcher,
|
||||
// runtime executes; the contract is that it routes through the msd_run launcher,
|
||||
// not a hardcoded $HOME path (#621).
|
||||
|
||||
/**
|
||||
* Regression test for #621: plan-phase gap-analysis must route through gsd_run
|
||||
* Regression test for #621: plan-phase gap-analysis must route through msd_run
|
||||
*
|
||||
* Prior to the fix, line 1631 of plan-phase.md hardcoded:
|
||||
* node "$HOME/.claude/gsd-core/bin/gsd-tools.cjs" gap-analysis ...
|
||||
* node "$HOME/.claude/msd-core/bin/msd-tools.cjs" gap-analysis ...
|
||||
* twice on the same line, breaking non-default install layouts.
|
||||
*
|
||||
* After the fix, both invocations route through gsd_run (the launcher defined
|
||||
* at line ~34 of the same file that resolves gsd-tools.cjs against
|
||||
* After the fix, both invocations route through msd_run (the launcher defined
|
||||
* at line ~34 of the same file that resolves msd-tools.cjs against
|
||||
* RUNTIME_DIR / git-toplevel / PATH / $HOME in order).
|
||||
*/
|
||||
|
||||
@@ -1050,7 +1050,7 @@ const path = require('path');
|
||||
const WORKFLOW_PATH = path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'gsd-core',
|
||||
'msd-core',
|
||||
'workflows',
|
||||
'plan-phase.md'
|
||||
);
|
||||
@@ -1059,33 +1059,33 @@ const WORKFLOW_PATH = path.join(
|
||||
|
||||
const workflow = fs.readFileSync(WORKFLOW_PATH, 'utf8');
|
||||
|
||||
// ─── #621 regression: gap-analysis routes through gsd_run ────────────────────
|
||||
// ─── #621 regression: gap-analysis routes through msd_run ────────────────────
|
||||
|
||||
describe('plan-phase workflow: post-planning-gaps gap-analysis uses gsd_run launcher (#621)', () => {
|
||||
test('gap-analysis dispatches via gsd_run loop render-hooks plan:post (ADR-857 capability gate)', () => {
|
||||
describe('plan-phase workflow: post-planning-gaps gap-analysis uses msd_run launcher (#621)', () => {
|
||||
test('gap-analysis dispatches via msd_run loop render-hooks plan:post (ADR-857 capability gate)', () => {
|
||||
assert.ok(
|
||||
workflow.includes('gsd_run loop render-hooks plan:post'),
|
||||
'workflow must dispatch gap-analysis via gsd_run loop render-hooks plan:post, not a hardcoded node path or direct gsd_run gap-analysis call'
|
||||
workflow.includes('msd_run loop render-hooks plan:post'),
|
||||
'workflow must dispatch gap-analysis via msd_run loop render-hooks plan:post, not a hardcoded node path or direct msd_run gap-analysis call'
|
||||
);
|
||||
});
|
||||
|
||||
test('inner phase_req_ids query also routes through gsd_run', () => {
|
||||
test('inner phase_req_ids query also routes through msd_run', () => {
|
||||
assert.ok(
|
||||
workflow.includes('gsd_run query init.plan-phase'),
|
||||
'workflow must invoke the inner phase_req_ids query via gsd_run launcher'
|
||||
workflow.includes('msd_run query init.plan-phase'),
|
||||
'workflow must invoke the inner phase_req_ids query via msd_run launcher'
|
||||
);
|
||||
});
|
||||
|
||||
test('no hardcoded node "$HOME/.claude/gsd-core/bin/gsd-tools.cjs" invocations remain (#621)', () => {
|
||||
test('no hardcoded node "$HOME/.claude/msd-core/bin/msd-tools.cjs" invocations remain (#621)', () => {
|
||||
const hardcodedCount = (
|
||||
workflow.match(/node "\$HOME\/\.claude\/gsd-core\/bin\/gsd-tools\.cjs"/g) || []
|
||||
workflow.match(/node "\$HOME\/\.claude\/msd-core\/bin\/msd-tools\.cjs"/g) || []
|
||||
).length;
|
||||
assert.strictEqual(
|
||||
hardcodedCount,
|
||||
0,
|
||||
[
|
||||
'#621 regression: workflow must not contain any hardcoded',
|
||||
'node "$HOME/.claude/gsd-core/bin/gsd-tools.cjs" invocations;',
|
||||
'node "$HOME/.claude/msd-core/bin/msd-tools.cjs" invocations;',
|
||||
`found ${hardcodedCount}`,
|
||||
].join(' ')
|
||||
);
|
||||
@@ -1093,7 +1093,7 @@ describe('plan-phase workflow: post-planning-gaps gap-analysis uses gsd_run laun
|
||||
|
||||
test('post-planning-gaps block still gates on workflow.post_planning_gaps and preserves required args', () => {
|
||||
const hasGate = workflow.includes('workflow.post_planning_gaps');
|
||||
const hasPhaseDir = workflow.includes('gsd_run check ${hook.check.query} "${PHASE_DIR}" "${PHASE_REQ_IDS}"');
|
||||
const hasPhaseDir = workflow.includes('msd_run check ${hook.check.query} "${PHASE_DIR}" "${PHASE_REQ_IDS}"');
|
||||
const hasPickArg = workflow.includes('--pick phase_req_ids');
|
||||
assert.ok(
|
||||
hasGate,
|
||||
@@ -1101,7 +1101,7 @@ describe('plan-phase workflow: post-planning-gaps gap-analysis uses gsd_run laun
|
||||
);
|
||||
assert.ok(
|
||||
hasPhaseDir,
|
||||
'gap-analysis check dispatch must pass "${PHASE_DIR}" (and "${PHASE_REQ_IDS}") positionally to gsd_run check'
|
||||
'gap-analysis check dispatch must pass "${PHASE_DIR}" (and "${PHASE_REQ_IDS}") positionally to msd_run check'
|
||||
);
|
||||
assert.ok(
|
||||
hasPickArg,
|
||||
@@ -1123,7 +1123,7 @@ describe('plan-phase workflow: post-planning-gaps gap-analysis uses gsd_run laun
|
||||
// Verifies that issue #22 drift-guard surfacing changes are present:
|
||||
// - new-project workflow mentions plan_review.source_grounding
|
||||
// - CONFIGURATION.md documents both new config keys
|
||||
// - COMMANDS.md mentions gsd-tools intel api-surface
|
||||
// - COMMANDS.md mentions msd-tools intel api-surface
|
||||
|
||||
const { describe, test } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
@@ -1132,8 +1132,8 @@ const path = require('path');
|
||||
|
||||
const ROOT = path.join(__dirname, '..');
|
||||
|
||||
const NEW_PROJECT_PATH = path.join(ROOT, 'gsd-core', 'workflows', 'new-project.md');
|
||||
const SETTINGS_PATH = path.join(ROOT, 'gsd-core', 'workflows', 'settings.md');
|
||||
const NEW_PROJECT_PATH = path.join(ROOT, 'msd-core', 'workflows', 'new-project.md');
|
||||
const SETTINGS_PATH = path.join(ROOT, 'msd-core', 'workflows', 'settings.md');
|
||||
const CONFIGURATION_PATH = path.join(ROOT, 'docs', 'CONFIGURATION.md');
|
||||
const COMMANDS_PATH = path.join(ROOT, 'docs', 'COMMANDS.md');
|
||||
const USER_GUIDE_PATH = path.join(ROOT, 'docs', 'USER-GUIDE.md');
|
||||
@@ -1171,11 +1171,11 @@ describe('feat-22-surfacing-docs', () => {
|
||||
// AskUserQuestion block (the sole holder of this exact phrasing, even
|
||||
// pre-fragmentization — Step 5's interactive block uses different wording)
|
||||
// out of new-project.md into
|
||||
// gsd-core/workflows/new-project/steps/auto-mode-config.md. Read host +
|
||||
// msd-core/workflows/new-project/steps/auto-mode-config.md. Read host +
|
||||
// step combined so this count is preserved across the split.
|
||||
const content = fs.readFileSync(NEW_PROJECT_PATH, 'utf-8') +
|
||||
'\n' + fs.readFileSync(
|
||||
path.join(ROOT, 'gsd-core', 'workflows', 'new-project', 'steps', 'auto-mode-config.md'),
|
||||
path.join(ROOT, 'msd-core', 'workflows', 'new-project', 'steps', 'auto-mode-config.md'),
|
||||
'utf-8'
|
||||
);
|
||||
// Both question blocks (auto and interactive) should have the yes option
|
||||
@@ -1271,7 +1271,7 @@ describe('feat-22-surfacing-docs', () => {
|
||||
const content = fs.readFileSync(COMMANDS_PATH, 'utf-8');
|
||||
assert.ok(
|
||||
content.includes('intel api-surface'),
|
||||
'COMMANDS.md must document the gsd-tools intel api-surface command'
|
||||
'COMMANDS.md must document the msd-tools intel api-surface command'
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1355,7 +1355,7 @@ const assert = require('node:assert/strict');
|
||||
const fs = require('node:fs');
|
||||
const path = require('node:path');
|
||||
|
||||
const WORKFLOWS_DIR = path.join(__dirname, '../gsd-core/workflows');
|
||||
const WORKFLOWS_DIR = path.join(__dirname, '../msd-core/workflows');
|
||||
|
||||
function readWorkflow(name) {
|
||||
return fs.readFileSync(path.join(WORKFLOWS_DIR, name), 'utf-8');
|
||||
@@ -1606,9 +1606,9 @@ const assert = require('node:assert/strict');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const PLAN_PHASE = path.join(__dirname, '..', 'gsd-core', 'workflows', 'plan-phase.md');
|
||||
const VERIFY_GATES = path.join(__dirname, '..', 'gsd-core', 'references', 'verifier-phase-gates.md');
|
||||
const SCHEMA_MANIFEST_JSON = path.join(__dirname, '..', 'gsd-core', 'bin', 'shared', 'config-schema.manifest.json');
|
||||
const PLAN_PHASE = path.join(__dirname, '..', 'msd-core', 'workflows', 'plan-phase.md');
|
||||
const VERIFY_GATES = path.join(__dirname, '..', 'msd-core', 'references', 'verifier-phase-gates.md');
|
||||
const SCHEMA_MANIFEST_JSON = path.join(__dirname, '..', 'msd-core', 'bin', 'shared', 'config-schema.manifest.json');
|
||||
|
||||
describe('plan-phase decision-coverage gate (#2492)', () => {
|
||||
const md = fs.readFileSync(PLAN_PHASE, 'utf-8');
|
||||
@@ -1623,7 +1623,7 @@ describe('plan-phase decision-coverage gate (#2492)', () => {
|
||||
test('invokes the check.decision-coverage-plan handler', () => {
|
||||
assert.ok(
|
||||
md.includes('check.decision-coverage-plan'),
|
||||
'plan-phase.md must call gsd-sdk query check.decision-coverage-plan',
|
||||
'plan-phase.md must call msd-sdk query check.decision-coverage-plan',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1719,7 +1719,7 @@ describe('verifier-phase-gates decision-coverage gate (#2492)', () => {
|
||||
test('invokes the check.decision-coverage-verify handler', () => {
|
||||
assert.ok(
|
||||
md.includes('check.decision-coverage-verify'),
|
||||
'verifier-phase-gates.md must call gsd-sdk query check.decision-coverage-verify',
|
||||
'verifier-phase-gates.md must call msd-sdk query check.decision-coverage-verify',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1748,18 +1748,18 @@ describe('runtime wiring for #2492 gates', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test('gsd-verifier eagerly imports verifier-phase-gates.md (#1892)', () => {
|
||||
test('msd-verifier eagerly imports verifier-phase-gates.md (#1892)', () => {
|
||||
// The decision-coverage gate (and the other migrated verify-time gates) only
|
||||
// reach the runtime if the verifier agent actually loads the reference that
|
||||
// now carries them — a reference nothing imports is the exact orphan class
|
||||
// epic #1891 exists to remove.
|
||||
const agent = fs.readFileSync(
|
||||
path.join(__dirname, '..', 'agents', 'gsd-verifier.md'),
|
||||
path.join(__dirname, '..', 'agents', 'msd-verifier.md'),
|
||||
'utf-8',
|
||||
);
|
||||
assert.ok(
|
||||
agent.includes('@~/.claude/gsd-core/references/verifier-phase-gates.md'),
|
||||
'agents/gsd-verifier.md must @-import references/verifier-phase-gates.md in required_reading',
|
||||
agent.includes('@~/.claude/msd-core/references/verifier-phase-gates.md'),
|
||||
'agents/msd-verifier.md must @-import references/verifier-phase-gates.md in required_reading',
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -1773,7 +1773,7 @@ describe('runtime wiring for #2492 gates', () => {
|
||||
const { describe: __foldDescribe } = require('node:test');
|
||||
__foldDescribe('folded:issue-2762-plan-reviews-chunked', () => {
|
||||
// allow-test-rule: structural-implementation-guard (#2762)
|
||||
// Regression guard for #2762: /gsd-plan-phase --reviews was a silent no-op in chunked
|
||||
// Regression guard for #2762: /msd-plan-phase --reviews was a silent no-op in chunked
|
||||
// mode. Two defects in plan-phase.md §8.5:
|
||||
// A. §8.5.1 outline resume-check greps for a marker the agent only RETURNED (never
|
||||
// wrote to the file) → outline always re-ran/overwrote (broke crash-resume).
|
||||
@@ -1787,10 +1787,10 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// #2993 fragmentization moved §8.5 (chunked planning mode, including §8.5.1 /
|
||||
// §8.5.2) out of plan-phase.md into gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md.
|
||||
// §8.5.2) out of plan-phase.md into msd-core/workflows/plan-phase/steps/chunked-planning-mode.md.
|
||||
// Read that step file directly — it is the sole remaining source of the §8.5.1/§8.5.2
|
||||
// content these regression guards assert on.
|
||||
const MD = path.join(__dirname, '..', 'gsd-core', 'workflows', 'plan-phase', 'steps', 'chunked-planning-mode.md');
|
||||
const MD = path.join(__dirname, '..', 'msd-core', 'workflows', 'plan-phase', 'steps', 'chunked-planning-mode.md');
|
||||
const read = () => fs.readFileSync(MD, 'utf8');
|
||||
|
||||
test('§8.5.1 outline agent writes the resume marker into the file (#2762 defect A)', () => {
|
||||
|
||||
Reference in New Issue
Block a user