@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,156 @@
|
|
|
1
|
+
# Wiki — Schema
|
|
2
|
+
|
|
3
|
+
This document teaches the agent how to maintain this repo's LLM Wiki. It is read every time `/wiki` operates.
|
|
4
|
+
|
|
5
|
+
## Domain
|
|
6
|
+
|
|
7
|
+
**What this wiki is about:** {{domain}}
|
|
8
|
+
|
|
9
|
+
**Accepted source types:** {{source-types}}
|
|
10
|
+
|
|
11
|
+
**Voice:** {{voice}}
|
|
12
|
+
|
|
13
|
+
## Layout
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
.red/wiki/
|
|
17
|
+
├── raw/ # immutable sources — agent reads, never edits
|
|
18
|
+
│ └── assets/ # images downloaded from online sources
|
|
19
|
+
├── pages/ # agent-generated pages — flat, kebab-case.md
|
|
20
|
+
├── index.md # catalogue grouped by type
|
|
21
|
+
└── log.md # append-only "## [date] op | title"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The entire `.red/wiki/` directory is in `.gitignore`. **Never** commit it. Backup/sync across machines is the user's responsibility (dedicated private repo, syncthing, etc.).
|
|
25
|
+
|
|
26
|
+
## Page conventions
|
|
27
|
+
|
|
28
|
+
**Filename:** `kebab-case.md`, canonical slug. The display name comes from the frontmatter `title:`.
|
|
29
|
+
|
|
30
|
+
**Mandatory frontmatter:**
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
---
|
|
34
|
+
title: Frodo Baggins # display name
|
|
35
|
+
type: entity # entity | concept | source | synthesis | comparison
|
|
36
|
+
tags: [hobbit, ring-bearer] # free-form
|
|
37
|
+
created: 2026-05-16
|
|
38
|
+
updated: 2026-05-16
|
|
39
|
+
sources: [fellowship-ch1, prologue] # slugs in .red/wiki/raw/ or pages/sources/
|
|
40
|
+
---
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**Types:**
|
|
44
|
+
|
|
45
|
+
- `entity` — person, place, organisation, concrete object.
|
|
46
|
+
- `concept` — idea, pattern, theory, method.
|
|
47
|
+
- `source` — summary of a single ingested source. Slug matches the file in `raw/`.
|
|
48
|
+
- `synthesis` — analysis that crosses multiple sources/entities/concepts. Includes comparisons.
|
|
49
|
+
- `comparison` — a particular case of synthesis (use freely).
|
|
50
|
+
|
|
51
|
+
Can a page be multi-typed? Yes — pick the **dominant** type and use `tags` for secondary dimensions.
|
|
52
|
+
|
|
53
|
+
**Cross-links:** standard markdown `[Frodo](./frodo-baggins.md)`. No Obsidian wikilinks (keeps GitHub portability).
|
|
54
|
+
|
|
55
|
+
## index.md
|
|
56
|
+
|
|
57
|
+
Structure:
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# Index
|
|
61
|
+
|
|
62
|
+
## Sources
|
|
63
|
+
|
|
64
|
+
- [Fellowship Ch.1](./pages/fellowship-ch1.md) — Tolkien, 1954. Bilbo's farewell party.
|
|
65
|
+
|
|
66
|
+
## Entities
|
|
67
|
+
|
|
68
|
+
- [Frodo Baggins](./pages/frodo-baggins.md) — hobbit, ring-bearer. 3 sources.
|
|
69
|
+
- [The Shire](./pages/the-shire.md) — hobbit homeland. 2 sources.
|
|
70
|
+
|
|
71
|
+
## Concepts
|
|
72
|
+
|
|
73
|
+
- [Eucatastrophe](./pages/eucatastrophe.md) — sudden joyous turn (Tolkien). 1 source.
|
|
74
|
+
|
|
75
|
+
## Syntheses
|
|
76
|
+
|
|
77
|
+
- [Ring temptation patterns](./pages/ring-temptation-patterns.md) — comparison across bearers. 4 sources.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Keep entries alphabetical within each section. Update on every ingest and every query that becomes a page.
|
|
81
|
+
|
|
82
|
+
## log.md
|
|
83
|
+
|
|
84
|
+
Append-only. Greppable prefix `## [YYYY-MM-DD] op | title`:
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
# Log
|
|
88
|
+
|
|
89
|
+
## [2026-05-16] ingest | Fellowship of the Ring, ch.1
|
|
90
|
+
- source: raw/fellowship-ch1.md
|
|
91
|
+
- touched: pages/frodo-baggins.md, pages/the-shire.md, pages/bilbo-baggins.md, pages/fellowship-ch1.md
|
|
92
|
+
- notes: Bilbo's farewell; Ring passed to Frodo.
|
|
93
|
+
|
|
94
|
+
## [2026-05-16] query | "who knew about the Ring before Frodo?"
|
|
95
|
+
- answer-filed: pages/ring-knowledge-pre-frodo.md
|
|
96
|
+
- touched: index.md
|
|
97
|
+
|
|
98
|
+
## [2026-05-17] lint
|
|
99
|
+
- orphans: 2 (resolved)
|
|
100
|
+
- stale: 0
|
|
101
|
+
- contradictions: 1 flagged in pages/aragorn.md
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Useful command: `grep "^## \[" log.md | tail -5`.
|
|
105
|
+
|
|
106
|
+
## Operations
|
|
107
|
+
|
|
108
|
+
### Ingest
|
|
109
|
+
|
|
110
|
+
Input: a URL or a file path under `.red/wiki/raw/`.
|
|
111
|
+
|
|
112
|
+
1. If URL: download to `raw/<slug>.md` (WebFetch or similar). Referenced images → `raw/assets/`.
|
|
113
|
+
2. If PDF: extract text via `pdftotext` or similar into `raw/<slug>.md` alongside the original PDF.
|
|
114
|
+
3. Read the source. Discuss key takeaways with the user before writing.
|
|
115
|
+
4. Create `pages/<slug>.md` with `type: source`, a summary, and full frontmatter.
|
|
116
|
+
5. Identify new entities/concepts → create pages. Identify existing ones → update them, add to `sources:`, revise the body.
|
|
117
|
+
6. Flag contradictions with prior sources — do not silence them. Add a `## Contradictions` section on the affected page when they occur.
|
|
118
|
+
7. Update `index.md`.
|
|
119
|
+
8. Append an entry to `log.md`.
|
|
120
|
+
|
|
121
|
+
A single ingest can touch 10–15 pages. Show the diff/list before applying when possible.
|
|
122
|
+
|
|
123
|
+
### Query
|
|
124
|
+
|
|
125
|
+
Input: a natural-language question.
|
|
126
|
+
|
|
127
|
+
1. Read `index.md` first to map candidate pages.
|
|
128
|
+
2. `Read` the relevant pages.
|
|
129
|
+
3. Synthesise the answer. Supported formats: markdown prose, markdown table, Mermaid diagram. Other formats: ask explicitly.
|
|
130
|
+
4. Every answer cites the pages (and via them the sources) used.
|
|
131
|
+
5. If the answer has durable value, ask the user whether to file it back as a new page (`type: synthesis` in most cases). If yes → create the page + update index + log.
|
|
132
|
+
|
|
133
|
+
Substring/concept search: `grep` or `ripgrep` over `pages/`. If the wiki grows past ~300 pages and search becomes painful, install [qmd](https://github.com/tobi/qmd) and update this section.
|
|
134
|
+
|
|
135
|
+
### Lint
|
|
136
|
+
|
|
137
|
+
Periodic health check. Looks for:
|
|
138
|
+
|
|
139
|
+
- **Contradictions** — conflicting claims across pages. Listed by page pair.
|
|
140
|
+
- **Stale** — pages whose `updated:` is very old and whose `sources:` have been superseded by newer sources.
|
|
141
|
+
- **Orphans** — pages with no inbound links (no other page references them). May indicate isolation or a candidate for removal.
|
|
142
|
+
- **Stubs** — short pages (~<10 lines) that warrant expansion.
|
|
143
|
+
- **Unpaged concepts** — terms repeated across pages without a page of their own.
|
|
144
|
+
- **Gaps** — obvious unanswered questions; suggest sources to fetch.
|
|
145
|
+
|
|
146
|
+
Reports findings. Does not auto-fix — asks what to do.
|
|
147
|
+
|
|
148
|
+
Append `## [date] lint` to the log with counts.
|
|
149
|
+
|
|
150
|
+
## Anti-patterns
|
|
151
|
+
|
|
152
|
+
- ❌ Do **not** treat the wiki as a spec or changelog. It is knowledge accumulation.
|
|
153
|
+
- ❌ Do **not** commit `.red/wiki/`. Check `.gitignore` before any `git add -A`.
|
|
154
|
+
- ❌ Do **not** edit files in `raw/`. Sources are immutable.
|
|
155
|
+
- ❌ Do **not** create Obsidian wikilinks `[[...]]` — they break outside Obsidian.
|
|
156
|
+
- ❌ Do **not** introduce new conventions unilaterally — ask; if agreed, update **this file** immediately to crystallise the decision.
|