repo-nexus 0.4.2 → 0.4.4

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/README.md CHANGED
@@ -213,7 +213,7 @@ rnex plugin disable karpathy-llm
213
213
 
214
214
  ### Built-in Plugin: `karpathy-llm`
215
215
  The `karpathy-llm` plugin packages Andrej Karpathy's verified LLM agent design patterns, context engineering principles, and the autonomous **Karpathy LLM Wiki** architecture:
216
- * **The 4 Cardinal Agent Rules** (`.rnex/plugins/karpathy-llm/rules/KARPATHY_RULES.md`):
216
+ * **The 4 Cardinal Agent Rules** (`.rnex/plugins/karpathy-llm/rules/behavioral.md`):
217
217
  1. *Think Before Coding:* Formulate explicit assumptions, boundary checks, and trade-offs before writing code.
218
218
  2. *Simplicity First:* Minimal abstractions, readable implementations, zero speculative boilerplate.
219
219
  3. *Surgical Changes:* Minimal blast radius, preserved comments/docstrings, and tight diffs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-nexus",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "Lightweight, zero-dependency Virtual Meta-Repo companion for multi-repo workspaces and shared AI context (no git submodules)",
5
5
  "bin": {
6
6
  "repo-nexus": "rnex",
@@ -10,16 +10,16 @@ Reference specification: [setup-karpathy-wiki.md](https://github.com/nu-nenoi/ai
10
10
 
11
11
  ## What It Provides
12
12
 
13
- ### 1. The 4 Cardinal Principles for Coding Agents (`rules/KARPATHY_RULES.md`)
13
+ ### 1. The 4 Cardinal Principles for Coding Agents (`rules/behavioral.md`)
14
14
  * **Think Before Coding:** Explicit assumptions, problem formulation, and trade-off evaluation before writing code.
15
15
  * **Simplicity First:** Minimal abstractions, readable implementations, and zero boilerplate bloat.
16
16
  * **Surgical Changes:** Minimal blast radius, preserved comments/docstrings, and tightly focused diffs.
17
17
  * **Goal-Driven Execution:** Upfront verification criteria, automated tests, and rigorous diff review.
18
18
 
19
- ### 2. Multi-Repo Context Engineering & Autonomy
19
+ ### 2. Multi-Repo Context Engineering & Autonomy (`rules/behavioral.md`)
20
20
  * Guidelines tailored for Repo Nexus workspaces respecting member repository autonomy and physical repository boundaries.
21
21
 
22
- ### 3. Complete Karpathy LLM Wiki Architecture
22
+ ### 3. Complete Karpathy LLM Wiki Architecture (`instructions/wiki-architecture.md`)
23
23
  * **`/raw/` Intake Directory:** Append-only directory where unmodified source material (articles, transcripts, docs, meeting notes) is deposited. Includes `.gitkeep`.
24
24
  * **`/wiki/` Curated Knowledge Base:** Interlinked atomic markdown pages, each with typed frontmatter relations (`sources`, `related`, `extends`, `contradicts`, `mentioned_in`).
25
25
  * **`/wiki/index.md` Navigation Index:** Master categorized catalog organizing atomic concepts, architecture decisions, and cross-project knowledge.
@@ -32,37 +32,22 @@ Reference specification: [setup-karpathy-wiki.md](https://github.com/nu-nenoi/ai
32
32
 
33
33
  ---
34
34
 
35
- ## Step 0 — Configuration Interview
36
-
37
- When an AI agent or developer sets up the Karpathy LLM Wiki in a repository or workspace, consult the Step 0 configuration questions:
38
-
39
- 1. **[Q1] Which AI agent instruction file should the wiki rules be written to?**
40
- - In a **Repo Nexus workspace**: Instructions are maintained in separate instructions files (`.rnex/instructions/karpathy-llm.md` and `.rnex/rules/KARPATHY_RULES.md`). Agents read `rnex.yaml` to detect enabled plugins and read their dedicated instructions files automatically.
41
- - In a **standalone setup** (outside Repo Nexus):
42
- - `AGENTS.md` (universal, works across most harnesses)
43
- - `CLAUDE.md` (Claude Code / Anthropic)
44
- - `.cursor/rules/wiki.mdc` (Cursor)
45
- - `.github/copilot-instructions.md` (GitHub Copilot)
46
- - `GEMINI.md` (Google Gemini / Antigravity)
47
- - `.windsurfrules` (Windsurf)
48
- - Other — specify path
49
- *Append the `## Karpathy Wiki Rules` section to that file while preserving all existing content.*
50
-
51
- 2. **[Q2] What is this wiki for?**
52
- - Research / reading list — articles, papers, PDFs on a topic
53
- - Personal second brain — meetings, notes, business context, personal projects
54
- - Content archive — transcripts, podcast notes, newsletters
55
- - Codebase knowledge — architecture decisions, runbooks, team conventions
56
- - Other (describe briefly)
57
-
58
- 3. **[Q3] How should the wiki be organized?**
59
- - **Flat** — all pages at the top level of `/wiki/` (simpler, good default)
60
- - **Structured** — subfolders by category, chosen based on Q2:
61
- - Research → `concepts/`, `people/`, `organizations/`, `sources/`, `analysis/`
62
- - Second brain → `projects/`, `people/`, `decisions/`, `logs/`
63
- - Content archive → `sources/`, `people/`, `tools/`, `concepts/`
64
- - Codebase → `architecture/`, `decisions/`, `runbooks/`, `people/`
65
- - **Agent decides** — infer structure from the first batch of ingested content
35
+ ## Deterministic Lifecycle: Initialization vs. Evolutionary Growth
36
+
37
+ To ensure workspaces remain 100% predictable, understandable, and consistent across all tools, the Karpathy LLM Wiki follows a strict two-phase lifecycle:
38
+
39
+ ### Phase 1: 100% Deterministic Initialization
40
+ Enabling the plugin (`rnex plugin enable karpathy-llm`) performs an exact, zero-interview scaffolding step:
41
+ * **Predictable Baseline**: Fixed standard files are created (`raw/.gitkeep`, `wiki/index.md`, `wiki/hot.md`, `wiki/_log.md`).
42
+ * **Scoped Assets**: Behavioral rules, wiki architecture guides, workflows, and templates are cleanly isolated under `.rnex/plugins/karpathy-llm/`.
43
+ * **Zero Guesswork**: No interactive interviews, no AI-generated folder variances, and no "agent decides" ambiguities at init time.
44
+ * **Idempotent**: Safe to run repeatedly; existing user files are never overwritten.
45
+
46
+ ### Phase 2: Evolutionary Growth & Domain Specialization (Usage Phase)
47
+ Once initialized, the workspace structure organically evolves according to actual domain needs and source materials:
48
+ * **Source Ingestion (`wiki-ingest`)**: As raw source documents are deposited into `/raw/` and ingested, atomic pages are generated. Users or agents can organize pages into categorical subfolders (e.g. `architecture/`, `decisions/`, `concepts/`, `projects/`) or keep them flat.
49
+ * **Customizable Guidelines**: Teams can tailor `rules/behavioral.md` and `instructions/wiki-architecture.md` for their specific team conventions.
50
+ * **Graph Maintenance (`wiki-lint`)**: The periodic lint workflow validates relation paths, updates `mentioned_in`, and rebuilds `index.md` and `hot.md` to match the evolved knowledge graph.
66
51
 
67
52
  ---
68
53
 
@@ -82,9 +67,9 @@ my-workspace/
82
67
  │ └── plugins/
83
68
  │ └── karpathy-llm/
84
69
  │ ├── instructions/
85
- │ │ └── karpathy-llm.md # Dedicated plugin instructions
70
+ │ │ └── wiki-architecture.md# LLM Wiki architecture & relation schema
86
71
  │ ├── rules/
87
- │ │ └── KARPATHY_RULES.md# Cardinal principles & wiki rules
72
+ │ │ └── behavioral.md # Cardinal principles & context engineering
88
73
  │ ├── workflows/
89
74
  │ │ ├── wiki-ingest.md # 8-step decomposition & ingestion workflow
90
75
  │ │ └── wiki-lint.md # 10-step graph validation & maintenance workflow
@@ -107,7 +92,7 @@ rnex plugin enable karpathy-llm
107
92
  This command:
108
93
  1. Adds `karpathy-llm` to `plugins:` in `rnex.yaml`.
109
94
  2. Copies initial templates (`wiki/index.md`, `wiki/_log.md`, `wiki/hot.md`, `raw/.gitkeep`, `.rnex/templates/wiki-page.template.md`, `.rnex/templates/LLM_WIKI.sample.md`).
110
- 3. Links `KARPATHY_RULES.md` and workflows into `.rnex/rules/` and `.rnex/workflows/`.
95
+ 3. Scopes `rules/`, `instructions/`, and `workflows/` into `.rnex/plugins/karpathy-llm/`.
111
96
  4. Syncs scope links and AI context files across all registered member repositories via `rnex fix`.
112
97
 
113
98
  ### Option 2: Declarative in `rnex.yaml`
@@ -0,0 +1,43 @@
1
+ # Karpathy LLM Wiki Knowledge Architecture
2
+
3
+ > "A persistent, compounding knowledge base optimized for AI agents." — Andrej Karpathy
4
+
5
+ This instruction document defines the operational rules, intake lifecycle, and typed relation schema for the Karpathy LLM Wiki (`/wiki/` and `/raw/` directories).
6
+
7
+ ---
8
+
9
+ ## 1. Operating Rules
10
+
11
+ When working in a workspace with an active Karpathy LLM Wiki:
12
+
13
+ - **Intake**: All source material (articles, transcripts, docs, notes) goes to `/raw/` unmodified. Never write directly to `/wiki/` without ingesting.
14
+ - **Orientation**: Before answering domain questions, read `/wiki/index.md` to find relevant pages, then read only those pages. If `hot.md` exists, read it first as a quick-orient step.
15
+ - **Ingestion**: When files appear in `/raw/`, run the `wiki-ingest` workflow (`.rnex/plugins/karpathy-llm/workflows/wiki-ingest.md`). One source document typically produces many atomic pages (commonly 5–25 pages) — do not collapse a source into a single file.
16
+ - **Maintenance**: Run the `wiki-lint` workflow (`.rnex/plugins/karpathy-llm/workflows/wiki-lint.md`) to validate paths, update `mentioned_in`, and preserve graph integrity.
17
+
18
+ ---
19
+
20
+ ## 2. Typed Frontmatter Relation Schema
21
+
22
+ Every page in `/wiki/` must maintain typed frontmatter relations:
23
+
24
+ ```yaml
25
+ ---
26
+ title: ""
27
+ tags: []
28
+ last_updated: YYYY-MM-DD
29
+ # Typed relation fields — paths relative to /wiki/
30
+ sources: [] # /raw/ files this page was derived from
31
+ related: [] # thematically related wiki pages
32
+ extends: [] # pages this one builds upon or specialises
33
+ contradicts: [] # pages with conflicting information
34
+ mentioned_in: [] # pages that link to this one (maintained by lint)
35
+ ---
36
+ ```
37
+
38
+ **Body Structure:**
39
+ - Concise summary of the concept.
40
+ - Key facts, definitions, or insights.
41
+ - Inline standard Markdown links (`[Label](./path.md)`) where contextually useful in prose.
42
+
43
+ The relation graph lives in frontmatter, not in prose links. Agents traverse the graph by reading frontmatter fields, not by scanning body text.
@@ -1,14 +1,14 @@
1
1
  name: karpathy-llm
2
- version: 0.4.0
2
+ version: 0.4.1
3
3
  description: Andrej Karpathy's agent behavioral principles, context engineering guidelines, and autonomous LLM Wiki knowledge architecture
4
4
  author: nu-nenoi
5
5
  homepage: https://github.com/nu-nenoi/repo-nexus
6
6
  rules:
7
- - rules/KARPATHY_RULES.md: .rnex/plugins/karpathy-llm/rules/KARPATHY_RULES.md
7
+ - rules/behavioral.md: .rnex/plugins/karpathy-llm/rules/behavioral.md
8
8
  - workflows/wiki-ingest.md: .rnex/plugins/karpathy-llm/workflows/wiki-ingest.md
9
9
  - workflows/wiki-lint.md: .rnex/plugins/karpathy-llm/workflows/wiki-lint.md
10
10
  instructions:
11
- - instructions/karpathy-llm.md: .rnex/plugins/karpathy-llm/instructions/karpathy-llm.md
11
+ - instructions/wiki-architecture.md: .rnex/plugins/karpathy-llm/instructions/wiki-architecture.md
12
12
  templates:
13
13
  - templates/index.md: wiki/index.md
14
14
  - templates/_log.md: wiki/_log.md
@@ -1,8 +1,8 @@
1
- # Karpathy LLM Agent Guidelines & Behavioral Principles
1
+ # Karpathy Coding Agent Behavioral Principles
2
2
 
3
3
  > "The delicate art and science of context engineering: filling the context window with just the right information for the next step." — Andrej Karpathy
4
4
 
5
- These guidelines provide standing operational instructions for AI coding assistants (Cursor, Claude Code, GitHub Copilot, Antigravity, Windsurf) working within multi-repository environments and managing Karpathy LLM Wiki knowledge bases.
5
+ These rules define standing behavioral principles for AI coding assistants (Cursor, Claude Code, GitHub Copilot, Antigravity, Windsurf) working in this workspace.
6
6
 
7
7
  ---
8
8
 
@@ -45,38 +45,3 @@ In a Repo Nexus workspace, independent repositories are organized into `./repos/
45
45
  3. **Context Economy:**
46
46
  - Do not redundantly read entire files or directory trees when targeted symbol lookups or line ranges suffice.
47
47
  - Rely on active workspace context, indexing, and compiled documentation rather than re-scanning raw files repeatedly.
48
-
49
- ---
50
-
51
- ## 3. Karpathy Wiki Rules
52
-
53
- When working in a repository with an active Karpathy LLM Wiki (`/wiki/` and `/raw/` directories):
54
-
55
- - **Intake**: All source material (articles, transcripts, docs, notes) goes to `/raw/` unmodified. Never write directly to `/wiki/` without ingesting.
56
- - **Orientation**: Before answering domain questions, read `/wiki/index.md` to find relevant pages, then read only those pages. If `hot.md` exists, read it first as a quick-orient step.
57
- - **Ingestion**: When files appear in `/raw/`, run the `wiki-ingest` workflow (`.rnex/workflows/wiki-ingest.md`). One source document typically produces many atomic pages (commonly 5–25 pages) — do not collapse a source into a single file.
58
- - **Maintenance**: Run the `wiki-lint` workflow (`.rnex/workflows/wiki-lint.md`) to validate paths, update `mentioned_in`, and preserve graph integrity.
59
-
60
- ---
61
-
62
- ## 4. Typed Frontmatter Relation Schema
63
-
64
- Every page in `/wiki/` must maintain typed frontmatter relations:
65
-
66
- ```yaml
67
- ---
68
- title: ""
69
- tags: []
70
- last_updated: YYYY-MM-DD
71
- # Typed relation fields — paths relative to /wiki/
72
- sources: [] # /raw/ files this page was derived from
73
- related: [] # thematically related wiki pages
74
- extends: [] # pages this one builds upon or specialises
75
- contradicts: [] # pages with conflicting information
76
- mentioned_in: [] # pages that link to this one (maintained by lint)
77
- ---
78
- ```
79
-
80
- **Body:** concise summary, key facts or insights, and inline standard Markdown links (`[Label](./path.md)`) where contextually useful in prose.
81
-
82
- The relation graph lives in frontmatter, not in prose links. Agents traverse the graph by reading frontmatter fields, not by scanning body text.
@@ -37,7 +37,7 @@
37
37
  ### ADR-001: Independent Git Repositories over Monorepo
38
38
  * **Date:** YYYY-MM-DD
39
39
  * **Decision:** Keep repositories completely independent without Git submodules. Orchestrate via Repo Nexus Virtual Meta-Repo.
40
- * **Consequences:** Autonomous CI/CD per repo; AI assistants maintain shared context via `AGENTS.md` and `KARPATHY_RULES.md`.
40
+ * **Consequences:** Autonomous CI/CD per repo; AI assistants maintain shared context via `AGENTS.md` and `behavioral.md`.
41
41
 
42
42
  ---
43
43
 
@@ -12,54 +12,23 @@ Do not hard-code any specific AI tool or harness into the wiki structure itself.
12
12
 
13
13
  ---
14
14
 
15
- ### Step 0 — Configuration (ask before creating any files)
16
-
17
- Ask ALL of the following questions and wait for answers:
18
-
19
- [Q1] Which AI agent instruction file should the wiki rules be written to?
20
- - In a Repo Nexus workspace: plugin instructions are maintained in separate instructions files (`.rnex/instructions/karpathy-llm.md` and `.rnex/rules/KARPATHY_RULES.md`). Agents read `rnex.yaml` to detect enabled plugins and read their separate instructions files.
21
- - In a standalone setup (outside Repo Nexus):
22
- - `AGENTS.md` (universal, works across most harnesses)
23
- - `CLAUDE.md` (Claude Code / Anthropic)
24
- - `.cursor/rules/wiki.mdc` (Cursor)
25
- - `.github/copilot-instructions.md` (GitHub Copilot)
26
- - `GEMINI.md` (Google Gemini / Antigravity)
27
- - `.windsurfrules` (Windsurf)
28
- - Other — specify path
29
- Append a `## Karpathy Wiki Rules` section to that file. Preserve all existing content.
30
-
31
- [Q2] What is this wiki for?
32
- - Research / reading list — articles, papers, PDFs on a topic
33
- - Personal second brain — meetings, notes, business context, personal projects
34
- - Content archive — transcripts, podcast notes, newsletters
35
- - Codebase knowledge — architecture decisions, runbooks, team conventions
36
- - Other (describe briefly)
37
-
38
- [Q3] How should the wiki be organized?
39
- - Flat — all pages at the top level of `/wiki/` (simpler, good default)
40
- - Structured — subfolders by category, chosen based on Q2 answer
41
- - Agent decides — infer structure from the first batch of ingested content
15
+ ### 1. Deterministic Scaffolding (Create Immediately)
42
16
 
43
- ---
44
-
45
- ### 1. Directories and Files
17
+ Initialize the fixed baseline directories and control files:
46
18
 
47
- **`/raw/`** — Append-only intake directory. All original source material goes here unmodified. Add `.gitkeep`.
19
+ - **`/raw/`** — Append-only intake directory. Add `.gitkeep`. All original source material goes here unmodified.
20
+ - **`/wiki/index.md`** — Master navigation index organizing links to atomic pages.
21
+ - **`/wiki/hot.md`** — Rolling ~500-word orientation cache for quick agent onboarding.
22
+ - **`/wiki/_log.md`** — Append-only operation log recording all ingest and lint runs.
48
23
 
49
- **`/wiki/`** — Curated knowledge base of atomic markdown pages. Structure per Q3:
50
- - Flat: all pages directly in `/wiki/`
51
- - Structured: subfolders matching the project type from Q2:
52
- - Research → `concepts/`, `people/`, `organizations/`, `sources/`, `analysis/`
53
- - Second brain → `projects/`, `people/`, `decisions/`, `logs/`
54
- - Content archive → `sources/`, `people/`, `tools/`, `concepts/`
55
- - Codebase → `architecture/`, `decisions/`, `runbooks/`, `people/`
24
+ Do not create arbitrary or speculative subdirectories during initialization. Scaffolding is 100% deterministic. Domain subfolders and categories emerge organically during the source ingestion phase (`wiki-ingest`).
56
25
 
57
- **`/wiki/index.md`** — Master navigation index. Contains:
58
- - Categorized links to every wiki page. Auto-maintained after every ingest and lint run.
26
+ ---
59
27
 
60
- **`/wiki/_log.md`** — Append-only operation log. Every ingest and lint run appends a timestamped entry.
28
+ ### 2. Agent Rules & Routing
61
29
 
62
- **`/wiki/hot.md`** *(create only for second brain or codebase wiki)* — Rolling ~500-word cache of the most recently relevant context. Lets an agent orient without reading the full wiki.
30
+ - **Repo Nexus Workspaces**: Scoped under `.rnex/plugins/karpathy-llm/` (`rules/behavioral.md` and `instructions/wiki-architecture.md`). Agents route through `rnex.yaml` automatically.
31
+ - **Standalone Repositories**: Append the `## Karpathy Wiki Rules` section (see Section 4) to the primary AI instructions file (`AGENTS.md`, `CLAUDE.md`, `.cursorrules`, etc.), preserving all existing content.
63
32
 
64
33
  ---
65
34
 
@@ -104,9 +73,9 @@ The relation graph lives in frontmatter, not in prose links. Agents traverse the
104
73
 
105
74
  ---
106
75
 
107
- ### 4. Agent Instructions
76
+ ### 4. Agent Instructions (Standalone Repositories)
108
77
 
109
- In the file chosen in Q1, append:
78
+ In standalone repositories (outside Repo Nexus), append:
110
79
 
111
80
  ```markdown
112
81
  ## Karpathy Wiki Rules
@@ -1,82 +0,0 @@
1
- # Karpathy LLM Agent Guidelines & Behavioral Principles
2
-
3
- > "The delicate art and science of context engineering: filling the context window with just the right information for the next step." — Andrej Karpathy
4
-
5
- These guidelines provide standing operational instructions for AI coding assistants (Cursor, Claude Code, GitHub Copilot, Antigravity, Windsurf) working within multi-repository environments and managing Karpathy LLM Wiki knowledge bases.
6
-
7
- ---
8
-
9
- ## 1. The Four Cardinal Principles
10
-
11
- ### Principle 1: Think Before Coding
12
- * **State Assumptions Explicitly:** Before implementing any non-trivial change, state your understanding of the problem, assumptions made, and proposed solution.
13
- * **Surface Trade-Offs:** If multiple approaches exist, outline the alternatives with their trade-offs before generating code.
14
- * **Verify Repository Boundaries:** In multi-repo workspaces, determine which member repositories are affected. Never make silent architectural assumptions that span across repo boundaries.
15
-
16
- ### Principle 2: Simplicity First
17
- * **Favor Readable Over Clever:** Write the simplest code that solves the immediate problem. Avoid unnecessary abstractions, speculative generics, and premature optimizations.
18
- * **Zero Boilerplate Bloat:** Do not introduce extra wrapper layers, helper classes, or framework-heavy patterns unless explicitly requested or required by existing codebase conventions.
19
- * **Less Code is Better Code:** If an existing utility, POSIX primitive, or library function does the job, reuse it.
20
-
21
- ### Principle 3: Surgical Changes
22
- * **Minimal Blast Radius:** Touch *only* the lines and files required to achieve the goal.
23
- * **Preserve Documentation & Comments:** Never delete or overwrite existing comments, documentation, or code structure unrelated to your changes.
24
- * **Zero Unintended Reformatting:** Avoid running blanket code formatters across entire files that create massive, unreadable git diffs. Keep diffs tight, focused, and reviewable.
25
-
26
- ### Principle 4: Goal-Driven Execution & Verification
27
- * **Define Success Criteria Upfront:** Know how you will prove that your change works before you write the first line of code.
28
- * **Verify with Automated Checks:** Run linters, unit tests, and build commands before declaring a task complete.
29
- * **Inspect the Diff:** Review your own git diff before committing or presenting the solution to ensure no extraneous changes were introduced.
30
-
31
- ---
32
-
33
- ## 2. Multi-Repo Context Engineering
34
-
35
- In a Repo Nexus workspace, independent repositories are organized into `./repos/<name>/` as autonomous Git repositories. Coding agents must follow these rules:
36
-
37
- 1. **Repository Boundaries:**
38
- - Edits made to `repos/<name>/` modify the underlying member repository directly.
39
- - Member repositories are independent projects. Do not introduce cross-repository source imports or shared runtime dependencies unless an explicit monorepo architecture is configured.
40
-
41
- 2. **Member .rnex Directory Routing:**
42
- - Member repositories may contain an `.rnex/` directory (e.g. `repos/<name>/.rnex/`) containing repository-specific documents, instructions, rules, workflows, and scripts. Coding assistants must inspect this directory for member-specific instructions.
43
- - Run git operations (commits, branches, pushes) directly within the respective member repository root (`repos/<name>/`).
44
-
45
- 3. **Context Economy:**
46
- - Do not redundantly read entire files or directory trees when targeted symbol lookups or line ranges suffice.
47
- - Rely on active workspace context, indexing, and compiled documentation rather than re-scanning raw files repeatedly.
48
-
49
- ---
50
-
51
- ## 3. Karpathy Wiki Rules
52
-
53
- When working in a repository with an active Karpathy LLM Wiki (`/wiki/` and `/raw/` directories):
54
-
55
- - **Intake**: All source material (articles, transcripts, docs, notes) goes to `/raw/` unmodified. Never write directly to `/wiki/` without ingesting.
56
- - **Orientation**: Before answering domain questions, read `/wiki/index.md` to find relevant pages, then read only those pages. If `hot.md` exists, read it first as a quick-orient step.
57
- - **Ingestion**: When files appear in `/raw/`, run the `wiki-ingest` workflow (`.rnex/workflows/wiki-ingest.md`). One source document typically produces many atomic pages (commonly 5–25 pages) — do not collapse a source into a single file.
58
- - **Maintenance**: Run the `wiki-lint` workflow (`.rnex/workflows/wiki-lint.md`) to validate paths, update `mentioned_in`, and preserve graph integrity.
59
-
60
- ---
61
-
62
- ## 4. Typed Frontmatter Relation Schema
63
-
64
- Every page in `/wiki/` must maintain typed frontmatter relations:
65
-
66
- ```yaml
67
- ---
68
- title: ""
69
- tags: []
70
- last_updated: YYYY-MM-DD
71
- # Typed relation fields — paths relative to /wiki/
72
- sources: [] # /raw/ files this page was derived from
73
- related: [] # thematically related wiki pages
74
- extends: [] # pages this one builds upon or specialises
75
- contradicts: [] # pages with conflicting information
76
- mentioned_in: [] # pages that link to this one (maintained by lint)
77
- ---
78
- ```
79
-
80
- **Body:** concise summary, key facts or insights, and inline standard Markdown links (`[Label](./path.md)`) where contextually useful in prose.
81
-
82
- The relation graph lives in frontmatter, not in prose links. Agents traverse the graph by reading frontmatter fields, not by scanning body text.