repo-nexus 0.5.5 → 0.5.7

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 CHANGED
@@ -8,6 +8,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  ## [Unreleased]
9
9
 
10
10
  ### Added
11
+ - **AI Provider Plugins for Claude, Gemini, Cursor, and Windsurf**:
12
+ - Built-in provider plugins (`toolkit/plugins/claude/`, `toolkit/plugins/gemini/`, `toolkit/plugins/cursor/`, `toolkit/plugins/windsurf/`) alongside `copilot`.
13
+ - Native instructions synthesis and sync for each provider: `CLAUDE.md`, `GEMINI.md`, `.cursorrules` (and `.cursor/rules/repo-nexus.mdc`), and `.windsurfrules`.
14
+ - Standardized prompt mirroring to `.claude/commands/`, `.gemini/prompts/`, `.cursor/prompts/`, and `.windsurf/prompts/`.
15
+ - Skill mirroring to `.claude/skills/`, `.gemini/skills/`, `.cursor/skills/`, and `.windsurf/skills/`.
16
+ - Granular configuration options per plugin (`instructions: true|false`, `prompts: true|false`, `skills: true|false`).
17
+ - Added `--claude`, `--gemini`, `--cursor`, and `--windsurf` initialization flags to `rnex init`.
18
+ - Diagnostics and configurable provider options displayed in `rnex status`.
19
+ - **Unified Single-Process Workspace Reconcile & Upgrade (`rnex fix`)**:
20
+ - Merged configuration version updates directly into `rnex fix` as a single, idempotent process.
21
+ - Automatically migrates older workspace manifests to the current CLI version on `rnex fix` without requiring separate update commands.
22
+ - `rnex update` and `rnex upgrade` are maintained as clean aliases pointing directly to `rnex fix`.
11
23
  - **Explicit `git_hooks` Workspace Configuration (`rnex.yaml` & `.local.rnex.yaml`)**:
12
24
  - Top-level `git_hooks: true|false` setting establishes the workspace configuration as the single source of truth for automated Git hooks.
13
25
  - Two-level configuration support allowing per-workstation overrides in `.local.rnex.yaml` (e.g. keeping hooks globally enabled in `rnex.yaml` while disabling locally via `rnex hooks uninstall --local`).
@@ -16,6 +28,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
28
  - Interactive `rnex init` determines and records `git_hooks` preference upfront in new workspaces.
17
29
  - Workspace schema migration in `rnex update` and `rnex fix -y` non-destructively inserts `git_hooks` into older configurations.
18
30
  - `rnex status` and `rnex hooks status` display configuration state alongside runtime Git hooks status.
31
+ - **Modular GitHub Copilot Plugin & Extensible Provider Sync (`plugins: copilot: ...`)**:
32
+ - Encapsulated GitHub Copilot integration as a built-in Repo Nexus plugin (`copilot`) located in `toolkit/plugins/copilot/`.
33
+ - Extensible configuration options per provider under `plugins:` in `rnex.yaml` and `.local.rnex.yaml`:
34
+ - `prompts: true|false`: Syncs operational prompts into `.github/prompts/*.prompt.md` with YAML frontmatter for VS Code Copilot Chat prompt picker & slash commands.
35
+ - `skills: true|false`: Syncs agent skills into `.github/skills/<name>/SKILL.md` for Copilot Agent mode & `gh skill`.
36
+ - `instructions: true|false`: Synthesizes workspace routing and active plugin guidelines into `.github/copilot-instructions.md`, preserving manual user instructions outside `<!-- REPO-NEXUS -->` markers.
37
+ - `agents: true|false`: Syncs active plugin custom agents into `.github/agents/*.agent.md` and Copilot skills.
38
+ - `enabled: false`: Allows local machine overrides in `.local.rnex.yaml` without altering team configuration.
39
+ - Decoupled cross-plugin asset discovery: `copilot` provider inspects all active plugins (e.g. `karpathy-llm`) and mirrors their prompts, workflows, skills, agents, and guidelines without introducing plugin dependencies.
40
+ - CLI management via `rnex plugin enable [--local] copilot`, `rnex plugin disable [--local] copilot`, and `rnex plugin info copilot`.
41
+ - Added `--copilot` initialization flag to `rnex init` enabling the plugin in newly generated workspaces.
42
+ - Clean reconciliation in `rnex fix`: safely removes `.github/prompts/`, `.github/skills/`, `.github/agents/`, and `.github/copilot-instructions.md` when disabled or when specific target options are toggled off.
43
+ - Diagnostics and configurable options reporting integrated into `rnex status`.
44
+
45
+ ### Changed
46
+ - **Removed `ai_instructions` Configuration in Favor of AI Provider Plugins**:
47
+ - Removed the legacy `ai_instructions` configuration key. `AGENTS.md` is now the workspace standard.
48
+ - Users choosing provider-specific files (`CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`) enable the respective AI provider plugin (`claude`, `gemini`, `cursor`, `windsurf`).
49
+ - When an AI provider plugin is enabled, `rnex fix` does not enforce or force-recreate `AGENTS.md`. If all provider plugins are disabled, `AGENTS.md` is cleanly restored as the fallback default.
50
+ - Older configurations specifying `ai_instructions: CLAUDE.md | GEMINI.md | .cursorrules` are automatically migrated to enable the respective plugin and stripped of the legacy key during `rnex fix`.
51
+
52
+ ### Fixed
53
+ - **Variable Shadowing and Directory Creation in Hook / Init Synchronization**:
54
+ - Fixed variable name shadowing (`_target_dir`) across `cmd_init` and provider sync routines in POSIX shell.
55
+ - Ensured target directories are created before moving temporary hook files in `_create_hook_script`.
19
56
 
20
57
  ### Fixed
21
58
  - **Git Hooks Self-Rewrite & Wrapper Preservation**:
package/README.md CHANGED
@@ -188,7 +188,7 @@ rnex list
188
188
  # Inspect workspace health, active repos, and plugin status
189
189
  rnex status
190
190
 
191
- # Reconcile workspace, plugins, and member .rnex/ directories (alias: sync)
191
+ # Reconcile workspace, sync plugins, and upgrade config in a single pass (aliases: sync, update, upgrade)
192
192
  rnex fix
193
193
 
194
194
  # Unregister and delete a repository
@@ -215,7 +215,81 @@ rnex plugin enable karpathy-llm
215
215
  rnex plugin disable karpathy-llm
216
216
  ```
217
217
 
218
- ### Built-in Plugin: `karpathy-llm`
218
+ ### Built-in Plugins
219
+
220
+ #### 1. `copilot`
221
+ The `copilot` plugin provides GitHub Copilot integration, automatically mirroring workspace and active plugin assets:
222
+ * **Prompts (`.github/prompts/*.prompt.md`)**: Formatted with YAML frontmatter (`name`, `description`) for the VS Code Copilot Chat prompt picker and slash commands.
223
+ * **Agent Skills (`.github/skills/<name>/SKILL.md`)**: Configured for GitHub Copilot Agent mode and `gh skill`.
224
+ * **Custom Agents (`.github/agents/*.agent.md`)**: Active plugins' agent definitions mirrored for Copilot workspace custom agents.
225
+ * **Instructions (`.github/copilot-instructions.md`)**: Synthesized workspace routing and active plugin guidelines, preserving manual user instructions.
226
+ * **Configurable Options**:
227
+ ```yaml
228
+ plugins:
229
+ copilot:
230
+ prompts: true # mirror prompts to .github/prompts/*.prompt.md (default: true)
231
+ skills: true # mirror skills to .github/skills/<name>/SKILL.md (default: true)
232
+ instructions: true # mirror guidelines to .github/copilot-instructions.md (default: true)
233
+ agents: true # mirror custom agents to .github/agents/*.agent.md (default: true)
234
+ ```
235
+
236
+ #### 2. `claude`
237
+ The `claude` plugin integrates Anthropic's Claude Code and Claude CLI:
238
+ * **Instructions (`CLAUDE.md`)**: Manages the root `CLAUDE.md` routing context, replacing `AGENTS.md`.
239
+ * **Slash Commands (`.claude/commands/*.md`)**: Standardized commands (`/rnex-cross-repo-feature`, etc.) for Claude Code.
240
+ * **Agent Skills (`.claude/skills/<name>/SKILL.md`)**: Mirrored tool skills and workflows.
241
+ * **Configurable Options**:
242
+ ```yaml
243
+ plugins:
244
+ claude:
245
+ instructions: true # maintain CLAUDE.md (default: true)
246
+ prompts: true # mirror slash commands to .claude/commands/ (default: true)
247
+ skills: true # mirror skills to .claude/skills/ (default: true)
248
+ ```
249
+
250
+ #### 3. `gemini`
251
+ The `gemini` plugin integrates Google Gemini CLI and Gemini Code Assist:
252
+ * **Instructions (`GEMINI.md`)**: Manages root `GEMINI.md` context, replacing `AGENTS.md`.
253
+ * **Prompts (`.gemini/prompts/*.prompt.md`)**: Standardized prompts formatted with YAML frontmatter.
254
+ * **Skills (`.gemini/skills/<name>/SKILL.md`)**: Mirrored tool skills for Gemini agents.
255
+ * **Configurable Options**:
256
+ ```yaml
257
+ plugins:
258
+ gemini:
259
+ instructions: true # maintain GEMINI.md (default: true)
260
+ prompts: true # mirror prompts to .gemini/prompts/ (default: true)
261
+ skills: true # mirror skills to .gemini/skills/ (default: true)
262
+ ```
263
+
264
+ #### 4. `cursor`
265
+ The `cursor` plugin integrates the Cursor IDE:
266
+ * **Instructions (`.cursorrules` & `.cursor/rules/repo-nexus.mdc`)**: Synchronizes project routing rules.
267
+ * **Prompts (`.cursor/prompts/*.md`)**: Mirrored prompt files.
268
+ * **Skills (`.cursor/skills/<name>/SKILL.md`)**: Mirrored agent skills.
269
+ * **Configurable Options**:
270
+ ```yaml
271
+ plugins:
272
+ cursor:
273
+ instructions: true # maintain .cursorrules and MDC rule (default: true)
274
+ prompts: true # mirror prompts to .cursor/prompts/ (default: true)
275
+ skills: true # mirror skills to .cursor/skills/ (default: true)
276
+ ```
277
+
278
+ #### 5. `windsurf`
279
+ The `windsurf` plugin integrates the Codeium Windsurf IDE:
280
+ * **Instructions (`.windsurfrules`)**: Synchronizes project routing rules.
281
+ * **Prompts (`.windsurf/prompts/*.md`)**: Mirrored prompt files.
282
+ * **Skills (`.windsurf/skills/<name>/SKILL.md`)**: Mirrored agent skills.
283
+ * **Configurable Options**:
284
+ ```yaml
285
+ plugins:
286
+ windsurf:
287
+ instructions: true # maintain .windsurfrules (default: true)
288
+ prompts: true # mirror prompts to .windsurf/prompts/ (default: true)
289
+ skills: true # mirror skills to .windsurf/skills/ (default: true)
290
+ ```
291
+
292
+ #### 6. `karpathy-llm`
219
293
  The `karpathy-llm` plugin packages Andrej Karpathy's verified LLM agent design patterns, context engineering principles, and the autonomous **Karpathy LLM Wiki** architecture:
220
294
  * **The 4 Cardinal Agent Rules** (`.rnex/plugins/karpathy-llm/rules/behavioral.md`):
221
295
  1. *Think Before Coding:* Formulate explicit assumptions, boundary checks, and trade-offs before writing code.
@@ -248,8 +322,13 @@ repos_dir: ./repos
248
322
  # Automated workspace Git hooks (default: true)
249
323
  git_hooks: true
250
324
 
251
- # Workspace plugins
325
+ # Workspace plugins and tool integrations
252
326
  plugins:
327
+ copilot:
328
+ prompts: true
329
+ skills: true
330
+ instructions: true
331
+ agents: true
253
332
  karpathy-llm: {}
254
333
 
255
334
  # Member repositories (enabled by default)
package/docs/CLI.md CHANGED
@@ -68,30 +68,35 @@ rnex init [options] [directory]
68
68
  #### Arguments & Options
69
69
  - `directory` *(optional)*: Target directory to initialize. Defaults to current working directory (`$PWD`).
70
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
71
  - `--code-workspace [filename]`: Enable VS Code / Cursor multi-root workspace file generation. Defaults to `<directory-name>.code-workspace` if omitted.
73
72
  - `--hooks`: Force-enable automated Git hooks setup during initialization.
74
73
  - `--no-hooks`: Skip Git hooks configuration during initialization.
74
+ - `--copilot`: Enable GitHub Copilot integration plugin (mirrors prompts, skills, agents, and instructions to `.github/`).
75
+ - `--claude`: Enable Anthropic Claude Code plugin (maintains `CLAUDE.md`, mirrors prompts/skills to `.claude/`).
76
+ - `--gemini`: Enable Google Gemini & Antigravity plugin (maintains `GEMINI.md`, mirrors prompts/skills to `.gemini/`).
77
+ - `--cursor`: Enable Cursor IDE plugin (maintains `.cursorrules` / `.cursor/rules/`, mirrors prompts/skills to `.cursor/`).
78
+ - `--windsurf`: Enable Windsurf IDE plugin (maintains `.windsurfrules`, mirrors prompts/skills to `.windsurf/`).
75
79
 
76
80
  #### What it does:
77
81
  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.
82
+ 2. Merges Repo Nexus routing instructions (`<!-- REPO-NEXUS:START -->` ... `<!-- REPO-NEXUS:END -->`) into `AGENTS.md` (or the respective provider file if a provider plugin flag was specified).
79
83
  3. Creates `./repos/` directory with a tracked `.gitkeep`.
80
84
  4. Creates `.rnex/`, `.rnex/plugins/`, and copies standardized prompts to `.rnex/prompts/`.
81
85
  5. Reconciles `.gitignore` to ensure `repos/` and `.local.rnex.yaml` are never tracked by the meta-repo (while keeping `.rnex/` tracked).
82
86
  6. Generates a multi-root `.code-workspace` file if configured.
83
87
  7. Prompts to configure automated workspace Git hooks (`core.hooksPath = .rnex/hooks`) if inside a Git repository.
88
+ 8. Configures and syncs enabled plugins.
84
89
 
85
90
  #### Examples:
86
91
  ```sh
87
- # Initialize in current directory with interactive prompts
92
+ # Initialize in current directory with interactive prompts (creates AGENTS.md)
88
93
  rnex init
89
94
 
90
95
  # Non-interactive initialization for CI or automated setup
91
96
  rnex init -y
92
97
 
93
- # Initialize for Anthropic Claude Code with automated Git hooks
94
- rnex init -y --ai CLAUDE.md --hooks
98
+ # Initialize for Anthropic Claude Code with automated Git hooks (creates CLAUDE.md)
99
+ rnex init -y --claude --hooks
95
100
 
96
101
  # Initialize with VS Code multi-root workspace support
97
102
  rnex init --code-workspace my-team.code-workspace
@@ -144,15 +149,16 @@ rnex fix [options]
144
149
 
145
150
  ### `rnex update` (alias: `upgrade`)
146
151
 
147
- Safely updates an existing workspace's configuration schema and routing instructions to match the currently installed CLI version.
152
+ Safely updates an existing workspace's configuration schema and routing instructions to match the currently installed CLI version as part of the unified `rnex fix` reconciliation process.
148
153
 
149
154
  ```sh
150
155
  rnex update [-y]
151
156
  ```
152
157
 
153
158
  - 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.
159
+ - Non-destructively upgrades the configuration schema and inserts newly introduced keys while strictly preserving existing comments, indentation, and repository declarations.
160
+ - Reconciles AI instructions, active provider plugins, and workspace routing in a single execution.
161
+ - `rnex update` and `rnex upgrade` are aliases that invoke the unified `rnex fix` workflow.
156
162
 
157
163
  ---
158
164
 
@@ -353,14 +359,14 @@ Unsets `core.hooksPath` in Git configuration, removes `.rnex/hooks/`, and record
353
359
  Repo Nexus features a modular plugin architecture where plugin rules, instructions, and templates are scoped strictly under `.rnex/plugins/<plugin-name>/`.
354
360
 
355
361
  ```sh
356
- rnex plugin <list|info|enable|disable> [name]
362
+ rnex plugin <list|info|enable|disable> [options] [name]
357
363
  ```
358
364
 
359
365
  ### Subcommands
360
366
  - **`rnex plugin list`**: Displays all available plugins distributed with `rnex` and highlights enabled plugins.
361
- - **`rnex plugin info <name>`**: Shows description, version, scoped directory, and external template paths for a plugin.
362
- - **`rnex plugin enable <name>`**: Enables a plugin in `rnex.yaml`, copies assets to `.rnex/plugins/<name>/`, and reconciles workspace files.
363
- - **`rnex plugin disable <name>`**: Removes plugin assets from `.rnex/plugins/<name>/` and disables the plugin in `rnex.yaml`.
367
+ - **`rnex plugin info <name>`**: Shows description, version, configurable options, scoped directory, and external template paths for a plugin.
368
+ - **`rnex plugin enable [--local] <name>`**: Enables a plugin in `rnex.yaml` (or `.local.rnex.yaml` with `--local`), copies assets to `.rnex/plugins/<name>/`, and reconciles workspace files.
369
+ - **`rnex plugin disable [--local] <name>`**: Removes plugin assets from `.rnex/plugins/<name>/` and disables the plugin in `rnex.yaml` (or overrides with `enabled: false` in `.local.rnex.yaml` with `--local`).
364
370
 
365
371
  ---
366
372
 
@@ -31,19 +31,6 @@ version: 0.5.0
31
31
 
32
32
  repos_dir: ./repos
33
33
 
34
- # ------------------------------------------------------------------------------
35
- # ai_instructions — Main AI instructions routing file
36
- # ------------------------------------------------------------------------------
37
- # Main instructions file created and managed by Repo Nexus.
38
- # Default: AGENTS.md (recognized by modern AI coding assistants)
39
- #
40
- # Examples:
41
- # ai_instructions: AGENTS.md # default standard
42
- # ai_instructions: CLAUDE.md # for Anthropic Claude Code CLI
43
- # ai_instructions: GEMINI.md # for Google Gemini / Antigravity CLI
44
- #
45
- ai_instructions: AGENTS.md
46
-
47
34
  # ------------------------------------------------------------------------------
48
35
  # code_workspace — VS Code / Cursor multi-root workspace file
49
36
  # ------------------------------------------------------------------------------
@@ -74,21 +61,53 @@ code_workspace: false
74
61
  git_hooks: true
75
62
 
76
63
  # ------------------------------------------------------------------------------
77
- # plugins — Workspace plugins and AI instruction packs
64
+ # plugins — Workspace plugins, tool integrations, and AI instruction packs
78
65
  # ------------------------------------------------------------------------------
79
66
  # Plugins extend your workspace with curated AI guidelines, context rules,
80
- # and scaffolding templates scoped within `.rnex/plugins/<plugin-name>/`.
67
+ # tool provider integrations (e.g. GitHub Copilot), and templates.
81
68
  #
82
69
  # Manage plugins with:
83
- # rnex plugin list # View available and active plugins
84
- # rnex plugin enable <name> # Enable plugin in workspace
85
- # rnex plugin disable <name> # Disable plugin from workspace
70
+ # rnex plugin list # View available and active plugins
71
+ # rnex plugin enable [--local] <name> # Enable plugin (global or local override)
72
+ # rnex plugin disable [--local] <name> # Disable plugin from workspace
73
+ # rnex plugin info <name> # View plugin details & configurable options
86
74
  #
87
75
  # Built-in plugins:
76
+ # copilot — GitHub Copilot integration: mirrors operational prompts, skills,
77
+ # agents, and synthesized instructions into .github/
78
+ # claude — Anthropic Claude Code integration: maintains CLAUDE.md instructions
79
+ # and mirrors commands, prompts, and skills into .claude/
80
+ # gemini — Google Gemini / Antigravity integration: maintains GEMINI.md instructions
81
+ # and mirrors prompts and skills into .gemini/
82
+ # cursor — Cursor IDE integration: maintains .cursorrules / .cursor/rules/
83
+ # and mirrors prompts and skills into .cursor/
84
+ # windsurf — Windsurf IDE integration: maintains .windsurfrules
85
+ # and mirrors prompts and skills into .windsurf/
88
86
  # karpathy-llm — Andrej Karpathy's agent behavioral principles,
89
87
  # context engineering guidelines, and LLM Wiki architecture
90
88
 
91
89
  plugins:
90
+ # copilot:
91
+ # prompts: true # mirror prompts to .github/prompts/*.prompt.md (default: true)
92
+ # skills: true # mirror skills to .github/skills/<name>/SKILL.md (default: true)
93
+ # instructions: true # mirror instructions to .github/copilot-instructions.md (default: true)
94
+ # agents: true # mirror custom agents to .github/agents/*.agent.md (default: true)
95
+ # claude:
96
+ # instructions: true # maintain routing in CLAUDE.md (default: true)
97
+ # prompts: true # mirror commands & prompts to .claude/commands/ (default: true)
98
+ # skills: true # mirror skills to .claude/skills/ (default: true)
99
+ # gemini:
100
+ # instructions: true # maintain routing in GEMINI.md (default: true)
101
+ # prompts: true # mirror prompts to .gemini/prompts/ (default: true)
102
+ # skills: true # mirror skills to .gemini/skills/ (default: true)
103
+ # cursor:
104
+ # instructions: true # maintain routing in .cursorrules & .cursor/rules/ (default: true)
105
+ # prompts: true # mirror prompts to .cursor/prompts/ (default: true)
106
+ # skills: true # mirror skills to .cursor/skills/ (default: true)
107
+ # windsurf:
108
+ # instructions: true # maintain routing in .windsurfrules (default: true)
109
+ # prompts: true # mirror prompts to .windsurf/prompts/ (default: true)
110
+ # skills: true # mirror skills to .windsurf/skills/ (default: true)
92
111
  # karpathy-llm: {}
93
112
 
94
113
  # ------------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-nexus",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
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",