Skip to content

Improvement: choose a module's category by where it acts - #927

Merged
repeat98 merged 1 commit into
mainfrom
claude/module-category-rule
Oct 25, 2026
Merged

repeat98 merged 1 commit into
mainfrom
claude/module-category-rule

Conversation

@repeat98

Copy link
Copy Markdown
Owner

What was wrong. Nothing told a developer how to choose a module's category, so a module could be built in the wrong shape and only be caught at review. FRACT (#926) is a granulator that replaces its Flex track's source audio on the ColdFire, and it was built as an FX2 effect because the FX2 list was where it wanted to be switched on. As an effect it skips the machine registry and the frame guard. It also needs workarounds a machine wouldn't: TSTR OFF, one track at a time, and clearing the stock declick. The module guides' category table only listed what each guide covers, and some rows were stale.

What changes.

  • docs/module-guides/README.md: a new "Choose the category" section. Choose by where the module acts, not by the menu you'd like to switch it on from. An effect processes its slot's audio on the DSP. A module that makes or replaces a track's sound is a machine. One that makes or changes notes is a MIDI generator or MIDI effect. When it isn't clear, ask the owner in an issue before writing code. The table now says when to choose each category, and the stale "none yet" rows for system are fixed. The file stays at its current size (it is over the 32 KB limit): step 5 of the workflow drops detail the doctor already prints.
  • docs/module-guides/effects.md: one line under "Applies to" pointing a machine-shaped module to that section.
  • /modwerk-new-module: the plan the developer approves now settles the category first.
  • docs/MAINTENANCE.md: the pull request review checks the category along with the other rules contributions most often break.
  • npm run module:doctor: an effects module whose performance record prices audio work on the ColdFire (kind: coldfire, or a coldfire block) fails with "that is a machine, not an effect". No listed effect has one; every machine and several system modules do. The doctor's --all test runs in the app suite, so a catalogued module that trips it turns CI red.
  • An app changelog entry.

How I checked.

  • Ran the doctor on FRACT three-grain track machine (source and native FLEX support) #926's module folder and catalogue row, copied into this branch temporarily and removed afterwards: ✗ category its performance record prices audio work on the ColdFire, so it makes or replaces its track's sound: that is a machine, not an effect.
  • npm run check -- --base origin/main passed, including module:doctor --all with no new ✗.

What the guides lacked. Any rule for choosing a category. The index only listed what each guide covers, so an author could pick by the menu they wanted to be switched on from. The guide edits above fix that.

Limit. The doctor rule relies on the author pricing their ColdFire work in the performance record, as the performance guide asks. A ColdFire renderer that isn't priced is caught at planning and in review, not by the doctor.

🤖 Generated with Claude Code

An effect processes its slot's audio on the DSP; a module that makes or
replaces a track's sound is a machine; one that makes notes is a MIDI
generator. The module guides say when to choose each category, the
new-module plan settles it first, the PR review checks it, and
module:doctor refuses an effect whose performance record prices audio
work on the ColdFire (FRACT, #926).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Oct 25, 2026
@repeat98
repeat98 enabled auto-merge (squash) October 25, 2026 15:52
@repeat98
repeat98 merged commit d291b2b into main Oct 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant