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

@@ -3,11 +3,11 @@
"role": "feature",
"version": "1.14.0",
"title": "Claude orchestration (Workflow backend)",
"description": "Default-off, BETA, claude-only capability that adopts Claude Code's Workflow tool (the engine behind /effort ultracode) as an optional parallel-execution backend for the GSD loop. When the runtime exposes the Workflow tool and claude_orchestration.execution_backend resolves to 'workflow', execute-phase emits a generated Workflow script (waves -> parallel() barriers, plans -> agent({ agentType: 'gsd-executor', isolation: 'worktree' }), files_modified overlap -> separate sequential stages, resumeFromRunId wired to the phase run id, shared token budget) that composes the SAME gsd-executor agent and worktree isolation the inline path uses, restoring the wave parallelism the #853 backgrounded-agent nesting limitation forces inline on Claude Code. (The plan-checker and verifier remain inline until separately wired — this capability delivers the parallel-execution backend, not those gates.) Also folds the ultraplan plan-offload under one runtime gate (plan:* surface). On any runtime lacking the Workflow tool, or when the capability is disabled, behaviour is byte-identical to today (inline/manual dispatch). Detection + emission live in gsd-core/bin/lib/claude-orchestration.cjs (pure, fail-closed). Mirrors the existing gsd-ultraplan-phase BETA-isolation posture.",
"description": "Default-off, BETA, claude-only capability that adopts Claude Code's Workflow tool (the engine behind /effort ultracode) as an optional parallel-execution backend for the MSD loop. When the runtime exposes the Workflow tool and claude_orchestration.execution_backend resolves to 'workflow', execute-phase emits a generated Workflow script (waves -> parallel() barriers, plans -> agent({ agentType: 'msd-executor', isolation: 'worktree' }), files_modified overlap -> separate sequential stages, resumeFromRunId wired to the phase run id, shared token budget) that composes the SAME msd-executor agent and worktree isolation the inline path uses, restoring the wave parallelism the #853 backgrounded-agent nesting limitation forces inline on Claude Code. (The plan-checker and verifier remain inline until separately wired — this capability delivers the parallel-execution backend, not those gates.) Also folds the ultraplan plan-offload under one runtime gate (plan:* surface). On any runtime lacking the Workflow tool, or when the capability is disabled, behaviour is byte-identical to today (inline/manual dispatch). Detection + emission live in msd-core/bin/lib/claude-orchestration.cjs (pure, fail-closed). Mirrors the existing msd-ultraplan-phase BETA-isolation posture.",
"tier": "full",
"requires": [],
"engines": {
"gsd": ">=1.7.0"
"msd": ">=1.7.0"
},
"runtimeCompat": {
"supported": [

View File

@@ -51,7 +51,7 @@ Before spawning executor agents for the current wave (execute-phase.md step 3),
resolve the dispatch backend through the single composed CLI seam:
```bash
gsd-tools claude-orchestration resolve-wave-dispatch \
msd-tools claude-orchestration resolve-wave-dispatch \
--waves "$WAVE_MANIFEST_PATH" --run-id "$PHASE_RUN_ID" \
--runtime "$RUNTIME" \
--phase-dir "$PHASE_DIR" --raw
@@ -68,7 +68,7 @@ unknown. Pass `--agent-sdk-version <ver>` explicitly only to pin a version.
This composes `detectWorkflowBackend` (the gate ladder above) with
`emitWorkflowScript` (the wave→plan mapping below) in ONE call — the pure
function backing it is `resolveWaveDispatch` in
`gsd-core/bin/lib/claude-orchestration.cjs`. Response shape:
`msd-core/bin/lib/claude-orchestration.cjs`. Response shape:
`{ backend: 'inline'|'workflow', reason, script?, summary? }`.
### Manifest construction (`$WAVE_MANIFEST_PATH`, `$PHASE_RUN_ID`, `$PHASE_DIR`)
@@ -96,7 +96,7 @@ them at this step, from data it already has in-context from `discover_and_group_
dispatched in wave order, not all at once):
```bash
WAVE_MANIFEST_PATH=$(mktemp "${TMPDIR:-/tmp}/gsd-wave-dispatch-XXXXXX") && mv "$WAVE_MANIFEST_PATH" "$WAVE_MANIFEST_PATH.json" && WAVE_MANIFEST_PATH="$WAVE_MANIFEST_PATH.json"
WAVE_MANIFEST_PATH=$(mktemp "${TMPDIR:-/tmp}/msd-wave-dispatch-XXXXXX") && mv "$WAVE_MANIFEST_PATH" "$WAVE_MANIFEST_PATH.json" && WAVE_MANIFEST_PATH="$WAVE_MANIFEST_PATH.json"
```
Then **use the Write tool** (not a bash/jq pipeline — the orchestrator already
@@ -143,7 +143,7 @@ introspect the live Agent SDK version — but the router runs in Node, so it
resolves the version itself (#2590), in this order:
1. an explicit `--agent-sdk-version <ver>` (pin a version),
2. `GSD_AGENT_SDK_VERSION`,
2. `MSD_AGENT_SDK_VERSION`,
3. the **installed** `@anthropic-ai/claude-agent-sdk` package version, read from
its `package.json` on disk by walking `node_modules` up the tree. (Read
directly rather than via `require.resolve`: the SDK's `exports` map does not
@@ -152,7 +152,7 @@ resolves the version itself (#2590), in this order:
Previously nothing computed this at all, so gate 5 returned
`agent_sdk_version_unknown` on **every** automated run and the Workflow backend
could never activate — while `gsd-tools capability state` still reported the
could never activate — while `msd-tools capability state` still reported the
capability `active: true`. Fail-closed is preserved: when no version can be
resolved, gate 5 still declines to `inline`. What changed is that a resolvable
version is now actually found, so a genuinely-too-old SDK reports
@@ -160,15 +160,15 @@ version is now actually found, so a genuinely-too-old SDK reports
**If `backend == "workflow"`:** run the emitted `script` via the Workflow tool
for THIS wave instead of the per-message `Agent()` loop in step 3. The script
composes the SAME `gsd-executor` agent type the inline path uses, with
composes the SAME `msd-executor` agent type the inline path uses, with
worktree isolation applied PER PLAN from the manifest's `use_worktree` field
(see `emitWorkflowScript`):
- **waves → one or more sequential `parallel()` barriers** — each wave is a
barrier group; when plans within a wave share `files_modified`, they are split
into separate sequential stages within that wave's barrier.
- **plans → `agent(brief, { agentType: 'gsd-executor', isolation: 'worktree' })`**
when `use_worktree` is not `false`, or `agent(brief, { agentType: 'gsd-executor' })`
- **plans → `agent(brief, { agentType: 'msd-executor', isolation: 'worktree' })`**
when `use_worktree` is not `false`, or `agent(brief, { agentType: 'msd-executor' })`
(no isolation) when it is — so the produced `SUMMARY.md` and commits are
identical to inline dispatch, INCLUDING the inline path's submodule safety
gate (#2772 / #2285 finding 1).
@@ -194,7 +194,7 @@ unchanged:
```bash
if [ -z "${WAVE_WORKTREE_MANIFEST:-}" ]; then
M=$(mktemp "${TMPDIR:-/tmp}/gsd-worktree-wave-XXXXXX") && mv "$M" "$M.json" && WAVE_WORKTREE_MANIFEST="$M.json" || exit 1 # XXXXXX must be path-final on BSD/macOS (#1520)
M=$(mktemp "${TMPDIR:-/tmp}/msd-worktree-wave-XXXXXX") && mv "$M" "$M.json" && WAVE_WORKTREE_MANIFEST="$M.json" || exit 1 # XXXXXX must be path-final on BSD/macOS (#1520)
# Persist the dispatch-time orchestrator worktree root so wave-cleanup pins back
# to the orchestrator's OWN worktree (#630), exactly as inline dispatch does.
ORCH_ROOT=$(git rev-parse --show-toplevel)
@@ -208,7 +208,7 @@ unchanged:
per dispatched plan: `{ plan, expects_worktree, metadata }`. `metadata` is that
plan's executor `<worktree_metadata>` JSON (`{agent_id, worktree_path, branch,
expected_base}` — captured by the executor itself per
`agents/gsd-executor.md`), or `null` when the agent's result carried none
`agents/msd-executor.md`), or `null` when the agent's result carried none
(interrupted agent, resumed-from-cache plan, or a non-worktree plan).
3. **Record every worktree plan** exactly as inline dispatch does at step 3's
@@ -216,7 +216,7 @@ unchanged:
with `expects_worktree: true` and complete metadata:
```bash
gsd_run query worktree.record-agent --manifest "$WAVE_WORKTREE_MANIFEST" \
msd_run query worktree.record-agent --manifest "$WAVE_WORKTREE_MANIFEST" \
--agent-id "<metadata.agent_id>" --path "<metadata.worktree_path>" \
--branch "<metadata.branch>" --base "<metadata.expected_base>" \
--files "<plan files_modified, space-separated>" \

View File

@@ -5,7 +5,7 @@
## Ownership declaration
The `gsd-ultraplan-phase` plan-offload surface (offloading GSD's plan phase to
The `msd-ultraplan-phase` plan-offload surface (offloading MSD's plan phase to
Claude Code's ultraplan cloud) is **owned by this capability**, not by a
standalone BETA skill. Both surfaces share one runtime gate
(`claude_orchestration.enabled`), one BETA boundary, and one Claude-Code-only
@@ -14,15 +14,15 @@ detection seam.
## When the planner should consider ultraplan offload
When this contribution is active (capability enabled, Claude Code runtime), the
planner MAY offer the `/gsd-ultraplan-phase` path as an alternative to local
`/gsd-plan-phase` for phases where cloud-assisted planning adds value. This is
planner MAY offer the `/msd-ultraplan-phase` path as an alternative to local
`/msd-plan-phase` for phases where cloud-assisted planning adds value. This is
advisory, not mandatory — the stable local planner remains the default.
## Fallback contract
If the capability is disabled, or the runtime is not Claude Code, ultraplan
offload is **not surfaced** and the planner proceeds with the standard local
`/gsd-plan-phase`. The `gsd-ultraplan-phase` command itself remains installed
`/msd-plan-phase`. The `msd-ultraplan-phase` command itself remains installed
(its own runtime gate already no-ops on non-Claude runtimes); this contribution
only governs whether the capability manifest advertises it as part of the
orchestration surface.