repo-nexus 0.7.1 → 0.7.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.
@@ -108,6 +108,9 @@ cmd_sync() {
108
108
  [ "$_sync_quiet" -eq 0 ] && log_ok "Upgraded workspace configuration and routing instructions to v$RNEX_VERSION"
109
109
  fi
110
110
 
111
+ # Dispatch before_sync plugin lifecycle hook
112
+ run_hook "before_sync" "$@"
113
+
111
114
  # 1. Ensure .gitignore ignores repos/, local configs; ensure .ignore has !repos/*
112
115
  reconcile_gitignore "$NEXUS_DIR"
113
116
 
@@ -184,6 +187,9 @@ cmd_sync() {
184
187
  # 10. Update sync stamp
185
188
  update_sync_stamp "$NEXUS_DIR"
186
189
 
190
+ # Dispatch after_sync plugin lifecycle hook
191
+ run_hook "after_sync" "$@"
192
+
187
193
  if [ "$_sync_quiet" -eq 0 ]; then
188
194
  log_ok "Sync complete — workspace, plugins, prompts, and member .rnex directories reconciled"
189
195
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-nexus",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
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",
@@ -88,8 +88,8 @@ RAW_DIR_VAL=$(grep -h -E '^\s*raw_dir:' "$RNEX_ROOT/rnex.yaml" "$RNEX_ROOT/.loca
88
88
  [ -z "$RAW_DIR_VAL" ] && RAW_DIR_VAL="$(get_cfg "raw_dir" "./docs")"
89
89
  RAW_DIR="${RAW_DIR_VAL:-./docs}"
90
90
 
91
- # Clear and sync the custom local raw folder files to raw intake (if any exist)
92
- if [ -d "$RNEX_ROOT/$RAW_DIR" ]; then
91
+ # Clear and sync custom local raw folder files to raw intake (skip if RAW_DIR is a documentation site)
92
+ if [ -d "$RNEX_ROOT/$RAW_DIR" ] && [ ! -d "$RNEX_ROOT/$RAW_DIR/.vitepress" ]; then
93
93
  _raw_abs="$(cd "$RNEX_ROOT/$RAW_DIR" 2>/dev/null && pwd -P || true)"
94
94
  _wiki_raw_abs="$(cd "$WIKI_RAW_DIR" 2>/dev/null && pwd -P || true)"
95
95
  if [ -n "$_raw_abs" ] && [ "$_raw_abs" != "$_wiki_raw_abs" ]; then
@@ -113,11 +113,33 @@ if [ -d "$RNEX_ROOT/$REPOS_DIR" ]; then
113
113
  [ ! -d "$repo_path" ] && continue
114
114
  repo_name=$(basename "$repo_path")
115
115
 
116
- # Ignore repos that are disabled locally (checking status state)
117
- # Checks if enabled: false exists for this repo in configuration
118
- if grep -A5 " $repo_name:" "$RNEX_ROOT/rnex.yaml" "$RNEX_ROOT/.local.rnex.yaml" 2>/dev/null | grep -q "enabled: false"; then
119
- continue
120
- fi
116
+ # Check if this repository is explicitly disabled in .local.rnex.yaml or rnex.yaml (block-scoped)
117
+ _is_disabled=""
118
+ for _cfg_file in "$RNEX_ROOT/.local.rnex.yaml" "$RNEX_ROOT/rnex.yaml"; do
119
+ [ -f "$_cfg_file" ] || continue
120
+ _en="$(awk -v repo="$repo_name" '
121
+ /^repos:[ ]*$/ || /^repos:[ ]*#/ { r=1; next }
122
+ r && /^[^ #]/ { r=0 }
123
+ r && match($0, "^ " repo ":[ ]*(#.*)?$") { in_target=1; next }
124
+ in_target && /^ [^ #]/ { in_target=0 }
125
+ in_target && match($0, "^ enabled:[ ]*") {
126
+ line = $0
127
+ sub("^ enabled:[ ]*", "", line)
128
+ sub(/[ ]*#.*$/, "", line)
129
+ gsub(/^["\x27]|["\x27]$/, "", line)
130
+ print line
131
+ exit
132
+ }
133
+ ' "$_cfg_file")"
134
+ if [ -n "$_en" ]; then
135
+ case "$(printf '%s' "$_en" | tr '[:upper:]' '[:lower:]')" in
136
+ false|no|0|disabled|off) _is_disabled=1 ;;
137
+ *) _is_disabled=0 ;;
138
+ esac
139
+ break
140
+ fi
141
+ done
142
+ [ "$_is_disabled" = "1" ] && continue
121
143
 
122
144
  # Read and sync any README file with case-insensitive check
123
145
  for readme_name in README.md readme.md README.markdown README; do
@@ -13,10 +13,11 @@ When an AI assistant is assigned a cross-repo or workspace-wide task, consult th
13
13
  - **Purpose**: Cross-repository health, git status, branch tracking, and configuration validation.
14
14
  - **When to use**: Auditing workspace status, verifying uncommitted changes, or syncing member repositories before releases.
15
15
 
16
- 3. **[`rnex-ingest.md`](./rnex-ingest.md)** (alias: [`rnex-wiki-ingest.md`](./rnex-wiki-ingest.md))
16
+ 3. **[`rnex-wiki-ingest.md`](./rnex-wiki-ingest.md)**
17
17
  - **Purpose**: Autonomous ingestion of intake materials from configured raw intake directory into atomic Karpathy LLM Wiki pages.
18
18
  - **When to use**: Decomposing research papers, documentation, transcripts, or specifications into the knowledge base.
19
19
 
20
- 4. **[`rnex-lint.md`](./rnex-lint.md)** (alias: [`rnex-wiki-lint.md`](./rnex-wiki-lint.md))
20
+ 4. **[`rnex-wiki-lint.md`](./rnex-wiki-lint.md)**
21
21
  - **Purpose**: Deterministic graph audit, dead link validation, `mentioned_in` backlink reconciliation, and index rebuild.
22
22
  - **When to use**: Routine wiki maintenance, pre-commit validation, or after adding/renaming wiki pages.
23
+
@@ -1,35 +1,16 @@
1
- # Cross-Repository Feature Implementation Workflow
1
+ # Operational Task: Cross-Repository Feature Implementation
2
2
 
3
- Use this prompt to guide the planning, execution, and verification of features spanning multiple member repositories in a Repo Nexus workspace.
3
+ You are tasked with planning, coordinating, and executing a feature spanning multiple member repositories in this Repo Nexus workspace.
4
4
 
5
- ---
5
+ ## Context & Inputs
6
+ - Target Scope: `repos/<name>/` directory trees
7
+ - Workspace Manifest: `rnex.yaml` and `.local.rnex.yaml`
8
+ - AI Instructions: `.rnex/ai-instructions.md`
6
9
 
7
- ## 1. Discovery & Scope Analysis
8
- 1. Inspect `.local.rnex.yaml` (if present) and `rnex.yaml` to identify active member repositories in `repos/<name>/`.
9
- 2. Inspect `repos/<name>/.rnex/` in each target repository for repo-specific architectural rules or constraints.
10
- 3. If `wiki/` is present, read `wiki/hot.md` and `wiki/index.md` to orient on existing domain contracts and data models.
11
- 4. Clearly define the interface contract or boundary change between repositories (e.g. API payload, shared type definitions, database schema).
10
+ ## Skill & Workflow Router
11
+ 1. Read the operational skill requirements in `.rnex/skills/rnex-cross-repo-feature/SKILL.md`.
12
+ 2. Follow the staged execution protocol strictly in `.rnex/workflows/rnex-cross-repo-feature.md`.
13
+ 3. Adhere to mandatory session startup, routing protocols, and member repo boundary rules in `.rnex/ai-instructions.md`.
14
+ 4. Do NOT execute uncompiled heuristics or perform unguided exploratory codebase scans.
12
15
 
13
- ## 2. Staged Implementation Plan
14
- 1. Order repository changes by dependency hierarchy (e.g. backend / shared models first, frontend / consumers second).
15
- 2. For each member repository:
16
- - Identify specific files to modify.
17
- - Check member repo test suite requirements.
18
-
19
- ## 3. Execution
20
- 1. Perform file modifications directly in the target `repos/<name>/` directory trees.
21
- 2. Maintain documentation and type integrity across boundary contracts.
22
- 3. Verify changes locally within each modified repository using `rnex exec` or targeted test runners:
23
- ```sh
24
- rnex exec npm test
25
- # or targeted:
26
- cd repos/<name> && npm test
27
- ```
28
-
29
- ## 4. Git & Commit Hygiene
30
- 1. Member repositories are autonomous Git repositories:
31
- - Commit changes independently within each member repository root:
32
- ```sh
33
- cd repos/<name> && git add -A && git commit -m "feat: <description>"
34
- ```
35
- - Never commit member repository source code directly to the Repo Nexus workspace root.
16
+ Execute the referenced workflow across affected member repositories. Maintain boundary contracts, run targeted test suites, and commit changes independently within each member repository root.
@@ -1,14 +1,18 @@
1
- # Operational Task: Ingest New Material
1
+ # Operational Task: Karpathy LLM Wiki Ingestion
2
2
 
3
- You are tasked with executing the ingestion and atomic break-down workflow.
3
+ You are tasked with executing the knowledge ingestion and atomic decomposition workflow for the Karpathy LLM Wiki.
4
4
 
5
5
  ## Context & Inputs
6
- - Source files location: `.rnex/wiki/raw/` (inclusive of active member repo `README_*.md` files)
7
- - Goal: Deconstruct files into individual interlinked pages in `.rnex/wiki/`.
6
+ - Target Scope: Curated wiki directory (`wiki_dir`, default: `.rnex/wiki/`)
7
+ - Intake Sources: Configured raw intake directory (`raw_dir`, default: `./docs`) and synchronized member repository READMEs
8
+ - Workspace Manifest: `rnex.yaml` and `.local.rnex.yaml`
9
+ - AI Instructions: `.rnex/ai-instructions.md`
8
10
 
9
- ## Workflow & Guidelines Router
10
- 1. Read the strict ingest steps and verification metrics only from `.rnex/plugins/karpathy-llm/workflows/wiki-ingest.md`.
11
- 2. Follow styling, structural, and behavioral constraints inside `.rnex/plugins/karpathy-llm/rules/behavioral.md`.
12
- 3. Adhere to global instruction patterns in `.rnex/ai-instructions.md`.
11
+ ## Skill & Workflow Router
12
+ 1. Read the operational skill requirements in `.rnex/plugins/karpathy-llm/skills/rnex-wiki-ingest/SKILL.md`.
13
+ 2. Follow the atomic decomposition and ingestion protocol strictly in `.rnex/plugins/karpathy-llm/workflows/rnex-wiki-ingest.md`.
14
+ 3. Follow architectural and behavioral constraints in `.rnex/plugins/karpathy-llm/rules/rnex-behavioral.md`.
15
+ 4. Adhere to mandatory session startup, routing protocols, and global rules in `.rnex/ai-instructions.md`.
16
+ 5. Do NOT invent new frontmatter schemas, skip atomic decomposition, or alter source materials directly.
13
17
 
14
- Transform unmodified raw documents on ingestion following exactly the referenced workflow. Do not use inline logic or generate outside explicit instructions. Run 'wiki-lint' upon completion to review accuracy. Update Operation Log (`.rnex/wiki/_log.md`).
18
+ Decompose intake documents into atomic, interlinked wiki pages with typed frontmatter relations. Update the master index and append a timestamped entry to the operation log.
@@ -1,15 +1,17 @@
1
- # Operational Task: Workspace Wiki Lint & Audit
1
+ # Operational Task: Karpathy LLM Wiki Lint & Graph Audit
2
2
 
3
- You are tasked with executing the Workspace Wiki Lint workflow.
3
+ You are tasked with auditing graph integrity, validating bidirectional relations, and repairing links for the Karpathy LLM Wiki.
4
4
 
5
5
  ## Context & Inputs
6
- - Target Scope: `.rnex/wiki/` (including `.rnex/wiki/raw/` and synchronized member READMEs)
7
- - Custom Rules & Workflows loaded: `.rnex/plugins/karpathy-llm/`
8
- - Current Workspace Manifest: `rnex.yaml` and `.local.rnex.yaml`
6
+ - Target Scope: Curated wiki directory (`wiki_dir`, default: `.rnex/wiki/`)
7
+ - Workspace Manifest: `rnex.yaml` and `.local.rnex.yaml`
8
+ - AI Instructions: `.rnex/ai-instructions.md`
9
9
 
10
- ## Verification Rule Router
11
- 1. Locate and parse your validation instructions exclusively from `.rnex/plugins/karpathy-llm/workflows/wiki-lint.md`.
12
- 2. Evaluate adherence based on the agent behavior standards described in `.rnex/plugins/karpathy-llm/rules/behavioral.md` and compiled rules in `.rnex/ai-instructions.md`.
13
- 3. Do NOT invent new lint checks or execute uncompiled heuristic instructions.
10
+ ## Skill & Workflow Router
11
+ 1. Read the operational skill requirements in `.rnex/plugins/karpathy-llm/skills/rnex-wiki-lint/SKILL.md`.
12
+ 2. Follow the multi-step audit and graph reconciliation protocol in `.rnex/plugins/karpathy-llm/workflows/rnex-wiki-lint.md`.
13
+ 3. Follow architectural and behavioral constraints in `.rnex/plugins/karpathy-llm/rules/rnex-behavioral.md`.
14
+ 4. Adhere to mandatory session startup, routing protocols, and global rules in `.rnex/ai-instructions.md`.
15
+ 5. Do NOT invent new lint checks or execute uncompiled heuristic instructions.
14
16
 
15
- Execute the 10-step protocol defined strictly within the referenced workflow. Audit `raw_dir` items, link paths, index categorization, and relational YAML frontmatter. Provide your structured audit and write feedback output to the Audit trail in `.rnex/wiki/_log.md`.
17
+ Execute the referenced lint workflow across all wiki pages. Validate frontmatter relation filepaths, recompute `mentioned_in` backlinks, identify orphan pages, reconcile the master index, and record findings in the operation log.
@@ -1,34 +1,16 @@
1
- # Repo Nexus Workspace Audit Workflow
1
+ # Operational Task: Workspace Configuration & Health Audit
2
2
 
3
- Use this prompt to audit workspace configuration integrity, member repository git statuses, and active plugin states.
3
+ You are tasked with executing a comprehensive audit of the Repo Nexus workspace configuration, member repository git statuses, and active plugin states.
4
4
 
5
- ---
5
+ ## Context & Inputs
6
+ - Target Scope: Root workspace configuration, `.rnex/`, and active member repositories in `repos/<name>/`
7
+ - Workspace Manifest: `rnex.yaml` and `.local.rnex.yaml`
8
+ - AI Instructions: `.rnex/ai-instructions.md`
6
9
 
7
- ## 1. Configuration & Health Audit
8
- 1. Run `rnex status` to inspect:
9
- - Configuration files (`rnex.yaml` and `.local.rnex.yaml`).
10
- - Main AI instructions file existence and routing markers.
11
- - VS Code / Cursor `.code-workspace` synchronization.
12
- - Git ignore status for `repos/`, `.rnex/`, and local overrides.
13
- - Active plugins and member repository registry.
10
+ ## Skill & Workflow Router
11
+ 1. Read the operational skill requirements in `.rnex/skills/rnex-workspace-audit/SKILL.md`.
12
+ 2. Follow the multi-step audit and remediation protocol in `.rnex/workflows/rnex-workspace-audit.md`.
13
+ 3. Adhere to mandatory session startup, routing protocols, and member repo boundary rules in `.rnex/ai-instructions.md`.
14
+ 4. Do NOT execute uncompiled heuristics or alter workspace configuration outside the referenced workflow.
14
15
 
15
- ## 2. Multi-Repository Git Status Audit
16
- 1. Check working tree cleanliness across all active member repositories:
17
- ```sh
18
- rnex exec git status -s
19
- ```
20
- 2. Check branch tracking and unpushed/unpulled commits:
21
- ```sh
22
- rnex exec git status -uno
23
- ```
24
- 3. Report any detached HEADs, uncommitted modifications, or untracked changes.
25
-
26
- ## 3. Reconciliation & Remediation
27
- 1. If any configuration issues, missing directories, or unlinked plugin assets are detected, run:
28
- ```sh
29
- rnex status --fix
30
- ```
31
- 2. If member repositories declared in `rnex.yaml` are missing on disk, run:
32
- ```sh
33
- rnex clone
34
- ```
16
+ Execute the audit according to the referenced workflow and report configuration integrity, working tree cleanliness, and active plugin health.
@@ -1,47 +0,0 @@
1
- # Karpathy Coding Agent 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 rules define standing behavioral principles for AI coding assistants (Cursor, Claude Code, GitHub Copilot, Antigravity, Windsurf) working in this workspace.
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 autonomous 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.
@@ -1,66 +0,0 @@
1
- # Wiki Ingestion Workflow (`wiki-ingest`)
2
-
3
- Universal workflow for decomposing and ingesting raw source materials into atomic Karpathy LLM Wiki pages.
4
-
5
- ---
6
-
7
- ## Ingestion Protocol
8
-
9
- 1. **Resolve Configuration & Scan Intake:**
10
- - Read `rnex.yaml` (and `.local.rnex.yaml` if present) to resolve the active `raw_dir` (default: `./docs`) and `wiki_dir` (default: `.rnex/wiki`) under `plugins.karpathy-llm`.
11
- - Scan `<raw_dir>/` (default: `./docs`) for source materials (articles, transcripts, documents, research notes, meeting logs) not yet recorded in `<wiki_dir>/_log.md` (default: `.rnex/wiki/_log.md`).
12
- - All source material must reside in `<raw_dir>/` unmodified. Never write directly to `<wiki_dir>/` without ingesting.
13
-
14
- 2. **Read & Clarify:**
15
- - Read each source fully.
16
- - If scope, domain boundaries, target audience, or level of detail is unclear, ask one round of clarifying questions before proceeding.
17
-
18
- 3. **Atomic Decomposition:**
19
- - Decompose each source into atomic wiki pages — **one per distinct concept, person, organization, event, or theme** (or architecture decision/contract).
20
- - A single source document commonly produces **5–25 pages**. Never collapse an entire source into a single file.
21
- - Place pages according to workspace wiki organization:
22
- - **Flat:** directly under `<wiki_dir>/` (e.g., `<wiki_dir>/<topic>.md`)
23
- - **Structured:** in categorical subfolders within `<wiki_dir>/`:
24
- - Research → `concepts/`, `people/`, `organizations/`, `sources/`, `analysis/`
25
- - Second brain → `projects/`, `people/`, `decisions/`, `logs/`
26
- - Content archive → `sources/`, `people/`, `tools/`, `concepts/`
27
- - Codebase → `architecture/`, `decisions/`, `runbooks/`, `people/`
28
-
29
- 4. **Frontmatter Relations:**
30
- - For each page, write the required YAML frontmatter with typed relations:
31
- ```yaml
32
- ---
33
- title: ""
34
- tags: []
35
- last_updated: YYYY-MM-DD
36
- # Typed relation fields — paths relative to <wiki_dir>/ (or workspace root for raw sources)
37
- sources: [] # <raw_dir>/ files this page was derived from
38
- related: [] # thematically related wiki pages
39
- extends: [] # pages this one builds upon or specialises
40
- contradicts: [] # pages with conflicting information
41
- mentioned_in: [] # pages that link to this one (leave empty; maintained by lint)
42
- ---
43
- ```
44
- - **Crucial:** The relation graph lives in frontmatter, not in prose links. Agents traverse the graph by reading frontmatter fields, not by scanning body text.
45
-
46
- 5. **Author Concise Body:**
47
- - Write a concise body with summary, key facts, and insights.
48
- - Add inline standard Markdown links (`[Label](./path.md)`) where contextually useful in prose.
49
-
50
- 6. **Update Navigation Index (Annotated Links):**
51
- - Update `<wiki_dir>/index.md` (default: `.rnex/wiki/index.md`) with links to all new pages in their corresponding categorized sections.
52
- - Include a concise 1-line summary next to each link (e.g. `- [Concept Name](path.md): One-line summary of role or contract`) so agents pinpoint target pages in a single read without exploratory scanning.
53
-
54
- 7. **Update Hot Cache (Bounded ~500-Word Ceiling):**
55
- - Update `<wiki_dir>/hot.md` (default: `.rnex/wiki/hot.md`) with the rolling orientation summary across 3 structured sections:
56
- 1. **Architecture & Member Repo Map**: Active domain ownership per member repo.
57
- 2. **Current Focus & Recent Ingests**: Active topics from recent ingests.
58
- 3. **Key Contracts & Boundaries**: Critical cross-repo or subsystem rules.
59
- - **Enforce Token Economy**: Keep `<wiki_dir>/hot.md` strictly under ~500 words. Condense or prune older focus items to prevent bloat.
60
-
61
- 8. **Append Operation Log:**
62
- - Append a timestamped entry to `<wiki_dir>/_log.md` (default: `.rnex/wiki/_log.md`) detailing:
63
- - Date & time
64
- - Raw intake file processed
65
- - List of atomic pages generated
66
- - Any flagged follow-ups or knowledge gaps
@@ -1,50 +0,0 @@
1
- # Wiki Lint & Maintenance Workflow (`wiki-lint`)
2
-
3
- Periodic health check and maintenance workflow to preserve wiki graph integrity, validate typed relations, recompute bidirectional links, resolve knowledge gaps, and rebuild indexes.
4
-
5
- ---
6
-
7
- ## Lint & Maintenance Protocol
8
-
9
- 1. **Resolve Configuration & Verify Paths:**
10
- - Read `rnex.yaml` (and `.local.rnex.yaml` if present) to resolve the active `wiki_dir` (default: `.rnex/wiki`) and `raw_dir` (default: `./docs`) under `plugins.karpathy-llm`.
11
- - For every page under `<wiki_dir>/`, verify that all paths in frontmatter relation fields (`related`, `extends`, `contradicts`, `sources`) resolve to existing files under `<wiki_dir>/` or `<raw_dir>/`.
12
- - Fix or flag broken paths.
13
-
14
- 2. **Recompute `mentioned_in`:**
15
- - Recompute `mentioned_in` for every page under `<wiki_dir>/` by scanning all other pages' relation fields and inline links.
16
- - Update the field in frontmatter.
17
-
18
- 3. **Find Orphaned Pages:**
19
- - Detect pages under `<wiki_dir>/` not reachable from `<wiki_dir>/index.md` or any `mentioned_in` field.
20
- - Add them to the index in their appropriate category.
21
-
22
- 4. **Detect Duplicate or Overlapping Pages:**
23
- - Detect duplicate or heavily overlapping pages.
24
- - Consolidate and update relations across the wiki graph.
25
-
26
- 5. **Check Factual Inconsistencies:**
27
- - Check for factual inconsistencies between pages in `contradicts` relations or covering the same topic.
28
- - Clarify or resolve contradictions.
29
-
30
- 6. **Identify Knowledge Gaps:**
31
- - Identify knowledge gaps: concepts referenced in relation fields or prose but lacking their own atomic page.
32
- - Create stub pages or flag for future ingest.
33
-
34
- 7. **Suggest Source Candidates:**
35
- - Suggest source candidates from `<raw_dir>/` or external searches to fill identified knowledge gaps.
36
-
37
- 8. **Rebuild Navigation Index (Annotated Links):**
38
- - Rebuild `<wiki_dir>/index.md` (default: `.rnex/wiki/index.md`) to reflect the current set of pages and categories accurately.
39
- - Ensure every page entry maintains a concise 1-line descriptive annotation.
40
-
41
- 9. **Update Hot Cache (Bounded ~500-Word Ceiling):**
42
- - Refresh `<wiki_dir>/hot.md` (default: `.rnex/wiki/hot.md`), verifying the 3 structured sections (Architecture & Repo Map, Current Focus, Key Contracts).
43
- - Ensure the total length remains strictly under ~500 words by pruning superseded entries.
44
-
45
- 10. **Append Operation Log:**
46
- - Append a lint summary to `<wiki_dir>/_log.md` (default: `.rnex/wiki/_log.md`) detailing:
47
- - Broken links fixed or flagged
48
- - `mentioned_in` updates
49
- - Orphans and duplicates resolved
50
- - Gaps identified or stubbed
@@ -1,14 +0,0 @@
1
- # Operational Task: Ingest New Material
2
-
3
- You are tasked with executing the ingestion and atomic break-down workflow.
4
-
5
- ## Context & Inputs
6
- - Source files location: `.rnex/wiki/raw/` (inclusive of active member repo `README_*.md` files)
7
- - Goal: Deconstruct files into individual interlinked pages in `.rnex/wiki/`.
8
-
9
- ## Workflow & Guidelines Router
10
- 1. Read the strict ingest steps and verification metrics only from `.rnex/plugins/karpathy-llm/workflows/wiki-ingest.md`.
11
- 2. Follow styling, structural, and behavioral constraints inside `.rnex/plugins/karpathy-llm/rules/behavioral.md`.
12
- 3. Adhere to global instruction patterns in `.rnex/ai-instructions.md`.
13
-
14
- Transform unmodified raw documents on ingestion following exactly the referenced workflow. Do not use inline logic or generate outside explicit instructions. Run 'wiki-lint' upon completion to review accuracy. Update Operation Log (`.rnex/wiki/_log.md`).
@@ -1,15 +0,0 @@
1
- # Operational Task: Workspace Wiki Lint & Audit
2
-
3
- You are tasked with executing the Workspace Wiki Lint workflow.
4
-
5
- ## Context & Inputs
6
- - Target Scope: `.rnex/wiki/` (including `.rnex/wiki/raw/` and synchronized member READMEs)
7
- - Custom Rules & Workflows loaded: `.rnex/plugins/karpathy-llm/`
8
- - Current Workspace Manifest: `rnex.yaml` and `.local.rnex.yaml`
9
-
10
- ## Verification Rule Router
11
- 1. Locate and parse your validation instructions exclusively from `.rnex/plugins/karpathy-llm/workflows/wiki-lint.md`.
12
- 2. Evaluate adherence based on the agent behavior standards described in `.rnex/plugins/karpathy-llm/rules/behavioral.md` and compiled rules in `.rnex/ai-instructions.md`.
13
- 3. Do NOT invent new lint checks or execute uncompiled heuristic instructions.
14
-
15
- Execute the 10-step protocol defined strictly within the referenced workflow. Audit `raw_dir` items, link paths, index categorization, and relational YAML frontmatter. Provide your structured audit and write feedback output to the Audit trail in `.rnex/wiki/_log.md`.