@gobing-ai/knowledge-kit 0.0.7 → 0.0.8
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/dist/index.js +21639 -11931
- package/package.json +4 -1
- package/plugins/generations/content-gen/package.json +2 -1
- package/plugins/generations/content-gen/src/index.ts +9 -8
- package/plugins/generations/content-gen/src/storm.ts +12 -4
- package/plugins/generations/voice-gen/package.json +17 -0
- package/plugins/generations/voice-gen/plugin.json +6 -0
- package/plugins/generations/voice-gen/src/concat.ts +218 -0
- package/plugins/generations/voice-gen/src/index.ts +213 -0
- package/plugins/generations/voice-gen/src/voicebox-client.ts +223 -0
- package/plugins/generations/voice-gen/src/voicescript.ts +365 -0
- package/plugins/generations/voice-gen/tsconfig.json +8 -0
- package/plugins/ingestions/karakeep-local/package.json +17 -0
- package/plugins/ingestions/karakeep-local/src/index.ts +31 -26
- package/plugins/ingestions/karakeep-local/tsconfig.json +4 -0
- package/plugins/ingestions/web-search/package.json +4 -1
- package/plugins/ingestions/web-search/src/index.ts +137 -15
- package/plugins/kk/README.md +9 -3
- package/plugins/kk/commands/workflow-run.md +100 -28
- package/plugins/kk/config.example.yaml +34 -0
- package/plugins/kk/scripts/render-md.ts +8 -3
- package/plugins/kk/skills/{judge → content-judge}/SKILL.md +13 -14
- package/plugins/kk/skills/{judge → content-judge}/references/workflow-integration.md +13 -11
- package/plugins/kk/skills/itc-generating/SKILL.md +147 -0
- package/plugins/kk/skills/itc-generating/references/generic-craft.md +80 -0
- package/plugins/kk/skills/itc-generating/references/platform-english.md +72 -0
- package/plugins/kk/skills/itc-generating/references/platform-wechat.md +60 -0
- package/plugins/kk/skills/itc-generating/references/skill-authoring.md +62 -0
- package/plugins/kk/skills/storm-research/SKILL.md +10 -3
- package/plugins/kk/workflows/judge-gated-publish-example.yaml +101 -0
- package/plugins/kk/workflows/kk-ingest-generate-publish.yaml +72 -0
- package/plugins/kk/workflows/kk-itc.yaml +285 -0
- package/plugins/kk/workflows/kk-solo-podcast.yaml +374 -0
- package/plugins/kk/workflows/validate-voicescript.ts +226 -0
- package/plugins/publishings/emdash-pub/package.json +17 -0
- package/plugins/publishings/emdash-pub/plugin.json +7 -0
- package/plugins/publishings/emdash-pub/src/index.ts +450 -0
- package/plugins/publishings/emdash-pub/tsconfig.json +4 -0
- package/plugins/publishings/qiita-pub/package.json +2 -1
- package/plugins/publishings/qiita-pub/src/index.ts +9 -9
- package/plugins/publishings/surfdash-pub/package.json +2 -1
- package/plugins/publishings/surfdash-pub/src/index.ts +16 -11
- package/plugins/publishings/zenn-pub/package.json +2 -1
- package/plugins/publishings/zenn-pub/src/index.ts +11 -11
- package/plugins/kk/agents/judge-compliance.md +0 -37
- package/plugins/kk/agents/judge-tech.md +0 -35
- package/plugins/kk/agents/judge-tone.md +0 -37
- /package/plugins/kk/skills/{judge → content-judge}/references/rubrics.md +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
2
1
|
import { homedir } from 'node:os';
|
|
3
2
|
import { dirname, join } from 'node:path';
|
|
4
3
|
import { parseArgs } from 'node:util';
|
|
5
4
|
import { type Content, ContentSchema, type Result, ResultSchema } from '@gobing-ai/kk-core';
|
|
6
5
|
import { FakeFileCliTransport, type PublishTransport, type PublishTransportPayload } from '@gobing-ai/publish-harness';
|
|
7
|
-
import {
|
|
6
|
+
import { createNodeFileSystem } from '@gobing-ai/ts-runtime';
|
|
7
|
+
import { echoError } from '@gobing-ai/ts-utils';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Converts a string into a lowercase hyphenated tag (slug) per the publish spec tags convention.
|
|
@@ -163,7 +163,7 @@ export class ZennCliFileCliTransport implements PublishTransport {
|
|
|
163
163
|
const repoPath = repo.startsWith('~') ? join(homedir(), repo.slice(2)) : repo;
|
|
164
164
|
|
|
165
165
|
try {
|
|
166
|
-
await
|
|
166
|
+
await createNodeFileSystem().ensureDir(repoPath);
|
|
167
167
|
|
|
168
168
|
const cliArgs = ['--yes', 'zenn', 'new:article', '--slug', slug, '--title', title, '--type', type];
|
|
169
169
|
if (emoji) {
|
|
@@ -179,9 +179,9 @@ export class ZennCliFileCliTransport implements PublishTransport {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
const articleDir = join(repoPath, 'articles');
|
|
182
|
-
await
|
|
182
|
+
await createNodeFileSystem().ensureDir(articleDir);
|
|
183
183
|
const articlePath = join(articleDir, `${slug}.md`);
|
|
184
|
-
await writeFile(articlePath, markdown
|
|
184
|
+
await createNodeFileSystem().writeFile(articlePath, markdown);
|
|
185
185
|
|
|
186
186
|
if (published) {
|
|
187
187
|
const gitSteps: string[][] = [
|
|
@@ -246,9 +246,9 @@ export function getPublishTransport(): PublishTransport {
|
|
|
246
246
|
async function writePublishResult(outputPath: string, result: Result): Promise<void> {
|
|
247
247
|
const outDir = dirname(outputPath);
|
|
248
248
|
if (outDir && outDir !== '.') {
|
|
249
|
-
await
|
|
249
|
+
await createNodeFileSystem().ensureDir(outDir);
|
|
250
250
|
}
|
|
251
|
-
await writeFile(outputPath, JSON.stringify(result, null, 2)
|
|
251
|
+
await createNodeFileSystem().writeFile(outputPath, JSON.stringify(result, null, 2));
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
/**
|
|
@@ -262,11 +262,11 @@ export async function processPublishIO(
|
|
|
262
262
|
outputPath: string,
|
|
263
263
|
transport: PublishTransport = getPublishTransport(),
|
|
264
264
|
): Promise<void> {
|
|
265
|
-
await
|
|
265
|
+
await createNodeFileSystem().deleteFile(outputPath);
|
|
266
266
|
|
|
267
267
|
let content: Content;
|
|
268
268
|
try {
|
|
269
|
-
const rawInput = await readFile(inputPath
|
|
269
|
+
const rawInput = await createNodeFileSystem().readFile(inputPath);
|
|
270
270
|
content = ContentSchema.parse(JSON.parse(rawInput));
|
|
271
271
|
} catch (error: unknown) {
|
|
272
272
|
const message = `Invalid Content input: ${error instanceof Error ? error.message : String(error)}`;
|
|
@@ -292,7 +292,7 @@ export async function main(): Promise<number> {
|
|
|
292
292
|
});
|
|
293
293
|
|
|
294
294
|
if (!values.in || !values.out) {
|
|
295
|
-
|
|
295
|
+
echoError('Missing required arguments: --in and --out');
|
|
296
296
|
return 1;
|
|
297
297
|
}
|
|
298
298
|
|
|
@@ -300,7 +300,7 @@ export async function main(): Promise<number> {
|
|
|
300
300
|
await processPublishIO(values.in, values.out);
|
|
301
301
|
return 0;
|
|
302
302
|
} catch (error: unknown) {
|
|
303
|
-
|
|
303
|
+
echoError(`zenn-pub failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
304
304
|
return 1;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: judge-compliance
|
|
3
|
-
description: This specialized judge agent should be used when evaluating generated content for regulatory, legal, or safety compliance — prohibited claims, required disclosures, jurisdictional rules, and PII/sensitive-data leakage. Triggers on "compliance check", "legal review of content", "check prohibited claims", "verify disclosures", "regulatory gate", or when a spur workflow needs a compliance evaluation gate before publishing. Delegates all evaluation logic to the judge fat skill with the compliance rubric pre-selected.
|
|
4
|
-
tools: Read, Grep, Glob
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# judge-compliance — compliance judge persona
|
|
8
|
-
|
|
9
|
-
Thin wrapper around the **judge** fat skill. Fixes the rubric to `compliance` and forwards
|
|
10
|
-
evaluation. Do not duplicate evaluation logic here — the skill owns it.
|
|
11
|
-
|
|
12
|
-
## Behavior
|
|
13
|
-
|
|
14
|
-
1. Receive the content path and the jurisdiction/policy config from the caller or workflow step.
|
|
15
|
-
2. Invoke the `judge` skill procedure with `rubric: compliance`.
|
|
16
|
-
3. Return the verdict JSON path; the skill writes the verdict file.
|
|
17
|
-
|
|
18
|
-
## Invocation contract
|
|
19
|
-
|
|
20
|
-
When invoked by an `agent.run` workflow step:
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
You are the judge-compliance persona.
|
|
24
|
-
Load the judge skill from plugins/kk/skills/judge/SKILL.md.
|
|
25
|
-
Evaluate the content at {{content_path}} against the compliance rubric
|
|
26
|
-
(plugins/kk/skills/judge/references/rubrics.md, section "compliance").
|
|
27
|
-
Jurisdiction/policy: {{jurisdiction}} # e.g. US-SEC, EU-GDPR, CN-CAC; or "unspecified"
|
|
28
|
-
Write the verdict JSON to {{verdict_path}} per the contract in SKILL.md.
|
|
29
|
-
Print the verdict path as the last line of stdout.
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Rubric
|
|
33
|
-
|
|
34
|
-
`compliance` — must-pass: `no-prohibited-claims`, `disclosure-presence`, `jurisdictional-rules`.
|
|
35
|
-
A single prohibited claim is an immediate `FAIL` regardless of score. `pass_threshold = 0.85`.
|
|
36
|
-
Full criteria and evaluation notes (including no-jurisdiction fallback) in the skill's
|
|
37
|
-
`references/rubrics.md`.
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: judge-tech
|
|
3
|
-
description: This specialized judge agent should be used when evaluating generated technical content for factual accuracy, citation integrity, and code correctness. Triggers on "check technical accuracy", "verify tech content", "fact-check technical", "review code samples in content", or when a spur workflow needs a technical-accuracy evaluation gate. Delegates all evaluation logic to the judge fat skill with the tech-accuracy rubric pre-selected.
|
|
4
|
-
tools: Read, Grep, Glob
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# judge-tech — technical-accuracy judge persona
|
|
8
|
-
|
|
9
|
-
Thin wrapper around the **judge** fat skill. Fixes the rubric to `tech-accuracy` and forwards
|
|
10
|
-
evaluation. Do not duplicate evaluation logic here — the skill owns it.
|
|
11
|
-
|
|
12
|
-
## Behavior
|
|
13
|
-
|
|
14
|
-
1. Receive the content path (and optional verdict output path) from the caller or workflow step.
|
|
15
|
-
2. Invoke the `judge` skill procedure with `rubric: tech-accuracy`.
|
|
16
|
-
3. Return the verdict JSON path; the skill writes the verdict file.
|
|
17
|
-
|
|
18
|
-
## Invocation contract
|
|
19
|
-
|
|
20
|
-
When invoked by an `agent.run` workflow step:
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
You are the judge-tech persona.
|
|
24
|
-
Load the judge skill from plugins/kk/skills/judge/SKILL.md.
|
|
25
|
-
Evaluate the content at {{content_path}} against the tech-accuracy rubric
|
|
26
|
-
(plugins/kk/skills/judge/references/rubrics.md, section "tech-accuracy").
|
|
27
|
-
Write the verdict JSON to {{verdict_path}} per the contract in SKILL.md.
|
|
28
|
-
Print the verdict path as the last line of stdout.
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Rubric
|
|
32
|
-
|
|
33
|
-
`tech-accuracy` — must-pass: `factual-correctness`, `no-fabricated-citations`,
|
|
34
|
-
`code-correctness`. `pass_threshold = 0.80`. Full criteria and evaluation notes in the skill's
|
|
35
|
-
`references/rubrics.md`.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: judge-tone
|
|
3
|
-
description: This specialized judge agent should be used when evaluating generated content for brand voice and tone consistency, banned-phrase compliance, and audience fit. Triggers on "check brand tone", "review voice consistency", "tone audit", "style guide check", or when a spur workflow needs a brand-tone evaluation gate before publishing. Delegates all evaluation logic to the judge fat skill with the brand-tone rubric pre-selected.
|
|
4
|
-
tools: Read, Grep, Glob
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# judge-tone — brand-tone judge persona
|
|
8
|
-
|
|
9
|
-
Thin wrapper around the **judge** fat skill. Fixes the rubric to `brand-tone` and forwards
|
|
10
|
-
evaluation. Do not duplicate evaluation logic here — the skill owns it.
|
|
11
|
-
|
|
12
|
-
## Behavior
|
|
13
|
-
|
|
14
|
-
1. Receive the content path and the brand config (tone profile + banned-phrase list) from the
|
|
15
|
-
caller or workflow step.
|
|
16
|
-
2. Invoke the `judge` skill procedure with `rubric: brand-tone`.
|
|
17
|
-
3. Return the verdict JSON path; the skill writes the verdict file.
|
|
18
|
-
|
|
19
|
-
## Invocation contract
|
|
20
|
-
|
|
21
|
-
When invoked by an `agent.run` workflow step:
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
You are the judge-tone persona.
|
|
25
|
-
Load the judge skill from plugins/kk/skills/judge/SKILL.md.
|
|
26
|
-
Evaluate the content at {{content_path}} against the brand-tone rubric
|
|
27
|
-
(plugins/kk/skills/judge/references/rubrics.md, section "brand-tone").
|
|
28
|
-
Brand config (tone profile + banned phrases): {{brand_config}}
|
|
29
|
-
Write the verdict JSON to {{verdict_path}} per the contract in SKILL.md.
|
|
30
|
-
Print the verdict path as the last line of stdout.
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Rubric
|
|
34
|
-
|
|
35
|
-
`brand-tone` — must-pass: `tone-consistency`, `banned-phrase-compliance`. `pass_threshold = 0.70`.
|
|
36
|
-
Full criteria and evaluation notes (including no-config fallback) in the skill's
|
|
37
|
-
`references/rubrics.md`.
|
|
File without changes
|