@gobing-ai/knowledge-kit 0.0.9 → 0.0.11

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.
@@ -0,0 +1,68 @@
1
+ # Pattern guide
2
+
3
+ Use these patterns during the scan in `SKILL.md`. A matching word or punctuation mark is not enough
4
+ to justify an edit. Change it only when the usage is formulaic, repeated, vague, or wrong for the
5
+ requested voice.
6
+
7
+ ## Content and evidence
8
+
9
+ 1. **Puffery and promotion.** Cut phrases such as "pivotal moment", "testament to", "evolving
10
+ landscape", "breathtaking", and "groundbreaking" when facts carry the point better.
11
+ 2. **Vague authority.** Replace "experts believe" or "reports suggest" with a supplied source. If no
12
+ source exists, preserve the uncertainty and flag or remove the unsupported claim.
13
+ 3. **Context-free name-dropping.** Keep a person, company, or publication only when the text explains
14
+ what it contributes.
15
+ 4. **Decorative participial tails.** Delete or expand "highlighting", "showcasing", "ensuring", and
16
+ similar endings when they add no supported fact.
17
+ 5. **Formulaic concessions.** Replace "despite challenges, it continues to thrive" with the actual
18
+ limitation and result supplied by the source.
19
+ 6. **Generic openings and conclusions.** Cut scene-setting and endings such as "the future looks
20
+ bright" unless they state a concrete claim, decision, or next action.
21
+
22
+ ## Language
23
+
24
+ 7. **Stock AI diction.** Words such as "delve", "pivotal", "tapestry", "underscore", "vibrant",
25
+ "intricate", and abstract "landscape" are signals only when generic or clustered. Keep the word
26
+ when it is the precise one.
27
+ 8. **Inflated linking verbs.** Replace "serves as", "stands as", or promotional "boasts" with "is"
28
+ or "has" when precision survives.
29
+ 9. **Stock frames.** Rewrite repeated "not just X but Y", forced groups of three, and false "from X
30
+ to Y" ranges when a direct statement is clearer.
31
+ 10. **Synonym cycling.** Pick the precise noun and repeat it instead of rotating through near-synonyms.
32
+ 11. **Vague metaphor and borrowed jargon.** Replace metaphorical "substrate", "vector", "north star",
33
+ "flywheel", or "scaffolding" with the actual mechanism. Preserve established domain terms such as
34
+ vector embeddings, API surface, language primitive, and test harness.
35
+ 12. **Filler and stacked hedges.** Shorten "in order to", "due to the fact that", and redundant
36
+ qualifier chains. Preserve qualifiers that encode real uncertainty; never turn "may" into "will".
37
+ 13. **Fancy plain words.** Prefer "use", "help", "many", and "if" over "utilize", "facilitate",
38
+ "numerous", and "in the event that" when meaning is unchanged.
39
+
40
+ ## Structure and style
41
+
42
+ 14. **Mechanical rhythm.** Break repeated sentence openings, equal-length paragraphs, and serial
43
+ summaries. Do not force variation into text whose form is intentionally regular.
44
+ 15. **Punctuation monotony.** Reduce repeated em dashes, colons, or parenthetical asides. Keep
45
+ punctuation required by grammar, locale, quoted material, or the style guide; no mark is banned.
46
+ 16. **Formatting as decoration.** Remove excessive boldface, title-case headings, emoji, and inline
47
+ labels that merely repeat the sentence. Preserve formatting that improves navigation or meets the
48
+ publication format.
49
+ 17. **Dense syntax.** Split a sentence when its dependencies make the reader backtrack. Keep clauses
50
+ together when separating them would hide the relationship.
51
+ 18. **Unhelpful passive voice.** Name the actor when the actor matters. Keep passive voice when the
52
+ actor is unknown, obvious, or deliberately de-emphasized.
53
+ 19. **Adverbs propping up weak claims.** Use a stronger verb or a supplied measurement. Do not invent a
54
+ number to replace "significantly" or "quickly".
55
+ 20. **Typographic inconsistency.** Follow the source language and house style for quotation marks,
56
+ dashes, spacing, capitalization, and headings instead of forcing English ASCII conventions.
57
+
58
+ ## Chat and meta language
59
+
60
+ 21. **Stock assistant framing.** Remove empty openings and closings such as "Of course", "Great
61
+ question", "I hope this helps", and "Let me know if". Keep a direct next step when one exists.
62
+ 22. **Sycophancy.** Replace automatic agreement with the answer or evidence.
63
+ 23. **Cutoff disclaimers.** State the exact missing evidence or omit the unsupported passage. Never
64
+ disguise a guess as "details are limited".
65
+ 24. **Writing about the writing.** Cut "this article will delve into" and similar road signs when the
66
+ text can make the point directly.
67
+ 25. **Feeling without mechanism.** Replace reusable mood claims such as "SQL you can read" with a
68
+ source-backed behavior, example, or number. If none exists, cut the claim.
@@ -25,22 +25,21 @@ states:
25
25
  # Seed the verdict so the judge gate guards can be evaluated in --dry-run
26
26
  # (dry-run skips actions but still evaluates shell guards). A real run's
27
27
  # judge step overwrites this file before the gate is read.
28
- command: "echo '{\"verdict\":\"PASS\",\"score\":0.0}' > ${vars.verdictFile} && echo 'generating content...'"
28
+ command: 'echo ''{"verdict":"PASS","score":0.0}'' > ${vars.verdictFile} && echo ''generating content...'''
29
29
  - id: judge
30
30
  description: "Evaluate generated content via the judge skill (agent.run)"
31
31
  onEnter:
32
- # `agent.run` is registered by the kk workflow host: it spawns an agent that loads the
33
- # content-judge skill, evaluates the content against ${vars.rubric}, and writes the verdict
32
+ # `agent.run` is registered by the kk workflow host: it spawns an agent that invokes the
33
+ # kk:content-judge skill, evaluates the content against ${vars.rubric}, and writes the verdict
34
34
  # JSON to ${vars.verdictFile}. Under `spur workflow run` (dry-run), this action is
35
- # skipped — the seeded verdict above keeps the gate evaluable. See
36
- # plugins/kk/skills/content-judge/SKILL.md and references/workflow-integration.md.
35
+ # skipped — the seeded verdict above keeps the gate evaluable.
37
36
  - kind: agent.run
38
37
  options:
39
38
  role: reviewer
40
39
  input: |
40
+ Invoke the kk:content-judge skill.
41
41
  Evaluate the content at ${vars.contentFile} against the ${vars.rubric} rubric.
42
- Load plugins/kk/skills/content-judge/SKILL.md and its references/rubrics.md.
43
- Write the verdict JSON to ${vars.verdictFile} per the contract in SKILL.md.
42
+ Write the verdict JSON to ${vars.verdictFile} per the skill's verdict contract.
44
43
  Print the verdict path as the last line of stdout.
45
44
  expectFile: ${vars.verdictFile}
46
45
  - id: publish
@@ -83,6 +83,14 @@ states:
83
83
  if [ -n "${vars.plugins_path}" ]; then set -- --plugins-path "${vars.plugins_path}"; fi;
84
84
  VOICE_GEN_MP3="${vars.transcode_mp3}" kk executor run voice-gen --in "${vars.work_dir}/3-audio/docs.json" --out "${vars.work_dir}/3-audio/content.json" "$@"
85
85
 
86
+ - id: quality-control
87
+ description: "Verify audio quality, speech rate, and silence/repetition QC metrics"
88
+ onEnter:
89
+ - kind: shell
90
+ options:
91
+ command: >-
92
+ bun -e 'const content = JSON.parse(await Bun.file(process.argv[1]).text()); const qc = content.metadata?.qc; console.log("=== Voice Quality Control Report ==="); console.log("Overall Score: " + (qc ? qc.overallScore : 100) + "/100 | Passed: " + (qc ? qc.passed : true)); if (qc && qc.criticalIssues && qc.criticalIssues.length) { console.warn("QC Issues:\n" + qc.criticalIssues.map(function(i) { return " - " + i; }).join("\n")); } else { console.log("All audio segments passed quality control checks cleanly."); }' "${vars.work_dir}/3-audio/content.json"
93
+
86
94
  - id: done
87
95
  description: "Terminal — Daily AI news voice broadcast generated successfully"
88
96
  - id: failed
@@ -138,7 +146,13 @@ transitions:
138
146
  kind: always
139
147
 
140
148
  - from: generate
149
+ to: quality-control
150
+ description: "Audio generated -> run quality control validation"
151
+ guard:
152
+ kind: always
153
+
154
+ - from: quality-control
141
155
  to: done
142
- description: "Audio generated successfully -> complete"
156
+ description: "Quality control checks complete -> done"
143
157
  guard:
144
158
  kind: always
@@ -14,7 +14,7 @@ vars:
14
14
  publish_plugin: "surfdash-pub"
15
15
  source: "./source"
16
16
  work_dir: "./work"
17
- plugins_path: "./plugins"
17
+ plugins_path: "" # empty -> ADR-012 default discovery (package-shipped built-ins); set for checkout dev
18
18
 
19
19
  states:
20
20
  - id: ingest
@@ -22,21 +22,30 @@ states:
22
22
  onEnter:
23
23
  - kind: shell
24
24
  options:
25
- command: kk executor run ${vars.ingestion_plugin} --in ${vars.source} --out ${vars.work_dir}/docs.json --plugins-path ${vars.plugins_path}
25
+ command: >-
26
+ set --;
27
+ if [ -n "${vars.plugins_path}" ]; then set -- --plugins-path "${vars.plugins_path}"; fi;
28
+ kk executor run ${vars.ingestion_plugin} --in ${vars.source} --out ${vars.work_dir}/docs.json "$@"
26
29
 
27
30
  - id: generate
28
31
  description: Run content generator plugin to produce markdown content (content.json)
29
32
  onEnter:
30
33
  - kind: shell
31
34
  options:
32
- command: kk executor run ${vars.generator_plugin} --in ${vars.work_dir}/docs.json --out ${vars.work_dir}/content.json --plugins-path ${vars.plugins_path}
35
+ command: >-
36
+ set --;
37
+ if [ -n "${vars.plugins_path}" ]; then set -- --plugins-path "${vars.plugins_path}"; fi;
38
+ kk executor run ${vars.generator_plugin} --in ${vars.work_dir}/docs.json --out ${vars.work_dir}/content.json "$@"
33
39
 
34
40
  - id: publish
35
41
  description: Run publish plugin to deploy content and receive result (result.json)
36
42
  onEnter:
37
43
  - kind: shell
38
44
  options:
39
- command: kk executor run ${vars.publish_plugin} --in ${vars.work_dir}/content.json --out ${vars.work_dir}/result.json --plugins-path ${vars.plugins_path}
45
+ command: >-
46
+ set --;
47
+ if [ -n "${vars.plugins_path}" ]; then set -- --plugins-path "${vars.plugins_path}"; fi;
48
+ kk executor run ${vars.publish_plugin} --in ${vars.work_dir}/content.json --out ${vars.work_dir}/result.json "$@"
40
49
 
41
50
  - id: done
42
51
  description: Terminal — all three plugin steps succeeded
@@ -22,9 +22,8 @@ vars:
22
22
  outline: ""
23
23
  force: "false"
24
24
  rubric: "tech-accuracy"
25
- verdictFile: ".spur/run/${vars.__runId}-itc-verdict.json"
25
+ verdictFile: "" # empty -> ${vars.work_dir}/.itc-verdict.json (set by prepare)
26
26
  agent: ""
27
- __runId: "itc"
28
27
  __hitlAnswer: ""
29
28
  __hitlInput: ""
30
29
 
@@ -40,6 +39,7 @@ states:
40
39
  echo "missing work_dir" >&2; exit 1;
41
40
  fi;
42
41
  mkdir -p "${vars.work_dir}" "${vars.work_dir}/2-outline" "${vars.work_dir}/3-draft";
42
+ echo 0 > "${vars.work_dir}/.revise-count";
43
43
  if [ -n "${vars.topic}" ] && [ -n "${vars.input_file}" ]; then
44
44
  echo "XOR violation: both topic and input_file set" >&2; exit 1;
45
45
  fi;
@@ -66,7 +66,7 @@ states:
66
66
  role: scribe
67
67
  agent: ${vars.agent}
68
68
  input: |
69
- Load plugins/kk/skills/storm-research/SKILL.md.
69
+ Invoke the kk:storm-research skill.
70
70
  Run storm-research on the topic or input file specified in the brief at ${vars.work_dir}/brief.md.
71
71
 
72
72
  - id: outline-write
@@ -77,7 +77,7 @@ states:
77
77
  role: scribe
78
78
  agent: ${vars.agent}
79
79
  input: |
80
- Load plugins/kk/skills/${vars.writer}/SKILL.md.
80
+ Invoke the kk:${vars.writer} skill.
81
81
  Generate outline options (outline-option-a.md, outline-option-b.md, and optionally outline-option-c.md) in ${vars.work_dir}/2-outline/ from the brief at ${vars.work_dir}/brief.md using playbook ${vars.playbook}.
82
82
  Do not wait for operator selection; write the option files.
83
83
  expectFile: ${vars.work_dir}/2-outline/outline-option-a.md
@@ -122,7 +122,7 @@ states:
122
122
  role: scribe
123
123
  agent: ${vars.agent}
124
124
  input: |
125
- Load plugins/kk/skills/${vars.writer}/SKILL.md.
125
+ Invoke the kk:${vars.writer} skill.
126
126
  Author the technical draft at ${vars.work_dir}/3-draft/draft-article.md based on approved outline ${vars.work_dir}/2-outline/outline-approved.md and brief ${vars.work_dir}/brief.md using playbook ${vars.playbook}.
127
127
  Revision feedback: ${vars.__hitlInput}
128
128
  expectFile: ${vars.work_dir}/3-draft/draft-article.md
@@ -143,12 +143,8 @@ states:
143
143
  - kind: shell
144
144
  options:
145
145
  command: >-
146
- mkdir -p .spur/run;
147
- run_id="${vars.__runId}";
148
- if [ -z "$run_id" ]; then run_id="itc"; fi;
149
- count_file=".spur/run/$run_id-itc-revise-count";
150
- curr=$(cat "$count_file" 2>/dev/null || echo 0);
151
- echo $((curr + 1)) > "$count_file";
146
+ n=$(cat "${vars.work_dir}/.revise-count" 2>/dev/null || echo 0);
147
+ echo $((n + 1)) > "${vars.work_dir}/.revise-count";
152
148
  - kind: hitl.input
153
149
  options:
154
150
  prompt: "Provide specific revision feedback for ${vars.work_dir}/3-draft/draft-article.md:"
@@ -162,11 +158,11 @@ states:
162
158
  role: reviewer
163
159
  agent: ${vars.agent}
164
160
  input: |
165
- Load plugins/kk/skills/content-judge/SKILL.md and its references/rubrics.md.
161
+ Invoke the kk:content-judge skill.
166
162
  Evaluate the draft at ${vars.work_dir}/3-draft/draft-article.md against the ${vars.rubric} rubric.
167
- Write the verdict JSON to ${vars.verdictFile} per the contract in SKILL.md.
163
+ Write the verdict JSON to ${vars.work_dir}/.itc-verdict.json per the skill's verdict contract.
168
164
  Print the verdict path as the last line of stdout.
169
- expectFile: ${vars.verdictFile}
165
+ expectFile: ${vars.work_dir}/.itc-verdict.json
170
166
 
171
167
  - id: done
172
168
  description: "Terminal — IT content draft generated and approved successfully"
@@ -252,7 +248,7 @@ transitions:
252
248
  guard:
253
249
  kind: shell
254
250
  options:
255
- command: 'test "${vars.__hitlAnswer}" = "no" && { run_id="${vars.__runId}"; if [ -z "$run_id" ]; then run_id="itc"; fi; test "$(cat .spur/run/$run_id-itc-revise-count 2>/dev/null || echo 0)" -lt 3; }'
251
+ command: 'test "${vars.__hitlAnswer}" = "no" && test "$(cat "${vars.work_dir}/.revise-count" 2>/dev/null || echo 0)" -lt 3'
256
252
 
257
253
  - from: draft-review
258
254
  to: failed
@@ -260,7 +256,7 @@ transitions:
260
256
  guard:
261
257
  kind: shell
262
258
  options:
263
- command: 'test "${vars.__hitlAnswer}" = "no" && { run_id="${vars.__runId}"; if [ -z "$run_id" ]; then run_id="itc"; fi; test "$(cat .spur/run/$run_id-itc-revise-count 2>/dev/null || echo 0)" -ge 3; }'
259
+ command: 'test "${vars.__hitlAnswer}" = "no" && test "$(cat "${vars.work_dir}/.revise-count" 2>/dev/null || echo 0)" -ge 3'
264
260
 
265
261
  - from: draft-revise
266
262
  to: draft-write
@@ -274,7 +270,7 @@ transitions:
274
270
  guard:
275
271
  kind: shell
276
272
  options:
277
- command: 'v="$(jq -r .verdict ${vars.verdictFile} 2>/dev/null)"; test -z "$v" -o "$v" = PASS'
273
+ command: 'v="$(jq -r .verdict ${vars.work_dir}/.itc-verdict.json 2>/dev/null)"; test -z "$v" -o "$v" = PASS'
278
274
 
279
275
  - from: judge
280
276
  to: failed
@@ -282,4 +278,4 @@ transitions:
282
278
  guard:
283
279
  kind: shell
284
280
  options:
285
- command: 'v="$(jq -r .verdict ${vars.verdictFile} 2>/dev/null)"; test -n "$v" -a "$v" != PASS'
281
+ command: 'v="$(jq -r .verdict ${vars.work_dir}/.itc-verdict.json 2>/dev/null)"; test -n "$v" -a "$v" != PASS'