repo-nexus 0.4.7 → 0.5.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/CHANGELOG.md ADDED
@@ -0,0 +1,96 @@
1
+ # Changelog
2
+
3
+ All notable changes to Repo Nexus (`rnex`) will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.5.1] - 2026-10-08
9
+
10
+ ### Added
11
+ - Comprehensive CLI Reference Manual (`docs/CLI.md`) documenting all workspace lifecycle commands, member repository operations, automated Git hooks, scoped plugins, standardized prompts catalog, and shell completion recipes.
12
+
13
+ ### Fixed
14
+ - Dynamic version matching in test suite (`tests/test_cli.sh`, Test 26) resolving hardcoded version assertion on `package.json` bumps.
15
+ - Default version fallback in `rnex` CLI aligned with `package.json`.
16
+
17
+ ## [0.5.0] - 2026-10-08
18
+
19
+ ### Added
20
+ - **Version-Aware Upgrade System (`rnex update` / `rnex upgrade` and `rnex fix`)**:
21
+ - Automatically compares workspace configuration against the running CLI version using semantic versioning.
22
+ - Interactive upgrade prompt (`[y/N]`, bypassable with `-y` or `--yes`).
23
+ - Non-destructively inserts missing schema keys (`version`, `ai_instructions`, `code_workspace`) while preserving comments and repo mappings.
24
+ - Updates routing instructions in `AGENTS.md`, `CLAUDE.md`, and other detected AI assistant instruction files.
25
+ - **Config-Driven Automated Git Hooks (`rnex hooks`)**:
26
+ - Native Git hooks managed under `.rnex/hooks/` via `git config core.hooksPath .rnex/hooks`.
27
+ - Dynamic dispatchers for `post-merge`, `post-commit`, `pre-commit`, and `pre-push` that evaluate workspace triggers defined in `rnex.yaml` and `.local.rnex.yaml`.
28
+ - Automated `post-merge` hook runs `rnex fix -y --quiet` to keep member clones and plugin scopes in sync after pulling team changes.
29
+ - Subcommands: `rnex hooks install`, `rnex hooks uninstall`, and `rnex hooks status`.
30
+ - Interactive hooks setup prompt during `rnex init` (controllable via `--hooks` and `--no-hooks` flags).
31
+ - Health check integrated into `rnex status` reporting active hooks and triggers.
32
+ - **Standardized Prompts Suite & Master Catalog (`toolkit/prompts/`)**:
33
+ - Master index catalog at `toolkit/prompts/index.md` (synced to `.rnex/prompts/index.md`).
34
+ - New workflow prompts:
35
+ - `rnex-cross-repo-feature.md`: Multi-repository feature planning and contract implementation.
36
+ - `rnex-workspace-audit.md`: Multi-repo status, branch tracking, and configuration validation.
37
+ - `rnex-wiki-ingest.md`: Autonomous intake decomposition into atomic Karpathy LLM Wiki pages.
38
+ - `rnex-wiki-lint.md`: Graph integrity validation, backlink recalculation, and index rebuilding.
39
+ - `rnex-setup-karpathy-wiki.md`: Deterministic knowledge base scaffolding.
40
+ - Workspace `AGENTS.md` and `CLAUDE.md` maintain a minimal 1-line pointer to `.rnex/prompts/index.md` to conserve agent context.
41
+ - **Mandatory Session Startup Protocol**:
42
+ - Enforced hard-gate instruction block in `AGENTS.md` and `CLAUDE.md` requiring AI coding assistants to inspect configuration (`.local.rnex.yaml`, `rnex.yaml`), plugin guidelines, and orientation notes (`wiki/hot.md` and `wiki/index.md`) before taking task actions.
43
+
44
+ ## [0.4.7] - 2026-10-06
45
+
46
+ ### Fixed
47
+ - Quoted variable expansion in parameter pattern removal (`_repos_rel="${REPOS_DIR#"$NEXUS_DIR"/}"`) resolving ShellCheck SC2295.
48
+
49
+ ## [0.4.6] - 2026-10-06
50
+
51
+ ### Added
52
+ - **Configurable AI Instructions Routing** (`ai_instructions` in `rnex.yaml`):
53
+ - Support custom instruction files (e.g. `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, defaulting to `AGENTS.md`).
54
+ - `rnex status` detects and highlights missing instruction files.
55
+ - `rnex init` supports `--ai <file>` flag.
56
+ - **VS Code & Cursor Multi-Root Workspace Support** (`code_workspace` in `rnex.yaml`):
57
+ - Automatically generates and synchronizes `.code-workspace` files mapping the workspace root and active member repositories.
58
+ - `rnex init` supports `--code-workspace [file]` flag.
59
+
60
+ ## [0.4.5] - 2026-10-06
61
+
62
+ ### Fixed
63
+ - Guaranteed deterministic workspace initialization by tracking `repos/.gitkeep`.
64
+ - Prevented empty member directory creation during init.
65
+
66
+ ## [0.4.4] - 2026-10-06
67
+
68
+ ### Documentation
69
+ - Standardized deterministic Karpathy LLM Wiki initialization in `toolkit/plugins/karpathy-llm/`.
70
+
71
+ ## [0.4.3] - 2026-10-05
72
+
73
+ ### Refactored
74
+ - Separated behavioral rules (`rules/behavioral.md`) from architectural specifications (`instructions/wiki-architecture.md`) in `karpathy-llm` plugin.
75
+
76
+ ## [0.4.2] - 2026-10-05
77
+
78
+ ### Fixed
79
+ - Updated automated CLI test suite to dynamically inspect version from `package.json`.
80
+
81
+ ## [0.4.1] - 2026-10-05
82
+
83
+ ### Added
84
+ - Streamlined delimited routing protocol in `AGENTS.md` (`<!-- REPO-NEXUS:START -->` / `<!-- REPO-NEXUS:END -->`).
85
+ - Automated `.gitignore` reconciliation stripping legacy counters and ensuring `.rnex/` encapsulation.
86
+ - Purged legacy symlink mechanics in favor of physical autonomy.
87
+
88
+ ## [0.4.0] - 2026-10-05
89
+
90
+ ### Added
91
+ - **Virtual Meta-Repo 2.0**:
92
+ - Physical member repository clones in `./repos/<name>` with complete Git isolation (no submodules).
93
+ - Two-level configuration (`rnex.yaml` team manifest and `.local.rnex.yaml` machine overrides).
94
+ - Cross-repository batch execution (`rnex exec <command...>`).
95
+ - Member repository state management (`rnex enable`, `rnex disable`, `rnex list`, `rnex remove`).
96
+ - Scoped workspace plugins (`.rnex/plugins/<plugin-name>/`).
package/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  [![POSIX Compatible](https://img.shields.io/badge/POSIX-compatible-success)](#)
7
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
+ [![CLI Reference](https://img.shields.io/badge/docs-CLI%20Reference-blue.svg)](docs/CLI.md)
9
10
 
10
11
  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
12
 
@@ -17,7 +18,9 @@ A **simple, lightweight Virtual Meta-Repo companion** for multi-repo workspaces
17
18
  - **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
19
  - **Zero Dependencies**: Pure POSIX shell CLI (`rnex`). Works out of the box across macOS, Linux, and Windows (WSL/Git Bash).
19
20
 
20
- > 💡 **Have questions?** Check out the **[Frequently Asked Questions (FAQ)](docs/FAQ.md)** for architecture deep dives, Git workflows, and AI context strategies.
21
+ > 💡 **Documentation & Guides:**
22
+ > - Check out the **[CLI Reference Manual](docs/CLI.md)** for complete command syntax, flags, Git hooks, plugins, and prompts.
23
+ > - Check out the **[Frequently Asked Questions (FAQ)](docs/FAQ.md)** for architecture deep dives, Git workflows, and AI context strategies.
21
24
 
22
25
  ---
23
26
 
@@ -32,6 +35,7 @@ A **simple, lightweight Virtual Meta-Repo companion** for multi-repo workspaces
32
35
  - [Plugins & Scoped Context Packs](#plugins--scoped-context-packs)
33
36
  - [Two-Level Configuration (`rnex.yaml` & `.local.rnex.yaml`)](#two-level-configuration)
34
37
  - [CLI Command Reference](#cli-command-reference)
38
+ - [Full CLI Reference Manual (docs/CLI.md)](docs/CLI.md)
35
39
  - [Shell Auto-Completion](#shell-auto-completion)
36
40
  - [Project Structure](#project-structure)
37
41
  - [Running Tests](#running-tests)
@@ -272,6 +276,8 @@ repos:
272
276
 
273
277
  ## CLI Command Reference
274
278
 
279
+ > 📖 **Full Manual Available:** See the comprehensive **[CLI Reference Manual](docs/CLI.md)** for exhaustive details, deep dives into every command and flag, lifecycle behaviors, automated Git hooks, scoped plugins, standardized prompts catalog, and shell completion recipes.
280
+
275
281
  ### Global Options
276
282
  | Option | Description |
277
283
  |:---|:---|
@@ -282,7 +288,7 @@ repos:
282
288
  ### Commands
283
289
  | Command | Description |
284
290
  |:---|:---|
285
- | `rnex init [-y] [dir]` | Initialize a new Virtual Meta-Repo workspace in current (or target) directory |
291
+ | `rnex init [-y] [--ai <file>] [--code-workspace [file]] [--hooks\|--no-hooks] [dir]` | Initialize a new Virtual Meta-Repo workspace in current (or target) directory |
286
292
  | `rnex install [dir]` | Install `rnex` & `repo-nexus` globally into `~/.local/bin` (or custom dir) |
287
293
  | `rnex add [--local] [--disabled] <name> <git-url>` | Register and clone repo into `./repos/<name>` |
288
294
  | `rnex clone` | Clone all missing enabled repositories declared in `rnex.yaml` |
@@ -291,9 +297,11 @@ repos:
291
297
  | `rnex enable [--local] <name>` | Enable a repository in active workspace |
292
298
  | `rnex disable [--local] <name>` | Disable a repository from active workspace |
293
299
  | `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 |
300
+ | `rnex status` | Inspect workspace health, active repos, config loaded, git hooks, and plugins |
295
301
  | `rnex rnex-dir <enable\|disable> <name>` | Toggle `.rnex/` directory integration for a member repository |
296
- | `rnex fix` (or `sync`) | Reconcile workspace repositories, plugins, and member `.rnex/` directories |
302
+ | `rnex fix [-y] [--quiet]` (or `sync`) | Reconcile workspace repositories, plugins, prompts, and member `.rnex/` directories |
303
+ | `rnex update [-y]` (or `upgrade`) | Safely upgrade workspace configuration schema and routing instructions |
304
+ | `rnex hooks <install\|uninstall\|status>` | Manage config-driven automated Git hooks (`.rnex/hooks`) |
297
305
  | `rnex plugin <list\|info\|enable\|disable>` | Manage workspace plugins |
298
306
  | `rnex completion <bash\|zsh\|fish>` | Generate shell auto-completion script |
299
307
 
@@ -330,17 +338,20 @@ repo-nexus/
330
338
  ├── package.json # npm package manifest (single version source of truth)
331
339
  ├── rnex # CLI executable (POSIX shell)
332
340
  ├── AGENTS.md # Routing-only universal AI instructions
341
+ ├── CHANGELOG.md # Release history and migration notes
333
342
  ├── docs/
334
343
  │ ├── AGENTS.sample.md # Template for routing-only AGENTS.md
344
+ │ ├── CLI.md # Comprehensive CLI reference manual
335
345
  │ ├── FAQ.md # Frequently Asked Questions
336
346
  │ └── rnex.example.yaml # Full config reference with examples
337
347
  ├── .github/
338
348
  │ └── workflows/ci.yml # GitHub Actions CI workflow
339
349
  ├── tests/
340
350
  │ └── test_cli.sh # Automated CLI test suite
341
- ├── toolkit/ # Shared plugins and templates
342
- │ └── plugins/
343
- │ └── karpathy-llm/ # Scoped Karpathy LLM plugin
351
+ ├── toolkit/ # Shared plugins, prompts, and templates
352
+ │ ├── plugins/
353
+ │ │ └── karpathy-llm/ # Scoped Karpathy LLM plugin
354
+ │ └── prompts/ # Standardized AI operational prompts
344
355
  └── README.md
345
356
  ```
346
357
 
package/docs/CLI.md ADDED
@@ -0,0 +1,383 @@
1
+ # Repo Nexus (`rnex`) CLI Reference Manual
2
+
3
+ `rnex` is a lightweight, zero-dependency command-line utility built entirely in pure POSIX shell (`/bin/sh`). It orchestrates **Virtual Meta-Repo** workspaces, manages autonomous member repository clones, automates multi-repo Git workflows, and coordinates AI routing instructions without Git submodules.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ - [Overview & Global Options](#overview--global-options)
10
+ - [Workspace Lifecycle Commands](#workspace-lifecycle-commands)
11
+ - [`rnex init`](#rnex-init)
12
+ - [`rnex status`](#rnex-status)
13
+ - [`rnex fix` (alias: `sync`)](#rnex-fix-alias-sync)
14
+ - [`rnex update` (alias: `upgrade`)](#rnex-update-alias-upgrade)
15
+ - [`rnex install`](#rnex-install)
16
+ - [`rnex completion`](#rnex-completion)
17
+ - [`rnex version`](#rnex-version)
18
+ - [Member Repository Commands](#member-repository-commands)
19
+ - [`rnex add`](#rnex-add)
20
+ - [`rnex clone`](#rnex-clone)
21
+ - [`rnex exec`](#rnex-exec)
22
+ - [`rnex list`](#rnex-list)
23
+ - [`rnex enable`](#rnex-enable)
24
+ - [`rnex disable`](#rnex-disable)
25
+ - [`rnex remove`](#rnex-remove)
26
+ - [`rnex rnex-dir`](#rnex-rnex-dir)
27
+ - [Git Hooks Automation Commands](#git-hooks-automation-commands)
28
+ - [`rnex hooks install`](#rnex-hooks-install)
29
+ - [`rnex hooks status`](#rnex-hooks-status)
30
+ - [`rnex hooks uninstall`](#rnex-hooks-uninstall)
31
+ - [Plugin Management Commands](#plugin-management-commands)
32
+ - [`rnex plugin list`](#rnex-plugin-list)
33
+ - [`rnex plugin info`](#rnex-plugin-info)
34
+ - [`rnex plugin enable`](#rnex-plugin-enable)
35
+ - [`rnex plugin disable`](#rnex-plugin-disable)
36
+ - [Standardized Prompts Catalog](#standardized-prompts-catalog)
37
+ - [Environment Variables & Exit Codes](#environment-variables--exit-codes)
38
+
39
+ ---
40
+
41
+ ## Overview & Global Options
42
+
43
+ ### Syntax
44
+ ```sh
45
+ rnex [global-options] <command> [command-options] [arguments]
46
+ ```
47
+
48
+ ### Global Options
49
+
50
+ | Option | Shorthand | Description |
51
+ |:---|:---|:---|
52
+ | `--config <file>` | `-c <file>` | Path to a custom workspace configuration file (e.g. `/path/to/rnex.yaml`). Executes as if running from the directory containing that configuration file. |
53
+ | `--help` | `-h` | Display summary help and command usage. |
54
+ | `--version` | `-v` | Display the current version of the CLI. |
55
+
56
+ ---
57
+
58
+ ## Workspace Lifecycle Commands
59
+
60
+ ### `rnex init`
61
+
62
+ Initializes a new Repo Nexus Virtual Meta-Repo workspace.
63
+
64
+ ```sh
65
+ rnex init [options] [directory]
66
+ ```
67
+
68
+ #### Arguments & Options
69
+ - `directory` *(optional)*: Target directory to initialize. Defaults to current working directory (`$PWD`).
70
+ - `-y`, `--yes`: Non-interactive mode. Accepts all defaults automatically without prompting.
71
+ - `--ai <filename>`, `--instructions <filename>`: Name of the primary AI instructions file (e.g. `CLAUDE.md`, `GEMINI.md`, `.cursorrules`). Default: `AGENTS.md`.
72
+ - `--code-workspace [filename]`: Enable VS Code / Cursor multi-root workspace file generation. Defaults to `<directory-name>.code-workspace` if omitted.
73
+ - `--hooks`: Force-enable automated Git hooks setup during initialization.
74
+ - `--no-hooks`: Skip Git hooks configuration during initialization.
75
+
76
+ #### What it does:
77
+ 1. Creates `rnex.yaml` with schema versioning (`version: <version>`), `repos_dir: ./repos`, and configured defaults.
78
+ 2. Merges Repo Nexus routing instructions (`<!-- REPO-NEXUS:START -->` ... `<!-- REPO-NEXUS:END -->`) into the target AI instructions file.
79
+ 3. Creates `./repos/` directory with a tracked `.gitkeep`.
80
+ 4. Creates `.rnex/`, `.rnex/plugins/`, and copies standardized prompts to `.rnex/prompts/`.
81
+ 5. Reconciles `.gitignore` to ensure `repos/`, `.rnex/`, and `.local.rnex.yaml` are never tracked by the meta-repo.
82
+ 6. Generates a multi-root `.code-workspace` file if configured.
83
+ 7. Prompts to configure automated workspace Git hooks (`core.hooksPath = .rnex/hooks`) if inside a Git repository.
84
+
85
+ #### Examples:
86
+ ```sh
87
+ # Initialize in current directory with interactive prompts
88
+ rnex init
89
+
90
+ # Non-interactive initialization for CI or automated setup
91
+ rnex init -y
92
+
93
+ # Initialize for Anthropic Claude Code with automated Git hooks
94
+ rnex init -y --ai CLAUDE.md --hooks
95
+
96
+ # Initialize with VS Code multi-root workspace support
97
+ rnex init --code-workspace my-team.code-workspace
98
+ ```
99
+
100
+ ---
101
+
102
+ ### `rnex status`
103
+
104
+ Performs a comprehensive diagnostic and health check on the active workspace.
105
+
106
+ ```sh
107
+ rnex status
108
+ ```
109
+
110
+ #### What it reports:
111
+ - **Configuration & Versions**: Path, version tag, and load status of `rnex.yaml` and `.local.rnex.yaml`.
112
+ - **Paths**: Clones directory (`repos_dir`) and primary AI instructions file.
113
+ - **Git Integration**: Validation that `.gitignore` ignores `repos/`, `.rnex/`, and local files, and whether `core.hooksPath` points to `.rnex/hooks`.
114
+ - **AI Routing Context**: Existence and routing block markers in `AGENTS.md`, `CLAUDE.md`, `.code-workspace`, and prompts catalog (`.rnex/prompts/index.md`).
115
+ - **Active Plugins**: List of enabled plugins, scoped versions, and asset directories.
116
+ - **Member Repositories**: Every registered repository, enabled/disabled state, clone health, and active Git branch.
117
+
118
+ ---
119
+
120
+ ### `rnex fix` (alias: `sync`)
121
+
122
+ Reconciles the workspace configuration, instructions, prompts, plugins, and member clones.
123
+
124
+ ```sh
125
+ rnex fix [options]
126
+ ```
127
+
128
+ #### Options:
129
+ - `-y`, `--yes`: Automatically confirm configuration schema upgrades if an older workspace version is detected.
130
+ - `-q`, `--quiet`: Quiet mode; suppresses non-error informational messages (used in background Git hooks).
131
+ - `--upgrade`: Explicitly triggers version upgrade reconciliation.
132
+
133
+ #### What it reconciles:
134
+ 1. **Version Upgrade Check**: If workspace configuration version is older than running CLI, prompts to upgrade non-destructively.
135
+ 2. **Git Ignore**: Ensures `repos/`, `.rnex/`, and local config files are ignored, stripping legacy counters.
136
+ 3. **Routing Instructions**: Replaces or inserts the delimited Repo Nexus routing block in `AGENTS.md`, `CLAUDE.md`, etc.
137
+ 4. **Prompts Synchronization**: Copies standard workflow prompts into `.rnex/prompts/`.
138
+ 5. **Git Hooks**: Re-syncs hook scripts in `.rnex/hooks/` if active.
139
+ 6. **Plugins**: Scopes plugin templates, instructions, and rules to `.rnex/plugins/<plugin>/`.
140
+ 7. **Member Repositories**: Ensures member `.rnex/` directories exist where enabled.
141
+ 8. **VS Code / Cursor Workspace**: Regenerates folder mappings in the `.code-workspace` file.
142
+
143
+ ---
144
+
145
+ ### `rnex update` (alias: `upgrade`)
146
+
147
+ Safely updates an existing workspace's configuration schema and routing instructions to match the currently installed CLI version.
148
+
149
+ ```sh
150
+ rnex update [-y]
151
+ ```
152
+
153
+ - Compares `version:` in `rnex.yaml` with the running `rnex` CLI version.
154
+ - Non-destructively updates the `version:` key and inserts newly introduced schema keys (`ai_instructions`, `code_workspace`) while strictly preserving existing comments, indentation, and repository declarations.
155
+ - Reconciles AI instructions in `AGENTS.md` / `CLAUDE.md` to the newest standard.
156
+
157
+ ---
158
+
159
+ ### `rnex install`
160
+
161
+ Installs the `rnex` and `repo-nexus` executables into a system bin directory.
162
+
163
+ ```sh
164
+ rnex install [bin-directory]
165
+ ```
166
+
167
+ - Default directory: `~/.local/bin`
168
+ - Creates symlinks for both `rnex` and `repo-nexus`.
169
+
170
+ ---
171
+
172
+ ### `rnex completion`
173
+
174
+ Generates shell completion scripts for Tab auto-completion.
175
+
176
+ ```sh
177
+ rnex completion <bash|zsh|fish>
178
+ ```
179
+
180
+ #### Setup:
181
+ - **Zsh** (in `~/.zshrc`):
182
+ ```sh
183
+ source <(rnex completion zsh)
184
+ ```
185
+ - **Bash** (in `~/.bashrc`):
186
+ ```sh
187
+ source <(rnex completion bash)
188
+ ```
189
+ - **Fish** (in `~/.config/fish/config.fish`):
190
+ ```sh
191
+ rnex completion fish | source
192
+ ```
193
+
194
+ ---
195
+
196
+ ### `rnex version`
197
+
198
+ Outputs the version number of the `rnex` CLI.
199
+
200
+ ```sh
201
+ rnex version
202
+ # or:
203
+ rnex -v
204
+ ```
205
+
206
+ ---
207
+
208
+ ## Member Repository Commands
209
+
210
+ ### `rnex add`
211
+
212
+ Registers a repository in the workspace configuration and immediately clones it into `./repos/<name>`.
213
+
214
+ ```sh
215
+ rnex add [options] <name> <git-url>
216
+ ```
217
+
218
+ #### Options:
219
+ - `--local`: Registers the repository in `.local.rnex.yaml` instead of `rnex.yaml` (machine-specific, not committed to Git).
220
+ - `--disabled`: Registers the repository but flags it `enabled: false` (not cloned until enabled).
221
+ - `--no-rnex-dir`: Sets `rnex_dir: false`, leaving the member repository completely untouched without a member `.rnex/` directory.
222
+
223
+ #### Examples:
224
+ ```sh
225
+ # Register and clone a team repository
226
+ rnex add backend git@github.com:myorg/backend-api.git
227
+
228
+ # Register a private experiment on local machine only
229
+ rnex add --local experiment git@github.com:myorg/exp.git
230
+ ```
231
+
232
+ ---
233
+
234
+ ### `rnex clone`
235
+
236
+ Clones any registered, enabled repository that is currently missing on disk.
237
+
238
+ ```sh
239
+ rnex clone
240
+ ```
241
+
242
+ Teammates who clone the meta-repo run `rnex clone` to fetch all member repositories in a single step.
243
+
244
+ ---
245
+
246
+ ### `rnex exec`
247
+
248
+ Executes an arbitrary shell command across all active (enabled) member repositories in parallel or sequential order.
249
+
250
+ ```sh
251
+ rnex exec <command...>
252
+ ```
253
+
254
+ #### Examples:
255
+ ```sh
256
+ # Check Git status across all member repositories
257
+ rnex exec git status -s
258
+
259
+ # Pull latest commits on active branch across all repos
260
+ rnex exec git pull --ff-only
261
+
262
+ # Run tests in all member repos
263
+ rnex exec npm test
264
+ ```
265
+
266
+ ---
267
+
268
+ ### `rnex list`
269
+
270
+ Lists all registered member repositories with their clone status, active Git branch, and member `.rnex` state.
271
+
272
+ ```sh
273
+ rnex list
274
+ ```
275
+
276
+ ---
277
+
278
+ ### `rnex enable` & `rnex disable`
279
+
280
+ Toggles whether a member repository is active in the workspace.
281
+
282
+ ```sh
283
+ # Enable a repository
284
+ rnex enable [--local] <name>
285
+
286
+ # Disable a repository
287
+ rnex disable [--local] <name>
288
+ ```
289
+
290
+ - When disabled, a repository is excluded from `rnex clone`, `rnex exec`, and AI agent routing.
291
+ - `--local`: Writes the override into `.local.rnex.yaml`, allowing individual developers to disable repositories on their workstation without affecting teammates.
292
+
293
+ ---
294
+
295
+ ### `rnex remove`
296
+
297
+ Unregisters a member repository from configuration and deletes its clone from disk.
298
+
299
+ ```sh
300
+ rnex remove <name>
301
+ ```
302
+
303
+ Prompts for interactive confirmation before deleting files.
304
+
305
+ ---
306
+
307
+ ### `rnex rnex-dir`
308
+
309
+ Toggles `.rnex/` directory integration inside a specific member repository (`repos/<name>/.rnex/`).
310
+
311
+ ```sh
312
+ rnex rnex-dir <enable|disable> <name>
313
+ ```
314
+
315
+ ---
316
+
317
+ ## Git Hooks Automation Commands
318
+
319
+ Repo Nexus manages workspace-level Git hooks via `git config core.hooksPath .rnex/hooks`. The hooks are native shell scripts that dynamically evaluate configuration triggers in `rnex.yaml` and `.local.rnex.yaml`.
320
+
321
+ ```sh
322
+ rnex hooks <install|uninstall|status>
323
+ ```
324
+
325
+ ### Subcommands
326
+
327
+ #### `rnex hooks install`
328
+ Installs native hook dispatchers into `.rnex/hooks/` and configures Git:
329
+ - **`post-merge`**: Automatically runs `rnex fix -y --quiet` whenever you run `git pull` or merge upstream changes, ensuring new repositories or plugin additions sync instantly.
330
+ - **`post-commit`**: Evaluates `lint_trigger: git-post-commit`. If `/raw/` or `/wiki/` files were committed, alerts the user to run maintenance workflows.
331
+ - **`pre-commit`**: Evaluates `lint_trigger: git-pre-commit`. Validates staged files before committing.
332
+ - **`pre-push`**: Evaluates `lint_trigger: git-pre-push`. Validates changes before pushing to remote.
333
+
334
+ #### `rnex hooks status`
335
+ Displays the active `core.hooksPath`, installed hook scripts, and plugin triggers detected in `rnex.yaml`.
336
+
337
+ #### `rnex hooks uninstall`
338
+ Unsets `core.hooksPath` in Git configuration and removes `.rnex/hooks/`.
339
+
340
+ ---
341
+
342
+ ## Plugin Management Commands
343
+
344
+ Repo Nexus features a modular plugin architecture where plugin rules, instructions, and templates are scoped strictly under `.rnex/plugins/<plugin-name>/`.
345
+
346
+ ```sh
347
+ rnex plugin <list|info|enable|disable> [name]
348
+ ```
349
+
350
+ ### Subcommands
351
+ - **`rnex plugin list`**: Displays all available plugins distributed with `rnex` and highlights enabled plugins.
352
+ - **`rnex plugin info <name>`**: Shows description, version, scoped directory, and external template paths for a plugin.
353
+ - **`rnex plugin enable <name>`**: Enables a plugin in `rnex.yaml`, copies assets to `.rnex/plugins/<name>/`, and reconciles workspace files.
354
+ - **`rnex plugin disable <name>`**: Removes plugin assets from `.rnex/plugins/<name>/` and disables the plugin in `rnex.yaml`.
355
+
356
+ ---
357
+
358
+ ## Standardized Prompts Catalog
359
+
360
+ Repo Nexus provides a standardized suite of operational prompt templates in `toolkit/prompts/` that sync to `.rnex/prompts/` during `rnex fix` or `rnex init`.
361
+
362
+ AI assistants navigate workflows via the catalog index at `.rnex/prompts/index.md`:
363
+
364
+ | Prompt File | Purpose |
365
+ |:---|:---|
366
+ | [`index.md`](file:///Users/admin/Projects/ai/repo-nexus/toolkit/prompts/index.md) | Master catalog indexing all available workflows and prompts. |
367
+ | [`rnex-cross-repo-feature.md`](file:///Users/admin/Projects/ai/repo-nexus/toolkit/prompts/rnex-cross-repo-feature.md) | Structured workflow for implementing cross-cutting features across multiple repos. |
368
+ | [`rnex-workspace-audit.md`](file:///Users/admin/Projects/ai/repo-nexus/toolkit/prompts/rnex-workspace-audit.md) | Health, git dirty status, branch tracking, and configuration audit workflow. |
369
+ | [`rnex-wiki-ingest.md`](file:///Users/admin/Projects/ai/repo-nexus/toolkit/prompts/rnex-wiki-ingest.md) | Autonomous ingestion of source docs from `/raw/` into Karpathy LLM Wiki pages. |
370
+ | [`rnex-wiki-lint.md`](file:///Users/admin/Projects/ai/repo-nexus/toolkit/prompts/rnex-wiki-lint.md) | Link validation, backlink (`mentioned_in`) recalculation, and index rebuilding. |
371
+ | [`rnex-setup-karpathy-wiki.md`](file:///Users/admin/Projects/ai/repo-nexus/toolkit/prompts/rnex-setup-karpathy-wiki.md) | Scaffolding prompt for Karpathy LLM Wiki architecture in any repository. |
372
+
373
+ ---
374
+
375
+ ## Environment Variables & Exit Codes
376
+
377
+ ### Environment Variables
378
+ - `RNEX_CONFIG`: Overrides the default `rnex.yaml` configuration file path.
379
+ - `NO_COLOR`: Disables ANSI color output when set.
380
+
381
+ ### Exit Codes
382
+ - `0`: Success.
383
+ - `1`: General error (e.g. invalid arguments, missing workspace configuration, command failure).
@@ -12,6 +12,14 @@
12
12
  #
13
13
  # For more information: https://github.com/nu-nenoi/repo-nexus
14
14
 
15
+ # ------------------------------------------------------------------------------
16
+ # version — Workspace configuration schema version
17
+ # ------------------------------------------------------------------------------
18
+ # Used by `rnex fix` and `rnex update` to safely detect and reconcile configuration
19
+ # and routing instructions across CLI releases.
20
+ #
21
+ version: 0.5.0
22
+
15
23
  # ------------------------------------------------------------------------------
16
24
  # repos_dir — Directory for member repository clones
17
25
  # ------------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-nexus",
3
- "version": "0.4.7",
3
+ "version": "0.5.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",
@@ -13,6 +13,7 @@
13
13
  "files": [
14
14
  "rnex",
15
15
  "README.md",
16
+ "CHANGELOG.md",
16
17
  "LICENSE",
17
18
  "docs/",
18
19
  "toolkit/"
@@ -26,8 +27,6 @@
26
27
  },
27
28
  "homepage": "https://github.com/nu-nenoi/repo-nexus#readme",
28
29
  "keywords": [
29
- "rnex",
30
- "repo-nexus",
31
30
  "rnex",
32
31
  "repo-nexus",
33
32
  "multi-repo",
@@ -36,10 +35,6 @@
36
35
  "agents.md",
37
36
  "cursor-rules",
38
37
  "claude-code",
39
- "ai-agents",
40
- "agents.md",
41
- "cursor-rules",
42
- "claude-code",
43
38
  "copilot",
44
39
  "cursor",
45
40
  "plugins",