@gobing-ai/knowledge-kit 0.1.15 → 0.1.16
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/index.js +1603 -1
- package/package.json +1 -1
- package/plugins/generations/content-gen/dist/index.js +58 -52
- package/plugins/generations/content-gen/src/storm.ts +94 -61
- package/plugins/generations/core-facts-gen/dist/index.js +1 -1
- package/plugins/generations/daily-article-gen/dist/index.js +1 -1
- package/plugins/generations/dailynews-gen/dist/index.js +1 -1
- package/plugins/generations/episode-plan-gen/dist/index.js +1 -1
- package/plugins/generations/gemini-tts/dist/index.js +1 -1
- package/plugins/generations/image-gen/README.md +31 -10
- package/plugins/generations/image-gen/assets/sample/cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__clean-webapp-ui.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__cute.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__daily-news.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__editorial.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__fresh.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__minimalist.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__photorealistic.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__sketch.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__technical-diagram.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__vibrant.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__warm.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/daily-news-podcast-cover__xhs-knowledge.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/free__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/illustration__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/assets/sample/xhs-card__quasi-news-podcast.jpg +0 -0
- package/plugins/generations/image-gen/dist/index.js +1 -1
- package/plugins/generations/image-gen/presets/formats/daily-news-podcast-cover.yaml +18 -0
- package/plugins/generations/image-gen/presets/styles/quasi-news-podcast.yaml +9 -0
- package/plugins/generations/news-report-gen/dist/index.js +1 -1
- package/plugins/generations/voice-gen/dist/index.js +1 -1
- package/plugins/generations/voxcpm-tts/dist/index.js +1 -1
- package/plugins/ingestions/aihot-ingest/dist/index.js +1 -1
- package/plugins/ingestions/horizon-ingest/dist/index.js +1 -1
- package/plugins/ingestions/last30days-ingest/dist/index.js +1 -1
- package/plugins/ingestions/web-search/dist/index.js +1 -1
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/publish-presets/daily-ai-voice-migration.json +12 -3
- package/plugins/kk/publish-presets/daily-ai-voice.json +11 -3
- package/plugins/kk/scripts/cover-compositor.ts +152 -0
- package/plugins/kk/scripts/daily-cover-mock.ts +164 -0
- package/plugins/kk/scripts/daily-scheduled-run.ts +188 -3
- package/plugins/kk/scripts/daily-stages.ts +134 -26
- package/plugins/kk/scripts/daily-triage-core.ts +451 -0
- package/plugins/kk/scripts/daily-triage.ts +74 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +31 -2
- package/plugins/kk/skills/content-safety/references/platforms/wechatmp.md +16 -10
- package/plugins/kk/skills/news-editorial/SKILL.md +3 -3
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +2 -1
- package/plugins/kk/skills/publish/SKILL.md +1 -1
- package/plugins/kk/skills/wiki-authoring/SKILL.md +53 -0
- package/plugins/kk/skills/wiki-authoring/references/page-shapes.md +44 -0
- package/plugins/kk/workflows/kk-daily-ai-voice3.yaml +3 -3
- package/plugins/kk/workflows/kk-daily-safety.yaml +32 -7
- package/plugins/publishings/bilibili-pub/dist/index.js +1 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +1 -1
- package/plugins/publishings/csdn-pub/dist/index.js +1 -1
- package/plugins/publishings/csdn-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/emdash-pub/dist/index.js +1 -1
- package/plugins/publishings/infoq-pub/dist/index.js +1 -1
- package/plugins/publishings/infoq-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/jike-pub/dist/index.js +1 -1
- package/plugins/publishings/jike-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/juejin-pub/dist/index.js +1 -1
- package/plugins/publishings/juejin-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +1 -1
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/medium-pub/dist/index.js +1 -1
- package/plugins/publishings/podcast-pub/dist/index.js +1 -1
- package/plugins/publishings/qiita-pub/dist/index.js +1 -1
- package/plugins/publishings/shipinhao-pub/dist/index.js +222 -50
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +48 -1
- package/plugins/publishings/shipinhao-pub/plugin.json +2 -2
- package/plugins/publishings/shipinhao-pub/src/flow.ts +335 -79
- package/plugins/publishings/shipinhao-pub/src/index.ts +16 -8
- package/plugins/publishings/shipinhao-pub/src/profile-check.ts +1 -1
- package/plugins/publishings/shipinhao-pub/src/selectors.ts +103 -5
- package/plugins/publishings/sspai-pub/dist/index.js +1 -1
- package/plugins/publishings/substack-pub/dist/index.js +1 -1
- package/plugins/publishings/substack-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +235 -12
- package/plugins/publishings/surfdash-pub/src/index.ts +127 -6
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +189 -0
- package/plugins/publishings/threads-pub/dist/index.js +1 -1
- package/plugins/publishings/wechatmp-pub/dist/index.js +10 -7
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/wechatmp-pub/src/enrich.ts +10 -3
- package/plugins/publishings/wechatmp-pub/src/flow.ts +3 -4
- package/plugins/publishings/wechatmp-pub/src/page.ts +14 -0
- package/plugins/publishings/weibo-pub/dist/index.js +1 -1
- package/plugins/publishings/weibo-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/x-pub/dist/index.js +1 -1
- package/plugins/publishings/x-pub/dist/profile-check.js +1 -1
- package/plugins/publishings/xhs-pub/dist/index.js +557 -31
- package/plugins/publishings/xhs-pub/dist/profile-check.js +20 -1
- package/plugins/publishings/xhs-pub/src/errors.ts +45 -0
- package/plugins/publishings/xhs-pub/src/flow.ts +773 -45
- package/plugins/publishings/xhs-pub/src/page.ts +33 -0
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +1 -1
- package/plugins/publishings/zenn-pub/dist/index.js +1 -1
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Triage collector for failed daily runs (0347 F2/F3, 2026-11-10).
|
|
3
|
+
*
|
|
4
|
+
* A daily-run failure used to cost a 45-call forensic session across six stores before anyone
|
|
5
|
+
* could name the layer (2026-11-09: two interleaved causes — a stale working-tree workflow and a
|
|
6
|
+
* quota-dead executor chain). This module gathers the evidence the first five minutes actually
|
|
7
|
+
* need, at failure time, into one structure:
|
|
8
|
+
*
|
|
9
|
+
* - which workflow bytes executed (current checkout file + sha + git dirty flag on harness paths),
|
|
10
|
+
* - the last failed node from the parent trace, with the executor's partial-output tail,
|
|
11
|
+
* - nested runs (the safety machine) found by time-window + workflow name, with per-node receipts,
|
|
12
|
+
* - the engine escalation decision, and rule-based suggestions that name the next action.
|
|
13
|
+
*
|
|
14
|
+
* Pure parsing helpers are exported for tests; IO helpers are thin and never throw — a triage
|
|
15
|
+
* that cannot collect must not mask the original failure it is describing.
|
|
16
|
+
*/
|
|
17
|
+
import { spawnSync } from 'node:child_process';
|
|
18
|
+
import { createHash } from 'node:crypto';
|
|
19
|
+
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
20
|
+
import { basename, join } from 'node:path';
|
|
21
|
+
|
|
22
|
+
export interface TriageReceipt {
|
|
23
|
+
status?: string;
|
|
24
|
+
startedAt?: string;
|
|
25
|
+
completedAt?: string;
|
|
26
|
+
workDir?: string;
|
|
27
|
+
agent?: string;
|
|
28
|
+
retryAgent?: string;
|
|
29
|
+
exitCode?: number;
|
|
30
|
+
error?: string | null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface ExecutedDefinition {
|
|
34
|
+
workflow: string;
|
|
35
|
+
path: string;
|
|
36
|
+
sha256: string | null;
|
|
37
|
+
gitDirty: string[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface FailedNode {
|
|
41
|
+
id: string;
|
|
42
|
+
status: string;
|
|
43
|
+
startedAt?: string;
|
|
44
|
+
completedAt?: string;
|
|
45
|
+
stderrTail?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface NestedRun {
|
|
49
|
+
runId: string;
|
|
50
|
+
workflow?: string;
|
|
51
|
+
status?: string;
|
|
52
|
+
terminalState?: string;
|
|
53
|
+
startedAt?: string;
|
|
54
|
+
finalizedAt?: string;
|
|
55
|
+
receipts: { node: string; ok: boolean; outcome?: string; reason?: string }[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface TriageReport {
|
|
59
|
+
runId: string;
|
|
60
|
+
collectedAt: string;
|
|
61
|
+
receipt: TriageReceipt | null;
|
|
62
|
+
executed: ExecutedDefinition | null;
|
|
63
|
+
failedNode: FailedNode | null;
|
|
64
|
+
nestedRuns: NestedRun[];
|
|
65
|
+
escalation: { trigger?: string; decision?: string; reason?: string; createdAt?: string } | null;
|
|
66
|
+
suggestions: string[];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const RECEIPTS_DIR = join('.spur', 'run');
|
|
70
|
+
/** When the failed-node text names no nested workflow, assume the daily safety machine. */
|
|
71
|
+
const WORKFLOW_NESTED_FALLBACK = 'kk-daily-safety';
|
|
72
|
+
const RUNS_DIR = join('.spur', 'memory', 'runs');
|
|
73
|
+
const WORKS_FLOW_DIR = join('.works', 'kk-daily-ai-voice2');
|
|
74
|
+
const FAILED_RECEIPT_STATUSES = new Set(['failed', 'timed-out', 'interrupted', 'incomplete', 'preflight-refused']);
|
|
75
|
+
/** Receipt statuses that mean the supervisor is mid-flight, not failed. */
|
|
76
|
+
const ACTIVE_RECEIPT_STATUSES = new Set(['running', 'inspecting']);
|
|
77
|
+
const GOOD_RECEIPT_STATUSES = new Set(['done', 'no-content']);
|
|
78
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: matching the ANSI ESC control char is the point of the stripper
|
|
79
|
+
const ANSI = /\u001b\[[0-9;]*[A-Za-z]/g;
|
|
80
|
+
|
|
81
|
+
function readText(path: string): string | null {
|
|
82
|
+
try {
|
|
83
|
+
return readFileSync(path, 'utf-8');
|
|
84
|
+
} catch {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function readTriageJson(path: string): Record<string, unknown> | null {
|
|
90
|
+
try {
|
|
91
|
+
const parsed = JSON.parse(readFileSync(path, 'utf-8')) as unknown;
|
|
92
|
+
return parsed !== null && typeof parsed === 'object' ? (parsed as Record<string, unknown>) : null;
|
|
93
|
+
} catch {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function sha256File(path: string): string | null {
|
|
99
|
+
try {
|
|
100
|
+
return createHash('sha256').update(readFileSync(path)).digest('hex');
|
|
101
|
+
} catch {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Harness paths whose dirty state invalidated the 2026-11-09 04:30 run (R1). */
|
|
107
|
+
export function gitDirtyPaths(repo: string): string[] {
|
|
108
|
+
const result = spawnSync('git', ['status', '--porcelain', '--', 'plugins/kk', '.spur/workflows'], {
|
|
109
|
+
cwd: repo,
|
|
110
|
+
encoding: 'utf-8',
|
|
111
|
+
timeout: 10_000,
|
|
112
|
+
});
|
|
113
|
+
if (result.status !== 0) return [];
|
|
114
|
+
return result.stdout
|
|
115
|
+
.split('\n')
|
|
116
|
+
.map((line) => line.slice(3).trim())
|
|
117
|
+
.filter(Boolean);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface ParsedTrace {
|
|
121
|
+
workflow?: string;
|
|
122
|
+
status?: string;
|
|
123
|
+
startedAt?: string;
|
|
124
|
+
finalizedAt?: string;
|
|
125
|
+
failedNode: FailedNode | null;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Extract the last failed action event from a `spur workflow trace --json` payload. */
|
|
129
|
+
export function parseTrace(stdout: string): ParsedTrace {
|
|
130
|
+
let parsed: Record<string, unknown>;
|
|
131
|
+
try {
|
|
132
|
+
parsed = JSON.parse(stdout) as Record<string, unknown>;
|
|
133
|
+
} catch {
|
|
134
|
+
return { failedNode: null };
|
|
135
|
+
}
|
|
136
|
+
const run = (parsed.run ?? null) as Record<string, unknown> | null;
|
|
137
|
+
const events = Array.isArray(parsed.events) ? (parsed.events as Record<string, unknown>[]) : [];
|
|
138
|
+
let failedNode: FailedNode | null = null;
|
|
139
|
+
for (const event of events) {
|
|
140
|
+
if (event.kind !== 'action') continue;
|
|
141
|
+
const status = String(event.status ?? '');
|
|
142
|
+
if (status === 'done' || status === 'succeeded' || status === 'skipped') continue;
|
|
143
|
+
const id = typeof event.node === 'string' ? event.node : '';
|
|
144
|
+
if (id === '') continue;
|
|
145
|
+
failedNode = {
|
|
146
|
+
id,
|
|
147
|
+
status,
|
|
148
|
+
...(typeof event.startedAt === 'string' ? { startedAt: event.startedAt } : {}),
|
|
149
|
+
...(typeof event.completedAt === 'string' ? { completedAt: event.completedAt } : {}),
|
|
150
|
+
...(typeof event.error === 'string' ? { stderrTail: event.error.slice(-400) } : {}),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
...(run !== null && typeof run.workflowName === 'string' ? { workflow: run.workflowName } : {}),
|
|
155
|
+
...(run !== null && typeof run.status === 'string' ? { status: run.status } : {}),
|
|
156
|
+
...(run !== null && typeof run.startedAt === 'string' ? { startedAt: run.startedAt } : {}),
|
|
157
|
+
...(run !== null && typeof run.finalizedAt === 'string' ? { finalizedAt: run.finalizedAt } : {}),
|
|
158
|
+
failedNode,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function traceStderrTail(repo: string, runId: string, failedNode: FailedNode): string | undefined {
|
|
163
|
+
if (failedNode.stderrTail) return failedNode.stderrTail;
|
|
164
|
+
const partial = readText(join(repo, RECEIPTS_DIR, `${runId}-${failedNode.id}-partial.md`));
|
|
165
|
+
if (partial === null) return undefined;
|
|
166
|
+
return partial.replace(ANSI, '').trimEnd().slice(-400);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** Nested runs overlap the parent's wall clock and are not the parent workflow itself. */
|
|
170
|
+
export function findNestedRuns(
|
|
171
|
+
runsDir: string,
|
|
172
|
+
parent: { runId: string; startedAt?: string; finalizedAt?: string; workflow?: string },
|
|
173
|
+
workflowFilter: Set<string> | null = null,
|
|
174
|
+
): NestedRun[] {
|
|
175
|
+
let entries: string[] = [];
|
|
176
|
+
try {
|
|
177
|
+
entries = readdirSync(runsDir).filter((name) => name.endsWith('.state.json'));
|
|
178
|
+
} catch {
|
|
179
|
+
return [];
|
|
180
|
+
}
|
|
181
|
+
const start = parent.startedAt ? Date.parse(parent.startedAt) : Number.NaN;
|
|
182
|
+
const end = parent.finalizedAt ? Date.parse(parent.finalizedAt) : Date.now();
|
|
183
|
+
if (Number.isNaN(start) || Number.isNaN(end)) return [];
|
|
184
|
+
const nested: NestedRun[] = [];
|
|
185
|
+
for (const entry of entries) {
|
|
186
|
+
const state = readTriageJson(join(runsDir, entry));
|
|
187
|
+
if (state === null) continue;
|
|
188
|
+
const runId = String(state.runId ?? basename(entry, '.state.json'));
|
|
189
|
+
if (runId === '' || runId === parent.runId) continue;
|
|
190
|
+
if (
|
|
191
|
+
workflowFilter !== null &&
|
|
192
|
+
(typeof state.workflowName !== 'string' || !workflowFilter.has(state.workflowName))
|
|
193
|
+
)
|
|
194
|
+
continue;
|
|
195
|
+
const runStart = typeof state.startedAt === 'string' ? Date.parse(state.startedAt) : Number.NaN;
|
|
196
|
+
if (Number.isNaN(runStart) || runStart < start - 1000 || runStart > end) continue;
|
|
197
|
+
const receiptsDir = join(runsDir, '..', '..', '..', RECEIPTS_DIR, runId, 'receipts');
|
|
198
|
+
const receipts: NestedRun['receipts'] = [];
|
|
199
|
+
try {
|
|
200
|
+
for (const file of readdirSync(receiptsDir)) {
|
|
201
|
+
if (!file.endsWith('.json')) continue;
|
|
202
|
+
const receipt = readTriageJson(join(receiptsDir, file));
|
|
203
|
+
const outcome = receipt === null ? undefined : String(receipt.outcome ?? '');
|
|
204
|
+
receipts.push({
|
|
205
|
+
node: basename(file, '.json'),
|
|
206
|
+
ok: outcome === 'succeeded' || outcome === 'done',
|
|
207
|
+
outcome,
|
|
208
|
+
...(receipt !== null && typeof receipt.reason === 'string' ? { reason: receipt.reason } : {}),
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
} catch {
|
|
212
|
+
// No receipts dir: record the run without receipt detail.
|
|
213
|
+
}
|
|
214
|
+
nested.push({
|
|
215
|
+
runId,
|
|
216
|
+
...(typeof state.workflowName === 'string' ? { workflow: state.workflowName } : {}),
|
|
217
|
+
...(typeof state.status === 'string' ? { status: state.status } : {}),
|
|
218
|
+
...(typeof state.terminalState === 'string' ? { terminalState: state.terminalState } : {}),
|
|
219
|
+
...(typeof state.startedAt === 'string' ? { startedAt: state.startedAt } : {}),
|
|
220
|
+
...(typeof state.finalizedAt === 'string' ? { finalizedAt: state.finalizedAt } : {}),
|
|
221
|
+
receipts,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
return nested.sort((a, b) => (a.startedAt ?? '').localeCompare(b.startedAt ?? ''));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** Rule-based next actions, most specific first. Evidence: executor reasons + failed-node stderr. */
|
|
228
|
+
export function suggestionsFor(report: Omit<TriageReport, 'suggestions' | 'collectedAt' | 'runId'>): string[] {
|
|
229
|
+
const evidence = [
|
|
230
|
+
report.failedNode?.stderrTail ?? '',
|
|
231
|
+
...report.nestedRuns.flatMap((run) => run.receipts.map((receipt) => receipt.reason ?? '')),
|
|
232
|
+
report.receipt?.error ?? '',
|
|
233
|
+
]
|
|
234
|
+
.join('\n')
|
|
235
|
+
.toLowerCase();
|
|
236
|
+
const suggestions: string[] = [];
|
|
237
|
+
if (
|
|
238
|
+
/accountquotaexceeded|monthly usage quota|weekly limit|no credits remaining|invalid credential/.test(evidence)
|
|
239
|
+
) {
|
|
240
|
+
suggestions.push(
|
|
241
|
+
'executor account exhausted (quota/credits/credential) — probe healthy executors (spur agent run --agent <name> "Reply with exactly: OK"), switch the schedule entry to a healthy pair, and rerun; preflight will refuse the day otherwise',
|
|
242
|
+
);
|
|
243
|
+
} else if (/exit code 3|exhausted/.test(evidence)) {
|
|
244
|
+
suggestions.push(
|
|
245
|
+
'agent executor outage — verify the primary/retry executors, then rerun; the 07:00 retrigger retries automatically once the receipt is failed',
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
if (/plan item count/.test(evidence)) {
|
|
249
|
+
suggestions.push(
|
|
250
|
+
'script/article section divergence — move aside 21-plan/<date>_03_plan_plan.json, 21-plan/<date>_03_curate_excluded.json, 24-script/<date>_08_script-write_plan.json and 24-script/<date>_08_script_voicescript.yaml so curate re-splits consistently, then rerun',
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
if (report.nestedRuns.some((run) => run.terminalState === 'infra-fail')) {
|
|
254
|
+
suggestions.push(
|
|
255
|
+
'safety reached infra-fail — the gate refused for missing evidence (executor outage), not a content verdict; recover executors and rerun',
|
|
256
|
+
);
|
|
257
|
+
} else if (report.nestedRuns.some((run) => run.terminalState === 'block')) {
|
|
258
|
+
suggestions.push(
|
|
259
|
+
'safety verdict block — inspect the 09_safety-* artifacts (report/verdict/status) under the scope dir before any rerun',
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
if (report.executed !== null && report.executed.gitDirty.length > 0) {
|
|
263
|
+
suggestions.push(
|
|
264
|
+
`harness paths are dirty right now (${report.executed.gitDirty.slice(0, 3).join(', ')}) — the NEXT scheduled run executes the working tree; commit or stash first`,
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
if (suggestions.length === 0) {
|
|
268
|
+
suggestions.push('inspect the failed node stderr and nested receipts, then decide');
|
|
269
|
+
}
|
|
270
|
+
return suggestions;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** Collect everything knowable about one failed run. Never throws for missing pieces. */
|
|
274
|
+
export function collectTriage(
|
|
275
|
+
repo: string,
|
|
276
|
+
runId: string,
|
|
277
|
+
opts: { receiptPath?: string; receipt?: TriageReceipt; workflow?: string; env?: NodeJS.ProcessEnv } = {},
|
|
278
|
+
): TriageReport {
|
|
279
|
+
const report: TriageReport = {
|
|
280
|
+
runId,
|
|
281
|
+
collectedAt: new Date().toISOString(),
|
|
282
|
+
receipt: null,
|
|
283
|
+
executed: null,
|
|
284
|
+
failedNode: null,
|
|
285
|
+
nestedRuns: [],
|
|
286
|
+
escalation: null,
|
|
287
|
+
suggestions: [],
|
|
288
|
+
};
|
|
289
|
+
if (opts.receipt !== undefined) {
|
|
290
|
+
report.receipt = opts.receipt;
|
|
291
|
+
} else {
|
|
292
|
+
const receiptPath = opts.receiptPath ?? findReceiptByRunId(repo, runId);
|
|
293
|
+
if (receiptPath !== null) {
|
|
294
|
+
const raw = readTriageJson(receiptPath);
|
|
295
|
+
if (raw !== null) {
|
|
296
|
+
report.receipt = {
|
|
297
|
+
...(typeof raw.status === 'string' ? { status: raw.status } : {}),
|
|
298
|
+
...(typeof raw.startedAt === 'string' ? { startedAt: raw.startedAt } : {}),
|
|
299
|
+
...(typeof raw.completedAt === 'string' ? { completedAt: raw.completedAt } : {}),
|
|
300
|
+
...(typeof raw.workDir === 'string' ? { workDir: raw.workDir } : {}),
|
|
301
|
+
...(typeof raw.agent === 'string' ? { agent: raw.agent } : {}),
|
|
302
|
+
...(typeof raw.retryAgent === 'string' ? { retryAgent: raw.retryAgent } : {}),
|
|
303
|
+
...(typeof raw.exitCode === 'number' ? { exitCode: raw.exitCode } : {}),
|
|
304
|
+
...(typeof raw.error === 'string' || raw.error === null
|
|
305
|
+
? { error: raw.error as string | null }
|
|
306
|
+
: {}),
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
const trace = spawnSync('spur', ['--no-logo', 'workflow', 'trace', runId, '--json'], {
|
|
312
|
+
cwd: repo,
|
|
313
|
+
encoding: 'utf-8',
|
|
314
|
+
timeout: 20_000,
|
|
315
|
+
// opts.env layers over the inherited environment (tests shim `spur` through PATH).
|
|
316
|
+
...(opts.env ? { env: { ...process.env, ...opts.env } } : {}),
|
|
317
|
+
});
|
|
318
|
+
if (trace.status === 0 && trace.stdout.trim() !== '') {
|
|
319
|
+
const parsed = parseTrace(trace.stdout);
|
|
320
|
+
const workflow = opts.workflow ?? parsed.workflow ?? '';
|
|
321
|
+
report.failedNode = parsed.failedNode;
|
|
322
|
+
if (report.failedNode !== null) {
|
|
323
|
+
report.failedNode.stderrTail = traceStderrTail(repo, runId, report.failedNode);
|
|
324
|
+
}
|
|
325
|
+
const workflowFile = join(repo, 'plugins', 'kk', 'workflows', `${workflow}.yaml`);
|
|
326
|
+
if (workflow !== '' && existsSync(workflowFile)) {
|
|
327
|
+
report.executed = {
|
|
328
|
+
workflow,
|
|
329
|
+
path: workflowFile,
|
|
330
|
+
sha256: sha256File(workflowFile),
|
|
331
|
+
gitDirty: gitDirtyPaths(repo),
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
// Nested machines are the ones the parent's failing command itself names (…\.yaml); a bare
|
|
335
|
+
// time-window scan also catches neighbor jobs (kk-collect, wrapup pipelines) that merely
|
|
336
|
+
// overlapped the parent's wall clock.
|
|
337
|
+
const nestedNames = new Set(
|
|
338
|
+
(report.failedNode?.stderrTail ?? '').match(/[\w.-]+\.yaml/g)?.map((file) => file.replace(/\.yaml$/, '')) ??
|
|
339
|
+
[],
|
|
340
|
+
);
|
|
341
|
+
report.nestedRuns = findNestedRuns(
|
|
342
|
+
join(repo, RUNS_DIR),
|
|
343
|
+
{
|
|
344
|
+
runId,
|
|
345
|
+
startedAt: parsed.startedAt,
|
|
346
|
+
finalizedAt: parsed.finalizedAt,
|
|
347
|
+
workflow: workflow || undefined,
|
|
348
|
+
},
|
|
349
|
+
nestedNames.size > 0 ? nestedNames : new Set([WORKFLOW_NESTED_FALLBACK]),
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
const escalation = readTriageJson(join(repo, RECEIPTS_DIR, `${runId}-escalation.json`));
|
|
353
|
+
if (escalation !== null) {
|
|
354
|
+
const decision = (escalation.decision ?? null) as Record<string, unknown> | null;
|
|
355
|
+
report.escalation = {
|
|
356
|
+
...(typeof escalation.trigger === 'string' ? { trigger: escalation.trigger } : {}),
|
|
357
|
+
...(decision !== null && typeof decision.kind === 'string' ? { decision: decision.kind } : {}),
|
|
358
|
+
...(decision !== null && typeof decision.reason === 'string' ? { reason: decision.reason } : {}),
|
|
359
|
+
...(typeof escalation.createdAt === 'string' ? { createdAt: escalation.createdAt } : {}),
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
report.suggestions = suggestionsFor({
|
|
363
|
+
receipt: report.receipt,
|
|
364
|
+
executed: report.executed,
|
|
365
|
+
failedNode: report.failedNode,
|
|
366
|
+
nestedRuns: report.nestedRuns,
|
|
367
|
+
escalation: report.escalation,
|
|
368
|
+
});
|
|
369
|
+
return report;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/** The five lines an operator reads before deciding anything else. */
|
|
373
|
+
export function summarizeTriage(report: TriageReport): string[] {
|
|
374
|
+
const receipt = report.receipt;
|
|
375
|
+
const line1 =
|
|
376
|
+
receipt !== null
|
|
377
|
+
? `trigger: ${receipt.status ?? '?'} (exit ${receipt.exitCode ?? '?'}) completedAt=${receipt.completedAt ?? '?'} agent=${receipt.agent ?? '?'}`
|
|
378
|
+
: `trigger: unknown (no receipt found for ${report.runId})`;
|
|
379
|
+
const executed = report.executed;
|
|
380
|
+
const line2 =
|
|
381
|
+
executed !== null
|
|
382
|
+
? `executed: ${executed.workflow} sha256=${executed.sha256?.slice(0, 8) ?? '?'} harnessDirty=${executed.gitDirty.length}`
|
|
383
|
+
: 'executed: unknown (trace unavailable)';
|
|
384
|
+
const failed = report.failedNode;
|
|
385
|
+
const line3 =
|
|
386
|
+
failed !== null
|
|
387
|
+
? `failed node: ${failed.id} (${failed.status})${
|
|
388
|
+
failed.stderrTail ? ` — ${failed.stderrTail.split('\n').slice(-1)[0]?.slice(0, 140) ?? ''}` : ''
|
|
389
|
+
}`
|
|
390
|
+
: 'failed node: not identified from trace';
|
|
391
|
+
const nested = report.nestedRuns;
|
|
392
|
+
const line4 =
|
|
393
|
+
nested.length > 0
|
|
394
|
+
? nested
|
|
395
|
+
.map((run) => {
|
|
396
|
+
const bad = run.receipts.filter((receipt) => !receipt.ok).length;
|
|
397
|
+
return `${run.workflow ?? '?'}:${run.terminalState ?? run.status ?? '?'} receipts ${run.receipts.length - bad}/${run.receipts.length} ok (${run.runId.slice(0, 8)})`;
|
|
398
|
+
})
|
|
399
|
+
.join('; ')
|
|
400
|
+
: 'nested: none';
|
|
401
|
+
return [line1, line2, line3, line4, `suggestion: ${report.suggestions[0] ?? '?'}`];
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/** Locate the schedule receipt for a run id across the voice2 works root (stamps newest first). */
|
|
405
|
+
export function findReceiptByRunId(repo: string, runId: string): string | null {
|
|
406
|
+
const root = join(repo, WORKS_FLOW_DIR);
|
|
407
|
+
let stamps: string[] = [];
|
|
408
|
+
try {
|
|
409
|
+
stamps = readdirSync(root).filter((name) => /^\d{8}$/.test(name));
|
|
410
|
+
} catch {
|
|
411
|
+
return null;
|
|
412
|
+
}
|
|
413
|
+
for (const stamp of stamps.reverse()) {
|
|
414
|
+
const receiptPath = join(root, stamp, 'schedule-receipt.json');
|
|
415
|
+
const receipt = readTriageJson(receiptPath);
|
|
416
|
+
if (receipt !== null && receipt.runId === runId) return receiptPath;
|
|
417
|
+
}
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/** Newest failed daily-run receipt across the voice2 works root, for `daily-triage --latest`. */
|
|
422
|
+
export function latestFailedRun(repo: string): { runId: string; receiptPath: string } | null {
|
|
423
|
+
const root = join(repo, WORKS_FLOW_DIR);
|
|
424
|
+
let stamps: string[] = [];
|
|
425
|
+
try {
|
|
426
|
+
stamps = readdirSync(root).filter((name) => /^\d{8}$/.test(name));
|
|
427
|
+
} catch {
|
|
428
|
+
return null;
|
|
429
|
+
}
|
|
430
|
+
const candidates: { runId: string; receiptPath: string; completedAt: number }[] = [];
|
|
431
|
+
for (const stamp of stamps.reverse()) {
|
|
432
|
+
const receiptPath = join(root, stamp, 'schedule-receipt.json');
|
|
433
|
+
const receipt = readTriageJson(receiptPath);
|
|
434
|
+
if (receipt === null || typeof receipt.status !== 'string') continue;
|
|
435
|
+
if (!FAILED_RECEIPT_STATUSES.has(receipt.status)) continue;
|
|
436
|
+
const completedAt =
|
|
437
|
+
typeof receipt.completedAt === 'string' ? Date.parse(receipt.completedAt) : statSync(receiptPath).mtimeMs;
|
|
438
|
+
candidates.push({
|
|
439
|
+
runId: typeof receipt.runId === 'string' ? receipt.runId : `${stamp}-unknown`,
|
|
440
|
+
receiptPath,
|
|
441
|
+
completedAt: Number.isNaN(completedAt) ? 0 : completedAt,
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
if (candidates.length === 0) return null;
|
|
445
|
+
candidates.sort((a, b) => b.completedAt - a.completedAt);
|
|
446
|
+
return candidates[0] ?? null;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export const TRIAGE_FAILED_RECEIPT_STATUSES = FAILED_RECEIPT_STATUSES;
|
|
450
|
+
export const TRIAGE_GOOD_RECEIPT_STATUSES = GOOD_RECEIPT_STATUSES;
|
|
451
|
+
export const TRIAGE_ACTIVE_RECEIPT_STATUSES = ACTIVE_RECEIPT_STATUSES;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* daily-triage — print the five-line triage summary for a failed daily run (0347 F3, 2026-11-10).
|
|
3
|
+
*
|
|
4
|
+
* bun plugins/kk/scripts/daily-triage.ts --run <runId> [--repo <dir>] [--json]
|
|
5
|
+
* bun plugins/kk/scripts/daily-triage.ts --latest [--repo <dir>] [--json]
|
|
6
|
+
*
|
|
7
|
+
* Exit codes: 0 = triage produced (even for a rerun-able outcome — this is a read-only tool);
|
|
8
|
+
* 1 = usage error; 2 = run receipt not found / not failed. The scheduler embeds the same summary
|
|
9
|
+
* in the failure receipt, so this CLI is for ad-hoc inspection and for reproducing the embedded
|
|
10
|
+
* triage when the receipt was written by an older supervisor build.
|
|
11
|
+
*/
|
|
12
|
+
import { join } from 'node:path';
|
|
13
|
+
import { collectTriage, latestFailedRun, summarizeTriage } from './daily-triage-core';
|
|
14
|
+
|
|
15
|
+
interface CliValues {
|
|
16
|
+
run?: string;
|
|
17
|
+
latest?: boolean;
|
|
18
|
+
repo?: string;
|
|
19
|
+
json?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function fail(code: number, message: string): never {
|
|
23
|
+
console.error(`daily-triage: ${message}`);
|
|
24
|
+
process.exit(code);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function main(args: string[]): void {
|
|
28
|
+
const values: CliValues = {};
|
|
29
|
+
for (let i = 0; i < args.length; i++) {
|
|
30
|
+
const arg = args[i];
|
|
31
|
+
if (arg === '--run') values.run = args[++i];
|
|
32
|
+
else if (arg === '--latest') values.latest = true;
|
|
33
|
+
else if (arg === '--repo') values.repo = args[++i];
|
|
34
|
+
else if (arg === '--json') values.json = true;
|
|
35
|
+
else if (arg === '--help' || arg === '-h') {
|
|
36
|
+
console.log('usage: daily-triage.ts (--run <runId> | --latest) [--repo <dir>] [--json]');
|
|
37
|
+
process.exit(0);
|
|
38
|
+
} else fail(1, `unknown argument: ${arg}`);
|
|
39
|
+
}
|
|
40
|
+
if (values.run !== undefined && values.latest) fail(1, '--run and --latest are mutually exclusive');
|
|
41
|
+
if (values.run === undefined && !values.latest) fail(1, 'pass --run <runId> or --latest');
|
|
42
|
+
|
|
43
|
+
const repo = values.repo ?? process.cwd();
|
|
44
|
+
let runId = values.run ?? '';
|
|
45
|
+
let receiptPath: string | undefined;
|
|
46
|
+
if (values.latest) {
|
|
47
|
+
const found = latestFailedRun(repo);
|
|
48
|
+
if (found === null) {
|
|
49
|
+
console.log('daily-triage: no failed daily run found in .works/kk-daily-ai-voice2 — nothing to triage');
|
|
50
|
+
process.exit(0);
|
|
51
|
+
}
|
|
52
|
+
runId = found.runId;
|
|
53
|
+
receiptPath = found.receiptPath;
|
|
54
|
+
}
|
|
55
|
+
const report = collectTriage(repo, runId, { receiptPath });
|
|
56
|
+
if (report.receipt === null && !values.latest) {
|
|
57
|
+
console.log(
|
|
58
|
+
`daily-triage: no schedule receipt found for ${runId} (overwritten by a later attempt?) — triaging from trace only`,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
if (values.json) {
|
|
62
|
+
console.log(JSON.stringify(report, null, 2));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
for (const line of summarizeTriage(report)) console.log(line);
|
|
66
|
+
const nestedRunId = report.nestedRuns[0]?.runId;
|
|
67
|
+
console.log(
|
|
68
|
+
`details: bun plugins/kk/scripts/daily-triage.ts --run ${runId} --repo ${join(repo)} --json${nestedRunId ? `; nested: spur workflow trace ${nestedRunId} --json` : ''}`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (import.meta.main) {
|
|
73
|
+
main(process.argv.slice(2));
|
|
74
|
+
}
|
|
@@ -56,6 +56,7 @@ import {
|
|
|
56
56
|
} from 'node:fs';
|
|
57
57
|
import { homedir } from 'node:os';
|
|
58
58
|
import { basename, dirname, join, resolve } from 'node:path';
|
|
59
|
+
import { compositeCover } from './cover-compositor';
|
|
59
60
|
|
|
60
61
|
export const SCRIPTS_DIR = import.meta.dir;
|
|
61
62
|
export const VALIDATE_SIDECAR = 'validate-voicescript.ts';
|
|
@@ -85,8 +86,8 @@ export const DEDUP_TITLE_THRESHOLD = 0.4;
|
|
|
85
86
|
// F614: the daily cover renders through the shipped daily-news presets; the brief's subject is
|
|
86
87
|
// the only per-run var. The format/style pins and the subject cap are part of the style
|
|
87
88
|
// contract — changing the look means editing the preset files, not this stage.
|
|
88
|
-
export const COVER_FORMAT = 'daily-news-cover';
|
|
89
|
-
export const COVER_STYLE = '
|
|
89
|
+
export const COVER_FORMAT = 'daily-news-podcast-cover';
|
|
90
|
+
export const COVER_STYLE = 'quasi-news-podcast';
|
|
90
91
|
export const COVER_SUBJECT_CAP = 240;
|
|
91
92
|
// E8: the XHS card series. Format and style are pinned exactly like the cover's; only the copy is
|
|
92
93
|
// model-authored. `XHS_MAX_CARDS` mirrors the format preset's own series guidance.
|
|
@@ -1016,6 +1017,20 @@ export function coverBrief(briefPath: string): { reason: string | null; subject:
|
|
|
1016
1017
|
return { reason: null, subject: trimmed };
|
|
1017
1018
|
}
|
|
1018
1019
|
|
|
1020
|
+
/** The 0347 cover brief's Hook headline, or '' when the brief is absent, malformed, or headline-less. */
|
|
1021
|
+
function briefHeadline(briefPath: string): string {
|
|
1022
|
+
if (!existsSync(briefPath)) return '';
|
|
1023
|
+
let parsed: unknown;
|
|
1024
|
+
try {
|
|
1025
|
+
parsed = JSON.parse(readFileSync(briefPath, 'utf-8'));
|
|
1026
|
+
} catch {
|
|
1027
|
+
return '';
|
|
1028
|
+
}
|
|
1029
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) return '';
|
|
1030
|
+
const headline = (parsed as Record<string, unknown>).headline;
|
|
1031
|
+
return typeof headline === 'string' ? headline.trim() : '';
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1019
1034
|
export function coverNormalizeBody(workDir: string, runDate: string): void {
|
|
1020
1035
|
// F614 R5: the artifact name follows the format preset (`<stem>-<format>-NN.<ext>`,
|
|
1021
1036
|
// paths.ts), so normalize reads the path the plugin itself recorded in the manifest instead
|
|
@@ -1056,6 +1071,20 @@ export function coverNormalizeBody(workDir: string, runDate: string): void {
|
|
|
1056
1071
|
// `rm -f` is silent when the file is already gone (a renamed source lands here too).
|
|
1057
1072
|
}
|
|
1058
1073
|
}
|
|
1074
|
+
// 0348: deterministic typography + branding overlay. The 0347 editorial brief carries a
|
|
1075
|
+
// Chinese Hook headline; when present, composite it (and the podcast emblem) onto the
|
|
1076
|
+
// normalized cover. Missing/invalid brief or empty headline keeps the raw background —
|
|
1077
|
+
// downstream stages read the same `${runDate}_07_cover_cover.png` either way.
|
|
1078
|
+
const briefPath = join(workDir, '23-cover', `${runDate}_07_cover-brief.json`);
|
|
1079
|
+
const headline = briefHeadline(briefPath);
|
|
1080
|
+
if (headline !== '') {
|
|
1081
|
+
try {
|
|
1082
|
+
compositeCover({ backgroundImagePath: out, headline, outputPath: out });
|
|
1083
|
+
} catch (error) {
|
|
1084
|
+
failWith(1, `cover composite: ${(error as Error).message}`);
|
|
1085
|
+
}
|
|
1086
|
+
console.error(`cover composited: headline=${headline.replaceAll('\n', ' ')}`);
|
|
1087
|
+
}
|
|
1059
1088
|
console.error(`cover normalized: ${runDate}_07_cover_cover.png`);
|
|
1060
1089
|
}
|
|
1061
1090
|
|
|
@@ -4,19 +4,23 @@ Review-item IDs here are **this skill's bookkeeping numbers**, not official plat
|
|
|
4
4
|
|
|
5
5
|
| Field | Value |
|
|
6
6
|
|-------|-------|
|
|
7
|
-
| Official source |
|
|
7
|
+
| Official source | ①《人工智能生成合成内容标识办法》原文(国信办通字〔2025〕2号)<https://www.cac.gov.cn/2025-03/14/c_1743654684782215.htm>(gov.cn 政策库镜像同文);② 微信平台公告《关于进一步规范人工智能生成合成内容标识的公告》(珊瑚安全公众号,2025-08-31)<https://mp.weixin.qq.com/s/XPemoV-jUB5wcJHWR6anlA>;③《微信公众平台运营规范》入口 <https://mp.weixin.qq.com>(规范原文仍未见逐条核验,自动化条款经官方口径转述核验,见 WX-05) |
|
|
8
8
|
| Scope | 公众号图文、音频素材库、标题/摘要/合集 |
|
|
9
|
-
| Effective date |
|
|
10
|
-
| Last verified | 2026-
|
|
11
|
-
| Evidence status |
|
|
12
|
-
| Changelog | 2026-09-29 — file created after the takedown report (task 0189) · 2026-10-10 — 操作者裁定:WX-02 降级为 note,不再 escalate |
|
|
9
|
+
| Effective date | 《标识办法》2025-09-01 施行(第十四条);运营规范版本/生效日期仍未核验 |
|
|
10
|
+
| Last verified | 2026-11-11(《标识办法》全文 + 微信平台 AI 标识公告原文已读;运营规范仅官方口径转述) |
|
|
11
|
+
| Evidence status | **AI 标识义务已核验**(《标识办法》官方原文 + 微信平台公告原文);WX-01/WX-04 仍为保守立场(规范原文未核验);2026-09-29 图文下架事件为**用户报告**,平台未给出书面理由 |
|
|
12
|
+
| Changelog | 2026-09-29 — file created after the takedown report (task 0189) · 2026-10-10 — 操作者裁定:WX-02 降级为 note,不再 escalate · 2026-11-11 — 核验《人工智能生成合成内容标识办法》全文(cac.gov.cn 原文)与微信平台 2025-08-31 AI 标识公告;WX-03 由 evidenceGap 升级为已核验条文;新增 WX-05(自动化创作条款,官方口径转述) |
|
|
13
13
|
|
|
14
14
|
## Evidence distinctions
|
|
15
15
|
|
|
16
|
-
-
|
|
17
|
-
|
|
16
|
+
- **官方规则(已核验原文)**:《人工智能生成合成内容标识办法》(cac.gov.cn,2025-03-14 发布,2025-09-01 施行);微信珊瑚安全公众号公告(2025-08-31)。关键条文:
|
|
17
|
+
- 办法第三条:AI 生成合成内容 = 利用 AI 技术生成的文本、图片、音频、视频、虚拟场景等;标识分显式与隐式。
|
|
18
|
+
- 办法第六条(四):传播平台应提供必要的标识功能,并**提醒用户主动声明**发布内容中是否包含生成合成内容。
|
|
19
|
+
- 办法第十条:用户使用传播服务发布生成合成内容的,**应当主动声明并使用服务提供者提供的标识功能进行标识**;不得恶意删除、篡改、伪造、隐匿标识。
|
|
20
|
+
- 微信公告(2025-08-31):依《办法》,平台对 AI 生成合成内容添加显式/隐式标识;「用户发布的内容为 AI 生成合成的,**发布时需主动进行声明**」;不得删除、篡改、伪造、隐匿平台添加的 AI 标识;违规视情况处罚。
|
|
21
|
+
- **官方口径(媒体转述,未读规范原文)**:运营规范 2026 年更新——公众号不得利用 AI、脚本、接口或自动化方式替代真人完成内容创作/发布;平台「鼓励创作者合理使用工具辅助创作」,反对完全由自动化程序替代真人生产(第一财经 2026-04-09 报道微信团队回应)。→ 见 WX-05。
|
|
18
22
|
- **用户报告**:2026-09-29 下架事件;无平台反馈。
|
|
19
|
-
-
|
|
23
|
+
- **编辑建议(本技能)**:WX-01/WX-04 为保守立场,规范原文未核验。
|
|
20
24
|
|
|
21
25
|
## Review items
|
|
22
26
|
|
|
@@ -24,9 +28,11 @@ Review-item IDs here are **this skill's bookkeeping numbers**, not official plat
|
|
|
24
28
|
|----|------|-------|
|
|
25
29
|
| WX-01 | 时政/公共事务主线:政治、外交/贸易管制、军事、公共政策争议、社会公共事件为主的图文或音频 | block |
|
|
26
30
|
| WX-02 | 资质口径:不做新闻资讯播报形态的标题/摘要(未持有相关资质;同小宇宙 XY-01 的教训)。**操作者裁定 2026-10-10**:同小宇宙 XY-01 裁定——本号不持有也不声称持有新闻资质,剩余风险只在单集标题/摘要是否真的退回播报形态,按 note 记录,不要因「账号无新闻资质」而 block 或 `escalate: true`;仅当某集实际呈现新闻播报形态时才升级为 block。 | note |
|
|
27
|
-
| WX-03 | AI
|
|
31
|
+
| WX-03 | AI 生成声明:**已核验(2026-11-11)**——《标识办法》第十条 + 微信 2025-08-31 公告:发布含 AI 生成内容时,**发布时通过平台声明入口主动声明**,并使用平台标识功能;声明属发布时元数据侧动作,不要求正文内声明句(同 AP-05 操作者裁定 2026-10-08 的栏目级说明口径)。不得删除/篡改/伪造/隐匿平台标识。审核问法:该集发布流程是否走声明入口;正文缺声明句不记 fix。 | disclose |
|
|
28
32
|
| WX-04 | 可识别个人信息;标题党/夸大断言(未经核实断言按类别 4 处理) | desensitize / fix |
|
|
33
|
+
| WX-05 | 真人创作/自动化条款(官方口径转述,规范原文未核验):不得利用 AI、脚本、接口等完全替代真人完成内容创作、发布;平台鼓励「合理使用工具辅助创作」。本栏目姿态为真人选题/编辑 + AI 辅助 + AI 合成配音,属鼓励范围;如运营规范原文可读时复核条款字样并更新本行。 | note |
|
|
29
34
|
|
|
30
35
|
## Open questions / escalation
|
|
31
36
|
|
|
32
|
-
-
|
|
37
|
+
- 运营规范原文仍未逐条核验 → WX-01/WX-04/WX-05 涉及条文判断一律人工复审;AI 标识义务(WX-03)已可依据已核验原文直接判断。
|
|
38
|
+
- 《标识办法》配套强制性国家标准(GB 45438-2025 等标识方法标准)未核验 → 显式/隐式标识的具体样式以平台实现为准。
|
|
@@ -66,7 +66,7 @@ At the episode level, write:
|
|
|
66
66
|
- `intro` (≤150 chars): names the top two or three concrete in-scope developments.
|
|
67
67
|
- `outro` (≤150 chars): a short close tying the items together.
|
|
68
68
|
- `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
|
-
- `cover` (≤240 chars): one concrete visual scene in English for the lead item (objects, settings, symbols, metaphor; no text, letters, numbers, logos, flags, or recognizable people).
|
|
69
|
+
- `cover` (≤240 chars): one concrete visual scene in English for the lead item (objects, settings, symbols, metaphor; no text, letters, numbers, logos, flags, or recognizable people). 0347 R4: it may instead be `{ "scene": "…", "headline": "…" }` — `scene` keeps the same English visual contract (≤240 chars), and `headline` is a punchy 1–2 line Chinese Hook headline (≤25 chars per line) grounded in the lead news story, for deterministic lower-third typesetting downstream.
|
|
70
70
|
- `cards`: `{ "title": "≤20字总标题", "body": "中文导语段落 + 3-5个话题标签" }` for the episode card series.
|
|
71
71
|
- `social`: `{ "short": "≤140字 X/Threads 短帖", "long": "≤500字 微博/LinkedIn 长帖" }` (plain text, no markdown headings, no emoji spam, grounded in the plan).
|
|
72
72
|
|
|
@@ -77,7 +77,7 @@ Output:
|
|
|
77
77
|
"version": 1,
|
|
78
78
|
"intro": "…",
|
|
79
79
|
"outro": "…",
|
|
80
|
-
"cover": "…",
|
|
80
|
+
"cover": { "scene": "…", "headline": "…" },
|
|
81
81
|
"cards": { "title": "…", "body": "…" },
|
|
82
82
|
"social": { "short": "…", "long": "…" },
|
|
83
83
|
"items": [
|
|
@@ -101,7 +101,7 @@ validator). Change only what the errors name and copy everything else unchanged.
|
|
|
101
101
|
|
|
102
102
|
| Rule | Fix |
|
|
103
103
|
|---|---|
|
|
104
|
-
| `cap:<field>` | Shorten that field (`intro`, `outro`, `lead`, `insight`, `cover`, `cardCopy`, `cardTitle`, `socialShort`, `socialLong`) below its cap in the contract. Cut opinion, not the actor |
|
|
104
|
+
| `cap:<field>` | Shorten that field (`intro`, `outro`, `lead`, `insight`, `cover`, `coverHeadline`, `cardCopy`, `cardTitle`, `socialShort`, `socialLong`) below its cap in the contract. Cut opinion, not the actor |
|
|
105
105
|
| `banned:<phrase>` | Rephrase without the phrase (applies to spoken, card and social fields alike) |
|
|
106
106
|
| `redundant-insight` | Rewrite the insight as commentary; drop the restated facts |
|
|
107
107
|
| `duplicate-insight` | Make each insight specific to its own item |
|