repo-nexus 0.3.5 → 0.4.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/README.md CHANGED
@@ -4,16 +4,18 @@
4
4
  [![npm version](https://img.shields.io/npm/v/repo-nexus.svg)](https://www.npmjs.com/package/repo-nexus)
5
5
  [![License: MIT](https://img.shields.io/github/license/nu-nenoi/repo-nexus)](LICENSE)
6
6
  [![POSIX Compatible](https://img.shields.io/badge/POSIX-compatible-success)](#)
7
- [![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux-lightgrey)](#)
7
+ [![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey)](#)
8
8
  [![FAQ](https://img.shields.io/badge/docs-FAQ-blue.svg)](docs/FAQ.md)
9
9
 
10
- A **simple, lightweight companion tool** for multi-repo workflows. It links multiple independent repositories and shares universal AI instructions (like `AGENTS.md`) using standard Unix symlinks **without Git submodules, monorepo migrations, or complex setup**.
10
+ A **simple, lightweight Virtual Meta-Repo companion** for multi-repo workspaces and shared AI context. It organizes independent repositories into a unified workspace and shares lean routing instructions (`AGENTS.md`) **without Git submodules, monorepo migrations, or symlink fragility**.
11
11
 
12
- - **No Git Submodules or Nested Git Friction**: Keep your repositories completely independent. No detached HEADs, no `.gitmodules`, and no merge conflicts between repos.
13
- - **A Lean Companion, Not a Workspace Replacer**: It does not replace your editor, terminal, build tools, or package manager. It is a tiny (~20 KB) helper that seamlessly complements your existing workflow.
14
- - **Unified Workspace for AI Coding Assistants**: Open one folder to give Cursor, Claude Code, GitHub Copilot, or Antigravity complete cross-repo visibility.
15
- - **Single Source of Truth for AI Guidelines**: Share and sync `AGENTS.md`, Copilot instructions (`.github/copilot-instructions.md`), Cursor rules (`.cursorrules`), Claude instructions (`CLAUDE.md`), and custom prompts across all projects.
16
- - **Zero Dependencies**: Pure POSIX shell CLI (`rnex`). Works out of the box with zero external runtimes required.
12
+ - **No Git Submodules or Nested Git Collisions**: Member repositories are physically cloned into `./repos/` and strictly ignored by workspace Git. Each repository maintains its own standalone history, remotes, branches, and commits with zero submodule friction.
13
+ - **Unified Workspace for AI Coding Assistants**: Open one root folder to give Cursor, Claude Code, GitHub Copilot, Codex, or Antigravity complete cross-service visibility.
14
+ - **Two-Level Configuration as Source of Truth**: Shared team manifest in `rnex.yaml` with machine-specific overrides in `.local.rnex.yaml` (highest priority).
15
+ - **1-Command Team Onboarding**: Teammates clone the meta-repo and run `rnex clone` to clone and configure all member repos in seconds.
16
+ - **Cross-Repo Batch Operations**: Run arbitrary commands across all active repositories with `rnex exec <command>`.
17
+ - **Scoped Plugins & Context Packs**: Modular plugin packages scoped under `.rnex/plugins/<plugin-name>/` with support for domain directories (e.g. `raw/` and `wiki/` for `karpathy-llm`).
18
+ - **Zero Dependencies**: Pure POSIX shell CLI (`rnex`). Works out of the box across macOS, Linux, and Windows (WSL/Git Bash).
17
19
 
18
20
  > 💡 **Have questions?** Check out the **[Frequently Asked Questions (FAQ)](docs/FAQ.md)** for architecture deep dives, Git workflows, and AI context strategies.
19
21
 
@@ -22,16 +24,15 @@ A **simple, lightweight companion tool** for multi-repo workflows. It links mult
22
24
  ## Table of Contents
23
25
 
24
26
  - [What Repo Nexus Is (and What It Isn't)](#what-repo-nexus-is-and-what-it-isnt)
25
- - [How It Works: The Two Symlink Flows](#how-it-works-the-two-symlink-flows)
27
+ - [How It Works: Virtual Meta-Repo Architecture](#how-it-works-virtual-meta-repo-architecture)
26
28
  - [Key Principles](#key-principles)
27
29
  - [Installation](#installation)
28
30
  - [Quick Start](#quick-start)
29
31
  - [Everyday Usage](#everyday-usage)
30
- - [Plugins & AI Context Packs](#plugins--ai-context-packs)
31
- - [Workspace Configuration (`rnex.yaml`)](#workspace-configuration-rnexyaml)
32
+ - [Plugins & Scoped Context Packs](#plugins--scoped-context-packs)
33
+ - [Two-Level Configuration (`rnex.yaml` & `.local.rnex.yaml`)](#two-level-configuration)
32
34
  - [CLI Command Reference](#cli-command-reference)
33
- - [Operating on External Workspaces via `--config`](#operating-on-external-workspaces-via---config)
34
- - [Supported AI Configuration Files](#supported-ai-configuration-files)
35
+ - [Shell Auto-Completion](#shell-auto-completion)
35
36
  - [Project Structure](#project-structure)
36
37
  - [Running Tests](#running-tests)
37
38
  - [Frequently Asked Questions (FAQ)](docs/FAQ.md)
@@ -43,30 +44,36 @@ A **simple, lightweight companion tool** for multi-repo workflows. It links mult
43
44
 
44
45
  | What It Is | What It Isn't |
45
46
  | :--- | :--- |
46
- | **A lightweight companion utility** (~20 KB POSIX script). | **NOT a replacement for your workspace or tools.** It doesn't replace VS Code, Cursor, JetBrains, or your terminal. |
47
- | **A simple symlink manager** that groups existing repos into one folder for convenience. | **NOT a build tool or monorepo orchestrator.** It doesn't manage builds or replace tools like Nx, Turborepo, Cargo, or Gradle. |
47
+ | **A lightweight companion utility** (~25 KB POSIX script). | **NOT a replacement for your workspace or tools.** It doesn't replace VS Code, Cursor, JetBrains, or your terminal. |
48
+ | **A Virtual Meta-Repo orchestrator** managing member clones in `./repos/`. | **NOT a build tool or monorepo orchestrator.** It doesn't replace tools like Nx, Turborepo, Cargo, or Gradle. |
48
49
  | **Zero Git friction.** Repositories remain normal, autonomous Git repos. | **NOT Git submodules or subtrees.** No `.gitmodules` files, no detached HEADs, no commit coordination lock-in. |
49
- | **Non-invasive.** If you delete the workspace, your repos remain completely untouched. | **NOT a proprietary platform.** No background daemons, no database, no vendor lock-in. |
50
+ | **Strictly encapsulated.** Internal rnex assets live exclusively in `.rnex/`. | **NOT invasive.** Member repositories remain clean; workspace-related context is isolated to `repos/<name>/.rnex/`. |
50
51
 
51
52
  ---
52
53
 
53
- ## How It Works: Zero-Touch Multi-Repo Architecture
54
+ ## How It Works: Virtual Meta-Repo Architecture
54
55
 
55
56
  ```
56
57
  ┌─────────────────────────────────────────────────────────────┐
57
- │ Repo Nexus Workspace Root │
58
+ │ Repo Nexus Workspace Root (Virtual Meta-Repo) │
58
59
  │ │
59
60
  │ my-workspace/ │
60
- │ repos/ │
61
- │ backend/ ──(symlink)──> ~/code/backend-api │
62
- │ frontend/ ──(symlink)──> ~/code/web-app │
63
- │ AGENTS.md (root universal AI instructions) │
64
- │ .rnex/ (plugins, rules, and workflows) │
65
- │ rnex.yaml (manifest: repos_dir, plugins, repos) │
61
+ │ .local.rnex.yaml (Highest Priority: local overrides) │
62
+ │ rnex.yaml (Team Manifest: repos & plugins) │
63
+ │ AGENTS.md (Routing-only AI agent instructions) │
64
+ │ .gitignore (Strictly ignores repos/ & local yaml) │
65
+ │ .rnex/ (Strictly encapsulated internal state) │
66
+ │ plugins/ (Scoped plugin directories) │
67
+ │ karpathy-llm/ (Isolated rules, workflows, templates) │
68
+ │ repos/ (Autonomous Physical Git Clones) │
69
+ │ backend/ (Own .git, branches, PRs) │
70
+ │ .rnex/ (Quarantined member-specific context) │
71
+ │ frontend/ (Own .git, branches, PRs) │
72
+ │ .rnex/ (Quarantined member-specific context) │
66
73
  │ │
67
- │ • Agent opens workspace → sees all repos in one tree. │
68
- │ • Edits through symlinks modify original files directly. │
69
- │ • Member repositories remain 100% clean and untouched. │
74
+ │ • Agent opens workspace → reads config first → sees stack. │
75
+ │ • Repos are 100% normal Git clones (zero submodules). │
76
+ │ • Work across repos seamlessly using rnex exec. │
70
77
  └─────────────────────────────────────────────────────────────┘
71
78
  ```
72
79
 
@@ -74,20 +81,20 @@ A **simple, lightweight companion tool** for multi-repo workflows. It links mult
74
81
 
75
82
  ## Key Principles
76
83
 
77
- 1. **No Git Submodules (Complete Repository Autonomy)**:
78
- Member repositories are never converted into Git submodules or subtrees. Each repository keeps its own standalone Git history, remotes, branches, and commits. `rnex` simply links them on your local filesystem.
84
+ 1. **Configuration as Single Source of Truth**:
85
+ Every agent workflow and command starts by reading the configuration files. `.local.rnex.yaml` takes **highest priority** over `rnex.yaml`.
79
86
 
80
- 2. **Symlink Write-Through**:
81
- Symlinks are transparent pointers resolved by your OS. When you or an AI agent edit `repos/backend/src/index.ts`, the OS resolves the link and writes directly to the source repository on disk.
87
+ 2. **No Git Submodules (Complete Repository Autonomy)**:
88
+ Member repositories are cloned directly into `./repos/<name>`. The root workspace `.gitignore` ignores `repos/`, ensuring the workspace repository never tracks or interferes with member Git histories, remotes, branches, or commits.
82
89
 
83
- 3. **Clean Member Repositories & Dedicated `.rnex/` Scope**:
84
- Member repository roots remain clean and unpolluted. By default, `rnex` creates a dedicated `.rnex/` directory in each member repo (`repos/<name>/.rnex/`) to isolate all Repo Nexus documents, instructions, rules, workflows, and scripts. This setting is configurable per repository (`rnex_dir: true|false`) and can be disabled to leave a member repo 100% untouched.
90
+ 3. **Enabled by Default with Two-Level Merging**:
91
+ Member repositories are enabled by default. Developers can selectively disable specific repositories locally in `.local.rnex.yaml` (`enabled: false`) without mutating the shared `rnex.yaml`. Disabled repositories are skipped by `clone` and `exec`.
85
92
 
86
- 4. **Multi-Repo AI Context Discovery**:
87
- Root `AGENTS.md` and `.rnex/` govern workspace-wide AI assistant behavior, while AI tools operating at the workspace level inspect `repos/<name>/.rnex/` for member-specific instructions without cluttering root codebases.
93
+ 4. **Routing-Only Top-Level AI Instructions**:
94
+ `AGENTS.md` (and related top-level instruction files) contains no inlined plugin rules or tool boilerplate. It acts solely as a lean navigation router directing AI agents to configuration files, scoped plugins, and member `.rnex/` contexts.
88
95
 
89
- 5. **Dynamic Workspace Scope**:
90
- Easily show or hide member repos from the active workspace without modifying disk contents.
96
+ 5. **Strict File Encapsulation**:
97
+ All `rnex`-managed internal files live exclusively in `.rnex/`. Member repositories isolate Repo Nexus assets in `repos/<name>/.rnex/`.
91
98
 
92
99
  ---
93
100
 
@@ -113,22 +120,12 @@ wget -qO- https://raw.githubusercontent.com/nu-nenoi/repo-nexus/main/scripts/ins
113
120
 
114
121
  ### Option 3: Native Installer (Clone & Install)
115
122
 
116
- Clone the repository and run the built-in installer:
117
-
118
123
  ```bash
119
124
  git clone https://github.com/nu-nenoi/repo-nexus.git
120
125
  cd repo-nexus
121
126
  ./rnex install
122
127
  ```
123
- *(Installs `rnex` and `repo-nexus` symlinks into `~/.local/bin`, or pass a custom directory like `./rnex install /usr/local/bin`)*
124
-
125
- ### Option 4: Shell Alias
126
-
127
- Add to your `~/.zshrc` or `~/.bashrc`:
128
- ```bash
129
- alias rnex="/path/to/repo-nexus/rnex"
130
- alias repo-nexus="/path/to/repo-nexus/rnex"
131
- ```
128
+ *(Installs `rnex` and `repo-nexus` into `~/.local/bin`, or pass a custom directory like `./rnex install /usr/local/bin`)*
132
129
 
133
130
  ---
134
131
 
@@ -139,55 +136,66 @@ alias repo-nexus="/path/to/repo-nexus/rnex"
139
136
  mkdir my-workspace && cd my-workspace
140
137
  rnex init
141
138
 
142
- # 2. Register repositories
143
- rnex add backend ~/code/backend-api
144
- rnex add frontend ../web-app # relative paths work too
139
+ # 2. Register and clone repositories
140
+ rnex add backend git@github.com:myorg/backend-api.git
141
+ rnex add frontend https://github.com/myorg/web-app.git
145
142
 
146
143
  # 3. Check workspace health
147
144
  rnex status
145
+
146
+ # 4. Run a batch command across all member repos
147
+ rnex exec git status -s
148
148
  ```
149
149
 
150
- During `rnex init`, the CLI creates `rnex.yaml` if none exists for the directory, and merges Repo Nexus workspace instructions with any existing AI instructions (such as `AGENTS.md`, `CLAUDE.md`, `.cursorrules`).
150
+ When a teammate clones your workspace, they simply run:
151
+ ```bash
152
+ rnex clone
153
+ ```
154
+ All declared member repositories are cloned and wired up automatically!
151
155
 
152
156
  ---
153
157
 
154
158
  ## Everyday Usage
155
159
 
156
160
  ```bash
157
- # Register a repository (links into scope & initializes member .rnex/ directory)
158
- rnex add my-app ~/code/my-app
161
+ # Register and clone a repository
162
+ rnex add backend git@github.com:myorg/backend.git
159
163
 
160
- # Register a repository with .rnex/ disabled (100% untouched)
161
- rnex add --no-rnex-dir my-app ~/code/my-app
164
+ # Register a repository in local config only (.local.rnex.yaml)
165
+ rnex add --local analytics git@github.com:myorg/analytics.git
162
166
 
163
- # Inspect workspace health, active repos, and .rnex status
164
- rnex status
167
+ # Clone all missing member repositories
168
+ rnex clone
165
169
 
166
- # List all registered repositories with scope and .rnex status
167
- rnex list
170
+ # Run a command across all active repositories
171
+ rnex exec git status -s
172
+ rnex exec npm test
168
173
 
169
- # Toggle .rnex directory integration for a member repo
170
- rnex rnex-dir disable my-app
171
- rnex rnex-dir enable my-app
174
+ # Disable a repository (skipped by clone, exec, and agents)
175
+ rnex disable analytics
176
+ rnex disable --local analytics # disable locally without modifying team rnex.yaml
172
177
 
173
- # Temporarily hide a repo from active indexing/agent scope
174
- rnex hide my-app
178
+ # Re-enable a repository
179
+ rnex enable analytics
175
180
 
176
- # Restore a hidden repo back to active scope
177
- rnex show my-app
181
+ # List all registered repositories with clone status and active branch
182
+ rnex list
183
+
184
+ # Inspect workspace health, active repos, and plugin status
185
+ rnex status
178
186
 
179
- # Reconcile and fix all scope links, plugins, and member .rnex/ directories (alias: sync)
187
+ # Reconcile workspace, plugins, and member .rnex/ directories (alias: sync)
180
188
  rnex fix
181
189
 
182
- # Unregister a repository (removes scope link & member .rnex assets)
183
- rnex remove my-app
190
+ # Unregister and delete a repository
191
+ rnex remove analytics
184
192
  ```
185
193
 
186
194
  ---
187
195
 
188
- ## Plugins & AI Context Packs
196
+ ## Plugins & Scoped Context Packs
189
197
 
190
- Repo Nexus features a zero-dependency plugin architecture. Plugins package curated AI instructions, agent behavioral rules, and architecture templates that are automatically synchronized into member repositories via symlinks.
198
+ Repo Nexus features a scoped plugin architecture. Plugins package curated AI instructions, agent behavioral rules, and architecture templates that are synchronized into dedicated directories under `.rnex/plugins/<plugin-name>/`.
191
199
 
192
200
  ```bash
193
201
  # List available and active plugins
@@ -196,75 +204,70 @@ rnex plugin list
196
204
  # Inspect plugin details and provided files
197
205
  rnex plugin info karpathy-llm
198
206
 
199
- # Enable a plugin across your workspace
207
+ # Enable a plugin in your workspace
200
208
  rnex plugin enable karpathy-llm
201
209
 
202
- # Disable a plugin and clean up injected files
210
+ # Disable a plugin and clean up scoped assets
203
211
  rnex plugin disable karpathy-llm
204
212
  ```
205
213
 
206
214
  ### Built-in Plugin: `karpathy-llm`
207
- The `karpathy-llm` plugin packages Andrej Karpathy's verified LLM agent design patterns, context engineering principles, and the autonomous **Karpathy LLM Wiki** architecture (based on [`setup-karpathy-wiki.md`](https://github.com/nu-nenoi/ai-toolkit/blob/main/prompts/setup-karpathy-wiki.md), available locally in `toolkit/prompts/setup-karpathy-wiki.md`):
208
- * **Step 0 — Configuration Interview:** Guides setup decisions including target agent instruction file (`AGENTS.md`, `CLAUDE.md`, `.cursor/rules/wiki.mdc`, etc.), wiki purpose (codebase, second brain, research, content archive), organization layout (flat vs structured), and automation enablement.
209
- * **The 4 Cardinal Agent Rules** (`.rnex/rules/KARPATHY_RULES.md`):
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`):
210
217
  1. *Think Before Coding:* Formulate explicit assumptions, boundary checks, and trade-offs before writing code.
211
218
  2. *Simplicity First:* Minimal abstractions, readable implementations, zero speculative boilerplate.
212
219
  3. *Surgical Changes:* Minimal blast radius, preserved comments/docstrings, and tight diffs.
213
220
  4. *Goal-Driven Execution:* Upfront verification criteria, automated tests, and diff inspection.
214
- * **Autonomous Karpathy LLM Wiki Knowledge Architecture:**
221
+ * **Autonomous Karpathy LLM Wiki Architecture:**
215
222
  * **Intake (`/raw/`):** Append-only intake for unmodified source documents.
216
- * **Curated Knowledge Base (`/wiki/`):** Interlinked atomic markdown pages with typed YAML frontmatter relations (`sources`, `related`, `extends`, `contradicts`, `mentioned_in`).
223
+ * **Curated Knowledge Base (`/wiki/`):** Interlinked atomic markdown pages with typed YAML frontmatter relations.
217
224
  * **Navigation Index (`/wiki/index.md`):** Master categorized navigation index.
218
225
  * **Rolling Context (`/wiki/hot.md`):** ~500-word quick-orient context cache for AI agents.
219
226
  * **Operation Log (`/wiki/_log.md`):** Append-only audit trail of ingest and lint operations.
220
- * **Standardized Workflows (`.rnex/workflows/`):**
221
- * `wiki-ingest.md`: 8-step protocol decomposing raw source documents into 5–25 atomic wiki pages.
222
- * `wiki-lint.md`: 10-step protocol validating paths, recomputing `mentioned_in`, removing orphans, resolving contradictions, identifying gaps, suggesting source candidates, and rebuilding indexes.
227
+ * **Standardized Workflows (`.rnex/plugins/karpathy-llm/workflows/`):**
228
+ * `wiki-ingest.md`: 8-step protocol decomposing raw source documents into atomic wiki pages.
229
+ * `wiki-lint.md`: 10-step protocol validating paths, relations, contradictions, and indexing.
223
230
 
224
231
  ---
225
232
 
226
233
  ## Two-Level Configuration
227
234
 
228
- Repo Nexus supports a two-level configuration model:
229
- 1. **Repo Config (`rnex.yaml`):** Shared manifest committed to git. Tracks member repo names, default settings, and active plugins.
230
- 2. **Local Config (`.local.rnex.yaml`):** Machine-specific file ignored in `.gitignore`. Overrides or provides member repo paths on each developer's workstation.
235
+ 1. **Repo Config (`rnex.yaml`):** Shared manifest committed to Git. Declares member repos, Git URLs, default enabled states, and active plugins.
236
+ 2. **Local Config (`.local.rnex.yaml`):** Machine-specific file ignored in `.gitignore`. Takes **highest priority** and overrides repo settings.
231
237
 
232
238
  ### Repo Configuration (`rnex.yaml`)
233
239
 
234
240
  ```yaml
235
- # Directory for repository symlinks (relative or absolute)
241
+ # Directory for member repository clones
236
242
  repos_dir: ./repos
237
243
 
238
244
  # Workspace plugins
239
245
  plugins:
240
246
  karpathy-llm: {}
241
247
 
242
- # Member repositories
248
+ # Member repositories (enabled by default)
243
249
  repos:
244
250
  backend:
245
- scope: visible
251
+ url: git@github.com:myorg/backend-api.git
246
252
  rnex_dir: true # default: true (creates repos/backend/.rnex/)
247
253
  frontend:
248
- path: ../web-app # optional default relative path
249
- scope: visible
254
+ url: https://github.com/myorg/web-app.git
250
255
  rnex_dir: true
251
256
  analytics:
252
- path: /Users/dev/code/analytics
253
- scope: hidden
254
- rnex_dir: false # disabled: leaves analytics repo 100% untouched
257
+ url: git@github.com:myorg/analytics.git
258
+ enabled: false # disabled: skipped by clone and exec
259
+ rnex_dir: false
255
260
  ```
256
261
 
257
262
  ### Local Configuration (`.local.rnex.yaml`)
258
263
 
259
264
  ```yaml
265
+ # Highest priority local overrides
260
266
  repos:
261
- backend:
262
- path: /Users/alice/projects/backend-api
267
+ analytics:
268
+ enabled: true # locally enable analytics on this workstation
263
269
  ```
264
270
 
265
- > See [`docs/rnex.example.yaml`](docs/rnex.example.yaml) for a comprehensive example with all options.
266
- > For common questions and architecture details, see the [Frequently Asked Questions (FAQ)](docs/FAQ.md).
267
-
268
271
  ---
269
272
 
270
273
  ## CLI Command Reference
@@ -279,32 +282,44 @@ repos:
279
282
  ### Commands
280
283
  | Command | Description |
281
284
  |:---|:---|
282
- | `rnex init [dir]` | Initialize a new workspace in current (or target) directory |
285
+ | `rnex init [-y] [dir]` | Initialize a new Virtual Meta-Repo workspace in current (or target) directory |
283
286
  | `rnex install [dir]` | Install `rnex` & `repo-nexus` globally into `~/.local/bin` (or custom dir) |
284
- | `rnex add [--no-rnex-dir] <name> <path>` | Register repo, create scope link, and configure member `.rnex/` |
285
- | `rnex remove <name>` | Unregister repo, unlink scope, and clean up member `.rnex/` assets |
286
- | `rnex list` | List all registered repos, visibility scopes, and `.rnex` status |
287
- | `rnex status` | Display status of workspace AI context, active plugins, and member repos |
287
+ | `rnex add [--local] [--disabled] <name> <git-url>` | Register and clone repo into `./repos/<name>` |
288
+ | `rnex clone` | Clone all missing enabled repositories declared in `rnex.yaml` |
289
+ | `rnex exec <command...>` | Execute a shell command across all active member repositories |
290
+ | `rnex remove <name>` | Unregister repo and delete `./repos/<name>` |
291
+ | `rnex enable [--local] <name>` | Enable a repository in active workspace |
292
+ | `rnex disable [--local] <name>` | Disable a repository from active workspace |
293
+ | `rnex list` | List all member repositories with clone state, active branch, and `.rnex` status |
294
+ | `rnex status` | Inspect workspace health, active repos, config loaded, and plugins |
288
295
  | `rnex rnex-dir <enable\|disable> <name>` | Toggle `.rnex/` directory integration for a member repository |
289
- | `rnex show <name>` | Make a hidden repo visible in workspace |
290
- | `rnex hide <name>` | Hide a repo from active workspace indexing |
291
- | `rnex fix` (or `sync`) | Reconcile and fix all scope symlinks, plugins, and member `.rnex/` directories |
296
+ | `rnex fix` (or `sync`) | Reconcile workspace repositories, plugins, and member `.rnex/` directories |
297
+ | `rnex plugin <list\|info\|enable\|disable>` | Manage workspace plugins |
298
+ | `rnex completion <bash\|zsh\|fish>` | Generate shell auto-completion script |
292
299
 
293
300
  ---
294
301
 
295
- ## Operating on External Workspaces via `--config`
302
+ ## Shell Auto-Completion
296
303
 
297
- Run `rnex` commands targeting any workspace without changing directories:
304
+ Generate auto-completions for your shell:
298
305
 
306
+ ### Zsh
299
307
  ```bash
300
- # Inspect status of a workspace stored elsewhere
301
- rnex -c /path/to/my-workspace/rnex.yaml status
308
+ # Add to ~/.zshrc
309
+ source <(rnex completion zsh)
310
+ ```
302
311
 
303
- # Add a repository to an external workspace
304
- rnex --config /path/to/my-workspace/rnex.yaml add api-service ~/code/api
312
+ ### Bash
313
+ ```bash
314
+ # Add to ~/.bashrc
315
+ source <(rnex completion bash)
305
316
  ```
306
317
 
307
- Any command executed with an explicit config file operates within the directory where that config lives.
318
+ ### Fish
319
+ ```bash
320
+ # Add to ~/.config/fish/config.fish
321
+ rnex completion fish | source
322
+ ```
308
323
 
309
324
  ---
310
325
 
@@ -312,21 +327,20 @@ Any command executed with an explicit config file operates within the directory
312
327
 
313
328
  ```
314
329
  repo-nexus/
315
- ├── rnex.yaml # Workspace configuration
330
+ ├── package.json # npm package manifest (single version source of truth)
316
331
  ├── rnex # CLI executable (POSIX shell)
317
- ├── AGENTS.md # Universal AI coding guidelines
332
+ ├── AGENTS.md # Routing-only universal AI instructions
318
333
  ├── docs/
319
- │ ├── AGENTS.sample.md # Template for AGENTS.md
334
+ │ ├── AGENTS.sample.md # Template for routing-only AGENTS.md
320
335
  │ ├── FAQ.md # Frequently Asked Questions
321
336
  │ └── rnex.example.yaml # Full config reference with examples
322
337
  ├── .github/
323
- │ ├── workflows/ci.yml # GitHub Actions CI workflow
324
- │ └── ISSUE_TEMPLATE/ # Bug report and feature request templates
338
+ │ └── workflows/ci.yml # GitHub Actions CI workflow
325
339
  ├── tests/
326
- │ └── test_cli.sh # Automated CLI test suite (20 tests)
327
- ├── toolkit/ # Shared prompts, scripts, templates
328
- ├── package.json # npm package manifest
329
- ├── LICENSE # MIT License
340
+ │ └── test_cli.sh # Automated CLI test suite
341
+ ├── toolkit/ # Shared plugins and templates
342
+ │ └── plugins/
343
+ │ └── karpathy-llm/ # Scoped Karpathy LLM plugin
330
344
  └── README.md
331
345
  ```
332
346
 
@@ -1,13 +1,17 @@
1
+ <!-- REPO-NEXUS:START -->
1
2
  # Multi-Repo AI Workspace Context
2
3
 
3
- This workspace operates as a **Repo Nexus** linking multiple independent repositories via symlinks.
4
+ This workspace operates as a **Repo Nexus Virtual Meta-Repo** uniting independent repositories.
4
5
 
5
- ## Rules for AI Coding Assistants
6
+ ## Routing Protocol for AI Assistants
6
7
 
7
- 1. **Workspace Structure & Settings**: AI coding assistants MUST inspect and read `rnex.yaml` at the workspace root to understand the workspace structure (such as `repos_dir`), registered member repositories, and active configuration settings.
8
- 2. **Symlink Write-Through**: Files edited under `repos/<name>/` directly modify the target repository.
9
- 3. **Repo Boundaries**: Each repository is isolated. Do not introduce cross-repo imports unless explicitly architected.
10
- 4. **Shared Context**: This file governs AI assistant behavior across all member repositories. Keep instructions universal. Use local instructions for repo-specific rules.
11
- 5. **Member Repo RNEX Context**: Member repositories may contain an `.rnex/` directory (accessible via `repos/<name>/.rnex/`) containing repository-specific documents, instructions, rules, workflows, and scripts managed by Repo Nexus. AI assistants operating at the workspace level MUST inspect `repos/<name>/.rnex/` for member-specific context, guidelines, and commands.
12
- 6. **Plugin Instructions**: If plugins are enabled in `rnex.yaml` (under `plugins:`), AI coding assistants MUST read instructions for each enabled plugin from its separate instruction files (located in `.rnex/instructions/` or `.rnex/rules/`).
13
- 7. **Git Operations**: Commit and push changes directly within the respective member repository root.
8
+ AI assistants working in this workspace must route context through the following configuration and instructions files:
9
+
10
+ 1. **Read Configuration First (Highest Priority)**: Inspect and read `.local.rnex.yaml` (if present) and `rnex.yaml` before executing tasks to identify workspace structure (`repos_dir`), active member repositories (`repos/`), and enabled plugins.
11
+ - `.local.rnex.yaml` takes highest priority over `rnex.yaml`.
12
+ - Repositories are enabled by default unless explicitly marked `enabled: false`. Disabled repositories are excluded from active tasks.
13
+ 2. **Member Repositories (`repos/<name>/`)**: Each member repository is an autonomous Git repository. For repository-specific instructions, inspect `repos/<name>/.rnex/`.
14
+ 3. **Plugin Instructions & Rules Routing**: Detailed guidelines and workflows for enabled plugins are located under:
15
+ `.rnex/plugins/<plugin-name>/`
16
+ 4. **Git Operations**: Commit and push changes directly within the respective member repository root (`repos/<name>/`).
17
+ <!-- REPO-NEXUS:END -->