repo-nexus 0.5.4 → 0.5.5

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
@@ -24,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24
24
  - Preserved custom / repository-owned wrappers in `.rnex/hooks/` that are not auto-managed by `rnex`.
25
25
  - Added `cmp -s` check before writing hook files to eliminate unnecessary file churn and in-place overwrites.
26
26
  - Automatically chain to existing repository-owned `.githooks/` scripts if present.
27
+ - **Track Workspace `.rnex/` in Version Control**:
28
+ - Removed `.rnex/` from `.gitignore` templates and generation.
29
+ - `reconcile_gitignore` and `rnex fix` actively strip legacy `.rnex/` ignore rules from `.gitignore` so that team prompts (`.rnex/prompts/`), plugins (`.rnex/plugins/`), and hooks (`.rnex/hooks/`) are tracked in git.
30
+ - Updated `rnex status` to expect `.rnex/` to remain tracked by git.
27
31
 
28
32
  ## [0.5.1] - 2026-10-08
29
33
 
package/docs/CLI.md CHANGED
@@ -78,7 +78,7 @@ rnex init [options] [directory]
78
78
  2. Merges Repo Nexus routing instructions (`<!-- REPO-NEXUS:START -->` ... `<!-- REPO-NEXUS:END -->`) into the target AI instructions file.
79
79
  3. Creates `./repos/` directory with a tracked `.gitkeep`.
80
80
  4. Creates `.rnex/`, `.rnex/plugins/`, and copies standardized prompts to `.rnex/prompts/`.
81
- 5. Reconciles `.gitignore` to ensure `repos/`, `.rnex/`, and `.local.rnex.yaml` are never tracked by the meta-repo.
81
+ 5. Reconciles `.gitignore` to ensure `repos/` and `.local.rnex.yaml` are never tracked by the meta-repo (while keeping `.rnex/` tracked).
82
82
  6. Generates a multi-root `.code-workspace` file if configured.
83
83
  7. Prompts to configure automated workspace Git hooks (`core.hooksPath = .rnex/hooks`) if inside a Git repository.
84
84
 
@@ -110,7 +110,7 @@ rnex status
110
110
  #### What it reports:
111
111
  - **Configuration & Versions**: Path, version tag, and load status of `rnex.yaml` and `.local.rnex.yaml`.
112
112
  - **Paths**: Clones directory (`repos_dir`) and primary AI instructions file.
113
- - **Git Integration**: Validation that `.gitignore` ignores `repos/`, `.rnex/`, and local files, and whether `core.hooksPath` points to `.rnex/hooks`.
113
+ - **Git Integration**: Validation that `.gitignore` ignores `repos/` and local files (while keeping `.rnex/` tracked), and whether `core.hooksPath` points to `.rnex/hooks`.
114
114
  - **AI Routing Context**: Existence and routing block markers in `AGENTS.md`, `CLAUDE.md`, `.code-workspace`, and prompts catalog (`.rnex/prompts/index.md`).
115
115
  - **Active Plugins**: List of enabled plugins, scoped versions, and asset directories.
116
116
  - **Member Repositories**: Every registered repository, enabled/disabled state, clone health, and active Git branch.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-nexus",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
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",
package/rnex CHANGED
@@ -890,14 +890,11 @@ reconcile_gitignore() {
890
890
  repos/*
891
891
  !repos/.gitkeep
892
892
 
893
- # Repo Nexus internal state & cache
894
- .rnex/
895
-
896
893
  # Local machine-specific configuration
897
894
  $RNEX_LOCAL_CONFIG_FILE
898
895
  .rnex.local.yaml
899
896
  GI_EOF
900
- log_ok "Created .gitignore (ignoring repos/, .rnex/, and $RNEX_LOCAL_CONFIG_FILE)"
897
+ log_ok "Created .gitignore (ignoring repos/ and $RNEX_LOCAL_CONFIG_FILE)"
901
898
  return 0
902
899
  fi
903
900
 
@@ -908,18 +905,19 @@ GI_EOF
908
905
  log_ok "Removed legacy lint trigger counter entries from .gitignore"
909
906
  fi
910
907
 
911
- # 2. Ensure repos/* is ignored
908
+ # 2. Strip legacy .rnex/ entries if present (.rnex/ contains tracked prompts, plugins, and hooks)
909
+ if grep -qE '^[ ]*#?[ ]*Repo Nexus internal state' "$_gi" 2>/dev/null || grep -qE '^\.rnex/?$' "$_gi" 2>/dev/null; then
910
+ _tmp="$(mktemp)"
911
+ grep -vE '(^[ ]*#?[ ]*Repo Nexus internal state|^\.rnex/?$)' "$_gi" > "$_tmp" && mv "$_tmp" "$_gi"
912
+ log_ok "Removed .rnex/ from .gitignore (.rnex should be tracked in git)"
913
+ fi
914
+
915
+ # 3. Ensure repos/* is ignored
912
916
  if ! grep -q "^repos" "$_gi" 2>/dev/null; then
913
917
  printf '\n# Member repos (managed by rnex)\nrepos/*\n!repos/.gitkeep\n' >> "$_gi"
914
918
  log_dim "Added repos/* to .gitignore"
915
919
  fi
916
920
 
917
- # 3. Ensure .rnex/ is ignored
918
- if ! grep -q '^\.rnex/' "$_gi" 2>/dev/null && ! grep -q '^\.rnex$' "$_gi" 2>/dev/null; then
919
- printf '\n# Repo Nexus internal state & cache\n.rnex/\n' >> "$_gi"
920
- log_dim "Added .rnex/ to .gitignore"
921
- fi
922
-
923
921
  # 4. Ensure local config files are ignored
924
922
  if ! grep -qF "$RNEX_LOCAL_CONFIG_FILE" "$_gi" 2>/dev/null; then
925
923
  printf '\n# Local machine-specific configuration\n%s\n' "$RNEX_LOCAL_CONFIG_FILE" >> "$_gi"
@@ -1621,7 +1619,7 @@ YAML_EOF
1621
1619
  sync_prompts
1622
1620
  NEXUS_DIR="$_orig_nexus"
1623
1621
 
1624
- # ---- 5. Ensure repos/, .rnex/, and local configs are gitignored ---------
1622
+ # ---- 5. Ensure repos/ and local configs are gitignored ---------
1625
1623
  reconcile_gitignore "$_target_dir"
1626
1624
 
1627
1625
  # ---- 6. Generate VS Code / Cursor workspace if configured ----------------
@@ -1978,18 +1976,18 @@ cmd_status() {
1978
1976
  fi
1979
1977
 
1980
1978
  _gi="$NEXUS_DIR/.gitignore"
1981
- _gi_repos=0; _gi_rnex=0; _gi_local=0; _gi_has_counter=0
1979
+ _gi_repos=0; _gi_local=0; _gi_has_counter=0; _gi_has_rnex=0
1982
1980
  if [ -f "$_gi" ]; then
1983
1981
  grep -q '^repos' "$_gi" 2>/dev/null && _gi_repos=1
1984
- (grep -q '^\.rnex/' "$_gi" 2>/dev/null || grep -q '^\.rnex$' "$_gi" 2>/dev/null) && _gi_rnex=1
1985
1982
  grep -qF "$RNEX_LOCAL_CONFIG_FILE" "$_gi" 2>/dev/null && _gi_local=1
1986
1983
  grep -q "lint_trigger_counter" "$_gi" 2>/dev/null && _gi_has_counter=1
1984
+ (grep -q '^\.rnex/' "$_gi" 2>/dev/null || grep -q '^\.rnex$' "$_gi" 2>/dev/null) && _gi_has_rnex=1
1987
1985
  fi
1988
1986
 
1989
- if [ "$_gi_repos" -eq 1 ] && [ "$_gi_rnex" -eq 1 ] && [ "$_gi_local" -eq 1 ] && [ "$_gi_has_counter" -eq 0 ]; then
1990
- printf ' %b✓%b Git Ignore: repos/, .rnex/, and %s ignored in .gitignore\n' "$_G" "$_NC" "$RNEX_LOCAL_CONFIG_FILE"
1987
+ if [ "$_gi_repos" -eq 1 ] && [ "$_gi_local" -eq 1 ] && [ "$_gi_has_counter" -eq 0 ] && [ "$_gi_has_rnex" -eq 0 ]; then
1988
+ printf ' %b✓%b Git Ignore: repos/ and %s ignored in .gitignore\n' "$_G" "$_NC" "$RNEX_LOCAL_CONFIG_FILE"
1991
1989
  else
1992
- printf ' %b!%b Git Ignore: recommend running "rnex fix" to update .gitignore (repos/, .rnex/, local configs)\n' "$_Y" "$_NC"
1990
+ printf ' %b!%b Git Ignore: recommend running "rnex fix" to update .gitignore (repos/, local configs)\n' "$_Y" "$_NC"
1993
1991
  fi
1994
1992
 
1995
1993
  _hooks_path="$(git -C "$NEXUS_DIR" config --get core.hooksPath 2>/dev/null || true)"