@creativeaitools/agent-wiki 2.0.0

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,255 @@
1
+ ---
2
+ name: process-inbox
3
+ description: "Process raw files dropped into the Agentics vault inbox. Use this skill whenever the user says \"process inbox\", \"check the inbox\", \"handle new notes\", \"process raw notes\", \"ingest inbox files\", or wants to convert raw files in _inbox/ into canonical source pages."
4
+ ---
5
+
6
+ # Process Inbox
7
+
8
+ This skill promotes raw files from `_inbox/` into canonical, schema-compliant `source` pages. It does not extract entities, concepts, claims, questions, or relations; use `skills/extract-knowledge-primitives/SKILL.md` after source pages exist.
9
+
10
+ ## Step 1: Read the Vault Contract
11
+
12
+ Before touching anything, read the vault's agent contract in this order:
13
+
14
+ 1. `AGENTS.md` - the behavioral contract.
15
+ 2. `WIKI.md` Sections 4.1, 5, 12, and 13 - the runtime source schema, status/source type enums, ID formats, examples, and large-source rules.
16
+ 3. `WIKI.md` Section 14 - the durable raw inbox lifecycle.
17
+
18
+ Key rules for this workflow:
19
+ - Preserve raw content.
20
+ - Use stable source IDs.
21
+ - Do not invent metadata.
22
+ - Use `WIKI.md` Section 4.1 for source page schema, examples, and conversion provenance fields.
23
+ - Use `WIKI.md` Sections 5 and 12 for status values and source types.
24
+ - Use `WIKI.md` Section 13 for large-source parent and part handling.
25
+ - Use `agent-wiki create-page` to write canonical source pages and source part pages.
26
+ - Use `AGENT-WIKI-SPEC-v2.md` only when changing project behavior, resolving ambiguity, or when `WIKI.md` Sections 4.1, 5, 12, or 13 are insufficient.
27
+ Use `AGENT-WIKI-SPEC-v2.md` Section 6.10 only when you need the page scaffolding contract or `agent-wiki create-page` option semantics.
28
+
29
+ If local Python or converter availability is unknown, run the read-only onboarding probe before processing binary or non-markdown files:
30
+
31
+ ```bash
32
+ agent-wiki onboard --check
33
+ ```
34
+
35
+ For first-run setup decisions, prefer:
36
+
37
+ ```bash
38
+ agent-wiki onboard --check --questions
39
+ ```
40
+
41
+ Use the generated multiple-choice prompts so the user can answer with compact letter choices.
42
+
43
+ Use the probe output and `_system/config.json`, when present, to determine which local conversion backends are configured and available. Also use the probe output to understand OS/platform, whether the repository root has local Obsidian settings, and whether local `knownVaults` mappings exist for `obsidian://` references. `_system/config.example.json` is the tracked example shape; `_system/config.json` is local-only policy.
44
+
45
+ If the user approves persisting local Python or conversion policy, write local config with explicit approved flags:
46
+
47
+ ```bash
48
+ agent-wiki onboard --write-config --python-command python3 --conversion disabled
49
+ ```
50
+
51
+ This checkout is the only wiki root. Process `_inbox/`, write `sources/`, and move retained raw files to `raw/` relative to the repository root. Do not accept an alternate vault root or external destination for this workflow.
52
+
53
+ Do not create a virtual environment, install packages, write `_system/config.json`, or create unrelated setup folders unless the user explicitly asks for that setup work. Creating the target source directories and `raw/` as part of an approved inbox promotion is allowed. Do not hand-edit `_system/config.json`; use `agent-wiki onboard --write-config` after approval.
54
+
55
+ If an inbox item contains an `obsidian://` URI, follow `AGENT-WIKI-SPEC-v2.md` Section 8.6. Do not launch the URI. Resolve it only through `_system/config.json` `knownVaults`, and otherwise preserve it as an opaque external reference.
56
+
57
+ ## Step 2: Check the Inbox
58
+
59
+ Scan `_inbox/` for raw files. Ignore directories and hidden/system files. Do not treat `_inbox/trash/` or `raw/` as active queue locations.
60
+
61
+ If `_inbox/` is empty or contains no processable raw files, report that and stop.
62
+
63
+ ## Step 3: Promote Each Raw File
64
+
65
+ For each raw file, work through files one at a time.
66
+
67
+ ### 3a. Read the raw file
68
+
69
+ Read the file fully. Preserve the original content exactly when writing the source body.
70
+
71
+ If the raw file is plain text or Markdown, treat the raw file itself as the prepared source body file. Prefer passing that file directly to `agent-wiki create-page` with `--body-file` unless the source needs partitioning. Do not copy text or Markdown inbox content into `--body`.
72
+
73
+ If the raw file is a binary or non-markdown document, use configured local conversion tools only when they are available. Read conversion policy from `_system/config.json` if it exists. Missing config means use conservative local-only defaults.
74
+
75
+ Do not install dependencies during this skill run. Do not call network, cloud OCR, LLM, transcription, or hosted document-intelligence services unless the operator explicitly configured or requested that behavior.
76
+
77
+ If no configured conversion path exists, leave the file in `_inbox/` and report that text extraction is required.
78
+
79
+ When conversion is used, record conversion provenance in the source frontmatter when available:
80
+
81
+ - `convertedAt`
82
+ - `conversionTool`
83
+ - `conversionToolVersion`
84
+ - `conversionBackend`
85
+ - `conversionWarnings`
86
+
87
+ ### 3b. Infer source metadata
88
+
89
+ Create source pages using `agent-wiki create-page`. The scaffolder writes schema-compliant source pages, validates source parent/part requirements, and prevents duplicate IDs or target path overwrites.
90
+
91
+ Newly promoted ordinary source pages MUST use `status: unprocessed` and `sourceRole: whole`. The extraction workflow changes source pages to `status: processed` after knowledge primitives have been extracted.
92
+
93
+ Large source parent pages MUST use `sourceRole: parent`. They SHOULD use `status: partitioned` while one or more child source parts remain unprocessed. Child source part pages MUST use `sourceRole: part` and `status: unprocessed`.
94
+
95
+ Use this ID pattern:
96
+
97
+ ```text
98
+ source.<yyyy-mm-dd>.<sourceType>.<sourceSlug>
99
+ ```
100
+
101
+ - `yyyy-mm-dd`: processing date unless the raw file clearly includes a retrieval date.
102
+ - `sourceType`: the inferred source type from `WIKI.md` Section 12.
103
+ - `sourceSlug`: short kebab-case descriptor, preferably four words.
104
+
105
+ Infer `sourceType` conservatively:
106
+ - YouTube transcript -> `transcript`
107
+ - Article or blog post -> `article`
108
+ - PDF -> `pdf`
109
+ - Long generic document -> `document`
110
+ - Email -> `email`
111
+ - Meeting notes -> `meeting-notes`
112
+ - Raw data -> `dataset`
113
+ - Screenshot -> `screenshot`
114
+ - Unknown or plain notes -> `other`
115
+
116
+ If a field such as `publishedAt`, `author`, or `originUrl` cannot be inferred, omit optional fields rather than guessing. For local raw files with no external URL, use `originPath` to record the retained raw file path after promotion. Required source fields must still follow `WIKI.md` Section 4.1.
117
+
118
+ ### 3c. Decide whether to partition
119
+
120
+ If the captured or converted text is larger than roughly 25,000 words, or if an agent cannot reliably process it in one extraction pass, create a large source instead of one giant markdown body.
121
+
122
+ Use deterministic split rules from `WIKI.md` Section 13:
123
+
124
+ - prefer semantic boundaries such as chapters, headings, appendices, transcript topics, or slide boundaries
125
+ - fall back to page ranges, timestamps, or other stable locators
126
+ - target 8,000-15,000 words per source part
127
+ - do not exceed 20,000 words per part unless preserving an indivisible structure requires it
128
+ - avoid splitting inside tables, code blocks, quoted blocks, or list structures when possible
129
+
130
+ For ordinary sources, write one canonical source page.
131
+
132
+ For large sources, write:
133
+
134
+ - one parent source page under `sources/`
135
+ - child source part pages under `sources/parts/`
136
+
137
+ ### 3d. Write the source page or source parts
138
+
139
+ Before writing the source page, determine the final retained raw path that will be used after promotion:
140
+
141
+ ```text
142
+ raw/<yyyy-mm-dd>-<source-slug>-original<extension>
143
+ ```
144
+
145
+ Use that future retained path as `--origin-path` when calling the scaffolder. If a filename already exists, choose the collision-resistant retained filename before creating the source page.
146
+
147
+ For an ordinary source, save the prepared verbatim Markdown body to a temporary file outside the vault, then call:
148
+
149
+ For `.md` or `.txt` inbox files that do not need conversion or cleanup, the prepared source body may be the raw inbox file itself. For converted binary files, use the converted Markdown output file. Always prefer `--body-file` for source bodies.
150
+
151
+ ```bash
152
+ agent-wiki create-page \
153
+ --type source \
154
+ --subtype <sourceType> \
155
+ --slug <sourceSlug> \
156
+ --title "<title>" \
157
+ --source-date <yyyy-mm-dd> \
158
+ --retrieved-at <yyyy-mm-dd> \
159
+ --origin-path "raw/<retained-filename>" \
160
+ --source-role whole \
161
+ --body-file <prepared-source-body.md> \
162
+ --no-log
163
+ ```
164
+
165
+ The body file must contain the full verbatim raw or converted content below the frontmatter. Preserve user context, annotations, and formatting.
166
+
167
+ For a large source, save each prepared segment body and the short parent manifest body to temporary Markdown files outside the vault. Call the scaffolder once for each child source part, then once for the parent manifest.
168
+
169
+ Part pages use:
170
+
171
+ ```bash
172
+ agent-wiki create-page \
173
+ --type source \
174
+ --subtype <sourceType> \
175
+ --slug <sourceSlug> \
176
+ --title "<title> - Part <n>" \
177
+ --source-date <yyyy-mm-dd> \
178
+ --retrieved-at <yyyy-mm-dd> \
179
+ --origin-path "raw/<retained-filename>" \
180
+ --source-role part \
181
+ --parent-source-id <parentSourceId> \
182
+ --part-index <n> \
183
+ --part-count <count> \
184
+ --locator "<locator>" \
185
+ --body-file <prepared-source-part-body.md> \
186
+ --no-log
187
+ ```
188
+
189
+ Parent pages use:
190
+
191
+ ```bash
192
+ agent-wiki create-page \
193
+ --type source \
194
+ --subtype <sourceType> \
195
+ --slug <sourceSlug> \
196
+ --title "<title>" \
197
+ --source-date <yyyy-mm-dd> \
198
+ --retrieved-at <yyyy-mm-dd> \
199
+ --origin-path "raw/<retained-filename>" \
200
+ --source-role parent \
201
+ --source-part sources/parts/<yyyy-mm-dd>-<sourceType>-<sourceSlug>-part001.md \
202
+ --part-count <count> \
203
+ --body-file <prepared-parent-manifest-body.md> \
204
+ --no-log
205
+ ```
206
+
207
+ Repeat `--source-part` once for each ordered child part path.
208
+
209
+ The parent body should stay short and should not contain the full long-form source text. Include metadata, import notes, attachment references, retained raw path, and an ordered source part manifest. Each part body must contain the verbatim text for that segment.
210
+
211
+ ### 3e. Move the raw file
212
+
213
+ After the source page is created successfully, move the original raw file from `_inbox/` to `raw/` so it is no longer in the active inbox queue. A raw file that has been promoted into a canonical `source` page MUST NOT remain in `_inbox/`.
214
+
215
+ Use a collision-resistant retained filename:
216
+
217
+ ```text
218
+ raw/<yyyy-mm-dd>-<source-slug>-original<extension>
219
+ ```
220
+
221
+ If a filename already exists, append a short unique suffix before the extension.
222
+
223
+ The source page's `originPath` should match the final retained raw file path. For large sources, the parent and all child source parts should use the retained raw path as `originPath`.
224
+
225
+ If source page creation succeeds but moving the raw file fails, report the move failure clearly and leave the source page in place. Do not process the same inbox file again until the raw file lifecycle has been resolved.
226
+
227
+ If a raw file cannot be promoted, leave it in `_inbox/` and report the reason. Do not silently move failed items.
228
+
229
+ ## Step 4: Report to the User
230
+
231
+ If one or more raw files were promoted, write one operational log entry for the processed batch:
232
+
233
+ ```bash
234
+ agent-wiki log --message "process-inbox: promoted <count> raw files to sources; skipped=<count> failed=<count>"
235
+ ```
236
+
237
+ Do not write a log entry when no files were promoted.
238
+
239
+ After processing all items, give a concise summary:
240
+
241
+ - How many raw files were promoted.
242
+ - The source path and ID for each promoted file.
243
+ - For large sources, the parent source path and each child part path.
244
+ - The retained raw path for each original.
245
+ - Any files skipped or failed and why.
246
+
247
+ ## Important Rules
248
+
249
+ - `_inbox/` is an active raw drop zone, not canonical knowledge.
250
+ - `raw/` retains original raw captures after promotion and is not canonical knowledge.
251
+ - `sources/` contains the canonical verbatim source pages.
252
+ - Large source parent pages are metadata and manifests; extraction should operate on source parts.
253
+ - Do not create separate intake tracking files.
254
+ - Do not extract knowledge primitives in this skill.
255
+ - Do not touch human prose except to preserve it verbatim in the new source page body.
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: process-workspace-sources
3
+ description: "Process workspace-mode source candidates discovered outside the wiki directory. Use this when the user asks to process workspace files, scan workspace sources, or promote changed workspace files into canonical source pages."
4
+ ---
5
+
6
+ # Process Workspace Sources
7
+
8
+ This skill promotes selected files from a workspace into canonical `source` pages inside the workspace wiki. It is the workspace-mode counterpart to `process-inbox`, but it does **not** move, rewrite, archive, or otherwise modify the original workspace files.
9
+
10
+ ## Step 1: Read the Contract
11
+
12
+ Before touching anything, read:
13
+
14
+ 1. `AGENTS.md`
15
+ 2. `WIKI.md` Sections 4.1, 5, 12, and 13
16
+ 3. `AGENT-WIKI-SPEC-v2.md` only when changing behavior or resolving ambiguity
17
+
18
+ Key rules:
19
+
20
+ - The source files belong to the workspace owner. Leave them in place.
21
+ - Workspace files are discovery inputs, not canonical evidence until represented by `sources/` pages.
22
+ - Canonical source pages live inside the wiki directory, usually `wiki/sources/`.
23
+ - Use `agent-wiki create-page` from the wiki root to create source pages.
24
+ - New source pages use `status: unprocessed` and `sourceRole: whole` unless partitioned.
25
+ - Large source parent/part behavior matches the existing source schema.
26
+
27
+ ## Step 2: Get the Workspace Worklist
28
+
29
+ From the project root, list new or changed non-code source candidates:
30
+
31
+ ```bash
32
+ agent-wiki workspace pending --workspace-root . --json
33
+ ```
34
+
35
+ If the console script is not installed yet, build and link the local package first:
36
+
37
+ ```bash
38
+ npm install
39
+ npm run build
40
+ npm link
41
+ ```
42
+
43
+ The command returns an agent-readable list with:
44
+
45
+ - workspace-relative path
46
+ - absolute path
47
+ - modified time
48
+ - size
49
+ - sha256
50
+ - reason (`new` or `changed`)
51
+ - recommended source type
52
+ - existing source mapping, when known
53
+
54
+ Use `workspace scan --write-state` only when you intentionally want to refresh the local scan state after reviewing the candidate set.
55
+
56
+ ## Step 3: Select Files To Promote
57
+
58
+ For each pending file, decide whether it should become a canonical source page.
59
+
60
+ Skip files that are:
61
+
62
+ - generated output
63
+ - local configuration
64
+ - dependency/cache/build artifacts
65
+ - source code or scripts
66
+ - temporary notes not worth durable source treatment
67
+
68
+ If a file is already represented by a source page and only changed, update or supersede the source page only when the user wants changed source content reflected in the wiki. Do not silently overwrite an existing source body.
69
+
70
+ ## Step 4: Create Canonical Source Pages
71
+
72
+ For each selected file:
73
+
74
+ 1. Read the workspace file in place.
75
+ 2. Infer conservative metadata.
76
+ 3. Create a source page in the wiki with `agent-wiki create-page`.
77
+ 4. Set `originPath` to the workspace-relative path of the original file.
78
+ 5. Do not move or modify the original workspace file.
79
+
80
+ For a normal text or Markdown source, from the wiki root:
81
+
82
+ ```bash
83
+ agent-wiki create-page \
84
+ --type source \
85
+ --subtype <sourceType> \
86
+ --slug <sourceSlug> \
87
+ --title "<title>" \
88
+ --source-date <yyyy-mm-dd> \
89
+ --retrieved-at <yyyy-mm-dd> \
90
+ --origin-path "<workspace-relative-path>" \
91
+ --source-role whole \
92
+ --body-file "<absolute-or-relative-workspace-file>" \
93
+ --no-log
94
+ ```
95
+
96
+ For large files, use the same parent/source-part pattern as `process-inbox`, but `originPath` remains the workspace-relative path and there is no `raw/` retained-file move.
97
+
98
+ ## Step 5: Update Workspace State
99
+
100
+ After successful promotion, record the mapping from workspace file to source page:
101
+
102
+ ```bash
103
+ agent-wiki workspace mark-sourced \
104
+ --workspace-root . \
105
+ --path "<workspace-relative-path>" \
106
+ --source-id "<sourceId>" \
107
+ --source-path "sources/<source-file>.md"
108
+ ```
109
+
110
+ If the console script is not installed yet, build and link the local package with `npm install && npm run build && npm link`.
111
+
112
+ The command writes `wiki/_system/state/workspace-sources.json`. This state file is local generated state and should not be treated as canonical knowledge.
113
+
114
+ ## Step 6: Continue The Existing Pipeline
115
+
116
+ After source pages exist:
117
+
118
+ 1. Run `extract-knowledge-primitives` to process `status: unprocessed` source pages.
119
+ 2. Run `compile-wiki` to regenerate caches, indexes, reports, and root catalog.
120
+
121
+ ## Important Rules
122
+
123
+ - Workspace mode has no raw-file lifecycle.
124
+ - Do not move files to `raw/`.
125
+ - Do not use `_inbox/` for workspace discovery unless the user explicitly placed files there.
126
+ - Do not treat discovered workspace files as evidence until a canonical source page exists.
127
+ - Do not modify the original workspace file.
@@ -0,0 +1,140 @@
1
+ ---
2
+ name: update-overview
3
+ description: "Create or refresh the root overview.md landing page for the vault. Use this skill when the user asks to update the vault overview, create the landing page, summarize the vault, refresh overview.md, or produce a human-facing vault summary."
4
+ ---
5
+
6
+ # Update Vault Overview
7
+
8
+ This skill creates or refreshes root `overview.md`, the human-facing narrative landing page for the vault. It does not own the schema.
9
+
10
+ Runtime overview schema lives in `WIKI.md` Section 4.1. Page type rules live in `WIKI.md` Section 3. Authority rules live in `WIKI.md` Sections 1.1, 9, and 11. The vault behavior contract lives in `AGENTS.md`. The full project/development contract lives in `AGENT-WIKI-SPEC-v2.md`.
11
+
12
+ Use `AGENT-WIKI-SPEC-v2.md` only when changing project behavior, resolving ambiguity, or when `WIKI.md` Sections 1.1, 3, 4.1, 9, or 11 do not contain enough detail. If this skill or those `WIKI.md` sections conflict with `AGENT-WIKI-SPEC-v2.md`, follow `AGENT-WIKI-SPEC-v2.md`.
13
+
14
+ ## When to Use
15
+
16
+ Use this skill when:
17
+ - the user asks for a vault overview, vault landing page, or root `overview.md`
18
+ - the vault has changed meaningfully and the human-facing overview should be refreshed
19
+ - the user wants a paragraph-form summary of the vault and its page types
20
+
21
+ Do not run this skill automatically as part of compile. `overview.md` is durable AI-maintained prose, not a deterministic compile artifact.
22
+
23
+ ## Step 1: Read the Contract and Runtime Reference
24
+
25
+ Before updating `overview.md`, read:
26
+
27
+ 1. `AGENTS.md` for behavior rules.
28
+ 2. `WIKI.md` Sections 3, 4.1, 9, and 11 for the `overview.md` page type, runtime schema, generated-content authority, and report authority.
29
+
30
+ Read `AGENT-WIKI-SPEC-v2.md` only when changing the project itself, resolving ambiguity, or when `WIKI.md` Sections 1.1, 3, 4.1, 9, or 11 are insufficient.
31
+
32
+ ## Step 2: Compile First
33
+
34
+ Run compile before writing the overview so cache inputs are current:
35
+
36
+ ```bash
37
+ agent-wiki compile
38
+ ```
39
+
40
+ If compile reports validation issues, fix or report those issues before relying on generated cache data for the overview.
41
+
42
+ ## Step 3: Gather Inputs
43
+
44
+ Use compiled and canonical inputs, in this order:
45
+
46
+ 1. `_system/cache/pages.json` for page inventory, page types, titles, statuses, paths, and metadata.
47
+ 2. `_system/cache/agent-digest.json` for compact high-signal context.
48
+ 3. `_system/cache/relations.jsonl` for explicit cross-page links, relation types, and densely connected subgraphs — used to derive topical clusters.
49
+ 4. Canonical pages in content folders when the overview needs richer context than the cache provides.
50
+ 5. Root docs such as `README.md`, `WIKI.md` Sections 1.1 and 2, and `INBOX.md` for project and workflow orientation.
51
+
52
+ Do not use reports or logs as primary truth. Reports may help identify maintenance concerns, but the overview should be grounded in canonical pages and compiled cache data.
53
+
54
+ ## Step 4: Create or Refresh `overview.md`
55
+
56
+ Write `overview.md` at the vault root.
57
+
58
+ If the file does not exist, create it with frontmatter using the universal and overview fields from `WIKI.md` Section 4.1:
59
+
60
+ ```yaml
61
+ id: meta.overview
62
+ pageType: overview
63
+ title: Vault Overview
64
+ status: active
65
+ ```
66
+
67
+ Set `createdAt` and `updatedAt` using `YYYY-MM-DD`. Include `aliases` and `tags` as required by the spec.
68
+
69
+ If the file already exists:
70
+ - preserve any human-authored prose unless the user explicitly asks for a rewrite
71
+ - update `updatedAt` when the overview prose or frontmatter changes
72
+ - keep `pageType: overview`
73
+ - keep the file at root `overview.md`
74
+
75
+ ## Step 5: Write the Overview
76
+
77
+ Write in long-form article style for a human reader.
78
+
79
+ The overview should include:
80
+ - a vault-level summary
81
+ - paragraph-form summaries for each active page type represented in the vault
82
+ - a detailed cluster analysis (see below)
83
+ - clear orientation about what the reader can find and where the material lives
84
+ - an honest account of sparse, draft, or incomplete areas when the vault is small or early-stage
85
+
86
+ Use headings sparingly and make the page readable as a landing article, not a generated table or report.
87
+
88
+ ### Cluster Analysis Section
89
+
90
+ The overview MUST include a dedicated section that groups vault pages into meaningful topical clusters. A cluster is a set of related pages that share a common subject, entity, theme, or research thread — regardless of their individual page type.
91
+
92
+ To derive clusters:
93
+
94
+ 1. Read the titles, tags, and relations fields from `_system/cache/pages.json`.
95
+ 2. Read `_system/cache/relations.jsonl` for explicit cross-page links and relation types.
96
+ 3. Group pages by shared subject matter, named entities, recurring themes, or densely connected subgraphs.
97
+ 4. Name each cluster after its dominant topic or entity (e.g., "Urban Water Infrastructure", "Key Decision-Makers", "Unanswered Questions About X").
98
+ 5. Write a paragraph for each cluster that:
99
+ - describes what the cluster is about and why these pages belong together
100
+ - names the most important or representative pages using wikilinks
101
+ - notes the mix of page types present (sources, claims, entities, syntheses, etc.)
102
+ - identifies open questions or gaps within the cluster, if any
103
+
104
+ If the vault has fewer than five pages, describe the emerging clusters as early-stage threads rather than omitting the section.
105
+
106
+ Do not invent clusters that are not grounded in actual page content. If pages are too sparse to cluster meaningfully, say so honestly.
107
+
108
+ When referring to specific vault pages — entities, sources, concepts, claims, syntheses, questions, or any other canonical page — use Obsidian-style wikilinks (`[[page-slug]]` or `[[page-slug|Display Text]]`). Do not use plain text names, standard markdown links, or bare file paths for internal vault references. This applies to every page mentioned in the overview body, including examples, highlights, cluster descriptions, and section summaries.
109
+
110
+ Do not make unsupported claims about the vault. If the cache shows no pages for a page type, either omit that page type or describe it as a supported structure that currently has no active pages, depending on what best serves the reader.
111
+
112
+ ## Step 6: Authority Rules
113
+
114
+ `overview.md` is orientation, not evidence.
115
+
116
+ Do not:
117
+ - treat `overview.md` as primary evidence for claims
118
+ - place claim/evidence records only in the overview
119
+ - use the overview to replace canonical source, entity, concept, claim, synthesis, or question pages
120
+ - regenerate it mechanically on every compile run
121
+
122
+ If the overview describes a substantive claim that should be tracked, create or update the appropriate canonical page or claim record instead of leaving the claim only in overview prose.
123
+
124
+ ## Step 7: Log the Update
125
+
126
+ After successfully creating or refreshing `overview.md`, write one operational log entry:
127
+
128
+ ```bash
129
+ agent-wiki log --message "update-overview: refreshed root overview.md; pageTypes=<count> pages=<count>"
130
+ ```
131
+
132
+ Do not write a log entry if no file was changed.
133
+
134
+ ## Step 8: Report Results
135
+
136
+ Report a concise summary:
137
+ - whether `overview.md` was created or refreshed
138
+ - which inputs were used
139
+ - whether compile had validation issues
140
+ - any notable gaps, such as missing summaries or sparse page types
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: write-synthesis
3
+ description: "Create or refresh durable synthesis pages. Use this skill when the user asks to synthesize sources, write a brief, compare documents, summarize a research thread, create an analysis, or make a timeline synthesis."
4
+ ---
5
+
6
+ # Write Synthesis
7
+
8
+ This skill creates or refreshes `synthesis` pages in `syntheses/`. It owns judgment and prose for cross-source interpretation. It does not own the vault schema or deterministic file scaffolding.
9
+
10
+ Runtime synthesis schema lives in `WIKI.md` Section 4.1. Page type rules live in `WIKI.md` Section 3. Status enums live in `WIKI.md` Section 5. Evidence rules live in `WIKI.md` Section 7. Synthesis workflow rules live in `AGENT-WIKI-SPEC-v2.md` Section 10.5. The vault behavior contract lives in `AGENTS.md`.
11
+
12
+ Use `AGENT-WIKI-SPEC-v2.md` only when changing project behavior, resolving ambiguity, or when `WIKI.md` Sections 3, 4.1, 5, or 7 do not contain enough detail. If this skill or those `WIKI.md` sections conflict with `AGENT-WIKI-SPEC-v2.md`, follow `AGENT-WIKI-SPEC-v2.md`.
13
+
14
+ Use Obsidian wikilinks for references inside this vault. For cross-vault Obsidian references, use standard markdown links with `obsidian://` URIs per `AGENT-WIKI-SPEC-v2.md` Section 8.6. Do not launch `obsidian://` URIs; resolve them only through local `_system/config.json` `knownVaults`, and treat unconfigured vaults as opaque external references.
15
+
16
+ ## When to Use
17
+
18
+ Use this skill when the user asks to:
19
+ - synthesize multiple sources or pages
20
+ - write a brief, analysis, comparison, summary, or timeline synthesis
21
+ - compare documents, sources, positions, or claims
22
+ - summarize a research thread into durable authored knowledge
23
+ - maintain an existing synthesis after new sources or claims are added
24
+
25
+ Do not use this skill for:
26
+ - atomic propositions that should be claim pages
27
+ - verbatim captured material that should be source pages
28
+ - unresolved unknowns that should be question pages
29
+ - deterministic maintenance output that should be reports
30
+ - whole-vault landing prose that should be root `overview.md`
31
+
32
+ ## Step 1: Read the Contract and Runtime Reference
33
+
34
+ Before writing or refreshing a synthesis, read:
35
+
36
+ 1. `AGENTS.md` for behavior rules.
37
+ 2. `WIKI.md` Sections 3, 4.1, 5, and 7 for page types, runtime schema, status values, and evidence rules.
38
+ 3. `AGENT-WIKI-SPEC-v2.md` Section 10.5 for synthesis workflow rules.
39
+
40
+ ## Step 2: Compile or Inspect Current Cache
41
+
42
+ If the synthesis depends on current vault inventory, run compile first:
43
+
44
+ ```bash
45
+ agent-wiki compile
46
+ ```
47
+
48
+ If the user asks for a narrow synthesis over explicitly named files and the needed pages are already known, compile is optional. Do not rely on reports or logs as primary truth.
49
+
50
+ ## Step 3: Select Inputs
51
+
52
+ Use canonical inputs in this order:
53
+
54
+ 1. Explicit source pages, source part pages, claim pages, entities, concepts, or questions named by the user.
55
+ 2. `_system/cache/pages.json`, `_system/cache/claims.jsonl`, and `_system/cache/source-index.json` for discovery.
56
+ 3. Canonical pages in `sources/`, `claims/`, `entities/`, `concepts/`, `questions/`, and existing `syntheses/` when richer context is needed.
57
+
58
+ For large sources, prefer source part pages over parent source manifests when the relevant evidence comes from a specific part.
59
+
60
+ ## Step 4: Decide Whether to Create or Update
61
+
62
+ Search `syntheses/` and `_system/cache/pages.json` for an existing synthesis with the same scope, audience, and synthesis type.
63
+
64
+ Update an existing synthesis when it already covers the requested scope. Create a new synthesis when the scope, time horizon, audience, or analytical question is materially different.
65
+
66
+ Choose `synthesisType` from `WIKI.md` Section 4.1:
67
+ - `summary` for compact cross-source restatements
68
+ - `overview` for broad topic orientation
69
+ - `analysis` for reasoned interpretation
70
+ - `timeline` for chronological narrative
71
+ - `brief` for decision-relevant summary
72
+ - `comparison` for side-by-side interpretation
73
+
74
+ ## Step 5: Write the Body
75
+
76
+ Write substantive Markdown prose for a human reader. The body should normally include:
77
+ - scope and purpose
78
+ - source basis or coverage
79
+ - main synthesis in paragraph form
80
+ - important evidence, claims, or examples
81
+ - uncertainty, limits, contradictions, or unresolved questions
82
+ - current conclusion or next-step implication, when appropriate
83
+
84
+ Preserve uncertainty. Do not present weak, incomplete, or contested evidence as established fact.
85
+
86
+ If the synthesis introduces an important atomic proposition that needs independent evidence tracking, create or update a claim page and include that claim ID in `derivedClaims`.
87
+
88
+ If the synthesis surfaces a durable unresolved issue, create or update a question page and reference it in the body or related fields.
89
+
90
+ ## Step 6: Create New Synthesis Pages
91
+
92
+ For new synthesis pages, prepare the body prose in a temporary Markdown file outside the vault, then use the deterministic scaffolder:
93
+
94
+ ```bash
95
+ agent-wiki create-page \
96
+ --type synthesis \
97
+ --subtype brief \
98
+ --slug <synthesis-slug> \
99
+ --title "<title>" \
100
+ --scope "<scope>" \
101
+ --source-page <sourceId> \
102
+ --derived-claim <claimId> \
103
+ --body-file <prepared-body.md> \
104
+ --no-log
105
+ ```
106
+
107
+ Repeat `--source-page` and `--derived-claim` as needed. `--scope` is required.
108
+
109
+ The scaffolder owns IDs, filename, required frontmatter, duplicate checks, and body placement. This skill owns source selection, synthesis type selection, body prose, uncertainty handling, and any claim or question updates.
110
+
111
+ ## Step 7: Refresh Existing Synthesis Pages
112
+
113
+ When updating an existing synthesis:
114
+ - preserve human-authored prose unless the operator explicitly asks for a rewrite
115
+ - update `updatedAt` when prose or structured fields change
116
+ - update `sourcePages` when the source basis changes
117
+ - update `derivedClaims` when claim dependencies change
118
+ - keep stale or contradicted prior context visible when it matters to the current interpretation
119
+
120
+ Do not regenerate a synthesis mechanically on every compile run.
121
+
122
+ ## Step 8: Log the Synthesis Batch
123
+
124
+ After successfully creating or refreshing one or more synthesis pages, write one operational log entry:
125
+
126
+ ```bash
127
+ agent-wiki log --message "write-synthesis: updated <count> syntheses; sources=<count> claims=<count>"
128
+ ```
129
+
130
+ Do not write a log entry when no synthesis page changed.
131
+
132
+ ## Step 9: Report Results
133
+
134
+ Report a concise summary:
135
+ - synthesis pages created or refreshed
136
+ - source pages and claim pages used
137
+ - questions or claims created or updated
138
+ - notable uncertainty, contradictions, or gaps
139
+ - whether compile reported validation issues
140
+
141
+ ## Checklist
142
+
143
+ - [ ] Read `AGENTS.md`, `WIKI.md` Sections 3, 4.1, 5, and 7, and `AGENT-WIKI-SPEC-v2.md` Section 10.5
144
+ - [ ] Identify the synthesis scope, audience, and `synthesisType`
145
+ - [ ] Select canonical source pages, source parts, claims, and related pages
146
+ - [ ] Check for an existing synthesis before creating a new one
147
+ - [ ] Use `agent-wiki create-page --no-log` for new synthesis pages
148
+ - [ ] Include required `--scope`
149
+ - [ ] List source basis in `sourcePages` when sources are used
150
+ - [ ] List tracked claim dependencies in `derivedClaims` when claims are used
151
+ - [ ] Preserve uncertainty, contradictions, and important caveats
152
+ - [ ] Create or update claim/question pages when needed
153
+ - [ ] Write one operational log entry for the synthesis batch
154
+ - [ ] Report results