@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.
package/AGENTS.md ADDED
@@ -0,0 +1,314 @@
1
+ # AGENTS.md
2
+
3
+ Agent behavior contract for the Agentics vault.
4
+ Version: v2Last updated: 2026-05-02
5
+
6
+ ---
7
+
8
+ ## 1. What this file is
9
+
10
+ This file is the authoritative description of how agents are expected to behave when reading, writing, or compiling this vault. It is not a style guide — it is a contract.
11
+
12
+ Agents MUST read this file before making any edits to the vault. See also [[WIKI#4.1 Common runtime schemas]] for schema, [[WIKI#14 Inbox intake strategy]] for raw intake rules, and [[WIKI#16 Editorial principles]] for editorial rules.
13
+
14
+ For routine field-level schema details, use [[WIKI#4.1 Common runtime schemas]]. Use [[AGENT-WIKI-SPEC-v2]] when changing project behavior, resolving ambiguity, or when [[WIKI#4.1 Common runtime schemas]] is insufficient. This file only defines agent behavior.
15
+
16
+ ---
17
+
18
+ ## 2. Core rules
19
+
20
+ ### 2.1 Preserve human content
21
+
22
+ Agents MUST NOT rewrite or delete human-authored prose, notes, or commentary unless explicitly instructed to do so by the human operator.
23
+
24
+ Human-authored prose, notes, and commentary are protected.
25
+
26
+ ### 2.2 Keep generated content explicit
27
+
28
+ Agents SHOULD keep generated structured knowledge in frontmatter fields, claim/evidence/relation records, generated cache files, or fully generated report files.
29
+
30
+ When updating page body prose, agents MUST preserve human-authored content unless the human operator explicitly asks for a rewrite.
31
+
32
+ When creating new `entity`, `concept`, `claim`, `question`, or `synthesis` pages, agents MUST write substantive Markdown body prose after the frontmatter. The body MUST explain the page in human-facing context and MUST NOT be only a placeholder, a one-line title restatement, or a metadata dump.
33
+
34
+ ### 2.3 Use stable IDs
35
+
36
+ Every page, claim, evidence entry, and relation MUST have a stable ID.
37
+
38
+ When creating new objects, agents MUST follow the naming conventions in section 4.
39
+
40
+ IDs MUST NOT be regenerated on recompile. Once assigned, an ID is permanent.
41
+
42
+ ### 2.4 Update timestamps
43
+
44
+ When an agent meaningfully changes structured content (frontmatter, claims, relations), it MUST update `updatedAt` on the affected page.
45
+
46
+ ### 2.5 Do not invent certainty
47
+
48
+ Agents MUST NOT assign confidence values that are not supported by evidence.
49
+
50
+ When evidence is weak or absent, claims MUST use:
51
+ - `status: unverified` or `status: weakly_supported`
52
+ - `confidence` below `0.60`
53
+
54
+ Agents MUST NOT silently upgrade `weakly_supported` or `unverified` claims to `supported`.
55
+
56
+ ### 2.6 Do not treat reports as truth
57
+
58
+ Files in `reports/` are generated views. They are NOT authoritative.
59
+
60
+ Agents MUST NOT read reports as primary data sources when page frontmatter or cache files are available.
61
+
62
+ Root `overview.md`, if present, is human-facing orientation prose. It is NOT primary evidence for claims unless the relevant material has also been promoted into canonical source, claim, evidence, or page metadata records.
63
+
64
+ ### 2.7 Do not hand-edit cache files
65
+
66
+ Files in `_system/cache/`, `_system/indexes/`, `_system/logs/`, and root `index.md` are generated artifacts.
67
+
68
+ Agents MUST NOT manually patch cache files, generated index files, generated log files, or root `index.md`. Agents MUST write operational log entries through `agent-wiki log`.
69
+
70
+ ### 2.8 Respect the inbox boundary
71
+
72
+ `_inbox/` is a raw item intake queue — NOT a source of canonical knowledge.
73
+
74
+ Agents MUST NOT read `_inbox/` or `raw/` files as primary data sources or treat them as evidence for claims.
75
+
76
+ Agents SHOULD process inbox items by converting retained raw files into canonical `source` pages under `sources/`. See [[WIKI#14 Inbox intake strategy]] for lifecycle rules and `skills/process-inbox/SKILL.md` for the operational workflow.
77
+
78
+ Large retained sources SHOULD be converted into a short parent source page under `sources/` and child source part pages under `sources/parts/`. Agents SHOULD extract knowledge primitives from source part pages, not from the parent source manifest.
79
+
80
+ When creating new canonical `source`, `entity`, `concept`, `claim`, `question`, or `synthesis` page files, agents SHOULD use `agent-wiki create-page` unless a skill gives a more specific source-capture workflow. The script scaffolds required frontmatter and paths; it does not replace agent judgment about body prose, evidence, relationships, source capture, conversion, or large-source split decisions.
81
+
82
+ When asked for durable cross-source interpretation, comparison, brief, analysis, summary, or timeline narrative, agents SHOULD use the local `write-synthesis` skill. Synthesis pages MUST identify their source basis, preserve uncertainty, and avoid treating unsupported interpretation as established fact.
83
+
84
+ Before first editing a checkout, agents SHOULD run the deterministic read-only onboarding probe:
85
+
86
+ ```bash
87
+ agent-wiki onboard --check --wiki-root .
88
+ ```
89
+
90
+ For first-run setup questions, agents SHOULD use the stable numbered CLI prompts:
91
+
92
+ ```bash
93
+ agent-wiki onboard --check --questions --wiki-root .
94
+ ```
95
+
96
+ Agents SHOULD ask setup questions as compact multiple-choice prompts so the user can reply with letter choices.
97
+
98
+ This checkout is the only wiki root. Agents MUST read and write project paths relative to the repository root.
99
+
100
+ When the operator has registered multiple local Agent Wiki roots, agents MAY use `agent-wiki list` to inspect the machine-local registry and `agent-wiki --wiki NAME <command>` to target a registered wiki. Agents MUST NOT infer or create registry entries without explicit operator intent.
101
+
102
+ If the operator approves persisting local setup choices, agents SHOULD write local `_system/config.json` through `agent-wiki onboard --write-config` with the approved flags. Agents MUST NOT hand-edit `_system/config.json`.
103
+
104
+ When `_system/config.json` contains `knownVaults`, agents MAY use it only to resolve `obsidian://` cross-vault references for reading. Agents MUST NOT treat `knownVaults` entries as alternate wiki roots or write destinations.
105
+
106
+ Agents MUST NOT create `.venv/`, install packages, write `_system/config.json`, or enable network/OCR/LLM/cloud conversion behavior unless explicitly instructed by the human operator.
107
+
108
+ ### 2.9 Respect workspace source files
109
+
110
+ In workspace mode, the wiki lives inside a larger workspace, usually at `workspace/wiki`.
111
+
112
+ Agents MAY use `agent-wiki workspace pending --json` to discover new or changed source candidates outside the wiki directory. Discovered workspace files are not canonical evidence until an agent creates a corresponding `source` page under the wiki's `sources/` directory.
113
+
114
+ Agents MUST NOT move, rewrite, archive, delete, or otherwise modify original workspace files during workspace source processing unless the human operator explicitly asks for that separate workspace edit.
115
+
116
+ Workspace source pages SHOULD record the original file using `originPath` with a workspace-relative path. Workspace mode does not use the `_inbox/` to `raw/` lifecycle unless the operator explicitly places files in `_inbox/`.
117
+
118
+ ---
119
+
120
+ ## 3. What agents may do
121
+
122
+ - Add new pages in the correct folder for the page type
123
+ - Add frontmatter to existing pages
124
+ - Add or update claims and evidence in frontmatter
125
+ - Add or update relations in frontmatter
126
+ - Update page body prose when explicitly instructed
127
+ - Write substantive body prose for newly created authored knowledge pages
128
+ - Use `agent-wiki create-page` to scaffold new canonical page files
129
+ - Create question pages for unresolved unknowns
130
+ - Run the compile pipeline to regenerate the root page catalog, caches, and reports
131
+ - Create or refresh root `overview.md` when explicitly asked for a human-facing vault overview
132
+ - Add aliases and tags to existing pages
133
+
134
+ ---
135
+
136
+ ## 4. Naming conventions
137
+
138
+ ### Page IDs
139
+
140
+ IDs use dotted lowercase namespace format.
141
+
142
+ Pattern: `<pageType>.<namespace>.<slug>`
143
+
144
+ Examples:
145
+ - `entity.place.riverside-community-garden`
146
+ - `concept.watershed-management`
147
+ - `source.2026-04-12.webpage.urban-tree-canopy`
148
+ - `source.2026-04-12.document.community-plan.part001`
149
+ - `synthesis.overview.coastal-resilience`
150
+ - `question.evacuation-routing.accessibility`
151
+
152
+ ### Claim IDs
153
+
154
+ Pattern: `claim.<page-namespace>.<descriptor>`
155
+
156
+ Example: `claim.garden.weekly-produce-donations`
157
+
158
+ ### Evidence IDs
159
+
160
+ Pattern: `ev.<claim-slug>.<index>`
161
+
162
+ Example: `ev.weekly-produce-donations.01`
163
+
164
+ ### Timeline entry IDs
165
+
166
+ Pattern: `tl.<page-slug>.<index>`
167
+
168
+ Example: `tl.riverside-garden.001`
169
+
170
+ ### Filenames
171
+
172
+ Filenames SHOULD use kebab-case and match the page slug.
173
+
174
+ Example: `entities/riverside-community-garden.md`
175
+
176
+ ---
177
+
178
+ ## 5. Folder ownership rules
179
+
180
+ | Folder | Required `pageType` |
181
+ |---|---|
182
+ | `sources/` | `source` |
183
+ | `sources/parts/` | `source` |
184
+ | `entities/` | `entity` |
185
+ | `concepts/` | `concept` |
186
+ | `claims/` | `claim` |
187
+ | `syntheses/` | `synthesis` |
188
+ | `questions/` | `question` |
189
+ | `reports/` | `report` (if frontmatter present) |
190
+ | `index.md` | `index` |
191
+ | `overview.md` | `overview` |
192
+
193
+ Agents MUST place pages in the folder that matches their `pageType`.
194
+ Agents MUST NOT place entity pages in `concepts/`, etc.
195
+
196
+ ---
197
+
198
+ ## 6. Compile expectations
199
+
200
+ The compile pipeline reads the vault and emits:
201
+
202
+ - `index.md` — deterministic root page catalog
203
+ - `_system/cache/pages.json` — normalized page index
204
+ - `_system/cache/claims.jsonl` — all extracted claims
205
+ - `_system/cache/relations.jsonl` — all extracted relations
206
+ - `_system/cache/agent-digest.json` — high-signal prompt supplement
207
+ - `_system/cache/contradictions.json` — contradiction registry
208
+ - `_system/cache/questions.json` — open question registry
209
+ - `_system/cache/timeline-events.json` — chronological event index
210
+ - `_system/cache/source-index.json` — source metadata registry
211
+
212
+ To run the compile pipeline:
213
+
214
+ ```bash
215
+ agent-wiki compile
216
+ ```
217
+
218
+ The compile pipeline MUST be run after meaningful vault changes to keep `index.md` and caches fresh. The compile pipeline writes one operational log entry to `_system/logs/log.md`.
219
+
220
+ ---
221
+
222
+ ## 7. Logs
223
+
224
+ There is one canonical operational log:
225
+
226
+ - `_system/logs/log.md` contains generated compile/runtime and skill-run entries. Agents MUST NOT hand-edit this file.
227
+
228
+ Agents MUST use `agent-wiki log` to write one operational log entry after each meaningful skill run or change batch, such as schema updates, new workflows, import configuration changes, or significant content migrations.
229
+
230
+ Agents SHOULD NOT log trivial report/cache regeneration unless it records a meaningful vault change or operational incident.
231
+
232
+ Entries are prepended so the most recent entry appears first. Each entry SHOULD include:
233
+
234
+ - date
235
+ - actor or tool, when known
236
+ - changed area
237
+ - short reason or outcome
238
+
239
+ Operational log entries SHOULD be written with:
240
+
241
+ ```bash
242
+ agent-wiki log --message "<message>"
243
+ ```
244
+
245
+ Logs are not authoritative truth records. Agents MUST NOT treat `_system/logs/log.md` as primary evidence for claims unless the relevant material has been promoted into a canonical `source` page.
246
+
247
+ ---
248
+
249
+ ## 8. Claim rules summary
250
+
251
+ - Claims MUST be atomic (one proposition per claim)
252
+ - Claims MUST have a stable unique ID
253
+ - Claims MUST have `status`, `confidence`, `claimType`, `createdAt`, `updatedAt`
254
+ - Claims SHOULD have at least one evidence entry
255
+ - Claim status MUST use the allowed enum: `supported`, `weakly_supported`, `inferred`, `unverified`, `contested`, `contradicted`, `deprecated`
256
+ - Confidence MUST be a float between `0.0` and `1.0`
257
+
258
+ ---
259
+
260
+ ## 9. Evidence rules summary
261
+
262
+ - Evidence MUST reference a `sourceId` when possible
263
+ - Evidence `relation` MUST use: `supports`, `weakens`, `contradicts`, `context_only`
264
+ - Evidence `context_only` MUST NOT be counted as direct support during compile scoring
265
+ - Evidence MUST NOT overstate support strength
266
+
267
+ ---
268
+
269
+ ## 10. Question hygiene
270
+
271
+ - Agents SHOULD create question pages for important unresolved unknowns
272
+ - Resolved questions MUST remain in the vault with updated status
273
+ - Agents MUST NOT delete resolved pages
274
+
275
+ ---
276
+
277
+ ## 11. What agents MUST NOT do
278
+
279
+ - Rewrite human-authored content without explicit instruction
280
+ - Delete unresolved uncertainty by omission
281
+ - Convert weak evidence to strong support semantics
282
+ - Treat reports as primary truth records
283
+ - Hand-edit cache files, generated index files, generated log files, or root `index.md`
284
+ - Create duplicate IDs
285
+ - Place pages in the wrong folder for their `pageType`
286
+ - Invent unsupported certainty in claims
287
+ - Treat root `overview.md` as primary evidence
288
+ - Use standard markdown links for internal vault references (use wikilinks instead)
289
+
290
+ ---
291
+
292
+ ## 12. Internal linking convention
293
+
294
+ All internal links within the vault MUST use Obsidian-style wikilinks.
295
+
296
+ | Use case | Format |
297
+ |---|---|
298
+ | Link to a page | `[[page-slug]]` |
299
+ | Link with display text | `[[page-slug\|Display Text]]` |
300
+ | Link to a section | `[[page-slug#section-heading]]` |
301
+
302
+ Standard markdown links (`[text](path)`) MUST NOT be used for internal vault references. They MAY be used for external URLs and `obsidian://` cross-vault references only. For cross-vault Obsidian links, follow [[AGENT-WIKI-SPEC-v2#8.6 Cross-vault linking]].
303
+
304
+ This convention applies to:
305
+ - page body content
306
+ - `relatedPages` values in frontmatter (use wikilink strings)
307
+ - skill instruction files
308
+ - all root-level docs listed in WIKI.md Section 2, including AGENTS.md, the runtime guide itself, ONBOARD.md, INBOX.md, CLAUDE.md, etc.
309
+
310
+ ---
311
+
312
+ ## 13. Full Specification
313
+
314
+ [[AGENT-WIKI-SPEC-v2]]
package/INBOX.md ADDED
@@ -0,0 +1,19 @@
1
+ ## `_inbox/` Raw Intake
2
+
3
+ `INBOX.md` is now only a navigation pointer.
4
+
5
+ For the durable inbox/raw lifecycle rules, read [[WIKI#14 Inbox intake strategy]].
6
+
7
+ For the operational workflow, run the local `process-inbox` skill:
8
+
9
+ ```text
10
+ Read AGENTS.md, then run skills/process-inbox/SKILL.md.
11
+ ```
12
+
13
+ The short version:
14
+
15
+ - `_inbox/` is the active raw drop zone.
16
+ - `process-inbox` promotes retained items into canonical `sources/` pages with `agent-wiki create-page`.
17
+ - Promoted originals move to `raw/`.
18
+ - Failed or discarded items stay in `_inbox/` or move to `_inbox/trash/` only when explicitly discarded.
19
+ - `_inbox/` and `raw/` are not canonical evidence; canonical source material lives in `sources/`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jesse Lane
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.