repo-nexus 0.7.24 → 0.7.28
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 +21 -0
- package/docs/CLI.md +1 -1
- package/docs/examples/monorepo-coexistence.md +0 -1
- package/docs/examples/multi-repo-workspace.md +0 -2
- package/docs/guide/configuration.md +2 -3
- package/docs/plugins/claude.md +5 -5
- package/docs/plugins/copilot.md +1 -2
- package/docs/plugins/cursor.md +2 -4
- package/docs/plugins/gemini.md +4 -4
- package/docs/plugins/index.md +2 -2
- package/docs/plugins/karpathy-llm.md +27 -5
- package/docs/plugins/windsurf.md +2 -4
- package/docs/rnex.example.yaml +12 -10
- package/lib/ai.sh +90 -0
- package/lib/commands/init.sh +1 -9
- package/lib/commands/plugin.sh +4 -0
- package/lib/commands/status.sh +17 -4
- package/lib/hooks.sh +29 -8
- package/lib/plugins.sh +268 -15
- package/lib/repos.sh +3 -1
- package/lib/yaml.sh +192 -22
- package/package.json +1 -1
- package/templates/rnex-env.sh +169 -8
- package/templates/rnex.example.yaml +12 -10
- package/toolkit/plugins/claude/README.md +2 -2
- package/toolkit/plugins/claude/hooks/after_sync.sh +32 -32
- package/toolkit/plugins/claude/hooks/before_plugin_disable.sh +1 -0
- package/toolkit/plugins/claude/instructions/rnex-claude-integration.md +1 -1
- package/toolkit/plugins/claude/plugin.yaml +2 -2
- package/toolkit/plugins/copilot/README.md +0 -2
- package/toolkit/plugins/copilot/hooks/after_sync.sh +7 -14
- package/toolkit/plugins/copilot/hooks/before_plugin_disable.sh +4 -4
- package/toolkit/plugins/copilot/instructions/rnex-copilot-integration.md +0 -1
- package/toolkit/plugins/copilot/plugin.yaml +0 -2
- package/toolkit/plugins/cursor/README.md +0 -2
- package/toolkit/plugins/cursor/hooks/after_sync.sh +12 -17
- package/toolkit/plugins/cursor/instructions/rnex-cursor-integration.md +0 -1
- package/toolkit/plugins/cursor/plugin.yaml +0 -2
- package/toolkit/plugins/gemini/README.md +2 -2
- package/toolkit/plugins/gemini/hooks/after_sync.sh +43 -6
- package/toolkit/plugins/gemini/hooks/before_plugin_disable.sh +1 -0
- package/toolkit/plugins/gemini/instructions/rnex-gemini-integration.md +1 -1
- package/toolkit/plugins/gemini/plugin.yaml +2 -2
- package/toolkit/plugins/karpathy-llm/README.md +8 -3
- package/toolkit/plugins/karpathy-llm/agents/rnex-wiki-curator.agent.md +1 -1
- package/toolkit/plugins/karpathy-llm/hooks/after_sync.sh +63 -8
- package/toolkit/plugins/karpathy-llm/hooks/git_post-commit.sh +20 -0
- package/toolkit/plugins/karpathy-llm/hooks/git_post-merge.sh +20 -0
- package/toolkit/plugins/karpathy-llm/hooks/git_pre-commit.sh +20 -0
- package/toolkit/plugins/karpathy-llm/hooks/git_pre-push.sh +20 -0
- package/toolkit/plugins/karpathy-llm/instructions/rnex-scaffolding-meta-prompt.md +5 -5
- package/toolkit/plugins/karpathy-llm/instructions/rnex-wiki-architecture.md +6 -6
- package/toolkit/plugins/karpathy-llm/plugin.yaml +5 -2
- package/toolkit/plugins/karpathy-llm/rules/behavioral.md +1 -1
- package/toolkit/plugins/karpathy-llm/skills/wiki-ingest.md +7 -6
- package/toolkit/plugins/karpathy-llm/skills/wiki-lint.md +7 -6
- package/toolkit/plugins/karpathy-llm/templates/rnex-wiki-page.sample.md +2 -2
- package/toolkit/plugins/windsurf/README.md +0 -2
- package/toolkit/plugins/windsurf/hooks/after_sync.sh +2 -6
- package/toolkit/plugins/windsurf/instructions/rnex-windsurf-integration.md +0 -1
- package/toolkit/plugins/windsurf/plugin.yaml +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ All notable changes to Repo Nexus (`rnex`) will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.7.26] - 2026-10-21
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Multi-Source Intake Configuration for Karpathy LLM Wiki (`sources`)**:
|
|
12
|
+
- Replaced single `raw_dir` scalar configuration with multi-value `sources` list under `plugins.karpathy-llm.sources`.
|
|
13
|
+
- Added pure POSIX `/bin/sh` glob and directory resolver (`resolve_plugin_sources`) supporting both explicit directory paths (e.g. `docs`) and recursive/single-level glob patterns (e.g. `"repos/**/README.md"`, `repos/*/README.md`).
|
|
14
|
+
- Implemented automatic exclusion of member repositories disabled locally or globally (`enabled: false`) from resolved intake paths.
|
|
15
|
+
- Enforced two-level configuration precedence: `.local.rnex.yaml` takes full precedence over `rnex.yaml` when defining `sources`.
|
|
16
|
+
- Added automatic directory pruning for `.git`, `.rnex`, and `node_modules` during recursive file traversal.
|
|
17
|
+
- Added safe directory provisioning in `rnex sync` that creates explicit directory sources (such as `docs`) while skipping wildcard patterns and file targets.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- **Default Intake Sources**:
|
|
21
|
+
- Default sources for `karpathy-llm` plugin are now `docs` and `"repos/**/README.md"`.
|
|
22
|
+
- Updated `rnex init` templates, `rnex status`, and plugin scaffolding to render and configure multi-line `sources`.
|
|
23
|
+
- Updated plugin lifecycle hooks (`after_sync.sh`, `git_*.sh`) and agentic skills (`wiki-ingest.md`, `wiki-lint.md`) to resolve documentation from `sources`.
|
|
24
|
+
|
|
25
|
+
### Deprecated
|
|
26
|
+
- **Legacy `raw_dir` Configuration**:
|
|
27
|
+
- `plugins.karpathy-llm.raw_dir` is deprecated in favor of `sources`. Workspaces configuring `raw_dir` are automatically read via transparent fallback with a non-fatal deprecation notice advising migration to `sources`.
|
|
28
|
+
|
|
8
29
|
## [0.7.7] - 2026-10-15
|
|
9
30
|
|
|
10
31
|
### Added
|
package/docs/CLI.md
CHANGED
|
@@ -93,7 +93,7 @@ Hooks have access to POSIX helper functions for managing User Skill pointers:
|
|
|
93
93
|
### Karpathy LLM Wiki Plugin
|
|
94
94
|
The `karpathy-llm` plugin uses lifecycle hooks to manage its domain directories:
|
|
95
95
|
- **Default curated knowledge base (`wiki_dir`)**: `.rnex/wiki`
|
|
96
|
-
- **Default
|
|
96
|
+
- **Default intake sources (`sources`)**: `docs` directory and `"repos/**/README.md"` glob pattern (legacy scalar `raw_dir` supported with deprecation notice)
|
|
97
97
|
- **Master navigation index**: `.rnex/wiki/index.md`
|
|
98
98
|
- **Rolling orientation cache**: `.rnex/wiki/hot.md`
|
|
99
99
|
- **Operation log**: `.rnex/wiki/_log.md`
|
|
@@ -64,11 +64,10 @@ repos:
|
|
|
64
64
|
plugins:
|
|
65
65
|
# AI Provider Plugins
|
|
66
66
|
claude:
|
|
67
|
-
instructions: true
|
|
68
67
|
skills: true
|
|
68
|
+
auto_sync_on: SessionStart
|
|
69
69
|
|
|
70
70
|
cursor:
|
|
71
|
-
instructions: true
|
|
72
71
|
skills: true
|
|
73
72
|
|
|
74
73
|
# Knowledge & Agent Protocol Plugins
|
|
@@ -116,7 +115,7 @@ repos:
|
|
|
116
115
|
|
|
117
116
|
plugins:
|
|
118
117
|
gemini:
|
|
119
|
-
|
|
118
|
+
skills: true
|
|
120
119
|
```
|
|
121
120
|
|
|
122
121
|
After modifying configuration files directly, reconcile the workspace state:
|
package/docs/plugins/claude.md
CHANGED
|
@@ -21,8 +21,8 @@ Operational skills, rules, and subagents remain cleanly encapsulated within `.rn
|
|
|
21
21
|
|
|
22
22
|
2. **Native Instruction Support via `CLAUDE.md` & `AGENTS.md`**:
|
|
23
23
|
- Claude Code natively reads `CLAUDE.md` as its primary instructions file; it only falls back to `AGENTS.md` when no `CLAUDE.md` exists in the project.
|
|
24
|
-
- When enabled
|
|
25
|
-
- If
|
|
24
|
+
- When enabled, the Claude plugin automatically synchronizes Repo Nexus routing instructions to `CLAUDE.md` (or merges them cleanly if you already have custom instructions).
|
|
25
|
+
- If the plugin is disabled, the routing block is removed, allowing Claude Code to read `AGENTS.md` directly.
|
|
26
26
|
|
|
27
27
|
3. **Subagent & Skill Execution**:
|
|
28
28
|
- Core skills reside under `.rnex/skills/`.
|
|
@@ -58,15 +58,15 @@ Configure options under `plugins.claude` in `rnex.yaml` or `.local.rnex.yaml`:
|
|
|
58
58
|
```yaml
|
|
59
59
|
plugins:
|
|
60
60
|
claude:
|
|
61
|
-
instructions: true # Sync routing instructions to CLAUDE.md (default: true)
|
|
62
61
|
skills: true # Generate user skills in .claude/skills/ (default: true)
|
|
62
|
+
auto_sync_on: SessionStart # Trigger auto-sync on lifecycle event (default: SessionStart, or false)
|
|
63
63
|
enabled: true # Set to false to disable
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
| Option | Type | Default | Description |
|
|
67
67
|
|:---|:---|:---|:---|
|
|
68
|
-
| `instructions` | boolean | `true` | Merge routing instructions into `CLAUDE.md`. |
|
|
69
68
|
| `skills` | boolean | `true` | Generate user skill pointers in `.claude/skills/rnex-*.md`. |
|
|
69
|
+
| `auto_sync_on` | string/boolean | `SessionStart` | Lifecycle event triggering auto-sync in `.claude/settings.json` (or `false` to disable). |
|
|
70
70
|
| `enabled` | boolean | `true` | Enable or disable the plugin. Overridable in `.local.rnex.yaml`. |
|
|
71
71
|
|
|
72
72
|
---
|
|
@@ -78,7 +78,7 @@ When `claude` is enabled with functional plugins like `karpathy-llm`, it generat
|
|
|
78
78
|
```text
|
|
79
79
|
my-workspace/
|
|
80
80
|
├── AGENTS.md # Universal workspace instructions & routing
|
|
81
|
-
├── CLAUDE.md # Claude-specific instructions
|
|
81
|
+
├── CLAUDE.md # Claude-specific instructions
|
|
82
82
|
├── .claude/
|
|
83
83
|
│ └── skills/ # Zero-logic User Skill pointers
|
|
84
84
|
│ ├── rnex-clone-sync.md
|
package/docs/plugins/copilot.md
CHANGED
|
@@ -11,7 +11,7 @@ The `copilot` plugin integrates GitHub Copilot with Repo Nexus by projecting wor
|
|
|
11
11
|
|
|
12
12
|
GitHub Copilot operates natively within VS Code, Visual Studio, JetBrains, and GitHub.com:
|
|
13
13
|
- **Universal Routing (`AGENTS.md`)**: GitHub Copilot natively reads `AGENTS.md` at the workspace root.
|
|
14
|
-
- **Custom Instructions (`.github/copilot-instructions.md`)**: When
|
|
14
|
+
- **Custom Instructions (`.github/copilot-instructions.md`)**: When enabled, Repo Nexus injects its non-destructive routing block inside `<!-- REPO-NEXUS:START -->` and `<!-- REPO-NEXUS:END -->`. Custom developer rules outside these markers are strictly preserved.
|
|
15
15
|
- **User Skills (`.github/skills/`)**: When `skills: true`, Repo Nexus generates native `SKILL.md` directory bundles (`.github/skills/rnex-<name>/SKILL.md`) with YAML frontmatter, making them automatically discoverable in VS Code and Copilot Chat skill-pickers while redirecting to the underlying agentic skills under `.rnex/skills/` and active plugins.
|
|
16
16
|
|
|
17
17
|
## Configuration
|
|
@@ -21,7 +21,6 @@ Enable in `rnex.yaml`:
|
|
|
21
21
|
```yaml
|
|
22
22
|
plugins:
|
|
23
23
|
copilot:
|
|
24
|
-
instructions: true # Maintain routing in .github/copilot-instructions.md
|
|
25
24
|
skills: true # Generate user skills in .github/skills/
|
|
26
25
|
```
|
|
27
26
|
|
package/docs/plugins/cursor.md
CHANGED
|
@@ -20,7 +20,7 @@ Operational skills, rules, and subagents remain cleanly encapsulated within `.rn
|
|
|
20
20
|
- Contains zero inline heuristics—redirects Cursor directly to the underlying agentic skill protocols inside `.rnex/`.
|
|
21
21
|
|
|
22
22
|
2. **Native Instructions & Rules Support**:
|
|
23
|
-
-
|
|
23
|
+
- Automatically synchronizes Repo Nexus routing instructions to `.cursorrules` and `.cursor/rules/rnex-context.mdc`.
|
|
24
24
|
- Preserves user custom rules and custom sections in `.cursorrules`.
|
|
25
25
|
|
|
26
26
|
3. **Subagent & Skill Execution**:
|
|
@@ -57,14 +57,12 @@ Configure options under `plugins.cursor` in `rnex.yaml` or `.local.rnex.yaml`:
|
|
|
57
57
|
```yaml
|
|
58
58
|
plugins:
|
|
59
59
|
cursor:
|
|
60
|
-
instructions: true # Sync routing instructions to .cursorrules (default: true)
|
|
61
60
|
skills: true # Generate user skills in .cursor/rules/ (default: true)
|
|
62
61
|
enabled: true # Set to false to disable
|
|
63
62
|
```
|
|
64
63
|
|
|
65
64
|
| Option | Type | Default | Description |
|
|
66
65
|
|:---|:---|:---|:---|
|
|
67
|
-
| `instructions` | boolean | `true` | Merge routing instructions into `.cursorrules`. |
|
|
68
66
|
| `skills` | boolean | `true` | Generate user skill pointers in `.cursor/rules/rnex-*.md`. |
|
|
69
67
|
| `enabled` | boolean | `true` | Enable or disable the plugin. Overridable in `.local.rnex.yaml`. |
|
|
70
68
|
|
|
@@ -77,7 +75,7 @@ When `cursor` is enabled with functional plugins like `karpathy-llm`, it generat
|
|
|
77
75
|
```text
|
|
78
76
|
my-workspace/
|
|
79
77
|
├── AGENTS.md # Universal workspace instructions & routing
|
|
80
|
-
├── .cursorrules # Cursor root instructions
|
|
78
|
+
├── .cursorrules # Cursor root instructions
|
|
81
79
|
├── .cursor/
|
|
82
80
|
│ └── rules/ # Zero-logic User Skill pointers
|
|
83
81
|
│ ├── rnex-clone-sync.md
|
package/docs/plugins/gemini.md
CHANGED
|
@@ -20,7 +20,7 @@ Operational skills, rules, and subagents remain cleanly encapsulated within `.rn
|
|
|
20
20
|
- Contains zero inline heuristics—redirects Gemini/Antigravity directly to the underlying agentic skill protocols inside `.rnex/`.
|
|
21
21
|
|
|
22
22
|
2. **Native Instructions Support via `GEMINI.md`**:
|
|
23
|
-
-
|
|
23
|
+
- Automatically synchronizes Repo Nexus routing instructions to `GEMINI.md` for native support by the Google Gemini CLI and Antigravity.
|
|
24
24
|
- Preserves user-defined custom sections in `GEMINI.md` across updates.
|
|
25
25
|
|
|
26
26
|
3. **Subagent & Skill Execution**:
|
|
@@ -57,15 +57,15 @@ Configure options under `plugins.gemini` in `rnex.yaml` or `.local.rnex.yaml`:
|
|
|
57
57
|
```yaml
|
|
58
58
|
plugins:
|
|
59
59
|
gemini:
|
|
60
|
-
instructions: true # Sync routing instructions to GEMINI.md (default: true)
|
|
61
60
|
skills: true # Generate user skills in .agents/skills/ (default: true)
|
|
61
|
+
auto_sync_on: SessionStart # Trigger auto-sync on lifecycle event (default: SessionStart, or false)
|
|
62
62
|
enabled: true # Set to false to disable
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
| Option | Type | Default | Description |
|
|
66
66
|
|:---|:---|:---|:---|
|
|
67
|
-
| `instructions` | boolean | `true` | Merge routing instructions into `GEMINI.md`. |
|
|
68
67
|
| `skills` | boolean | `true` | Generate user skill pointers in `.agents/skills/rnex-*/SKILL.md`. |
|
|
68
|
+
| `auto_sync_on` | string/boolean | `SessionStart` | Lifecycle event triggering auto-sync in `.agents/hooks.json` (or `false` to disable). |
|
|
69
69
|
| `enabled` | boolean | `true` | Enable or disable the plugin. Overridable in `.local.rnex.yaml`. |
|
|
70
70
|
|
|
71
71
|
---
|
|
@@ -76,7 +76,7 @@ When `gemini` is enabled with functional plugins like `karpathy-llm`, it generat
|
|
|
76
76
|
|
|
77
77
|
```text
|
|
78
78
|
my-workspace/
|
|
79
|
-
├── GEMINI.md # Gemini-specific instructions
|
|
79
|
+
├── GEMINI.md # Gemini-specific instructions
|
|
80
80
|
├── .agents/
|
|
81
81
|
│ └── skills/ # Zero-logic User Skill pointers
|
|
82
82
|
│ ├── rnex-clone-sync/
|
package/docs/plugins/index.md
CHANGED
|
@@ -97,12 +97,12 @@ repos_dir: ./repos
|
|
|
97
97
|
plugins:
|
|
98
98
|
# AI Provider Plugins
|
|
99
99
|
claude:
|
|
100
|
-
instructions: true
|
|
101
100
|
skills: true
|
|
101
|
+
auto_sync_on: SessionStart
|
|
102
102
|
|
|
103
103
|
gemini:
|
|
104
|
-
instructions: true
|
|
105
104
|
skills: true
|
|
105
|
+
auto_sync_on: SessionStart
|
|
106
106
|
|
|
107
107
|
# Functional / Knowledge Plugins
|
|
108
108
|
karpathy-llm:
|
|
@@ -93,15 +93,21 @@ plugins:
|
|
|
93
93
|
karpathy-llm:
|
|
94
94
|
# Directory paths relative to workspace root (defaults shown)
|
|
95
95
|
wiki_dir: .rnex/wiki # Directory for curated atomic markdown pages
|
|
96
|
-
|
|
96
|
+
sources: # Intake documents: directories and/or glob patterns
|
|
97
|
+
- docs # directory: all files (hidden dirs and node_modules pruned)
|
|
98
|
+
- "repos/**/README.md" # recursive glob (quote it); disabled repos are excluded
|
|
99
|
+
# A sources list in .local.rnex.yaml replaces this list entirely.
|
|
97
100
|
|
|
98
101
|
# Automated Git hook trigger for wiki verification
|
|
99
102
|
# Options: git-post-merge, git-post-commit, git-pre-commit, git-pre-push, manual
|
|
100
103
|
lint_trigger: manual
|
|
101
104
|
|
|
102
|
-
# Notify developer when changes are committed to
|
|
105
|
+
# Notify developer when changes are committed to intake sources or .rnex/wiki/
|
|
103
106
|
notify_on_changes: true
|
|
104
107
|
|
|
108
|
+
# Ingest member repository READMEs into atomic wiki pages
|
|
109
|
+
ingest_member_readmes: true
|
|
110
|
+
|
|
105
111
|
# Enable or disable
|
|
106
112
|
enabled: true
|
|
107
113
|
```
|
|
@@ -109,17 +115,33 @@ plugins:
|
|
|
109
115
|
| Option | Type | Default | Description |
|
|
110
116
|
|:---|:---|:---|:---|
|
|
111
117
|
| `wiki_dir` | string | `.rnex/wiki` | Directory containing curated atomic markdown pages. |
|
|
112
|
-
| `
|
|
118
|
+
| `sources` | list | `[docs, "repos/**/README.md"]` | Intake directories and/or glob patterns relative to workspace root. Overridable in `.local.rnex.yaml`. |
|
|
119
|
+
| `raw_dir` | string | *(deprecated)* | Deprecated legacy intake directory. Transparently treated as a single `sources` entry with a migration warning. |
|
|
113
120
|
| `lint_trigger` | string | `manual` | Git hook event that triggers wiki change detection (`git-post-merge`, `git-post-commit`, `git-pre-commit`, `git-pre-push`, `manual`). |
|
|
114
|
-
| `notify_on_changes` | boolean | `true` | Show notification banner when changes are committed to
|
|
121
|
+
| `notify_on_changes` | boolean | `true` | Show notification banner when changes are committed to intake sources or `.rnex/wiki/`. |
|
|
122
|
+
| `ingest_member_readmes` | boolean | `true` | Automatically ingest member repository READMEs into atomic wiki pages. |
|
|
115
123
|
| `enabled` | boolean | `true` | Enable or disable the plugin. Overridable in `.local.rnex.yaml`. |
|
|
116
124
|
|
|
117
125
|
---
|
|
118
126
|
|
|
127
|
+
### Intake Sources (`sources`)
|
|
128
|
+
|
|
129
|
+
The `sources` setting defines where the Karpathy LLM Wiki discovers raw intake documents for `wiki-ingest` and change verification:
|
|
130
|
+
|
|
131
|
+
- **Directory Paths (e.g. `docs`, `notes`)**: Repo Nexus recursively scans the directory for all files. Hidden directories (starting with `.`) and `node_modules` are automatically pruned.
|
|
132
|
+
- **Recursive Globs (e.g. `"repos/**/README.md"`)**: Pure POSIX `/bin/sh` pattern resolution matches files at arbitrary directory depths. Always quote globs containing `*` in YAML. Directories named `.git`, `.rnex`, and `node_modules` are pruned during traversal.
|
|
133
|
+
- **Single-Level Globs (e.g. `repos/*/README.md` or `docs/*.md`)**: Matches files at a fixed directory level.
|
|
134
|
+
- **Active Repository Filtering**: Any resolved path located within `repos/<name>/` is checked against member repository status. If a repository is disabled (`enabled: false`) in `rnex.yaml` or `.local.rnex.yaml`, its files are automatically excluded.
|
|
135
|
+
- **Two-Level Configuration Precedence**: If `sources` is declared in `.local.rnex.yaml`, it completely overrides the `sources` list defined in `rnex.yaml`.
|
|
136
|
+
- **Legacy Fallback & Migration**: Existing configurations with `raw_dir: ./path` continue to work without disruption. Repo Nexus reads `raw_dir` as a single-element sources list and emits a non-fatal deprecation notice advising you to migrate to `sources`.
|
|
137
|
+
- **Directory Provisioning**: When running `rnex sync`, explicit directory entries (such as `docs`) are created automatically if missing. Glob patterns (containing `*`, `?`, or `[`) and file targets are never converted into directories.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
119
141
|
## Automated Git Hooks Integration
|
|
120
142
|
|
|
121
143
|
When workspace Git hooks are installed (`rnex hooks install`), the `karpathy-llm` plugin links directly into Git events:
|
|
122
|
-
- **`post-merge`**: Detects if incoming commits touched
|
|
144
|
+
- **`post-merge`**: Detects if incoming commits touched intake sources or `.rnex/wiki/`, warning the developer to review or re-lint.
|
|
123
145
|
- **`post-commit`**: Reminds the developer to run `wiki-lint` or `wiki-ingest` if wiki files were committed.
|
|
124
146
|
- **`pre-commit` & `pre-push`**: Emits trigger notices if unvalidated wiki files are staged or about to be pushed.
|
|
125
147
|
|
package/docs/plugins/windsurf.md
CHANGED
|
@@ -20,7 +20,7 @@ Operational skills, rules, and subagents remain cleanly encapsulated within `.rn
|
|
|
20
20
|
- Contains zero inline heuristics—redirects Cascade directly to the underlying agentic skill protocols inside `.rnex/`.
|
|
21
21
|
|
|
22
22
|
2. **Native Instructions Support via `.windsurfrules`**:
|
|
23
|
-
-
|
|
23
|
+
- Automatically synchronizes Repo Nexus routing instructions to `.windsurfrules`.
|
|
24
24
|
- Preserves user custom rules and custom sections in `.windsurfrules`.
|
|
25
25
|
|
|
26
26
|
3. **Subagent & Skill Execution**:
|
|
@@ -57,14 +57,12 @@ Configure options under `plugins.windsurf` in `rnex.yaml` or `.local.rnex.yaml`:
|
|
|
57
57
|
```yaml
|
|
58
58
|
plugins:
|
|
59
59
|
windsurf:
|
|
60
|
-
instructions: true # Sync routing instructions to .windsurfrules (default: true)
|
|
61
60
|
skills: true # Generate user skills in .windsurf/rules/ (default: true)
|
|
62
61
|
enabled: true # Set to false to disable
|
|
63
62
|
```
|
|
64
63
|
|
|
65
64
|
| Option | Type | Default | Description |
|
|
66
65
|
|:---|:---|:---|:---|
|
|
67
|
-
| `instructions` | boolean | `true` | Merge routing instructions into `.windsurfrules`. |
|
|
68
66
|
| `skills` | boolean | `true` | Generate user skill pointers in `.windsurf/rules/rnex-*.md`. |
|
|
69
67
|
| `enabled` | boolean | `true` | Enable or disable the plugin. Overridable in `.local.rnex.yaml`. |
|
|
70
68
|
|
|
@@ -77,7 +75,7 @@ When `windsurf` is enabled with functional plugins like `karpathy-llm`, it gener
|
|
|
77
75
|
```text
|
|
78
76
|
my-workspace/
|
|
79
77
|
├── AGENTS.md # Universal workspace instructions & routing
|
|
80
|
-
├── .windsurfrules # Windsurf instructions
|
|
78
|
+
├── .windsurfrules # Windsurf instructions
|
|
81
79
|
├── .windsurf/
|
|
82
80
|
│ └── rules/ # Zero-logic User Skill pointers
|
|
83
81
|
│ ├── rnex-clone-sync.md
|
package/docs/rnex.example.yaml
CHANGED
|
@@ -84,26 +84,28 @@ git_hooks: true
|
|
|
84
84
|
# AGENTS.md at workspace root is the universal cross-tool standard. Assistants that read AGENTS.md
|
|
85
85
|
# all the time need no separate top-level instructions file. Assistants with native
|
|
86
86
|
# formats (Claude with CLAUDE.md, Gemini with GEMINI.md, Cursor with .cursorrules, Windsurf with .windsurfrules)
|
|
87
|
-
# have their instruction files maintained when their plugin is enabled
|
|
87
|
+
# have their instruction files maintained automatically when their plugin is enabled.
|
|
88
88
|
# Agentic skills live self-contained inside .rnex/skills/ (core) and .rnex/plugins/<plugin>/skills/ (plugins).
|
|
89
89
|
# Provider plugins generate zero-logic User Skills (prefixed with rnex-) into IDE-specific skill directories
|
|
90
90
|
# linking directly to the agentic skill protocols inside .rnex/.
|
|
91
91
|
|
|
92
92
|
plugins:
|
|
93
93
|
# claude:
|
|
94
|
-
#
|
|
95
|
-
#
|
|
94
|
+
# skills: true # generate user skills in .claude/skills/ (default: true)
|
|
95
|
+
# auto_sync_on: SessionStart # trigger auto-sync on lifecycle event (default: SessionStart, or false)
|
|
96
96
|
# gemini:
|
|
97
|
-
#
|
|
98
|
-
#
|
|
97
|
+
# skills: true # generate user skills in .agents/skills/ (default: true)
|
|
98
|
+
# auto_sync_on: SessionStart # trigger auto-sync on lifecycle event (default: SessionStart, or false)
|
|
99
99
|
# cursor:
|
|
100
|
-
#
|
|
101
|
-
# skills: true # generate user skills in .cursor/rules/ (default: true)
|
|
100
|
+
# skills: true # generate user skills in .cursor/rules/ (default: true)
|
|
102
101
|
# windsurf:
|
|
103
|
-
#
|
|
104
|
-
# skills: true # generate user skills in .windsurf/rules/ (default: true)
|
|
102
|
+
# skills: true # generate user skills in .windsurf/rules/ (default: true)
|
|
105
103
|
# karpathy-llm:
|
|
106
|
-
#
|
|
104
|
+
# sources: # Intake documents: directories and/or glob patterns (default below)
|
|
105
|
+
# - docs # directory: all files (hidden dirs and node_modules pruned)
|
|
106
|
+
# - "repos/**/README.md" # recursive glob (quote it); disabled repos are excluded
|
|
107
|
+
# # A sources list in .local.rnex.yaml replaces this list entirely.
|
|
108
|
+
# # Legacy 'raw_dir' is still read as a single source (deprecated).
|
|
107
109
|
# wiki_dir: ".rnex/wiki" # Directory for curated atomic markdown pages (default: .rnex/wiki)
|
|
108
110
|
# lint_trigger: "manual" # Runs manually via 'rnex sync' or validation checklists (git-post-merge, git-post-commit, git-pre-commit, git-pre-push, manual)
|
|
109
111
|
# notify_on_changes: true # Show notification when changes are committed to ./docs or .rnex/wiki
|
package/lib/ai.sh
CHANGED
|
@@ -495,6 +495,96 @@ clean_provider_agents() {
|
|
|
495
495
|
rmdir "$_ag_dir" 2>/dev/null || true
|
|
496
496
|
}
|
|
497
497
|
|
|
498
|
+
clean_claude_auto_sync_hook() {
|
|
499
|
+
_settings="$1"
|
|
500
|
+
[ -f "$_settings" ] || return 0
|
|
501
|
+
if grep -q "auto-sync.sh" "$_settings" 2>/dev/null; then
|
|
502
|
+
_tmp="$(mktemp)"
|
|
503
|
+
awk '
|
|
504
|
+
/\{[ \t]*"command"[ \t]*:[ \t]*"\.rnex\/bin\/auto-sync\.sh"[ \t]*\}/ { next }
|
|
505
|
+
/"command"[ \t]*:[ \t]*"\.rnex\/bin\/auto-sync\.sh"/ { next }
|
|
506
|
+
{ print }
|
|
507
|
+
' "$_settings" > "$_tmp"
|
|
508
|
+
_clean="$(sed -e 's/"hooks"//g' -e 's/"SessionStart"//g' < "$_tmp" | tr -d ' \t\r\n[]{}:,"')"
|
|
509
|
+
if [ -z "$_clean" ]; then
|
|
510
|
+
rm -f "$_tmp" "$_settings"
|
|
511
|
+
else
|
|
512
|
+
awk '
|
|
513
|
+
{ lines[NR] = $0 }
|
|
514
|
+
END {
|
|
515
|
+
for (i = 1; i <= NR; i++) {
|
|
516
|
+
if (i < NR && lines[i] ~ /,[ \t]*$/) {
|
|
517
|
+
next_is_bracket = 0
|
|
518
|
+
for (j = i + 1; j <= NR; j++) {
|
|
519
|
+
if (lines[j] ~ /^[ \t]*$/) continue
|
|
520
|
+
if (lines[j] ~ /^[ \t]*[\]\}]/) next_is_bracket = 1
|
|
521
|
+
break
|
|
522
|
+
}
|
|
523
|
+
if (next_is_bracket) {
|
|
524
|
+
sub(/,[ \t]*$/, "", lines[i])
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
print lines[i]
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
' "$_tmp" > "$_settings"
|
|
531
|
+
rm -f "$_tmp"
|
|
532
|
+
fi
|
|
533
|
+
fi
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
clean_agents_auto_sync_hook() {
|
|
537
|
+
_hooks="$1"
|
|
538
|
+
[ -f "$_hooks" ] || return 0
|
|
539
|
+
if grep -q '"rnex-auto-sync"' "$_hooks" 2>/dev/null; then
|
|
540
|
+
_tmp="$(mktemp)"
|
|
541
|
+
awk '
|
|
542
|
+
BEGIN { skip=0; depth=0 }
|
|
543
|
+
/"rnex-auto-sync"[ \t]*:[ \t]*\{/ { skip=1; depth=1; next }
|
|
544
|
+
skip {
|
|
545
|
+
for (i=1; i<=length($0); i++) {
|
|
546
|
+
c = substr($0, i, 1)
|
|
547
|
+
if (c == "{") depth++
|
|
548
|
+
if (c == "}") {
|
|
549
|
+
depth--
|
|
550
|
+
if (depth == 0) {
|
|
551
|
+
skip = 0
|
|
552
|
+
next
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
next
|
|
557
|
+
}
|
|
558
|
+
{ print }
|
|
559
|
+
' "$_hooks" > "$_tmp"
|
|
560
|
+
_clean="$(tr -d " \t\r\n{}" < "$_tmp")"
|
|
561
|
+
if [ -z "$_clean" ]; then
|
|
562
|
+
rm -f "$_tmp" "$_hooks"
|
|
563
|
+
else
|
|
564
|
+
awk '
|
|
565
|
+
{ lines[NR] = $0 }
|
|
566
|
+
END {
|
|
567
|
+
for (i = 1; i <= NR; i++) {
|
|
568
|
+
if (i < NR && lines[i] ~ /,[ \t]*$/) {
|
|
569
|
+
next_is_brace = 0
|
|
570
|
+
for (j = i + 1; j <= NR; j++) {
|
|
571
|
+
if (lines[j] ~ /^[ \t]*$/) continue
|
|
572
|
+
if (lines[j] ~ /^[ \t]*\}/) next_is_brace = 1
|
|
573
|
+
break
|
|
574
|
+
}
|
|
575
|
+
if (next_is_brace) {
|
|
576
|
+
sub(/,[ \t]*$/, "", lines[i])
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
print lines[i]
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
' "$_tmp" > "$_hooks"
|
|
583
|
+
rm -f "$_tmp"
|
|
584
|
+
fi
|
|
585
|
+
fi
|
|
586
|
+
}
|
|
587
|
+
|
|
498
588
|
sync_rnex_base_assets() {
|
|
499
589
|
_src_toolkit=""
|
|
500
590
|
if [ -d "$SCRIPT_LOCATION/toolkit" ]; then
|
package/lib/commands/init.sh
CHANGED
|
@@ -107,15 +107,7 @@ cmd_init() {
|
|
|
107
107
|
_pdir="$(find_plugin_dir "$_p" 2>/dev/null || true)"
|
|
108
108
|
_cfg_lines=""
|
|
109
109
|
if [ -n "$_pdir" ] && [ -f "$_pdir/plugin.yaml" ]; then
|
|
110
|
-
_cfg_lines="$(
|
|
111
|
-
/^config_defaults:[ ]*$/ || /^config_defaults:[ ]*#/ { in_c=1; next }
|
|
112
|
-
in_c && /^[^ #]/ { exit }
|
|
113
|
-
in_c && /^[ ]*[a-zA-Z0-9_.-]+:[ ]*/ {
|
|
114
|
-
line = $0
|
|
115
|
-
sub(/^[ ]*/, " ", line)
|
|
116
|
-
print line
|
|
117
|
-
}
|
|
118
|
-
' "$_pdir/plugin.yaml")"
|
|
110
|
+
_cfg_lines="$(plugin_config_default_lines "$_pdir/plugin.yaml")"
|
|
119
111
|
fi
|
|
120
112
|
if [ -n "$_cfg_lines" ]; then
|
|
121
113
|
_init_plugins="${_init_plugins} ${_p}:\n${_cfg_lines}\n"
|
package/lib/commands/plugin.sh
CHANGED
|
@@ -99,6 +99,10 @@ cmd_plugin_info() {
|
|
|
99
99
|
[ -n "$_skill_target" ] && _desc="$(printf '%s' "$_desc" | sed -e "s|{skill_dir}|$_skill_target|g")"
|
|
100
100
|
|
|
101
101
|
_cur="$(yaml_plugin_get "$_name" "$_opt" 2>/dev/null || true)"
|
|
102
|
+
if [ -z "$_cur" ]; then
|
|
103
|
+
# List-valued options (e.g. sources): show the effective list, comma-separated
|
|
104
|
+
_cur="$(get_plugin_config_list "$_name" "$_opt" 2>/dev/null | awk '{ out = (NR == 1) ? $0 : out ", " $0 } END { if (NR) print out }')"
|
|
105
|
+
fi
|
|
102
106
|
if [ -z "$_cur" ]; then
|
|
103
107
|
_cur="$(awk -v k="$_opt" '
|
|
104
108
|
/^config_defaults:[ ]*$/ || /^config_defaults:[ ]*#/ { in_c=1; next }
|
package/lib/commands/status.sh
CHANGED
|
@@ -213,10 +213,23 @@ cmd_status() {
|
|
|
213
213
|
else
|
|
214
214
|
printf ' %b●%b %-18s %b(v%s)%b %s\n' "$_G" "$_NC" "$_pname" "$_DIM" "${_ver:-0.1.0}" "$_NC" "${_desc:+- $_desc}"
|
|
215
215
|
printf ' %bScoped directory: .rnex/plugins/%s%b\n' "$_DIM" "$_pname" "$_NC"
|
|
216
|
-
if [ -n "$_pdir" ] &&
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"$(provider_option_enabled "$_pname" "skills" && echo "true" || echo "false")"
|
|
216
|
+
if [ -n "$_pdir" ] && [ -f "$_pdir/plugin.yaml" ]; then
|
|
217
|
+
_opts=""
|
|
218
|
+
if grep -q "skills:" "$_pdir/plugin.yaml" 2>/dev/null || [ -n "$(yaml_plugin_get "$_pname" "skills" 2>/dev/null)" ]; then
|
|
219
|
+
_opts="${_opts:+$_opts, }skills=$(provider_option_enabled "$_pname" "skills" && echo "true" || echo "false")"
|
|
220
|
+
fi
|
|
221
|
+
if grep -q "auto_sync_on:" "$_pdir/plugin.yaml" 2>/dev/null || grep -q "autoSyncOn:" "$_pdir/plugin.yaml" 2>/dev/null || [ -n "$(yaml_plugin_get "$_pname" "auto_sync_on" 2>/dev/null)" ] || [ -n "$(yaml_plugin_get "$_pname" "autoSyncOn" 2>/dev/null)" ]; then
|
|
222
|
+
_aso="$(yaml_plugin_get "$_pname" "auto_sync_on" 2>/dev/null || true)"
|
|
223
|
+
[ -z "$_aso" ] && _aso="$(yaml_plugin_get "$_pname" "autoSyncOn" 2>/dev/null || true)"
|
|
224
|
+
[ -z "$_aso" ] && _aso="SessionStart"
|
|
225
|
+
_opts="${_opts:+$_opts, }auto_sync_on=$_aso"
|
|
226
|
+
fi
|
|
227
|
+
if [ -n "$_opts" ]; then
|
|
228
|
+
printf ' %b↳ Options: %s%b\n' "$_DIM" "$_opts" "$_NC"
|
|
229
|
+
fi
|
|
230
|
+
if [ "$_pname" = "karpathy-llm" ] && [ -n "$(plugin_legacy_raw_dir "$_pname" 2>/dev/null)" ]; then
|
|
231
|
+
printf ' %b↳ [!] Deprecated: raw_dir — replace it with a sources list and run rnex sync%b\n' "$_Y" "$_NC"
|
|
232
|
+
fi
|
|
220
233
|
fi
|
|
221
234
|
fi
|
|
222
235
|
else
|
package/lib/hooks.sh
CHANGED
|
@@ -146,14 +146,35 @@ run_plugin_git_hooks() {
|
|
|
146
146
|
|
|
147
147
|
if [ -n "$_h_cand" ] && [ -f "$_h_cand" ]; then
|
|
148
148
|
chmod +x "$_h_cand" 2>/dev/null || true
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"$
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
if [ -n "$_stdin_data" ]; then
|
|
150
|
+
printf '%s\n' "$_stdin_data" | env \
|
|
151
|
+
NEXUS_DIR="$RNEX_ROOT" \
|
|
152
|
+
WORKSPACE_YAML="$RNEX_ROOT/${RNEX_CONFIG_FILE:-rnex.yaml}" \
|
|
153
|
+
WORKSPACE_LOCAL_YAML="$RNEX_ROOT/${RNEX_LOCAL_CONFIG_FILE:-.local.rnex.yaml}" \
|
|
154
|
+
RNEX_ROOT="$RNEX_ROOT" \
|
|
155
|
+
RNEX_CONFIG_MERGED="$RNEX_CONFIG_MERGED" \
|
|
156
|
+
RNEX_PLUGIN_DIR="$RNEX_PLUGIN_DIR" \
|
|
157
|
+
RNEX_CMD="$RNEX_CMD" \
|
|
158
|
+
RNEX_ARGS="$RNEX_ARGS" \
|
|
159
|
+
RNEX_QUIET="$RNEX_QUIET" \
|
|
160
|
+
RNEX_CONFIG_FILE="${RNEX_CONFIG_FILE:-rnex.yaml}" \
|
|
161
|
+
RNEX_LOCAL_CONFIG_FILE="${RNEX_LOCAL_CONFIG_FILE:-.local.rnex.yaml}" \
|
|
162
|
+
"$_h_cand" "$@" || true
|
|
163
|
+
else
|
|
164
|
+
env \
|
|
165
|
+
NEXUS_DIR="$RNEX_ROOT" \
|
|
166
|
+
WORKSPACE_YAML="$RNEX_ROOT/${RNEX_CONFIG_FILE:-rnex.yaml}" \
|
|
167
|
+
WORKSPACE_LOCAL_YAML="$RNEX_ROOT/${RNEX_LOCAL_CONFIG_FILE:-.local.rnex.yaml}" \
|
|
168
|
+
RNEX_ROOT="$RNEX_ROOT" \
|
|
169
|
+
RNEX_CONFIG_MERGED="$RNEX_CONFIG_MERGED" \
|
|
170
|
+
RNEX_PLUGIN_DIR="$RNEX_PLUGIN_DIR" \
|
|
171
|
+
RNEX_CMD="$RNEX_CMD" \
|
|
172
|
+
RNEX_ARGS="$RNEX_ARGS" \
|
|
173
|
+
RNEX_QUIET="$RNEX_QUIET" \
|
|
174
|
+
RNEX_CONFIG_FILE="${RNEX_CONFIG_FILE:-rnex.yaml}" \
|
|
175
|
+
RNEX_LOCAL_CONFIG_FILE="${RNEX_LOCAL_CONFIG_FILE:-.local.rnex.yaml}" \
|
|
176
|
+
"$_h_cand" "$@" || true
|
|
177
|
+
fi
|
|
157
178
|
fi
|
|
158
179
|
done
|
|
159
180
|
}
|