@ericrisco/rsc 0.1.34 → 0.1.36

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.
Files changed (130) hide show
  1. package/README.md +28 -2
  2. package/manifest.json +241 -2
  3. package/package.json +1 -1
  4. package/scripts/lib/domains.js +1 -0
  5. package/scripts/lib/recommend.js +4 -0
  6. package/skills/agent-eval/SKILL.md +1 -1
  7. package/skills/analyze/SKILL.md +1 -1
  8. package/skills/brand-voice/SKILL.md +1 -1
  9. package/skills/brand-voice/references/voice-guide-template.md +14 -0
  10. package/skills/building-agents/SKILL.md +2 -2
  11. package/skills/competitor-watch/SKILL.md +9 -4
  12. package/skills/competitor-watch/references/tracker-schema.md +19 -0
  13. package/skills/constitution/references/constitution-template.md +10 -0
  14. package/skills/content-engine/SKILL.md +1 -1
  15. package/skills/content-engine/references/brief-and-pipeline.md +15 -1
  16. package/skills/course-builder/references/grounding-and-scoping.md +23 -0
  17. package/skills/course-storytelling/references/learner-grounding.md +22 -2
  18. package/skills/decision-records/SKILL.md +14 -1
  19. package/skills/decision-records/references/templates.md +20 -0
  20. package/skills/design/references/brand-grounding.md +11 -1
  21. package/skills/game-design/SKILL.md +170 -0
  22. package/skills/game-design/evals/README.md +13 -0
  23. package/skills/game-design/evals/cases.yaml +47 -0
  24. package/skills/game-design/references/mechanics-and-loops.md +78 -0
  25. package/skills/game-design/references/playtesting-and-scope.md +58 -0
  26. package/skills/game-design/references/progression-and-economy.md +70 -0
  27. package/skills/game-storytelling/SKILL.md +159 -0
  28. package/skills/game-storytelling/evals/README.md +28 -0
  29. package/skills/game-storytelling/evals/cases.yaml +51 -0
  30. package/skills/game-storytelling/references/branching-and-state.md +134 -0
  31. package/skills/game-storytelling/references/dialogue-tools.md +117 -0
  32. package/skills/game-storytelling/references/environmental-storytelling.md +71 -0
  33. package/skills/gamedev-multiplayer/SKILL.md +250 -0
  34. package/skills/gamedev-multiplayer/evals/README.md +12 -0
  35. package/skills/gamedev-multiplayer/evals/cases.yaml +44 -0
  36. package/skills/gamedev-multiplayer/references/godot-high-level-multiplayer.md +133 -0
  37. package/skills/gamedev-multiplayer/references/prediction-and-latency.md +104 -0
  38. package/skills/gamedev-multiplayer/references/unity-and-unreal-netcode.md +166 -0
  39. package/skills/gamedev-pathing/SKILL.md +242 -0
  40. package/skills/gamedev-pathing/evals/README.md +14 -0
  41. package/skills/gamedev-pathing/evals/cases.yaml +49 -0
  42. package/skills/gamedev-pathing/references/navmesh-workflow.md +110 -0
  43. package/skills/gamedev-pathing/references/search-algorithms.md +135 -0
  44. package/skills/gamedev-pathing/references/steering-and-avoidance.md +120 -0
  45. package/skills/gamedev-physics/SKILL.md +225 -0
  46. package/skills/gamedev-physics/evals/README.md +12 -0
  47. package/skills/gamedev-physics/evals/cases.yaml +54 -0
  48. package/skills/gamedev-physics/references/character-controllers.md +120 -0
  49. package/skills/gamedev-physics/references/determinism-and-queries.md +124 -0
  50. package/skills/gamedev-physics/references/layers-and-masks.md +115 -0
  51. package/skills/gamedev-shaders/SKILL.md +252 -0
  52. package/skills/gamedev-shaders/evals/README.md +14 -0
  53. package/skills/gamedev-shaders/evals/cases.yaml +45 -0
  54. package/skills/gamedev-shaders/references/effect-recipes.md +205 -0
  55. package/skills/gamedev-shaders/references/godot-shading-language.md +133 -0
  56. package/skills/gamedev-shaders/references/unity-and-unreal-shaders.md +169 -0
  57. package/skills/gamedev-shipping/SKILL.md +236 -0
  58. package/skills/gamedev-shipping/evals/README.md +9 -0
  59. package/skills/gamedev-shipping/evals/cases.yaml +55 -0
  60. package/skills/gamedev-shipping/references/mobile-and-desktop.md +127 -0
  61. package/skills/gamedev-shipping/references/stores-and-ci.md +162 -0
  62. package/skills/gamedev-shipping/references/web-export-headers.md +140 -0
  63. package/skills/godot/SKILL.md +319 -0
  64. package/skills/godot/evals/README.md +13 -0
  65. package/skills/godot/evals/cases.yaml +50 -0
  66. package/skills/godot/references/export-and-testing.md +102 -0
  67. package/skills/godot/references/gdscript-style.md +84 -0
  68. package/skills/godot/references/godot3-to-4-traps.md +89 -0
  69. package/skills/godot/references/nodes-scenes-resources.md +109 -0
  70. package/skills/harness/SKILL.md +3 -3
  71. package/skills/harness/references/daily-curation-automation.md +8 -6
  72. package/skills/harness/references/obsidian-scaffolding.md +16 -9
  73. package/skills/harness/references/wiki-article-template.md +31 -14
  74. package/skills/harness/references/wiki-index-template.md +7 -3
  75. package/skills/harness/references/wiki-protocol.md +120 -54
  76. package/skills/harness/references/wiki-worklog-template.md +5 -1
  77. package/skills/instagram-api/SKILL.md +8 -1
  78. package/skills/instagram-api/references/insights-metrics.md +8 -1
  79. package/skills/knowledge-ops/SKILL.md +9 -9
  80. package/skills/knowledge-ops/evals/cases.yaml +1 -1
  81. package/skills/knowledge-ops/references/gardening-playbook.md +18 -8
  82. package/skills/level-design/SKILL.md +175 -0
  83. package/skills/level-design/evals/README.md +35 -0
  84. package/skills/level-design/evals/cases.yaml +58 -0
  85. package/skills/level-design/references/blockout-to-art.md +118 -0
  86. package/skills/level-design/references/guidance-and-readability.md +152 -0
  87. package/skills/level-design/references/pacing-and-encounters.md +142 -0
  88. package/skills/linkedin-api/SKILL.md +10 -1
  89. package/skills/linkedin-strategy/SKILL.md +12 -0
  90. package/skills/linkedin-strategy/references/wiki-records.md +27 -1
  91. package/skills/marketing/references/brand-grounding.md +22 -2
  92. package/skills/medium-strategy/SKILL.md +12 -0
  93. package/skills/medium-strategy/references/wiki-records.md +39 -1
  94. package/skills/medium-writing/SKILL.md +19 -0
  95. package/skills/plan/references/plan-template.md +12 -1
  96. package/skills/roast-me/tools/adapters/__pycache__/__init__.cpython-312.pyc +0 -0
  97. package/skills/roast-me/tools/adapters/__pycache__/base.cpython-312.pyc +0 -0
  98. package/skills/roast-me/tools/adapters/__pycache__/claude.cpython-312.pyc +0 -0
  99. package/skills/roast-me/tools/adapters/__pycache__/codex.cpython-312.pyc +0 -0
  100. package/skills/roast-me/tools/adapters/__pycache__/gemini.cpython-312.pyc +0 -0
  101. package/skills/roast-me/tools/adapters/__pycache__/registry.cpython-312.pyc +0 -0
  102. package/skills/shortform-packaging/SKILL.md +7 -2
  103. package/skills/shortform-packaging/references/package-templates.md +13 -2
  104. package/skills/shortform-strategy/SKILL.md +30 -6
  105. package/skills/shortform-strategy/references/learning-loop-template.md +9 -1
  106. package/skills/specify/references/spec-template.md +12 -1
  107. package/skills/tiktok-api/SKILL.md +6 -2
  108. package/skills/tiktok-api/references/wiki-schema.md +38 -4
  109. package/skills/unity/SKILL.md +282 -0
  110. package/skills/unity/evals/README.md +8 -0
  111. package/skills/unity/evals/cases.yaml +43 -0
  112. package/skills/unity/references/build-and-platforms.md +65 -0
  113. package/skills/unity/references/input-system.md +102 -0
  114. package/skills/unity/references/lifecycle-deep-dive.md +75 -0
  115. package/skills/unreal/SKILL.md +270 -0
  116. package/skills/unreal/evals/README.md +12 -0
  117. package/skills/unreal/evals/cases.yaml +45 -0
  118. package/skills/unreal/references/blueprint-cpp-parity.md +109 -0
  119. package/skills/unreal/references/gameplay-framework.md +95 -0
  120. package/skills/unreal/references/packaging.md +83 -0
  121. package/skills/verify/SKILL.md +11 -1
  122. package/skills/youtube-api/SKILL.md +7 -2
  123. package/skills/youtube-api/references/wiki-schema.md +25 -4
  124. package/skills/youtube-packaging/SKILL.md +10 -2
  125. package/skills/youtube-packaging/references/description-and-chapters.md +70 -2
  126. package/skills/youtube-strategy/SKILL.md +9 -2
  127. package/skills/youtube-strategy/references/wiki-records.md +39 -6
  128. package/skills/youtube-strategy/scripts/verify.sh +4 -0
  129. package/skills/youtube-thumbnails/SKILL.md +10 -5
  130. package/skills/youtube-thumbnails/references/experiment-log-format.md +28 -2
@@ -84,8 +84,9 @@ special files:
84
84
 
85
85
  - `wiki/index.md` — Global index. One row per article, grouped by topic, with
86
86
  link + summary + Updated date + Score.
87
- - `wiki/log.md` — Append-only operation log (every ingest, query, lint,
88
- maintenance pass, and improve pass).
87
+ - `wiki/log.md` — Operation log (every ingest, query, lint, maintenance pass,
88
+ and improve pass). OKF reserved file: **newest entry first** (prepended at the
89
+ top), ISO 8601 dates, past entries never edited or deleted. No frontmatter.
89
90
  - `wiki/gaps.md` — Append-only knowledge-gap log. Topics wanted but missing,
90
91
  concepts mentioned across multiple articles without their own page, queries
91
92
  that couldn't be answered well. Read by the Improve pass.
@@ -152,12 +153,19 @@ Templates live alongside this file in `references/`:
152
153
  `02-DOCS/` opens directly as an Obsidian vault (the human's "base folder" is
153
154
  `02-DOCS/` itself, not the repo root). The agent writes the wiki; the human
154
155
  **reads** it in Obsidian — graph, backlinks, Properties, and `.base` views — which
155
- is exactly the Karpathy split. Navigation is **structure** (wikilinks + frontmatter
156
- + Bases), not semantic similarity: **no vector DB, no embeddings, no RAG**, and no
157
- embedding/search plugins. The `.base` views become the human navigation; `index.md`
158
- + `scores.json` remain the machine layer + fallback. The exact scaffolding (the
159
- `.base` files, `.obsidian/app.json`, attachments, `.gitignore`, excluded files) is
160
- materialized from `obsidian-scaffolding.md` during Initialization.
156
+ is exactly the Karpathy split. Navigation is **structure** (markdown links +
157
+ frontmatter + Bases), not semantic similarity: **no vector DB, no embeddings, no
158
+ RAG**, and no embedding/search plugins. The `.base` views become the human
159
+ navigation; `index.md` + `scores.json` remain the machine layer + fallback. The
160
+ exact scaffolding (the `.base` files, `.obsidian/app.json`, attachments,
161
+ `.gitignore`, excluded files) is materialized from `obsidian-scaffolding.md` during
162
+ Initialization.
163
+
164
+ The win is that **the same files serve both surfaces**: because internal links are
165
+ standard markdown (not wikilinks) and frontmatter uses the OKF standard field
166
+ names, `wiki/` is simultaneously a native Obsidian vault AND a portable, 100%-OKF
167
+ v0.1-conformant knowledge bundle — readable by any OKF consumer, no export step.
168
+ See the OKF conformance rules in [Conventions](#conventions).
161
169
 
162
170
  ## Initialization
163
171
 
@@ -272,7 +280,7 @@ After the primary article, check for ripple effects:
272
280
  2. Scan `02-DOCS/wiki/index.md` entries in other topics for articles covering
273
281
  related concepts.
274
282
  3. Update every article whose content is materially affected. Each updated
275
- file gets its Updated date refreshed.
283
+ file gets its `timestamp` refreshed.
276
284
 
277
285
  Archive pages are never cascade-updated (they are point-in-time snapshots).
278
286
 
@@ -280,10 +288,10 @@ Archive pages are never cascade-updated (they are point-in-time snapshots).
280
288
 
281
289
  Update `02-DOCS/wiki/index.md`: add or update entries for every touched
282
290
  article. When adding a new topic section, include a one-line description.
283
- The Updated date reflects when the article's knowledge content last changed,
284
- not the file system timestamp. See `wiki-index-template.md` for format.
291
+ The article's `timestamp` reflects when its knowledge content last changed,
292
+ not the file system mtime. See `wiki-index-template.md` for format.
285
293
 
286
- Append to `02-DOCS/wiki/log.md`:
294
+ Prepend to `02-DOCS/wiki/log.md` (newest entry first, at the top):
287
295
 
288
296
  ```
289
297
  ## [YYYY-MM-DD] ingest | <primary article title>
@@ -351,7 +359,7 @@ sweep (on demand or scheduled) gives it order.
351
359
 
352
360
  ### Post-Sweep log
353
361
 
354
- Append to `02-DOCS/wiki/log.md`:
362
+ Prepend to `02-DOCS/wiki/log.md` (newest entry first, at the top):
355
363
 
356
364
  ```
357
365
  ## [YYYY-MM-DD] sweep | <S> ingested, <F> failed, <A> articles touched
@@ -379,8 +387,8 @@ just another source of chaos: it lands in `raw/worklog/` and is Compiled into
379
387
  ### What it captures
380
388
 
381
389
  One `raw/worklog/YYYY-MM-DD-<slug>.md` per meaningful unit of work, in the format
382
- of `wiki-worklog-template.md` (frontmatter `type: worklog`, `topic`, `date`,
383
- `status: unprocessed`): what we did, why (intent + decisions), files touched
390
+ of `wiki-worklog-template.md` (frontmatter `type: worklog`, `title`, `topic`,
391
+ `timestamp`, `status: unprocessed`): what we did, why (intent + decisions), files touched
384
392
  (`path:line`), outcome with evidence, open questions/next, commands. This
385
393
  generalizes the SDD session-summary convention to *any* work.
386
394
 
@@ -407,7 +415,7 @@ safety rule the curation pass honors.
407
415
  (`status: unprocessed`). Infer `topic` from content.
408
416
  2. **Compile.** Run the normal Compile (Fetch is a no-op — the worklog is already
409
417
  `raw`): distill durable points into `wiki/<topic>/` articles (update existing
410
- before creating new), add wikilink cross-refs + `## Related`, cascade.
418
+ before creating new), add markdown-link cross-refs + `## Related`, cascade.
411
419
  3. **Route decisions.** Every significant decision is appended to
412
420
  `wiki/harness/decisions.md` (append-only, the "siempre 3 opciones" shape).
413
421
  4. **Close.** Flip the worklog's `status` to `processed` (the raw stays as
@@ -415,7 +423,7 @@ safety rule the curation pass honors.
415
423
 
416
424
  ### Post-Sweep log
417
425
 
418
- Append to `02-DOCS/wiki/log.md`:
426
+ Prepend to `02-DOCS/wiki/log.md` (newest entry first, at the top):
419
427
 
420
428
  ```markdown
421
429
  ## [YYYY-MM-DD] worklog | <slug> → <A> articles touched
@@ -439,10 +447,34 @@ workspace and ingests them on its own — so the user never has to remember to f
439
447
  sources. It runs automatically (SessionStart nudge + daily cron; see Triggers) and
440
448
  on request.
441
449
 
442
- The hard rule that keeps "automatic, workspace-wide" safe: **ingesting is
443
- non-destructive** (read + create wiki pages + copy the original into
444
- `raw/<topic>/_originals/`), so it is safe to do unattended. **Moving or deleting
445
- anything is destructive** and always requires explicit, quoted consent.
450
+ The hard rule that keeps "automatic, workspace-wide" safe: **ingesting never
451
+ destroys data** — the original is always preserved inside the brain at
452
+ `raw/<topic>/_originals/`. What it does NOT do is leave the workspace cluttered:
453
+ once a source is safely in `raw/`, the loose original is **relocated, not left in
454
+ place** (see "Clean-as-you-go" below), so ingesting a file actually *tidies* the
455
+ tree. **Deleting** a file or a folder outright is still destructive and always
456
+ requires explicit, quoted consent.
457
+
458
+ ### Clean-as-you-go — a clean repo is the invariant
459
+
460
+ The brain is the home for sources; the workspace is not a junk drawer. So when the
461
+ sweep ingests a **loose document at the workspace root** or **anything in
462
+ `inbox/`**, the original is **MOVED into the brain**, not copied — the byte-for-byte
463
+ file lands in `raw/<topic>/_originals/` and the root/inbox is left clean. Nothing is
464
+ lost: the file still exists, in `raw/`, which is version-controlled-adjacent
465
+ evidence. This is the literal contract the user asked for: *a PDF dropped at the
466
+ root that gets ingested ends up in `raw/`, not at the root.*
467
+
468
+ Scope of the move (deliberately narrow, so we never yank files out of places the
469
+ user organized on purpose):
470
+
471
+ - **Loose files at the workspace root** (a stray `factura.pdf`, `notes.txt`) → **moved** into `raw/<topic>/_originals/` after a verified ingest.
472
+ - **`inbox/` contents** → **moved** (this was already the inbox contract: process → `inbox/_processed/`; the durable copy is in `raw/`).
473
+ - **Files nested inside a structured folder the user maintains** (e.g. a project's own `docs/`, a `/transcripts` directory) → **copied**, and the sweep **proposes** consolidating + removing the now-redundant folder with quoted consent. Never silently moved.
474
+
475
+ A move only ever happens **after** the original is confirmed written to
476
+ `raw/<topic>/_originals/` (or fully captured as text in `raw/`). If anything fails,
477
+ the original stays exactly where it was.
446
478
 
447
479
  ### Steps
448
480
 
@@ -450,16 +482,23 @@ anything is destructive** and always requires explicit, quoted consent.
450
482
  2. **Scan** — walk the workspace minus `.rscignore` (and minus detected app source
451
483
  dirs). Consider only document-like files. A file is **un-ingested** when its
452
484
  `path` is absent from `wiki/.ingested.json` OR its content hash differs.
453
- 3. **Classify** each candidate folder:
454
- - **Clearly documentary** (a folder of docs/transcripts/pdfs, no code) →
455
- **auto-ingest**: Compile to `wiki/`, copy the original into
456
- `raw/<topic>/_originals/` (**copy, never move** — the source stays put).
485
+ 3. **Classify** each candidate and apply the Clean-as-you-go rule:
486
+ - **Loose document at the workspace root** → **auto-ingest, then MOVE** the
487
+ original into `raw/<topic>/_originals/`. The root is left clean.
488
+ - **Clearly documentary folder** (docs/transcripts/pdfs, no code) →
489
+ **auto-ingest**: Compile to `wiki/`, **copy** the original into
490
+ `raw/<topic>/_originals/` (the source stays put for now), then **propose**
491
+ removing the now-redundant folder (quoted consent — step 5).
457
492
  - **Ambiguous** (mixed, or possibly app data) → **list it and propose**; do not
458
493
  touch it. Log it to `gaps.md` so the next pass remembers.
459
- 4. **Record** every ingested source in `wiki/.ingested.json`.
460
- 5. **Offer cleanup** — for a folder the sweep fully ingested, **offer** to remove it
461
- once empty, with the consent quoted back from the user. **Never auto-delete**, and
462
- never a folder the sweep did not itself empty.
494
+ 4. **Record** every ingested source in `wiki/.ingested.json` (the move/copy is
495
+ recorded with its new `raw/` location).
496
+ 5. **Offer cleanup** — for a documentary folder the sweep fully ingested, **offer**
497
+ to remove it once redundant, with the consent quoted back from the user.
498
+ **Never auto-delete**, and never a folder the sweep did not itself empty.
499
+ (Root-level loose files and `inbox/` files need no such offer — they are moved
500
+ into `raw/` as part of the ingest, which is non-destructive: the file is
501
+ relocated, never deleted.)
463
502
 
464
503
  ### Ledger — `wiki/.ingested.json`
465
504
 
@@ -481,8 +520,12 @@ Un-ingested = path absent OR hash changed. `inbox/` files still move to
481
520
  - **Ledger-idempotent.** Never reprocess a source whose path+hash is recorded.
482
521
  - **Scoped by `.rscignore`.** Never scan code, build output, `01-TOOLS/`, the
483
522
  wiki's own `raw/`+`wiki/`, or non-document files (see `ingest-ignore-defaults.md`).
484
- - **Copy, don't move.** Discovered originals are copied; the source is left in place.
485
- - **Consent for destruction.** Removing an emptied folder is quoted-consent only.
523
+ - **Clean-as-you-go.** Loose root-level files and `inbox/` contents are **moved**
524
+ into `raw/` after a verified ingest (the repo stays clean); files nested in a
525
+ user-maintained folder are **copied** and consolidation is proposed with consent.
526
+ A move never precedes the original being safely written to `raw/`.
527
+ - **Never delete.** The original is relocated into `raw/`, never destroyed.
528
+ Removing an emptied/redundant folder is quoted-consent only.
486
529
  - **Ambiguity is proposed, not grabbed.**
487
530
 
488
531
  ---
@@ -538,7 +581,7 @@ When the user explicitly asks to archive or save the answer to the wiki:
538
581
  content is a synthesized answer, not raw material).
539
582
  3. Update `02-DOCS/wiki/index.md`. Add a row pointing to the `.html` file,
540
583
  prefix the Summary with `[Archived]`. The link target is the HTML path.
541
- 4. Append to `02-DOCS/wiki/log.md`:
584
+ 4. Prepend to `02-DOCS/wiki/log.md` (newest entry first, at the top):
542
585
  ```
543
586
  ## [YYYY-MM-DD] query | Archived: <page title>
544
587
  ```
@@ -557,7 +600,7 @@ Fix these automatically:
557
600
  `02-DOCS/wiki/` files (excluding index.md and log.md):
558
601
 
559
602
  - File exists but missing from index → add entry with `(no summary)`
560
- placeholder. For Updated, use the article's metadata Updated date if
603
+ placeholder. For the Updated column, use the article's `timestamp` if
561
604
  present; otherwise fall back to file's last modified date.
562
605
  - Index entry points to nonexistent file → mark as `[MISSING]` in the
563
606
  index. Do not delete the entry; let the user decide.
@@ -599,7 +642,7 @@ These rely on your judgment. Report findings without auto-fixing:
599
642
 
600
643
  ### Post-Lint
601
644
 
602
- Append to `02-DOCS/wiki/log.md`:
645
+ Prepend to `02-DOCS/wiki/log.md` (newest entry first, at the top):
603
646
 
604
647
  ```
605
648
  ## [YYYY-MM-DD] lint | <N> issues found, <M> auto-fixed
@@ -631,7 +674,7 @@ Operations:
631
674
  - (orphan_penalty)
632
675
  ```
633
676
  Where:
634
- - `freshness_weight` = 1.0 if Updated within 30 days, 0.5 within 90, 0.1 beyond 180.
677
+ - `freshness_weight` = 1.0 if `timestamp` within 30 days, 0.5 within 90, 0.1 beyond 180.
635
678
  - `orphan_penalty` = 5 if zero inbound links AND zero citations, else 0.
636
679
  - `conflict_count` = number of explicit conflict annotations in the article body.
637
680
 
@@ -669,12 +712,12 @@ When the counter hits N, run:
669
712
  sections, accurate See Also).
670
713
  - **Preserve the old version** at `wiki/<topic>/_archive/<article>__YYYY-MM-DD.md`
671
714
  so the user can revert.
672
- - Bump the Updated date.
715
+ - Bump the `timestamp`.
673
716
  2. **Pick 1 top gap** from `wiki/gaps.md`. If there's enough raw material for
674
717
  it (≥2 raw sources mention the concept), create a new article. Mark the
675
718
  gap as `[FILLED YYYY-MM-DD]` in `wiki/gaps.md` instead of deleting (audit trail).
676
719
  3. **Refresh 1 stale archive** — if any archived query answer cites articles
677
- whose Updated dates are newer than the archive's, append a `> ⚠ Stale:
720
+ whose `timestamp` is newer than the archive's, append a `> ⚠ Stale:
678
721
  underlying sources updated YYYY-MM-DD` note to the archive (read-only flag,
679
722
  don't rewrite).
680
723
  4. **Reset counter** to 0.
@@ -767,39 +810,62 @@ These apply to all Layers:
767
810
  1. **Never overwrite without preservation.** Rewrites always archive the old
768
811
  version to `wiki/<topic>/_archive/`. The archive folder is gitignored
769
812
  from compaction (lives forever unless the user prunes).
770
- 2. **Never touch articles the human just touched.** If `Updated` < 24h ago,
813
+ 2. **Never touch articles the human just touched.** If `timestamp` < 24h ago,
771
814
  skip in Micro-Improve. (Deep Improve respects this via the consent prompt.)
772
815
  3. **Never auto-resolve conflicts.** Heuristic Lint flags contradictions;
773
816
  the user resolves.
774
817
  4. **Always log every change** to `wiki/log.md`. The log is the audit trail
775
818
  for everything autonomous.
776
- 5. **`wiki/gaps.md` and `wiki/log.md` are append-only.** No edits to past
777
- entries. Compaction (in Deep Improve) only removes `[FILLED]` gaps older
778
- than 90 days, and only adds a single compaction marker entry to the log.
819
+ 5. **`wiki/log.md` is newest-first + immutable; `wiki/gaps.md` is append-only.**
820
+ New `log.md` entries are prepended at the top (OKF reserved-file rule); new
821
+ `gaps.md` entries are appended. Past entries in either are never edited.
822
+ Compaction (in Deep Improve) only removes `[FILLED]` gaps older than 90 days,
823
+ and only adds a single compaction marker entry to the log.
779
824
 
780
825
  ---
781
826
 
782
827
  ## Conventions
783
828
 
784
- - **Obsidian-friendly markdown.** Internal cross-references use **wikilinks**
785
- (`[[Page]]` / `[[Page|alias]]`) — resolved by filename, no path needed — so the
786
- Obsidian graph + backlinks come for free and survive moves. (Legacy relative
787
- markdown links still resolve in Obsidian; the migration pass converts them.)
829
+ - **`wiki/` is an OKF v0.1 bundle.** The whole `wiki/` directory conforms to the
830
+ Open Knowledge Format ([spec](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf)):
831
+ it is portable, tarball-able, and any OKF consumer (Obsidian, the OKF HTML
832
+ visualizer, an agent) can read it without translation. The conformance rules
833
+ the rest of this protocol enforces:
834
+ 1. Every non-reserved `.md` file has valid YAML frontmatter with a non-empty
835
+ `type`. (Reserved files `index.md` and `log.md` are exempt — see below.)
836
+ 2. The frontmatter standard surface is `type` (required) + `title, description,
837
+ resource, tags, timestamp` (recommended, OKF-named). rsc adds custom fields
838
+ (`aliases, topic, status, sources, score`) — OKF allows any extra key.
839
+ 3. The knowledge graph is built from **standard markdown links** — NEVER
840
+ wikilinks (`[[...]]`). An OKF consumer follows markdown links; it cannot
841
+ follow `[[...]]`.
842
+ - **Standard markdown links, relative paths.** Internal cross-references use
843
+ `[Text](./same-topic.md)` / `[Text](../other-topic/page.md)` / `[Text](../../raw/<topic>/<file>.md)`.
844
+ Obsidian is configured (`useMarkdownLinks: true`, `newLinkFormat: relative`,
845
+ `alwaysUpdateLinks: true` — see `obsidian-scaffolding.md`) so the graph +
846
+ backlinks render and links auto-rewrite on rename. The `aliases` field keeps the
847
+ old kebab slug so pre-migration links still resolve.
788
848
  - **Frontmatter on curated articles.** Every `wiki/<topic>/` article carries the
789
- YAML frontmatter from `wiki-article-template.md` (`title, aliases, tags, type,
790
- topic, status, sources, updated, score`). This is what powers Obsidian
791
- Properties + the `.base` views. Operational files (`index.md`, `log.md`,
792
- `gaps.md`) may use simpler formats.
849
+ YAML frontmatter from `wiki-article-template.md` (`type, title, description,
850
+ resource, tags, timestamp` + custom `aliases, topic, status, sources, score`).
851
+ This powers OKF consumers AND Obsidian Properties + the `.base` views. The two
852
+ OKF **reserved** files are exempt: `index.md` carries **no frontmatter** (it is
853
+ a directory listing) and `log.md` is the change log (see below).
854
+ - **`log.md` is newest-first.** Per the OKF reserved-file rule, new entries are
855
+ **prepended at the top** (newest first), use ISO 8601 dates, and past entries
856
+ are never edited or deleted. `gaps.md` stays append-only (it is a custom file,
857
+ not OKF-reserved).
793
858
  - **Human-readable wiki filenames** (`Month-End Close.md`) for clean graph nodes;
794
- the old kebab slug goes in `aliases` so prior links/wikilinks still resolve.
859
+ the old kebab slug goes in `aliases` so prior links still resolve.
795
860
  `raw/` and `raw/worklog/` filenames stay kebab + date (chaos, not display).
796
861
  - `wiki/` supports one level of topic subdirectories only. No deeper
797
862
  nesting.
798
863
  - Today's date for log entries, Collected dates, and Archived dates.
799
- Updated dates reflect when the article's knowledge content last changed.
800
- Published dates come from the source (use `Unknown` when unavailable).
801
- - Inside `wiki/` files, internal references use wikilinks. In conversation
802
- output, use project-root-relative paths (e.g., `02-DOCS/wiki/topic/Article.md`).
864
+ The `timestamp` field (ISO 8601) reflects when the article's knowledge content
865
+ last changed. Published dates come from the source (use `Unknown` when unavailable).
866
+ - Inside `wiki/` files, internal references use relative markdown links. In
867
+ conversation output, use project-root-relative paths (e.g.,
868
+ `02-DOCS/wiki/topic/Article.md`).
803
869
  - Ingest updates both `02-DOCS/wiki/index.md` and `02-DOCS/wiki/log.md`.
804
870
  Archive (from Query) updates both. Lint updates `02-DOCS/wiki/log.md`
805
871
  (and `02-DOCS/wiki/index.md` only when auto-fixing index entries). Plain
@@ -11,9 +11,13 @@ manufacture a worklog "to look busy."
11
11
 
12
12
  ```yaml
13
13
  ---
14
+ # OKF v0.1: `type` is the only required field. The rest is the standard surface
15
+ # (title/description/timestamp) plus rsc custom fields (topic/status/sources).
14
16
  type: worklog
17
+ title: {What we did, one line}
18
+ description: {One-sentence summary of the session.}
19
+ timestamp: {YYYY-MM-DDTHH:MM:SSZ}
15
20
  topic: {inferred-topic}
16
- date: {YYYY-MM-DD}
17
21
  status: unprocessed
18
22
  sources: []
19
23
  ---
@@ -190,6 +190,13 @@ This is the checkable deliverable. One file per media id, idempotent overwrite (
190
190
 
191
191
  ```markdown
192
192
  ---
193
+ type: instagram-metrics
194
+ title: "Reel 17888888888888888"
195
+ description: Performance snapshot for one Instagram Reel, pulled from Graph API v25.0.
196
+ tags: [instagram, reels, insights, shortform]
197
+ timestamp: "2026-06-02T08:00:00Z"
198
+ topic: shortform
199
+ status: stable
193
200
  platform: instagram
194
201
  media_type: REELS
195
202
  media_id: "17888888888888888"
@@ -213,7 +220,7 @@ Performance snapshot pulled from Graph API v25.0. Metric set is the
213
220
  current valid Reels set; no deprecated names requested.
214
221
  ```
215
222
 
216
- Why front-matter + media-id filename: the wiki is queried by key, and re-pulls must be diffable, not additive.
223
+ `type` is the only required OKF v0.1 field; `title`/`description`/`tags`/`timestamp` are the recommended OKF surface (`timestamp` mirrors the pull instant). The DOMAIN keys below are mandatory and stay byte-for-byte — `verify.sh` requires a pinned `graph_version` and greps the `metrics` block for deprecated names; `pulled_at` is the API-pull instant verify/diff rely on. Keep both `pulled_at` and `timestamp`. Why front-matter + media-id filename: the wiki is queried by key, and re-pulls must be diffable, not additive (the idempotent overwrite re-stamps `timestamp` and `pulled_at` together).
217
224
 
218
225
  ## Migration & gotchas
219
226
 
@@ -61,6 +61,13 @@ One file per published media id. Idempotent: re-pulls overwrite the same file (m
61
61
 
62
62
  ```markdown
63
63
  ---
64
+ type: instagram-metrics # required OKF v0.1 field (non-empty)
65
+ title: "Reel <media_id>" # OKF recommended surface
66
+ description: Performance snapshot for one Instagram Reel, pulled from Graph API v25.0.
67
+ tags: [instagram, reels, insights, shortform]
68
+ timestamp: "<ISO 8601 UTC>" # OKF last-edit; re-stamped each re-run alongside pulled_at
69
+ topic: shortform
70
+ status: stable
64
71
  platform: instagram # always "instagram" for this skill
65
72
  media_type: REELS # REELS | IMAGE | CAROUSEL | STORIES
66
73
  media_id: "<published media id>" # NOT the container id
@@ -83,6 +90,6 @@ metrics: # only valid, non-deprecated names
83
90
  One-paragraph note: which valid metric set was pulled and on which graph_version.
84
91
  ```
85
92
 
86
- Required keys: `platform`, `media_type`, `media_id`, `published_at`, `graph_version`, `pulled_at`, `metrics`. The `metrics` block must contain only current metric names — verify.sh greps for deprecated tokens and a pinned `graph_version`.
93
+ `type` is the only required OKF v0.1 field; the rest of the OKF surface (`title`, `description`, `tags`, `timestamp`) is recommended. Required DOMAIN keys (kept byte-for-byte): `platform`, `media_type`, `media_id`, `published_at`, `graph_version`, `pulled_at`, `metrics`. The `metrics` block must contain only current metric names — verify.sh greps for deprecated tokens and a pinned `graph_version`. `pulled_at` (the API-pull instant) and the OKF `timestamp` are re-stamped together on each idempotent overwrite — keep both.
87
94
 
88
95
  **Watch-time units:** `ig_reels_avg_watch_time` and `ig_reels_video_view_total_time` are returned by the API in **milliseconds** (see the metric notes above). Persist them raw under `_ms`-suffixed keys, matching the wire value. If you instead report seconds, divide by 1000 at ingest and rename to a `_s` suffix — do not keep the API key name while silently changing the unit.
@@ -29,7 +29,7 @@ Every gardening request is one of four operations. Identify which before you act
29
29
  | **Link** | Pages are unreachable or under-connected | `scores.json` orphan_penalty (=5), low inbound count | `## See Also` in articles, `index.md` |
30
30
  | **Prune** | Answers are stale, articles superseded, conflicts unresolved, gaps bloated | freshness, conflict annotations, old `[FILLED]` gaps | `_archive/`, `log.md`, `gaps.md` |
31
31
 
32
- Whichever you do, append a line to `wiki/log.md` (append-only). The exact entry shapes per operation live in `references/gardening-playbook.md`.
32
+ Whichever you do, record a line in `wiki/log.md`. `log.md` is the OKF reserved change-log: new entries are **prepended at the top (newest first)**, ISO 8601 dates, and past entries are never edited or deleted. (`gaps.md` is the append-only file — new entries go at the bottom.) The exact entry shapes per operation live in `references/gardening-playbook.md`.
33
33
 
34
34
  ## Capture — the bar is high
35
35
 
@@ -40,7 +40,7 @@ Walk the altitude ladder, lowest rung first; stop at the first that fits:
40
40
  1. **Discard** — ephemeral, re-derivable, or already covered. Most things stop here.
41
41
  2. **Leave in `raw/` only** — a source worth keeping but not worth a synthesized article yet. It stays immutable in `raw/<topic>/`, no `wiki/` page.
42
42
  3. **Merge into an existing article** — adds a section or fact to a page that already exists. Prefer this over a new page.
43
- 4. **New article** — last resort: a genuinely new, single-thesis subject with no home.
43
+ 4. **New article** — last resort: a genuinely new, single-thesis subject with no home. Any new article follows the OKF v0.1 article template (`../harness/references/wiki-article-template.md`): YAML frontmatter with a non-empty `type:`, the OKF-recommended `title`/`description`/`tags`/`timestamp`, and standard markdown links — never wikilinks. The reserved `index.md` stays frontmatter-free.
44
44
 
45
45
  Worked examples for each rung are in `references/gardening-playbook.md`.
46
46
 
@@ -72,7 +72,7 @@ Every article earns **≥1 inbound link** or is a conscious leaf you can justify
72
72
 
73
73
  - Use `scores.json` as your worklist: sort by lowest score / orphan penalty, fix those first.
74
74
  - `## See Also` is **bidirectional** — if A links B, B links A.
75
- - Same-topic link: `[Refund SLA](refund-sla-and-escalation.md)`. Cross-topic link: `[OAuth setup](../auth/oauth-setup.md)`. Why: the protocol's relative-link convention; `../` crosses one topic boundary, matching the one-level layout.
75
+ - Use **standard markdown links** only — NEVER wikilinks (`[[...]]`). An OKF consumer follows markdown links; it cannot follow `[[...]]`. If you find a `[[...]]` link while gardening, convert it. Same-topic link: `[Refund SLA](./refund-sla-and-escalation.md)`. Cross-topic link: `[OAuth setup](../auth/oauth-setup.md)`. Why: the protocol's relative-link convention; `./` is same-topic, `../` crosses one topic boundary, matching the one-level layout. See `../harness/references/wiki-protocol.md` "## Conventions".
76
76
  - When you add a genuinely new top-level subject, make sure `wiki/index.md` references it so the map stays complete.
77
77
 
78
78
  ## Prune — archive, retire, arbitrate, compact
@@ -81,8 +81,8 @@ Every article earns **≥1 inbound link** or is a conscious leaf you can justify
81
81
 
82
82
  - **Conflicts:** you **flag** contradictions and the **human arbitrates**. Once they choose a winner, you may apply the resolution and annotate the loser — but you never auto-pick. Why: silently choosing a side is data corruption.
83
83
  - **Stale answers:** mark a page or archived copy with a `> ⚠ Stale — superseded YYYY-MM-DD` note rather than rewriting history.
84
- - **Compaction is bounded:** only `[FILLED YYYY-MM-DD]` gaps **older than 90 days** may be compacted, and only via a single marker in the log. `gaps.md` and `log.md` are append-only — gaps get a `[FILLED]` stamp, never a deletion.
85
- - **Log every prune** to `wiki/log.md`. Exact entry shapes per operation: `references/gardening-playbook.md`.
84
+ - **Compaction is bounded:** only `[FILLED YYYY-MM-DD]` gaps **older than 90 days** may be compacted, and only via a single marker prepended to `log.md`. `gaps.md` is append-only and `log.md` is newest-first (both immutable past entries) — gaps get a `[FILLED]` stamp, never a deletion.
85
+ - **Log every prune** by prepending to `wiki/log.md` (newest first). Exact entry shapes per operation: `references/gardening-playbook.md`.
86
86
 
87
87
  A full worked prune session (stale + superseded + conflict + gap compaction, all logged) is in the playbook.
88
88
 
@@ -92,9 +92,9 @@ These are hard constraints, not suggestions. They come from `../harness/referenc
92
92
 
93
93
  1. **Preserve before overwrite.** Never overwrite an article without first copying the old version to `wiki/<topic>/_archive/<article>__YYYY-MM-DD.md`.
94
94
  2. **Never auto-resolve a conflict.** Flag it; the human arbitrates.
95
- 3. **`gaps.md` and `log.md` are append-only.** Gaps get `[FILLED YYYY-MM-DD]`; nothing is ever edited out.
96
- 4. **Log every change** to `wiki/log.md`.
97
- 5. **Never touch an article whose `Updated` is < 24h ago** without explicit user say-so. Why: it is likely still being worked.
95
+ 3. **`gaps.md` is append-only; `log.md` is newest-first.** New `gaps.md` entries are appended at the bottom; new `log.md` entries are prepended at the top (the OKF reserved-file rule). Past entries in either are immutable — gaps get `[FILLED YYYY-MM-DD]`, nothing is ever edited out.
96
+ 4. **Log every change** by prepending to `wiki/log.md` (newest first).
97
+ 5. **Never touch an article whose `timestamp` is < 24h ago** without explicit user say-so. Why: it is likely still being worked. (`timestamp` is the OKF last-meaningful-edit field, ISO 8601 — see `../harness/references/wiki-protocol.md` "## Conventions".)
98
98
 
99
99
  ## Anti-patterns
100
100
 
@@ -105,7 +105,7 @@ These are hard constraints, not suggestions. They come from `../harness/referenc
105
105
  | Auto-picking a winner in a contradiction | Silent data corruption; you guessed | Flag it; let the human arbitrate |
106
106
  | Re-running `harness` to fix a broken link | Wrong tool — the Maintenance Pass already auto-fixes links | Repair `## See Also` by hand; let automation handle the rest |
107
107
  | Nesting `wiki/a/b/c.md` | Breaks the one-level topic rule | Flatten to `wiki/<topic>/<article>.md` |
108
- | Editing a past `log.md` / `gaps.md` entry | Breaks the append-only audit trail | Append a new line |
108
+ | Editing a past `log.md` / `gaps.md` entry | Breaks the immutable audit trail | Add a new entry — prepend to `log.md` (newest first), append to `gaps.md` |
109
109
  | Splitting on length alone | Two halves of one thesis are worse than one page | Split on thesis count, not line count |
110
110
  | Creating a new topic for a one-off note | Topic sprawl; reuse beats create | File under the nearest existing topic |
111
111
 
@@ -47,4 +47,4 @@ capability:
47
47
  - "Repairs See Also so the three orphans gain bidirectional inbound links."
48
48
  - "Prunes the superseded page to _archive/ (never rm); flags the stale archive with a '> ⚠ Stale' note instead of rewriting it."
49
49
  - "Flags the conflict for human arbitration and does NOT auto-pick a winner."
50
- - "Logs every operation to wiki/log.md; treats gaps.md and log.md as append-only; touches no article updated <24h ago without consent."
50
+ - "Logs every operation to wiki/log.md (prepended newest-first, the OKF reserved change-log); treats gaps.md as append-only; touches no article whose timestamp is <24h ago without consent."
@@ -26,10 +26,16 @@ Default is discard. Climb only when a rung's criterion is met.
26
26
  4. **New article** — genuinely new, single-thesis, homeless subject.
27
27
  - Example: "Our refund SLA and escalation path." Distinct thesis, no existing
28
28
  home → new `wiki/payments/refund-sla-and-escalation.md`, then link it both
29
- ways with the Stripe page and reference it in `wiki/index.md`.
29
+ ways with the Stripe page (standard markdown links, e.g.
30
+ `[Stripe webhook retry policy](./stripe-webhook-retry-policy.md)`) and reference
31
+ it in `wiki/index.md`.
32
+ - Conform to OKF v0.1: the new article carries YAML frontmatter with a non-empty
33
+ `type:` plus the recommended `title`/`description`/`tags`/`timestamp`, per
34
+ `../../harness/references/wiki-article-template.md`. Never wikilinks.
30
35
 
31
36
  Topic rule in practice: before `mkdir wiki/<new-topic>/`, scan `index.md` for an
32
37
  existing topic that fits. One level of subdirs only — `wiki/<topic>/<article>.md`.
38
+ The reserved `index.md` is a directory listing and carries **no frontmatter**.
33
39
 
34
40
  ## Split recipe — carve one article into two
35
41
 
@@ -75,16 +81,18 @@ unresolved conflict annotation, and a pile of old `[FILLED]` gaps.
75
81
  `rm`. Log.
76
82
  3. **Conflict** (`conflict_count > 0`, two pages disagree): you do **not** decide.
77
83
  Surface both claims to the human, get the ruling, then annotate the losing
78
- claim with `> Superseded by [winner](winner.md) per owner decision YYYY-MM-DD`
79
- and clear the conflict annotation. Log.
84
+ claim with `> Superseded by [winner](./winner.md) per owner decision YYYY-MM-DD`
85
+ (standard markdown link, never a wikilink) and clear the conflict annotation. Log.
80
86
  4. **Gap compaction:** only `[FILLED YYYY-MM-DD]` gaps **older than 90 days** may
81
- be compacted, via a single marker line in `log.md` — `gaps.md` stays
82
- append-only; you never delete a gap entry.
87
+ be compacted, via a single marker line prepended to `log.md` (newest first) — `gaps.md`
88
+ stays append-only; you never delete a gap entry.
83
89
 
84
90
  ## `wiki/log.md` entry shapes
85
91
 
86
- `log.md` is append-only. Match the protocol's `## [YYYY-MM-DD] <op> | …` format.
87
- One line (or short block) per manual operation:
92
+ `log.md` is the OKF reserved change-log: **newest entry first** — prepend each new entry at the
93
+ top of the file (it has no frontmatter, ISO 8601 dates, immutable past entries). Match the
94
+ protocol's `## [YYYY-MM-DD] <op> | …` format. One line (or short block) per manual operation
95
+ (shown below newest-last only for readability; in the file the latest sits on top):
88
96
 
89
97
  ```markdown
90
98
  ## [2026-06-02] capture | new | wiki/payments/refund-sla-and-escalation.md
@@ -113,4 +121,6 @@ Compacted 4 [FILLED] gaps older than 90 days into this marker. No gap entries de
113
121
  ```
114
122
 
115
123
  Keep entries terse and factual: date, op, target paths, one-line why. The log is
116
- the audit trail the rails depend on — never edit a past entry, only append.
124
+ the audit trail the rails depend on — never edit a past entry; prepend the new one at the top
125
+ (newest first, per the OKF reserved-file rule). `gaps.md` stays append-only (new entries at the
126
+ bottom).