repo-nexus 0.6.4 → 0.6.6
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 +6 -0
- package/README.md +7 -297
- package/docs/public/logo.png +0 -0
- package/lib/ai.sh +128 -1
- package/lib/commands/fix.sh +6 -6
- package/lib/commands/plugin.sh +7 -20
- package/lib/commands/status.sh +2 -2
- package/lib/hooks.sh +12 -12
- package/lib/plugins.sh +16 -0
- package/lib/repos.sh +16 -2
- package/package.json +14 -11
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
|
+
- **Dynamic AI Instructions & Complete Plugin Deactivation in `rnex fix`**:
|
|
12
|
+
- [`get_rnex_instructions()`](file:///Users/admin/Projects/ai/repo-nexus/lib/ai.sh) dynamically evaluates whether `karpathy-llm` is enabled. When disabled or omitted from configuration, the Karpathy LLM Wiki mandatory gate alert, wiki orientation startup step, forbidden wiki actions, and wiki subagent references are omitted from [`AGENTS.md`](file:///Users/admin/Projects/ai/repo-nexus/AGENTS.md) and native provider instructions.
|
|
13
|
+
- `sync_plugins` automatically prunes scoped directories (`.rnex/plugins/<plugin>/`) from both the workspace root and member repositories whenever a plugin is marked `enabled: false` or omitted from config.
|
|
14
|
+
- Provider prompt mirrors across all supported assistants (`.github/prompts`, `.claude/commands`, `.claude/prompts`, `.gemini/prompts`, `.cursor/prompts`, `.windsurf/prompts`) are cleaned of prompts and workflows belonging to disabled plugins, while preserving base prompts and active plugin prompts.
|
|
15
|
+
- Hook dispatchers and `status` reports evaluate active enablement (`yaml_plugin_enabled`) rather than key presence, preventing disabled plugins from registering hook alerts or status indicators.
|
|
16
|
+
- User-authored content in wiki and intake directories is strictly preserved during plugin deactivation.
|
|
11
17
|
- **Universal `AGENTS.md` & Native Provider Instructions Architecture**:
|
|
12
18
|
- Maintained [`AGENTS.md`](file:///Users/admin/Projects/ai/repo-nexus/AGENTS.md) at the workspace root as the universal, cross-tool standard for workspace routing instructions.
|
|
13
19
|
- Assistants that read `AGENTS.md` unconditionally (such as GitHub Copilot) rely directly on `AGENTS.md`, eliminating redundant instruction files (`.github/copilot-instructions.md`) and diverging contexts.
|
package/README.md
CHANGED
|
@@ -12,34 +12,28 @@ A **simple, lightweight Virtual Meta-Repo companion** for multi-repo workspaces
|
|
|
12
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
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
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
|
-
- **
|
|
15
|
+
- **OneCommand Team Onboarding**: Teammates clone the meta-repo and run `rnex clone` to clone and configure all member repos in seconds.
|
|
16
16
|
- **Cross-Repo Batch Operations**: Run arbitrary commands across all active repositories with `rnex exec <command>`.
|
|
17
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
18
|
- **Zero Dependencies**: Pure POSIX shell CLI (`rnex`). Works out of the box across macOS, Linux, and Windows (WSL/Git Bash).
|
|
19
19
|
|
|
20
|
-
> 💡 **Documentation
|
|
21
|
-
> -
|
|
22
|
-
> -
|
|
23
|
-
> -
|
|
20
|
+
> 💡 **Documentation:** Full documentation lives on the **[Documentation Site](https://unoxen.github.io/repo-nexus/)** (sources in [`docs/`](docs/)):
|
|
21
|
+
> - **[Architecture](docs/guide/architecture.md)** and **[Why Repo Nexus?](docs/guide/why-repo-nexus.md)** — workspace layout and rationale
|
|
22
|
+
> - **[CLI Reference](docs/cli/)** — all commands, flags, everyday usage, Git hooks, and shell completion
|
|
23
|
+
> - **[Plugins Guide](docs/plugins/)** — built-in AI provider and domain plugins
|
|
24
|
+
> - **[Configuration](docs/guide/configuration.md)** — `rnex.yaml` and `.local.rnex.yaml` schema
|
|
25
|
+
> - **[FAQ](docs/faq/)** — architecture deep dives, Git workflows, and AI context strategies
|
|
24
26
|
|
|
25
27
|
---
|
|
26
28
|
|
|
27
29
|
## Table of Contents
|
|
28
30
|
|
|
29
31
|
- [What Repo Nexus Is (and What It Isn't)](#what-repo-nexus-is-and-what-it-isnt)
|
|
30
|
-
- [How It Works: Virtual Meta-Repo Architecture](#how-it-works-virtual-meta-repo-architecture)
|
|
31
32
|
- [Key Principles](#key-principles)
|
|
32
33
|
- [Installation](#installation)
|
|
33
34
|
- [Quick Start](#quick-start)
|
|
34
|
-
- [Everyday Usage](#everyday-usage)
|
|
35
|
-
- [Plugins & Scoped Context Packs](#plugins--scoped-context-packs)
|
|
36
|
-
- [Two-Level Configuration (`rnex.yaml` & `.local.rnex.yaml`)](#two-level-configuration)
|
|
37
|
-
- [CLI Command Reference](#cli-command-reference)
|
|
38
|
-
- [Full CLI Reference Manual (docs/cli/)](docs/cli/)
|
|
39
|
-
- [Shell Auto-Completion](#shell-auto-completion)
|
|
40
35
|
- [Project Structure](#project-structure)
|
|
41
36
|
- [Running Tests](#running-tests)
|
|
42
|
-
- [Frequently Asked Questions (FAQ)](docs/faq/)
|
|
43
37
|
- [License](#license)
|
|
44
38
|
|
|
45
39
|
---
|
|
@@ -55,34 +49,6 @@ A **simple, lightweight Virtual Meta-Repo companion** for multi-repo workspaces
|
|
|
55
49
|
|
|
56
50
|
---
|
|
57
51
|
|
|
58
|
-
## How It Works: Virtual Meta-Repo Architecture
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
62
|
-
│ Repo Nexus Workspace Root (Virtual Meta-Repo) │
|
|
63
|
-
│ │
|
|
64
|
-
│ my-workspace/ │
|
|
65
|
-
│ .local.rnex.yaml (Highest Priority: local overrides) │
|
|
66
|
-
│ rnex.yaml (Team Manifest: repos & plugins) │
|
|
67
|
-
│ AGENTS.md (Routing-only AI agent instructions) │
|
|
68
|
-
│ .gitignore (Strictly ignores repos/ & local yaml) │
|
|
69
|
-
│ .rnex/ (Strictly encapsulated internal state) │
|
|
70
|
-
│ plugins/ (Scoped plugin directories) │
|
|
71
|
-
│ karpathy-llm/ (Isolated rules, workflows, templates) │
|
|
72
|
-
│ repos/ (Autonomous Physical Git Clones) │
|
|
73
|
-
│ backend/ (Own .git, branches, PRs) │
|
|
74
|
-
│ .rnex/ (Quarantined member-specific context) │
|
|
75
|
-
│ frontend/ (Own .git, branches, PRs) │
|
|
76
|
-
│ .rnex/ (Quarantined member-specific context) │
|
|
77
|
-
│ │
|
|
78
|
-
│ • Agent opens workspace → reads config first → sees stack. │
|
|
79
|
-
│ • Repos are 100% normal Git clones (zero submodules). │
|
|
80
|
-
│ • Work across repos seamlessly using rnex exec. │
|
|
81
|
-
└─────────────────────────────────────────────────────────────┘
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
52
|
## Key Principles
|
|
87
53
|
|
|
88
54
|
1. **Configuration as Single Source of Truth**:
|
|
@@ -159,262 +125,6 @@ All declared member repositories are cloned and wired up automatically!
|
|
|
159
125
|
|
|
160
126
|
---
|
|
161
127
|
|
|
162
|
-
## Everyday Usage
|
|
163
|
-
|
|
164
|
-
```bash
|
|
165
|
-
# Register and clone a repository
|
|
166
|
-
rnex add backend git@github.com:myorg/backend.git
|
|
167
|
-
|
|
168
|
-
# Register a repository in local config only (.local.rnex.yaml)
|
|
169
|
-
rnex add --local analytics git@github.com:myorg/analytics.git
|
|
170
|
-
|
|
171
|
-
# Clone all missing member repositories
|
|
172
|
-
rnex clone
|
|
173
|
-
|
|
174
|
-
# Run a command across all active repositories
|
|
175
|
-
rnex exec git status -s
|
|
176
|
-
rnex exec npm test
|
|
177
|
-
|
|
178
|
-
# Disable a repository (skipped by clone, exec, and agents)
|
|
179
|
-
rnex disable analytics
|
|
180
|
-
rnex disable --local analytics # disable locally without modifying team rnex.yaml
|
|
181
|
-
|
|
182
|
-
# Re-enable a repository
|
|
183
|
-
rnex enable analytics
|
|
184
|
-
|
|
185
|
-
# List all registered repositories with clone status and active branch
|
|
186
|
-
rnex list
|
|
187
|
-
|
|
188
|
-
# Inspect workspace health, active repos, and plugin status
|
|
189
|
-
rnex status
|
|
190
|
-
|
|
191
|
-
# Reconcile workspace, sync plugins, and upgrade config in a single pass (aliases: sync, update, upgrade)
|
|
192
|
-
rnex fix
|
|
193
|
-
|
|
194
|
-
# Unregister and delete a repository
|
|
195
|
-
rnex remove analytics
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## Plugins & Scoped Context Packs
|
|
201
|
-
|
|
202
|
-
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>/`.
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
# List available and active plugins
|
|
206
|
-
rnex plugin list
|
|
207
|
-
|
|
208
|
-
# Inspect plugin details and provided files
|
|
209
|
-
rnex plugin info karpathy-llm
|
|
210
|
-
|
|
211
|
-
# Enable a plugin in your workspace
|
|
212
|
-
rnex plugin enable karpathy-llm
|
|
213
|
-
|
|
214
|
-
# Disable a plugin and clean up scoped assets
|
|
215
|
-
rnex plugin disable karpathy-llm
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Built-in Plugins
|
|
219
|
-
|
|
220
|
-
> For dedicated guides, configuration options, and directory layouts for each plugin, see the [**Repo Nexus Plugins Guide**](docs/plugins/).
|
|
221
|
-
|
|
222
|
-
#### 1. `copilot`
|
|
223
|
-
The `copilot` plugin provides GitHub Copilot integration, automatically mirroring workspace and active plugin assets:
|
|
224
|
-
* **Prompts (`.github/prompts/*.prompt.md`)**: Formatted with YAML frontmatter (`name`, `description`) for the VS Code Copilot Chat prompt picker and slash commands.
|
|
225
|
-
* **Agent Skills (`.github/skills/<name>/SKILL.md`)**: Configured for GitHub Copilot Agent mode and `gh skill`.
|
|
226
|
-
* **Custom Agents (`.github/agents/*.agent.md`)**: Active plugins' agent definitions mirrored for Copilot workspace custom agents.
|
|
227
|
-
* **Instructions (`.github/copilot-instructions.md`)**: Synthesized workspace routing and active plugin guidelines, preserving manual user instructions.
|
|
228
|
-
* **Configurable Options**:
|
|
229
|
-
```yaml
|
|
230
|
-
plugins:
|
|
231
|
-
copilot:
|
|
232
|
-
prompts: true # mirror prompts to .github/prompts/*.prompt.md (default: true)
|
|
233
|
-
skills: true # mirror skills to .github/skills/<name>/SKILL.md (default: true)
|
|
234
|
-
instructions: true # mirror guidelines to .github/copilot-instructions.md (default: true)
|
|
235
|
-
agents: true # mirror custom agents to .github/agents/*.agent.md (default: true)
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
#### 2. `claude`
|
|
239
|
-
The `claude` plugin integrates Anthropic's Claude Code and Claude CLI:
|
|
240
|
-
* **Instructions (`CLAUDE.md`)**: Manages the root `CLAUDE.md` routing context, replacing `AGENTS.md`.
|
|
241
|
-
* **Slash Commands (`.claude/commands/*.md`)**: Standardized commands (`/rnex-cross-repo-feature`, etc.) for Claude Code.
|
|
242
|
-
* **Agent Skills (`.claude/skills/<name>/SKILL.md`)**: Mirrored tool skills and workflows.
|
|
243
|
-
* **Configurable Options**:
|
|
244
|
-
```yaml
|
|
245
|
-
plugins:
|
|
246
|
-
claude:
|
|
247
|
-
instructions: true # maintain CLAUDE.md (default: true)
|
|
248
|
-
prompts: true # mirror slash commands to .claude/commands/ (default: true)
|
|
249
|
-
skills: true # mirror skills to .claude/skills/ (default: true)
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
#### 3. `gemini`
|
|
253
|
-
The `gemini` plugin integrates Google Gemini CLI and Gemini Code Assist:
|
|
254
|
-
* **Instructions (`GEMINI.md`)**: Manages root `GEMINI.md` context, replacing `AGENTS.md`.
|
|
255
|
-
* **Prompts (`.gemini/prompts/*.prompt.md`)**: Standardized prompts formatted with YAML frontmatter.
|
|
256
|
-
* **Skills (`.gemini/skills/<name>/SKILL.md`)**: Mirrored tool skills for Gemini agents.
|
|
257
|
-
* **Configurable Options**:
|
|
258
|
-
```yaml
|
|
259
|
-
plugins:
|
|
260
|
-
gemini:
|
|
261
|
-
instructions: true # maintain GEMINI.md (default: true)
|
|
262
|
-
prompts: true # mirror prompts to .gemini/prompts/ (default: true)
|
|
263
|
-
skills: true # mirror skills to .gemini/skills/ (default: true)
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
#### 4. `cursor`
|
|
267
|
-
The `cursor` plugin integrates the Cursor IDE:
|
|
268
|
-
* **Instructions (`.cursorrules` & `.cursor/rules/repo-nexus.mdc`)**: Synchronizes project routing rules.
|
|
269
|
-
* **Prompts (`.cursor/prompts/*.md`)**: Mirrored prompt files.
|
|
270
|
-
* **Skills (`.cursor/skills/<name>/SKILL.md`)**: Mirrored agent skills.
|
|
271
|
-
* **Configurable Options**:
|
|
272
|
-
```yaml
|
|
273
|
-
plugins:
|
|
274
|
-
cursor:
|
|
275
|
-
instructions: true # maintain .cursorrules and MDC rule (default: true)
|
|
276
|
-
prompts: true # mirror prompts to .cursor/prompts/ (default: true)
|
|
277
|
-
skills: true # mirror skills to .cursor/skills/ (default: true)
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
#### 5. `windsurf`
|
|
281
|
-
The `windsurf` plugin integrates the Codeium Windsurf IDE:
|
|
282
|
-
* **Instructions (`.windsurfrules`)**: Synchronizes project routing rules.
|
|
283
|
-
* **Prompts (`.windsurf/prompts/*.md`)**: Mirrored prompt files.
|
|
284
|
-
* **Skills (`.windsurf/skills/<name>/SKILL.md`)**: Mirrored agent skills.
|
|
285
|
-
* **Configurable Options**:
|
|
286
|
-
```yaml
|
|
287
|
-
plugins:
|
|
288
|
-
windsurf:
|
|
289
|
-
instructions: true # maintain .windsurfrules (default: true)
|
|
290
|
-
prompts: true # mirror prompts to .windsurf/prompts/ (default: true)
|
|
291
|
-
skills: true # mirror skills to .windsurf/skills/ (default: true)
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
#### 6. `karpathy-llm`
|
|
295
|
-
The `karpathy-llm` plugin packages Andrej Karpathy's verified LLM agent design patterns, context engineering principles, and the autonomous **Karpathy LLM Wiki** architecture:
|
|
296
|
-
* **The 4 Cardinal Agent Rules** (`.rnex/plugins/karpathy-llm/rules/behavioral.md`):
|
|
297
|
-
1. *Think Before Coding:* Formulate explicit assumptions, boundary checks, and trade-offs before writing code.
|
|
298
|
-
2. *Simplicity First:* Minimal abstractions, readable implementations, zero speculative boilerplate.
|
|
299
|
-
3. *Surgical Changes:* Minimal blast radius, preserved comments/docstrings, and tight diffs.
|
|
300
|
-
4. *Goal-Driven Execution:* Upfront verification criteria, automated tests, and diff inspection.
|
|
301
|
-
* **Autonomous Karpathy LLM Wiki Architecture:**
|
|
302
|
-
* **Intake (`/raw/`):** Append-only intake for unmodified source documents.
|
|
303
|
-
* **Curated Knowledge Base (`/wiki/`):** Interlinked atomic markdown pages with typed YAML frontmatter relations.
|
|
304
|
-
* **Navigation Index (`/wiki/index.md`):** Master categorized navigation index.
|
|
305
|
-
* **Rolling Context (`/wiki/hot.md`):** ~500-word quick-orient context cache for AI agents.
|
|
306
|
-
* **Operation Log (`/wiki/_log.md`):** Append-only audit trail of ingest and lint operations.
|
|
307
|
-
* **Standardized Workflows (`.rnex/plugins/karpathy-llm/workflows/`):**
|
|
308
|
-
* `wiki-ingest.md`: 8-step protocol decomposing raw source documents into atomic wiki pages.
|
|
309
|
-
* `wiki-lint.md`: 10-step protocol validating paths, relations, contradictions, and indexing.
|
|
310
|
-
|
|
311
|
-
---
|
|
312
|
-
|
|
313
|
-
## Two-Level Configuration
|
|
314
|
-
|
|
315
|
-
1. **Repo Config (`rnex.yaml`):** Shared manifest committed to Git. Declares member repos, Git URLs, default enabled states, and active plugins.
|
|
316
|
-
2. **Local Config (`.local.rnex.yaml`):** Machine-specific file ignored in `.gitignore`. Takes **highest priority** and overrides repo settings.
|
|
317
|
-
|
|
318
|
-
### Repo Configuration (`rnex.yaml`)
|
|
319
|
-
|
|
320
|
-
```yaml
|
|
321
|
-
# Directory for member repository clones
|
|
322
|
-
repos_dir: ./repos
|
|
323
|
-
|
|
324
|
-
# Automated workspace Git hooks (default: true)
|
|
325
|
-
git_hooks: true
|
|
326
|
-
|
|
327
|
-
# Workspace plugins and tool integrations
|
|
328
|
-
plugins:
|
|
329
|
-
copilot:
|
|
330
|
-
prompts: true
|
|
331
|
-
skills: true
|
|
332
|
-
instructions: true
|
|
333
|
-
agents: true
|
|
334
|
-
karpathy-llm: {}
|
|
335
|
-
|
|
336
|
-
# Member repositories (enabled by default)
|
|
337
|
-
repos:
|
|
338
|
-
backend:
|
|
339
|
-
url: git@github.com:myorg/backend-api.git
|
|
340
|
-
rnex_dir: true # default: true (creates repos/backend/.rnex/)
|
|
341
|
-
frontend:
|
|
342
|
-
url: https://github.com/myorg/web-app.git
|
|
343
|
-
rnex_dir: true
|
|
344
|
-
analytics:
|
|
345
|
-
url: git@github.com:myorg/analytics.git
|
|
346
|
-
enabled: false # disabled: skipped by clone and exec
|
|
347
|
-
rnex_dir: false
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
### Local Configuration (`.local.rnex.yaml`)
|
|
351
|
-
|
|
352
|
-
```yaml
|
|
353
|
-
# Highest priority local overrides
|
|
354
|
-
repos:
|
|
355
|
-
analytics:
|
|
356
|
-
enabled: true # locally enable analytics on this workstation
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
---
|
|
360
|
-
|
|
361
|
-
## CLI Command Reference
|
|
362
|
-
|
|
363
|
-
> 📖 **Full Manual Available:** See the comprehensive **[CLI Reference Manual](docs/cli/)** for exhaustive details, deep dives into every command and flag, lifecycle behaviors, automated Git hooks, scoped plugins, standardized prompts catalog, and shell completion recipes.
|
|
364
|
-
|
|
365
|
-
### Global Options
|
|
366
|
-
| Option | Description |
|
|
367
|
-
|:---|:---|
|
|
368
|
-
| `-c, --config <file>` | Explicit path to `rnex.yaml` (executes in that workspace directory) |
|
|
369
|
-
| `-h, --help` | Display command help and usage instructions |
|
|
370
|
-
| `-v, --version` | Display version |
|
|
371
|
-
|
|
372
|
-
### Commands
|
|
373
|
-
| Command | Description |
|
|
374
|
-
|:---|:---|
|
|
375
|
-
| `rnex init [-y] [--ai <file>] [--code-workspace [file]] [--hooks\|--no-hooks] [dir]` | Initialize a new Virtual Meta-Repo workspace in current (or target) directory |
|
|
376
|
-
| `rnex install [dir]` | Install `rnex` & `repo-nexus` globally into `~/.local/bin` (or custom dir) |
|
|
377
|
-
| `rnex add [--local] [--disabled] <name> <git-url>` | Register and clone repo into `./repos/<name>` |
|
|
378
|
-
| `rnex clone` | Clone all missing enabled repositories declared in `rnex.yaml` |
|
|
379
|
-
| `rnex exec <command...>` | Execute a shell command across all active member repositories |
|
|
380
|
-
| `rnex remove <name>` | Unregister repo and delete `./repos/<name>` |
|
|
381
|
-
| `rnex enable [--local] <name>` | Enable a repository in active workspace |
|
|
382
|
-
| `rnex disable [--local] <name>` | Disable a repository from active workspace |
|
|
383
|
-
| `rnex list` | List all member repositories with clone state, active branch, and `.rnex` status |
|
|
384
|
-
| `rnex status` | Inspect workspace health, active repos, config loaded, git hooks, and plugins |
|
|
385
|
-
| `rnex rnex-dir <enable\|disable> <name>` | Toggle `.rnex/` directory integration for a member repository |
|
|
386
|
-
| `rnex fix [-y] [--quiet]` (or `sync`) | Reconcile workspace repositories, plugins, prompts, and member `.rnex/` directories |
|
|
387
|
-
| `rnex update [-y]` (or `upgrade`) | Safely upgrade workspace configuration schema and routing instructions |
|
|
388
|
-
| `rnex hooks <install\|uninstall\|status> [--local]` | Manage automated Git hooks (`.rnex/hooks` and `git_hooks: true\|false`) |
|
|
389
|
-
| `rnex plugin <list\|info\|enable\|disable>` | Manage workspace plugins |
|
|
390
|
-
| `rnex completion <bash\|zsh\|fish>` | Generate shell auto-completion script |
|
|
391
|
-
|
|
392
|
-
---
|
|
393
|
-
|
|
394
|
-
## Shell Auto-Completion
|
|
395
|
-
|
|
396
|
-
Generate auto-completions for your shell:
|
|
397
|
-
|
|
398
|
-
### Zsh
|
|
399
|
-
```bash
|
|
400
|
-
# Add to ~/.zshrc
|
|
401
|
-
source <(rnex completion zsh)
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
### Bash
|
|
405
|
-
```bash
|
|
406
|
-
# Add to ~/.bashrc
|
|
407
|
-
source <(rnex completion bash)
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
### Fish
|
|
411
|
-
```bash
|
|
412
|
-
# Add to ~/.config/fish/config.fish
|
|
413
|
-
rnex completion fish | source
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
---
|
|
417
|
-
|
|
418
128
|
## Project Structure
|
|
419
129
|
|
|
420
130
|
```
|
package/docs/public/logo.png
CHANGED
|
Binary file
|
package/lib/ai.sh
CHANGED
|
@@ -61,7 +61,9 @@ AI_MARKER_END="<!-- REPO-NEXUS:END -->"
|
|
|
61
61
|
|
|
62
62
|
get_rnex_instructions() {
|
|
63
63
|
_wiki_dir="$(karpathy_wiki_dir)"
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
if yaml_plugin_enabled "karpathy-llm"; then
|
|
66
|
+
cat <<AGENTS_EOF
|
|
65
67
|
# Multi-Repo AI Workspace Context
|
|
66
68
|
|
|
67
69
|
This workspace operates as a **Repo Nexus Virtual Meta-Repo** uniting independent repositories.
|
|
@@ -119,6 +121,55 @@ When workspace configuration, routing blocks, plugin assets, or member repositor
|
|
|
119
121
|
## Git Operations
|
|
120
122
|
Commit and push changes directly within the respective member repository root (\`repos/<name>/\`).
|
|
121
123
|
AGENTS_EOF
|
|
124
|
+
else
|
|
125
|
+
cat <<AGENTS_EOF
|
|
126
|
+
# Multi-Repo AI Workspace Context
|
|
127
|
+
|
|
128
|
+
This workspace operates as a **Repo Nexus Virtual Meta-Repo** uniting independent repositories.
|
|
129
|
+
|
|
130
|
+
## Routing Protocol for AI Assistants
|
|
131
|
+
|
|
132
|
+
### Mandatory Session Startup
|
|
133
|
+
|
|
134
|
+
Before answering the first task or making any task-specific tool call in a new session, execute these steps in strict sequence:
|
|
135
|
+
|
|
136
|
+
1. **Read Configuration First (Highest Priority)**: Inspect and read \`.local.rnex.yaml\` (if present) and \`rnex.yaml\` to identify workspace structure (\`repos_dir\`), active member repositories (\`repos/\`), and enabled plugins.
|
|
137
|
+
- \`.local.rnex.yaml\` takes highest priority over \`rnex.yaml\`.
|
|
138
|
+
- Repositories are enabled by default unless explicitly marked \`enabled: false\`. Disabled repositories are excluded from active tasks.
|
|
139
|
+
2. **Plugin Instructions**: Inspect instructions for every enabled Repo Nexus plugin under \`.rnex/plugins/<plugin-name>/\`.
|
|
140
|
+
3. **Targeted Member Repository Access Only**:
|
|
141
|
+
- Navigate directly to the specific files in \`repos/<name>/\` relevant to the user request.
|
|
142
|
+
- Never perform blind repository-wide scans or unbounded searches across \`repos/\`.
|
|
143
|
+
|
|
144
|
+
This is a hard gate, not optional orientation. Complete it once per session and retain the resulting context; do not repeatedly reload these files.
|
|
145
|
+
|
|
146
|
+
### Forbidden Startup Actions
|
|
147
|
+
- ❌ **DO NOT** grep or search \`repos/\` as your first step.
|
|
148
|
+
- ❌ **DO NOT** perform recursive tree exploration of member repositories.
|
|
149
|
+
|
|
150
|
+
## Workspace Skills, Workflows & Rules
|
|
151
|
+
Tools and agents operate on skills, workflows, instructions, and rules located under \`.rnex/\`:
|
|
152
|
+
- **Skills**: Inspect \`.rnex/skills/\` and active plugin skills under \`.rnex/plugins/<plugin-name>/skills/\`.
|
|
153
|
+
- **Workflows**: Inspect \`.rnex/workflows/\` and active plugin workflows under \`.rnex/plugins/<plugin-name>/workflows/\`.
|
|
154
|
+
- **Rules & Instructions**: Inspect \`.rnex/rules/\`, \`.rnex/instructions/\`, and active plugin rules/instructions under \`.rnex/plugins/<plugin-name>/\`.
|
|
155
|
+
|
|
156
|
+
## Subagents
|
|
157
|
+
Autonomous subagents are defined under \`.rnex/agents/\` and active plugin agents under \`.rnex/plugins/<plugin-name>/agents/\`.
|
|
158
|
+
- Subagents are kept in \`.rnex/\` and are not mirrored to external provider folders.
|
|
159
|
+
- To execute a task requiring a subagent, adopt the role, operational persona, and constraints specified in the corresponding subagent definition file.
|
|
160
|
+
|
|
161
|
+
## Member Repositories (\`repos/<name>/\`)
|
|
162
|
+
Each member repository is an autonomous Git repository. For repository-specific instructions, inspect \`repos/<name>/.rnex/\`. Inspect only targeted files required for the task.
|
|
163
|
+
|
|
164
|
+
## Workspace Maintenance
|
|
165
|
+
When workspace configuration, routing blocks, plugin assets, or member repository structures require reconciliation or schema upgrades:
|
|
166
|
+
- Run \`rnex fix\` (or its alias \`rnex update\` / \`rnex upgrade\`, which runs the unified fix reconciliation with upfront version checking).
|
|
167
|
+
- Use \`rnex fix -y\` to non-destructively apply configuration version upgrades automatically.
|
|
168
|
+
|
|
169
|
+
## Git Operations
|
|
170
|
+
Commit and push changes directly within the respective member repository root (\`repos/<name>/\`).
|
|
171
|
+
AGENTS_EOF
|
|
172
|
+
fi
|
|
122
173
|
}
|
|
123
174
|
|
|
124
175
|
merge_rnex_instructions() {
|
|
@@ -344,11 +395,18 @@ sync_rnex_base_assets() {
|
|
|
344
395
|
cp -f "$_sk_dir"/* "$NEXUS_DIR/.rnex/skills/$_sk_name/" 2>/dev/null || true
|
|
345
396
|
done
|
|
346
397
|
fi
|
|
398
|
+
|
|
399
|
+
# Purge any legacy plugin assets that shouldn't be in base .rnex/
|
|
400
|
+
rm -rf "$NEXUS_DIR/.rnex/skills/rnex-setup-karpathy-wiki" "$NEXUS_DIR/.rnex/skills/setup-karpathy-wiki" 2>/dev/null || true
|
|
401
|
+
rm -rf "$NEXUS_DIR/.rnex/skills/rnex-wiki-ingest" "$NEXUS_DIR/.rnex/skills/rnex-wiki-lint" "$NEXUS_DIR/.rnex/skills/wiki-curator" 2>/dev/null || true
|
|
402
|
+
rm -f "$NEXUS_DIR/.rnex/workflows/rnex-wiki-ingest.md" "$NEXUS_DIR/.rnex/workflows/rnex-wiki-lint.md" "$NEXUS_DIR/.rnex/workflows/wiki-ingest.md" "$NEXUS_DIR/.rnex/workflows/wiki-lint.md" 2>/dev/null || true
|
|
403
|
+
rm -f "$NEXUS_DIR/.rnex/agents/rnex-wiki-curator.agent.md" "$NEXUS_DIR/.rnex/agents/wiki-curator.agent.md" 2>/dev/null || true
|
|
347
404
|
}
|
|
348
405
|
|
|
349
406
|
sync_prompts() {
|
|
350
407
|
sync_rnex_base_assets
|
|
351
408
|
sync_ai_providers
|
|
409
|
+
clean_disabled_plugins_prompts_all_providers
|
|
352
410
|
}
|
|
353
411
|
|
|
354
412
|
sync_provider_prompts() {
|
|
@@ -380,6 +438,28 @@ sync_provider_prompts() {
|
|
|
380
438
|
rm -f "$_sp_dir/rnex-setup-karpathy-wiki${_ext}" "$_sp_dir/setup-karpathy-wiki${_ext}" 2>/dev/null || true
|
|
381
439
|
rm -f "$_sp_dir/wiki-ingest${_ext}" "$_sp_dir/wiki-lint${_ext}" 2>/dev/null || true
|
|
382
440
|
|
|
441
|
+
# Remove prompts belonging to disabled plugins from this provider directory
|
|
442
|
+
for _parent in "$SCRIPT_LOCATION/toolkit/plugins" "$(dirname "$SCRIPT_LOCATION")/toolkit/plugins" "$NEXUS_DIR/toolkit/plugins" "$NEXUS_DIR/.rnex/plugins"; do
|
|
443
|
+
[ -d "$_parent" ] || continue
|
|
444
|
+
for _pdir in "$_parent"/*; do
|
|
445
|
+
[ -d "$_pdir" ] || continue
|
|
446
|
+
_pname="$(basename "$_pdir")"
|
|
447
|
+
if ! yaml_plugin_enabled "$_pname"; then
|
|
448
|
+
for _sub in prompts workflows; do
|
|
449
|
+
[ -d "$_pdir/$_sub" ] || continue
|
|
450
|
+
for _pfile in "$_pdir/$_sub"/*.md; do
|
|
451
|
+
[ -f "$_pfile" ] || continue
|
|
452
|
+
_base="$(basename "$_pfile" .md)"
|
|
453
|
+
case "$_base" in
|
|
454
|
+
index|README) continue ;;
|
|
455
|
+
esac
|
|
456
|
+
rm -f "$_sp_dir/${_base}${_ext}" 2>/dev/null || true
|
|
457
|
+
done
|
|
458
|
+
done
|
|
459
|
+
fi
|
|
460
|
+
done
|
|
461
|
+
done
|
|
462
|
+
|
|
383
463
|
# Base toolkit prompts (from prompts or workflows)
|
|
384
464
|
if [ -n "$_src_prompts" ]; then
|
|
385
465
|
for _pfile in "$_src_prompts"/rnex-*.md; do
|
|
@@ -451,6 +531,53 @@ sync_provider_prompts() {
|
|
|
451
531
|
done
|
|
452
532
|
}
|
|
453
533
|
|
|
534
|
+
clean_plugin_prompts_across_providers() {
|
|
535
|
+
_pdir="$1"
|
|
536
|
+
[ -d "$_pdir" ] || return 0
|
|
537
|
+
|
|
538
|
+
for _sub in prompts workflows; do
|
|
539
|
+
[ -d "$_pdir/$_sub" ] || continue
|
|
540
|
+
for _pfile in "$_pdir/$_sub"/*.md; do
|
|
541
|
+
[ -f "$_pfile" ] || continue
|
|
542
|
+
_base="$(basename "$_pfile" .md)"
|
|
543
|
+
case "$_base" in
|
|
544
|
+
index|README) continue ;;
|
|
545
|
+
esac
|
|
546
|
+
rm -f "$NEXUS_DIR/.github/prompts/${_base}.prompt.md" 2>/dev/null || true
|
|
547
|
+
rm -f "$NEXUS_DIR/.claude/commands/${_base}.md" 2>/dev/null || true
|
|
548
|
+
rm -f "$NEXUS_DIR/.claude/prompts/${_base}.md" 2>/dev/null || true
|
|
549
|
+
rm -f "$NEXUS_DIR/.gemini/prompts/${_base}.prompt.md" 2>/dev/null || true
|
|
550
|
+
rm -f "$NEXUS_DIR/.cursor/prompts/${_base}.md" 2>/dev/null || true
|
|
551
|
+
rm -f "$NEXUS_DIR/.windsurf/prompts/${_base}.md" 2>/dev/null || true
|
|
552
|
+
done
|
|
553
|
+
done
|
|
554
|
+
|
|
555
|
+
rmdir "$NEXUS_DIR/.github/prompts" 2>/dev/null || true
|
|
556
|
+
rmdir "$NEXUS_DIR/.claude/commands" 2>/dev/null || true
|
|
557
|
+
rmdir "$NEXUS_DIR/.claude/prompts" 2>/dev/null || true
|
|
558
|
+
rmdir "$NEXUS_DIR/.gemini/prompts" 2>/dev/null || true
|
|
559
|
+
rmdir "$NEXUS_DIR/.cursor/prompts" 2>/dev/null || true
|
|
560
|
+
rmdir "$NEXUS_DIR/.windsurf/prompts" 2>/dev/null || true
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
clean_disabled_plugins_prompts_all_providers() {
|
|
564
|
+
_seen_plugins=" "
|
|
565
|
+
for _parent in "$SCRIPT_LOCATION/toolkit/plugins" "$(dirname "$SCRIPT_LOCATION")/toolkit/plugins" "$NEXUS_DIR/toolkit/plugins" "$NEXUS_DIR/.rnex/plugins"; do
|
|
566
|
+
[ -d "$_parent" ] || continue
|
|
567
|
+
for _pdir in "$_parent"/*; do
|
|
568
|
+
[ -d "$_pdir" ] || continue
|
|
569
|
+
_pname="$(basename "$_pdir")"
|
|
570
|
+
case "$_seen_plugins" in
|
|
571
|
+
*" $_pname "*) continue ;;
|
|
572
|
+
esac
|
|
573
|
+
_seen_plugins="${_seen_plugins}${_pname} "
|
|
574
|
+
if ! yaml_plugin_enabled "$_pname"; then
|
|
575
|
+
clean_plugin_prompts_across_providers "$_pdir"
|
|
576
|
+
fi
|
|
577
|
+
done
|
|
578
|
+
done
|
|
579
|
+
}
|
|
580
|
+
|
|
454
581
|
clean_provider_prompts() {
|
|
455
582
|
_sp_dir="$1"
|
|
456
583
|
_ext="${2:-.md}"
|
package/lib/commands/fix.sh
CHANGED
|
@@ -40,13 +40,16 @@ cmd_fix() {
|
|
|
40
40
|
# 1. Ensure .gitignore ignores repos/, .rnex/, and local configs, and strips legacy counters
|
|
41
41
|
reconcile_gitignore "$NEXUS_DIR"
|
|
42
42
|
|
|
43
|
-
# 2. Reconcile
|
|
43
|
+
# 2. Reconcile plugins (scopes, asset pruning for disabled plugins)
|
|
44
|
+
sync_plugins
|
|
45
|
+
|
|
46
|
+
# 3. Reconcile universal workspace instructions in AGENTS.md
|
|
44
47
|
merge_rnex_instructions "$NEXUS_DIR/AGENTS.md"
|
|
45
48
|
|
|
46
|
-
#
|
|
49
|
+
# 4. Sync standard skills, workflows, and provider prompts
|
|
47
50
|
sync_prompts
|
|
48
51
|
|
|
49
|
-
#
|
|
52
|
+
# 5. Reconcile Git hooks according to configuration
|
|
50
53
|
case "$GIT_HOOKS_CONFIG" in
|
|
51
54
|
false|no|0)
|
|
52
55
|
_cur_hp="$(git -C "$NEXUS_DIR" config --get core.hooksPath 2>/dev/null || true)"
|
|
@@ -82,9 +85,6 @@ cmd_fix() {
|
|
|
82
85
|
;;
|
|
83
86
|
esac
|
|
84
87
|
|
|
85
|
-
# 5. Reconcile plugins
|
|
86
|
-
sync_plugins
|
|
87
|
-
|
|
88
88
|
# 6. Reconcile member repos
|
|
89
89
|
yaml_list_repos | while read -r _name; do
|
|
90
90
|
[ -n "$_name" ] || continue
|
package/lib/commands/plugin.sh
CHANGED
|
@@ -17,9 +17,12 @@ cmd_plugin_list() {
|
|
|
17
17
|
_version="$(plugin_get_field "$_pdir" "version")"
|
|
18
18
|
_desc="$(plugin_get_field "$_pdir" "description")"
|
|
19
19
|
|
|
20
|
-
if
|
|
20
|
+
if yaml_plugin_enabled "$_name"; then
|
|
21
21
|
printf ' %b[enabled]%b %b%-15s%b %b(v%s)%b - %s\n' \
|
|
22
22
|
"$_G" "$_NC" "$_BOLD" "$_name" "$_NC" "$_DIM" "${_version:-0.1.0}" "$_NC" "$_desc"
|
|
23
|
+
elif yaml_has_plugin "$_name"; then
|
|
24
|
+
printf ' %b[disabled]%b %b%-15s%b %b(v%s)%b - %s\n' \
|
|
25
|
+
"$_Y" "$_NC" "$_BOLD" "$_name" "$_NC" "$_DIM" "${_version:-0.1.0}" "$_NC" "$_desc"
|
|
23
26
|
else
|
|
24
27
|
printf ' %b[available]%b %b%-15s%b %b(v%s)%b - %s\n' \
|
|
25
28
|
"$_DIM" "$_NC" "$_BOLD" "$_name" "$_NC" "$_DIM" "${_version:-0.1.0}" "$_NC" "$_desc"
|
|
@@ -50,7 +53,7 @@ cmd_plugin_info() {
|
|
|
50
53
|
if yaml_plugin_enabled "$_name"; then
|
|
51
54
|
_status="${_G}enabled${_NC}"
|
|
52
55
|
elif yaml_has_plugin "$_name"; then
|
|
53
|
-
_status="${_DIM}disabled
|
|
56
|
+
_status="${_DIM}disabled in configuration${_NC}"
|
|
54
57
|
else
|
|
55
58
|
_status="${_DIM}available (not enabled)${_NC}"
|
|
56
59
|
fi
|
|
@@ -179,24 +182,8 @@ cmd_plugin_disable() {
|
|
|
179
182
|
log_ok "Plugin '$_name' disabled from workspace"
|
|
180
183
|
fi
|
|
181
184
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
rm -rf "$NEXUS_DIR/.rnex/plugins/$_name"
|
|
185
|
-
log_ok "Removed workspace plugin scope: .rnex/plugins/$_name"
|
|
186
|
-
fi
|
|
187
|
-
|
|
188
|
-
yaml_list_repos | while read -r _rname; do
|
|
189
|
-
_rpath="$(resolve_repo_path "$_rname")"
|
|
190
|
-
if [ -d "$_rpath/.rnex/plugins/$_name" ]; then
|
|
191
|
-
rm -rf "$_rpath/.rnex/plugins/$_name"
|
|
192
|
-
fi
|
|
193
|
-
done
|
|
194
|
-
fi
|
|
195
|
-
|
|
196
|
-
sync_prompts
|
|
197
|
-
if [ ! -f "$NEXUS_DIR/AGENTS.md" ]; then
|
|
198
|
-
merge_rnex_instructions "$NEXUS_DIR/AGENTS.md"
|
|
199
|
-
fi
|
|
185
|
+
sync_plugins
|
|
186
|
+
cmd_fix -q
|
|
200
187
|
log_ok "Plugin '$_name' disabled from workspace"
|
|
201
188
|
}
|
|
202
189
|
|
package/lib/commands/status.sh
CHANGED
|
@@ -64,7 +64,7 @@ cmd_status() {
|
|
|
64
64
|
true|yes|1)
|
|
65
65
|
if [ "$_gh_active" -eq 1 ]; then
|
|
66
66
|
_active_trigger=""
|
|
67
|
-
if
|
|
67
|
+
if yaml_plugin_enabled "karpathy-llm"; then
|
|
68
68
|
_active_trigger="$(yaml_plugin_get "karpathy-llm" "lint_trigger")"
|
|
69
69
|
fi
|
|
70
70
|
if [ -n "$_active_trigger" ]; then
|
|
@@ -79,7 +79,7 @@ cmd_status() {
|
|
|
79
79
|
*)
|
|
80
80
|
if [ "$_gh_active" -eq 1 ]; then
|
|
81
81
|
_active_trigger=""
|
|
82
|
-
if
|
|
82
|
+
if yaml_plugin_enabled "karpathy-llm"; then
|
|
83
83
|
_active_trigger="$(yaml_plugin_get "karpathy-llm" "lint_trigger")"
|
|
84
84
|
fi
|
|
85
85
|
if [ -n "$_active_trigger" ]; then
|
package/lib/hooks.sh
CHANGED
|
@@ -138,16 +138,16 @@ cmd_hooks() {
|
|
|
138
138
|
done
|
|
139
139
|
|
|
140
140
|
_active_trigger=""
|
|
141
|
-
if
|
|
141
|
+
if yaml_plugin_enabled "karpathy-llm"; then
|
|
142
142
|
_active_trigger="$(yaml_plugin_get "karpathy-llm" "lint_trigger")"
|
|
143
|
+
printf '\n%bActive Plugin Triggers:%b\n' "$_BOLD" "$_NC"
|
|
144
|
+
if [ -n "$_active_trigger" ]; then
|
|
145
|
+
printf ' %b●%b karpathy-llm: %s\n' "$_G" "$_NC" "$_active_trigger"
|
|
146
|
+
else
|
|
147
|
+
printf ' %b○%b karpathy-llm: (manual only / no trigger set in rnex.yaml)\n' "$_DIM" "$_NC"
|
|
148
|
+
fi
|
|
149
|
+
printf '\n'
|
|
143
150
|
fi
|
|
144
|
-
printf '\n%bActive Plugin Triggers:%b\n' "$_BOLD" "$_NC"
|
|
145
|
-
if [ -n "$_active_trigger" ]; then
|
|
146
|
-
printf ' %b●%b karpathy-llm: %s\n' "$_G" "$_NC" "$_active_trigger"
|
|
147
|
-
else
|
|
148
|
-
printf ' %b○%b karpathy-llm: (manual only / no trigger set in rnex.yaml)\n' "$_DIM" "$_NC"
|
|
149
|
-
fi
|
|
150
|
-
printf '\n'
|
|
151
151
|
;;
|
|
152
152
|
run)
|
|
153
153
|
shift
|
|
@@ -158,7 +158,7 @@ cmd_hooks() {
|
|
|
158
158
|
case "$_hook_name" in
|
|
159
159
|
post-merge)
|
|
160
160
|
cmd_fix -y --quiet || true
|
|
161
|
-
if
|
|
161
|
+
if yaml_plugin_enabled "karpathy-llm"; then
|
|
162
162
|
_trigger="$(yaml_plugin_get "karpathy-llm" "lint_trigger")"
|
|
163
163
|
if [ "$_trigger" = "git-post-merge" ] || [ "$_trigger" = "post-merge" ]; then
|
|
164
164
|
_wiki_dir="$(karpathy_wiki_dir)"
|
|
@@ -175,7 +175,7 @@ cmd_hooks() {
|
|
|
175
175
|
return 0
|
|
176
176
|
;;
|
|
177
177
|
post-commit)
|
|
178
|
-
if
|
|
178
|
+
if yaml_plugin_enabled "karpathy-llm"; then
|
|
179
179
|
_trigger="$(yaml_plugin_get "karpathy-llm" "lint_trigger")"
|
|
180
180
|
if [ "$_trigger" = "git-post-commit" ] || [ "$_trigger" = "post-commit" ]; then
|
|
181
181
|
_wiki_dir="$(karpathy_wiki_dir)"
|
|
@@ -193,7 +193,7 @@ cmd_hooks() {
|
|
|
193
193
|
return 0
|
|
194
194
|
;;
|
|
195
195
|
pre-commit)
|
|
196
|
-
if
|
|
196
|
+
if yaml_plugin_enabled "karpathy-llm"; then
|
|
197
197
|
_trigger="$(yaml_plugin_get "karpathy-llm" "lint_trigger")"
|
|
198
198
|
if [ "$_trigger" = "git-pre-commit" ] || [ "$_trigger" = "pre-commit" ]; then
|
|
199
199
|
_wiki_dir="$(karpathy_wiki_dir)"
|
|
@@ -211,7 +211,7 @@ cmd_hooks() {
|
|
|
211
211
|
return 0
|
|
212
212
|
;;
|
|
213
213
|
pre-push)
|
|
214
|
-
if
|
|
214
|
+
if yaml_plugin_enabled "karpathy-llm"; then
|
|
215
215
|
_trigger="$(yaml_plugin_get "karpathy-llm" "lint_trigger")"
|
|
216
216
|
if [ "$_trigger" = "git-pre-push" ] || [ "$_trigger" = "pre-push" ]; then
|
|
217
217
|
_wiki_dir="$(karpathy_wiki_dir)"
|
package/lib/plugins.sh
CHANGED
|
@@ -115,8 +115,24 @@ sync_plugins() {
|
|
|
115
115
|
_wiki_dir="$(karpathy_wiki_dir)"
|
|
116
116
|
_raw_dir="$(karpathy_raw_dir)"
|
|
117
117
|
|
|
118
|
+
# 1. Prune plugins that are disabled or no longer enabled in config
|
|
119
|
+
if [ -d "$NEXUS_DIR/.rnex/plugins" ]; then
|
|
120
|
+
for _existing in "$NEXUS_DIR/.rnex/plugins"/*; do
|
|
121
|
+
[ -d "$_existing" ] || continue
|
|
122
|
+
_pname="$(basename "$_existing")"
|
|
123
|
+
if ! yaml_plugin_enabled "$_pname"; then
|
|
124
|
+
clean_plugin_prompts_across_providers "$_existing"
|
|
125
|
+
rm -rf "$_existing"
|
|
126
|
+
log_ok "Removed disabled plugin scope: .rnex/plugins/$_pname"
|
|
127
|
+
fi
|
|
128
|
+
done
|
|
129
|
+
rmdir "$NEXUS_DIR/.rnex/plugins" 2>/dev/null || true
|
|
130
|
+
fi
|
|
131
|
+
|
|
132
|
+
# 2. Sync enabled plugins
|
|
118
133
|
yaml_list_plugins | while read -r _pname; do
|
|
119
134
|
[ -n "$_pname" ] || continue
|
|
135
|
+
yaml_plugin_enabled "$_pname" || continue
|
|
120
136
|
_pdir="$(find_plugin_dir "$_pname" 2>/dev/null || true)"
|
|
121
137
|
if [ -z "$_pdir" ]; then
|
|
122
138
|
log_warn "Plugin '$_pname' declared in config but not found on disk"
|
package/lib/repos.sh
CHANGED
|
@@ -86,17 +86,31 @@ EOF
|
|
|
86
86
|
log_ok "Initialized .rnex in $(basename "$_repo_path")"
|
|
87
87
|
fi
|
|
88
88
|
|
|
89
|
+
# Prune disabled plugins from member repo
|
|
90
|
+
if [ -d "$_r_rnex/plugins" ]; then
|
|
91
|
+
for _existing in "$_r_rnex/plugins"/*; do
|
|
92
|
+
[ -d "$_existing" ] || continue
|
|
93
|
+
_pname="$(basename "$_existing")"
|
|
94
|
+
if ! yaml_plugin_enabled "$_pname"; then
|
|
95
|
+
rm -rf "$_existing"
|
|
96
|
+
fi
|
|
97
|
+
done
|
|
98
|
+
rmdir "$_r_rnex/plugins" 2>/dev/null || true
|
|
99
|
+
fi
|
|
100
|
+
|
|
89
101
|
# Sync scoped active plugins into member repo under .rnex/plugins/<plugin-name>/
|
|
90
102
|
yaml_list_plugins | while read -r _pname; do
|
|
91
103
|
[ -n "$_pname" ] || continue
|
|
104
|
+
yaml_plugin_enabled "$_pname" || continue
|
|
92
105
|
_pdir="$(find_plugin_dir "$_pname" 2>/dev/null || true)"
|
|
93
106
|
[ -n "$_pdir" ] || continue
|
|
94
107
|
|
|
95
108
|
_dest_pdir="$_r_rnex/plugins/$_pname"
|
|
96
109
|
mkdir -p "$_dest_pdir"
|
|
97
110
|
|
|
98
|
-
# Deterministically sync plugin asset directories into member repo
|
|
99
|
-
|
|
111
|
+
# Deterministically sync plugin asset directories into member repo (no prompts in plugins)
|
|
112
|
+
rm -rf "${_dest_pdir:?}/prompts" 2>/dev/null || true
|
|
113
|
+
for _sub in rules workflows instructions skills agents templates; do
|
|
100
114
|
if [ -d "$_pdir/$_sub" ]; then
|
|
101
115
|
rm -rf "${_dest_pdir:?}/$_sub"
|
|
102
116
|
mkdir -p "$_dest_pdir/$_sub"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repo-nexus",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
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",
|
|
@@ -30,26 +30,29 @@
|
|
|
30
30
|
"bugs": {
|
|
31
31
|
"url": "https://github.com/unoxen/repo-nexus/issues"
|
|
32
32
|
},
|
|
33
|
-
"homepage": "https://github.
|
|
33
|
+
"homepage": "https://unoxen.github.io/repo-nexus/",
|
|
34
34
|
"keywords": [
|
|
35
35
|
"rnex",
|
|
36
36
|
"repo-nexus",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"nexus-repository",
|
|
38
|
+
"nexus",
|
|
39
|
+
"repo",
|
|
40
|
+
"repository",
|
|
39
41
|
"meta-repo",
|
|
42
|
+
"meta-repository",
|
|
43
|
+
"virtual-meta-repo",
|
|
44
|
+
"multi-repo",
|
|
45
|
+
"context-repository",
|
|
46
|
+
"ai-first-repository",
|
|
40
47
|
"harness",
|
|
48
|
+
"ai-harness",
|
|
49
|
+
"wiki-llm",
|
|
41
50
|
"workspace",
|
|
42
51
|
"toolkit",
|
|
43
|
-
"
|
|
44
|
-
"agents.md",
|
|
45
|
-
"cursor-rules",
|
|
46
|
-
"claude-code",
|
|
47
|
-
"copilot",
|
|
52
|
+
"context-engineering",
|
|
48
53
|
"cursor",
|
|
49
54
|
"plugins",
|
|
50
55
|
"karpathy",
|
|
51
|
-
"context-engineering",
|
|
52
|
-
"developer-tools",
|
|
53
56
|
"cli"
|
|
54
57
|
],
|
|
55
58
|
"license": "MIT",
|