@gobing-ai/knowledge-kit 0.1.20 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/dist/board/collect/index.js +1 -0
- package/dist/board/daily-voice/index.js +1279 -261
- package/dist/board/itc/index.js +1 -0
- package/dist/index.js +13938 -8966
- package/package.json +1 -1
- package/plugins/generations/dailynews-gen/dist/index.js +285 -16
- package/plugins/generations/dailynews-gen/src/editorial-claims.ts +215 -0
- package/plugins/generations/dailynews-gen/src/index.ts +23 -4
- package/plugins/generations/dailynews-gen/src/script-builder.ts +10 -3
- package/plugins/generations/dailynews-gen/src/script-plan.ts +74 -14
- package/plugins/generations/gemini-tts/dist/index.js +47 -7
- package/plugins/generations/gemini-tts/src/gemini-client.ts +34 -6
- package/plugins/generations/music-gen/README.md +277 -0
- package/plugins/generations/music-gen/dist/index.js +23580 -0
- package/plugins/generations/music-gen/package.json +24 -0
- package/plugins/generations/music-gen/plugin.json +23 -0
- package/plugins/generations/music-gen/presets/SOURCE.md +39 -0
- package/plugins/generations/music-gen/presets/formats/clip.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/jingle.yaml +22 -0
- package/plugins/generations/music-gen/presets/formats/loop.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/song.yaml +36 -0
- package/plugins/generations/music-gen/presets/formats/underscore.yaml +22 -0
- package/plugins/generations/music-gen/presets/themes/ambient-tech.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/cinematic.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/lofi.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/synthwave.yaml +35 -0
- package/plugins/generations/music-gen/scripts/gen-preset-index.ts +181 -0
- package/plugins/generations/music-gen/scripts/resolve-preset.ts +64 -0
- package/plugins/generations/music-gen/src/adapter/index.ts +35 -0
- package/plugins/generations/music-gen/src/adapter/instance.ts +927 -0
- package/plugins/generations/music-gen/src/adapter/offline.ts +124 -0
- package/plugins/generations/music-gen/src/artifact.ts +223 -0
- package/plugins/generations/music-gen/src/audio/checks.ts +618 -0
- package/plugins/generations/music-gen/src/audio/master.ts +267 -0
- package/plugins/generations/music-gen/src/audio/measure.ts +507 -0
- package/plugins/generations/music-gen/src/audio/profile.ts +131 -0
- package/plugins/generations/music-gen/src/audio.ts +122 -0
- package/plugins/generations/music-gen/src/brief.ts +191 -0
- package/plugins/generations/music-gen/src/config.ts +451 -0
- package/plugins/generations/music-gen/src/content.ts +199 -0
- package/plugins/generations/music-gen/src/digest.ts +100 -0
- package/plugins/generations/music-gen/src/index.ts +147 -0
- package/plugins/generations/music-gen/src/job.ts +131 -0
- package/plugins/generations/music-gen/src/plugin.ts +371 -0
- package/plugins/generations/music-gen/src/presets.ts +951 -0
- package/plugins/generations/music-gen/src/render.ts +87 -0
- package/plugins/generations/music-gen/src/request.ts +102 -0
- package/plugins/generations/music-gen/src/spend.ts +495 -0
- package/plugins/generations/music-gen/tsconfig.json +8 -0
- package/plugins/generations/omni-voice-gen/uv.toml +5 -0
- package/plugins/generations/vibe-voice-tts/README.md +64 -0
- package/plugins/generations/vibe-voice-tts/dist/index.js +14259 -0
- package/plugins/generations/vibe-voice-tts/package.json +16 -0
- package/plugins/generations/vibe-voice-tts/plugin.json +6 -0
- package/plugins/generations/vibe-voice-tts/profiles.json +10 -0
- package/plugins/generations/vibe-voice-tts/pyproject.toml +9 -0
- package/plugins/generations/vibe-voice-tts/python/worker.py +566 -0
- package/plugins/generations/vibe-voice-tts/src/index.ts +88 -0
- package/plugins/generations/vibe-voice-tts/src/vibevoice-client.ts +828 -0
- package/plugins/generations/vibe-voice-tts/tsconfig.json +8 -0
- package/plugins/generations/vibe-voice-tts/uv.lock +1767 -0
- package/plugins/generations/vibe-voice-tts/uv.toml +4 -0
- package/plugins/generations/voice-gen/dist/index.js +31 -1
- package/plugins/generations/voice-gen/src/voicebox-client.ts +50 -1
- package/plugins/generations/voxcpm-tts/dist/index.js +81 -9
- package/plugins/generations/voxcpm-tts/python/worker.py +9 -0
- package/plugins/generations/voxcpm-tts/src/index.ts +41 -0
- package/plugins/generations/voxcpm-tts/src/voxcpm-client.ts +32 -11
- package/plugins/generations/voxcpm-tts/uv.toml +5 -0
- package/plugins/kk/README.md +21 -0
- package/plugins/kk/decisions/kk-safety.yaml +5 -2
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +14 -2
- package/plugins/kk/scripts/cover-compositor.ts +380 -32
- package/plugins/kk/scripts/daily-cover-mock.ts +40 -3
- package/plugins/kk/scripts/daily-stages.ts +933 -60
- package/plugins/kk/scripts/episode-identity.ts +180 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +111 -12
- package/plugins/kk/scripts/music-stages.ts +624 -0
- package/plugins/kk/scripts/news-editorial-ledger.ts +906 -0
- package/plugins/kk/scripts/safety-artifact-check.ts +28 -5
- package/plugins/kk/scripts/source-citation.ts +187 -0
- package/plugins/kk/scripts/topic-selection-attempts.ts +446 -0
- package/plugins/kk/scripts/topic-selection-calibration.ts +161 -0
- package/plugins/kk/skills/content-judge/SKILL.md +11 -6
- package/plugins/kk/skills/content-judge/references/music-quality-rubric.md +147 -0
- package/plugins/kk/skills/content-judge/references/rubrics.md +15 -0
- package/plugins/kk/skills/content-safety/SKILL.md +12 -0
- package/plugins/kk/skills/music-authoring/SKILL.md +276 -0
- package/plugins/kk/skills/music-authoring/references/judge-input.md +117 -0
- package/plugins/kk/skills/news-editorial/SKILL.md +102 -15
- package/plugins/kk/skills/news-editorial/references/selection.md +4 -0
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +58 -11
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +12 -11
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +13 -12
- package/plugins/kk/workflows/kk-daily-safety.yaml +12 -10
- package/plugins/kk/workflows/kk-music.yaml +332 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +81 -6
- package/plugins/kk/workflows/kk-publish.yaml +4 -1
- package/plugins/publishings/bilibili-pub/dist/index.js +11 -1
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/csdn-pub/dist/index.js +11 -1
- package/plugins/publishings/csdn-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/infoq-pub/dist/index.js +11 -1
- package/plugins/publishings/infoq-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/jike-pub/dist/index.js +11 -1
- package/plugins/publishings/jike-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/juejin-pub/dist/index.js +11 -1
- package/plugins/publishings/juejin-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +62 -10
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +16 -1
- package/plugins/publishings/linkedin-pub/src/index.ts +99 -12
- package/plugins/publishings/podcast-pub/dist/index.js +586 -20
- package/plugins/publishings/podcast-pub/src/corrections.ts +509 -0
- package/plugins/publishings/podcast-pub/src/index.ts +257 -5
- package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +240 -0
- package/plugins/publishings/podcast-pub/src/show-notes.ts +69 -13
- package/plugins/publishings/shipinhao-pub/dist/index.js +59 -8
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/shipinhao-pub/src/audio-flow.ts +105 -6
- package/plugins/publishings/sspai-pub/dist/index.js +11 -1
- package/plugins/publishings/sspai-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/substack-pub/dist/index.js +11 -1
- package/plugins/publishings/substack-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +80 -24
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +7 -3
- package/plugins/publishings/surfdash-pub/src/index.ts +107 -18
- package/plugins/publishings/surfdash-pub/src/patch.ts +21 -3
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +3 -1
- package/plugins/publishings/threads-pub/dist/index.js +58 -6
- package/plugins/publishings/threads-pub/dist/profile-check.js +18 -2
- package/plugins/publishings/threads-pub/src/post-rail.ts +101 -4
- package/plugins/publishings/wechatmp-pub/dist/index.js +105 -35
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/wechatmp-pub/src/cgi-draft.ts +87 -53
- package/plugins/publishings/wechatmp-pub/src/enrich.ts +61 -3
- package/plugins/publishings/wechatmp-pub/src/flow.ts +28 -0
- package/plugins/publishings/weibo-pub/dist/index.js +11 -1
- package/plugins/publishings/weibo-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/x-pub/dist/index.js +95 -10
- package/plugins/publishings/x-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/x-pub/src/post-rail.ts +154 -12
- package/plugins/publishings/xhs-pub/dist/index.js +11 -1
- package/plugins/publishings/xhs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +11 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# music-quality — music take evaluation rubric
|
|
2
|
+
|
|
3
|
+
Rubric id: **`music-quality`**. Loaded by `kk:content-judge` when the `kk-music` workflow (0403) or the
|
|
4
|
+
`kk:music-authoring` `review` operation judges a generated take. It is one more rubric section for the
|
|
5
|
+
existing verdict contract — **not** a second judge and not a second verdict shape.
|
|
6
|
+
|
|
7
|
+
The judge is reading a **bundle** (`4-judge-input.md`, written by `kk:music-authoring`): the brief, the
|
|
8
|
+
kk-rendered prompt text, the lyrics, the instance analysis and `checks.json` verbatim. It is not
|
|
9
|
+
listening to the take, and it must not pretend to.
|
|
10
|
+
|
|
11
|
+
## Scoring
|
|
12
|
+
|
|
13
|
+
| Criterion | Weight | Must-pass |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `checks.clean` — `<take>.checks.json` exists for the take and contains no row with `result: fail` | 0.20 | yes |
|
|
16
|
+
| `brief-adherence` — genre, instrumentation, tempo, key, vocal character and language match the brief's technical direction | 0.25 | no |
|
|
17
|
+
| `arrangement` — the take's section layout agrees with the brief's declared `structure` | 0.20 | no |
|
|
18
|
+
| `lyric-intelligibility` — the authored lyric text is singable in the declared `language` and carries the intended syllables | 0.15 | no |
|
|
19
|
+
| `hook` — a repeated, identifiable hook exists where the structure declares it | 0.10 | no |
|
|
20
|
+
| `production-artefacts` — no dead air, click, dropout or clipping artefact is recorded against the take | 0.10 | no |
|
|
21
|
+
|
|
22
|
+
Thresholds: `pass_threshold = 0.75`
|
|
23
|
+
|
|
24
|
+
Same scoring model as every other rubric (`rubrics.md` §Scoring model): `pass` = full weight,
|
|
25
|
+
`warn` = half, `fail` = zero; a must-pass `fail` is `FAIL` regardless of score.
|
|
26
|
+
|
|
27
|
+
`checks.clean` is the **only** must-pass criterion. Craft criteria are never must-pass, because a
|
|
28
|
+
craft judgement made without hearing the take cannot be a blocking violation: the worst it can do is
|
|
29
|
+
pull the score under 0.75 and produce `NEEDS_REVISION` with actionable feedback.
|
|
30
|
+
|
|
31
|
+
## Measurement discipline (applies to every criterion)
|
|
32
|
+
|
|
33
|
+
1. **Measured facts come from `checks.json`, cited, never re-derived.** Duration, silence, BPM, key,
|
|
34
|
+
section count and delivery loudness exist as rows with `id`, `measured`, `threshold`, `unit`,
|
|
35
|
+
`source` and `result`. A finding that cites any of them quotes the value **with its unit and its
|
|
36
|
+
`source`**, and names the file — e.g. `duration.target: measured 34.2 s, threshold "20–40", unit s,
|
|
37
|
+
source ffprobe 8.1.2 (3-takes/…wav.checks.json)`. Never write "about 30 seconds"; either quote the
|
|
38
|
+
row or do not cite a number.
|
|
39
|
+
2. **Never score a criterion from the prompt text.** The prompt is an instruction, not evidence of what
|
|
40
|
+
the model produced. "The brief asked for gated snare, so `brief-adherence` passes" is a
|
|
41
|
+
fabrication — grade it `warn` with "the bundle carries no evidence for this element".
|
|
42
|
+
3. **Never score by ear.** The judge has no audio. Anything only audible (mix balance, timbre,
|
|
43
|
+
artefacts not recorded as rows) is `warn` with detail "not observable from the bundle".
|
|
44
|
+
4. **`source` is the authority, so name it.** `ffprobe <version>` (duration), `ffmpeg <version>
|
|
45
|
+
silencedetect` (silence), `ffmpeg <version>` (delivery loudness/true peak), `lyria instance
|
|
46
|
+
analysis` (BPM/key/sections — a **model estimate**, which is why those rows are `warn`-only).
|
|
47
|
+
5. **A `warn` row never becomes a `fail` finding.** BPM/key/section disagreement is a craft input
|
|
48
|
+
(toward `NEEDS_REVISION`), not a violation; only the measured `fail` rows in `checks.json` can fail
|
|
49
|
+
the take, and they do so through `checks.clean`.
|
|
50
|
+
|
|
51
|
+
## Criterion guidance
|
|
52
|
+
|
|
53
|
+
### `checks.clean` (must-pass, weight 0.20)
|
|
54
|
+
|
|
55
|
+
Read `<take>.checks.json` from the bundle. It **must exist** — an absent file is a `fail` of this
|
|
56
|
+
criterion, not a caveat. Then:
|
|
57
|
+
|
|
58
|
+
- any row with `result: "fail"` → this criterion is `fail` → the verdict is `FAIL`, and the finding
|
|
59
|
+
quotes that row (`id`, `measured`, `threshold`, `unit`, `source`, and its `note` when present);
|
|
60
|
+
- every row `pass` or `warn` → `pass`, quoting the row count and the `warn` ids.
|
|
61
|
+
|
|
62
|
+
Rows that typically fail and what they mean: `duration.target`/`duration.clip` (the take missed the
|
|
63
|
+
duration band — re-brief the length and iterate), `silence.leading`/`silence.trailing` (dead air at an
|
|
64
|
+
edge), `analysis.present` (the analyze step's result has not reached the check, so the take is
|
|
65
|
+
unmeasured in the sense this rubric needs — stop and fix the input, do not judge around it),
|
|
66
|
+
`delivery.*` (only present after `master`; a true-peak or loudness miss blocks delivery).
|
|
67
|
+
|
|
68
|
+
### `brief-adherence` (weight 0.25)
|
|
69
|
+
|
|
70
|
+
Compare the brief's `style` (technical direction: genre, BPM, key, instrumentation, production) and
|
|
71
|
+
`language` against what the bundle can actually attest:
|
|
72
|
+
|
|
73
|
+
- the instance analysis' BPM and key (`analysis.bpm`, `analysis.key` rows) — agreement is `pass`,
|
|
74
|
+
disagreement is `warn` quoting both the measured value and the brief's band;
|
|
75
|
+
- instrumentation, vocal character and production texture — attestable only if the analysis object or
|
|
76
|
+
the take metadata names them; otherwise `warn`, "not observable from the bundle".
|
|
77
|
+
|
|
78
|
+
### `arrangement` (weight 0.20)
|
|
79
|
+
|
|
80
|
+
Compare the brief's `structure[]` (`at`, `section`, `note`) against the analysis' section list
|
|
81
|
+
(`analysis.sections` row: measured count vs the brief's count) and any section detail in the analysis
|
|
82
|
+
object. A count mismatch is `warn` (the analysis is an estimate) with the measured value quoted. A
|
|
83
|
+
structure the brief declares but the analysis cannot see is `warn`, never `pass`: absence of evidence
|
|
84
|
+
is not agreement.
|
|
85
|
+
|
|
86
|
+
### `lyric-intelligibility` (weight 0.15)
|
|
87
|
+
|
|
88
|
+
- `instrumental: true` brief → `pass`, detail "instrumental brief; no lyric text is sent", weight
|
|
89
|
+
intact: the criterion is satisfied by construction, not waived.
|
|
90
|
+
- lyrics present in the bundle → grade the **text**: tags match the structure's sections, the
|
|
91
|
+
language matches the brief's `language`, lines are singable (syllable counts consistent inside a
|
|
92
|
+
section, no prose sentences standing in for a hook line). Mix-level intelligibility stays
|
|
93
|
+
unobservable → say so in the detail.
|
|
94
|
+
- lyrics absent because the model wrote its own → `warn`, detail "model-authored lyrics are not in the
|
|
95
|
+
bundle". Never invent them.
|
|
96
|
+
|
|
97
|
+
### `hook` (weight 0.10)
|
|
98
|
+
|
|
99
|
+
The hook must be locatable from the bundle: a repeated line in the lyric text, or a declared hook
|
|
100
|
+
section in `structure`. If the bundle can neither show nor exclude a hook, `warn`. Do not claim the
|
|
101
|
+
take "has a catchy chorus"; claim only what the text and the declared structure show.
|
|
102
|
+
|
|
103
|
+
### `production-artefacts` (weight 0.10)
|
|
104
|
+
|
|
105
|
+
Cite the `silence.*` rows (dead air at either edge) and, when the take has been mastered, the
|
|
106
|
+
`delivery.*` rows. `pass` when those rows are `pass` and no artefact is recorded; `warn` when a row is
|
|
107
|
+
`warn`, or when an artefact class (clipping, dropout, clicks, unnatural vocal timbre) is only audible
|
|
108
|
+
and therefore unattested; `fail` only if `checks.json` itself carries the failing row — in which case
|
|
109
|
+
`checks.clean` already failed and this criterion simply corroborates it.
|
|
110
|
+
|
|
111
|
+
## Verdict mapping
|
|
112
|
+
|
|
113
|
+
| Situation | Verdict |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| Any `checks.json` row with `result: "fail"`, or a missing `checks.json` | `FAIL` (via `checks.clean`) |
|
|
116
|
+
| No must-pass failure, `score >= 0.75` | `PASS` |
|
|
117
|
+
| No must-pass failure, `score < 0.75` | `NEEDS_REVISION` (feedback names the directive for one `iterate` round) |
|
|
118
|
+
|
|
119
|
+
`confidence` is self-assessed per the contract: `HIGH` when every criterion was grounded in a bundle
|
|
120
|
+
artifact and every number quoted from a row, `MEDIUM` when some element was attestable only through
|
|
121
|
+
the model's own analysis, `LOW` when the bundle is incomplete enough that the craft score could flip
|
|
122
|
+
(the verdict is still emitted, with the gap named).
|
|
123
|
+
|
|
124
|
+
## Emit the existing contract
|
|
125
|
+
|
|
126
|
+
Write **one** verdict file (`verdict_path` from the review step), with the fields the
|
|
127
|
+
`content-judge` contract already defines — nothing added, nothing renamed:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"verdict": "PASS | FAIL | NEEDS_REVISION",
|
|
132
|
+
"confidence": "HIGH | MEDIUM | LOW",
|
|
133
|
+
"rubric": "music-quality",
|
|
134
|
+
"score": 0.0,
|
|
135
|
+
"summary": "<one paragraph, every claim traceable to the bundle>",
|
|
136
|
+
"findings": [{ "criterion": "checks.clean | brief-adherence | arrangement | lyric-intelligibility | hook | production-artefacts", "status": "pass | fail | warn", "detail": "<quoted row or bundle evidence>" }],
|
|
137
|
+
"feedback": ["<one directive for the next brief>"],
|
|
138
|
+
"content_ref": "<the take path>",
|
|
139
|
+
"evaluated_at": "<ISO-8601>"
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
`findings[].criterion` values come from the table above and nowhere else. `content_ref` is the take
|
|
144
|
+
(`3-takes/<slug>-<model>-<instanceId>.<ext>`), not the bundle path. Do not write a
|
|
145
|
+
`music-verdict.json`, do not add a measured-values field, do not add a per-criterion score field: if
|
|
146
|
+
you want the numbers in the record, quote them inside `detail`, where the contract already puts
|
|
147
|
+
evidence.
|
|
@@ -114,12 +114,27 @@ For daily news episode script plans (`kk-daily-ai-voice3` advisory `editorial-ju
|
|
|
114
114
|
|
|
115
115
|
Thresholds: `pass_threshold = 0.80`
|
|
116
116
|
|
|
117
|
+
## music-quality
|
|
118
|
+
|
|
119
|
+
For generated music takes (`kk-music`, 0403; authored through `kk:music-authoring`). Its criteria are
|
|
120
|
+
**not** in this file: the rubric carries a measurement-discipline section (measured facts quoted from
|
|
121
|
+
`checks.json`, never re-derived and never scored by ear) that would sit awkwardly beside the text
|
|
122
|
+
rubrics, so it ships as its own reference —
|
|
123
|
+
[`music-quality-rubric.md`](music-quality-rubric.md).
|
|
124
|
+
|
|
125
|
+
Summary: weights `checks.clean` 0.20 (the **only** must-pass), `brief-adherence` 0.25,
|
|
126
|
+
`arrangement` 0.20, `lyric-intelligibility` 0.15, `hook` 0.10, `production-artefacts` 0.10;
|
|
127
|
+
`pass_threshold = 0.75`. The load-bearing rule: `checks.clean` reads `<take>.checks.json` and fails on
|
|
128
|
+
any row with `result: fail`.
|
|
129
|
+
|
|
117
130
|
## Adding a custom rubric
|
|
118
131
|
|
|
119
132
|
1. Add a section to this file with a unique heading and a criteria table matching the schema
|
|
120
133
|
above (criterion, weight, must-pass).
|
|
121
134
|
2. Set `pass_threshold`.
|
|
122
135
|
3. Reference the new rubric id from a thin wrapper's `rubric` field or an `agent.run` prompt.
|
|
136
|
+
A rubric whose rules are large enough to need their own file (as `music-quality` does) keeps a
|
|
137
|
+
pointer section here instead of an inline table, so this file stays the index.
|
|
123
138
|
|
|
124
139
|
Weights must sum to 1.0; validation is the skill's responsibility at load time — if they do not
|
|
125
140
|
sum to 1.0, normalize them and emit a `warn` finding noting the normalization.
|
|
@@ -41,6 +41,18 @@ prefer exclusion or abort over any rewording.
|
|
|
41
41
|
| 4 | 未经核实断言 / 来源保真 | Claims resting on RSS titles, aggregation-page URLs, unknown model names, self-contradictory dates; invented facts | Remove the claim or downgrade to attributed uncertainty; insufficient material → shorten or stop, never pad |
|
|
42
42
|
| 5 | 必要披露 | AI-generation disclosure, identity/experience truthfulness (only real hands-on experience claimed) | Missing disclosure → revise to add, unless that platform item is graded `note` (do not add it back); false identity claim → BLOCK |
|
|
43
43
|
|
|
44
|
+
**Unpoliced class — 黄赌毒 (adult content / gambling / drugs), 0392 inventory finding.** The 0392 inventory
|
|
45
|
+
names this class and the honest answer is: **nothing enforces it anywhere.** No selection rule
|
|
46
|
+
(`plugins/kk/scripts/topic-boundary.json` holds only `prc-leadership` + `dateConflict`), no row in the
|
|
47
|
+
table above, and no platform file (`references/platforms/*.md`) names adult content, gambling or drugs —
|
|
48
|
+
`grep -riE '黄赌毒|色情|赌博|毒品|porn|gambl|adult' plugins/kk/skills plugins/kk/scripts apps/cli/src`
|
|
49
|
+
returned nothing before this note (this paragraph is now its only hit — prose, not a rule). It is not a sub-case of category 2 (that row is political/diplomatic/trade-control/military/
|
|
50
|
+
public-policy/social-event), so an adult/gambling/drug story whose subject is an AI product passes every
|
|
51
|
+
rule in force today. Recorded here so the admission reviewer sees the gap instead of inferring coverage;
|
|
52
|
+
0392 ships **no** filter for it (no observed harmful miss, and an unvetted keyword list would block AI
|
|
53
|
+
stories that merely mention addiction treatment or betting-market models). Any future rule belongs here
|
|
54
|
+
and in `topic-boundary.json`, with fixtures like `plugins/kk/tests/fixtures/topic-selection-cases.json`.
|
|
55
|
+
|
|
44
56
|
## Modes
|
|
45
57
|
|
|
46
58
|
- **detect-only** (default): emit the report; touch nothing.
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: music-authoring
|
|
3
|
+
description: >-
|
|
4
|
+
Use the music-authoring skill to turn one musical idea into an approved MusicBrief and a reviewed
|
|
5
|
+
take over the `kk music` verbs — "write a music brief", "author the lyrics for this song", "iterate
|
|
6
|
+
on this take", "review this track", "why did the take miss its duration". Four operations: brief,
|
|
7
|
+
lyric, iterate, review. Carries the instance's real limits (the prompt is the only control surface,
|
|
8
|
+
duration is a target, Clip is not a Pro preview, no negative prompt, every take is paid and
|
|
9
|
+
immutable) and hands review to kk:content-judge with the `music-quality` rubric.
|
|
10
|
+
version: 0.1.0
|
|
11
|
+
requires: [cli:kk, cli:spur, local-fs]
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# music-authoring — brief, lyric, iterate, review
|
|
15
|
+
|
|
16
|
+
## Purpose
|
|
17
|
+
|
|
18
|
+
Turn one musical idea into an **approved `MusicBrief`** and one **judged take**, in a file-backed run
|
|
19
|
+
directory, over the `kk music` verbs. One fat skill with four operations — `brief`, `lyric`, `iterate`,
|
|
20
|
+
`review` — sharing one run-directory contract, one statement of what the model can and cannot do, one
|
|
21
|
+
spend rule and one resume rule.
|
|
22
|
+
|
|
23
|
+
Generation is not this skill. Takes are made by `kk music gen` (0401/0398), measured by
|
|
24
|
+
`kk music check` (0405), normalized by `kk music master` (0405) and sequenced by the `kk-music`
|
|
25
|
+
workflow (0403). This skill owns the **authoring** of the brief and lyrics, the **iteration loop**, and
|
|
26
|
+
the **judge handoff**.
|
|
27
|
+
|
|
28
|
+
## When to use
|
|
29
|
+
|
|
30
|
+
- A user asks to author music from an idea ("write a brief for a 30-second synthwave sting", "write
|
|
31
|
+
the lyrics", "make the second half bigger").
|
|
32
|
+
- An `agent.run` step in a workflow needs one authoring stage independently (`brief` only, `lyric`
|
|
33
|
+
only, `review` only).
|
|
34
|
+
- An operator resumes an interrupted music run directory and expects the existing brief, take and
|
|
35
|
+
checks to be reused, not re-authored and not re-paid.
|
|
36
|
+
|
|
37
|
+
Do **not** use this skill for: spoken audio (`kk:audio-authoring`), music **generation** policy and
|
|
38
|
+
spend enforcement (`kk music gen`, 0400), the deterministic take checks and delivery profile
|
|
39
|
+
(`kk music check` / `kk music master`, 0405), the workflow with its select/judge/master gates
|
|
40
|
+
(`kk-music`, 0403), or evaluation itself (`kk:content-judge`).
|
|
41
|
+
|
|
42
|
+
## Invocation contract
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
[operation] --dir <run_dir> [--topic <idea>] [--format <preset>] [--theme <preset>]
|
|
46
|
+
[--model pro|clip] [--duration <m:ss>] [--language <tag>] [--instrumental]
|
|
47
|
+
[--tempo <bpm>] [--key <key>] [--directions <n>] [--revise <feedback>] [--force]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
| Token | Meaning | Default |
|
|
51
|
+
| --- | --- | --- |
|
|
52
|
+
| `operation` | `brief` (default) \| `lyric` \| `iterate` \| `review` | `brief` |
|
|
53
|
+
| `--dir <run_dir>` | run directory; created when absent, never silently reused as another run | required |
|
|
54
|
+
| `--topic <idea>` | the idea in one line, when `idea.md` does not exist | read `idea.md` |
|
|
55
|
+
| `--format <preset>` | format preset (`song`, `jingle`, `underscore`, `clip`, `loop`) | `song` |
|
|
56
|
+
| `--theme <preset>` | theme preset (`synthwave`, `lofi`, `cinematic`, `ambient-tech`) | required |
|
|
57
|
+
| `--model <pro\|clip>` | instance selector; omit to let the format preset decide | preset |
|
|
58
|
+
| `--duration <m:ss>` | Pro duration target inside `0:05–3:00` | format preset |
|
|
59
|
+
| `--language <tag>` | lyric language tag, always sent | `EN` |
|
|
60
|
+
| `--instrumental` | no vocals; the brief may then carry no lyrics | off |
|
|
61
|
+
| `--tempo <bpm>` / `--key <key>` | declared musical targets, in the technical direction | from theme |
|
|
62
|
+
| `--directions <n>` | differentiated briefs to author for one idea | `2` |
|
|
63
|
+
| `--revise <feedback>` | redraft feedback for the `lyric` gate | none (approve path) |
|
|
64
|
+
| `--force` | explicit operator approval to replace an existing artifact | off |
|
|
65
|
+
|
|
66
|
+
Operations are case-insensitive; an unknown operation fails loud and lists the four. Preset names are
|
|
67
|
+
`kk music presets`' names — a name not on that list is an error, never a silent fallback.
|
|
68
|
+
|
|
69
|
+
## Run directory
|
|
70
|
+
|
|
71
|
+
All paths below are relative to `--dir`. The layout is the music workflow's run directory
|
|
72
|
+
(`<works>/kk-music/<topic-slug>/`, 0403), so a state machine and an operator resume the same files.
|
|
73
|
+
|
|
74
|
+
| Artifact | Path | Written by |
|
|
75
|
+
| --- | --- | --- |
|
|
76
|
+
| Idea (input) | `idea.md` | supplied before invocation, or `--topic` |
|
|
77
|
+
| Brief | `1-brief/brief-<nn>.yaml` | `brief`, `iterate` — the 0397 `MusicBrief` authoring form |
|
|
78
|
+
| Prompt text | `1-brief/brief-<nn>.prompt.txt` | `brief`, `iterate` — `kk music render --out` |
|
|
79
|
+
| Render trace | `1-brief/brief-<nn>.render.txt` | `brief`, `iterate` — render's stdout (resolved job + request) |
|
|
80
|
+
| Lyrics | `2-lyrics.md` | `lyric` — tagged sections; also folded into the brief's `lyrics:` block |
|
|
81
|
+
| Generator content | `3-takes/content-<nn>.json` | `kk music gen --out` — takes land beside it |
|
|
82
|
+
| Take | `3-takes/<slug>-<model>-<instanceId>.<ext>` | `kk music gen` |
|
|
83
|
+
| Take sidecar | `<take>.take.json` | `kk music gen` — digest, instance id, model, unit price, request |
|
|
84
|
+
| Take checks | `<take>.checks.json` | `kk music check` |
|
|
85
|
+
| Instance analysis | `3-takes/analysis-<instanceId>.json` | `kk music analyze --json` (operator, or 0403) |
|
|
86
|
+
| Judge bundle | `4-judge-input.md` | `review` |
|
|
87
|
+
| Verdict | `4-verdict-music.json` | `kk:content-judge`, rubric `music-quality` |
|
|
88
|
+
|
|
89
|
+
`<nn>` is two digits, `01` for the first brief of a run and `+1` per iteration. One brief, one
|
|
90
|
+
prompt and one take set per number — an iteration never edits brief `01`, it writes brief `02`.
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
kk music render --in 1-brief/brief-01.yaml --out 1-brief/brief-01.prompt.txt > 1-brief/brief-01.render.txt
|
|
94
|
+
kk music gen --in 1-brief/brief-01.yaml --out 3-takes/content-01.json --takes 1 --yes
|
|
95
|
+
kk music check 3-takes/<take> --style "<the brief's style text>" --sections <structure length>
|
|
96
|
+
kk music analyze <instanceId> --json > 3-takes/analysis-<instanceId>.json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`render`, `presets`, `library`, `check` and `master` are free. `gen` and `analyze` are **paid**: both
|
|
100
|
+
print the spend estimate first, both refuse without `--yes`, and a repeat of an already-paid take is
|
|
101
|
+
refused unless `--force --reason <text>` is passed (0400's dedupe, scoped to the run directory).
|
|
102
|
+
|
|
103
|
+
## The instance's real limits
|
|
104
|
+
|
|
105
|
+
Music is single-turn: one request, one take, no session to steer. The table is the contract — an agent
|
|
106
|
+
must not promise any of the left column, and must not write a brief that assumes it.
|
|
107
|
+
|
|
108
|
+
| Constraint id | Never promise | What is true | Do instead |
|
|
109
|
+
| --- | --- | --- | --- |
|
|
110
|
+
| `prompt-is-the-only-control-surface` | "set the BPM/key/section to …" as a parameter | There is no tempo, key, structure, vocal or duration parameter. The prompt text is the only control surface; `duration_target`, `lyrics` and `language` travel as request fields the instance owns | Write tempo/key/instrumentation/vocal character into `style`, and sections into `structure` (`[m:ss] Section — note` lines) |
|
|
111
|
+
| `duration-is-a-target` | an exact duration ("make it 30.0 s") | `duration_target` is prose to the model. Pro takes are checked at ±20% **or ±10 s, whichever is larger** — a `0:30` target accepts `0:20–0:40` (`plugins/generations/music-gen/src/audio/checks.ts` `PRO_DURATION_TOLERANCE_RATIO`/`_FLOOR_SECONDS`), and a take may still miss either way | State the target, then read `duration.target` in `checks.json` and iterate if it missed |
|
|
112
|
+
| `clip-is-not-a-pro-preview` | "render a Clip first to preview the Pro take" | `clip` is a **different model** (`lyria-3-clip-preview` vs `lyria-3-pro-preview`), fixed at about 30 s, and it ignores duration language. Nothing documents that a Clip render predicts a Pro render; it cannot show arrangement, section timing or lyrics past 0:30 | Author each direction in the **format's own model**; exploring with Clip and promoting to Pro is not on offer |
|
|
113
|
+
| `no-negative-prompt` | "add `negative_prompt` / exclude X programmatically" | There is no `negative_prompt` field anywhere in the request. Exclusions are prompt text | Put them in `avoid:` — rendered as one `Avoid: a, b` segment, merged with the theme's own list |
|
|
114
|
+
| `every-take-is-a-new-paid-request` | "re-roll just the chorus", "it's free to try again" | Each take is a separate **paid, non-idempotent** request (Pro `$0.08`, Clip `$0.04` per `music.prices`); `takes: N` is N sequential requests, never one batch | Say the spend out loud before `--yes`, and count directions × iterations as the budget |
|
|
115
|
+
| `no-in-place-edit` | "edit the section in place", "extend it", "swap the second verse" | There is no edit, extend, cover or remix route, and a generated take is **immutable**. A section "edit" is a full re-generation from a new brief | Write the change as a new brief (`iterate`) and take a new take; keep the old artifact as evidence |
|
|
116
|
+
|
|
117
|
+
Consequences that follow, and that a brief must not contradict: `instrumental: true` plus non-blank
|
|
118
|
+
lyrics is a parse error; a `structure` timestamp must be non-decreasing `m:ss`; `duration_target`
|
|
119
|
+
outside `0:05–3:00` is rejected before any paid request; an unknown `format`/`theme` is a resolution
|
|
120
|
+
error, not a default.
|
|
121
|
+
|
|
122
|
+
## Operations
|
|
123
|
+
|
|
124
|
+
### brief
|
|
125
|
+
|
|
126
|
+
Turn the idea into one brief per direction, resolve it, and stop at the approval gate. **No paid
|
|
127
|
+
request happens in this operation.**
|
|
128
|
+
|
|
129
|
+
1. **Prerequisite** — read `idea.md`, else `--topic`. Both missing → stop asking for one.
|
|
130
|
+
2. **Resume** — `1-brief/brief-<nn>.yaml` exists → reuse it verbatim; without `--force` stop before
|
|
131
|
+
replacing it ("brief exists at `<path>`; pass `--force` to replace, or `iterate` for a new one").
|
|
132
|
+
3. **Author** `--directions` differentiated briefs (`brief-01`, `brief-02`, …) in the 0397 authoring
|
|
133
|
+
form: `title`, `format`, `theme`, optional `model`, `duration_target`, `language`, `instrumental`,
|
|
134
|
+
`audio_format`, `style` (the technical direction — genre, BPM, key, instrumentation, vocal
|
|
135
|
+
character, production), `avoid` (exclusions that the theme does not already carry), `structure`
|
|
136
|
+
(timestamped sections), optional `lyrics`, `takes: 1`. Unknown keys are rejected at parse time, so
|
|
137
|
+
never invent a field.
|
|
138
|
+
4. **Resolve and prove it** —
|
|
139
|
+
`kk music render --in 1-brief/brief-<nn>.yaml --out 1-brief/brief-<nn>.prompt.txt` with stdout into
|
|
140
|
+
`…render.txt`. Render is the schema gate: a brief that does not parse, or names an unknown
|
|
141
|
+
preset, fails here and costs nothing. Read the prompt back — it is the whole of what the model will
|
|
142
|
+
see.
|
|
143
|
+
5. **Gate** — present each direction with its prompt text, model, `duration_target` and the
|
|
144
|
+
per-direction spend, and **wait for explicit operator approval**. Nothing about a direction may
|
|
145
|
+
change after approval without a new brief number.
|
|
146
|
+
6. **Report** the brief paths, the prompt paths and the spend shape (`directions × unit price`) and
|
|
147
|
+
stop. Never start a paid take from this operation.
|
|
148
|
+
|
|
149
|
+
### lyric
|
|
150
|
+
|
|
151
|
+
Author the lyric text as tagged sections and fold it into the brief. **No paid request here either.**
|
|
152
|
+
|
|
153
|
+
1. **Prerequisite** (fail loud) — an approved brief must exist; a `--instrumental` brief may not carry
|
|
154
|
+
lyrics → stop and say so.
|
|
155
|
+
2. **Resume** — `2-lyrics.md` exists → reuse it; `--revise <feedback>` redrafts it, `--force`
|
|
156
|
+
replaces it. Without either, stop before overwriting.
|
|
157
|
+
3. **Write** `2-lyrics.md`: `[Intro]` / `[Verse]` / `[Chorus]` / `[Bridge]` / `[Outro]` tags that
|
|
158
|
+
match the brief's `structure` sections, one section at a time, in `--language`. Keep syllable
|
|
159
|
+
shapes consistent inside a section and put the hook line where the structure says the hook lives.
|
|
160
|
+
Add a short `Prosody:` line per section (line count, stress pattern, any deliberate rhyme scheme)
|
|
161
|
+
so an iterate can name what to change.
|
|
162
|
+
4. **Fold in** — set the brief's `lyrics: |-` block to the same section text and re-run
|
|
163
|
+
`kk music render` for that brief. Lyrics are a **request field, not prompt text**, so the prompt
|
|
164
|
+
file does not change; the take digest does, which is what makes a lyric change a new legitimate
|
|
165
|
+
take rather than a dedupe hit.
|
|
166
|
+
5. **Gate** — present the lyric text with its tags, language and prosody notes; **wait for approval or
|
|
167
|
+
a bounded revision** (at most 3 `--revise` rounds; after the bound, stop and require an explicit
|
|
168
|
+
operator decision — never loop past it).
|
|
169
|
+
6. **Report** the lyric path and which brief number it was folded into.
|
|
170
|
+
|
|
171
|
+
### iterate
|
|
172
|
+
|
|
173
|
+
Turn what the last take got wrong into the **next brief**, and take exactly one new take of it. This
|
|
174
|
+
is the paid loop, and it is bounded.
|
|
175
|
+
|
|
176
|
+
1. **Prerequisite** (fail loud) — an approved brief, a take on disk and the take's `checks.json` must
|
|
177
|
+
exist. Iterating on an unmeasured take is guessing; run `kk music check` first.
|
|
178
|
+
2. **Read the evidence, not the vibe** — cite the row you are reacting to: `duration.target`
|
|
179
|
+
(measured vs the band), `silence.leading`/`trailing`, and the warn-only `analysis.bpm`,
|
|
180
|
+
`analysis.key`, `analysis.sections` agreement rows. A section "edit" is a **full re-generation**:
|
|
181
|
+
there is nothing to patch in the artifact, so the directive must change the brief that produces
|
|
182
|
+
the next whole take.
|
|
183
|
+
3. **Write the next brief** — copy brief `<nn>` to `brief-<nn+1>.yaml` and change only what the
|
|
184
|
+
directive names: `structure` timestamps and section notes for arrangement, `style` prose for
|
|
185
|
+
tempo/key/instrumentation/vocal character, `avoid` for a production artefact, `duration_target` for
|
|
186
|
+
a length miss, `lyrics` for a line. Never reuse a brief number, never overwrite an approved brief.
|
|
187
|
+
4. **Re-render and confirm the change is visible** —
|
|
188
|
+
`kk music render --in 1-brief/brief-<nn+1>.yaml --out 1-brief/brief-<nn+1>.prompt.txt`; diff the
|
|
189
|
+
prompt against the previous one. An iterate whose prompt is byte-identical changes nothing and
|
|
190
|
+
will be refused as a duplicate request.
|
|
191
|
+
5. **Gate** — present the directive, the prompt diff and the spend for one take, and **wait for
|
|
192
|
+
approval**. Then one take:
|
|
193
|
+
`kk music gen --in 1-brief/brief-<nn+1>.yaml --out 3-takes/content-<nn+1>.json --takes 1 --yes`,
|
|
194
|
+
then `kk music check` on the new take.
|
|
195
|
+
6. **Resume** — a take whose sidecar exists is adopted, not re-paid: re-running `gen` for that brief
|
|
196
|
+
is refused by 0400's dedupe (digest + take index, scoped to the run directory). Re-pay only with
|
|
197
|
+
`--force --reason "<why>"`, which the sidecar records; never repeat a paid take silently. At most
|
|
198
|
+
**3 iterate rounds** per run; after that stop and report the residue.
|
|
199
|
+
|
|
200
|
+
### review
|
|
201
|
+
|
|
202
|
+
Assemble **one** judge bundle and hand it to `kk:content-judge` with the `music-quality` rubric. The
|
|
203
|
+
judge reads measurements; it never re-derives them.
|
|
204
|
+
|
|
205
|
+
1. **Prerequisite** (fail loud) — brief `<nn>`, its prompt text, the take, its `.take.json` sidecar,
|
|
206
|
+
the instance analysis and the take's `checks.json` must all exist. A missing input is a stop with
|
|
207
|
+
the exact missing path, never a bundle with a hole in it. If `checks.json` carries a `fail`,
|
|
208
|
+
**stop before judging**: the take is not judgeable (a missing `analysis.present` row means the
|
|
209
|
+
analyze step has not reached the check yet — run `kk music analyze` for that instance id and
|
|
210
|
+
re-run `kk music check`).
|
|
211
|
+
2. **Assemble** `4-judge-input.md` — the bundle contract in `references/judge-input.md`: the brief
|
|
212
|
+
YAML, the kk prompt text, the lyrics, the instance analysis and `checks.json` **verbatim**, in that
|
|
213
|
+
order, plus a provenance block (take path, `content_ref`, digest, instance id, model, spend).
|
|
214
|
+
Verbatim means pasted, not summarised, and never re-typed: measurements are only trustworthy if
|
|
215
|
+
they are the file the tool wrote.
|
|
216
|
+
3. **Dispatch the judge** — `Skill(skill="kk:content-judge")` with `rubric: music-quality`,
|
|
217
|
+
`content_path: 4-judge-input.md`, `content_ref: <take path>`, `verdict_path:
|
|
218
|
+
4-verdict-music.json`. The rubric lives at
|
|
219
|
+
`plugins/kk/skills/content-judge/references/music-quality-rubric.md`; the verdict is the existing
|
|
220
|
+
contract — `verdict`, `confidence`, `rubric: "music-quality"`, `findings[].criterion`, `content_ref`
|
|
221
|
+
— with no new field, no second verdict file.
|
|
222
|
+
4. **Gate** — route on the verdict, and say the routing out loud: `PASS` (with a `HIGH`/`MEDIUM`/
|
|
223
|
+
`LOW` confidence — the gate refuses a `PASS` without one) → the take may go to `kk music master`;
|
|
224
|
+
`NEEDS_REVISION` → exactly one more `iterate` round if the budget allows, quoting the verdict's
|
|
225
|
+
`feedback`; `FAIL` → stop, surface the finding, and re-brief. The verdict is the deliverable even
|
|
226
|
+
when it blocks.
|
|
227
|
+
5. **Resume** — `4-judge-input.md` whose inputs are unchanged (same digest, same checks file) is
|
|
228
|
+
reused as-is; if any input changed, rebuild it in full. Never hand-edit a bundle or a verdict to
|
|
229
|
+
change an outcome — a `fail` row is a measurement, not an opinion.
|
|
230
|
+
|
|
231
|
+
## The judge bundle
|
|
232
|
+
|
|
233
|
+
Five verbatim inputs, one provenance block, one path passed to the judge — see
|
|
234
|
+
`references/judge-input.md` for the template, the section ids and the assembly commands.
|
|
235
|
+
|
|
236
|
+
| Section id | Content | Source |
|
|
237
|
+
| --- | --- | --- |
|
|
238
|
+
| `brief` | the `MusicBrief` YAML of the judged take | `1-brief/brief-<nn>.yaml` |
|
|
239
|
+
| `prompt` | the kk-rendered prompt text the model receives | `1-brief/brief-<nn>.prompt.txt` |
|
|
240
|
+
| `lyrics` | the lyric text and language, or "instrumental / model-authored, not in the bundle" | `2-lyrics.md`, brief `language` |
|
|
241
|
+
| `analysis` | the instance analysis object for that instance id | `3-takes/analysis-<instanceId>.json` |
|
|
242
|
+
| `checks` | `checks.json` verbatim — the measured facts, each row with `unit` and `source` | `<take>.checks.json` |
|
|
243
|
+
| `provenance` | take path, digest, instance id, model, unit price spent, run id | `<take>.take.json` |
|
|
244
|
+
|
|
245
|
+
## Spend
|
|
246
|
+
|
|
247
|
+
| Verb | Paid | Guard |
|
|
248
|
+
| --- | --- | --- |
|
|
249
|
+
| `render` / `presets` / `library` / `check` / `master` | no | never opens a socket (`check`/`master` spawn local ffmpeg only) |
|
|
250
|
+
| `gen` | yes — per take | estimate printed, `--yes` required, `music.takesCap` (default 2, max 4), digest dedupe, `--force --reason` to re-pay |
|
|
251
|
+
| `analyze` | yes — per instance id | estimate printed, `--yes` required, cache-first on the instance (a cached analysis is free) |
|
|
252
|
+
|
|
253
|
+
Budget a run as `directions × unit price + iterations × unit price`. Say the number before asking
|
|
254
|
+
for `--yes`; `KK_MUSIC_DRY_RUN=1` is the free rehearsal path (offline adapter, zero network, a silent
|
|
255
|
+
1-second WAV that will fail `duration.*` — that is the adapter, not a real take).
|
|
256
|
+
|
|
257
|
+
## Resume an existing run directory
|
|
258
|
+
|
|
259
|
+
- **Never re-pay** — a take with a sidecar is adopted. The dedupe is scoped to the run directory, so
|
|
260
|
+
the same brief in another run directory is a legitimate re-roll.
|
|
261
|
+
- **Never overwrite** an approved brief, lyric sheet or verdict without `--force` (verdicts: never).
|
|
262
|
+
- **Never re-author** a step whose artifact exists and is approved; report it as final instead.
|
|
263
|
+
- Resume point by operation: `brief` → the highest existing `brief-<nn>.yaml`; `lyric` → `2-lyrics.md`;
|
|
264
|
+
`iterate` → the highest brief **and** a `checks.json` for its take; `review` → rebuild
|
|
265
|
+
`4-judge-input.md` if any input is newer than it, else reuse it.
|
|
266
|
+
|
|
267
|
+
## References
|
|
268
|
+
|
|
269
|
+
- **`references/judge-input.md`** — the `4-judge-input.md` bundle contract, section ids and the exact
|
|
270
|
+
assembly commands.
|
|
271
|
+
- `plugins/kk/skills/content-judge/references/music-quality-rubric.md` — the `music-quality` rubric
|
|
272
|
+
this skill's `review` operation hands over.
|
|
273
|
+
- `plugins/generations/music-gen/README.md` — the `MusicBrief` authoring form and the preset index
|
|
274
|
+
(the only schema is `plugins/generations/music-gen/src/brief.ts`).
|
|
275
|
+
- `docs/design/music-gen.md` — the wire contract, render order, resolution precedence and the
|
|
276
|
+
provenance of every instance fact quoted in "The instance's real limits".
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# `4-judge-input.md` — the judge bundle contract
|
|
2
|
+
|
|
3
|
+
The `review` operation writes **one** file and the judge step is given **one** path. Everything the
|
|
4
|
+
judge needs is in it, verbatim, so the judge cannot re-derive a measurement, re-read the instance or
|
|
5
|
+
"remember" a number it was never shown.
|
|
6
|
+
|
|
7
|
+
Written by: `review` (this skill). Read by: `kk:content-judge` with `rubric: music-quality`
|
|
8
|
+
(`plugins/kk/skills/content-judge/references/music-quality-rubric.md`).
|
|
9
|
+
|
|
10
|
+
## Required sections (in this order, these ids)
|
|
11
|
+
|
|
12
|
+
| Section id | Heading | Content | Source file |
|
|
13
|
+
| --- | --- | --- | --- |
|
|
14
|
+
| `brief` | `## 1. brief` | the `MusicBrief` YAML of the judged take, **verbatim**, in a `yaml` fence | `1-brief/brief-<nn>.yaml` |
|
|
15
|
+
| `prompt` | `## 2. prompt` | the kk-rendered prompt text the model received, **verbatim**, in a `text` fence | `1-brief/brief-<nn>.prompt.txt` |
|
|
16
|
+
| `lyrics` | `## 3. lyrics` | the lyric text with its section tags, **verbatim**, in a `text` fence, plus the brief's `language`; when the brief is instrumental say `instrumental brief — no lyric text is sent`; when the model wrote its own, say `model-authored lyrics are not in the bundle` | `2-lyrics.md`, brief `language` |
|
|
17
|
+
| `analysis` | `## 4. analysis` | the instance analysis object for this take, **verbatim**, in a `json` fence | `3-takes/analysis-<instanceId>.json` |
|
|
18
|
+
| `checks` | `## 5. checks` | `<take>.checks.json`, **verbatim**, in a `json` fence — every row with `id`, `measured`, `threshold`, `unit`, `source`, `result` | `<take>.checks.json` |
|
|
19
|
+
| `provenance` | `## 6. provenance` | take path (`content_ref`), `<take>.take.json` digest, instance id, model, unit price spent, run id, and the checks-file path | `<take>.take.json` |
|
|
20
|
+
|
|
21
|
+
Rules:
|
|
22
|
+
|
|
23
|
+
- **Verbatim means pasted.** No summarising, no re-typing, no "≈", no unit conversion, no rounding.
|
|
24
|
+
If a file is missing, the bundle is not written: `review` stops naming the missing path.
|
|
25
|
+
- **One take per bundle.** The judged take is the one the select gate picked; other takes stay on disk
|
|
26
|
+
as evidence but do not enter the bundle — a judge that has to pick cannot also be the picker.
|
|
27
|
+
- **`checks` is the measurement authority.** A finding that cites duration, silence, BPM, key, section
|
|
28
|
+
count or delivery loudness quotes the row from section 5 with its `unit` and `source`.
|
|
29
|
+
- **Never hand-edited.** The bundle is generated from the files, so the only way to change it is to
|
|
30
|
+
change an input and rebuild.
|
|
31
|
+
|
|
32
|
+
## Template
|
|
33
|
+
|
|
34
|
+
````markdown
|
|
35
|
+
# Music judge input — <title> / brief <nn>
|
|
36
|
+
|
|
37
|
+
Judged take: <take path> → content_ref
|
|
38
|
+
Rubric: music-quality
|
|
39
|
+
Verdict path: 4-verdict-music.json
|
|
40
|
+
|
|
41
|
+
Every number in this bundle comes from section 5 (`checks.json`) with the `unit` and `source` it was
|
|
42
|
+
recorded with. The take's audio is not attached: nothing here may be graded by ear.
|
|
43
|
+
|
|
44
|
+
## 1. brief
|
|
45
|
+
```yaml
|
|
46
|
+
<1-brief/brief-<nn>.yaml verbatim>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 2. prompt
|
|
50
|
+
```text
|
|
51
|
+
<1-brief/brief-<nn>.prompt.txt verbatim>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 3. lyrics
|
|
55
|
+
Language: <language>
|
|
56
|
+
```text
|
|
57
|
+
<2-lyrics.md verbatim | instrumental brief — no lyric text is sent | model-authored lyrics are not in the bundle>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 4. analysis
|
|
61
|
+
```json
|
|
62
|
+
<3-takes/analysis-<instanceId>.json verbatim>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 5. checks
|
|
66
|
+
```json
|
|
67
|
+
<<take>.checks.json verbatim>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 6. provenance
|
|
71
|
+
- content_ref: `<take path>`
|
|
72
|
+
- checks: `<take>.checks.json`
|
|
73
|
+
- sidecar: `<take>.take.json`
|
|
74
|
+
- digest: `<sha256 from the sidecar>`
|
|
75
|
+
- instanceId: `<id>`
|
|
76
|
+
- model: `pro | clip`
|
|
77
|
+
- unitPrice: `<from the sidecar>`
|
|
78
|
+
- runId: `<run id, when the sidecar carries one>`
|
|
79
|
+
````
|
|
80
|
+
|
|
81
|
+
## Assembly
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
nn=01; take=3-takes/<slug>-<model>-<instanceId>.wav; id=<instanceId>
|
|
85
|
+
{
|
|
86
|
+
printf '# Music judge input — %s / brief %s\n\n' "$(sed -n 's/^title: //p' 1-brief/brief-$nn.yaml)" "$nn"
|
|
87
|
+
printf 'Judged take: %s\nRubric: music-quality\nVerdict path: 4-verdict-music.json\n\n' "$take"
|
|
88
|
+
printf '## 1. brief\n\n```yaml\n'; cat 1-brief/brief-$nn.yaml; printf '```\n\n'
|
|
89
|
+
printf '## 2. prompt\n\n```text\n'; cat 1-brief/brief-$nn.prompt.txt; printf '```\n\n'
|
|
90
|
+
printf '## 3. lyrics\n\nLanguage: %s\n\n```text\n' "$(sed -n 's/^language: //p' 1-brief/brief-$nn.yaml)"
|
|
91
|
+
cat 2-lyrics.md 2>/dev/null || printf 'instrumental brief — no lyric text is sent\n'; printf '```\n\n'
|
|
92
|
+
printf '## 4. analysis\n\n```json\n'; cat 3-takes/analysis-$id.json; printf '```\n\n'
|
|
93
|
+
printf '## 5. checks\n\n```json\n'; cat "$take.checks.json"; printf '```\n\n'
|
|
94
|
+
printf '## 6. provenance\n\n'; grep -E '"(digest|instanceId|model|unitPrice|runId)"' "$take.take.json"
|
|
95
|
+
} > 4-judge-input.md
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The same assembly is a `kk-music` state once 0403 wires it; the skill owns the contract either way, so
|
|
99
|
+
an operator and the workflow produce the same file. When 0403 lands, run its state rather than the
|
|
100
|
+
script above — and check that the file it writes still carries sections 1–6.
|
|
101
|
+
|
|
102
|
+
## Hand-off to the judge
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
Skill(skill="kk:content-judge")
|
|
106
|
+
rubric: music-quality
|
|
107
|
+
content_path: <run_dir>/4-judge-input.md
|
|
108
|
+
content_ref: <run_dir>/<take path>
|
|
109
|
+
verdict_path: <run_dir>/4-verdict-music.json
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The `agent.run` prompt in 0403 passes `judge-input.md`'s path and nothing else; a prompt that also
|
|
113
|
+
pastes the brief or the rows is a second, drifting copy of the bundle.
|
|
114
|
+
|
|
115
|
+
Exit rules for the consuming gate (unchanged contract, `plugins/kk/workflows/judge-gated-publish-example.yaml`):
|
|
116
|
+
`PASS` with `confidence` in `HIGH|MEDIUM|LOW` may proceed; `PASS` without one is refused; `FAIL` and
|
|
117
|
+
`NEEDS_REVISION` block `master` (the latter may spend one `iterate` round when the budget allows).
|