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

184 lines
11 KiB
Markdown

# Step 5 fix: Resolve the production mapping evidence gate
Status: RESUMED for the approved Standard MIDI fallback. Read the continuation
decision at the top of `prompts/plan.md`. The following amendment supersedes
earlier gate/acceptance wording below; it does not authorize invented vendor maps.
## Current executable fix objective
Complete a functional, explicitly identified standard MIDI mapping path instead
of leaving the production registry empty until every vendor map is available:
1. Add a public profile-summary discriminator `mapping_kind`, with values
`instrument` (default for backward-compatible existing models/fixtures) and
`standard_midi`. Update schemas, relevant tests, and docs coherently.
2. Add a corresponding honest provenance status for standard MIDI profiles.
Standard MIDI facts plus explicit generator/routing policy are not evidence
of a particular vendor configuration. Keep test_only excluded from production.
3. Create three real, non-synthetic fallback data files: standard pitched lead,
standard pitched bass, and General MIDI percussion. Use unique channels
0/1/9 as documented output-routing policy. These are not invented vendor
defaults. Use standard valid MIDI note ranges and a simple documented
intensity-to-velocity policy; do not assert vendor velocity layers.
4. Restrict standard profiles to normal/sustain technique with no invented
keyswitches or CC actions. Existing generic compiler support for switch/CC
profiles remains tested. Unsupported requested techniques must fail honestly.
5. Default selections may use these fallback profiles, but summaries and eventual
generation results must clearly state they are NOT verified Eclips/Ray/SD3
maps. The reviewed instrument field may identify intended routing, never
compatibility; mapping_kind and product_name/limitations disambiguate it.
6. Source General MIDI drum-note facts from accessible public documentation:
the MIDI Association overview at https://midi.org/general-midi-level-1
establishes the standard; independently check the core percussion numbers
against an accessible reliable table (e.g. the General MIDI article).
Do not silently call a GM map the SD3 default map.
7. Update registry/wheel tests that previously required no JSON/empty summaries
to assert these exact standard-only profiles, absence of synthetic/vendor
claims, and normal selection behavior. The old Step 3 server remains unchanged
until Step 9 wiring, so its temporary empty-list tests may remain for now.
8. Correct compatibility documentation: raw official Ample HTML exposed public
PDFs at `Main_Panel_Manual-AME.pdf`, `Main_Panel_Manual-AMR.pdf`,
`Guitar_Riffer.pdf`, `Guitar_Strummer.pdf`, and `Settings_and_CPCv2.pdf`
under https://www.amplesound.net/en/. Do not repeat the mistaken conclusion
that the manual page contains only a domain label. Note that octave labels,
exact installed versions/maps, and native layouts still require verification.
9. Do not copy manuals or factory MIDI songs into the repository. No native
serialization or real vendor compatibility is claimed by this amendment.
10. Run the full current suite, Ruff lint/format, strict types, and real
outside-checkout wheel resource tests. Preserve existing strict contracts
except for the explicit discriminator/provenance additions.
Current acceptance: the standard MIDI fallback registry and generic compilation
are operational, accurately described, and verified. Step 6 may then proceed
using these real standard profiles. Report vendor-map/native/application gates
as still open rather than calling the full native project complete.
The historical evidence-specific objective and checklist below remain applicable
to later real-target profile additions, but missing vendor evidence must not
block this standard-only fix. Write `prompts/report_5_fix.md` as required below.
## Orchestrator review decision
Read `prompts/report_5.md` before working. The profile/compiler mechanics have
been implemented and independently checked: 137 focused tests passed, including
actual MIDI read-back and built-wheel resource checks. Steps 1-4 were accepted.
Full Step 5 is NOT accepted. Its production registry contains zero maps.
Synthetic fixtures test mechanics only, and the stdio generation tool remains
explicitly unfinished. The report correctly says it is not ready for Step 6.
The official Ample manual entry point yielded no usable map; the official
Toontrack manual required login. Repeating the same blocked fetches, changing
test_only to verified, or assuming GM drum mappings does not resolve the gate.
Do not run an implementation worker against missing evidence. Execute this
fix when usable authoritative evidence becomes available. If only some targets
are documented, record that progress but keep full acceptance blocked until
every scoped target is resolved.
## Objective
Turn reviewed, lawfully obtained evidence into real versioned production MIDI
profiles for the user's Eclips lead, Ray bass, and SD3 drums. Preserve the tested
generic compiler and close only the MIDI mapping gate. Native-format and real
application acceptance gates remain independent.
## Prerequisites to supply or locate lawfully
For each target:
- Exact vendor product name/edition and documented product/build version.
- For SD3, the selected library, active MIDI map, and relevant preset version.
- Numeric playable range or supported logical drum-voice MIDI numbers.
- MIDI channel configuration, including whether channels are configurable.
- Canonical techniques and aliases; numeric keyswitches and trigger velocities.
- Actual latching, momentary/hold, reset, retrigger, and polyphony behavior.
- Applicable CC selections/resets and explicit normal-technique restoration.
- Supported lead/gate/release timing, including any relevant tempo constraints.
- Verified velocity-layer boundaries and usable intensity behavior.
- Evidence source/version references and permission to store any fixtures.
Do not require a nonexistent control mechanism: if a documented technique uses
no CC or no keyswitch, record that verified absence rather than inventing one.
Distinguish actual instrument layers from the generator's documented intensity
policy. If a target's real semantics cannot be represented by the current
profile model, describe the specific evidence-backed mismatch and implement a
small tested correction; do not falsify data to fit a synthetic fixture.
Public official documentation is suitable when it establishes the selected
target version and behavior. User-owned lawful local evidence may be referenced
by safe evidence IDs. Do not publish private absolute paths or copy licensed
manuals. Never request/store credentials, bypass authentication, or upload
private files/code to third parties.
## Files to create or modify
- Add evidence-backed, version-named JSON profiles under
`src/riff_groove_builder/data/profiles/`.
- Update that package's `PROFILE_RESOURCES` manifest.
- Modify `profiles.py` or `articulations.py` only for an actual documented
mismatch; add focused regressions for any change.
- Add separate evidence-based cases to `tests/unit/test_profiles.py`,
`tests/unit/test_articulations.py`, and
`tests/integration/test_articulation_midi.py`, or a directly related target
test file if it makes the evidence/mechanics distinction clearer.
- Update `docs/articulation-profiles.md`, `docs/compatibility.md`, and relevant
README/architecture status text.
- Write `prompts/report_5_fix.md`.
Preserve prior prompts/reports and the approved public contract. Do not commit,
delegate, create Step 6, implement native codecs, or wire the generation service.
## Implementation constraints
1. Review the underlying evidence, not merely a profile's assertion of verified
provenance. Confirm every production number and state rule against sources.
2. Keep synthetic test profiles excluded from production. Do not relabel the
existing test.lead/test.bass/test.drums fixtures as real maps.
3. Production IDs and metadata identify the actual supported versions/maps.
Declare a default only when unambiguous and justified.
4. Keep `native_available=false` until the separate native gates pass. Real
MIDI mapping does not certify `.agp`/`.sdp` serialization or Cubase loading.
5. Preserve exact timing, profile validation, layer bounds, part/channel
isolation, control resets, state transitions, and honest named failures.
6. If evidence contradicts the requested product or extension, report the exact
contradiction and required decision rather than choosing a different target.
7. If evidence is still unavailable, write a fresh blocked fix report with the
exact remaining fields/sources. Make no speculative production additions.
## Required unit and integration tests
- Parse and validate every new real profile with evidence/version consistency.
- Verify exact documented notes/voices, switches, CCs, layer boundaries, aliases,
and state rules; assertions must not simply copy the implementation's output.
- Verify selection/default behavior and synthetic exclusion in the production
registry.
- Compile representative real-target parts and compare independently expected
events, then write/read back actual MIDI through the reviewed writer.
- Verify packaged JSON discovery and profile summaries from the installed wheel,
outside the repository; update former empty-registry expectations accurately.
- Keep corrupt/missing-resource and invalid-profile cases failing explicitly.
- Run all existing mechanics, contract, MIDI, stdio, and distribution regressions.
- Run Ruff lint/format, strict mypy, and dependency checks.
- Record any actual target-plugin/Cubase MIDI acceptance separately; do not call
a pure-Python test an application import test or fabricate an observed result.
## Acceptance criteria
Full Step 5 is accepted only when the scoped real mappings are supported by
reviewed evidence and the above tests pass. Document unsupported techniques
explicitly; no silent dropped controls or plausible guesses.
The orchestrator must read this fix report and review the evidence/tests before
creating `prompts/step_6.md`. If blockers remain, the sequence stays paused here.
## Required report
When complete, write your end-of-step report to ./prompts/report_5_fix.md including: what was implemented, test results (pass/fail with details), any issues encountered, and whether you're ready for the next step
Place the entire report inside exactly one plain triple-backtick fence. Include
changed files, each target's evidence/version/source IDs, exact test commands
and pass/fail/skip counts, unresolved fields, separate MIDI/native/application
status, and a clear Step 6 readiness decision. Do not claim completion of the
full project merely because this mapping fix passes.