Cubase-MCP-GAJ3T.MusicGen.R.../prompts/step_1.md

8.4 KiB

Step 1: Bootstrap the .NET 10 solution and compatibility inventory

Objective and stop boundary

Implement Step 1 of the approved plan: a reproducible .NET 10 solution with the production/test project structure, a quiet console entry point, pinned dependencies, meaningful scaffold checks, and an honest native compatibility evidence inventory.

Read the approved plan and inspect the current worktree before editing. Preserve others' work. Work only on this step. Do not implement the MCP protocol, music parser, articulation profiles, MIDI writers, native writers, or publication workflow yet. Do not create any later step prompt. Do not make a git commit.

Required files

Create or update these repository-relative files:

GAJ3T.MusicGen.RiffGrooveBuilder.slnx
global.json
Directory.Build.props
Directory.Packages.props
NuGet.config
.gitignore
README.md
src\GAJ3T.MusicGen.RiffGrooveBuilder.Core\
  GAJ3T.MusicGen.RiffGrooveBuilder.Core.csproj
src\GAJ3T.MusicGen.RiffGrooveBuilder.Generation\
  GAJ3T.MusicGen.RiffGrooveBuilder.Generation.csproj
src\GAJ3T.MusicGen.RiffGrooveBuilder.Server\
  GAJ3T.MusicGen.RiffGrooveBuilder.Server.csproj
  Program.cs
tests\GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests\
  GAJ3T.MusicGen.RiffGrooveBuilder.UnitTests.csproj
  ScaffoldTests.cs
tests\GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests\
  GAJ3T.MusicGen.RiffGrooveBuilder.IntegrationTests.csproj
  Stdio\ProcessStartupTests.cs
docs\format-compatibility.md
prompts\report_1.md

Create dependency lock files through NuGet restore, not manually. Remove unused template Class1.cs, UnitTest1.cs, and "Hello, World!" code. Do not create empty placeholder source files or all future module directories solely to mimic a tree.

Implementation requirements

Toolchain and package management

  • Target net10.0 in all five projects. First inspect the installed SDK. Pin an available .NET 10 SDK in global.json with rollForward: latestPatch. If no .NET 10 SDK is available, report the actual failure before considering installation; do not change machine-wide tools without authorization.
  • Use Microsoft.NET.Sdk; only Server has OutputType=Exe. Enable nullable, implicit usings, and warnings-as-errors in common build properties.
  • Use central package management. Pin Melanchall.DryWetMidi exactly to 8.0.3 and reference it from Generation. No other MIDI library or package version.
  • Select stable, available .NET 10-compatible versions of xUnit, xunit.runner.visualstudio, and Microsoft.NET.Test.Sdk. Verify versions through the package manager/official metadata rather than inventing them. Keep test-only packages private where applicable. No coverage package or new tooling is needed.
  • Enable NuGet package lock files. Use the official NuGet source only in the repository configuration; do not put credentials in source control.
  • Use dotnet project/solution scaffolding and package manager commands where appropriate. Use apply_patch for manual source/document edits.
  • Do not restore/install anything until manifests have been created/changed or a validation command demonstrates a missing dependency.

Project references and console startup

  • Core has no project/package dependency.
  • Generation references Core and the pinned DryWetMIDI package.
  • Server references Core and Generation.
  • UnitTests references Core and Generation. IntegrationTests references Server as needed to reliably build and locate the real console binary.
  • The server must not print a greeting, startup banner, or other stdout text. For this step, it may simply read/discard stdin until EOF and then exit successfully; document that this is not yet an MCP server.
  • Do not emit fake JSON-RPC success responses or advertise unimplemented tools.
  • Include no HTTP listeners, web SDKs, containers, playback/device APIs, external LLM calls, or audio functionality.

Compatibility inventory

Write docs\format-compatibility.md as an evidence table covering:

  • Exact Eclips, Ray, SD3, and Cubase product/version details: unknown unless actual evidence exists.
  • AGP lead and bass container/schema, supported import paths and extensions.
  • SDP container/schema and whether SD3 actually supports the requested extension.
  • Authorized native fixture availability and redistribution/template permission.
  • Absolute MIDI note/keyswitch/CC values, velocity layers, ranges, channels, state/reset behavior, timing, and SD3 mapping/library settings.
  • Actual plugin/Cubase import acceptance: not performed unless genuinely tested.

For each row record status, evidence/source (or "not supplied"), required evidence, and which future gate it blocks. Distinguish verified planning facts (MCP framing, DryWetMIDI package availability, .NET deployment capability) from unknown proprietary format facts.

No fixture or product mapping is currently supplied. Do not scan arbitrary personal directories, install vendor products, reuse copyrighted sample content, fabricate a schema, or present synthetic profiles as real mappings. Missing native evidence does not prevent Step 1 acceptance, but it must remain an explicit blocker for the relevant later steps.

Documentation and ignore rules

  • README: scope, current scaffold-only status, prerequisites, restore/build/test commands, project layout, and the native evidence requirement. Do not claim generation or MCP functionality exists yet.
  • .gitignore: standard .NET build/test/publish artifacts and IDE state. Do not ignore source, lock files, docs, or worker prompt/report deliverables.
  • Do not alter prompts\plan.md or other orchestrator prompts.

Required tests

Unit

Add meaningful scaffold assertions that verify the compiled target framework is .NET 10 and that Generation can resolve the pinned DryWetMIDI dependency. Use assembly metadata or a small package-level smoke assertion; do not create production MIDI-generation logic just to make a scaffold test pass. Avoid tautologies such as Assert.True(true).

Integration

Launch the actual Server binary in a subprocess, not a mock:

  1. Use redirected stdin/stdout/stderr and a bounded timeout.
  2. Close stdin to signal EOF.
  3. Assert exit code zero and empty stdout (and no unexpected stderr).
  4. Verify the same behavior from an isolated working directory unrelated to the repository.
  5. Always terminate/dispose only the process created by the test on failure; never kill by process name. Avoid deadlock by draining both output streams.
  6. Locate binaries without hard-coded absolute developer paths and without assuming the test process starts at the repository root.

Validation

Run and report these commands (use the test tool for the relevant xUnit tests when available, with the CLI commands as the reproducible documented form):

dotnet restore .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx
dotnet build .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx -c Release --no-restore
dotnet test .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx -c Release --no-build
dotnet restore .\GAJ3T.MusicGen.RiffGrooveBuilder.slnx --locked-mode

All tests must be discovered and pass; an empty test run is not a pass. Fix issues introduced by this step, but do not expand into future features. If an environmental/toolchain blocker cannot be resolved safely, record it explicitly with commands/output and mark readiness false.

Acceptance criteria

  • All required projects/files exist with the specified dependency direction.
  • Restore, Release build, nonempty test execution, and locked restore pass.
  • The real console process exits on EOF and never pollutes stdout.
  • Dependencies are pinned, especially DryWetMIDI 8.0.3.
  • README matches actual behavior and the compatibility inventory does not assert unknown proprietary format or product mapping details.
  • No unrelated changes, secrets, generated binaries, or later-step features.

Mandatory worker report

When complete, write your end-of-step report to ./prompts/report_1.md including: what was implemented, test results (pass/fail with details), any issues encountered, and whether you're ready for the next step

The entire report must be inside exactly one plain triple-backtick fence, with no content before or after it. Include changed files, selected SDK/package versions, exact validation commands and exit codes, test counts, any skipped checks and reasons, unresolved evidence gates, and an explicit Step 1 readiness decision. Distinguish future native blockers from a failed scaffold.

Stop after writing the report. Do not proceed to Step 2.