@reddb-io/red-skills-memory 2.75.2
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 +202 -0
- package/README.md +27 -0
- package/package.json +30 -0
- package/skills/core/README.md +28 -0
- package/skills/core/context-status/SKILL.md +48 -0
- package/skills/core/doctor/SKILL.md +63 -0
- package/skills/core/export/SKILL.md +63 -0
- package/skills/core/extract/SKILL.md +52 -0
- package/skills/core/health/SKILL.md +50 -0
- package/skills/core/improve-skills/SKILL.md +123 -0
- package/skills/core/ingest/SKILL.md +91 -0
- package/skills/core/init/SKILL.md +97 -0
- package/skills/core/init/graph-reference.md +40 -0
- package/skills/core/recall/SKILL.md +50 -0
- package/skills/core/skills-status/SKILL.md +47 -0
- package/skills/core/store/SKILL.md +47 -0
- package/skills/core/view/SKILL.md +59 -0
- package/skills/core/wiki/C4-reference.md +101 -0
- package/skills/core/wiki/REFERENCES.md +48 -0
- package/skills/core/wiki/SKILL.md +154 -0
- package/skills/core/wiki-init/SKILL.md +127 -0
- package/skills/core/wiki-init/TEMPLATE-REFERENCE.md +17 -0
- package/skills/core/wiki-init/examples/book-reading.md +42 -0
- package/skills/core/wiki-init/examples/research.md +70 -0
- package/skills/core/wiki-init/index-template.md +19 -0
- package/skills/core/wiki-init/page-template-concept.md +38 -0
- package/skills/core/wiki-init/page-template-entity.md +34 -0
- package/skills/core/wiki-init/page-template-source.md +43 -0
- package/skills/core/wiki-init/page-template-synthesis.md +45 -0
- package/skills/core/wiki-init/schema-template.md +156 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# References
|
|
2
|
+
|
|
3
|
+
Background material for the LLM Wiki pattern and adjacent tooling.
|
|
4
|
+
|
|
5
|
+
## Karpathy — LLM Wiki
|
|
6
|
+
|
|
7
|
+
- **Source:** https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
|
|
8
|
+
- **Author:** Andrej Karpathy
|
|
9
|
+
- **Year:** 2026
|
|
10
|
+
- **TL;DR:** Instead of RAG (re-deriving knowledge on every query), the LLM **maintains** an incremental markdown wiki. Every new source is absorbed into the existing pages; cross-references, contradictions, and syntheses get compiled. The human curates; the LLM does bookkeeping.
|
|
11
|
+
- **Why it matters:** the central pattern of this bucket. The design of `wiki-init` and `wiki` derives from it.
|
|
12
|
+
|
|
13
|
+
## Memex
|
|
14
|
+
|
|
15
|
+
- **Source:** Bush, Vannevar — _As We May Think_, The Atlantic, July 1945. https://www.theatlantic.com/magazine/archive/1945/07/as-we-may-think/303881/
|
|
16
|
+
- **TL;DR:** Vision of a personal device that stores books, records, and communications, with **associative trails** between documents. The trail is as valuable as the document itself.
|
|
17
|
+
- **Why it matters:** proto-LLM-wiki. The piece Bush couldn't solve — who maintains the trail — is exactly what an LLM solves.
|
|
18
|
+
|
|
19
|
+
## Tolkien Gateway
|
|
20
|
+
|
|
21
|
+
- **Source:** https://tolkiengateway.net/wiki/Main_Page
|
|
22
|
+
- **TL;DR:** Fan wiki of Tolkien's legendarium. Thousands of cross-linked pages (characters, places, languages, events) built by volunteers over many years.
|
|
23
|
+
- **Why it matters:** concrete example of an incremental human wiki. Demonstrates what an LLM can build on its own with light supervision.
|
|
24
|
+
|
|
25
|
+
## qmd
|
|
26
|
+
|
|
27
|
+
- **Source:** https://github.com/tobi/qmd
|
|
28
|
+
- **Author:** Tobias Lütke
|
|
29
|
+
- **TL;DR:** Local search engine for markdown. BM25 + vector search + LLM re-ranking, fully on-device. CLI + MCP server.
|
|
30
|
+
- **When to install:** once the wiki grows past ~300 pages and `grep`/`ripgrep` becomes a query bottleneck. Update the search section in the consumer repo's `.red/agents/wiki.md` to point at `qmd`.
|
|
31
|
+
|
|
32
|
+
## Obsidian Dataview
|
|
33
|
+
|
|
34
|
+
- **Source:** https://github.com/blacksmithgu/obsidian-dataview
|
|
35
|
+
- **TL;DR:** Obsidian plugin that runs SQL-like queries over page YAML frontmatter. Enables dynamic tables, lists filtered by tag/type, and charts.
|
|
36
|
+
- **Why it matters:** enables rich views over the wiki without changing files — useful for a dynamic `index.md` during interactive use. We keep `index.md` static in the canonical format (so GitHub renders it), but the user can add local Dataview blocks without breaking portability.
|
|
37
|
+
|
|
38
|
+
## Obsidian Web Clipper
|
|
39
|
+
|
|
40
|
+
- **Source:** https://obsidian.md/clipper
|
|
41
|
+
- **TL;DR:** Browser extension that converts web articles into markdown and saves them into the vault.
|
|
42
|
+
- **Why it matters:** a quick shortcut to feed `.red/wiki/raw/`. An alternative to the `/wiki ingest <url>` flow when the content sits behind a paywall or requires login.
|
|
43
|
+
|
|
44
|
+
## Adjacent patterns
|
|
45
|
+
|
|
46
|
+
- **Zettelkasten** (Niklas Luhmann) — slip-box method with atomic notes and links. Difference: Zettelkasten has the human writing atomic notes; LLM Wiki has the agent writing integrated pages.
|
|
47
|
+
- **Personal Knowledge Graphs** — same idea expressed as a graph (Roam, Logseq). LLM Wiki is the markdown-plus-frontmatter variant.
|
|
48
|
+
- **NotebookLM, ChatGPT file uploads** — antagonists: RAG without persistence. Every query re-derives.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki
|
|
3
|
+
description: Operate the LLM Wiki — ingest a source (URL or file), query the wiki and optionally file the answer back as a page, or lint for contradictions/orphans/stale claims. Requires `/wiki-init` to have run. Use when ingesting a doc, asking a question against the knowledge base, or checking the wiki for contradictions and orphans.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wiki
|
|
7
|
+
|
|
8
|
+
**Operate the LLM Wiki — ingest a source, query for answers, or lint for contradictions — reading `.red/agents/wiki.md` first (source of truth for this repo's conventions).**
|
|
9
|
+
|
|
10
|
+
<what-to-do>
|
|
11
|
+
|
|
12
|
+
## Preconditions
|
|
13
|
+
|
|
14
|
+
- `.red/wiki/` exists.
|
|
15
|
+
- `.red/agents/wiki.md` exists.
|
|
16
|
+
- `.red/wiki/` is in `.gitignore` (verify before any operation that writes).
|
|
17
|
+
|
|
18
|
+
If any of those fails, stop and tell the user to run `/wiki-init`.
|
|
19
|
+
|
|
20
|
+
## Routing
|
|
21
|
+
|
|
22
|
+
Map the opening verb to an operation; if ambiguous, ask which one:
|
|
23
|
+
|
|
24
|
+
- "ingest …" / "add source …" → **Ingest**
|
|
25
|
+
- question words / free-form question → **Query**
|
|
26
|
+
- "lint" / "health check" → **Lint**
|
|
27
|
+
|
|
28
|
+
## Ingest
|
|
29
|
+
|
|
30
|
+
### 1. Resolve the input
|
|
31
|
+
|
|
32
|
+
- **URL** → `WebFetch` the content, slugify the title (kebab-case), save to `.red/wiki/raw/<slug>.md` with a minimal YAML header (`url:`, `fetched:`, `title:`). Linked images: download to `.red/wiki/raw/assets/<slug>-<n>.<ext>` and rewrite the refs.
|
|
33
|
+
- **Local path (PDF)** → `pdftotext <pdf> .red/wiki/raw/<slug>.txt` (or similar), then normalise to md at `raw/<slug>.md`. Keep the original PDF alongside.
|
|
34
|
+
- **Local path (md/txt)** → copy/move to `raw/<slug>.md` if it isn't already there.
|
|
35
|
+
|
|
36
|
+
### 2. Read and discuss
|
|
37
|
+
|
|
38
|
+
`Read` the source. Before writing pages, discuss the 3–5 main takeaways with the user. Ask about emphasis: "highlight X or Y more?".
|
|
39
|
+
|
|
40
|
+
### 3. Write pages
|
|
41
|
+
|
|
42
|
+
Use the templates in [../wiki-init/](../wiki-init/):
|
|
43
|
+
|
|
44
|
+
1. **Source page** — `pages/<slug>.md`, `type: source`. Bullets, key claims, quotes, "touches" filled in at the end.
|
|
45
|
+
2. **Entity pages** — one for each new person/place/object. Slug kebab-case. If a page already exists, **update** it: add to `sources:`, revise `Overview`, update `updated:`, add new facts.
|
|
46
|
+
3. **Concept pages** — same approach.
|
|
47
|
+
4. **Contradictions** — if a claim conflicts with an existing page, **do not silence it**. Add a `## Contradictions` section on the affected page citing both sides.
|
|
48
|
+
|
|
49
|
+
### 4. Update index.md
|
|
50
|
+
|
|
51
|
+
Add or update entries in the right sections. Alphabetical order within each section. Each entry: `[Title](./pages/slug.md) — one-liner. N sources.`
|
|
52
|
+
|
|
53
|
+
### 5. Log
|
|
54
|
+
|
|
55
|
+
Append to `.red/wiki/log.md`:
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
## [YYYY-MM-DD] ingest | <Source title>
|
|
59
|
+
- source: raw/<slug>.md
|
|
60
|
+
- touched: pages/a.md, pages/b.md, pages/c.md
|
|
61
|
+
- notes: <one line on the most important change>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 6. C4 awareness (optional, complexity-gated)
|
|
65
|
+
|
|
66
|
+
If `.red/wiki/C4.md` exists, check whether the new source introduces a service, integration, or dependency not yet on the diagram. If so, update C4.md and bump its `updated:` field. If the project doesn't yet have a C4 but the new source describes enough architectural surface to warrant one (≥3 services or non-trivial integration), propose creating it. When C4 work triggers, read the [C4 reference](./C4-reference.md) for the model structure and conventions.
|
|
67
|
+
|
|
68
|
+
### 7. Verify gitignore
|
|
69
|
+
|
|
70
|
+
Before finishing: confirm `.red/wiki/` is still in `.gitignore`. If it was removed, alert and re-add.
|
|
71
|
+
|
|
72
|
+
## Query
|
|
73
|
+
|
|
74
|
+
### 1. Map
|
|
75
|
+
|
|
76
|
+
`Read` `.red/wiki/index.md`. Identify candidate pages by title and one-liner. If nothing matches, fall back to `grep -ri "<term>" .red/wiki/pages/` or `ripgrep`.
|
|
77
|
+
|
|
78
|
+
### 2. Drill
|
|
79
|
+
|
|
80
|
+
`Read` the candidate pages. Follow cross-links if a page cites another relevant one.
|
|
81
|
+
|
|
82
|
+
### 3. Synthesise
|
|
83
|
+
|
|
84
|
+
Pick the most useful output format:
|
|
85
|
+
|
|
86
|
+
- **Markdown prose** — for open-ended questions.
|
|
87
|
+
- **Markdown table** — for comparisons or structured lists.
|
|
88
|
+
- **Mermaid diagram** — for relationships, timelines, flows.
|
|
89
|
+
|
|
90
|
+
Other formats (slides, charts) — only on explicit request. The agent can improvise but it's not the default.
|
|
91
|
+
|
|
92
|
+
Every answer cites the pages (and via them the sources) used. Format: `(via [page-x](./pages/page-x.md))`.
|
|
93
|
+
|
|
94
|
+
### 4. File back?
|
|
95
|
+
|
|
96
|
+
If the answer has durable value (a fresh analysis, a non-obvious comparison, a timeline), ask: "file as a `synthesis` page?" If yes:
|
|
97
|
+
|
|
98
|
+
1. Create `pages/<slug>.md` with `type: synthesis` and the appropriate template.
|
|
99
|
+
2. Update `index.md`.
|
|
100
|
+
3. Append log: `## [date] query | "<question>" → answer-filed: pages/<slug>.md`.
|
|
101
|
+
|
|
102
|
+
If it isn't worth a page, just append to the log: `## [date] query | "<question>"`.
|
|
103
|
+
|
|
104
|
+
## Lint
|
|
105
|
+
|
|
106
|
+
Runs checks against `.red/wiki/`. **Does not auto-fix** — reports and asks what to do.
|
|
107
|
+
|
|
108
|
+
### Checks
|
|
109
|
+
|
|
110
|
+
1. **Contradictions** — scan pages; flag pairs that assert conflicting things. Look for: negations ("X is Y" in one, "X is not Y" in another); different numbers for the same attribute; conflicting dates.
|
|
111
|
+
|
|
112
|
+
2. **Stale** — pages whose `updated:` is >90 days old and whose referenced `sources:` have `created:` more recent than the page's `updated:` (or whose sources have been superseded by newer sources on the same topic via tags).
|
|
113
|
+
|
|
114
|
+
3. **Orphans** — pages with no inbound link (`grep -l "./<slug>.md" .red/wiki/pages/` returns empty).
|
|
115
|
+
|
|
116
|
+
4. **Stubs** — pages with `< 10` lines of content (after the frontmatter).
|
|
117
|
+
|
|
118
|
+
5. **Missing concepts** — terms repeated `>= 5x` across pages but lacking a page of their own (heuristic: lowercase + frequent bigrams/trigrams).
|
|
119
|
+
|
|
120
|
+
6. **Gaps** — questions in "Open questions" unresolved for `>60` days.
|
|
121
|
+
|
|
122
|
+
7. **C4 staleness** — if `.red/wiki/C4.md` exists, flag when its `updated:` is older than the most recent `created:` of any source page whose `touches:` list names a container or component appearing in the diagram. Suggested action: regenerate the affected level — when C4 work triggers, read the [C4 reference](./C4-reference.md).
|
|
123
|
+
|
|
124
|
+
### Output
|
|
125
|
+
|
|
126
|
+
Markdown report grouped by the checks above. For each item:
|
|
127
|
+
|
|
128
|
+
- Path of the affected page(s).
|
|
129
|
+
- Detail (e.g. "claim X in pages/a.md vs claim Y in pages/b.md").
|
|
130
|
+
- Suggested action (e.g. "consolidate into pages/a.md, cite both sources").
|
|
131
|
+
|
|
132
|
+
Append to log: `## [date] lint — orphans: N, stale: N, contradictions: N, stubs: N, gaps: N`.
|
|
133
|
+
|
|
134
|
+
</what-to-do>
|
|
135
|
+
|
|
136
|
+
<supporting-info>
|
|
137
|
+
|
|
138
|
+
## Anti-patterns
|
|
139
|
+
|
|
140
|
+
- ❌ Never operate without reading `.red/agents/wiki.md` first.
|
|
141
|
+
- ❌ Never edit `raw/` — it is immutable.
|
|
142
|
+
- ❌ Never silence contradictions — surface them.
|
|
143
|
+
- ❌ Never use wikilinks `[[...]]` — use standard markdown `[...](./...)`.
|
|
144
|
+
- ❌ Never commit `.red/wiki/` — verify `.gitignore` before any `git add`.
|
|
145
|
+
|
|
146
|
+
## References
|
|
147
|
+
|
|
148
|
+
- [LLM Wiki — Karpathy gist](./REFERENCES.md#karpathy-llm-wiki) — origin of the pattern.
|
|
149
|
+
- [Memex — Vannevar Bush, 1945](./REFERENCES.md#memex) — proto-LLM-wiki.
|
|
150
|
+
- [Tolkien Gateway](./REFERENCES.md#tolkien-gateway) — example of incremental human wiki.
|
|
151
|
+
- [qmd](./REFERENCES.md#qmd) — local search engine for md, optional.
|
|
152
|
+
- [Obsidian Dataview](./REFERENCES.md#obsidian-dataview) — dynamic queries via frontmatter.
|
|
153
|
+
|
|
154
|
+
</supporting-info>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki-init
|
|
3
|
+
description: Bootstrap the LLM Wiki pattern in a repo — create `.red/wiki/` layout, write `.red/agents/wiki.md` schema, gitignore wiki artifacts, register a `### Wiki` entry under `## Agent skills` in CLAUDE.md/AGENTS.md. Run once per repo before using `/wiki`. Re-run only to reset.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-init
|
|
8
|
+
|
|
9
|
+
**Bootstrap the LLM Wiki with a short interview, then write the layout and agent schema.**
|
|
10
|
+
|
|
11
|
+
Sets up the [LLM Wiki](../wiki/REFERENCES.md) pattern. After this runs, the agent has a persistent, incrementally-maintained knowledge base inside `.red/wiki/` and a schema in `.red/agents/wiki.md` that teaches future sessions how to ingest sources, query, and lint.
|
|
12
|
+
|
|
13
|
+
<what-to-do>
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
Light grilling — three questions, then preview, then write. Don't dump all three at once; ask one, get the answer, move on.
|
|
18
|
+
|
|
19
|
+
### 1. Explore
|
|
20
|
+
|
|
21
|
+
Before asking anything, check:
|
|
22
|
+
|
|
23
|
+
- `.red/wiki/` — does it already exist? If yes, refuse to overwrite without an explicit `--reset` from the user.
|
|
24
|
+
- `.red/agents/wiki.md` — already present?
|
|
25
|
+
- `CLAUDE.md` and `AGENTS.md` — does either have an `## Agent skills` block?
|
|
26
|
+
- `.gitignore` — is `.red/wiki/` already listed?
|
|
27
|
+
- `gh repo view --json visibility` — sanity check (informational only; the wiki is gitignored either way).
|
|
28
|
+
|
|
29
|
+
### 2. Ask three questions
|
|
30
|
+
|
|
31
|
+
The three questions are Domain, Source types, and Voice. Walk through them one at a time and recommend a default for each before waiting for an answer.
|
|
32
|
+
|
|
33
|
+
**Q1 — Domain.** "In one sentence, what will this wiki accumulate?"
|
|
34
|
+
Examples: "research on LLMs applied to finance", "reading notes on The Lord of the Rings", "competitive intel on reddb.io competitors", "personal journals and self-tracking".
|
|
35
|
+
|
|
36
|
+
**Q2 — Source types you expect to feed in.** Multi-select, with defaults:
|
|
37
|
+
- web articles (URL fetch)
|
|
38
|
+
- PDFs (papers, books, reports)
|
|
39
|
+
- transcripts (podcasts, calls, meetings)
|
|
40
|
+
- personal notes (markdown drop)
|
|
41
|
+
- other (describe in free text)
|
|
42
|
+
|
|
43
|
+
This defines what `/wiki ingest` must support out of the gate.
|
|
44
|
+
|
|
45
|
+
**Q3 — Solo or team?**
|
|
46
|
+
- **Solo** → wiki voice is the user's first person; no "we", no "the team".
|
|
47
|
+
- **Team** → neutral/collective voice, optional `team.md` page to map stakeholders.
|
|
48
|
+
|
|
49
|
+
Default: infer from `git config user.name` + whether the repo has multiple contributors in `git shortlog -sn` (>1 → team).
|
|
50
|
+
|
|
51
|
+
### 3. Preview
|
|
52
|
+
|
|
53
|
+
Before writing, show the user:
|
|
54
|
+
|
|
55
|
+
1. The paths that will be created.
|
|
56
|
+
2. The rendered `.red/agents/wiki.md` (with domain/source-types/voice substitutions applied).
|
|
57
|
+
3. The `.gitignore` line that will be appended.
|
|
58
|
+
4. The `### Wiki` block that will land under `## Agent skills` in CLAUDE.md/AGENTS.md.
|
|
59
|
+
|
|
60
|
+
Wait for approval.
|
|
61
|
+
|
|
62
|
+
### 4. Write
|
|
63
|
+
|
|
64
|
+
**Create the structure:**
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
.red/
|
|
68
|
+
├── agents/wiki.md
|
|
69
|
+
└── wiki/
|
|
70
|
+
├── raw/
|
|
71
|
+
│ └── assets/
|
|
72
|
+
├── pages/
|
|
73
|
+
│ └── .gitkeep
|
|
74
|
+
├── index.md
|
|
75
|
+
└── log.md
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Use the seed templates bundled with this skill:
|
|
79
|
+
- [schema-template.md](./schema-template.md) → `.red/agents/wiki.md` (substituting placeholders `{{domain}}`, `{{source-types}}`, `{{voice}}`)
|
|
80
|
+
- [index-template.md](./index-template.md) → `.red/wiki/index.md`
|
|
81
|
+
- `log.md` starts with the heading `# Log` and nothing else.
|
|
82
|
+
- For the full bundled template inventory, see [TEMPLATE-REFERENCE.md](./TEMPLATE-REFERENCE.md).
|
|
83
|
+
|
|
84
|
+
**Append to `.gitignore`:**
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
# RedSkills wiki — local-only, never committed
|
|
88
|
+
.red/wiki/
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If `.gitignore` doesn't exist, create it. If the line already exists (same prefix), skip.
|
|
92
|
+
|
|
93
|
+
**Update CLAUDE.md/AGENTS.md:**
|
|
94
|
+
|
|
95
|
+
Pick rules identical to `red-setup`:
|
|
96
|
+
- If `CLAUDE.md` exists, edit it.
|
|
97
|
+
- Else if `AGENTS.md` exists, edit it.
|
|
98
|
+
- If neither exists, ask which one to create.
|
|
99
|
+
|
|
100
|
+
Append under `## Agent skills`:
|
|
101
|
+
|
|
102
|
+
```markdown
|
|
103
|
+
### Wiki
|
|
104
|
+
|
|
105
|
+
Incremental LLM Wiki for accumulating knowledge about `{{domain}}`. Schema at `.red/agents/wiki.md`. Use `/wiki` for ingest, query, and lint.
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
If a `### Wiki` block already exists, update it in place instead of duplicating.
|
|
109
|
+
|
|
110
|
+
### 5. Done
|
|
111
|
+
|
|
112
|
+
Tell the user:
|
|
113
|
+
- What was created.
|
|
114
|
+
- That `.red/wiki/` is gitignored (nothing leaks).
|
|
115
|
+
- Next step: run `/wiki ingest <first source>`.
|
|
116
|
+
- That the schema is living — they can edit `.red/agents/wiki.md` directly, or ask the agent to update it as conventions emerge.
|
|
117
|
+
|
|
118
|
+
</what-to-do>
|
|
119
|
+
|
|
120
|
+
<supporting-info>
|
|
121
|
+
|
|
122
|
+
## References
|
|
123
|
+
|
|
124
|
+
- Bundled templates and examples: [TEMPLATE-REFERENCE.md](./TEMPLATE-REFERENCE.md).
|
|
125
|
+
- External LLM Wiki pattern reference: [REFERENCES.md](../wiki/REFERENCES.md) in the `wiki` skill.
|
|
126
|
+
|
|
127
|
+
</supporting-info>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Template Reference
|
|
2
|
+
|
|
3
|
+
Reference-only inventory for `wiki-init/SKILL.md`. Load this when checking the
|
|
4
|
+
bundled template set or following the external LLM Wiki pattern.
|
|
5
|
+
|
|
6
|
+
## Bundled Templates
|
|
7
|
+
|
|
8
|
+
- [schema-template.md](./schema-template.md)
|
|
9
|
+
- [index-template.md](./index-template.md)
|
|
10
|
+
- [page-template-entity.md](./page-template-entity.md)
|
|
11
|
+
- [page-template-concept.md](./page-template-concept.md)
|
|
12
|
+
- [page-template-source.md](./page-template-source.md)
|
|
13
|
+
- [page-template-synthesis.md](./page-template-synthesis.md)
|
|
14
|
+
- [examples/research.md](./examples/research.md)
|
|
15
|
+
- [examples/book-reading.md](./examples/book-reading.md)
|
|
16
|
+
|
|
17
|
+
External references: see [REFERENCES.md](../wiki/REFERENCES.md) in the `wiki` skill.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Example — Book reading wiki
|
|
2
|
+
|
|
3
|
+
A repo dedicated to a single reading: "The Fellowship of the Ring" (Tolkien).
|
|
4
|
+
|
|
5
|
+
## After `/wiki-init`
|
|
6
|
+
|
|
7
|
+
`.red/agents/wiki.md`:
|
|
8
|
+
- `{{domain}}` = "companion wiki for reading The Lord of the Rings"
|
|
9
|
+
- `{{source-types}}` = "book chapters (personal notes in md), academic commentary (PDFs), Tolkien interviews (transcripts)"
|
|
10
|
+
- `{{voice}}` = "first person (solo)"
|
|
11
|
+
|
|
12
|
+
## Emergent convention
|
|
13
|
+
|
|
14
|
+
After ingesting the first chapter, the agent asks: "Chapters are the common source here — want a naming pattern?" The user agrees on `ch01-<slug>.md`. The agent **adds it to the schema** (`.red/agents/wiki.md`):
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
## Naming exceptions
|
|
18
|
+
|
|
19
|
+
- **Book chapters:** `ch<NN>-<slug>.md` (zero-padded, NN from 01 to 22). Example: `ch01-a-long-expected-party.md`.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## After 5 chapters
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
pages/
|
|
26
|
+
├── ch01-a-long-expected-party.md # type: source
|
|
27
|
+
├── ch02-the-shadow-of-the-past.md # type: source
|
|
28
|
+
├── ch03-three-is-company.md # type: source
|
|
29
|
+
├── ch04-a-short-cut-to-mushrooms.md
|
|
30
|
+
├── ch05-a-conspiracy-unmasked.md
|
|
31
|
+
├── frodo-baggins.md # type: entity, sources: 5
|
|
32
|
+
├── bilbo-baggins.md # type: entity, sources: 2
|
|
33
|
+
├── gandalf.md # type: entity, sources: 3
|
|
34
|
+
├── samwise-gamgee.md # type: entity, sources: 3
|
|
35
|
+
├── the-shire.md # type: entity (place)
|
|
36
|
+
├── the-one-ring.md # type: entity (object)
|
|
37
|
+
├── ring-bearer.md # type: concept
|
|
38
|
+
├── eucatastrophe.md # type: concept
|
|
39
|
+
└── ring-temptation-patterns.md # type: synthesis (4 sources)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Typical query: "how does the Ring affect each bearer?" → the agent reads the relevant pages, builds a comparison table, and offers to file it back as `pages/ring-bearer-effects.md` (synthesis).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Example — Research wiki
|
|
2
|
+
|
|
3
|
+
A research repo covering "LLM Wiki patterns and adjacent tooling".
|
|
4
|
+
|
|
5
|
+
## After `/wiki-init`
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.red/wiki/
|
|
9
|
+
├── index.md # empty, with stub sections
|
|
10
|
+
├── log.md # header only
|
|
11
|
+
├── raw/
|
|
12
|
+
│ └── assets/
|
|
13
|
+
└── pages/
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`.red/agents/wiki.md` populated with:
|
|
17
|
+
- `{{domain}}` = "research on LLM Wiki patterns and adjacent tooling"
|
|
18
|
+
- `{{source-types}}` = "web articles, PDFs (papers), podcast transcripts, personal notes"
|
|
19
|
+
- `{{voice}}` = "first person (solo)"
|
|
20
|
+
|
|
21
|
+
## After 3 ingests
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
.red/wiki/
|
|
25
|
+
├── index.md
|
|
26
|
+
├── log.md
|
|
27
|
+
├── raw/
|
|
28
|
+
│ ├── karpathy-llm-wiki.md # from the gist
|
|
29
|
+
│ ├── memex-as-we-may-think.md # extracted PDF
|
|
30
|
+
│ └── qmd-readme.md # from GitHub
|
|
31
|
+
└── pages/
|
|
32
|
+
├── karpathy-llm-wiki.md # type: source
|
|
33
|
+
├── memex-as-we-may-think.md # type: source
|
|
34
|
+
├── qmd-readme.md # type: source
|
|
35
|
+
├── andrej-karpathy.md # type: entity
|
|
36
|
+
├── vannevar-bush.md # type: entity
|
|
37
|
+
├── llm-wiki.md # type: concept
|
|
38
|
+
├── memex.md # type: concept
|
|
39
|
+
├── associative-trails.md # type: concept
|
|
40
|
+
├── rag.md # type: concept (contrast with llm-wiki)
|
|
41
|
+
└── wiki-vs-rag.md # type: synthesis
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Example `index.md`:
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
# Index
|
|
48
|
+
|
|
49
|
+
## Sources
|
|
50
|
+
|
|
51
|
+
- [Karpathy — LLM Wiki gist](./pages/karpathy-llm-wiki.md) — 2026. The incremental LLM-maintained wiki pattern.
|
|
52
|
+
- [Bush — As We May Think](./pages/memex-as-we-may-think.md) — 1945. Original Memex vision.
|
|
53
|
+
- [qmd README](./pages/qmd-readme.md) — Tobi Lütke. BM25+vector search over local markdown.
|
|
54
|
+
|
|
55
|
+
## Entities
|
|
56
|
+
|
|
57
|
+
- [Andrej Karpathy](./pages/andrej-karpathy.md) — author of the gist. 1 source.
|
|
58
|
+
- [Vannevar Bush](./pages/vannevar-bush.md) — proto-author of the idea (Memex). 1 source.
|
|
59
|
+
|
|
60
|
+
## Concepts
|
|
61
|
+
|
|
62
|
+
- [Associative trails](./pages/associative-trails.md) — links between documents as knowledge in their own right. 2 sources.
|
|
63
|
+
- [LLM Wiki](./pages/llm-wiki.md) — the central pattern. 1 source.
|
|
64
|
+
- [Memex](./pages/memex.md) — Bush's proto-LLM-wiki. 1 source.
|
|
65
|
+
- [RAG](./pages/rag.md) — antagonist to the LLM Wiki: retrieval without synthesis. 1 source.
|
|
66
|
+
|
|
67
|
+
## Syntheses
|
|
68
|
+
|
|
69
|
+
- [Wiki vs RAG](./pages/wiki-vs-rag.md) — accumulating vs re-deriving. 3 sources.
|
|
70
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Index
|
|
2
|
+
|
|
3
|
+
Wiki catalogue. Updated on every ingest and on every query that becomes a page.
|
|
4
|
+
|
|
5
|
+
## Sources
|
|
6
|
+
|
|
7
|
+
_(no sources yet — run `/wiki ingest <url|path>`)_
|
|
8
|
+
|
|
9
|
+
## Entities
|
|
10
|
+
|
|
11
|
+
_(no entities yet)_
|
|
12
|
+
|
|
13
|
+
## Concepts
|
|
14
|
+
|
|
15
|
+
_(no concepts yet)_
|
|
16
|
+
|
|
17
|
+
## Syntheses
|
|
18
|
+
|
|
19
|
+
_(no syntheses yet)_
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: {{Concept Name}}
|
|
3
|
+
type: concept
|
|
4
|
+
tags: []
|
|
5
|
+
created: {{YYYY-MM-DD}}
|
|
6
|
+
updated: {{YYYY-MM-DD}}
|
|
7
|
+
sources: []
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# {{Concept Name}}
|
|
11
|
+
|
|
12
|
+
**Definition:** one precise sentence. If a canonical definition exists in a source, cite it.
|
|
13
|
+
|
|
14
|
+
## Origin
|
|
15
|
+
|
|
16
|
+
Who coined the term, where, when, in what context.
|
|
17
|
+
|
|
18
|
+
## Mechanism / How it works
|
|
19
|
+
|
|
20
|
+
How the concept operates. Components, dynamics, examples.
|
|
21
|
+
|
|
22
|
+
## Instances
|
|
23
|
+
|
|
24
|
+
- Appears in [Entity X](./entity-x.md)
|
|
25
|
+
- Also seen in [Source Y](./source-y.md)
|
|
26
|
+
|
|
27
|
+
## Related concepts
|
|
28
|
+
|
|
29
|
+
- Close to [Another Concept](./another-concept.md): similarities and differences.
|
|
30
|
+
- Contrast with [Antagonist](./antagonist.md).
|
|
31
|
+
|
|
32
|
+
## Open questions
|
|
33
|
+
|
|
34
|
+
- What is still unclear in the sources.
|
|
35
|
+
|
|
36
|
+
## Contradictions
|
|
37
|
+
|
|
38
|
+
_(if sources disagree on scope or definition)_
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: {{Display Name}}
|
|
3
|
+
type: entity
|
|
4
|
+
tags: []
|
|
5
|
+
created: {{YYYY-MM-DD}}
|
|
6
|
+
updated: {{YYYY-MM-DD}}
|
|
7
|
+
sources: []
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# {{Display Name}}
|
|
11
|
+
|
|
12
|
+
**One-liner:** who/what/where, in one sentence.
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
Short paragraph situating the entity. Who/what it is, primary role, why it appears in this wiki.
|
|
17
|
+
|
|
18
|
+
## Key facts
|
|
19
|
+
|
|
20
|
+
- Fact 1 (source: [slug](./slug.md))
|
|
21
|
+
- Fact 2
|
|
22
|
+
|
|
23
|
+
## Relationships
|
|
24
|
+
|
|
25
|
+
- Links to [Another Entity](./another-entity.md) via X.
|
|
26
|
+
- Contrast with [Another](./another.md): Y.
|
|
27
|
+
|
|
28
|
+
## Open questions
|
|
29
|
+
|
|
30
|
+
- Question not yet answered by the sources.
|
|
31
|
+
|
|
32
|
+
## Contradictions
|
|
33
|
+
|
|
34
|
+
_(add if sources disagree; cite both)_
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: {{Source Title}}
|
|
3
|
+
type: source
|
|
4
|
+
tags: []
|
|
5
|
+
created: {{YYYY-MM-DD}}
|
|
6
|
+
updated: {{YYYY-MM-DD}}
|
|
7
|
+
sources: [{{slug}}]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# {{Source Title}}
|
|
11
|
+
|
|
12
|
+
- **Author:** _(who)_
|
|
13
|
+
- **Published:** _(when)_
|
|
14
|
+
- **URL / file:** `raw/{{slug}}.md` (origin: `<url>` or `<original file>`)
|
|
15
|
+
- **Format:** article | paper | podcast | book-chapter | transcript | note
|
|
16
|
+
|
|
17
|
+
## TL;DR
|
|
18
|
+
|
|
19
|
+
3–5 bullets capturing the central argument.
|
|
20
|
+
|
|
21
|
+
## Key claims
|
|
22
|
+
|
|
23
|
+
1. Claim with a reference to the source's section/paragraph.
|
|
24
|
+
2. Claim 2.
|
|
25
|
+
|
|
26
|
+
## Methods / evidence
|
|
27
|
+
|
|
28
|
+
How the source supports its claims. Useful for papers and reports.
|
|
29
|
+
|
|
30
|
+
## Quotes
|
|
31
|
+
|
|
32
|
+
> Citation worth preserving verbatim.
|
|
33
|
+
|
|
34
|
+
## Touches
|
|
35
|
+
|
|
36
|
+
Pages updated by this source:
|
|
37
|
+
|
|
38
|
+
- [Entity X](./entity-x.md)
|
|
39
|
+
- [Concept Y](./concept-y.md)
|
|
40
|
+
|
|
41
|
+
## My take
|
|
42
|
+
|
|
43
|
+
_(optional — human or agent annotation on the source's strengths/weaknesses)_
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: {{Synthesis Title}}
|
|
3
|
+
type: synthesis
|
|
4
|
+
tags: []
|
|
5
|
+
created: {{YYYY-MM-DD}}
|
|
6
|
+
updated: {{YYYY-MM-DD}}
|
|
7
|
+
sources: []
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# {{Synthesis Title}}
|
|
11
|
+
|
|
12
|
+
**Question / thesis:** what this synthesis answers or argues, in one sentence.
|
|
13
|
+
|
|
14
|
+
## Context
|
|
15
|
+
|
|
16
|
+
Why this synthesis exists. The question that came from the human, or the pattern that emerged from the wiki.
|
|
17
|
+
|
|
18
|
+
## Argument
|
|
19
|
+
|
|
20
|
+
Structure as bullets, short paragraphs, or a table:
|
|
21
|
+
|
|
22
|
+
| Aspect | Source A | Source B | Consequence |
|
|
23
|
+
|--------|----------|----------|-------------|
|
|
24
|
+
| ... | ... | ... | ... |
|
|
25
|
+
|
|
26
|
+
Or prose when tabular comparison doesn't fit.
|
|
27
|
+
|
|
28
|
+
## Evidence
|
|
29
|
+
|
|
30
|
+
Pages and sources that support the argument:
|
|
31
|
+
|
|
32
|
+
- [Page X](./page-x.md) — contributes Y
|
|
33
|
+
- [Source Z](./source-z.md) — contributes W
|
|
34
|
+
|
|
35
|
+
## Tensions / disagreements
|
|
36
|
+
|
|
37
|
+
Where the sources diverge. Name the conflict; don't hide it.
|
|
38
|
+
|
|
39
|
+
## Implications
|
|
40
|
+
|
|
41
|
+
What changes if this synthesis is true.
|
|
42
|
+
|
|
43
|
+
## Open questions
|
|
44
|
+
|
|
45
|
+
What still needs investigating.
|