repo-nexus 0.9.24 → 0.9.26

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.
Files changed (50) hide show
  1. package/lib/ai.sh +10 -30
  2. package/lib/commands/completion.sh +2 -3
  3. package/lib/commands/init.sh +2 -6
  4. package/lib/commands/repo.sh +0 -13
  5. package/lib/commands/status.sh +13 -36
  6. package/lib/commands/sync.sh +8 -25
  7. package/lib/hooks.sh +2 -3
  8. package/lib/plugins.sh +45 -136
  9. package/lib/repos.sh +0 -76
  10. package/lib/sdk.sh +127 -189
  11. package/lib/workspace.sh +45 -278
  12. package/lib/yaml.sh +15 -112
  13. package/package.json +1 -1
  14. package/plugins/claude/hooks/after_sync.sh +5 -10
  15. package/plugins/claude/hooks/before_plugin_disable.sh +5 -7
  16. package/plugins/claude/plugin.yaml +2 -1
  17. package/plugins/codex/hooks/after_sync.sh +5 -10
  18. package/plugins/codex/hooks/before_plugin_disable.sh +5 -7
  19. package/plugins/codex/plugin.yaml +2 -1
  20. package/plugins/copilot/hooks/after_sync.sh +5 -11
  21. package/plugins/copilot/hooks/before_plugin_disable.sh +5 -16
  22. package/plugins/copilot/plugin.yaml +2 -1
  23. package/plugins/copilot/tests/test_plugin.sh +7 -15
  24. package/plugins/cursor/hooks/after_sync.sh +5 -14
  25. package/plugins/cursor/hooks/before_plugin_disable.sh +6 -10
  26. package/plugins/cursor/plugin.yaml +5 -1
  27. package/plugins/gemini/hooks/after_sync.sh +6 -19
  28. package/plugins/gemini/hooks/before_plugin_disable.sh +5 -10
  29. package/plugins/gemini/plugin.yaml +5 -1
  30. package/plugins/gemini/tests/test_plugin.sh +1 -6
  31. package/plugins/llm-wiki/README.md +35 -41
  32. package/plugins/llm-wiki/ai-instructions.md +4 -4
  33. package/plugins/llm-wiki/bin/ingest.sh +10 -5
  34. package/plugins/llm-wiki/lib/btree_helpers.sh +227 -330
  35. package/plugins/llm-wiki/lib/config.sh +9 -60
  36. package/plugins/llm-wiki/lib/lint_helpers.sh +80 -280
  37. package/plugins/llm-wiki/lib/source_helpers.sh +55 -163
  38. package/plugins/llm-wiki/lib/utils.sh +191 -14
  39. package/plugins/llm-wiki/plugin.yaml +1 -1
  40. package/plugins/llm-wiki/rules/behavioral.md +13 -16
  41. package/plugins/llm-wiki/skills/ingest.md +14 -14
  42. package/plugins/llm-wiki/skills/lint.md +12 -12
  43. package/plugins/llm-wiki/tests/test_plugin.sh +37 -53
  44. package/plugins/windsurf/hooks/after_sync.sh +5 -10
  45. package/plugins/windsurf/hooks/before_plugin_disable.sh +5 -8
  46. package/plugins/windsurf/plugin.yaml +2 -1
  47. package/plugins/llm-wiki/agents/rnex-wiki-curator.agent.md +0 -8
  48. package/plugins/llm-wiki/instructions/rnex-scaffolding-meta-prompt.md +0 -102
  49. package/plugins/llm-wiki/templates/rnex-llm-wiki.sample.md +0 -48
  50. package/plugins/llm-wiki/templates/rnex-wiki-page.sample.md +0 -24
package/lib/ai.sh CHANGED
@@ -43,7 +43,6 @@ rnex*
43
43
 
44
44
  # Local machine-specific configuration
45
45
  $RNEX_LOCAL_CONFIG_FILE
46
- .rnex.local.yaml
47
46
  GI_SECTION_EOF
48
47
 
49
48
  _custom_ignores="$(yaml_get_git_ignore 2>/dev/null || true)"
@@ -57,7 +56,7 @@ GI_SECTION_EOF
57
56
  "**/.rnex*"|"**/rnex*"|".rnex*"|"rnex*"|\
58
57
  "**/.rnex*/"|"**/rnex*/"|".rnex*/"|"rnex*/"|\
59
58
  "!rnex.yaml"|"!**/rnex.yaml"|\
60
- "$RNEX_LOCAL_CONFIG_FILE"|".rnex.local.yaml")
59
+ "$RNEX_LOCAL_CONFIG_FILE")
61
60
  continue
62
61
  ;;
63
62
  esac
@@ -98,14 +97,7 @@ reconcile_gitignore() {
98
97
  mv "$_sec_tmp" "$_gi"
99
98
  log_ok "Created .gitignore (ignoring ${_active_repos_dir}/, recursive .rnex directories, and $RNEX_LOCAL_CONFIG_FILE)"
100
99
  else
101
- # 1. Strip any legacy lint_trigger_counter entries if present
102
- if grep -q "lint_trigger_counter" "$_gi" 2>/dev/null; then
103
- _tmp="$(mktemp)"
104
- grep -v "lint_trigger_counter" "$_gi" > "$_tmp" && mv "$_tmp" "$_gi"
105
- log_ok "Removed legacy lint trigger counter entries from .gitignore"
106
- fi
107
-
108
- # 2. If delimited section exists, replace it in-place with the newly synced section
100
+ # 1. If delimited section exists, replace it in-place with the newly synced section
109
101
  if grep -qFx -- "$GITIGNORE_MARKER_START" "$_gi" 2>/dev/null; then
110
102
  _tmp="$(mktemp)"
111
103
  awk -v s="$GITIGNORE_MARKER_START" -v e="$GITIGNORE_MARKER_END" -v src="$_sec_tmp" '
@@ -123,7 +115,7 @@ reconcile_gitignore() {
123
115
  ' "$_gi" > "$_tmp" && mv "$_tmp" "$_gi"
124
116
  rm -f "$_sec_tmp"
125
117
  else
126
- # 3. Upgrade legacy un-delimited .gitignore or append managed section to existing user .gitignore
118
+ # 2. Append managed section to existing user .gitignore
127
119
  _user_tmp="$(mktemp)"
128
120
  awk -v local_cfg="$RNEX_LOCAL_CONFIG_FILE" -v ard="$_active_repos_dir" '
129
121
  /^[ ]*#[ ]*Member repos \(managed by rnex/ { next }
@@ -137,7 +129,7 @@ reconcile_gitignore() {
137
129
  $0 == "**/.rnex*" || $0 == "**/rnex*" || $0 == ".rnex*" || $0 == "rnex*" { next }
138
130
  $0 == "!rnex.yaml" || $0 == "!**/rnex.yaml" { next }
139
131
  $0 == ".rnex" || $0 == "rnex" { next }
140
- $0 == local_cfg || $0 == ".rnex.local.yaml" { next }
132
+ $0 == local_cfg { next }
141
133
  { lines[++n] = $0 }
142
134
  END {
143
135
  start = 1
@@ -194,7 +186,7 @@ clean_rnex_gitignore() {
194
186
 
195
187
  # ---- AI Instructions Compilation (.rnex/ai-instructions.md) ----------------
196
188
 
197
- # Resolve the primary instruction file for an AI provider plugin
189
+ # Resolve the primary instruction file for an AI provider plugin from plugin.yaml
198
190
  plugin_get_instruction_file() {
199
191
  _pif_name="$1"
200
192
  _pif_pdir="${2:-}"
@@ -204,17 +196,6 @@ plugin_get_instruction_file() {
204
196
  if [ -n "$_pif_pdir" ]; then
205
197
  _pif_file="$(plugin_get_field "$_pif_pdir" "instruction_file" 2>/dev/null || true)"
206
198
  fi
207
- if [ -z "$_pif_file" ]; then
208
- case "$_pif_name" in
209
- claude) _pif_file="CLAUDE.md" ;;
210
- gemini) _pif_file="GEMINI.md" ;;
211
- cursor) _pif_file=".cursorrules" ;;
212
- windsurf) _pif_file=".windsurfrules" ;;
213
- codex) _pif_file="CODEX.md" ;;
214
- copilot) _pif_file=".github/copilot-instructions.md" ;;
215
- agents|agent) _pif_file="AGENTS.md" ;;
216
- esac
217
- fi
218
199
  printf '%s' "$_pif_file"
219
200
  }
220
201
 
@@ -254,7 +235,7 @@ file_has_user_content() {
254
235
  }
255
236
 
256
237
  # Reconcile AI provider instruction files:
257
- # - When provider plugins are enabled (e.g. Gemini, Claude), creates/updates their specific instruction files (GEMINI.md, CLAUDE.md)
238
+ # - When provider plugins are enabled, creates/updates their declared instruction_file
258
239
  # - Only creates AGENTS.md if it is the main instructions file for an enabled AI provider or no provider plugins are enabled
259
240
  # - Cleans up instruction files that have no user content when their provider is disabled or inactive
260
241
  reconcile_ai_instructions_files() {
@@ -282,9 +263,11 @@ reconcile_ai_instructions_files() {
282
263
  merge_rnex_instructions "$_raif_dir/AGENTS.md"
283
264
  fi
284
265
 
285
- # For any existing instruction files on disk that are NOT currently active:
266
+ # For any existing provider instruction files on disk that are NOT currently active:
286
267
  # Clean rnex instructions (removing file if empty outside block, or stripping rnex block)
287
- for _if in CLAUDE.md GEMINI.md CODEX.md .cursorrules .windsurfrules .github/copilot-instructions.md; do
268
+ for _pdir in $(list_all_available_plugin_dirs 2>/dev/null || true); do
269
+ _if="$(plugin_get_field "$_pdir" "instruction_file" 2>/dev/null || true)"
270
+ [ -n "$_if" ] || continue
288
271
  case " $_active_files " in
289
272
  *" $_if "*) ;;
290
273
  *)
@@ -719,9 +702,6 @@ sync_rnex_base_assets() {
719
702
  _src_skills="${RNEX_ROOT:-}/skills"
720
703
  fi
721
704
 
722
- # Purge obsolete .rnex/prompts/ and .rnex/workflows/
723
- rm -rf "$NEXUS_DIR/.rnex/prompts" "$NEXUS_DIR/.rnex/workflows" 2>/dev/null || true
724
-
725
705
  # Ensure .rnex/skills exists
726
706
  mkdir -p "$NEXUS_DIR/.rnex/skills"
727
707
 
@@ -35,7 +35,7 @@ _rnex_completions() {
35
35
  return 0
36
36
  ;;
37
37
  sync)
38
- COMPREPLY=( $(compgen -W "-y --yes -q --quiet --upgrade -H --ignore-hooks" -- "$cur") )
38
+ COMPREPLY=( $(compgen -W "-y --yes -q --quiet -H --ignore-hooks" -- "$cur") )
39
39
  return 0
40
40
  ;;
41
41
  status)
@@ -134,7 +134,7 @@ _rnex() {
134
134
  ;;
135
135
  sync)
136
136
  local -a sync_opts
137
- sync_opts=('(-y --yes)'{-y,--yes}'[Automatically answer yes to prompts]' '(-q --quiet)'{-q,--quiet}'[Suppress non-error output]' '--upgrade[Upgrade workspace configuration schema]')
137
+ sync_opts=('(-y --yes)'{-y,--yes}'[Automatically answer yes to prompts]' '(-q --quiet)'{-q,--quiet}'[Suppress non-error output]')
138
138
  _describe -t sync_opts 'sync option' sync_opts
139
139
  ;;
140
140
  status)
@@ -191,7 +191,6 @@ complete -c rnex -n "__fish_use_subcommand" -a list -d "List repositories"
191
191
  complete -c rnex -n "__fish_use_subcommand" -a sync -d "Reconcile workspace, plugins, skills, and repos"
192
192
  complete -c rnex -n "__fish_seen_subcommand_from sync" -l yes -s y -d "Automatically answer yes to prompts"
193
193
  complete -c rnex -n "__fish_seen_subcommand_from sync" -l quiet -s q -d "Suppress non-error output"
194
- complete -c rnex -n "__fish_seen_subcommand_from sync" -l upgrade -d "Upgrade workspace configuration schema"
195
194
  complete -c rnex -n "__fish_use_subcommand" -a status -d "Inspect workspace status (read-only)"
196
195
  complete -c rnex -n "__fish_use_subcommand" -a plugin -d "Manage plugins"
197
196
  complete -c rnex -n "__fish_use_subcommand" -a completion -d "Generate completions"
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Initialize a new Repo Nexus workspace in the specified directory (or current directory):
8
8
  # Sets up rnex.yaml, .rnex/ harness, gitignore rules, routing instructions in AGENTS.md,
9
- # enabled plugins (e.g. --claude, --gemini, --llm-wiki), and optional VS Code / Cursor workspace.
9
+ # enabled plugins (via --<plugin> or --plugin <plugin>), and optional multi-root workspace.
10
10
  # Usage:
11
11
  # rnex init [-y|--yes] [--hooks|--no-hooks] [--<plugin>] [<directory>]
12
12
  cmd_init() {
@@ -35,10 +35,6 @@ cmd_init() {
35
35
  shift
36
36
  [ -n "$1" ] && _cli_plugins="${_cli_plugins:+$_cli_plugins }$1"
37
37
  ;;
38
- --ai|--instructions|--ai-instructions)
39
- shift
40
- # Legacy flag ignored in favor of plugins
41
- ;;
42
38
  --code-workspace|--vscode)
43
39
  _cli_code_workspace="true"
44
40
  if [ $# -ge 2 ]; then
@@ -195,7 +191,7 @@ git:
195
191
  $_hooks_block
196
192
 
197
193
  # Lifecycle Hooks
198
- rnex_hooks:
194
+ rnex-hooks:
199
195
  before_sync: []
200
196
  after_sync: []
201
197
  before_clone: []
@@ -136,9 +136,6 @@ cmd_repo_add() {
136
136
  --branch=*)
137
137
  _branch="${1#*=}"
138
138
  ;;
139
- --no-rnex-dir|--rnex-dir=false|--rnex-dir|--rnex-dir=true)
140
- # Obsolete flag ignored after transition to on-demand member .rnex
141
- ;;
142
139
  -*)
143
140
  die "Unknown option: $1"
144
141
  ;;
@@ -202,7 +199,6 @@ cmd_repo_add() {
202
199
  [ -n "$_branch" ] && yaml_set_local "$_name" "branch" "$_branch"
203
200
  [ "$_readonly" = "true" ] && yaml_set_local "$_name" "readonly" "true"
204
201
  [ "$_enabled" = "false" ] && yaml_set_local "$_name" "enabled" "false"
205
- sync_repo_rnex "$_name"
206
202
  build_ai_instructions "$NEXUS_DIR"
207
203
  sync_code_workspace
208
204
  update_sync_stamp "$NEXUS_DIR"
@@ -221,7 +217,6 @@ cmd_repo_add() {
221
217
  [ -n "$_branch" ] && yaml_set "$_name" "branch" "$_branch"
222
218
  [ "$_readonly" = "true" ] && yaml_set "$_name" "readonly" "true"
223
219
  [ "$_enabled" = "false" ] && yaml_set "$_name" "enabled" "false"
224
- sync_repo_rnex "$_name"
225
220
  build_ai_instructions "$NEXUS_DIR"
226
221
  sync_code_workspace
227
222
  update_sync_stamp "$NEXUS_DIR"
@@ -232,7 +227,6 @@ cmd_repo_add() {
232
227
  fi
233
228
 
234
229
  yaml_add_repo "$_name" "$_url" "$_enabled" "$_readonly" "$_branch"
235
- sync_repo_rnex "$_name"
236
230
  build_ai_instructions "$NEXUS_DIR"
237
231
  sync_code_workspace
238
232
  update_sync_stamp "$NEXUS_DIR"
@@ -369,9 +363,6 @@ cmd_repo_set() {
369
363
  fi
370
364
  fi
371
365
 
372
- if [ "$_enable_val" = "true" ]; then
373
- sync_repo_rnex "$_name"
374
- fi
375
366
  build_ai_instructions "$NEXUS_DIR"
376
367
  sync_code_workspace
377
368
  update_sync_stamp "$NEXUS_DIR"
@@ -404,7 +395,6 @@ cmd_repo_clone() {
404
395
  log_info "Cloning $_name (branch: $_branch) from $_url into $_dest..."
405
396
  if git clone -b "$_branch" "$_url" "$_dest"; then
406
397
  log_ok "Successfully cloned '$_name'"
407
- sync_repo_rnex "$_name"
408
398
  sync_code_workspace
409
399
  update_sync_stamp "$NEXUS_DIR"
410
400
  else
@@ -414,7 +404,6 @@ cmd_repo_clone() {
414
404
  log_info "Cloning $_name from $_url into $_dest..."
415
405
  if git clone "$_url" "$_dest"; then
416
406
  log_ok "Successfully cloned '$_name'"
417
- sync_repo_rnex "$_name"
418
407
  sync_code_workspace
419
408
  update_sync_stamp "$NEXUS_DIR"
420
409
  else
@@ -523,7 +512,6 @@ cmd_clone() {
523
512
  log_info "Cloning $_name (branch: $_branch) from $_url..."
524
513
  if git clone -b "$_branch" "$_url" "$_dest"; then
525
514
  log_ok "Successfully cloned '$_name'"
526
- sync_repo_rnex "$_name"
527
515
  else
528
516
  log_err "Failed to clone '$_name' from $_url"
529
517
  fi
@@ -531,7 +519,6 @@ cmd_clone() {
531
519
  log_info "Cloning $_name from $_url..."
532
520
  if git clone "$_url" "$_dest"; then
533
521
  log_ok "Successfully cloned '$_name'"
534
- sync_repo_rnex "$_name"
535
522
  else
536
523
  log_err "Failed to clone '$_name' from $_url"
537
524
  fi
@@ -35,11 +35,7 @@ cmd_status() {
35
35
 
36
36
  printf '%bConfiguration:%b\n' "$_BOLD" "$_NC"
37
37
  if [ -f "$WORKSPACE_YAML" ]; then
38
- _vc_res=0
39
- version_cmp "$WORKSPACE_CONFIG_VERSION" "$RNEX_VERSION" || _vc_res=$?
40
- if [ "$_vc_res" -eq 2 ]; then
41
- printf ' %b!%b Repo Config: %s %b(v%s is older than CLI v%s; run "rnex sync")%b\n' "$_Y" "$_NC" "$WORKSPACE_YAML" "$_DIM" "${WORKSPACE_CONFIG_VERSION:-0.0.0}" "$RNEX_VERSION" "$_NC"
42
- elif [ -n "$WORKSPACE_CONFIG_VERSION" ]; then
38
+ if [ -n "$WORKSPACE_CONFIG_VERSION" ]; then
43
39
  printf ' %b●%b Repo Config: %s %b(loaded, v%s)%b\n' "$_G" "$_NC" "$WORKSPACE_YAML" "$_DIM" "$WORKSPACE_CONFIG_VERSION" "$_NC"
44
40
  else
45
41
  printf ' %b●%b Repo Config: %s %b(loaded)%b\n' "$_G" "$_NC" "$WORKSPACE_YAML" "$_DIM" "$_NC"
@@ -68,11 +64,10 @@ cmd_status() {
68
64
  _gi="$NEXUS_DIR/.gitignore"
69
65
  _repos_dir_name="$(yaml_get_repos_dir 2>/dev/null || printf 'repos')"
70
66
  [ -n "$_repos_dir_name" ] || _repos_dir_name="repos"
71
- _gi_repos=0; _gi_local=0; _gi_has_counter=0; _gi_has_rnex=0; _gi_has_markers=0; _gi_custom_ok=1
67
+ _gi_repos=0; _gi_local=0; _gi_has_rnex=0; _gi_has_markers=0; _gi_custom_ok=1
72
68
  if [ -f "$_gi" ]; then
73
69
  (grep -q "^${_repos_dir_name}/" "$_gi" 2>/dev/null || grep -q "^${_repos_dir_name}\*" "$_gi" 2>/dev/null || grep -q '^repos' "$_gi" 2>/dev/null) && _gi_repos=1
74
70
  grep -qF "$RNEX_LOCAL_CONFIG_FILE" "$_gi" 2>/dev/null && _gi_local=1
75
- grep -q "lint_trigger_counter" "$_gi" 2>/dev/null && _gi_has_counter=1
76
71
  (grep -q '\*\*/\.rnex\*' "$_gi" 2>/dev/null || grep -q '\.rnex\*' "$_gi" 2>/dev/null) && _gi_has_rnex=1
77
72
  if grep -qFx -- "${GITIGNORE_MARKER_START:-# REPO-NEXUS:START}" "$_gi" 2>/dev/null && \
78
73
  grep -qFx -- "${GITIGNORE_MARKER_END:-# REPO-NEXUS:END}" "$_gi" 2>/dev/null; then
@@ -92,7 +87,7 @@ cmd_status() {
92
87
  fi
93
88
  fi
94
89
 
95
- if [ "$_gi_repos" -eq 1 ] && [ "$_gi_local" -eq 1 ] && [ "$_gi_has_counter" -eq 0 ] && [ "$_gi_has_rnex" -eq 1 ] && [ "$_gi_has_markers" -eq 1 ] && [ "$_gi_custom_ok" -eq 1 ]; then
90
+ if [ "$_gi_repos" -eq 1 ] && [ "$_gi_local" -eq 1 ] && [ "$_gi_has_rnex" -eq 1 ] && [ "$_gi_has_markers" -eq 1 ] && [ "$_gi_custom_ok" -eq 1 ]; then
96
91
  printf ' %b✓%b Git Ignore: %s/, %s, and **/.rnex* ignored in .gitignore\n' "$_G" "$_NC" "$_repos_dir_name" "$RNEX_LOCAL_CONFIG_FILE"
97
92
  else
98
93
  printf ' %b!%b Git Ignore: recommend running "rnex sync" to update .gitignore (%s/, local configs)\n' "$_Y" "$_NC" "$_repos_dir_name"
@@ -147,17 +142,12 @@ cmd_status() {
147
142
  printf ' %b✓%b %s %b(standard instructions directive)%b\n' "$_G" "$_NC" "AGENTS.md" "$_DIM" "$_NC"
148
143
  _has_any_instructions=1
149
144
  fi
150
- for _pair in \
151
- "CLAUDE.md:Claude" \
152
- "GEMINI.md:Gemini" \
153
- "CODEX.md:Codex" \
154
- ".cursorrules:Cursor" \
155
- ".windsurfrules:Windsurf" \
156
- ".github/copilot-instructions.md:Copilot"; do
157
- _ifile="${_pair%%:*}"
158
- _ilbl="${_pair#*:}"
145
+ for _pdir in $(list_all_available_plugin_dirs 2>/dev/null || true); do
146
+ _ifile="$(plugin_get_field "$_pdir" "instruction_file" 2>/dev/null || true)"
147
+ [ -n "$_ifile" ] || continue
148
+ _pname="$(plugin_get_field "$_pdir" "name" 2>/dev/null || basename "$_pdir")"
159
149
  if [ -f "$NEXUS_DIR/$_ifile" ]; then
160
- printf ' %b✓%b %s %b(%s instructions)%b\n' "$_G" "$_NC" "$_ifile" "$_DIM" "$_ilbl" "$_NC"
150
+ printf ' %b✓%b %s %b(%s instructions)%b\n' "$_G" "$_NC" "$_ifile" "$_DIM" "$_pname" "$_NC"
161
151
  _has_any_instructions=1
162
152
  fi
163
153
  done
@@ -185,19 +175,12 @@ cmd_status() {
185
175
  if [ -d "$NEXUS_DIR/.rnex/skills" ]; then
186
176
  printf ' %b✓%b %s %b(workspace skills)%b\n' "$_G" "$_NC" ".rnex/skills/" "$_DIM" "$_NC"
187
177
  fi
188
- for _spair in \
189
- ".cursor/rules/:Cursor" \
190
- ".claude/skills/:Claude" \
191
- ".windsurf/rules/:Windsurf" \
192
- ".agents/skills/:Gemini" \
193
- ".gemini/skills/:Gemini" \
194
- ".codex/skills/:Codex" \
195
- ".github/skills/:Copilot"; do
196
- _sdir="${_spair%%:*}"
197
- _slbl="${_spair#*:}"
198
- [ "$_sdir" = ".gemini/skills/" ] && _status_has_rnex_skills "$NEXUS_DIR/.agents/skills" && continue
178
+ for _pdir in $(list_all_available_plugin_dirs 2>/dev/null || true); do
179
+ _sdir="$(plugin_get_field "$_pdir" "skill_dir" 2>/dev/null || true)"
180
+ [ -n "$_sdir" ] || continue
181
+ _pname="$(plugin_get_field "$_pdir" "name" 2>/dev/null || basename "$_pdir")"
199
182
  if _status_has_rnex_skills "$NEXUS_DIR/${_sdir%/}"; then
200
- printf ' %b✓%b %s %b(%s user skills)%b\n' "$_G" "$_NC" "$_sdir" "$_DIM" "$_slbl" "$_NC"
183
+ printf ' %b✓%b %s/ %b(%s user skills)%b\n' "$_G" "$_NC" "${_sdir%/}" "$_DIM" "$_pname" "$_NC"
201
184
  fi
202
185
  done
203
186
  printf '\n'
@@ -231,9 +214,6 @@ cmd_status() {
231
214
  if [ -n "$_opts" ]; then
232
215
  printf ' %b↳ Options: %s%b\n' "$_DIM" "$_opts" "$_NC"
233
216
  fi
234
- if [ -n "$(plugin_legacy_raw_dir "$_pname" 2>/dev/null)" ]; then
235
- printf ' %b↳ [!] Deprecated: raw_dir — run "rnex sync" to rewrite to sources%b\n' "$_Y" "$_NC"
236
- fi
237
217
  fi
238
218
  fi
239
219
  else
@@ -263,9 +243,6 @@ cmd_status() {
263
243
  if yaml_repo_readonly "$_name"; then
264
244
  _tags=" ${_Y}[readonly]${_NC}"
265
245
  fi
266
- if [ -d "$_rdir/.rnex" ]; then
267
- _tags="${_tags} ${_DIM}[.rnex]${_NC}"
268
- fi
269
246
  printf ' %b●%b %-18s %b[%s]%b%b %s\n' "$_G" "$_NC" "$_name" "$_C" "$_b" "$_NC" "$_tags" "${_url:+- $_url}"
270
247
  else
271
248
  printf ' %b✗%b %-18s %b[missing — run "rnex clone"]%b %s\n' "$_R" "$_NC" "$_name" "$_R" "$_NC" "${_url:+- $_url}"
@@ -10,7 +10,6 @@ _write_auto_sync_script() {
10
10
  _dir="${1:-$NEXUS_DIR}"
11
11
  _bin_dir="$_dir/.rnex/bin"
12
12
  mkdir -p "$_bin_dir"
13
- rm -f "$_bin_dir/auto-sync.sh" 2>/dev/null || true
14
13
  _script="$_bin_dir/rnex-auto-sync.sh"
15
14
  cat > "$_script" <<'EOF'
16
15
  #!/bin/sh
@@ -35,11 +34,11 @@ EOF
35
34
  }
36
35
 
37
36
  # Primary workspace reconciliation command:
38
- # Reconciles workspace configuration version, .gitignore / .ignore routing, AGENTS.md,
39
- # core skills, AI instruction compilation, active plugins, Git hooks, member .rnex
40
- # harnesses, and VS Code / Cursor workspace files.
37
+ # Reconciles .gitignore / .ignore routing, AGENTS.md / provider instruction files,
38
+ # core skills, AI instruction compilation, active plugins, Git hooks, member
39
+ # repositories, and VS Code / Cursor workspace files.
41
40
  # Usage:
42
- # rnex sync [-y|--yes] [-q|--quiet] [--upgrade]
41
+ # rnex sync [-y|--yes] [-q|--quiet]
43
42
  cmd_sync() {
44
43
  require_workspace
45
44
  ensure_repos_dir
@@ -47,14 +46,11 @@ cmd_sync() {
47
46
  _old_sync_quiet="${_sync_quiet:-0}"
48
47
  _sync_auto_yes=0
49
48
  _sync_quiet=0
50
- _sync_upgrade=0
51
49
 
52
50
  while [ $# -gt 0 ]; do
53
51
  case "$1" in
54
52
  -y|--yes) _sync_auto_yes=1 ;;
55
53
  -q|--quiet) _sync_quiet=1 ;;
56
- --upgrade) _sync_upgrade=1 ;;
57
- -f|--fix) ;; # Accepted silently for backward compatibility
58
54
  *) ;;
59
55
  esac
60
56
  shift
@@ -62,17 +58,6 @@ cmd_sync() {
62
58
 
63
59
  [ "$_sync_quiet" -eq 0 ] && log_info "Reconciling Repo Nexus workspace at $NEXUS_DIR..."
64
60
 
65
- # Version detection & non-destructive upgrade
66
- _vc_res=0
67
- version_cmp "$WORKSPACE_CONFIG_VERSION" "$RNEX_VERSION" || _vc_res=$?
68
- if [ "$_vc_res" -eq 2 ] || [ "$_sync_upgrade" -eq 1 ]; then
69
- upgrade_workspace_config "$WORKSPACE_YAML" "$RNEX_VERSION"
70
- _load_workspace_version
71
- _load_repos_dir
72
- _load_code_workspace
73
- [ "$_sync_quiet" -eq 0 ] && log_ok "Upgraded workspace configuration and routing instructions to v$RNEX_VERSION"
74
- fi
75
-
76
61
  # --------------------------------------------------------------------------
77
62
  # Step 1: Sync hardcoded files & invoke commands that do not depend on config
78
63
  # --------------------------------------------------------------------------
@@ -101,7 +86,7 @@ cmd_sync() {
101
86
  # --------------------------------------------------------------------------
102
87
  # Step 3: The rest of synchronization
103
88
  # --------------------------------------------------------------------------
104
- # 3.1. Reconcile plugins (scopes, deterministic sync, lifecycle hooks copy, templates, leaked dir cleanup)
89
+ # 3.1. Reconcile plugins (scopes, deterministic sync, lifecycle hooks copy, templates)
105
90
  sync_plugins
106
91
 
107
92
  # 3.2. Reconcile Git hooks
@@ -115,15 +100,13 @@ cmd_sync() {
115
100
  fi
116
101
  fi
117
102
 
118
- # 3.3. Reconcile member repos (<repos_dir> unlisted pruning & .rnex/ harness sync)
103
+ # 3.3. Reconcile member repos (<repos_dir> unlisted pruning & missing clone checks)
119
104
  prune_unlisted_repos "$REPOS_DIR"
120
105
  yaml_list_repos | while read -r _name; do
121
106
  [ -n "$_name" ] || continue
122
107
  if yaml_repo_enabled "$_name"; then
123
108
  _rdir="$(resolve_repo_path "$_name")"
124
- if [ -d "$_rdir" ]; then
125
- sync_repo_rnex "$_name"
126
- else
109
+ if [ ! -d "$_rdir" ]; then
127
110
  log_warn "Member repo '$_name' is missing on disk. Run: rnex clone"
128
111
  fi
129
112
  fi
@@ -133,7 +116,7 @@ cmd_sync() {
133
116
  sync_code_workspace
134
117
 
135
118
  if [ "$_sync_quiet" -eq 0 ]; then
136
- log_ok "Sync complete — workspace, plugins, skills, and member .rnex directories reconciled"
119
+ log_ok "Sync complete — workspace, plugins, skills, and member repositories reconciled"
137
120
  fi
138
121
  _sync_quiet="$_old_sync_quiet"
139
122
  return 0
package/lib/hooks.sh CHANGED
@@ -179,7 +179,7 @@ _run_hook_internal() {
179
179
  done
180
180
  fi
181
181
 
182
- # 2. Execute configured commands from rnex-hooks.<event_name> / rnex_hooks.<event_name>
182
+ # 2. Execute configured commands from rnex-hooks.<event_name>
183
183
  if [ -z "$_hook_target_plugin" ] && [ "${_RNEX_INTERNAL_PLUGIN_ONLY:-0}" != "1" ] && [ "$_ignore_hooks" != "1" ]; then
184
184
  rnex_hooks_run_stage "$_hook_root" "$_hook_phase_cmd" "$@"
185
185
  fi
@@ -194,8 +194,7 @@ _run_hook_internal() {
194
194
  # Summary:
195
195
  # Executes configured workspace lifecycle hook commands for a specified stage
196
196
  # (e.g., pre_sync, post_sync, after_sync, before_sync, after_init) strictly
197
- # declared in rnex.yaml or .local.rnex.yaml under rnex-hooks.<stage> (or
198
- # legacy rnex_hooks.<stage>).
197
+ # declared in rnex.yaml or .local.rnex.yaml under rnex-hooks.<stage>.
199
198
  # Adheres to strict opt-in execution: if no hook commands are declared for
200
199
  # the stage, zero commands are executed.
201
200
  #