Skip to content

feat(music): the default policy searches the frame, never a name [spec 03-01] - #319

Merged
wine-fall merged 1 commit into
mainfrom
zachg-1027--search-words
Oct 27, 2026
Merged

wine-fall merged 1 commit into
mainfrom
zachg-1027--search-words

Conversation

@wine-fall

Copy link
Copy Markdown
Owner

Implements specs/spec03/03-01-brain-harness.md §2.3 (the replaceable music policy); decision recorded in specs/spec14/14-listening-taste.md §6.

What changes

Rules 3–5 of DEFAULT_MUSIC_POLICY no longer tell the pick to search "<artist> <title>". They now say: do not search by name; search the frame (a scene, a style, a language, a decade, a mood word) on the playlists and channels catalogues and the platforms; among the candidates prefer the one you did not expect; reach for a name only to check a candidate already found. Rules 1, 2, 6, 7, 8 and NO_REPEATS_RULE are untouched. The comment above the policy states the intent; test/prompts.test.ts locks the new wording and the tools it may name.

An install whose music-policy.md was already seeded keeps its old text (the file is written once, never rewritten), so the change reaches new installs and anyone who deletes the file.

Why (measured)

Over 120 real autoplay picks (4 real moments from a listener's history, real providers, real brain) the old rules ended every search at a name the model already knew, on YouTube / QQ / NetEase; the playlists and channels pools, which match scene and style words, sat nearly idle and nothing unfamiliar could surface. With the new rules, 24 single picks made 0 name searches, and a 4 × 10 consecutive run side by side with the old text gave:

old new
searches 98 121
name-shaped searches 66 2
frame-shaped searches 32 119
picks by an artist already in the radio's ledger 10 / 39 2 / 38
no pick (8-turn cap) 1 2

Catalogues shifted from YouTube-first to playlists-first (old: youtube 45, playlists 30; new: playlists 77, youtube 17). Whether the new picks are good is the by-ear pass, owed (folds into #290).

Tested

On the remote box (Linux): CI=true nice -n 10 pnpm test green, pnpm run typecheck 0, npx oxlint src test scripts .github/scripts 0, pre-commit run --all-files green. Codex closing review could not run on the box (account has no usable model); no external review on this branch.

AI coding brief

Original request. The user asked why murmur never plays AI-generated songs. Investigation showed the pick's own rule 5 ("search <artist> <title>") steers every search to a known name, which also keeps the discovery pools idle; the user chose to change the rule itself ("不能通过歌名和歌手名去搜歌,这个策略就是要改").

Manual interventions. The user rejected every "do you think this works?" framing and required each proposed strategy to be run against real autoplay moments on the remote box, with the songs shown side by side; "real moments" had to be the radio choosing on its own, not the user's chat lines. Tests run only on the box, never on the laptop.

Retro. Start from the rule the brain is actually following (read the prompt it receives) before touching pools or exposure; measure a strategy as a consecutive run with the no-repeat rule biting, not as single picks.

🤖 Generated with Claude Code

…c 03-01]

Rules 3-5 of DEFAULT_MUSIC_POLICY told the pick to search "<artist> <title>".
Over 120 real autoplay picks the search always ended at a name the model
already knew, so the playlists and channels pools, which match scene and
style words, sat nearly idle. Rewritten to search the frame (scene, style,
language, decade, mood word), prefer the unexpected candidate, and keep names
for checking a candidate already found: 24 real runs, 0 name searches, every
pick a name the radio had never played.

Spec 03-01 §2.3 and spec 14 §6 record the decision and the measurement; a
unit test locks the frame-first wording. Already-seeded music-policy.md files
keep their text by design.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wine-fall
wine-fall force-pushed the zachg-1027--search-words branch from 28b6dd0 to e5b2e2d Compare October 27, 2026 09:51
@wine-fall
wine-fall merged commit 497e1ef into main Oct 27, 2026
4 checks passed
@wine-fall
wine-fall deleted the zachg-1027--search-words branch October 27, 2026 09:53
wine-fall added a commit that referenced this pull request Oct 29, 2026
…never in place of it [spec 03-01] (#321)

The pick instruction is now the contract + the code-owned default policy,
always, + the listener's notes under a heading that says they come from the
listener and win where they disagree. A file seeded once with a full copy of
the default and never rewritten had frozen every existing install on the
rules of its day, so #319's frame-search rewrite reached no existing listener.

- The seed is the explanatory comment only: what the file is for, and that
  it is added to the built-in policy and outranks it.
- A copy of any shipped default inside the file (today's, or the two frozen
  from git history in RETIRED_MUSIC_POLICIES) is dropped when read, matched
  word for word across any whitespace; lines added around it stay as notes.
  The file on disk is never rewritten.
- The submit_pick repeat refusal is armed always; a note cannot disarm it.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant