Credit Hoarder can end up putting **writer**, **composer** and **lyricist** on t…he same artist for the same work. Sources often list all three (Qobuz `ComposerLyricist` → writer next to separate `Composer` / `Lyricist` rows, Deezer `Writer` + `Composers`, Tidal / Apple `Writer` / `Songwriter`). Writer is then redundant, and MusicBrainz says to avoid it in that case.
## What MusicBrainz says
From the [artist-work relationship types](https://musicbrainz.org/relationships/artist-work) page, checked 2026-11-05:
> **[writer](https://musicbrainz.org/relationship/a255bca1-b157-4518-9108-7b147dc3fc68)**: This relationship is used to link a work to the artist responsible for writing the music and/or the words (lyrics, libretto, etc.), when no more specific information is available. If possible, the more specific composer, lyricist and/or librettist types should be used, rather than this relationship type.
The tree:
- **authorship**
- **writer**
- composer · lyricist · librettist
- revised by · scriptwriter · translator · reconstructed by
- **arranger** (instrument arranger → orchestrator, vocal arranger)
- adapter · previous attribution · choreographer
So:
- Composer + lyricist is not the *definition* of writer. Writer is the vague fallback ("music and/or words, we don't know which"), and composer + lyricist says exactly which part, so it covers everything writer could say.
- **Arranger is not under writer**: it's a sibling under *authorship*. It plays no part in this rule, and an arranger credit is never added, removed or kept because of it.
- Not every child of writer makes writer redundant. Revised by, translator and reconstructed by describe work on an existing piece, not writing it: a translator of the lyrics still might, or might not, be a writer of the original. Only **composer, lyricist, librettist** (and **scriptwriter**, for dramatised works) answer the "music and/or words" question that writer asks.
## Rule
Per **work** (these are work relationships, not track ones), per **artist**:
> Writer is redundant when the same artist has **composer, lyricist, librettist or scriptwriter** on the same work. Then Credit Hoarder doesn't add writer and offers to remove an existing one.
| Artist has on the work (existing or incoming) | Writer (incoming or existing) |
|---|---|
| composer + lyricist | redundant |
| composer only | redundant |
| lyricist only | redundant |
| librettist / scriptwriter | redundant |
| only translator / revised by / reconstructed by / arranger | **keep** |
| nothing else | keep / add |
"Existing or incoming" on both sides: an incoming composer can make an existing writer redundant, and an existing lyricist can make an incoming writer redundant.
### The half cases (composer only, or lyricist only)
Writer is redundant here too. Writer means "music and/or words", which is already true of someone who is lyricist only, so it adds nothing provable.
The case for keeping it: a source that lists someone under both "Writer" and "Lyricist" *may* mean they wrote the music as well. That's a guess, and if it's true the right credit is **composer**, not writer, and adding writer wouldn't record it anyway. No automatic composer either: the source didn't say it.
### Removing existing writer relationships
- A removal is its own *remove relationship* edit, which voters see. It shows in the review table as a separate, visibly marked row (removal, not addition) and is selected by default; the user can unselect it.
- An existing writer carrying something the specific roles don't, a **credited-as name** or **attributes** (e.g. *additional*), isn't selected for removal by default: the row shows why, and the user decides.
- Only the same artist on the same work counts. A writer for artist A is never removed because artist B is the composer.
## Remove the Equivalence sets option (#62)
`EQUIVALENCE_SETS` in `src/constants.js` holds `['writer', 'composer']`, applied **both ways**, behind the *Equivalence sets* dedup option. It doesn't work well: an existing writer makes an incoming composer count as "already in MB", so the vague role blocks the specific one that should replace it.
This issue removes it entirely: the option, its setting, `EQUIVALENCE_SETS`, the `equivalenceLookup` expansion in `relAlreadyExists` and the `'equivalence'` log reason in `src/dispatch.js`. The rule above takes its place:
- existing **composer / lyricist / librettist / scriptwriter** → incoming writer is skipped;
- existing **writer** → the incoming specific role is **added**, and the writer is offered for removal.
**No option for the new rule**: it always applies. A stored value for the removed setting is ignored.
## Remove the Duplicate roles option
The *Duplicate roles* option (`dedupeDuplicateRoles`, on by default) skips an incoming role when the same artist already has the same role on the same target, even if its attributes, credit or dates differ. #225 and #233 refined it: instrument / vocal attributes and their credited-as names still make two roles different, so one actor voicing several characters keeps every relationship.
The option goes, and its behaviour **always applies**, as it does now by default. With both options gone, the *Deduplication* section of the options popover (`src/ui-bar.js`) is removed, and `dedupOpts` no longer passes anything to `dispatch.js`. A stored value is ignored.
## Done when
- [ ] An incoming writer is skipped (logged with the reason) when the artist has a specific writing role on the work, existing or incoming in the same run.
- [ ] An existing redundant writer appears as a removal row, selected unless it has a credited-as name or attributes.
- [ ] An existing writer no longer blocks an incoming composer / lyricist.
- [ ] The Equivalence sets option and its code are gone; the new rule has no setting.
- [ ] The Duplicate roles option is gone and its dedup always applies; the Deduplication section is removed from the options popover.
- [ ] Translator, revised by, reconstructed by and arranger never count as specific writing roles.
- [ ] README updated (the docs skill), and a test on test.musicbrainz.org covering: composer + lyricist + writer from one source; existing writer + incoming composer; lyricist only + incoming writer; writer with a credited-as name.
<sub>Claude Opus 5.5 · effort: low (5)</sub>