@gobing-ai/knowledge-kit 0.1.10 → 0.1.12

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.
Files changed (158) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/dist/index.js +2478 -1737
  3. package/package.json +1 -1
  4. package/plugins/generations/image-gen/README.md +108 -0
  5. package/plugins/generations/image-gen/assets/sample/cover__clean-webapp-ui.jpg +0 -0
  6. package/plugins/generations/image-gen/assets/sample/cover__cute.jpg +0 -0
  7. package/plugins/generations/image-gen/assets/sample/cover__daily-news.jpg +0 -0
  8. package/plugins/generations/image-gen/assets/sample/cover__editorial.jpg +0 -0
  9. package/plugins/generations/image-gen/assets/sample/cover__fresh.jpg +0 -0
  10. package/plugins/generations/image-gen/assets/sample/cover__minimalist.jpg +0 -0
  11. package/plugins/generations/image-gen/assets/sample/cover__photorealistic.jpg +0 -0
  12. package/plugins/generations/image-gen/assets/sample/cover__sketch.jpg +0 -0
  13. package/plugins/generations/image-gen/assets/sample/cover__technical-diagram.jpg +0 -0
  14. package/plugins/generations/image-gen/assets/sample/cover__vibrant.jpg +0 -0
  15. package/plugins/generations/image-gen/assets/sample/cover__warm.jpg +0 -0
  16. package/plugins/generations/image-gen/assets/sample/cover__xhs-knowledge.jpg +0 -0
  17. package/plugins/generations/image-gen/assets/sample/daily-news-cover__clean-webapp-ui.jpg +0 -0
  18. package/plugins/generations/image-gen/assets/sample/daily-news-cover__cute.jpg +0 -0
  19. package/plugins/generations/image-gen/assets/sample/daily-news-cover__daily-news.jpg +0 -0
  20. package/plugins/generations/image-gen/assets/sample/daily-news-cover__editorial.jpg +0 -0
  21. package/plugins/generations/image-gen/assets/sample/daily-news-cover__fresh.jpg +0 -0
  22. package/plugins/generations/image-gen/assets/sample/daily-news-cover__minimalist.jpg +0 -0
  23. package/plugins/generations/image-gen/assets/sample/daily-news-cover__photorealistic.jpg +0 -0
  24. package/plugins/generations/image-gen/assets/sample/daily-news-cover__sketch.jpg +0 -0
  25. package/plugins/generations/image-gen/assets/sample/daily-news-cover__technical-diagram.jpg +0 -0
  26. package/plugins/generations/image-gen/assets/sample/daily-news-cover__vibrant.jpg +0 -0
  27. package/plugins/generations/image-gen/assets/sample/daily-news-cover__warm.jpg +0 -0
  28. package/plugins/generations/image-gen/assets/sample/daily-news-cover__xhs-knowledge.jpg +0 -0
  29. package/plugins/generations/image-gen/assets/sample/free__clean-webapp-ui.jpg +0 -0
  30. package/plugins/generations/image-gen/assets/sample/free__cute.jpg +0 -0
  31. package/plugins/generations/image-gen/assets/sample/free__daily-news.jpg +0 -0
  32. package/plugins/generations/image-gen/assets/sample/free__editorial.jpg +0 -0
  33. package/plugins/generations/image-gen/assets/sample/free__fresh.jpg +0 -0
  34. package/plugins/generations/image-gen/assets/sample/free__minimalist.jpg +0 -0
  35. package/plugins/generations/image-gen/assets/sample/free__photorealistic.jpg +0 -0
  36. package/plugins/generations/image-gen/assets/sample/free__sketch.jpg +0 -0
  37. package/plugins/generations/image-gen/assets/sample/free__technical-diagram.jpg +0 -0
  38. package/plugins/generations/image-gen/assets/sample/free__vibrant.jpg +0 -0
  39. package/plugins/generations/image-gen/assets/sample/free__warm.jpg +0 -0
  40. package/plugins/generations/image-gen/assets/sample/free__xhs-knowledge.jpg +0 -0
  41. package/plugins/generations/image-gen/assets/sample/illustration__clean-webapp-ui.jpg +0 -0
  42. package/plugins/generations/image-gen/assets/sample/illustration__cute.jpg +0 -0
  43. package/plugins/generations/image-gen/assets/sample/illustration__daily-news.jpg +0 -0
  44. package/plugins/generations/image-gen/assets/sample/illustration__editorial.jpg +0 -0
  45. package/plugins/generations/image-gen/assets/sample/illustration__fresh.jpg +0 -0
  46. package/plugins/generations/image-gen/assets/sample/illustration__minimalist.jpg +0 -0
  47. package/plugins/generations/image-gen/assets/sample/illustration__photorealistic.jpg +0 -0
  48. package/plugins/generations/image-gen/assets/sample/illustration__sketch.jpg +0 -0
  49. package/plugins/generations/image-gen/assets/sample/illustration__technical-diagram.jpg +0 -0
  50. package/plugins/generations/image-gen/assets/sample/illustration__vibrant.jpg +0 -0
  51. package/plugins/generations/image-gen/assets/sample/illustration__warm.jpg +0 -0
  52. package/plugins/generations/image-gen/assets/sample/illustration__xhs-knowledge.jpg +0 -0
  53. package/plugins/generations/image-gen/assets/sample/xhs-card__clean-webapp-ui.jpg +0 -0
  54. package/plugins/generations/image-gen/assets/sample/xhs-card__cute.jpg +0 -0
  55. package/plugins/generations/image-gen/assets/sample/xhs-card__daily-news.jpg +0 -0
  56. package/plugins/generations/image-gen/assets/sample/xhs-card__editorial.jpg +0 -0
  57. package/plugins/generations/image-gen/assets/sample/xhs-card__fresh.jpg +0 -0
  58. package/plugins/generations/image-gen/assets/sample/xhs-card__minimalist.jpg +0 -0
  59. package/plugins/generations/image-gen/assets/sample/xhs-card__photorealistic.jpg +0 -0
  60. package/plugins/generations/image-gen/assets/sample/xhs-card__sketch.jpg +0 -0
  61. package/plugins/generations/image-gen/assets/sample/xhs-card__technical-diagram.jpg +0 -0
  62. package/plugins/generations/image-gen/assets/sample/xhs-card__vibrant.jpg +0 -0
  63. package/plugins/generations/image-gen/assets/sample/xhs-card__warm.jpg +0 -0
  64. package/plugins/generations/image-gen/assets/sample/xhs-card__xhs-knowledge.jpg +0 -0
  65. package/plugins/generations/image-gen/dist/index.js +102 -58
  66. package/plugins/generations/image-gen/scripts/compose-e2e-artifact.ts +5 -21
  67. package/plugins/generations/image-gen/scripts/gen-samples.ts +208 -0
  68. package/plugins/generations/image-gen/src/compose/chromium.ts +2 -3
  69. package/plugins/generations/image-gen/src/presets.ts +6 -3
  70. package/plugins/generations/image-gen/src/providers/errors.ts +16 -1
  71. package/plugins/generations/image-gen/src/providers/minimax.ts +46 -17
  72. package/plugins/ingestions/web-search/src/index.ts +1 -1
  73. package/plugins/kk/README.md +18 -0
  74. package/plugins/kk/commands/image-extract.md +1 -0
  75. package/plugins/kk/commands/image-generate.md +1 -0
  76. package/plugins/kk/commands/tell-me.md +1 -0
  77. package/plugins/kk/commands/workflow-run.md +7 -1
  78. package/plugins/kk/decisions/extract/it-topics.yaml +24 -0
  79. package/plugins/kk/decisions/kk-itc.yaml +6 -4
  80. package/plugins/kk/plugin.json +1 -1
  81. package/plugins/kk/publish-presets/daily-ai-voice-migration.json +146 -0
  82. package/plugins/kk/publish-presets/daily-ai-voice.json +11 -3
  83. package/plugins/kk/schedules/kk-collect.grok-bot.md.tmpl +69 -0
  84. package/plugins/kk/schedules/kk-daily-ai-voice3.cron.tmpl +18 -0
  85. package/plugins/kk/schedules/kk-daily-publish3-cn-peak.cron.tmpl +15 -5
  86. package/plugins/kk/schedules/kk-daily-publish3-overseas.cron.tmpl +9 -4
  87. package/plugins/kk/scripts/daily-scheduled-run.ts +298 -0
  88. package/plugins/kk/scripts/daily-stages.ts +1403 -156
  89. package/plugins/kk/scripts/kk-workflow-stages.ts +266 -10
  90. package/plugins/kk/scripts/safety-artifact-check.ts +277 -0
  91. package/plugins/kk/scripts/voice3-publish-window.ts +202 -0
  92. package/plugins/kk/skills/article-adapt/SKILL.md +1 -0
  93. package/plugins/kk/skills/audio-authoring/SKILL.md +1 -0
  94. package/plugins/kk/skills/content-judge/SKILL.md +1 -0
  95. package/plugins/kk/skills/content-safety/SKILL.md +1 -0
  96. package/plugins/kk/skills/explain-things/SKILL.md +1 -0
  97. package/plugins/kk/skills/image-authoring/SKILL.md +1 -0
  98. package/plugins/kk/skills/itc-generating/SKILL.md +1 -0
  99. package/plugins/kk/skills/publish/SKILL.md +1 -0
  100. package/plugins/kk/skills/smart-seo/SKILL.md +1 -0
  101. package/plugins/kk/skills/storm-research/SKILL.md +1 -0
  102. package/plugins/kk/skills/taste-unslop/SKILL.md +1 -0
  103. package/plugins/kk/skills/topic/SKILL.md +1 -0
  104. package/plugins/kk/skills/web-automation/SKILL.md +1 -0
  105. package/plugins/kk/skills/xhs-images/SKILL.md +1 -0
  106. package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +177 -128
  107. package/plugins/kk/workflows/kk-daily-ai-voice3.yaml +161 -61
  108. package/plugins/kk/workflows/kk-daily-publish3.yaml +82 -26
  109. package/plugins/kk/workflows/kk-daily-safety.yaml +156 -69
  110. package/plugins/kk/workflows/kk-itc-author.yaml +75 -0
  111. package/plugins/kk/workflows/kk-itc-publish-tail.yaml +25 -3
  112. package/plugins/kk/workflows/kk-itc.yaml +36 -4
  113. package/plugins/publishings/bilibili-pub/dist/index.js +2 -1
  114. package/plugins/publishings/bilibili-pub/dist/profile-check.js +2 -1
  115. package/plugins/publishings/cnblogs-pub/dist/index.js +2 -1
  116. package/plugins/publishings/cnblogs-pub/dist/profile-check.js +2 -1
  117. package/plugins/publishings/csdn-pub/dist/index.js +2 -1
  118. package/plugins/publishings/csdn-pub/dist/profile-check.js +2 -1
  119. package/plugins/publishings/infoq-pub/dist/index.js +2 -1
  120. package/plugins/publishings/infoq-pub/dist/profile-check.js +2 -1
  121. package/plugins/publishings/jike-pub/dist/index.js +2 -1
  122. package/plugins/publishings/jike-pub/dist/profile-check.js +2 -1
  123. package/plugins/publishings/juejin-pub/dist/index.js +2 -1
  124. package/plugins/publishings/juejin-pub/dist/profile-check.js +2 -1
  125. package/plugins/publishings/linkedin-pub/dist/index.js +21333 -0
  126. package/plugins/publishings/linkedin-pub/dist/profile-check.js +21005 -0
  127. package/plugins/publishings/linkedin-pub/package.json +19 -0
  128. package/plugins/publishings/linkedin-pub/plugin.json +12 -0
  129. package/plugins/publishings/linkedin-pub/src/index.ts +705 -0
  130. package/plugins/publishings/linkedin-pub/src/profile-check.ts +17 -0
  131. package/plugins/publishings/linkedin-pub/tsconfig.json +4 -0
  132. package/plugins/publishings/podcast-pub/dist/index.js +46 -8
  133. package/plugins/publishings/podcast-pub/src/index.ts +62 -5
  134. package/plugins/publishings/shipinhao-pub/dist/index.js +2 -1
  135. package/plugins/publishings/shipinhao-pub/dist/profile-check.js +2 -1
  136. package/plugins/publishings/sspai-pub/dist/index.js +2 -1
  137. package/plugins/publishings/sspai-pub/dist/profile-check.js +2 -1
  138. package/plugins/publishings/substack-pub/dist/index.js +2 -1
  139. package/plugins/publishings/substack-pub/dist/profile-check.js +2 -1
  140. package/plugins/publishings/surfdash-pub/dist/index.js +461 -53
  141. package/plugins/publishings/surfdash-pub/src/digest-check.ts +85 -19
  142. package/plugins/publishings/surfdash-pub/src/index.ts +592 -65
  143. package/plugins/publishings/threads-pub/dist/index.js +7 -0
  144. package/plugins/publishings/threads-pub/src/index.ts +12 -0
  145. package/plugins/publishings/wechatmp-pub/dist/index.js +936 -98
  146. package/plugins/publishings/wechatmp-pub/dist/profile-check.js +60 -3
  147. package/plugins/publishings/wechatmp-pub/src/flow.ts +1134 -86
  148. package/plugins/publishings/wechatmp-pub/src/index.ts +112 -30
  149. package/plugins/publishings/wechatmp-pub/src/page.ts +105 -0
  150. package/plugins/publishings/weibo-pub/dist/index.js +2 -1
  151. package/plugins/publishings/weibo-pub/dist/profile-check.js +2 -1
  152. package/plugins/publishings/x-pub/dist/index.js +9 -1
  153. package/plugins/publishings/x-pub/dist/profile-check.js +2 -1
  154. package/plugins/publishings/x-pub/src/index.ts +11 -0
  155. package/plugins/publishings/xhs-pub/dist/index.js +2 -1
  156. package/plugins/publishings/xhs-pub/dist/profile-check.js +2 -1
  157. package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +2 -1
  158. package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +2 -1
@@ -0,0 +1,202 @@
1
+ #!/usr/bin/env bun
2
+ /**
3
+ * voice3-publish-window — cron-safe launcher for the voice3 shadow publish window (task 0334).
4
+ *
5
+ * WHY a launcher (audit F08/F09/F10, docs/design/kk-daily-ai-voice3.md):
6
+ * - cron ends a command at the first UNESCAPED % and feeds the rest to stdin, so any inline
7
+ * `$(date +%Y%m%d)` shell in a crontab entry silently truncates the command. Date math and
8
+ * flag assembly live here, in plain TypeScript, behind zero percent signs.
9
+ * - the publish window must read the GENERATION bundle (`<works>/kk-daily-ai-voice2/<date>/
10
+ * bundle.json` — voice3 prepares under the voice2 namespace until the operator's cutover
11
+ * changes it), never the publish3 output directory that earlier entries pointed at.
12
+ * - the CN consent token list is validated against the pinned preset's WINDOW rows before any
13
+ * spur process starts; the old baked `wechatmp-pub,xhs-pub,…` list (tokens that have no
14
+ * cn-peak row) is refused up front.
15
+ *
16
+ * Contract: everything before `spur workflow run plugins/kk/workflows/kk-daily-publish3.yaml`
17
+ * is preparation and refusal; the only side effects are refusal messages and, on success, the
18
+ * single spur exec. `KK_SPUR_BIN` pins the spur binary (same convention as board/capture.ts and
19
+ * decision-hub.ts); `--dry-run` prints the forwarded vars and stops (rehearsal aid).
20
+ */
21
+ import { spawnSync } from 'node:child_process';
22
+ import { existsSync, readFileSync } from 'node:fs';
23
+ import { homedir } from 'node:os';
24
+ import { dirname, join, resolve } from 'node:path';
25
+ import { fileURLToPath } from 'node:url';
26
+
27
+ const USAGE =
28
+ 'usage: voice3-publish-window.ts --window <after-generate|cn-peak|overseas-rss> [--run-date <YYYY-MM-DD|YYYYMMDD>] ' +
29
+ '[--preset <slug>] [--live-channels a,b] [--work-dir <dir>] [--dummy] [--dry-run]';
30
+
31
+ const WINDOWS = new Set(['after-generate', 'cn-peak', 'overseas-rss']);
32
+
33
+ function failWith(code: number, message: string): never {
34
+ console.error(message);
35
+ process.exit(code);
36
+ }
37
+
38
+ function expandHome(raw: string): string {
39
+ return raw === '~' || raw.startsWith('~/') ? join(homedir(), raw.slice(1)) : raw;
40
+ }
41
+
42
+ /** KK_WORKS_DIR env > config works_dir > <cwd>/.works — the kk-workflow-stages precedence. */
43
+ function resolveWorksDir(): string {
44
+ const fromEnv = process.env.KK_WORKS_DIR;
45
+ if (fromEnv) return expandHome(fromEnv);
46
+ const configPath = process.env.KK_CONFIG || join(homedir(), '.config/kk/config.yaml');
47
+ if (existsSync(configPath)) {
48
+ try {
49
+ const parsed = Bun.YAML.parse(readFileSync(configPath, 'utf-8')) as Record<string, unknown> | null;
50
+ const worksDir = parsed !== null && typeof parsed === 'object' ? parsed.works_dir : undefined;
51
+ if (typeof worksDir === 'string' && worksDir !== '') return expandHome(worksDir);
52
+ } catch {
53
+ // fall through to the compiled default
54
+ }
55
+ }
56
+ return resolve(process.cwd(), '.works');
57
+ }
58
+
59
+ /** A real calendar day as `YYYY-MM-DD`, or undefined (mirrors publish-matrix normalizeRunDate). */
60
+ function normalizeRunDate(raw: string): string | undefined {
61
+ const match = /^(\d{4})-?(\d{2})-?(\d{2})$/.exec(raw.trim());
62
+ if (match === null) return undefined;
63
+ const iso = `${match[1]}-${match[2]}-${match[3]}`;
64
+ const parsed = new Date(`${iso}T00:00:00Z`);
65
+ if (
66
+ Number.isNaN(parsed.getTime()) ||
67
+ parsed.getUTCFullYear() !== Number(match[1]) ||
68
+ parsed.getUTCMonth() + 1 !== Number(match[2]) ||
69
+ parsed.getUTCDate() !== Number(match[3])
70
+ ) {
71
+ return undefined;
72
+ }
73
+ return iso;
74
+ }
75
+
76
+ /** Today (offset 0) or yesterday (offset -1) in America/Los_Angeles — the episodes' own day. */
77
+ function losAngelesDate(offsetDays: number): string {
78
+ const instant = new Date(Date.now() + offsetDays * 24 * 60 * 60 * 1000);
79
+ // en-CA renders YYYY-MM-DD; Intl does the zone math cron cannot do inline.
80
+ return new Intl.DateTimeFormat('en-CA', { timeZone: 'America/Los_Angeles' }).format(instant);
81
+ }
82
+
83
+ /** `--flag value`, or undefined. */
84
+ function flagValue(args: string[], flag: string): string | undefined {
85
+ const index = args.indexOf(flag);
86
+ return index >= 0 ? args[index + 1] : undefined;
87
+ }
88
+
89
+ function main(): void {
90
+ const args = process.argv.slice(2);
91
+ if (args.includes('--help') || args.includes('-h')) {
92
+ console.log(USAGE);
93
+ process.exit(0);
94
+ }
95
+ const window = flagValue(args, '--window');
96
+ if (window === undefined || !WINDOWS.has(window))
97
+ failWith(1, `${USAGE}\nvoice3-publish-window: --window must be one of ${[...WINDOWS].join('|')}`);
98
+ const dummy = args.includes('--dummy');
99
+ const dryRun = args.includes('--dry-run');
100
+ const preset = flagValue(args, '--preset');
101
+ const liveChannelsRaw = flagValue(args, '--live-channels');
102
+ const workDirOverride = flagValue(args, '--work-dir');
103
+
104
+ // R1: run date = explicit flag, else window-derived LA day (overseas reads the episode that
105
+ // landed after the 07:00 tick, i.e. yesterday).
106
+ const runDateRaw = flagValue(args, '--run-date');
107
+ let runDate: string | undefined;
108
+ if (runDateRaw !== undefined && runDateRaw.trim() !== '') {
109
+ runDate = normalizeRunDate(runDateRaw);
110
+ if (runDate === undefined)
111
+ failWith(1, `voice3-publish-window: '${runDateRaw}' is not a valid calendar day (YYYY-MM-DD or YYYYMMDD)`);
112
+ } else {
113
+ runDate = losAngelesDate(window === 'overseas-rss' ? -1 : 0);
114
+ }
115
+ const digits = runDate.replaceAll('-', '');
116
+
117
+ if (dummy && liveChannelsRaw !== undefined) {
118
+ failWith(1, 'voice3-publish-window: --dummy and --live-channels are mutually exclusive');
119
+ }
120
+
121
+ // R3/F10: live tokens validate against the pinned preset's WINDOW rows before any spawn.
122
+ const liveChannels =
123
+ liveChannelsRaw !== undefined && liveChannelsRaw.trim() !== ''
124
+ ? liveChannelsRaw
125
+ .split(',')
126
+ .map((token) => token.trim())
127
+ .filter((token) => token !== '')
128
+ : [];
129
+ if (liveChannels.length > 0 && preset === undefined) {
130
+ failWith(1, 'voice3-publish-window: --live-channels requires an explicit --preset to validate the window');
131
+ }
132
+ if (liveChannels.length > 0) {
133
+ const scriptDir = dirname(fileURLToPath(import.meta.url));
134
+ const presetPath = join(dirname(scriptDir), 'publish-presets', `${preset}.json`);
135
+ if (!existsSync(presetPath))
136
+ failWith(1, `voice3-publish-window: preset '${preset}' not found at ${presetPath}`);
137
+ const parsed = JSON.parse(readFileSync(presetPath, 'utf-8')) as {
138
+ targets?: Array<{ plugin: string; id?: string; mode?: string; window?: string }>;
139
+ };
140
+ const targets = parsed.targets ?? [];
141
+ const inWindow = targets.filter((target) => (target.window ?? 'after-generate') === window);
142
+ const refused = liveChannels.filter((token) => {
143
+ const row = inWindow.find((target) => target.plugin === token || target.id === token);
144
+ return row === undefined || (row.mode ?? 'draft') === 'off';
145
+ });
146
+ if (refused.length > 0) {
147
+ failWith(
148
+ 1,
149
+ `voice3-publish-window: live token(s) ${refused.join(', ')} have no active row in window '${window}' of preset '${preset}'` +
150
+ ` (send-confirm resumes are consent-scoped per window; see docs/design/kk-daily-ai-voice3.md)`,
151
+ );
152
+ }
153
+ }
154
+
155
+ // R1/F08: the bundle is the GENERATION artifact under the voice2 namespace, never a publish3
156
+ // output dir. Mismatched/missing bundles refuse before spur starts.
157
+ const genDir =
158
+ workDirOverride !== undefined && workDirOverride.trim() !== ''
159
+ ? resolve(workDirOverride)
160
+ : join(resolveWorksDir(), 'kk-daily-ai-voice2', digits);
161
+ const bundlePath = join(genDir, 'bundle.json');
162
+ if (!existsSync(bundlePath)) failWith(1, `voice3-publish-window: no generation bundle at ${bundlePath}`);
163
+ let bundleRunDate: string | undefined;
164
+ try {
165
+ const bundle = JSON.parse(readFileSync(bundlePath, 'utf-8')) as { runDate?: string };
166
+ bundleRunDate = typeof bundle.runDate === 'string' ? normalizeRunDate(bundle.runDate) : undefined;
167
+ } catch {
168
+ failWith(1, `voice3-publish-window: unreadable generation bundle at ${bundlePath}`);
169
+ }
170
+ if (bundleRunDate !== runDate) {
171
+ failWith(
172
+ 1,
173
+ `voice3-publish-window: bundle at ${bundlePath} is dated ${bundleRunDate ?? 'unknown'}, not the requested ${runDate}`,
174
+ );
175
+ }
176
+
177
+ const vars: Record<string, string> = {
178
+ work_dir: genDir,
179
+ run_date: digits,
180
+ window,
181
+ };
182
+ if (preset !== undefined && preset.trim() !== '') vars.preset = preset;
183
+ if (liveChannels.length > 0) vars.live_channels = liveChannels.join(',');
184
+ if (dummy) vars.dummy = 'true';
185
+
186
+ if (dryRun) {
187
+ console.log(JSON.stringify(vars, null, 2));
188
+ process.exit(0);
189
+ }
190
+
191
+ const proc = spawnSync(
192
+ process.env.KK_SPUR_BIN || 'spur',
193
+ ['workflow', 'run', 'plugins/kk/workflows/kk-daily-publish3.yaml', '--vars', JSON.stringify(vars)],
194
+ {
195
+ stdio: 'inherit',
196
+ },
197
+ );
198
+ // node spawnSync surfaces the child's code as `status` (exitCode is the async-API field).
199
+ process.exit(proc.status ?? 1);
200
+ }
201
+
202
+ main();
@@ -3,6 +3,7 @@ name: article-adapt
3
3
  # Description rules: front-load the leading identity phrase; one trigger per genuine
4
4
  # branch (collapse synonym triggers into one); never restate the body's identity line.
5
5
  description: This skill should be used when a kk-itc publish plan contains variants with adapt=true and per-variant Content files must be written — "adapt the article", "translate for the target profile", "write content.zh-article.json", or when a spur workflow agent.run step invokes kk:article-adapt. Translates title and body to the variant locale, applies the plan limits, and preserves code blocks, URLs and references; it holds no platform table.
6
+ requires: [cli:kk, cli:spur, local-fs]
6
7
  ---
7
8
 
8
9
  # article-adapt
@@ -6,6 +6,7 @@ description: >-
6
6
  "outline options for audio", "author a VoiceScript", "revise the script".
7
7
  Runs briefing → outline → script with explicit operator gates; solo mode
8
8
  ships first, dialogue/interview/narration are named extension points.
9
+ requires: [local-fs]
9
10
  ---
10
11
 
11
12
  # audio-authoring — spoken-audio authoring (create | briefing | outline | script)
@@ -2,6 +2,7 @@
2
2
  name: content-judge
3
3
  description: This skill should be used when an LLM evaluation gate is needed in a knowledge-kit pipeline — "judge this content", "evaluate against rubric", "quality gate before publish", "check technical accuracy", "review brand tone", "compliance check", or when a spur workflow step of type `agent.run` targets the content-judge skill to emit a PASS/FAIL/NEEDS_REVISION verdict. Centralizes evaluation rubrics, prompt templates, and structured verdict emission for generated Content.
4
4
  version: 0.1.0
5
+ requires: [cli:kk, cli:spur, local-fs]
5
6
  ---
6
7
 
7
8
  # content-judge — LLM-as-judge evaluation skill
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: content-safety
3
3
  description: This skill should be used when a knowledge-kit pipeline or operator needs a content-safety / platform-admission review before publishing — "check this before publishing", "小宇宙/公众号/网易云/苹果播客 审核风险", "desensitize personal info", "verify disclosure and sourcing before publish". Detects admission risk per distribution platform, proposes honest revisions or exclusion, and escalates what it cannot verify. Quality scoring is content-judge's job.
4
+ requires: [local-fs]
4
5
  ---
5
6
 
6
7
  # content-safety — pre-publication content-safety review
@@ -7,6 +7,7 @@ description: >-
7
7
  "how does X work", "ELI5", "like I'm 5", or "show me". Normal explanations are
8
8
  concise inline views; the ELI5 register is opt-in. This is not for content authoring,
9
9
  research, judging, publishing, or package/code review workflows.
10
+ requires: [local-fs]
10
11
  ---
11
12
 
12
13
  # explain-things
@@ -7,6 +7,7 @@ description: >-
7
7
  "list the image formats and styles". Three operations — generate,
8
8
  extract-style, list-presets — over named format and style presets, with a
9
9
  confirmation gate before any paid generation.
10
+ requires: [cli:kk, cli:spur, local-fs]
10
11
  ---
11
12
 
12
13
  # image-authoring — image generation agent surface (generate | extract-style | list-presets)
@@ -7,6 +7,7 @@ description: >-
7
7
  writing method", "generate an IT technical draft on X", "create a technical
8
8
  article for WeChat/English platforms". Orchestrates topic (outline + draft),
9
9
  optional storm-research, and optional content-judge without enlarging those skills.
10
+ requires: [cli:kk, local-fs]
10
11
  ---
11
12
 
12
13
  # itc-generating — IT technical draft generation (method + orchestration)
@@ -6,6 +6,7 @@ description: >-
6
6
  `kk executor run` / `kk fanout` for file-cli and script channels; sequences
7
7
  agent-default CMS channels as workflow `agent.run` steps. Does not own
8
8
  transport.
9
+ requires: [cli:kk, local-fs]
9
10
  ---
10
11
 
11
12
  # publish — leftover channel operator surface
@@ -6,6 +6,7 @@ description: >-
6
6
  this saved audit", "explain these SEO findings", or "check GEO readiness". Read-only results: no
7
7
  site mutation, no ranking and no citation promises.
8
8
  version: 0.1.0
9
+ requires: [cli:kk, cli:spur, local-fs]
9
10
  ---
10
11
 
11
12
  # smart-seo — evidence-grounded SEO/GEO audits
@@ -8,6 +8,7 @@ description: >-
8
8
  (prepare → ingest → generate → render) over the 0056 works layout. Research is separate from
9
9
  authoring: topic owns init→outline→draft and this skill never merges into topic.
10
10
  version: 0.1.0
11
+ requires: [cli:kk, local-fs]
11
12
  ---
12
13
 
13
14
  # storm-research — STORM daily research (topic sentence XOR markdown file → content.md)
@@ -5,6 +5,7 @@ description: >-
5
5
  voice and substance — "make this sound human", "remove the AI tells", "audit this
6
6
  copy for canned patterns", "restore my voice after AI editing". Not for code,
7
7
  translation-only work, or proofreading that must preserve style.
8
+ requires: [local-fs]
8
9
  ---
9
10
 
10
11
  # taste-unslop
@@ -7,6 +7,7 @@ description: >-
7
7
  Runs the topic-core authoring loop (init → outline → draft) through four
8
8
  operations with explicit operator gates and safe resume. knowledge-kit's
9
9
  cohesive topic-authoring core, harvested from the WT 7-stage wrappers.
10
+ requires: [cli:kk, cli:spur, local-fs]
10
11
  ---
11
12
 
12
13
  # topic — topic-core authoring (create | init | outline | draft)
@@ -9,6 +9,7 @@ description: >-
9
9
  web-automation skill. Owns method and evidence; transport stays in kk
10
10
  plugins; orchestration is a @gobing-ai/ts-dual-workflow-engine
11
11
  transition-flow (see docs/design/web-automation-engine.md).
12
+ requires: [cli:spur, local-fs]
12
13
  ---
13
14
 
14
15
  # web-automation — discover, enhance, automate with a real browser
@@ -7,6 +7,7 @@ description: >-
7
7
  closing) grounded in the source, renders them through the image-gen executor
8
8
  with the xhs-card/xhs-knowledge presets, packages a publishable Content, and
9
9
  hands off to kk:publish channel xhs. Never publishes directly.
10
+ requires: [cli:kk, local-fs]
10
11
  ---
11
12
 
12
13
  # xhs-images — source-grounded XHS card series (plan → render → package → handoff)