@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.
@@ -0,0 +1,451 @@
1
+ # Open Knowledge Format (OKF)
2
+
3
+ **Version 0.1 — Draft**
4
+
5
+ OKF is an open, human- and agent-friendly format for representing
6
+ *knowledge* — the metadata, context, and curated insight that surrounds
7
+ data and systems. It is designed to be authored by people, generated by
8
+ agents, exchanged across organizations, and consumed by both.
9
+
10
+ The format is intentionally minimal: a directory of markdown files with
11
+ YAML frontmatter. There is no schema registry, no central authority, and
12
+ no required tooling. If you can `cat` a file, you can read OKF; if you
13
+ can `git clone` a repo, you can ship it.
14
+
15
+ ---
16
+
17
+ ## 1. Motivation
18
+
19
+ The space of knowledge representation for AI agents is evolving quickly,
20
+ and many incompatible conventions are emerging. OKF takes the position
21
+ that knowledge is best represented in commonly accessible, established
22
+ formats that are:
23
+
24
+ - **Readable** by humans without tooling.
25
+ - **Parseable** by agents without bespoke SDKs.
26
+ - **Diffable** in version control.
27
+ - **Portable** across tools, organizations, and time.
28
+
29
+ The format is minimally opinionated. It standardizes only the small set
30
+ of structural conventions needed to make a knowledge corpus
31
+ *self-describing* — anything beyond that is left to the producer.
32
+
33
+ ### Goals
34
+
35
+ 1. Define a universal format that **enrichment agents** can write into.
36
+ 2. Inform how **consumption agents** should read and traverse it.
37
+ 3. Facilitate **exchange** of knowledge across systems and organizations.
38
+ 4. Standardize the small number of **required** fields that must be
39
+ present for content to be meaningfully consumed.
40
+
41
+ ### Non-goals
42
+
43
+ - Defining a fixed taxonomy of concept types.
44
+ - Prescribing storage, serving, or query infrastructure.
45
+ - Replacing domain-specific schemas (Avro, Protobuf, OpenAPI, etc.) —
46
+ OKF *references* them; it does not subsume them.
47
+
48
+ ---
49
+
50
+ ## 2. Terminology
51
+
52
+ - **Knowledge Bundle** — A self-contained, hierarchical collection of
53
+ knowledge documents. The unit of distribution.
54
+ - **Concept** — A single unit of knowledge within a bundle. Represented
55
+ as one markdown document. May describe a tangible asset (a table, an
56
+ API), an abstract idea (a metric, a business process), or anything in
57
+ between.
58
+ - **Concept ID** — The path of the concept's file within the bundle,
59
+ with the `.md` suffix removed. For example, `tables/users.md` has
60
+ concept ID `tables/users`.
61
+ - **Frontmatter** — YAML metadata block delimited by `---` at the top of
62
+ a markdown file.
63
+ - **Body** — Everything in the file after the frontmatter.
64
+ - **Link** — A standard markdown link from one concept to another, used
65
+ to express relationships beyond the implicit parent/child hierarchy.
66
+ - **Citation** — A link from a concept to an external source that
67
+ supports a claim in the body.
68
+
69
+ ---
70
+
71
+ ## 3. Bundle Structure
72
+
73
+ A bundle is a directory tree of markdown files. The directory structure
74
+ is independent of the domain — producers organize concepts however makes
75
+ sense for the knowledge being captured.
76
+
77
+ ```
78
+ path/to/bundle/
79
+ ├── index.md # Optional. Directory listing for progressive disclosure.
80
+ ├── log.md # Optional. Chronological history of updates.
81
+ ├── <concept>.md # A concept at the bundle root.
82
+ └── <subdirectory>/ # Subdirectories organize concepts into groups.
83
+ ├── index.md
84
+ ├── <concept>.md
85
+ └── <subdirectory>/
86
+ └── …
87
+ ```
88
+
89
+ A bundle MAY be distributed as:
90
+
91
+ - A git repository (recommended — provides history, attribution, diffs).
92
+ - A tarball or zip archive of the directory.
93
+ - A subdirectory within a larger repository.
94
+
95
+ ### 3.1 Reserved filenames
96
+
97
+ The following filenames have defined meaning at any level of the
98
+ hierarchy and MUST NOT be used for concept documents:
99
+
100
+ | Filename | Purpose |
101
+ |--------------|--------------------------------------------------------|
102
+ | `index.md` | Directory listing. See §6. |
103
+ | `log.md` | Update history. See §7. |
104
+
105
+ All other `.md` files are concept documents.
106
+
107
+ Tags themselves remain a first-class concept — see the `tags`
108
+ frontmatter field in §4.1. OKF does not specify a separate file format
109
+ for aggregating documents by tag; producers that want a tag-browsing
110
+ view can synthesize one at consumption time by scanning frontmatter.
111
+
112
+ ---
113
+
114
+ ## 4. Concept Documents
115
+
116
+ Every concept is a UTF-8 markdown file. It has two parts:
117
+
118
+ 1. A **YAML frontmatter block**, delimited by `---` on its own line at
119
+ the start of the file and a closing `---` on its own line.
120
+ 2. A **markdown body**, containing free-form content.
121
+
122
+ ### 4.1 Frontmatter
123
+
124
+ ```yaml
125
+ ---
126
+ type: <Type name> # REQUIRED
127
+ title: <Optional display name>
128
+ description: <Optional one-line summary>
129
+ resource: <Optional canonical URI for the underlying asset>
130
+ tags: [<tag>, <tag>, …] # Optional
131
+ timestamp: <ISO 8601 datetime> # Optional last-modified time
132
+ # … other producer-defined key/value pairs
133
+ ---
134
+ ```
135
+
136
+ **Required:**
137
+
138
+ - `type` — A short string identifying the kind of concept. Consumers
139
+ use this for routing, filtering, and presentation. Example values:
140
+ `BigQuery Table`, `BigQuery Dataset`, `API Endpoint`, `Metric`,
141
+ `Playbook`, `Reference`.
142
+
143
+ Type values are **not** registered centrally. Producers SHOULD pick
144
+ values that are descriptive and self-explanatory; consumers MUST
145
+ tolerate unknown types gracefully (typically by treating them as
146
+ generic concepts).
147
+
148
+ **Recommended (in priority order):**
149
+
150
+ - `title` — Human-readable display name. If omitted, consumers MAY
151
+ derive a title from the filename.
152
+ - `description` — A single sentence summarizing the concept. Used by
153
+ `index.md` generators, search snippets, and previews.
154
+ - `resource` — A URI that uniquely identifies the underlying asset the
155
+ concept describes. Absent for concepts that describe abstract ideas
156
+ rather than physical resources.
157
+ - `tags` — A YAML list of short strings for cross-cutting categorization.
158
+ - `timestamp` — ISO 8601 datetime of last meaningful change.
159
+
160
+ **Extensions:** Producers MAY include any additional keys. Consumers
161
+ SHOULD preserve unknown keys when round-tripping and SHOULD NOT reject
162
+ documents with unrecognized fields.
163
+
164
+ ### 4.2 Body
165
+
166
+ The body is standard markdown. Producers SHOULD favor structural
167
+ markdown — headings, lists, tables, fenced code blocks — over freeform
168
+ prose, since structure aids both human reading and agent retrieval.
169
+
170
+ There are no required body sections. The following section headings have
171
+ **conventional** meaning and SHOULD be used when applicable:
172
+
173
+ | Heading | Purpose |
174
+ |----------------|--------------------------------------------------------|
175
+ | `# Schema` | Structured description of an asset's columns/fields. |
176
+ | `# Examples` | Concrete usage examples, often as fenced code blocks. |
177
+ | `# Citations` | External sources backing claims in the body. See §8. |
178
+
179
+ ### 4.3 Example: a concept bound to a resource
180
+
181
+ ```markdown
182
+ ---
183
+ type: BigQuery Table
184
+ title: Customer Orders
185
+ description: One row per completed customer order across all channels.
186
+ resource: https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders
187
+ tags: [sales, orders, revenue]
188
+ timestamp: 2026-05-28T14:30:00Z
189
+ ---
190
+
191
+ # Schema
192
+
193
+ | Column | Type | Description |
194
+ |---------------|-----------|------------------------------------------|
195
+ | `order_id` | STRING | Globally unique order identifier. |
196
+ | `customer_id` | STRING | Foreign key into [customers](/tables/customers.md). |
197
+ | `total_usd` | NUMERIC | Order total in US dollars. |
198
+ | `placed_at` | TIMESTAMP | When the customer submitted the order. |
199
+
200
+ # Joins
201
+
202
+ Joined with [customers](/tables/customers.md) on `customer_id`.
203
+
204
+ # Citations
205
+
206
+ [1] [BigQuery table schema](https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders)
207
+ ```
208
+
209
+ ### 4.4 Example: a concept not bound to a resource
210
+
211
+ ```markdown
212
+ ---
213
+ type: Playbook
214
+ title: Incident response — data freshness alert
215
+ description: Steps to triage a freshness alert on the orders pipeline.
216
+ tags: [oncall, incident]
217
+ timestamp: 2026-04-12T09:00:00Z
218
+ ---
219
+
220
+ # Trigger
221
+
222
+ A freshness alert fires when `orders` lags more than 30 minutes behind
223
+ its expected SLA. See the [orders table](/tables/orders.md).
224
+
225
+ # Steps
226
+
227
+ 1. Check the [ingestion job dashboard](https://example.com/dash).
228
+ 2. …
229
+ ```
230
+
231
+ ---
232
+
233
+ ## 5. Cross-linking
234
+
235
+ Concepts MAY link to other concepts using standard markdown links. Two
236
+ forms are supported:
237
+
238
+ ### 5.1 Absolute (bundle-relative) links
239
+
240
+ Begin with `/`, interpreted relative to the bundle root.
241
+
242
+ ```markdown
243
+ See the [customers table](/tables/customers.md) for the join key.
244
+ ```
245
+
246
+ This is the **recommended** form because it is stable when documents are
247
+ moved within their subdirectory.
248
+
249
+ ### 5.2 Relative links
250
+
251
+ Standard markdown relative paths.
252
+
253
+ ```markdown
254
+ See the [neighboring concept](./other.md).
255
+ ```
256
+
257
+ ### 5.3 Link semantics
258
+
259
+ A link from concept A to concept B asserts a *relationship*. The
260
+ specific kind of relationship (parent/child, references, joins-with,
261
+ depends-on, etc.) is conveyed by the surrounding prose, not by the link
262
+ itself. Consumers that build a graph view typically treat all links as
263
+ directed edges of an untyped relationship.
264
+
265
+ Consumers MUST tolerate broken links — a link whose target does not
266
+ exist in the bundle is not malformed; it may simply represent
267
+ not-yet-written knowledge.
268
+
269
+ ---
270
+
271
+ ## 6. Index Files
272
+
273
+ An `index.md` file MAY appear in any directory, including the bundle
274
+ root. It enumerates the directory's contents to support **progressive
275
+ disclosure** — letting a human or agent see what is available before
276
+ opening individual documents.
277
+
278
+ Index files contain no frontmatter. The body uses one or more sections,
279
+ each grouping concepts under a heading:
280
+
281
+ ```markdown
282
+ # Section / Group Heading
283
+
284
+ * [Title 1](relative-url-1) - short description of item 1
285
+ * [Title 2](relative-url-2) - short description of item 2
286
+
287
+ # Another Section
288
+
289
+ * [Subdirectory](subdir/) - short description of the subdirectory
290
+ ```
291
+
292
+ Entries SHOULD include the description from the linked concept's
293
+ frontmatter. Producers MAY generate `index.md` automatically; consumers
294
+ MAY synthesize one on the fly when none is present.
295
+
296
+ ---
297
+
298
+ ## 7. Log Files (optional)
299
+
300
+ A `log.md` file MAY appear at any level of the hierarchy to record the
301
+ history of changes to that scope. The format is a flat list of
302
+ date-grouped entries, newest first:
303
+
304
+ ```markdown
305
+ # Directory Update Log
306
+
307
+ ## 2026-05-22
308
+ * **Update**: Added new BigQuery table reference for [Customer Metrics](/tables/customer-metrics.md).
309
+ * **Creation**: Established the [Dataplex Playbook](/playbooks/dataplex.md).
310
+
311
+ ## 2026-05-15
312
+ * **Initialization**: Created foundational directory structure.
313
+ * **Update**: Added progressive-disclosure guidelines to the root [index](/index.md).
314
+ ```
315
+
316
+ Date headings MUST use ISO 8601 `YYYY-MM-DD` form. Log entries are
317
+ prose; the leading bold word (`**Update**`, `**Creation**`,
318
+ `**Deprecation**`, etc.) is a convention, not a requirement.
319
+
320
+ ---
321
+
322
+ ## 8. Citations
323
+
324
+ When a concept's body makes claims sourced from external material,
325
+ those sources SHOULD be listed under a `# Citations` heading at the
326
+ bottom of the document, numbered:
327
+
328
+ ```markdown
329
+ # Citations
330
+
331
+ [1] [BigQuery public dataset announcement](https://cloud.google.com/blog/products/data-analytics/...)
332
+ [2] [Internal data quality runbook](https://wiki.acme.internal/data/quality)
333
+ ```
334
+
335
+ Citation links MAY be absolute URLs, bundle-relative paths, or paths
336
+ into a `references/` subdirectory that mirrors external material as
337
+ first-class OKF concepts.
338
+
339
+ ---
340
+
341
+ ## 9. Conformance
342
+
343
+ A bundle is **conformant** with OKF v0.1 if:
344
+
345
+ 1. Every non-reserved `.md` file in the tree contains a parseable YAML
346
+ frontmatter block.
347
+ 2. Every frontmatter block contains a non-empty `type` field.
348
+ 3. Every reserved filename (`index.md`, `log.md`) follows the structure
349
+ described in §6 and §7 respectively when present.
350
+
351
+ Consumers SHOULD treat all other constraints as soft guidance. In
352
+ particular, consumers MUST NOT reject a bundle because of:
353
+
354
+ - Missing optional frontmatter fields.
355
+ - Unknown `type` values.
356
+ - Unknown additional frontmatter keys.
357
+ - Broken cross-links.
358
+ - Missing `index.md` files.
359
+
360
+ This permissive consumption model is intentional: OKF is meant to
361
+ remain useful as bundles grow, get refactored, and are partially
362
+ generated by agents.
363
+
364
+ ---
365
+
366
+ ## 10. Relationship to other formats
367
+
368
+ OKF is intentionally close to several established patterns:
369
+
370
+ - **LLM "wiki" repositories** that use markdown + frontmatter as
371
+ agent-readable knowledge bases.
372
+ - **Personal knowledge tools** like Obsidian and Notion, which use
373
+ hierarchical markdown with cross-links.
374
+ - **"Metadata as code"** approaches that store catalog metadata
375
+ alongside source code rather than in a separate registry.
376
+
377
+ OKF differs primarily in being **specified** — pinning down the small
378
+ set of rules needed for interoperability without dictating tooling.
379
+
380
+ ---
381
+
382
+ ## 11. Versioning
383
+
384
+ This document specifies OKF version **0.1**. Future revisions will be
385
+ versioned in the form `<major>.<minor>`:
386
+
387
+ - A **minor** version bump introduces backward-compatible additions
388
+ (new optional fields, new conventional section headings).
389
+ - A **major** version bump may make breaking changes (renaming required
390
+ fields, changing reserved filenames).
391
+
392
+ Bundles MAY declare the OKF version they target by including
393
+ `okf_version: "0.1"` in a bundle-root `index.md` frontmatter block (the
394
+ only place frontmatter is permitted in an `index.md`). Consumers that
395
+ do not understand the declared version SHOULD attempt best-effort
396
+ consumption rather than refusing the bundle.
397
+
398
+ ---
399
+
400
+ ## Appendix A — Minimal example bundle
401
+
402
+ ```
403
+ my_bundle/
404
+ ├── index.md
405
+ ├── datasets/
406
+ │ ├── index.md
407
+ │ └── sales.md
408
+ └── tables/
409
+ ├── index.md
410
+ ├── orders.md
411
+ └── customers.md
412
+ ```
413
+
414
+ `datasets/sales.md`:
415
+
416
+ ```markdown
417
+ ---
418
+ type: BigQuery Dataset
419
+ title: Sales
420
+ description: All sales-related tables for the retail business.
421
+ resource: https://console.cloud.google.com/bigquery?p=acme&d=sales
422
+ tags: [sales]
423
+ timestamp: 2026-05-28T00:00:00Z
424
+ ---
425
+
426
+ The sales dataset contains transactional tables, including
427
+ [orders](/tables/orders.md) and [customers](/tables/customers.md).
428
+ ```
429
+
430
+ `tables/orders.md`:
431
+
432
+ ```markdown
433
+ ---
434
+ type: BigQuery Table
435
+ title: Orders
436
+ description: One row per completed customer order.
437
+ resource: https://console.cloud.google.com/bigquery?p=acme&d=sales&t=orders
438
+ tags: [sales, orders]
439
+ timestamp: 2026-05-28T00:00:00Z
440
+ ---
441
+
442
+ # Schema
443
+
444
+ | Column | Type | Description |
445
+ |---------------|-----------|------------------------------|
446
+ | `order_id` | STRING | Unique order identifier. |
447
+ | `customer_id` | STRING | FK to [customers](/tables/customers.md). |
448
+ | `total_usd` | NUMERIC | Order total in USD. |
449
+
450
+ Part of the [sales dataset](/datasets/sales.md).
451
+ ```
@@ -0,0 +1,236 @@
1
+ ---
2
+ name: llw-okf-sync
3
+ description: >
4
+ Sync all Knowledge Bundles across the `llm-wiki` vault, updating, out of date bundle.md files,
5
+ with the latest content based on their concepts and child bundles. Use when the user mentions "bundle sync",
6
+ "sync wiki", "enrich knowledge bundles".
7
+ ---
8
+
9
+ # LLW OKF SYNC
10
+
11
+ The `llm-wiki` vault stores knowledge bundles in the `bundles/` directory, at the root of the vault. Each knowledge bundle is a folder that can contain
12
+ concepts, and other child bundles, every bundles folder contains a `bundle.md` file that marks the root of that bundle and contains the knowledge bundles metadata.
13
+ This skill is used to sync all knowledge bundles across the vault, find outOfSync `bundle.md` files, and enrich them with its directory of contents.
14
+
15
+ ## Quick Reference
16
+
17
+ **Bundle Metadata/Frontmatter Fields:**
18
+
19
+ | Field | Required? | Description |
20
+ |-------|-----------|-------------|
21
+ | `title` | YES | title of knowledge bundle (default to bundle folder name) |
22
+ | `description` | Recommended | One-sentence summary of knowledge bundle |
23
+ | `triggers` | Optional | YAML list for when to utilize knowledge base |
24
+ | `parent` | YES(only if parent bundle exists) | for subdirectory groups in bundles to reference its parent bundle as a obsidian backlink |
25
+
26
+
27
+ parent backlink format: `[[path/to/parent/bundle|parent-bundle-title]]`
28
+
29
+ **Concept Metadata/Frontmatter Fields:**
30
+
31
+ | Field | Required? | Description |
32
+ |-------|-----------|-------------|
33
+ | `type` | YES | A short string identifying the kind of concept. Consumers use this for routing, filtering, and presentation. |
34
+ | `title` | YES | title of the concept name (default to concept file name) |
35
+ | `description` | Recommended | A single sentence summarizing the concept. |
36
+ | `resource` | Optional | A URI that uniquely identifies the underlying asset the concept describes |
37
+ | `tags` | Optinal | A YAML list of short strings for cross-cutting categorization. |
38
+ | `timestamp` | YES | ISO 8601 datetime of last meaningful change. |
39
+
40
+
41
+ **Example Folder Structure:**
42
+
43
+ ```
44
+ path/to/bundles/some-backend/
45
+ ├── bundle.md # Bundle index that stores metadata of bundle title, description and triggers.
46
+ ├── log.md # Optional. Chronological history of updates.
47
+ ├── <concept>.md # A concept at the bundle root.
48
+ └── database/ # Subdirectories organize concepts into groups.
49
+ ├── bundle.md # subdirectory bundle index
50
+ └── <concept>.md
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Bundle Syncing
56
+
57
+ ### Step 1: Sync Bundles
58
+
59
+ ```bash
60
+ llw bundle sync
61
+ ```
62
+
63
+ this command will output the Bundle Sync mainifest which contains summary all the bundles states and 3 filepaths that tracks the bundle syncing process.
64
+
65
+ **Example Output:**
66
+ ```
67
+ Bundle Sync Manifest
68
+
69
+ ════════════════════════════════════════════════════════════
70
+ Summary:
71
+ ● Knowledge Bundles: 10 total, 5 outOfSync
72
+ ● Pending Tasks: 3 in progress
73
+ ● Completed Tasks: 2
74
+ ● Ignored Tasks: 0
75
+
76
+ FilePaths
77
+ ────────────────────────────────────────────────────────────
78
+ currentHashMap: <full_file_path_to_current_hash_map.json>
79
+ generatedHashMap: <full_file_path_to_generated_hash_map.json>
80
+ taskList: <full_file_path_to_task_list.md>
81
+
82
+ ════════════════════════════════════════════════════════════
83
+ ```
84
+
85
+ **FilePaths:**
86
+ - currenHashMap: contains the last updated sync state of all bundles in the vault, or an empty json file (if it is the first time running the sync command)
87
+ - generatedHashMap: contains the newly generated sync state of all bundles in the vault, with the timestamp of when it was generatted, and a Record of each bundleFolder and its bundleHash
88
+ - taskList: its an auto generated markdown file that contains a list of tasks which are the outOfSync bundles that needs to be updated.
89
+
90
+ Example hashMap json:
91
+ ```json
92
+ {
93
+ "generatedTimestamp": "2026-07-25T01:55:40.519Z",
94
+ "bundles": {
95
+ "bundles/ecommerce": "c03b8d8330e03ec0fb3becc53c808db7",
96
+ "bundles/database": "103efa82af7bea22f8fe7449748d0bae",
97
+ "bundles/database/tables": "5cb8fc88c9abad625da2f4dfe80463ad",
98
+ }
99
+ }
100
+ ```
101
+
102
+ **Workflows:**
103
+ 1. if all tasks is completed/ignored, and there are 0 pending tasks, but there are still outOfSync bundles.
104
+ - copy the generatedHashMap file to the currentHashMap file, and delete the generatedHashMap file
105
+ - delete the taskList file, and rerun the sync command to check the output
106
+ 2. if there are 0 pending tasks and 0 outOfSync bundles, means there is nothing to sync, inform the user that the bundles sync is already up to date.
107
+ 3. if there are pending tasks move on to step 2.
108
+
109
+ ---
110
+
111
+ ### Step 2: Updating Bundle.md files
112
+
113
+ read through the taskList file for pending tasks
114
+ ```md
115
+ 1. [ ] bundles/some_bundle // pending
116
+ 2. [x] bundles/some_bundle/child_bundle // completed
117
+ 3. [-] bundles/some_other_bundle // ignored
118
+ ```
119
+
120
+ **Guardrails:**
121
+ - **DO NOT** update the `bundle.md` metadata/frontmatter fields, only update its contents
122
+
123
+ example of the `bundle.md` frontmatter fields:
124
+ ```markdown
125
+ ---
126
+ title: <title name>
127
+ description: <bundle_description>
128
+ parent: <obsidian parent link>
129
+ triggers: [<trigger>, <trigger>, …]
130
+ ---
131
+ ```
132
+ this **SHOULD NOT** be touched, updated, removed or changed in any capacity, only edit the contents below the frontmatter fields.
133
+
134
+ - **MUST** proccess one task at a time, do not do multiple simultaneously
135
+ - only need to read the `bundle.md` file thats being updated, do not need to read any other files, all required data i already provided with the command output mentioned below.
136
+
137
+ **Command to View Bundle**
138
+ for each pending task in the tasklist, run teh following command to view the bundles data
139
+
140
+ ```bash
141
+ llw bundle view --bundle <bundle_folder_path>
142
+ # example
143
+ llw bundle view --bundle bundles/some_bundle
144
+ ```
145
+
146
+ this command will output the bundles metadata, and the metadata of all its concepts and child bundles. This command output is what we use to derive the
147
+ bundles hash in the generatedHashMap file.
148
+
149
+ **Important Fields:**
150
+ - title: the title of the bundle (will be used for the `bundle.md` main header)
151
+ - path: will be used with the vault path to read the `bundle.md` file `<vault_path>/<bundle_path>`
152
+ - concepts: list of all concepts and its metadata in the bundle
153
+ - childBundles: list of all child bundles and its metadata in the bundle
154
+
155
+ using the current bundle `path` field along with the full path to the vault, read the bundle.md file and sees what needs to be updated.
156
+
157
+ > [!NOTE] outOfSync bundles !== outdated bundles
158
+ > just because a bundle is outOfSync, does not mean that the `bundle.md`file needs to be updated.
159
+ > It could be that there was a minor change to its metadata field or one of its concepts or child bundles, that cause the bundle to have a different hash.
160
+ > if thats the case, just mark the task as ignored and move on to the next task.
161
+
162
+
163
+ #### Bundle.md Content Structure
164
+
165
+ **Overview Structure**
166
+ ```md
167
+ # <bundle-title> (capitalize first letter)
168
+
169
+ ...directory list of all concepts in the bundle.
170
+
171
+ ## Child Bundles
172
+ ...directory list of all child bundles in the bundle.
173
+ ```
174
+
175
+ **Note:** for directory links description, do not reuse the `description` field, instead format it to make it more human readable
176
+ as the `description` field is meant for agents to read but for, bundle sync, we want to make it more human readable for the user.
177
+
178
+ ##### Updating/Adding Concepts Section
179
+
180
+ based on the returned `concepts` and its metadata from the `llw bundle view` command, structure the concepts section in the `bundle.md` file as follows:
181
+
182
+ ```markdown
183
+ ### Section / Group Heading
184
+
185
+ - [Title 1](relative-url-1) - short description of concept 1
186
+ - [Title 2](relative-url-2) - short description of concept 2
187
+
188
+ ### Another Section
189
+
190
+ - [Title 3](relative-url-3) - short description of concept3
191
+ ```
192
+
193
+ group the concepts by their `type`, `description` and `tags` fields into logical sections. and remove any concepts links that are no longer in the bundle.
194
+
195
+
196
+ ##### Updating/Adding Child Bundles Section
197
+
198
+ based on the returned `childBundles` and its metadata from the `llw bundle view` command, structure the child bundles section in the `bundle.md` file as follows:
199
+
200
+ ```markdown
201
+ ## Child Bundles
202
+
203
+ ### Section / Group Heading
204
+
205
+ - [Title 1](relative-url-1) - short description of bundle 1
206
+ - [Title 2](relative-url-2) - short description of bundle 2
207
+
208
+ ### Another Section
209
+
210
+ - [Title 3](relative-url-3) - short description of bundle3
211
+ ```
212
+
213
+ group the childBundles by `description` fields into logical sections. and remove any child bundle links that are no longer in the bundle.
214
+
215
+ #### Marking Task as Completed
216
+ - once the `bundle.md` file has been updated, edit the taskList file and mark the task as completed, pending `[ ]` to completed `[x]`.
217
+ - move on to the next pending task in the taskList file and repeat the process until all tasks are completed or ignored.
218
+ - once all tasks are no longer pending, move on to the next Step.
219
+
220
+ ---
221
+
222
+ ### Step 3: Finalizing Bundle Sync
223
+
224
+ before finalizing the bundle sync, wait for user confirmation to continue. unless the user has `AUTO MODE` in their prompt, then automatically continue to finalize the bundle sync.
225
+
226
+ **Response Format**
227
+ ```
228
+ All Bundles have been Updated.
229
+ Summary:
230
+ - completed Tasks: <count>
231
+ - ignored Tasks: <count>
232
+ continue to finalize the bundle sync? (yes/no)
233
+ ```
234
+
235
+ 1. next replace the currentHashMap file with the generatedHashMap file, and delete the generatedHashMap file. (both schemas have to be the same)
236
+ 2. delete the taskList file.