@gobing-ai/knowledge-kit 0.1.19 → 0.1.22
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 +1315 -264
- package/dist/board/itc/index.js +1 -0
- package/dist/index.js +14674 -8775
- 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/image-gen/README.md +31 -31
- package/plugins/generations/image-gen/assets/sample/provenance.json +314 -0
- package/plugins/generations/image-gen/config.example.yaml +3 -0
- package/plugins/generations/image-gen/dist/index.js +154 -14
- package/plugins/generations/image-gen/presets/SOURCE.md +65 -0
- package/plugins/generations/image-gen/scripts/eval-style-presets.ts +513 -0
- package/plugins/generations/image-gen/scripts/gen-samples.ts +57 -7
- package/plugins/generations/image-gen/src/presets.ts +6 -5
- package/plugins/generations/image-gen/src/providers/h3-local.ts +196 -0
- package/plugins/generations/image-gen/src/providers/types.ts +11 -1
- package/plugins/generations/music-gen/README.md +277 -0
- package/plugins/generations/music-gen/dist/index.js +23544 -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 +31 -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 +30 -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 +904 -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 +918 -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/kk/config.example.yaml +3 -0
- package/plugins/kk/decisions/extract/ai-news.yaml +5 -2
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/daily-ai-voice.json +48 -7
- package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +2 -1
- 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 +897 -34
- package/plugins/kk/scripts/episode-identity.ts +180 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +37 -1
- package/plugins/kk/scripts/music-stages.ts +624 -0
- package/plugins/kk/scripts/news-editorial-ledger.ts +906 -0
- 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/image-authoring/SKILL.md +7 -3
- package/plugins/kk/skills/image-authoring/references/providers.md +27 -0
- package/plugins/kk/skills/image-authoring/references/style-extraction.md +1 -1
- 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/skills/publish/SKILL.md +11 -0
- package/plugins/kk/skills/web-automation/SKILL.md +31 -1
- package/plugins/kk/workflows/kk-collect.yaml +8 -4
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +10 -9
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +11 -9
- package/plugins/kk/workflows/kk-music.yaml +328 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +58 -3
- 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 +54 -7
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +43 -6
- package/plugins/publishings/linkedin-pub/src/index.ts +52 -6
- 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 +437 -32
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +14 -2
- package/plugins/publishings/shipinhao-pub/plugin.json +1 -1
- package/plugins/publishings/shipinhao-pub/src/audio-flow.ts +492 -0
- package/plugins/publishings/shipinhao-pub/src/flow.ts +227 -12
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +13 -0
- 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 +122 -28
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +7 -3
- package/plugins/publishings/surfdash-pub/src/index.ts +159 -25
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +37 -4
- package/plugins/publishings/threads-pub/dist/index.js +9206 -296
- package/plugins/publishings/threads-pub/dist/profile-check.js +21149 -0
- package/plugins/publishings/threads-pub/package.json +3 -1
- package/plugins/publishings/threads-pub/plugin.json +6 -1
- package/plugins/publishings/threads-pub/src/index.ts +8 -1
- package/plugins/publishings/threads-pub/src/post-rail.ts +357 -0
- package/plugins/publishings/threads-pub/src/profile-check.ts +17 -0
- package/plugins/publishings/wechatmp-pub/dist/index.js +18 -1
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/wechatmp-pub/src/flow.ts +13 -0
- package/plugins/publishings/weibo-pub/dist/index.js +57 -3
- package/plugins/publishings/weibo-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/weibo-pub/src/index.ts +74 -2
- package/plugins/publishings/x-pub/dist/index.js +274 -44
- package/plugins/publishings/x-pub/dist/profile-check.js +14 -2
- package/plugins/publishings/x-pub/src/index.ts +15 -1
- package/plugins/publishings/x-pub/src/post-rail.ts +334 -0
- 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,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).
|
|
@@ -33,6 +33,7 @@ discovery.
|
|
|
33
33
|
| `curate --fix` | QC candidates `Doc[]` + curate validator errors (`--fix`) → corrected plan + exclusions | Wired (`curate-fix`) |
|
|
34
34
|
| `write` | translated plan `Doc[]` + exclusions (`--excluded`) → master script plan JSON | Wired (`script-write`) |
|
|
35
35
|
| `write --fix` | plan `Doc[]` + previous script plan + validator errors → corrected master script plan | Wired (`script-write-fix`) |
|
|
36
|
+
| `align` | selected items + judgment ledger snapshot → structured judgment proposal (may be empty) | Wired (`plugins/kk/scripts/news-editorial-ledger.ts` — `commitAlignment` validates and commits it, 0384) |
|
|
36
37
|
|
|
37
38
|
## Shared rules (every mode)
|
|
38
39
|
|
|
@@ -40,15 +41,33 @@ Read `references/style-contract.zh.md` first. Its prose sets the column's identi
|
|
|
40
41
|
opinion and technical detail. Its fenced `json` block holds the caps and banned phrases that the dailynews-gen
|
|
41
42
|
validator enforces mechanically, so violating them means the plan is rejected.
|
|
42
43
|
|
|
43
|
-
1. **News first.** Every item tells the listener who (company, lab,
|
|
44
|
-
raised, sued, disclosed) and when.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
1. **News first, for a white-collar listener (0385 R1).** Every item tells the listener who (company, lab,
|
|
45
|
+
team) did what (released, open-sourced, raised, sued, disclosed) and when. Order by timeliness and by impact
|
|
46
|
+
on a listener who is not an engineer — what they can use, what it costs, whether it changes how they work;
|
|
47
|
+
research detail and pure implementation news go last or get one sentence. Explain necessary jargon in a
|
|
48
|
+
plain clause ("也就是说……") before the term, never in a tutorial. The deep dive (full mechanism, tooling
|
|
49
|
+
comparison, systematic evaluation) belongs to the weekly, not to the daily. Commentary is restrained and
|
|
50
|
+
anchored to that item; technical detail is only the one or two sentences needed to understand it.
|
|
51
|
+
2. **Topic boundary (选题边界, calibrated 2026-11-18 / task 0392).** Exclude an item only when `AI 产业` is not
|
|
52
|
+
its mainline. Out of scope: (a) the confirmed platform hard line in `plugins/kk/scripts/topic-boundary.json`
|
|
53
|
+
(the top-leadership rule and the future-dated check) — the deterministic stage already drops those, never
|
|
54
|
+
re-admit them; (b) a story whose mainline is partisan politics, an armed conflict or a non-AI crime/accident,
|
|
55
|
+
i.e. the AI angle is only the nickname; (c) an item with no usable AI-industry fact.
|
|
56
|
+
**In scope** — report normally, do not exclude: AI regulation and legislation, model/product liability and
|
|
57
|
+
litigation, export controls and procurement that decide AI capacity, standards and safety enforcement, and
|
|
58
|
+
company, lab, market and technical news. A public-policy story whose subject IS an AI system, model or vendor
|
|
59
|
+
is in scope even though it reads as policy; only the story whose subject is the political actor is out.
|
|
60
|
+
Record the exclusion with a Chinese reason naming the class from (a)-(c) and the sentence that shows it —
|
|
61
|
+
"感觉不合适" is not a reason. (0385 applied this decision as the editorial projection; the policy below is
|
|
62
|
+
binding.) Calibration samples live in `plugins/kk/tests/fixtures/topic-selection-cases.json`.
|
|
63
|
+
3. **Fact discipline (0385 R2).** Keep attributable fact, commentary and unverified inference visibly
|
|
64
|
+
separate in the copy, so a listener hears which sentence is which. Every fact comes from that item's own plan
|
|
65
|
+
content. Do not invent anything or borrow from other items. Never inflate numbers or actors. Attribute a
|
|
66
|
+
quote only to its original speaker, and attribute a commercial claim (funding amount, user count,
|
|
67
|
+
performance gain, compliance status) to the party that made it ("公司称") when nobody independent
|
|
68
|
+
corroborates it. Unverified inference has exactly two legal shapes — explicit attribution (据报道 / 当事人称 /
|
|
69
|
+
公司未证实) or omission. Keep hedges (据报道 / 称 / 承诺); never add scaffold hedges (读者宜另行核实 /
|
|
70
|
+
仍待验证) to look careful. If the material is thin, write less — omission is the default, not a softening.
|
|
52
71
|
4. **Copy discipline.** Use reader-facing spoken Chinese. Do not use scaffold labels (可做角度 / 背景 /
|
|
53
72
|
潜在影响) or hedge labels (读者宜另行核实 / 仍待验证), use 「」 for quotes, and never add a greeting,
|
|
54
73
|
sign-off or AI-production footer. The builder adds those.
|
|
@@ -58,15 +77,30 @@ validator enforces mechanically, so violating them means the plan is rejected.
|
|
|
58
77
|
Read the curated plan `Doc[]` (`--in`) and the curate exclusions (`--excluded`). For each doc in `--in`, write:
|
|
59
78
|
|
|
60
79
|
- `lead`: one spoken bridge into the item (≤80 chars). It is not the title and not a rhetorical question.
|
|
61
|
-
- `insight
|
|
80
|
+
- `insight` (optional; omitting it and writing `""` are the same thing — both validate, and the builder and the
|
|
81
|
+
renderer skip only the comment sentence, never the item): 2–4 sentences (≤380 chars) anchored to the doc's named actors, saying why it matters or what to watch. At most one sentence of commentary is required for a short item — leave the field as a single sentence, or omit the comment entirely when the item needs no judgement. Never restate the doc's facts, numbers or phrasing (the listener has just heard them), give no generic advice or methodology, and add no new facts. The cap is a ceiling, not a target.
|
|
62
82
|
- `card`: optional per-item card slot `{ "copy": "≤12字标题", "points": ["要点1", "要点2"], "subject": "English visual scene" }` (2–4 points).
|
|
63
83
|
|
|
64
84
|
At the episode level, write:
|
|
65
85
|
|
|
66
|
-
- `intro` (≤150 chars):
|
|
67
|
-
|
|
86
|
+
- `intro` (≤150 chars): one short greeting (the builder's fixed line) plus one or two points only — name the top
|
|
87
|
+
one or two concrete in-scope developments, then get to the first story. No opening thesis, no agenda list.
|
|
88
|
+
- `outro` (≤150 chars): a short close. The cross-item synthesis lives here and only when the day genuinely has
|
|
89
|
+
a common thread: scale it by value and running time, or drop it and close in one sentence.
|
|
68
90
|
- `excluded`: copy the array from `--excluded` (`21-plan/<date>_03_curate_excluded.json`) verbatim so the script plan records every dropped candidate with its Chinese reason.
|
|
69
|
-
-
|
|
91
|
+
- Episode identity (0385 R4): the Chinese publish title is `第<YYMMDD>期 · 当日要点` from the frozen episode date
|
|
92
|
+
and ONE point, and the cover headline reuses that same point (`plugins/kk/scripts/episode-identity.ts` freezes
|
|
93
|
+
it; `daily-editorial-render` stamps it, `publish-prep` refuses to publish when admission removed the point's
|
|
94
|
+
supporting source). Never invent a second title for a channel.
|
|
95
|
+
- `cover`: either one concrete visual scene in English (a plain string, ≤240 chars: objects, settings, symbols, metaphor; no text, letters, numbers, logos, flags, or recognizable people) or — required for the 0385 R4 title — the object form
|
|
96
|
+
`{ "scene": "…", "headline": "…", "sourceIds": ["<plan item id>"] }`:
|
|
97
|
+
- `headline` (required, ≤25 chars): the 当日要点 the episode title freezes — one line, the day's most important
|
|
98
|
+
development in plain language, no date/issue/column name. The title prefix supplies the rest.
|
|
99
|
+
- `scene` (optional for validation, but then the cover image falls back to the default subject): same English
|
|
100
|
+
visual contract as the string form.
|
|
101
|
+
- `sourceIds` (optional): the plan item id(s) the point rests on — normally the lead. Name them so that when
|
|
102
|
+
admission drops every one of them the point is withheld instead of being published unsupported. Omitting
|
|
103
|
+
`sourceIds` means "the admitted lead", which is the usual case.
|
|
70
104
|
- `cards`: `{ "title": "≤20字总标题", "body": "中文导语段落 + 3-5个话题标签" }` for the episode card series.
|
|
71
105
|
- `social`: `{ "short": "≤140字 X/Threads 短帖", "long": "≤500字 微博/LinkedIn 长帖" }` (plain text, no markdown headings, no emoji spam, grounded in the plan).
|
|
72
106
|
|
|
@@ -77,7 +111,7 @@ Output:
|
|
|
77
111
|
"version": 1,
|
|
78
112
|
"intro": "…",
|
|
79
113
|
"outro": "…",
|
|
80
|
-
"cover": { "scene": "…", "headline": "…" },
|
|
114
|
+
"cover": { "scene": "…", "headline": "…", "sourceIds": ["…"] },
|
|
81
115
|
"cards": { "title": "…", "body": "…" },
|
|
82
116
|
"social": { "short": "…", "long": "…" },
|
|
83
117
|
"items": [
|
|
@@ -106,7 +140,16 @@ validator). Change only what the errors name and copy everything else unchanged.
|
|
|
106
140
|
| `redundant-insight` | Rewrite the insight as commentary; drop the restated facts |
|
|
107
141
|
| `duplicate-insight` | Make each insight specific to its own item |
|
|
108
142
|
| `missing-item` / `unknown-id` / `conflict-id` | Make `items` match `--in` and `excluded` match `--excluded` with no overlap |
|
|
109
|
-
| `schema` / `missing-plan` |
|
|
143
|
+
| `schema` / `missing-plan` | Re-emit the whole plan per mode `write` — the fields the validator requires are `version: 1`, non-empty `intro`/`outro`, `items[]` each with `id` + `lead` (`insight` may be omitted or `""`), and `cover` as a string scene **or** the object `{ "scene": …, "headline": … }`. A `cover` that is only a string freezes no point, so the canonical title falls back to the legacy one |
|
|
144
|
+
| `r3:commentary-repeat` / `r3:commentary-in-facts` | Keep at most one 第一人称评论 marker (`我看`/`我觉得`/`我认为`/`在我看来`/`个人觉得`) per item, and move it into `insight` — a `lead` is the fact sentence |
|
|
145
|
+
| `r3:insight-multi-sentence` | Cut the comment back to one sentence: keep the judgement, drop the extra clauses |
|
|
146
|
+
| `r3:unattributed-claim` | Name the source in that same sentence (`据路透社报道`, `公司称`, `财报显示`, a link) or drop the figure/superlative |
|
|
147
|
+
| `r2:unexplained-jargon` | Gloss the term in the same sentence (`也就是说…`, `——也就是…`, or a 括号 explanation) or drop the term |
|
|
148
|
+
|
|
149
|
+
The `r2:`/`r3:` rows above are the **advisory** editorial findings (0385 AC R2/R3) that
|
|
150
|
+
`plugins/generations/dailynews-gen/src/editorial-claims.ts` reports on an already-accepted plan. They never
|
|
151
|
+
reject a plan, so they are written to `24-script/<date>_08_script-write_advisories.json` rather than the
|
|
152
|
+
`errors.json` that triggers this mode; fix them the same way when that file is handed to you.
|
|
110
153
|
|
|
111
154
|
## Mode: curate / curate --fix
|
|
112
155
|
|
|
@@ -116,6 +159,50 @@ See `references/selection.md`. Reads QC candidates (`--in`) and writes two JSON
|
|
|
116
159
|
|
|
117
160
|
With `--fix <errors.json>` (`missing-plan`, `invalid-json`, `unknown-id`, `missing-item`, `conflict-id`, `empty-plan`), repair the partition so every candidate id is accounted for exactly once and at least one in-scope item is kept.
|
|
118
161
|
|
|
162
|
+
## Mode: align
|
|
163
|
+
|
|
164
|
+
Runs once, after the final selection and before drafting (design `每日AI乱炖编辑与分发设计` §2, ADR-054).
|
|
165
|
+
Inputs: the selected items with the IDs and provenance 0393's selection produced, and the current
|
|
166
|
+
`conclusion.md` ledger snapshot. Output: a proposal, or `{"version":1,"judgments":[]}` when this run
|
|
167
|
+
has no evidence-backed change — an empty proposal is the normal case, not a failure.
|
|
168
|
+
|
|
169
|
+
Write only judgments you can source in this run's selected items. Each entry:
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"version": 1,
|
|
174
|
+
"judgments": [
|
|
175
|
+
{
|
|
176
|
+
"id": "j-<stable-slug>",
|
|
177
|
+
"selectedId": "<a selected item id from this run>",
|
|
178
|
+
"storyKey": "<the item's story key, when known>",
|
|
179
|
+
"date": "<YYYYMMDD>",
|
|
180
|
+
"fact": "听众需要知道的事实(一句,中文)",
|
|
181
|
+
"attribution": "谁说的 / 哪个来源",
|
|
182
|
+
"comment": "编辑判断:为什么重要或该看什么",
|
|
183
|
+
"evidence": { "url": "https://…", "checkedAt": "<ISO-8601>" },
|
|
184
|
+
"supersedes": "<judgment id, or null>"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"preamble": "本期更正说明(仅当有 supersedes 时)"
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Rules the deterministic commit enforces (a violation is a failed run, not a silent drop):
|
|
192
|
+
|
|
193
|
+
1. **No invention.** Every `selectedId` must be one of this run's selected ids; every `fact` must come
|
|
194
|
+
from that item. A judgment with no evidence URL and check time is rejected.
|
|
195
|
+
2. **Stable ids.** Reuse the same `id` for the same judgment across runs. Re-proposing identical
|
|
196
|
+
content is a no-op; re-proposing the same `id` with different content is refused — a confirmed
|
|
197
|
+
judgment is never overwritten.
|
|
198
|
+
3. **Corrections supersede, never edit.** To fix an aired error, write a new judgment whose
|
|
199
|
+
`supersedes` names the old id, with listener-facing wording ("上期说…有误,向听众致歉,以…为准")
|
|
200
|
+
in `comment` and `preamble`. The old record stays in the ledger marked superseded, and the commit
|
|
201
|
+
returns a stable correction id for the channel plugins (0396). Keep the apology, the wrong claim
|
|
202
|
+
and the corrected fact together — the draft (0385) reads them from the frozen snapshot.
|
|
203
|
+
4. **Empty is legal.** No new evidence means an empty `judgments` array: the run reuses the committed
|
|
204
|
+
ledger as its legal snapshot and appends nothing.
|
|
205
|
+
|
|
119
206
|
## References
|
|
120
207
|
|
|
121
208
|
- `references/style-contract.zh.md`: the column's style contract and machine block (caps, banned).
|
|
@@ -23,6 +23,10 @@ Every candidate `id` from `21-plan/<date>_04_quality-control-content_candidates.
|
|
|
23
23
|
## Order and balance
|
|
24
24
|
|
|
25
25
|
1. Lead with the day's most consequential concrete news (urgency × impact), not the most technical item.
|
|
26
|
+
0385 R1 makes the audience explicit: urgency is *today's* news, and impact is measured on a white-collar
|
|
27
|
+
listener (product, ops, market, staff roles — not necessarily an engineer): what they can use, what it
|
|
28
|
+
costs, whether it changes how they work. Prefer the story a commuter can act on over the one only a model
|
|
29
|
+
engineer can appreciate; the deep technical story is the weekly's, not the daily's lead.
|
|
26
30
|
2. Mix categories (industry, research, tools) instead of running three reddit technical threads in a row.
|
|
27
31
|
3. Episode length comes from item count and complete facts, not from long commentary. The style contract
|
|
28
32
|
gives the per-driver character rates. If kept items cannot reach the floor, keep more in-scope items rather
|