@0xkahi/llw 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +227 -2
- package/dist/index.js +43 -0
- package/obsidian-setup/.settings/templates.json +5 -0
- package/obsidian-setup/bases/bundles-index.base +18 -0
- package/obsidian-setup/config/templates/bundle.md +6 -0
- package/obsidian-setup/config/templates/concept.md +8 -0
- package/obsidian-setup/config/web-clipper/llm-wiki-template.json +46 -0
- package/obsidian-setup/config/web-clipper/obsidian-web-clipper-settings.json +146 -0
- package/package.json +57 -4
- package/skill-data/llw-okf/SKILL.md +565 -0
- package/skill-data/llw-okf/sk-references/okf-examples.md +302 -0
- package/skill-data/llw-okf/sk-references/spec-v01.md +451 -0
- package/skill-data/llw-okf-sync/SKILL.md +236 -0
- package/skill-data/llw-vault-setup/SKILL.md +129 -0
- package/skill-data/test-skill/SKILL.md +19 -0
- package/skill-data/test-skill/sk-references/example-reference.md +3 -0
- package/skill-data/test-skill/sk-references/orphan.md +3 -0
- package/skill-data/test-skill/sk-references/some-other-reference.md +3 -0
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llw-okf
|
|
3
|
+
description: >
|
|
4
|
+
Create, validate, and enrich knowledge bundles based on a custom
|
|
5
|
+
veriation of the Open Knowledge Format (OKF) bundles — the open
|
|
6
|
+
spec for representing organizational knowledge as markdown files with YAML
|
|
7
|
+
frontmatter. Use when the user mentions "knowledge bundle" 'OKF', 'Open Knowledge Format',
|
|
8
|
+
'knowledge bundle', 'OKF bundle', 'create a knowledge base for agents',
|
|
9
|
+
'validate OKF', 'convert to OKF', 'enrich knowledge docs', 'agent-readable
|
|
10
|
+
knowledge', 'LLM wiki', 'knowledge catalog', 'kcmd'. — the skill has critical structural rules the agent
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# LLW-OKF Skill
|
|
14
|
+
|
|
15
|
+
A custom variation of the Open Knowledge Format (OKF) bundles - that is optimized for obsidian supported mono-repo knowlegebases
|
|
16
|
+
|
|
17
|
+
The difference between the original OKF spec and this skill is that, this skill
|
|
18
|
+
is optimized for obsidian supported mono-repo knowledgebases, and uses a custom cli `llw` to
|
|
19
|
+
create, validate, and enrich knowledge bundles and concepts.
|
|
20
|
+
|
|
21
|
+
for monorepo all kbs will be stored in a `bundles/` folder
|
|
22
|
+
|
|
23
|
+
## References
|
|
24
|
+
- OKF_SPEC_REF: [Open Knowledge Format (OKF)](sk-references/spec-v01.md).
|
|
25
|
+
- OKF_BUNDLE_EXAMPLE_REF: [OKF Bundle Examples](sk-references/okf-examples.md).
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Open Knowledge Format (OKF)
|
|
30
|
+
|
|
31
|
+
OKF is a vendor-neutral, open spec (v0.1, announced June 12, 2026 by Sam McVeety & Amir Hormati at Google Cloud) for representing knowledge as a directory of markdown files with YAML frontmatter. No SDK required — if you can `cat` a file, you can read OKF.
|
|
32
|
+
It formalizes the "LLM Wiki" pattern ([Karpathy's gist](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)) into an interoperable format: wikis written by different producers can be consumed by different agents without translation.
|
|
33
|
+
for the full spec read OKF_SPEC_REF
|
|
34
|
+
|
|
35
|
+
### Design Principles
|
|
36
|
+
1. **Minimally opinionated** — Only `type` is required. The spec defines interoperability surface, not content model.
|
|
37
|
+
2. **Producer/consumer independence** — Who writes and who reads are decoupled. Human-authored bundles feed agents; LLM-generated bundles are browsed by humans.
|
|
38
|
+
3. **Format, not platform** — No cloud, SDK, or vendor dependency. Value comes from how many parties speak it.
|
|
39
|
+
|
|
40
|
+
### Key Terminology
|
|
41
|
+
|
|
42
|
+
- **Bundle** — A directory tree of `.md` files. The unit of distribution (git repo, tarball, or subdirectory).
|
|
43
|
+
- **Concept** — One markdown file = one unit of knowledge (table, metric, playbook, API, etc.)
|
|
44
|
+
- **Concept ID** — File path within the bundle, minus `.md` suffix. Example: `tables/users.md` → ID `tables/users`
|
|
45
|
+
- **Frontmatter** — YAML block between `---` delimiters at file top.
|
|
46
|
+
- **Body** — Everything after the frontmatter. Standard markdown.
|
|
47
|
+
- **Link** — Standard markdown link expressing a relationship between concepts.
|
|
48
|
+
- **Citation** — Link to an external source backing a claim in the body.
|
|
49
|
+
|
|
50
|
+
**Note:**
|
|
51
|
+
- OKF_SPEC_REF is only needed when creating/updating bundles or concepts
|
|
52
|
+
- `llw` cli tool already handles validation during creation of bundles/concepts
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 1. Common Commands
|
|
57
|
+
|
|
58
|
+
### Jev Commands
|
|
59
|
+
|
|
60
|
+
**Check Jev Availability**
|
|
61
|
+
```bash
|
|
62
|
+
llw jev status
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Bundle Commands
|
|
66
|
+
|
|
67
|
+
**List All Bundles And Their metadata**
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# returns a compact TOON bundle overview (title, path, description, triggers, folder, parent, parentFolder)
|
|
71
|
+
llw bundle ls
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The response includes the bundle's `parentFolder`, which can be used to identify and inspect its parent bundle.
|
|
75
|
+
|
|
76
|
+
**Display All Bundle Titles in tree format**
|
|
77
|
+
|
|
78
|
+
shows the hierarchical structure of bundles and their child bundles, with numbered titles (e.g.`1.2. bundle_title`).
|
|
79
|
+
for user to easily reference bundle by their number
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
llw bundle tree
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**View Bundle Meadata, Concepts And Child Bundles**
|
|
86
|
+
- returns bundle metadata
|
|
87
|
+
- returns bundle child bundles metadata and its full path (if any)
|
|
88
|
+
- returns bundle concepts metadata and its full path (if any)
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
llw bundle view --bundle <bundle_folder>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Concept Commands
|
|
95
|
+
|
|
96
|
+
**View Concept Metadata**
|
|
97
|
+
- usually not needed as bundle view command already shows all concepts and its metadata in its bundle
|
|
98
|
+
- **DO NOT** use this command to view concept content, read the concept file directly using its full path returned by the bundle view command
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
llw concept view <concept_name> --bundle <bundle_folder>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Open Concept In Obsidian**
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# opens the concept file in the obsidian app
|
|
108
|
+
llw concept open <concept_name> --bundle <bundle_folder>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### MISC Non llw Commands
|
|
112
|
+
|
|
113
|
+
**Get current repo url**
|
|
114
|
+
- for matching git repo triggers
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
gh repo view --json url -q .url
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## 2. Bundle.md
|
|
124
|
+
|
|
125
|
+
a new reserved file name for storing a knowledge bundles metadata, it is a required file for all bundles, located in the root of that bundle
|
|
126
|
+
folder. act as a index for knowledgebase and funcstions as a replacement for the original OKF `index.md` file, as `llw` cli tool uses this to programatically
|
|
127
|
+
index kb and display concepts without having to upkeep a `index.md` for each bundle
|
|
128
|
+
|
|
129
|
+
### bundle.md Frontmatter Fields
|
|
130
|
+
|
|
131
|
+
| Field | Required? | Description |
|
|
132
|
+
|-------|-----------|-------------|
|
|
133
|
+
| `title` | YES | title of knowledge bundle (default to bundle folder name) |
|
|
134
|
+
| `description` | Recommended | One-sentence summary of knowledge bundle |
|
|
135
|
+
| `triggers` | Optional | YAML list for when to utilize knowledge base |
|
|
136
|
+
| `parent` | YES(only if parent bundle exists) | for subdirectory groups in bundles to reference its parent bundle as a obsidian backlink |
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
**parent backlink format**: `[[path/to/parent/bundle|parent-bundle-title]]`
|
|
140
|
+
|
|
141
|
+
### Example
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
path/to/bundles/some-backend/
|
|
145
|
+
├── bundle.md # Bundle index that stores metadata of bundle title, description and triggers.
|
|
146
|
+
├── log.md # Optional. Chronological history of updates.
|
|
147
|
+
├── <concept>.md # A concept at the bundle root.
|
|
148
|
+
└── database/ # Subdirectories organize concepts into groups.
|
|
149
|
+
├── bundle.md # subdirectory bundle index
|
|
150
|
+
└── <concept>.md
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Parent Bundle.md**
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
---
|
|
157
|
+
title: some-backend
|
|
158
|
+
description: knowledge bundle for some backend repository
|
|
159
|
+
triggers:
|
|
160
|
+
- https://github.com/username/some-backend
|
|
161
|
+
- when referencing some backend
|
|
162
|
+
---
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Subdirectory Bundle.md**
|
|
166
|
+
|
|
167
|
+
```markdown
|
|
168
|
+
---
|
|
169
|
+
title: database
|
|
170
|
+
description: knowledge bundle for database concepts of some backend
|
|
171
|
+
triggers:
|
|
172
|
+
- when asking about some backend database
|
|
173
|
+
- when asking about some backend db migrations
|
|
174
|
+
parent: [[bundles/some-backend/bundle|some-backend]]
|
|
175
|
+
---
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## 3. Creating a Bundle
|
|
181
|
+
|
|
182
|
+
**pre-requisites**
|
|
183
|
+
- read OKF_SPEC_REF for the original spec
|
|
184
|
+
|
|
185
|
+
### How To Create
|
|
186
|
+
```bash
|
|
187
|
+
# this commands creates both the folder and the bundle.md file with its required metadata
|
|
188
|
+
llw bundle create <bundle_folder> \
|
|
189
|
+
--description "<description_value>" \
|
|
190
|
+
--triggers "<list_of_trigger_values>" \
|
|
191
|
+
--parent "<bundle_parent_folder>"
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**example:**
|
|
195
|
+
```bash
|
|
196
|
+
llw bundle create bundles/some-backend/database \
|
|
197
|
+
--description "knowledge bundle for database concepts of some backend" \
|
|
198
|
+
--triggers "when asking about some backend database, when asking about some backend db migrations" \
|
|
199
|
+
--parent "bundles/some-backend"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**Options:**
|
|
203
|
+
- `--description`: bundle description (required)
|
|
204
|
+
- `--triggers`: comma separated bundle triggers (optional)
|
|
205
|
+
- `--parent`: parent bundle folder (only required if the bundle is a subdirectory of another bundle)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### When User/Agent wants to create an OKF bundle:
|
|
209
|
+
|
|
210
|
+
**optional-references**
|
|
211
|
+
- for more example of bundles read OKF_BUNDLE_EXAMPLE_REF
|
|
212
|
+
|
|
213
|
+
#### 1. Determine scope and structure
|
|
214
|
+
|
|
215
|
+
what knowledge are we capturing? (tables, metrics, APIs, playbooks, etc.)
|
|
216
|
+
Organize concepts into a directory tree that makes sense for the domain.
|
|
217
|
+
|
|
218
|
+
#### 2. Recommend Bundle Properties
|
|
219
|
+
|
|
220
|
+
reccomend the following
|
|
221
|
+
- path for new bundle
|
|
222
|
+
- title for new bundle
|
|
223
|
+
- description for new bundle
|
|
224
|
+
- tags for new bundle
|
|
225
|
+
- triggers for new bundle
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 4. Updating Bundles
|
|
230
|
+
|
|
231
|
+
### Updating Bundle Properties
|
|
232
|
+
|
|
233
|
+
**Note:** this command does not let you update the bundle title, as bundle title has to match the bundle folder name, use the `llw bundle rename` command to rename a bundle title and its folder name
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# only pass the property options you want to change, the rest are left untouched
|
|
237
|
+
llw bundle update \
|
|
238
|
+
--bundle "<bundle_folder>" \
|
|
239
|
+
--description "<description_value>" \
|
|
240
|
+
--triggers "<list_of_trigger_values>" \
|
|
241
|
+
--parent "<bundle_parent_folder>"
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**example:**
|
|
245
|
+
```bash
|
|
246
|
+
## updating only the description of an existing bundle
|
|
247
|
+
llw bundle update \
|
|
248
|
+
--bundle "bundles/some-backend/database" \
|
|
249
|
+
--description "knowledge bundle for database and migration concepts of some backend"
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Renaming Bundle
|
|
253
|
+
|
|
254
|
+
**Note:** this command updates both the bundle title and its folder name, as bundle title has to match the bundle folder name
|
|
255
|
+
the command will return you the new full bundle folder path and bundleFolder
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
llw bundle rename \
|
|
259
|
+
--bundle "<bundle_folder>" \
|
|
260
|
+
--title "<new_bundle_title>"
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**example:**
|
|
264
|
+
```bash
|
|
265
|
+
llw bundle rename \
|
|
266
|
+
--bundle "bundles/some-backend/database" \
|
|
267
|
+
--title "data-base"
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 5. Creating Concepts
|
|
273
|
+
|
|
274
|
+
**pre-requisites**
|
|
275
|
+
- read OKF_SPEC_REF for the original spec
|
|
276
|
+
|
|
277
|
+
**Guards**
|
|
278
|
+
- DO NOT manually add concept properties/metadata, all allowed concept properties/metadata is available in both the `concept create` and `concept update` commands
|
|
279
|
+
|
|
280
|
+
### How To Create
|
|
281
|
+
|
|
282
|
+
```shell
|
|
283
|
+
Arguments:
|
|
284
|
+
concept_name concept name (format: lowercase snake/kebab)(without .md extension)
|
|
285
|
+
Options:
|
|
286
|
+
--bundle <bundle_folder> bundle folder path
|
|
287
|
+
--type <type> concept type
|
|
288
|
+
--description <description> concept description
|
|
289
|
+
--resource <resource> concept resource (optional)
|
|
290
|
+
--tags <tags> comma separated concept tags (optional)
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
llw concept create <concept_name> \
|
|
295
|
+
--bundle "<bundle_folder>" \
|
|
296
|
+
--type "<type_name>" \
|
|
297
|
+
--description "<description_value>" \
|
|
298
|
+
--resource "<resource_value>" \
|
|
299
|
+
--tags "<list_of_tag_values>"
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**example:**
|
|
303
|
+
```bash
|
|
304
|
+
llw concept create bet-table \
|
|
305
|
+
--bundle "bundles/some-backend/database" \
|
|
306
|
+
--type "db-schema" \
|
|
307
|
+
--description "bet table schema for some-backend database" \
|
|
308
|
+
--tags "postgres, database, some-backend"
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
after creating the concept, fullpath to concept file will be returned, for you to write concept contents to
|
|
312
|
+
|
|
313
|
+
### When User/Agent wants store concepts in the wiki:
|
|
314
|
+
|
|
315
|
+
#### 1. Determine scope(s) of knowledge we are trying to store
|
|
316
|
+
|
|
317
|
+
- what knowledge are we capturing?
|
|
318
|
+
- does the wiki already have a bundle that matches the data we are trying to store? (see `workflow` section below for bundle selection)
|
|
319
|
+
- do i need to create a new bundle for this knowledge (see `See §3.` for creating new bundles)
|
|
320
|
+
|
|
321
|
+
#### 2. When Bundle Is Determined
|
|
322
|
+
|
|
323
|
+
- does the bundle have a concept that matches the knowledge we are trying to store? (see `workflow` section below for concept selection)
|
|
324
|
+
- if yes see `See §6.` for updating concept and contents
|
|
325
|
+
- how are we going to organize concepts into a directory tree that makes sense for the domain.
|
|
326
|
+
|
|
327
|
+
#### 3. Return Format for Concept Creation
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
creating new concept(s) for <purpose>
|
|
331
|
+
logical splits: <number_of_concept_to_split_data_into>
|
|
332
|
+
|
|
333
|
+
index: 1
|
|
334
|
+
bundle: <bundle_name>
|
|
335
|
+
concept: <concept_name>
|
|
336
|
+
reason: <logical_concept_data_split_reasoning_if_applicable>
|
|
337
|
+
|
|
338
|
+
index: 2
|
|
339
|
+
bundle: <bundle_name>
|
|
340
|
+
concept: <concept_name>
|
|
341
|
+
reason: <logical_concept_data_split_reasoning_if_applicable>
|
|
342
|
+
(yes/no)?
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## 6. Updating Concepts
|
|
348
|
+
|
|
349
|
+
**pre-requisites**
|
|
350
|
+
- read OKF_SPEC_REF for the original spec
|
|
351
|
+
|
|
352
|
+
### Updating Existing Concept Contents
|
|
353
|
+
|
|
354
|
+
- determine what data are you trying to update
|
|
355
|
+
- does concept have out of date information that needs to be updated?
|
|
356
|
+
- which information needs to be added/updated/removed
|
|
357
|
+
- does the concept have any related concepts that might need to be updated as well
|
|
358
|
+
|
|
359
|
+
#### Return Format
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
updating concept(s) for <purpose>
|
|
363
|
+
|
|
364
|
+
index: 1
|
|
365
|
+
bundle: <bundle_name>
|
|
366
|
+
concept: <concept_name>
|
|
367
|
+
summary: <short_summary_of_what_is_being_updated>
|
|
368
|
+
|
|
369
|
+
index: 2
|
|
370
|
+
bundle: <bundle_name>
|
|
371
|
+
concept: <concept_name>
|
|
372
|
+
summary: <short_summary_of_what_is_being_updated>
|
|
373
|
+
(yes/no)?
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Updating Concept Properties
|
|
377
|
+
|
|
378
|
+
only done when needed to update concept metadata, not the concept content itself.
|
|
379
|
+
this **SHOULD BE** the only entry point for updating concept metadata/properties, as it will handle validation of the concept properties/metadata structure
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
# only pass the property options you want to change, the rest are left untouched
|
|
383
|
+
llw concept update <concept_name> \
|
|
384
|
+
--bundle "<bundle_folder>" \
|
|
385
|
+
--type "<type_name>" \
|
|
386
|
+
--description "<description_value>" \
|
|
387
|
+
--resource "<resource_value>" \
|
|
388
|
+
--tags "<list_of_tag_values>" \
|
|
389
|
+
--timestamp "<timestamp_value>"
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**example:**
|
|
393
|
+
```bash
|
|
394
|
+
## appending new tag `sql` to concept file (include existing tags)
|
|
395
|
+
llw concept update bet-table \
|
|
396
|
+
--bundle "bundles/some-backend/database" \
|
|
397
|
+
--tags "postgres, database, some-backend, sql"
|
|
398
|
+
|
|
399
|
+
## bumping the concept timestamp to now
|
|
400
|
+
llw concept update bet-table --bundle "bundles/some-backend/database" --timestamp
|
|
401
|
+
|
|
402
|
+
## setting an explicit timestamp
|
|
403
|
+
llw concept update bet-table --bundle "bundles/some-backend/database" --timestamp "2026-07-02T03:37"
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Notes:**
|
|
407
|
+
- use `--timestamp` to log concept updated time when editing a concept content
|
|
408
|
+
- all command options are optional (except: `--bundle`), you only need to pass the options you want to change, the rest are left untouched
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
## 7. Searching for Concepts
|
|
413
|
+
|
|
414
|
+
how to search for concepts in the knowledgebase, and how to determine which concept to read based on its metadata
|
|
415
|
+
|
|
416
|
+
**pre-requisites**
|
|
417
|
+
- check if jev mode is available
|
|
418
|
+
|
|
419
|
+
### JEV MODE (recommended)
|
|
420
|
+
|
|
421
|
+
highly effecient search tool based on the query it uses jev to filter out relevant bundles from `llw bundle ls`,
|
|
422
|
+
then takes all relevant bundles and its concepts content parses it into jev and returns all relevant concepts and its bundles.
|
|
423
|
+
It outputs the results the same way as `llw bundle view` command for all relevant bundles and only includes the relevant concepts that matches the query with probability scores attached.
|
|
424
|
+
|
|
425
|
+
```bash
|
|
426
|
+
llw jev search --query <question>
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**example:**
|
|
430
|
+
```bash
|
|
431
|
+
# searching for all concepts related to user database schema
|
|
432
|
+
llw jev search --query "docs for user database schema"
|
|
433
|
+
|
|
434
|
+
# searching for api docs
|
|
435
|
+
llw jev search --query "api documation for company xyz"
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
results from jev search will return a filtered list of relevant bundles and their concepts for you to descide which concept to read, look at `Bundle/Concept Selection` workflow for decision on which concept to read.
|
|
439
|
+
|
|
440
|
+
### Manual Approach
|
|
441
|
+
|
|
442
|
+
see `See §1.` for
|
|
443
|
+
- listing all bundles and their metadata
|
|
444
|
+
- viewing a bundles concepts
|
|
445
|
+
|
|
446
|
+
list all bundles and their metadata and decide which bundle(s) to consider base on its metadata, then view the bundle and its concepts and decide which concept to read based on its metadata.
|
|
447
|
+
look at `Bundle/Concept Selection` workflow for decision on which concept to read.
|
|
448
|
+
|
|
449
|
+
---
|
|
450
|
+
|
|
451
|
+
## Workflows
|
|
452
|
+
|
|
453
|
+
### Bundle/Concept Selection
|
|
454
|
+
|
|
455
|
+
#### Which Bundle To Condider?
|
|
456
|
+
|
|
457
|
+
based on the user request determine their intent and context,and select bundle based on its metadata
|
|
458
|
+
- `description`: if concept/question matches the description of a bundle
|
|
459
|
+
- `triggers`: if concept/question matches any of the triggers of a bundle
|
|
460
|
+
|
|
461
|
+
**Descision Hierarchy:**
|
|
462
|
+
- `description` always takes precedence over `triggers` when determining which bundle to use
|
|
463
|
+
- `triggers` are the supporting role to help determine which bundle to use
|
|
464
|
+
- if triggers was a deciding factor also consider the bundles children as they are related to the parent bundle and might be a better fit
|
|
465
|
+
|
|
466
|
+
**Guards:**
|
|
467
|
+
- when Creating a new concept **MUST NOT** assume which bundle to use, always ask the user to confirm the bundle you are going to use
|
|
468
|
+
|
|
469
|
+
#### Which Concept To Read?
|
|
470
|
+
|
|
471
|
+
follows the same descision hierarchy as above for selecting bundle
|
|
472
|
+
|
|
473
|
+
- view bundle concepts and determine concept to read based on its metadata
|
|
474
|
+
- if no concept matches criteria, move to the next most relevant bundle
|
|
475
|
+
|
|
476
|
+
even if no concepts can be found that matches criteria. **DO NOT** recursively check all bundles even, just tell the user no concept was found.
|
|
477
|
+
bundles that do not logically match the users criteria should not be part of the consideration for finding concepts, this saves time and tokens for the user.
|
|
478
|
+
|
|
479
|
+
**Return Format When No Concept Match**
|
|
480
|
+
|
|
481
|
+
```
|
|
482
|
+
no concept matches search criteria
|
|
483
|
+
bundles considered: <list_of_bundles_considered>
|
|
484
|
+
concepts: <list_of_concepts_considered>
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### Displaying Bundle For User Selection
|
|
488
|
+
|
|
489
|
+
see `See §1.` for Displaying bundles in a tree format, tool output has numbered titles so user can easily pick bundle etc.
|
|
490
|
+
|
|
491
|
+
> [!dev] use bundle 2.1
|
|
492
|
+
|
|
493
|
+
you **DO NOT** need to rewrite the output of the command to the user, they can already see it just return
|
|
494
|
+
|
|
495
|
+
```
|
|
496
|
+
available bundles are displayed above in tool output
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
**Return Format With Suggestion**
|
|
500
|
+
used when creating new concepts or creating new sub bundles after following the same proccess above for displaying bundles return
|
|
501
|
+
|
|
502
|
+
```
|
|
503
|
+
I suggest using
|
|
504
|
+
- <number>. <bundle_title>
|
|
505
|
+
- <number>. <bundle_title>
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### Proccesing Raw folder
|
|
509
|
+
|
|
510
|
+
get the vaults full path with `llw` and view its `raw/` folder
|
|
511
|
+
for each entry in the `raw/` folder you are meant to process each document and store it as concept/concepts,
|
|
512
|
+
`See §5.` for creating new concepts and `See §6.` for updating existing concepts
|
|
513
|
+
|
|
514
|
+
**Triggers:**
|
|
515
|
+
when user request include
|
|
516
|
+
- process llw raw
|
|
517
|
+
- store llw raw
|
|
518
|
+
- etc...
|
|
519
|
+
|
|
520
|
+
#### Smart detection
|
|
521
|
+
|
|
522
|
+
based on each document contents you should
|
|
523
|
+
- first determine if document contents should be split into multiple concepts or stored as a single concept
|
|
524
|
+
- determine which bundle(s) to store the new concept(s) in or should it be in a new bundle
|
|
525
|
+
- determine if the concept(s) should be newly created or it should update an existing concept
|
|
526
|
+
- if applicable you should add backlinks to other concepts(s) if they are realated
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
#### Before Adding Document Concepts(s)
|
|
530
|
+
|
|
531
|
+
before creating new bundles or creating/updating concepts, always wait for user confirmation.
|
|
532
|
+
|
|
533
|
+
**Return Format**
|
|
534
|
+
```
|
|
535
|
+
parsing raw document into new concept(s)
|
|
536
|
+
document: <raw_document>
|
|
537
|
+
logical splits: <number_of_concept_to_split_data_into>
|
|
538
|
+
|
|
539
|
+
New Bundles (only if applicable)
|
|
540
|
+
---
|
|
541
|
+
index: 1
|
|
542
|
+
bundle: <bundle_name>
|
|
543
|
+
summary: <short_summary_of_what_new_bundle_is_for>
|
|
544
|
+
|
|
545
|
+
Concepts
|
|
546
|
+
---
|
|
547
|
+
index: 1
|
|
548
|
+
bundle: <bundle_name>
|
|
549
|
+
concept: <concept_name>
|
|
550
|
+
reason: <logical_concept_data_split_reasoning_if_applicable>
|
|
551
|
+
action: <create/update>
|
|
552
|
+
|
|
553
|
+
index: 2
|
|
554
|
+
bundle: <bundle_name>
|
|
555
|
+
concept: <concept_name>
|
|
556
|
+
reason: <logical_concept_data_split_reasoning_if_applicable>
|
|
557
|
+
action: <create/update>
|
|
558
|
+
|
|
559
|
+
(yes/no)?
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
#### After Proccessing Raw document
|
|
563
|
+
|
|
564
|
+
remove proccessed document from `raw/` folder
|
|
565
|
+
|