@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
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
* resolve `@gobing-ai/kk-core` (private). The render logic below is a COPY of
|
|
7
7
|
* `packages/kk-core/src/render-md.ts`; keep them byte-identical for the same Content.
|
|
8
8
|
*
|
|
9
|
+
* NODE-BUILTIN-ONLY — no workspace or `@gobing-ai/*` imports, and therefore raw
|
|
10
|
+
* `console.error` rather than the ts-utils output seam. This script ships to arbitrary
|
|
11
|
+
* user projects and is shelled as `bun <this script>`; an `@gobing-ai/*` import resolves
|
|
12
|
+
* there only because bun auto-installs it from the network, so it fails under
|
|
13
|
+
* `bun --no-install`, offline, or in an air-gapped environment. Enforced by
|
|
14
|
+
* `shipped-script-isolation` in `.spur/rules/boundary/`.
|
|
15
|
+
*
|
|
9
16
|
* SYNC: packages/kk-core/src/render-md.ts (renderContentMarkdown + helpers)
|
|
10
17
|
*/
|
|
11
18
|
|
|
@@ -72,10 +79,8 @@ export function renderContentMarkdown(content: ContentInput): string {
|
|
|
72
79
|
const heading = content.title?.trim() || 'Untitled';
|
|
73
80
|
const startsWithHeading = content.body.startsWith(`# ${heading}`);
|
|
74
81
|
const lead = startsWithHeading ? '' : `# ${heading}\n\n`;
|
|
75
|
-
const outlineBlock =
|
|
76
|
-
content.outline && content.outline.trim().length > 0 ? `\n\n## Outline\n\n${content.outline.trim()}` : '';
|
|
77
82
|
const refsBlock = renderReferences(content.references);
|
|
78
|
-
return `${lead}${content.body}${
|
|
83
|
+
return `${lead}${content.body}${refsBlock}\n`;
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
function renderReferences(references: ContentInput['references']): string {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: judge
|
|
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 judge skill to emit a PASS/FAIL/NEEDS_REVISION verdict. Centralizes evaluation rubrics, prompt templates, and structured verdict emission for generated Content.
|
|
2
|
+
name: content-judge
|
|
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
5
|
---
|
|
6
6
|
|
|
7
|
-
# judge — LLM-as-judge evaluation skill
|
|
7
|
+
# content-judge — LLM-as-judge evaluation skill
|
|
8
8
|
|
|
9
9
|
## Purpose
|
|
10
10
|
|
|
11
11
|
Evaluate generated `Content` against a rubric and emit a structured **verdict** that a spur
|
|
12
12
|
workflow gate can consume. This is the fat skill — the single source of truth for evaluation
|
|
13
|
-
logic, prompt templates, and verdict formatting.
|
|
14
|
-
|
|
13
|
+
logic, prompt templates, and verdict formatting. The `agent.run` prompt (or `--judge` flag on
|
|
14
|
+
`itc-generating`) selects the rubric; there are no persona subagents.
|
|
15
15
|
|
|
16
16
|
LLM-as-judge is **not** a knowledge-kit plugin kind (ADR-007 amdt 2026-08-07). It runs as an
|
|
17
17
|
`agent.run` step in a spur workflow; the verdict is a skill output, not a plugin-kind contract.
|
|
@@ -20,7 +20,7 @@ LLM-as-judge is **not** a knowledge-kit plugin kind (ADR-007 amdt 2026-08-07). I
|
|
|
20
20
|
|
|
21
21
|
- A spur workflow needs a quality gate between `generate` and `publish`.
|
|
22
22
|
- A user asks to "judge", "evaluate", "quality-check", or "gate" generated content.
|
|
23
|
-
- A
|
|
23
|
+
- A workflow or skill names a rubric (`tech-accuracy` / `brand-tone` / `compliance` / `general`).
|
|
24
24
|
|
|
25
25
|
## Verdict output contract
|
|
26
26
|
|
|
@@ -61,8 +61,8 @@ Every evaluation writes a JSON verdict file. The default path is
|
|
|
61
61
|
|
|
62
62
|
1. **Read the Content** from the path given in the evaluation request (the `content.json` written
|
|
63
63
|
by the preceding `kk executor run <generator>` step).
|
|
64
|
-
2. **Select the rubric** —
|
|
65
|
-
`compliance`, `general`)
|
|
64
|
+
2. **Select the rubric** — named in the request (`tech-accuracy`, `brand-tone`,
|
|
65
|
+
`compliance`, `general`). Default: `general`.
|
|
66
66
|
3. **Evaluate each criterion** in the rubric. For each, produce a `pass` / `fail` / `warn` status
|
|
67
67
|
backed by a specific, quotable evidence reference (quote, section, claim).
|
|
68
68
|
4. **Score** — weighted aggregate per the rubric's scoring rules. `score` is 0.0–1.0.
|
|
@@ -107,7 +107,7 @@ Content to evaluate: {{content_path}}
|
|
|
107
107
|
Rubric: {{rubric}} # general | tech-accuracy | brand-tone | compliance
|
|
108
108
|
Output verdict to: {{verdict_path}}
|
|
109
109
|
|
|
110
|
-
Load the rubric definition from plugins/kk/skills/judge/references/rubrics.md (section: {{rubric}}).
|
|
110
|
+
Load the rubric definition from plugins/kk/skills/content-judge/references/rubrics.md (section: {{rubric}}).
|
|
111
111
|
Evaluate the content against every criterion in that rubric.
|
|
112
112
|
For each criterion, quote the specific passage and assign pass | fail | warn.
|
|
113
113
|
Decide the verdict: any must-pass fail → FAIL; else score < threshold → NEEDS_REVISION; else PASS.
|
|
@@ -119,13 +119,12 @@ Print the verdict path to stdout as the last line.
|
|
|
119
119
|
|
|
120
120
|
See `references/workflow-integration.md` for the `agent.run` step shape and the shell/`jq` guard
|
|
121
121
|
that reads the verdict. The example workflow is at
|
|
122
|
-
|
|
122
|
+
`plugins/kk/workflows/judge-gated-publish-example.yaml`.
|
|
123
123
|
|
|
124
|
-
##
|
|
124
|
+
## Rubric selection
|
|
125
125
|
|
|
126
|
-
The
|
|
127
|
-
|
|
128
|
-
new persona, add a wrapper that sets the rubric and reuses this skill's procedure verbatim.
|
|
126
|
+
The `agent.run` prompt (or the calling skill) sets `{{rubric}}`. To add a persona, add a rubric
|
|
127
|
+
section in `references/rubrics.md` and name it from the prompt — do not add a subagent wrapper.
|
|
129
128
|
|
|
130
129
|
## Additional resources
|
|
131
130
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Workflow integration — judge in a spur workflow
|
|
1
|
+
# Workflow integration — content-judge in a spur workflow
|
|
2
2
|
|
|
3
3
|
Spur's workflow engine executes one node at a time (`type: parallel` is an inert schema field —
|
|
4
4
|
see `docs/03_ARCHITECTURE.md`). The judge step is therefore a single `agent.run` node followed
|
|
@@ -7,16 +7,18 @@ by a `shell` node that guards the transition to `publish`.
|
|
|
7
7
|
## Step shape
|
|
8
8
|
|
|
9
9
|
```yaml
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
- kind: agent.run
|
|
11
|
+
options:
|
|
12
|
+
role: reviewer
|
|
13
|
+
input: |
|
|
14
|
+
Evaluate the generated content against the {{rubric}} rubric.
|
|
15
|
+
Content: {{content_path}}
|
|
16
|
+
Write the verdict to {{verdict_path}}.
|
|
17
|
+
Load plugins/kk/skills/content-judge/SKILL.md.
|
|
18
|
+
expectFile: "{{verdict_path}}"
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
- `agent.run` spawns an agent that loads the `judge` skill, performs the evaluation, and writes
|
|
21
|
+
- `agent.run` spawns an agent that loads the `content-judge` skill, performs the evaluation, and writes
|
|
20
22
|
the verdict JSON to `{{verdict_path}}` (typically `.spur/run/verdict-judge.json`).
|
|
21
23
|
- The verdict file is the only durable artifact. The agent's prose output is not the contract.
|
|
22
24
|
|
|
@@ -60,7 +62,7 @@ esac
|
|
|
60
62
|
|
|
61
63
|
For a bounded regenerate-retry loop, wire the workflow so that a `NEEDS_REVISION` verdict routes
|
|
62
64
|
back to the `generate` step with the verdict's `feedback` as additional input. Cap retries (the
|
|
63
|
-
example workflow uses 2). This is workflow-level orchestration — `judge` itself is stateless
|
|
65
|
+
example workflow uses 2). This is workflow-level orchestration — `content-judge` itself is stateless
|
|
64
66
|
and re-runnable.
|
|
65
67
|
|
|
66
68
|
```
|
|
@@ -73,5 +75,5 @@ generate ──▶ judge ──PASS──▶ publish
|
|
|
73
75
|
|
|
74
76
|
## Workflow YAML location
|
|
75
77
|
|
|
76
|
-
The runnable example lives at
|
|
78
|
+
The runnable example lives at `plugins/kk/workflows/judge-gated-publish-example.yaml`. It demonstrates
|
|
77
79
|
`generate → judge → guard → publish` with a 2-retry NEEDS_REVISION loop.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: itc-generating
|
|
3
|
+
description: >-
|
|
4
|
+
Use the itc-generating skill to produce an approved IT technical draft from a
|
|
5
|
+
topic or Markdown brief, applying the distilled generic IT-writing method and
|
|
6
|
+
an optional platform playbook — "write an article about X applying the IT
|
|
7
|
+
writing method", "generate an IT technical draft on X", "create a technical
|
|
8
|
+
article for WeChat/English platforms". Orchestrates topic (outline + draft),
|
|
9
|
+
optional storm-research, and optional content-judge without enlarging those skills.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# itc-generating — IT technical draft generation (method + orchestration)
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
Turn a topic or Markdown brief into an **approved IT technical draft** by applying the distilled
|
|
17
|
+
IT-writing craft and orchestrating the existing `kk` skills — `topic` (outline + draft), optional
|
|
18
|
+
`storm-research` (evidence), optional `content-judge` (technical-accuracy gate). One fat skill with one
|
|
19
|
+
operation, `create`, whose default is the distilled generic-craft method; it delegates outline
|
|
20
|
+
selection and draft review to `topic` and writes the **same topic artifact paths**. This skill owns
|
|
21
|
+
*which* method and *when* to research/judge — it never reimplements topic-core, research, or
|
|
22
|
+
evaluation (D6).
|
|
23
|
+
|
|
24
|
+
## When to use
|
|
25
|
+
|
|
26
|
+
- A user asks to write an IT technical article from a topic or brief and wants the distilled
|
|
27
|
+
IT-writing method applied ("write an IT article about X", "produce a technical draft on X").
|
|
28
|
+
- A user wants a specific platform playbook applied to the draft (`--playbook english` / `wechat`).
|
|
29
|
+
- A user wants the same topic artifact contract but with the writing method and optional
|
|
30
|
+
research/judging orchestrated around it.
|
|
31
|
+
|
|
32
|
+
Do **not** use this skill for: a single topic-core step without the method (call `topic` directly);
|
|
33
|
+
research alone (call `storm-research`); evaluating content alone (call `content-judge`); publishing,
|
|
34
|
+
platform adaptation, or image generation (all out of scope); anything requiring a runtime plugin
|
|
35
|
+
(`kk executor run`, `plugin.json`, `GeneratorInput → Content`).
|
|
36
|
+
|
|
37
|
+
## Invocation contract
|
|
38
|
+
|
|
39
|
+
`$ARGUMENTS` (or the Skill call args) parse as:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
[create] <topic-or-brief> [--dir <target>] [--brief <path>]
|
|
43
|
+
[--playbook generic|english|wechat]
|
|
44
|
+
[--research] [--judge]
|
|
45
|
+
[--outline <a|b|c>] [--revise <feedback>] [--force]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
| Token | Meaning | Default |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `create` | the only operation; may be omitted | `create` |
|
|
51
|
+
| `<topic-or-brief>` | quoted topic phrase, or `--brief <path>` naming a Markdown brief file | required — empty fails loud |
|
|
52
|
+
| `--dir <target>` | workspace directory | `./<kebab-case(topic)>` (same default as `topic`) |
|
|
53
|
+
| `--playbook <p>` | which reference to load as the writing method | `generic` |
|
|
54
|
+
| `--research` | if the workspace has no evidence, run `storm-research` first | off |
|
|
55
|
+
| `--judge` | after an approved draft, run `content-judge` with the `tech-accuracy` rubric | off |
|
|
56
|
+
| `--outline <a\|b\|c>` | explicit outline selection (passed through to `topic`) | operator selects at the gate |
|
|
57
|
+
| `--revise <feedback>` | revision feedback for the draft review gate (passed through to `topic`) | none (approve path) |
|
|
58
|
+
| `--force` | explicit operator approval to replace an existing artifact (passed through to `topic`) | off — never overwrite without it |
|
|
59
|
+
|
|
60
|
+
Flags may appear in any order; the first bare positional token is the topic phrase. An unknown
|
|
61
|
+
operation (anything other than `create`) fails loud and lists `create` as the only valid operation.
|
|
62
|
+
|
|
63
|
+
## References (loaded on demand, R2)
|
|
64
|
+
|
|
65
|
+
| File | When to load |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `references/generic-craft.md` | **always** on every `create` run — the five IT-writing disciplines |
|
|
68
|
+
| `references/platform-english.md` | `--playbook english` — X / Medium / Substack playbook |
|
|
69
|
+
| `references/platform-wechat.md` | `--playbook wechat` — WeChat Official Account playbook |
|
|
70
|
+
| `references/skill-authoring.md` | when reviewing or editing this skill — why it stays lean |
|
|
71
|
+
|
|
72
|
+
The four STORM studies remain in the works dirs (`~/.config/kk/works/`) as provenance; the skill
|
|
73
|
+
body and references do **not** vendor the full reports (D4).
|
|
74
|
+
|
|
75
|
+
## Artifact contract (reuses topic, D5)
|
|
76
|
+
|
|
77
|
+
All paths are relative to the workspace `--dir`. This skill does **not** invent a parallel
|
|
78
|
+
workspace — it delegates to `topic`, which writes exactly these paths:
|
|
79
|
+
|
|
80
|
+
| Artifact | Path | Written by |
|
|
81
|
+
| --- | --- | --- |
|
|
82
|
+
| Brief | `brief.md` | `topic` `init` |
|
|
83
|
+
| Outline options | `2-outline/outline-option-{a,b,c}.md` | `topic` `outline` |
|
|
84
|
+
| Approved outline | `2-outline/outline-approved.md` | `topic` `outline` (after selection gate) |
|
|
85
|
+
| Draft | `3-draft/draft-article.md` | `topic` `draft` (from approved outline, review gate) |
|
|
86
|
+
|
|
87
|
+
## create sequence
|
|
88
|
+
|
|
89
|
+
1. **Input check** (fail loud, R5): empty topic and no `--brief` → stop with recovery. A `--brief`
|
|
90
|
+
path that does not exist → stop with recovery.
|
|
91
|
+
2. **Target check** (fail loud, R5): if `--dir` exists with a `brief.md` and no `--force` → stop
|
|
92
|
+
with recovery ("initialization target already exists at `<dir>`; pass `--force` after explicit
|
|
93
|
+
operator confirmation to replace, or choose a new `--dir`"). Never overwrite without `--force`.
|
|
94
|
+
3. **Load the method** — read `references/generic-craft.md` (always) plus the selected playbook if
|
|
95
|
+
`--playbook` is not `generic` (R2). If `--research` and the workspace has no reusable evidence,
|
|
96
|
+
invoke `storm-research` on the topic (XOR: a topic phrase or `--in <file>`); re-run research
|
|
97
|
+
only when the query or sources must change — reuse existing `docs.json` otherwise.
|
|
98
|
+
4. **Delegate to `topic`** — run `topic create` against `--dir` with the same artifact contract and
|
|
99
|
+
gates: outline options → explicit selection gate (`--outline <a|b|c>` or interactive) → approved
|
|
100
|
+
outline → draft → review gate (approve or bounded `--revise`). This skill never reimplements
|
|
101
|
+
those gates (R1, R3).
|
|
102
|
+
5. **Apply the method while drafting** — using the loaded references, apply the five disciplines
|
|
103
|
+
(one goal per document, value proposition as scope firewall, explicit prerequisites and POLA,
|
|
104
|
+
show-don't-tell with diagrams/examples, accessibility) plus the platform playbook's constraints
|
|
105
|
+
(e.g. WeChat mobile formatting or English-platform framing). The draft is written by `topic`
|
|
106
|
+
from the approved outline; the method shapes it.
|
|
107
|
+
6. **Optional judge gate** — if `--judge` and `3-draft/draft-article.md` is approved, invoke
|
|
108
|
+
`content-judge` with the `tech-accuracy` rubric. A non-`PASS` verdict is reported to the operator; it
|
|
109
|
+
does **not** auto-publish and does not auto-revise past `topic`'s 3-round bound.
|
|
110
|
+
7. **Print** the final artifact paths and stop.
|
|
111
|
+
|
|
112
|
+
## Fail-loud table (R5)
|
|
113
|
+
|
|
114
|
+
| Condition | Behavior | Recovery instruction |
|
|
115
|
+
| --- | --- | --- |
|
|
116
|
+
| Empty topic and no `--brief` | Stop; no files created | Provide a topic phrase or `--brief <path>` |
|
|
117
|
+
| `--brief` path does not exist | Stop; no files created | Check the path; supply a real Markdown brief |
|
|
118
|
+
| `--research` with neither topic nor `--in` | Stop; nothing written | Pass exactly one of the topic / `--in <file>` to `storm-research` |
|
|
119
|
+
| Missing prerequisite artifact (e.g. outline before draft) | Stop; nothing written | The recovery comes from `topic` — run the prerequisite step first (see `topic` fail-loud table) |
|
|
120
|
+
| Existing initialization target without `--force` | Stop; no overwrite | Confirm with the operator and pass `--force`, or choose a new `--dir` |
|
|
121
|
+
| Unknown operation | Stop; nothing written | Use `create` (the only operation) or call `topic` / `storm-research` / `content-judge` directly |
|
|
122
|
+
|
|
123
|
+
Every stop names the exact missing or existing path and the exact next command. Never silently
|
|
124
|
+
skip, never auto-replace, never delete.
|
|
125
|
+
|
|
126
|
+
## Invariants
|
|
127
|
+
|
|
128
|
+
- `create` is the **only** operation. Research, illustration, adaptation, and publish operations
|
|
129
|
+
are **not** added to `topic` — this skill delegates to `storm-research` / `content-judge` (R3).
|
|
130
|
+
- Reuse `topic` artifact paths; never invent a parallel workspace (D5).
|
|
131
|
+
- `topic` / `storm-research` / `content-judge` contracts are unchanged (D6) — this skill only orchestrates.
|
|
132
|
+
- No `plugins/kk/commands/itc*.md`, no `kk` CLI noun/verb, no generator `plugin.json` (R4).
|
|
133
|
+
- Never overwrite an existing artifact without `--force`; bound draft revision at `topic`'s 3
|
|
134
|
+
rounds.
|
|
135
|
+
- No live publish, no external side effects beyond the delegated research call, no image generation.
|
|
136
|
+
|
|
137
|
+
## Prompt template (Skill() / agent.run)
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Skill(skill="itc-generating",
|
|
141
|
+
args="<topic-or-brief> [--dir <target>] [--brief <path>] [--playbook generic|english|wechat] [--research] [--judge] [--outline <a|b|c>] [--revise <feedback>] [--force]")
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
When invoked, follow the `create` sequence above. Load the references the flags select, delegate
|
|
145
|
+
outline selection and draft review to `topic`, and pause for the operator at `topic`'s gates. On
|
|
146
|
+
any stop, output the fail-loud recovery line. The artifact paths under the workspace `--dir` are
|
|
147
|
+
the handoff.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Generic IT-writing craft — five disciplines
|
|
2
|
+
|
|
3
|
+
Distilled from the STORM study "How to Write the Best Generic IT Technical Documentation"
|
|
4
|
+
(works dir `how-to-write-the-best-generic-it-technical-docum-0a71c5a7`, provenance only — this
|
|
5
|
+
reference replaces vendoring the full report). Load this reference on every `create` run; apply
|
|
6
|
+
all five disciplines while authoring the draft.
|
|
7
|
+
|
|
8
|
+
## 1. Structure and scope (the document architect)
|
|
9
|
+
|
|
10
|
+
- Pick the document types you actually need — and **stop**. There is no universal list; add a
|
|
11
|
+
document only when no existing one's goal absorbs the content.
|
|
12
|
+
- **One document, one goal**, enforced at review: reread after writing and remove or move
|
|
13
|
+
anything that does not serve that goal. Write everything first, then cut.
|
|
14
|
+
- **Write the Value Proposition (VP) first**: a one-page list of what the doc will do for its
|
|
15
|
+
reader (save time, reduce errors, cut training…). It says nothing about format or fonts. Use it
|
|
16
|
+
as a scope-creep firewall — keep content that supports a VP item, remove the rest.
|
|
17
|
+
- **Plan before writing**: research first (history → latest literature → what existing docs
|
|
18
|
+
already cover), then a documentation plan (scope, objectives, estimates, workflows, resources).
|
|
19
|
+
Do not over-invest in placement up front — move a document after it exists.
|
|
20
|
+
- **One goal per section** too: link out to other documents for prerequisites and detail instead
|
|
21
|
+
of inlining everything.
|
|
22
|
+
|
|
23
|
+
## 2. Write for the reader (the reader advocate)
|
|
24
|
+
|
|
25
|
+
- **Profile the readership** enough to structure and customize for them. Do not assume background,
|
|
26
|
+
environment, context, or that they have read your other docs — link prerequisites instead of
|
|
27
|
+
inlining them.
|
|
28
|
+
- **Show, don't tell**: lead with diagrams (process flows, C4 views), then explain in prose.
|
|
29
|
+
Text-based diagrams (Mermaid, PlantUML) stay easy to update. Use at least one concrete example
|
|
30
|
+
early — a simple example beats an abstract description.
|
|
31
|
+
- **Principle of Least Astonishment (POLA)**: cover the gotchas and non-typical usage up front —
|
|
32
|
+
undocumented prerequisites, surprising defaults, implicit ordering. Name assumptions, defaults,
|
|
33
|
+
and prerequisites explicitly.
|
|
34
|
+
- **Long-form craft**: a succinct, jargon-free title; structure against the five Ws + H; write the
|
|
35
|
+
introduction last, once the content has settled.
|
|
36
|
+
- **Accessibility and inclusive writing** are concrete requirements: follow accessibility
|
|
37
|
+
guidelines for structure/language; use inclusive example names and bias-free language.
|
|
38
|
+
|
|
39
|
+
## 3. Make it a team discipline (the engineering manager)
|
|
40
|
+
|
|
41
|
+
- **Budget for docs time**: measure how long SME review of writer output takes and factor it into
|
|
42
|
+
each release. Good docs are written once, read hundreds of times.
|
|
43
|
+
- **Close the specialized-skill gap**: technical writing is its own discipline (audience
|
|
44
|
+
understanding + logical presentation); bring in a technical writer or build review processes
|
|
45
|
+
that treat writing with the same rigor as code.
|
|
46
|
+
- **Embed docs in the engineering workflow**: docs reviews inside normal PR review, preview builds
|
|
47
|
+
on each check-in, docs as part of shipping every release — not a post-release afterthought.
|
|
48
|
+
- **Docs are coordination infrastructure** at team scale: they improve knowledge retention and
|
|
49
|
+
underpin quality, consistency, and compliance.
|
|
50
|
+
- **Build documentation mindshare**: state the problem, start in engineering, gather input
|
|
51
|
+
broadly, build a taxonomy, make contribution easy, meet regularly.
|
|
52
|
+
|
|
53
|
+
## 4. Keep it fresh (the maintenance owner)
|
|
54
|
+
|
|
55
|
+
- **Docs go stale by default**; the countermeasure is procedural — assess doc impact of changes
|
|
56
|
+
each sprint and allocate update time in the release.
|
|
57
|
+
- **Make updates cheap**: prefer simple human-readable formats (Markdown — diffable in Git) and
|
|
58
|
+
text-based diagrams so edits stay cheap.
|
|
59
|
+
- **Institutionalize the lifecycle**: plan → write → review → publish, with research up front and
|
|
60
|
+
maintenance at the end; take occasional content inventories and use reader feedback to fill gaps.
|
|
61
|
+
|
|
62
|
+
## 5. Tooling and publishing (the pipeline engineer)
|
|
63
|
+
|
|
64
|
+
- **Match tools to doc types and languages**; when in doubt, defer to Markdown and tooling with
|
|
65
|
+
simple human-readable formats. A convenient editor matters — you won't write docs you hate
|
|
66
|
+
editing.
|
|
67
|
+
- **Bake publishing into CI/CD**: build docs from sources and publish on every release; generate
|
|
68
|
+
docs from code artifacts where possible (OpenAPI is the canonical example).
|
|
69
|
+
- **Plan reuse**: write content once and reuse it (CCMS for cross-product scale); audit for
|
|
70
|
+
overlap before duplication spreads.
|
|
71
|
+
- **Adopt (or author) style guides**: shared style guides keep output consistent — don't write
|
|
72
|
+
them from scratch (Write the Docs maintains a living one). During review, get the right experts
|
|
73
|
+
on the right documents and use preview runs to catch errors before publication.
|
|
74
|
+
|
|
75
|
+
## Applying this in `create`
|
|
76
|
+
|
|
77
|
+
While drafting `3-draft/draft-article.md` (after `topic`'s outline gate), apply: one goal per
|
|
78
|
+
document enforced at the draft-review gate; the Value Proposition as a scope firewall; explicit
|
|
79
|
+
prerequisites and POLA; show-don't-tell with diagrams/examples; and accessibility. The `--judge`
|
|
80
|
+
gate then verifies technical accuracy against the rubric.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# English-platform playbook (X / Medium / Substack)
|
|
2
|
+
|
|
3
|
+
Distilled from the STORM study "How to Write and Distribute IT Technical Documents on English
|
|
4
|
+
Platforms" (works dir `how-to-write-it-technical-documents-for-english-a6a76477`, provenance only).
|
|
5
|
+
Load this reference when `--playbook english`; it shapes platform choice, format, and distribution
|
|
6
|
+
for the draft — never reimplements publishing.
|
|
7
|
+
|
|
8
|
+
## Choose the platform before you write
|
|
9
|
+
|
|
10
|
+
- The writer's-first-question fallacy: pick a platform *after* deciding what you actually want as
|
|
11
|
+
a writer. Technical content is expensive to produce; making it for the wrong audience on the
|
|
12
|
+
wrong surface wastes your scarcest resource.
|
|
13
|
+
- Compare platforms on three axes:
|
|
14
|
+
- **Growth/discoverability** — Medium: internal distribution, but the algorithm decides reach.
|
|
15
|
+
X: reach with high volatility. Substack: slow to start, compounds (Notes, recommendations,
|
|
16
|
+
direct email) into an asset you keep.
|
|
17
|
+
- **Audience/culture** — X is fast and combative; Medium skews essay readers; Substack readers
|
|
18
|
+
opt in deliberately (roughly 85% email / 10% app on a typical post).
|
|
19
|
+
- **Business model** — Medium pays per member read; X monetization is thin for most; Substack is
|
|
20
|
+
free, you own your subscriber list, paid subs optional (10% cut only when someone pays).
|
|
21
|
+
- For IT writers the email list is the difference between building equity and renting attention.
|
|
22
|
+
Cross-posting to Medium is a fine low-effort hedge — just understand its mechanics first.
|
|
23
|
+
|
|
24
|
+
## Launch and grow (Substack)
|
|
25
|
+
|
|
26
|
+
- Substack is three layers: email newsletter, publication (archive/about/navigation), and
|
|
27
|
+
social/discovery (Notes, recommendations, search). Most writers only use layer one — that is why
|
|
28
|
+
they struggle to grow.
|
|
29
|
+
- Setup order: name the publication (clear topic promise or memorable brand — not your personal
|
|
30
|
+
name unless known); write an attention-grabbing bio (what you write, who it's for, credentials);
|
|
31
|
+
import any existing subscriber list; publish a first post before promoting.
|
|
32
|
+
- Cadence: a sustainable frequency — one good post per week beats one "perfect" post per month;
|
|
33
|
+
shipping gets you feedback to iterate. Open each issue with a clear thesis and keep it readable
|
|
34
|
+
in an email client.
|
|
35
|
+
- **Growth levers combine**: from zero, Notes daily + connecting with writers gets the first
|
|
36
|
+
50–100 subs; 100–500 layers in guest posts, collaborations, and recommendations (one publication
|
|
37
|
+
gained ~7,000 subs through recommendations alone).
|
|
38
|
+
- **Notes** is the "new Twitter for writers": short valuable insights, questions, daily presence,
|
|
39
|
+
genuine engagement (comments, restacks). Not random hot takes or growth-hacking. A 3-2-1 weekly
|
|
40
|
+
rhythm: three value notes, two engagement posts, one soft promotion.
|
|
41
|
+
- **Own the channel, rent the algorithm**: the email list is the asset that survives platform
|
|
42
|
+
changes; Notes/X/LinkedIn are top-of-funnel discovery — valuable, volatile, never the foundation.
|
|
43
|
+
|
|
44
|
+
## Position and voice
|
|
45
|
+
|
|
46
|
+
- **Author-first** (the newsletter builds an audience for *you*; topics range widely) vs
|
|
47
|
+
**topic-first** (the publication is the draw; the niche is the promise — "production Kubernetes
|
|
48
|
+
war stories"). IT content tends to capture niche intent faster topic-first; author-first builds a
|
|
49
|
+
brand that travels.
|
|
50
|
+
- **Voice is the durable moat**: people want the person behind the publication. When automation
|
|
51
|
+
repurposes content, preserve conversational voice and framework thinking — never "AI rewrites my
|
|
52
|
+
stuff," which yields generic output.
|
|
53
|
+
|
|
54
|
+
## Repurposing (one long-form → many assets)
|
|
55
|
+
|
|
56
|
+
- One newsletter becomes 5 LinkedIn posts + 10 Substack Notes + 3 X threads via a webhook →
|
|
57
|
+
extract → generate → deliver pipeline (Make.com + Firecrawl + OpenAI + Google Docs), cutting
|
|
58
|
+
hours of manual reformatting to ~30 minutes of polish.
|
|
59
|
+
- **Adapt per platform, never copy-paste**: LinkedIn wants declarative hooks + strategic line
|
|
60
|
+
breaks; Substack Notes wants ~200-character insights with bold + mic-drop endings; X threads
|
|
61
|
+
need conversational hooks with curiosity gaps between tweets.
|
|
62
|
+
- Dense IT material (architecture tradeoffs, debugging walkthroughs, benchmarks) must be re-cut
|
|
63
|
+
per surface. Long-form Substack/Medium carries the full technical depth and is the canonical
|
|
64
|
+
source everything links back to.
|
|
65
|
+
- **The 10–20% human polish pass is mandatory and non-delegable** — for technical material this
|
|
66
|
+
is where accuracy lives: verify every code snippet, command, flag, and version-specific claim.
|
|
67
|
+
|
|
68
|
+
## Applying this in `create`
|
|
69
|
+
|
|
70
|
+
Load this reference when `--playbook english`. It informs the draft's framing (audience, voice,
|
|
71
|
+
platform-native format) and the distribution plan, but the deliverable stays `topic`'s
|
|
72
|
+
`3-draft/draft-article.md` — this playbook never publishes and never writes a parallel artifact.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# WeChat Official Account playbook (specific-platform study)
|
|
2
|
+
|
|
3
|
+
Distilled from the STORM study "How to Write and Publish Technical Documents on WeChat Official
|
|
4
|
+
Accounts" (works dir `how-to-write-it-technical-documents-for-specific-d158f7c2`, provenance only).
|
|
5
|
+
Load this reference when `--playbook wechat`; it shapes the draft for WeChat's reading context and
|
|
6
|
+
compliance constraints — never reimplements registration, publishing, or the API.
|
|
7
|
+
|
|
8
|
+
## Why WeChat
|
|
9
|
+
|
|
10
|
+
- For Chinese academics, engineers, and technical decision-makers, WeChat Official Accounts
|
|
11
|
+
(微信公众号) are the primary delivery channel — researchers check it almost every waking hour.
|
|
12
|
+
- Authority bar: an expert should be able to name at least five public accounts on the topic they
|
|
13
|
+
follow. If your account would not make that list, you are not reaching the expert audience.
|
|
14
|
+
|
|
15
|
+
## Account type and constraints (the drafting context)
|
|
16
|
+
|
|
17
|
+
- **Subscription account (订阅号)**: up to 1 push/day, but folded into a "Subscriptions" folder —
|
|
18
|
+
best for high-cadence technical publishing. **Service account (服务号)**: 4 messages/month but
|
|
19
|
+
appears in the main chat list with push — best for low-cadence, high-importance announcements.
|
|
20
|
+
- **Enterprise accounts (企业号)** are for internal newsletters (mutual approval, no public reach).
|
|
21
|
+
- **Hard limits that shape content**: each message carries up to 8 articles; **published articles
|
|
22
|
+
cannot be deleted** — only modified with a correction notice. Errors are permanent, so
|
|
23
|
+
review-before-publish is mandatory.
|
|
24
|
+
- Registration is a Chinese-identity-bound process (QR-scan binding, Chinese ID/phone for admins,
|
|
25
|
+
ICP / Mini Program filings for hosted infrastructure). Foreign entities must work through a
|
|
26
|
+
Chinese partner. API access needs AppID/AppSecret (QR-verified) and an IP whitelist.
|
|
27
|
+
|
|
28
|
+
## Authoring for the WeChat reader
|
|
29
|
+
|
|
30
|
+
- **Markdown-first pipeline**: WeChat's rich-text editor cannot interpret Markdown. Write in
|
|
31
|
+
Markdown, convert to WeChat-compatible rich text (MD2WeChat / `lyricat/wechat-format`, or the
|
|
32
|
+
Obsidian `wechat-public-platform` plugin for one-command draft upload), then paste/upload.
|
|
33
|
+
Converters turn external links into footnotes (external links are not allowed in articles).
|
|
34
|
+
- **Format for mobile consumption** (articles are read on phones — commuting, mid-meeting):
|
|
35
|
+
short paragraphs, images/GIFs/audio/video (text-only underperforms), text-light images, abstract
|
|
36
|
+
(摘要) under 120 characters, 900×500px cover, Simplified Chinese, short self-explanatory titles
|
|
37
|
+
(truncated after ~26 Chinese characters), h2–h4 headings (leave h1 for larger embedding), 15px
|
|
38
|
+
body text, PingFang on iOS.
|
|
39
|
+
- **Language**: Chinese-language articles outperform English even for Chinese academics who read
|
|
40
|
+
English; some international accounts publish multilingual content.
|
|
41
|
+
- **What engages**: novelty (new findings/new resources), originality and authenticity, and
|
|
42
|
+
structural rigor — this audience is trained to be critical of a WeChat post.
|
|
43
|
+
|
|
44
|
+
## Editorial standards for authority
|
|
45
|
+
|
|
46
|
+
- **Bilingual/translated material**: the CAICT model — long-form Chinese analyses of international
|
|
47
|
+
technical reports, crediting Chinese-institution contributors — is the reference pattern.
|
|
48
|
+
- **Worth a "top five" slot**: recurring high-signal formats (standards announcements, seminar
|
|
49
|
+
notices, joint research, translated analyses) plus originality, authenticity, and rigor.
|
|
50
|
+
- **Review-before-publish checklist** (forced by the no-deletion rule): preview to your own WeChat
|
|
51
|
+
first; verify title length, abstract, cover, and footnote-converted links; confirm originality
|
|
52
|
+
declaration, tags, and comment settings manually in the draft box; route the broadcast through
|
|
53
|
+
the admin QR-code verification step.
|
|
54
|
+
|
|
55
|
+
## Applying this in `create`
|
|
56
|
+
|
|
57
|
+
Load this reference when `--playbook wechat`. It informs the draft's structure (mobile-first
|
|
58
|
+
formatting, Chinese-language expectations, title/abstract limits, review rigor) but the deliverable
|
|
59
|
+
stays `topic`'s `3-draft/draft-article.md` — this playbook never registers an account, never
|
|
60
|
+
publishes, and never touches the WeChat API.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Skill-authoring self-discipline (why this skill stays lean)
|
|
2
|
+
|
|
3
|
+
Distilled from the STORM study "How to Write the Best Technical Documentation with Agent Skills"
|
|
4
|
+
(works dir `how-to-write-the-best-technical-document-with-ex-2c52b35c`, provenance only). This
|
|
5
|
+
reference is the meta-discipline for *this skill*: it exists so `itc-generating` stays a thin
|
|
6
|
+
method+orchestration layer instead of re-vendoring craft or reimplementing sibling skills.
|
|
7
|
+
|
|
8
|
+
## The SKILL.md contract (hard limits)
|
|
9
|
+
|
|
10
|
+
- **Frontmatter**: `name` ≤64 chars, lowercase letters/numbers/hyphens only, no XML tags or
|
|
11
|
+
reserved words, and must exactly match the parent directory name. `description` is non-empty,
|
|
12
|
+
≤1,024 chars, no XML tags.
|
|
13
|
+
- **Body budget**: keep SKILL.md under ~500 lines / ~5,000 tokens — just the core instructions the
|
|
14
|
+
agent needs every run; split the rest into `references/`.
|
|
15
|
+
- **Context economics**: only `name` + `description` are pre-loaded; the rest enters context only
|
|
16
|
+
when needed. The description is the *only* routing signal — write it as a third-person capability
|
|
17
|
+
statement with explicit negative triggers so near-miss tasks are excluded.
|
|
18
|
+
- **Folder grammar**: SKILL.md + `references/` + `scripts/` + `assets/`, kept **exactly one level
|
|
19
|
+
deep** (`references/schema.md`, not `references/db/v1/schema.md`). Avoid nested reference chains —
|
|
20
|
+
when references point at references, the agent previews instead of reading fully.
|
|
21
|
+
|
|
22
|
+
## Progressive disclosure (the load-on-demand rule)
|
|
23
|
+
|
|
24
|
+
- Keep the always-loaded core minimal; push detail into `references/` with **just-in-time
|
|
25
|
+
pointers**: "Read `references/api-errors.md` if the API returns a non-200" beats "see
|
|
26
|
+
references/ for details".
|
|
27
|
+
- Three patterns: high-level guide + references; domain-specific organization; conditional details
|
|
28
|
+
(branch to a section only when a condition holds).
|
|
29
|
+
- Prefer **deterministic scripts** for fragile/repetitive operations (link checks, format
|
|
30
|
+
validation) — not for judgment-heavy authoring. Design their failure modes deliberately.
|
|
31
|
+
|
|
32
|
+
## Instruction design
|
|
33
|
+
|
|
34
|
+
- **Degree of freedom**: prescriptive exact-sequence instructions for fragile operations; goal-plus-
|
|
35
|
+
philosophy for judgment-heavy work (authoring). Vague skills fail — "handle errors appropriately"
|
|
36
|
+
carries no information.
|
|
37
|
+
- **Defaults, not menus**: pick one default and a one-line escape hatch, rather than listing
|
|
38
|
+
options and hoping the agent chooses well.
|
|
39
|
+
- **Add what the agent lacks; omit what it knows**: the filter is "would the agent get this wrong
|
|
40
|
+
without this instruction?" If no, cut it.
|
|
41
|
+
- Highest-value blocks: gotchas sections (environment facts that defy assumptions), output-format
|
|
42
|
+
templates, checklists and self-check loops.
|
|
43
|
+
|
|
44
|
+
## Evaluation and review (how to keep improving the skill)
|
|
45
|
+
|
|
46
|
+
- Four validation passes: discovery (description in isolation — does it route correctly?),
|
|
47
|
+
logic (deterministic steps, no hallucinated gaps), adversarial edge-case QA ("try to break this
|
|
48
|
+
skill"), architecture refinement (enforce progressive disclosure).
|
|
49
|
+
- **Execute-then-refine** beats endless pre-polish: run the skill on real tasks and iterate;
|
|
50
|
+
read execution traces, not just outputs (instructions retried many times, instructions followed
|
|
51
|
+
that don't apply, too many options without a default).
|
|
52
|
+
- Add a **self-reflection step**: after a run, examine the friction log and improve the skill so
|
|
53
|
+
the next run does not struggle the same way.
|
|
54
|
+
|
|
55
|
+
## How this skill applies it
|
|
56
|
+
|
|
57
|
+
`itc-generating` is one-level-deep by construction: SKILL.md points at the four `references/*.md`
|
|
58
|
+
files below it and loads them on demand (generic-craft always; playbook only when `--playbook` is
|
|
59
|
+
not `generic`). It reuses `topic`'s artifact contract rather than inventing a parallel workspace
|
|
60
|
+
(D5), delegates research/judging to `storm-research`/`content-judge` rather than reimplementing them (D6),
|
|
61
|
+
and stays under the body budget because the four STORM reports live in the works dirs as
|
|
62
|
+
provenance — never vendored here (D4).
|
|
@@ -35,7 +35,7 @@ Use when:
|
|
|
35
35
|
Do **not** use for:
|
|
36
36
|
|
|
37
37
|
- Authoring an article from a topic with no research need — that is `topic`.
|
|
38
|
-
- Quality gating / judging generated content — that is `judge`.
|
|
38
|
+
- Quality gating / judging generated content — that is `content-judge`.
|
|
39
39
|
- Publishing, platform adaptation, or illustration — out of C4 scope.
|
|
40
40
|
- Anything requiring a raw `kk executor run` chain when the workflow already composes it.
|
|
41
41
|
|
|
@@ -93,7 +93,7 @@ skill is also callable directly as `Skill(skill="storm-research", args="<topic|-
|
|
|
93
93
|
works dir (re-running a topic is legal — no `--force` needed).
|
|
94
94
|
- If `raw` derives empty (no H1 and an empty basename, e.g. a file named `.md`) → fail loud.
|
|
95
95
|
|
|
96
|
-
## Works layout (0056, frozen)
|
|
96
|
+
## Works layout (0056, frozen; ADR-013 adds `references/`)
|
|
97
97
|
|
|
98
98
|
Per-topic workspace at `$works_dir/<topic-id>/`:
|
|
99
99
|
|
|
@@ -105,6 +105,7 @@ Per-topic workspace at `$works_dir/<topic-id>/`:
|
|
|
105
105
|
| `docs.json` | ingest | `web-search` output `Doc[]` |
|
|
106
106
|
| `content.json` | generate | STORM `Content` (machine contract) |
|
|
107
107
|
| `content.md` | render | markdown sidecar report |
|
|
108
|
+
| `references/<doc-id>.md` | ingest (live path only) | normalized full content per source (`/v2/scrape` → markitdown); file name = Doc id; audit trail and the citation-resolution target for the report tail (ADR-013) |
|
|
108
109
|
|
|
109
110
|
Contrast: `topic`'s authoring workspace is `./<kebab-case(topic)>` with `brief.md` /
|
|
110
111
|
`2-outline/` / `3-draft/` and explicitly excludes research. C4 works live under `$works_dir`,
|
|
@@ -130,9 +131,10 @@ outside any repo.
|
|
|
130
131
|
| `--in` file unreadable (missing / I/O) | exit 1, stderr names the path | fix the path / permissions |
|
|
131
132
|
| Derived query / topic-id empty (no H1 and empty basename) | exit 1, stderr shows the derived value | add an H1 or give the file a real name |
|
|
132
133
|
| Dest `$workflows_dir/<name>.yaml` exists with different bytes | warning, **no overwrite**; run proceeds with the user's copy | re-run with `--force` to replace from the install source |
|
|
133
|
-
| Workflow YAML cannot be resolved from any install source | exit 1, stderr lists the roots searched | reinstall the package / set `KK_WORKFLOWS_SOURCE` |
|
|
134
|
+
| Workflow YAML cannot be resolved from any install source | exit 1, stderr lists the roots searched (`KK_WORKFLOWS_SOURCE`, `plugins/kk/workflows`) | reinstall the package / set `KK_WORKFLOWS_SOURCE` |
|
|
134
135
|
| `KK_CONFIG` set but unreadable, or config unparseable / invalid types | exit 1, stderr names the key + expected vs actual type | fix the file, or delete it (recreated with defaults next run) |
|
|
135
136
|
| Missing config at `KK_CONFIG` | **not a failure** — create-on-first-run with compiled defaults; an existing file is never overwritten | — |
|
|
137
|
+
| `markitdown` missing from `PATH` (live mode) | ingest exit 1, stderr `web-search failed: markitdown is not on PATH`; probed before any network call, so no `docs.json` write | install markitdown / put it on `PATH`, re-run ingest |
|
|
136
138
|
|
|
137
139
|
Every failure names the exact path and the exact next command. Never silently skip, never
|
|
138
140
|
auto-replace, never hash topic-id in the YAML.
|
|
@@ -154,6 +156,10 @@ auto-replace, never hash topic-id in the YAML.
|
|
|
154
156
|
6. **Prefer primary sources in the markdown input file.** When a source file is supplied via
|
|
155
157
|
`--in`, favor the primary material in it (first-party specs, owned notes, authoritative
|
|
156
158
|
extracts) as the spine of the report; web results fill gaps, not the reverse.
|
|
159
|
+
7. **Digest, don't index.** References are evidence, not the deliverable: the report synthesizes
|
|
160
|
+
findings across the supplied documents, compares them, and states conclusions — it never
|
|
161
|
+
lists sources one per line. The render drops the `## Outline` replay (ADR-013 D7); the
|
|
162
|
+
references tail plus `references/<doc-id>.md` files are the audit trail behind each cite id.
|
|
157
163
|
|
|
158
164
|
## Invariants
|
|
159
165
|
|
|
@@ -164,3 +170,4 @@ auto-replace, never hash topic-id in the YAML.
|
|
|
164
170
|
`kk` CLI verb.
|
|
165
171
|
- `FIRECRAWL_API_KEY` stays env-only.
|
|
166
172
|
- Works layout file names are frozen (0056) — do not rename or add sidecars in this skill.
|
|
173
|
+
ADR-013 exception: the ingest live path writes `references/<doc-id>.md` per cached source.
|