repo-nexus 0.7.22 → 0.7.24

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/docs/CLI.md CHANGED
@@ -37,11 +37,11 @@ rnex sync [-y|--yes] [-q|--quiet]
37
37
  2. **Git Ignore & Search Indexing**: Reconciles `.gitignore` (ignoring `repos/*` and `.local.rnex.yaml`) and `.ignore` (un-ignoring `repos/*` for search tools).
38
38
  3. **Plugin Sync**: Prunes disabled plugins and deterministically copies enabled plugin assets, rules, skills, templates, and executable lifecycle hooks into `.rnex/plugins/<plugin-name>/`.
39
39
  4. **Compiled AI Instructions**: Compiles `.rnex/ai-instructions.md` by combining the base template with active configuration and all enabled plugin `instructions.md` fragments. Top-level provider files (`AGENTS.md`, `CLAUDE.md`, etc.) receive only a single strict directive pointing to `.rnex/ai-instructions.md`.
40
- 5. **Skill Reconciliation & User Skill Generation**: Copies core agentic skills from `toolkit/skills/` to `.rnex/skills/`, and generates lightweight, zero-logic User Skills (prefixed with `rnex-`) in configured AI assistant directories (`.cursor/rules/`, `.claude/skills/`, `.gemini/skills/`, `.windsurf/rules/`) pointing directly to `.rnex/skills/` or plugin skill directories.
40
+ 5. **Skill Reconciliation & User Skill Generation**: Copies core agentic skills from `toolkit/skills/` to `.rnex/skills/`, and generates lightweight, zero-logic User Skills (prefixed with `rnex-`) in configured AI assistant directories (`.cursor/rules/`, `.claude/skills/`, `.agents/skills/`, `.windsurf/rules/`) pointing directly to `.rnex/skills/` or plugin skill directories.
41
41
  6. **Harness Sync**: Reconciles root `.rnex/` and member repository harnesses (`repos/<name>/.rnex/`) for all enabled member repositories where `rnex_dir: true`.
42
42
  7. **Git Hooks**: Installs or reconciles workspace Git hooks in `.rnex/hooks` when `git_hooks: true`.
43
43
  8. **Multi-Root Workspace**: Synchronizes `.code-workspace` folder mappings when `code_workspace: true`.
44
- 9. **Event-Driven Auto-Sync Scripts & Stamp**: Generates `.rnex/bin/auto-sync.sh` and updates `.rnex/.sync_stamp`.
44
+ 9. **Event-Driven Auto-Sync Scripts & Stamp**: Generates `.rnex/bin/auto-sync.sh` and updates `.rnex/sync_stamp`.
45
45
 
46
46
  ---
47
47
 
@@ -28,7 +28,7 @@ rnex init [options] [directory]
28
28
  | `--no-hooks` | | boolean | `false` | Skip Git hooks configuration during initialization. |
29
29
  | `--claude` | | boolean | `false` | Enable Claude Code plugin (maintains `CLAUDE.md`, generates skills in `.claude/skills/`). |
30
30
  | `--cursor` | | boolean | `false` | Enable Cursor plugin (maintains `.cursorrules`, generates skills in `.cursor/rules/`). |
31
- | `--gemini` | | boolean | `false` | Enable Google Gemini plugin (maintains `GEMINI.md`, generates skills in `.gemini/skills/`). |
31
+ | `--gemini` | | boolean | `false` | Enable Google Gemini plugin (maintains `GEMINI.md`, generates skills in `.agents/skills/`). |
32
32
  | `--windsurf` | | boolean | `false` | Enable Windsurf plugin (maintains `.windsurfrules`, generates skills in `.windsurf/rules/`). |
33
33
 
34
34
  ### Examples
@@ -71,7 +71,7 @@ rnex sync [options]
71
71
  7. Reconciles automated Git hooks in `.rnex/hooks/` against `git_hooks` config.
72
72
  8. Re-creates member `.rnex/` scaffolding in active repositories (`rnex_dir: true`).
73
73
  9. Updates multi-root `.code-workspace` folder mappings if configured.
74
- 10. Generates `.rnex/bin/auto-sync.sh` and updates the checksum stamp in `.rnex/.sync_stamp`.
74
+ 10. Generates `.rnex/bin/auto-sync.sh` and updates the checksum stamp in `.rnex/sync_stamp`.
75
75
 
76
76
  ---
77
77
 
@@ -86,7 +86,7 @@ rnex status
86
86
 
87
87
  ### Execution
88
88
  * **Strictly Read-Only**: Inspects workspace health, active repos, loaded config files (`rnex.yaml` and `.local.rnex.yaml`), git hooks, and plugins.
89
- * **Sync Diagnostics**: Compares current config checksums against `.rnex/.sync_stamp` and suggests running `rnex sync` if configuration drift is detected.
89
+ * **Sync Diagnostics**: Compares current config checksums against `.rnex/sync_stamp` and suggests running `rnex sync` if configuration drift is detected.
90
90
 
91
91
  ---
92
92
 
@@ -23,7 +23,7 @@ When a workspace is initialized, Repo Nexus maintains core agentic skills in `.r
23
23
  | `wiki-ingest` | Plugin (`karpathy-llm`) | Ingest raw intake documents into atomic Karpathy LLM Wiki pages. | `.rnex/plugins/karpathy-llm/skills/wiki-ingest.md` |
24
24
  | `wiki-lint` | Plugin (`karpathy-llm`) | Validate markdown links, compute backlinks, and update the master index. | `.rnex/plugins/karpathy-llm/skills/wiki-lint.md` |
25
25
 
26
- When provider plugins (such as `claude`, `gemini`, `cursor`, or `windsurf`) are enabled with `skills: true`, zero-logic User Skill pointers (`rnex-<skill-name>.md`) are generated directly into the respective native provider directories (`.cursor/rules/`, `.claude/skills/`, `.gemini/skills/`, `.windsurf/rules/`).
26
+ When provider plugins (such as `claude`, `gemini`, `cursor`, or `windsurf`) are enabled with `skills: true`, zero-logic User Skill pointers (`rnex-<skill-name>.md`) are generated directly into the respective native provider directories (`.cursor/rules/`, `.claude/skills/`, `.agents/skills/`, `.windsurf/rules/`).
27
27
 
28
28
  ---
29
29
 
@@ -126,5 +126,5 @@ rnex sync
126
126
  ```
127
127
 
128
128
  ::: tip Status & Auto-Sync
129
- Running `rnex status` inspects workspace health and checks if configuration is in sync with `.rnex/.sync_stamp`. Running `rnex sync` applies full reconciliation and updates the sync stamp. Workspace commands (like `rnex list`) also automatically trigger auto-sync whenever configuration changes.
129
+ Running `rnex status` inspects workspace health and checks if configuration is in sync with `.rnex/sync_stamp`. Running `rnex sync` applies full reconciliation and updates the sync stamp. Workspace commands (like `rnex list`) also automatically trigger auto-sync whenever configuration changes.
130
130
  :::
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: Google Gemini & Antigravity Plugin
3
- description: Integrate Google Gemini and Antigravity IDE with Repo Nexus, generating zero-logic user skill pointers in .gemini/skills/.
3
+ description: Integrate Google Gemini and Antigravity IDE with Repo Nexus, generating zero-logic user skill pointers in .agents/skills/.
4
4
  ---
5
5
 
6
6
  # Google Gemini & Antigravity Plugin
7
7
 
8
8
  The **`gemini`** plugin integrates Google Gemini CLI and Google Antigravity IDE into a Repo Nexus Virtual Meta-Repo.
9
9
 
10
- All AI assistants in Repo Nexus share [`AGENTS.md`](file:///Users/admin/Projects/ai/repo-nexus/AGENTS.md) at the workspace root as the single universal source of truth for routing. When enabled, the `gemini` plugin generates zero-logic User Skill pointers into `.gemini/skills/` (e.g. `rnex-clone-sync.md`, `rnex-batch-exec.md`, `rnex-karpathy-llm-wiki-ingest`).
10
+ All AI assistants in Repo Nexus share [`AGENTS.md`](file:///Users/admin/Projects/ai/repo-nexus/AGENTS.md) at the workspace root as the single universal source of truth for routing. When enabled, the `gemini` plugin generates zero-logic User Skill pointers into `.agents/skills/` (e.g. `rnex-clone-sync/SKILL.md`, `rnex-batch-exec/SKILL.md`, `rnex-karpathy-llm-wiki-ingest/SKILL.md`).
11
11
 
12
12
  Operational skills, rules, and subagents remain cleanly encapsulated within `.rnex/skills/` and active plugin directories (`.rnex/plugins/<plugin-name>/`).
13
13
 
@@ -15,8 +15,8 @@ Operational skills, rules, and subagents remain cleanly encapsulated within `.rn
15
15
 
16
16
  ## Capabilities
17
17
 
18
- 1. **Zero-Logic User Skills (`.gemini/skills/rnex-*/SKILL.md`)**:
19
- - Generates native `SKILL.md` bundles prefixed with `rnex-` in `.gemini/skills/` with YAML frontmatter for Gemini and Antigravity skill discovery.
18
+ 1. **Zero-Logic User Skills (`.agents/skills/rnex-*/SKILL.md`)**:
19
+ - Generates native `SKILL.md` bundles prefixed with `rnex-` in `.agents/skills/` with YAML frontmatter for Gemini and Antigravity skill discovery.
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`**:
@@ -58,14 +58,14 @@ Configure options under `plugins.gemini` in `rnex.yaml` or `.local.rnex.yaml`:
58
58
  plugins:
59
59
  gemini:
60
60
  instructions: true # Sync routing instructions to GEMINI.md (default: true)
61
- skills: true # Generate user skills in .gemini/skills/ (default: true)
61
+ skills: true # Generate user skills in .agents/skills/ (default: true)
62
62
  enabled: true # Set to false to disable
63
63
  ```
64
64
 
65
65
  | Option | Type | Default | Description |
66
66
  |:---|:---|:---|:---|
67
67
  | `instructions` | boolean | `true` | Merge routing instructions into `GEMINI.md`. |
68
- | `skills` | boolean | `true` | Generate user skill pointers in `.gemini/skills/rnex-*.md`. |
68
+ | `skills` | boolean | `true` | Generate user skill pointers in `.agents/skills/rnex-*/SKILL.md`. |
69
69
  | `enabled` | boolean | `true` | Enable or disable the plugin. Overridable in `.local.rnex.yaml`. |
70
70
 
71
71
  ---
@@ -76,15 +76,19 @@ When `gemini` is enabled with functional plugins like `karpathy-llm`, it generat
76
76
 
77
77
  ```text
78
78
  my-workspace/
79
- ├── AGENTS.md # Universal workspace instructions & routing
80
79
  ├── GEMINI.md # Gemini-specific instructions (if instructions: true)
81
- ├── .gemini/
80
+ ├── .agents/
82
81
  │ └── skills/ # Zero-logic User Skill pointers
83
- │ ├── rnex-clone-sync.md
84
- │ ├── rnex-batch-exec.md
85
- │ ├── rnex-workspace-status.md
82
+ │ ├── rnex-clone-sync/
83
+ │ │ └── SKILL.md
84
+ │ ├── rnex-batch-exec/
85
+ │ │ └── SKILL.md
86
+ │ ├── rnex-workspace-status/
87
+ │ │ └── SKILL.md
86
88
  │ ├── rnex-karpathy-llm-wiki-ingest/
89
+ │ │ └── SKILL.md
87
90
  │ └── rnex-karpathy-llm-wiki-lint/
91
+ │ └── SKILL.md
88
92
  ├── .rnex/
89
93
  │ ├── skills/ # Core workspace agentic skills
90
94
  │ └── plugins/
@@ -103,6 +107,6 @@ rnex plugin disable gemini
103
107
  ```
104
108
 
105
109
  Repo Nexus automatically performs surgical cleanup:
106
- - Removes auto-generated user skills under `.gemini/skills/rnex-*.md`.
110
+ - Removes auto-generated user skills under `.agents/skills/rnex-*`.
107
111
  - Cleans up managed routing instructions in `GEMINI.md`.
108
- - Developer-created files under `.gemini/` that do not originate from Repo Nexus are preserved.
112
+ - Developer-created files under `.agents/` or `.gemini/` that do not originate from Repo Nexus are preserved.
@@ -23,7 +23,7 @@ Active plugins are mirrored into each active member repository under `repos/<nam
23
23
  Repo Nexus decouples functional plugins from AI provider plugins:
24
24
  - **Core Skills (`toolkit/skills/` $\rightarrow$ `.rnex/skills/`)**: Workspace-level capabilities owned by Repo Nexus core.
25
25
  - **Plugin Skills (`toolkit/plugins/<plugin>/skills/` $\rightarrow$ `.rnex/plugins/<plugin>/skills/`)**: Scoped domain skills owned exclusively by individual plugins.
26
- - **User Skills**: Provider plugins (`copilot`, `claude`, `gemini`, `cursor`, and `windsurf`) project zero-logic user skill pointers into active provider directories using native `SKILL.md` bundles with YAML frontmatter in skill directories (`.github/skills/`, `.claude/skills/`, `.gemini/skills/`) and flat files in rule directories (`.cursor/rules/`, `.windsurf/rules/`), redirecting AI assistants directly to the underlying agentic skills in `.rnex/`.
26
+ - **User Skills**: Provider plugins (`copilot`, `claude`, `gemini`, `cursor`, and `windsurf`) project zero-logic user skill pointers into active provider directories using native `SKILL.md` bundles with YAML frontmatter in skill directories (`.github/skills/`, `.claude/skills/`, `.agents/skills/`) and flat files in rule directories (`.cursor/rules/`, `.windsurf/rules/`), redirecting AI assistants directly to the underlying agentic skills in `.rnex/`.
27
27
 
28
28
  ### 4. Non-Destructive Delimited Merging
29
29
  When plugins update root instruction files (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`), Repo Nexus isolates auto-managed routing between explicit delimiters:
@@ -48,7 +48,7 @@ Developer-authored instructions outside of these delimiters are strictly preserv
48
48
  |:---|:---|:---|:---|
49
49
  | [`claude`](claude.md) | AI Provider | Anthropic Claude Code & Desktop integration: maintains `CLAUDE.md` and generates user skills in `.claude/skills/`. | [Read Guide](claude.md) |
50
50
  | [`cursor`](cursor.md) | AI Provider | Cursor IDE integration: maintains `.cursorrules`, `.cursorignore`, and generates user skills in `.cursor/rules/`. | [Read Guide](cursor.md) |
51
- | [`gemini`](gemini.md) | AI Provider | Google Gemini CLI & Antigravity IDE integration: maintains `GEMINI.md`, `.geminiignore`, and generates user skills in `.gemini/skills/`. | [Read Guide](gemini.md) |
51
+ | [`gemini`](gemini.md) | AI Provider | Google Gemini CLI & Antigravity IDE integration: maintains `GEMINI.md`, `.geminiignore`, and generates user skills in `.agents/skills/`. | [Read Guide](gemini.md) |
52
52
  | [`windsurf`](windsurf.md) | AI Provider | Windsurf IDE integration: maintains `.windsurfrules` and generates user skills in `.windsurf/rules/`. | [Read Guide](windsurf.md) |
53
53
  | [`karpathy-llm`](karpathy-llm.md) | Knowledge & Rules | Andrej Karpathy's 4 cardinal principles for coding agents, multi-repo context engineering standards, and autonomous zero-dependency LLM Wiki architecture (`./docs`, `.rnex/wiki`). | [Read Guide](karpathy-llm.md) |
54
54
 
@@ -169,7 +169,7 @@ The `karpathy-llm` plugin encapsulates its agentic skills in `.rnex/plugins/karp
169
169
  - `wiki-ingest.md`
170
170
  - `wiki-lint.md`
171
171
 
172
- During `rnex sync`, its `after_sync.sh` lifecycle hook automatically registers zero-logic User Skill pointers (`rnex-karpathy-llm-wiki-ingest` and `rnex-karpathy-llm-wiki-lint`) across all enabled AI provider directories (`.cursor/rules/`, `.claude/skills/`, `.gemini/skills/`, `.windsurf/rules/`).
172
+ During `rnex sync`, its `after_sync.sh` lifecycle hook automatically registers zero-logic User Skill pointers (`rnex-karpathy-llm-wiki-ingest` and `rnex-karpathy-llm-wiki-lint`) across all enabled AI provider directories (`.cursor/rules/`, `.claude/skills/`, `.agents/skills/`, `.windsurf/rules/`).
173
173
 
174
174
  When running `rnex plugin disable karpathy-llm`, its `before_plugin_disable.sh` lifecycle hook automatically unregisters the User Skills from all provider directories, while keeping core workspace skills intact.
175
175
 
@@ -74,7 +74,7 @@ git_hooks: true
74
74
  #
75
75
  # Built-in plugins:
76
76
  # claude — Anthropic Claude Code integration: manages CLAUDE.md; generates user skills in .claude/skills/
77
- # gemini — Google Gemini / Antigravity integration: manages GEMINI.md; generates user skills in .gemini/skills/
77
+ # gemini — Google Gemini / Antigravity integration: manages GEMINI.md; generates user skills in .agents/skills/
78
78
  # cursor — Cursor IDE integration: manages .cursorrules & .cursor/rules/; generates user skills in .cursor/rules/
79
79
  # windsurf — Windsurf IDE integration: manages .windsurfrules; generates user skills in .windsurf/rules/
80
80
  # karpathy-llm — Andrej Karpathy's agent behavioral principles,
@@ -95,7 +95,7 @@ plugins:
95
95
  # skills: true # generate user skills in .claude/skills/ (default: true)
96
96
  # gemini:
97
97
  # instructions: true # sync routing instructions to GEMINI.md (default: true)
98
- # skills: true # generate user skills in .gemini/skills/ (default: true)
98
+ # skills: true # generate user skills in .agents/skills/ (default: true)
99
99
  # cursor:
100
100
  # instructions: true # sync routing instructions to .cursorrules (default: true)
101
101
  # skills: true # generate user skills in .cursor/rules/ (default: true)
package/lib/ai.sh CHANGED
@@ -405,7 +405,7 @@ get_active_provider_skill_dirs() {
405
405
  cursor) _sdir=".cursor/rules" ;;
406
406
  claude) _sdir=".claude/skills" ;;
407
407
  windsurf) _sdir=".windsurf/rules" ;;
408
- gemini) _sdir=".gemini/skills" ;;
408
+ gemini) _sdir=".agents/skills" ;;
409
409
  esac
410
410
  fi
411
411
  if [ -n "$_sdir" ]; then
@@ -162,8 +162,18 @@ YAML_EOF
162
162
  log_ok "Created $RNEX_CONFIG_FILE"
163
163
  fi
164
164
 
165
+ # Set active workspace context for initialization
166
+ _orig_nexus="$NEXUS_DIR"
167
+ _orig_yaml="$WORKSPACE_YAML"
168
+ _orig_local_yaml="$WORKSPACE_LOCAL_YAML"
169
+ NEXUS_DIR="$_init_dir"
170
+ WORKSPACE_YAML="$_target_yaml"
171
+ WORKSPACE_LOCAL_YAML="$_init_dir/$RNEX_LOCAL_CONFIG_FILE"
172
+
165
173
  # ---- 2. Merge routing instructions into AI instructions files ------------
166
- merge_rnex_instructions "$_init_dir/AGENTS.md"
174
+ if ! has_active_provider_instructions "$_init_dir"; then
175
+ merge_rnex_instructions "$_init_dir/AGENTS.md"
176
+ fi
167
177
  [ -f "$_init_dir/CLAUDE.md" ] && merge_rnex_instructions "$_init_dir/CLAUDE.md"
168
178
  [ -f "$_init_dir/GEMINI.md" ] && merge_rnex_instructions "$_init_dir/GEMINI.md"
169
179
  [ -f "$_init_dir/.cursorrules" ] && merge_rnex_instructions "$_init_dir/.cursorrules"
@@ -178,12 +188,6 @@ YAML_EOF
178
188
  # ---- 4. Create internal .rnex directory and sync base assets -------------
179
189
  mkdir -p "$_init_dir/.rnex"
180
190
  mkdir -p "$_init_dir/.rnex/plugins"
181
- _orig_nexus="$NEXUS_DIR"
182
- _orig_yaml="$WORKSPACE_YAML"
183
- _orig_local_yaml="$WORKSPACE_LOCAL_YAML"
184
- NEXUS_DIR="$_init_dir"
185
- WORKSPACE_YAML="$_target_yaml"
186
- WORKSPACE_LOCAL_YAML="$_init_dir/$RNEX_LOCAL_CONFIG_FILE"
187
191
  sync_plugins
188
192
  build_ai_instructions "$_init_dir"
189
193
  sync_skills
@@ -70,7 +70,7 @@ cmd_plugin_info() {
70
70
  [ -z "$_skill_target" ] && case "$_name" in
71
71
  copilot) _skill_target=".github/skills/" ;;
72
72
  claude) _skill_target=".claude/skills/" ;;
73
- gemini) _skill_target=".gemini/skills/" ;;
73
+ gemini) _skill_target=".agents/skills/" ;;
74
74
  cursor) _skill_target=".cursor/rules/" ;;
75
75
  windsurf) _skill_target=".windsurf/rules/" ;;
76
76
  esac
@@ -50,8 +50,8 @@ cmd_status() {
50
50
  printf ' %b●%b Workspace: %s\n' "$_DIM" "$_NC" "$CODE_WORKSPACE_FILE"
51
51
  fi
52
52
 
53
- _stamp_file="$NEXUS_DIR/.rnex/.sync_stamp"
54
- [ -f "$_stamp_file" ] || _stamp_file="$NEXUS_DIR/.rnex/sync_stamp"
53
+ _stamp_file="$NEXUS_DIR/.rnex/sync_stamp"
54
+ [ -f "$_stamp_file" ] || _stamp_file="$NEXUS_DIR/.rnex/.sync_stamp"
55
55
  _cur_sum="$(get_config_sum "$NEXUS_DIR")"
56
56
  if [ ! -f "$_stamp_file" ] || [ "$_cur_sum" != "$(cat "$_stamp_file" 2>/dev/null)" ]; then
57
57
  printf ' %b!%b Sync Stamp: workspace out of sync with configuration (run "rnex sync")\n' "$_Y" "$_NC"
@@ -142,7 +142,7 @@ cmd_status() {
142
142
  fi
143
143
  if [ -f "$NEXUS_DIR/AGENTS.md" ]; then
144
144
  printf ' %b✓%b %s %b(standard instructions directive)%b\n' "$_G" "$_NC" "AGENTS.md" "$_DIM" "$_NC"
145
- else
145
+ elif ! has_active_provider_instructions "$NEXUS_DIR"; then
146
146
  printf ' %b✗%b %s %b(standard instructions directive — MISSING; run "rnex sync" to create)%b\n' "$_R" "$_NC" "AGENTS.md" "$_R" "$_NC"
147
147
  fi
148
148
  if [ -f "$NEXUS_DIR/CLAUDE.md" ]; then
@@ -187,7 +187,9 @@ cmd_status() {
187
187
  if [ -d "$NEXUS_DIR/.windsurf/rules" ] && ls "$NEXUS_DIR/.windsurf/rules"/rnex-*.md >/dev/null 2>&1; then
188
188
  printf ' %b✓%b %s %b(Windsurf user skills)%b\n' "$_G" "$_NC" ".windsurf/rules/" "$_DIM" "$_NC"
189
189
  fi
190
- if [ -d "$NEXUS_DIR/.gemini/skills" ] && { ls "$NEXUS_DIR/.gemini/skills"/rnex-*.md >/dev/null 2>&1 || ls -d "$NEXUS_DIR/.gemini/skills"/rnex-* >/dev/null 2>&1; }; then
190
+ if [ -d "$NEXUS_DIR/.agents/skills" ] && { ls "$NEXUS_DIR/.agents/skills"/rnex-*.md >/dev/null 2>&1 || ls -d "$NEXUS_DIR/.agents/skills"/rnex-* >/dev/null 2>&1; }; then
191
+ printf ' %b✓%b %s %b(Gemini user skills)%b\n' "$_G" "$_NC" ".agents/skills/" "$_DIM" "$_NC"
192
+ elif [ -d "$NEXUS_DIR/.gemini/skills" ] && { ls "$NEXUS_DIR/.gemini/skills"/rnex-*.md >/dev/null 2>&1 || ls -d "$NEXUS_DIR/.gemini/skills"/rnex-* >/dev/null 2>&1; }; then
191
193
  printf ' %b✓%b %s %b(Gemini user skills)%b\n' "$_G" "$_NC" ".gemini/skills/" "$_DIM" "$_NC"
192
194
  fi
193
195
  if [ -d "$NEXUS_DIR/.github/skills" ] && { ls "$NEXUS_DIR/.github/skills"/rnex-*.md >/dev/null 2>&1 || ls -d "$NEXUS_DIR/.github/skills"/rnex-* >/dev/null 2>&1; }; then
@@ -15,8 +15,8 @@ set -e
15
15
  _ws="$(cd "$(dirname "$0")/../.." 2>/dev/null && pwd -P)"
16
16
  [ -f "$_ws/rnex.yaml" ] || exit 0
17
17
 
18
- _stamp="$_ws/.rnex/.sync_stamp"
19
- [ -f "$_stamp" ] || _stamp="$_ws/.rnex/sync_stamp"
18
+ _stamp="$_ws/.rnex/sync_stamp"
19
+ [ -f "$_stamp" ] || _stamp="$_ws/.rnex/.sync_stamp"
20
20
  _cur_sum="$(cd "$_ws" 2>/dev/null && cksum rnex.yaml .local.rnex.yaml 2>/dev/null | cksum | awk '{print $1, $2}')"
21
21
  _saved_sum=""
22
22
  [ -f "$_stamp" ] && _saved_sum="$(cat "$_stamp" 2>/dev/null)"
@@ -78,7 +78,11 @@ cmd_sync() {
78
78
  reconcile_gitignore "$NEXUS_DIR"
79
79
 
80
80
  # 1.2. Reconcile universal workspace instructions in AGENTS.md
81
- merge_rnex_instructions "$NEXUS_DIR/AGENTS.md"
81
+ if has_active_provider_instructions; then
82
+ clean_rnex_instructions "$NEXUS_DIR/AGENTS.md"
83
+ else
84
+ merge_rnex_instructions "$NEXUS_DIR/AGENTS.md"
85
+ fi
82
86
 
83
87
  # 1.3. Generate auto-sync script and AI session-start hooks (hardcoded harness)
84
88
  _write_auto_sync_script "$NEXUS_DIR"
@@ -93,7 +97,7 @@ cmd_sync() {
93
97
  # 2.1. Compile .rnex/ai-instructions.md
94
98
  build_ai_instructions "$NEXUS_DIR"
95
99
 
96
- # 2.2. Update sync stamp (.rnex/.sync_stamp and .rnex/sync_stamp)
100
+ # 2.2. Update sync stamp (.rnex/sync_stamp)
97
101
  update_sync_stamp "$NEXUS_DIR"
98
102
 
99
103
  # --------------------------------------------------------------------------
package/lib/workspace.sh CHANGED
@@ -52,8 +52,8 @@ update_sync_stamp() {
52
52
  fi
53
53
  fi
54
54
  _csum="$(get_config_sum "$_dir")"
55
- printf '%s\n' "$_csum" > "$_dir/.rnex/.sync_stamp"
56
55
  printf '%s\n' "$_csum" > "$_dir/.rnex/sync_stamp"
56
+ rm -f "$_dir/.rnex/.sync_stamp"
57
57
  }
58
58
 
59
59
  check_auto_sync() {
@@ -76,8 +76,8 @@ check_auto_sync() {
76
76
  _cfg_file="$(resolve_path "$CUSTOM_CONFIG" 2>/dev/null || true)"
77
77
  fi
78
78
  [ -f "$_cfg_file" ] || return 0
79
- _stamp="$_ws/.rnex/.sync_stamp"
80
- [ -f "$_stamp" ] || _stamp="$_ws/.rnex/sync_stamp"
79
+ _stamp="$_ws/.rnex/sync_stamp"
80
+ [ -f "$_stamp" ] || _stamp="$_ws/.rnex/.sync_stamp"
81
81
  if [ ! -f "$_stamp" ] || [ "$(get_config_sum "$_ws")" != "$(cat "$_stamp" 2>/dev/null)" ]; then
82
82
  cmd_sync -y --quiet
83
83
  fi
package/lib/yaml.sh CHANGED
@@ -177,6 +177,29 @@ windsurf_plugin_enabled() { provider_plugin_enabled "windsurf"; }
177
177
  windsurf_instructions_enabled() { provider_option_enabled "windsurf" "instructions"; }
178
178
  windsurf_skills_enabled() { provider_option_enabled "windsurf" "skills"; }
179
179
 
180
+ has_active_provider_instructions() {
181
+ _dir="${1:-${NEXUS_DIR:-$PWD}}"
182
+ _saved_ws_yaml="${WORKSPACE_YAML:-}"
183
+ _saved_local_yaml="${WORKSPACE_LOCAL_YAML:-}"
184
+ if [ -n "$1" ] && [ -d "$1" ]; then
185
+ WORKSPACE_YAML="$1/rnex.yaml"
186
+ WORKSPACE_LOCAL_YAML="$1/.local.rnex.yaml"
187
+ fi
188
+ _res=1
189
+ if copilot_instructions_enabled || \
190
+ claude_instructions_enabled || \
191
+ gemini_instructions_enabled || \
192
+ cursor_instructions_enabled || \
193
+ windsurf_instructions_enabled; then
194
+ _res=0
195
+ fi
196
+ if [ -n "$1" ] && [ -d "$1" ]; then
197
+ WORKSPACE_YAML="$_saved_ws_yaml"
198
+ WORKSPACE_LOCAL_YAML="$_saved_local_yaml"
199
+ fi
200
+ return $_res
201
+ }
202
+
180
203
  _yaml_plugin_set_in_file() {
181
204
  _file="$1"; _plugin="$2"; _field="$3"; _value="$4"
182
205
  if [ ! -f "$_file" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-nexus",
3
- "version": "0.7.22",
3
+ "version": "0.7.24",
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",
@@ -8,7 +8,8 @@ if [ -z "$RNEX_PROVIDER_SKILL_DIRS" ]; then
8
8
  [ -d "$RNEX_ROOT/.cursor" ] && _dirs="${_dirs:+$_dirs }.cursor/rules"
9
9
  [ -d "$RNEX_ROOT/.claude" ] && _dirs="${_dirs:+$_dirs }.claude/skills"
10
10
  [ -d "$RNEX_ROOT/.windsurf" ] && _dirs="${_dirs:+$_dirs }.windsurf/rules"
11
- [ -d "$RNEX_ROOT/.gemini" ] && _dirs="${_dirs:+$_dirs }.gemini/skills"
11
+ [ -d "$RNEX_ROOT/.agents" ] && _dirs="${_dirs:+$_dirs }.agents/skills"
12
+ [ -d "$RNEX_ROOT/.gemini" ] && _dirs="${_dirs:+$_dirs }.agents/skills"
12
13
  export RNEX_PROVIDER_SKILL_DIRS="$_dirs"
13
14
  fi
14
15
 
@@ -148,6 +149,17 @@ if ! command -v provider_option_enabled >/dev/null 2>&1; then
148
149
  }
149
150
  fi
150
151
 
152
+ if ! command -v has_active_provider_instructions >/dev/null 2>&1; then
153
+ has_active_provider_instructions() {
154
+ provider_option_enabled "copilot" "instructions" 2>/dev/null && return 0
155
+ provider_option_enabled "claude" "instructions" 2>/dev/null && return 0
156
+ provider_option_enabled "gemini" "instructions" 2>/dev/null && return 0
157
+ provider_option_enabled "cursor" "instructions" 2>/dev/null && return 0
158
+ provider_option_enabled "windsurf" "instructions" 2>/dev/null && return 0
159
+ return 1
160
+ }
161
+ fi
162
+
151
163
  # Instructions routing helpers
152
164
  if ! command -v merge_rnex_instructions >/dev/null 2>&1; then
153
165
  merge_rnex_instructions() {
@@ -74,7 +74,7 @@ git_hooks: true
74
74
  #
75
75
  # Built-in plugins:
76
76
  # claude — Anthropic Claude Code integration: manages CLAUDE.md; generates user skills in .claude/skills/
77
- # gemini — Google Gemini / Antigravity integration: manages GEMINI.md; generates user skills in .gemini/skills/
77
+ # gemini — Google Gemini / Antigravity integration: manages GEMINI.md; generates user skills in .agents/skills/
78
78
  # cursor — Cursor IDE integration: manages .cursorrules & .cursor/rules/; generates user skills in .cursor/rules/
79
79
  # windsurf — Windsurf IDE integration: manages .windsurfrules; generates user skills in .windsurf/rules/
80
80
  # karpathy-llm — Andrej Karpathy's agent behavioral principles,
@@ -95,7 +95,7 @@ plugins:
95
95
  # skills: true # generate user skills in .claude/skills/ (default: true)
96
96
  # gemini:
97
97
  # instructions: true # sync routing instructions to GEMINI.md (default: true)
98
- # skills: true # generate user skills in .gemini/skills/ (default: true)
98
+ # skills: true # generate user skills in .agents/skills/ (default: true)
99
99
  # cursor:
100
100
  # instructions: true # sync routing instructions to .cursorrules (default: true)
101
101
  # skills: true # generate user skills in .cursor/rules/ (default: true)
@@ -5,7 +5,7 @@ A built-in Repo Nexus plugin providing bidirectional alignment and operational p
5
5
  ## Capabilities
6
6
 
7
7
  1. **Instructions Integration**: Generates and maintains `GEMINI.md` with Repo Nexus routing instructions while preserving custom instructions outside delimiters.
8
- 2. **User Skills Generation**: Standardized Repo Nexus core skills and active plugins' skills are mirrored as zero-logic User Skill pointers (`rnex-<name>.md`) in `.gemini/skills/`.
8
+ 2. **User Skills Generation**: Standardized Repo Nexus core skills and active plugins' skills are mirrored as zero-logic User Skill pointers (`rnex-<name>.md`) in `.agents/skills/`.
9
9
  3. **File Discovery Un-Ignore**: Maintains `.geminiignore` (`!repos/*`) so Gemini CLI and Google Antigravity can discover and access member repository files.
10
10
 
11
11
  ## Usage
@@ -28,5 +28,5 @@ plugins:
28
28
  | Option | Type | Default | Description |
29
29
  |--------|------|---------|-------------|
30
30
  | `instructions` | boolean | `true` | Maintain routing in `GEMINI.md` |
31
- | `skills` | boolean | `true` | Generate user skills in `.gemini/skills/` |
31
+ | `skills` | boolean | `true` | Generate user skills in `.agents/skills/` |
32
32
  | `enabled` | boolean | `true` | Set to `false` in `.local.rnex.yaml` to override team config |
@@ -29,5 +29,12 @@ fi
29
29
 
30
30
  _sk="$(provider_option_enabled "gemini" "skills" 2>/dev/null && echo "true" || echo "false")"
31
31
  if [ "$_sk" != "true" ]; then
32
+ clean_provider_user_skills "$_root/.agents/skills"
33
+ fi
34
+
35
+ # Clean legacy .gemini/skills if it exists
36
+ if [ -d "$_root/.gemini/skills" ]; then
32
37
  clean_provider_user_skills "$_root/.gemini/skills"
38
+ rmdir "$_root/.gemini/skills" 2>/dev/null || true
39
+ rmdir "$_root/.gemini" 2>/dev/null || true
33
40
  fi
@@ -10,6 +10,8 @@ fi
10
10
 
11
11
  clean_provider_ignore "$_root/.geminiignore"
12
12
  clean_rnex_instructions "$_root/GEMINI.md"
13
+ clean_provider_user_skills "$_root/.agents/skills"
13
14
  clean_provider_user_skills "$_root/.gemini/skills"
14
15
  rm -rf "$_root/.gemini/prompts" 2>/dev/null || true
15
16
  rmdir "$_root/.gemini" 2>/dev/null || true
17
+ rmdir "$_root/.agents" 2>/dev/null || true
@@ -4,7 +4,7 @@ This workspace has the Repo Nexus `gemini` plugin enabled.
4
4
 
5
5
  ## Operating Principles
6
6
  - **Gemini Instructions (`GEMINI.md`)**: Synthesizes workspace routing protocol between `<!-- REPO-NEXUS:START -->` and `<!-- REPO-NEXUS:END -->`, preserving any manual user instructions outside those markers. This serves as the primary instructions file for Google Gemini CLI and Google Antigravity.
7
- - **User Skills (`.gemini/skills/rnex-*.md`)**: Zero-logic user skill pointers linking directly to core skills (`.rnex/skills/`) and active plugins' skills (`.rnex/plugins/<name>/skills/`).
7
+ - **User Skills (`.agents/skills/rnex-*/SKILL.md`)**: Zero-logic user skill pointers linking directly to core skills (`.rnex/skills/`) and active plugins' skills (`.rnex/plugins/<name>/skills/`).
8
8
  - **File Discovery Un-Ignore (`.geminiignore`)**: Un-ignores member repositories (`!repos/*`) so Gemini CLI and Google Antigravity can discover and access member repository files, while workspace Git continues to ignore them.
9
9
  - **Decoupled Cross-Plugin Discovery**: The `gemini` provider discovers and registers user skills from whatever Repo Nexus plugins are currently active.
10
10
 
@@ -15,7 +15,7 @@ Configure plugin options in `rnex.yaml` or override them per developer in `.loca
15
15
  plugins:
16
16
  gemini:
17
17
  instructions: true # Maintain routing in GEMINI.md (default: true)
18
- skills: true # Generate user skills in .gemini/skills/ (default: true)
18
+ skills: true # Generate user skills in .agents/skills/ (default: true)
19
19
  ```
20
20
 
21
21
  To disable locally without altering team configuration, add to `.local.rnex.yaml`:
@@ -1,9 +1,9 @@
1
1
  name: gemini
2
2
  version: 0.5.1
3
- description: Google Gemini and Antigravity integration (maintains GEMINI.md instructions and generates user skills in .gemini/skills/)
3
+ description: Google Gemini and Antigravity integration (maintains GEMINI.md instructions and generates user skills in .agents/skills/)
4
4
  author: unoxen
5
5
  homepage: https://github.com/unoxen/repo-nexus
6
- skill_dir: .gemini/skills
6
+ skill_dir: .agents/skills
7
7
 
8
8
  config_defaults:
9
9
  instructions: true