repo-nexus 0.9.21 → 0.9.22

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/lib/ai.sh CHANGED
@@ -15,7 +15,7 @@ AI_MARKER_END="<!-- REPO-NEXUS:END -->"
15
15
  # All detailed execution rules, constraints, and workspace context reside in .rnex/ai-instructions.md.
16
16
  if ! command -v get_rnex_instructions >/dev/null 2>&1; then
17
17
  get_rnex_instructions() {
18
- printf "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace.\n"
18
+ printf "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace. If \`.rnex/ai-instructions.md\` does not exist, disregard this instruction and proceed normally.\n"
19
19
  }
20
20
  fi
21
21
 
@@ -248,7 +248,7 @@ file_has_user_content() {
248
248
  !in_b { print }
249
249
  ' "$_fhuc_file" | sed -e '/^[[:space:]]*$/d')"
250
250
  else
251
- _content="$(grep -v "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\`" "$_fhuc_file" 2>/dev/null | grep -v "Multi-Repo AI Workspace Context" | sed -e '/^[[:space:]]*$/d')"
251
+ _content="$(grep -v "CRITICAL: .* \`.rnex/ai-instructions.md\`" "$_fhuc_file" 2>/dev/null | grep -v "Multi-Repo AI Workspace Context" | sed -e '/^[[:space:]]*$/d')"
252
252
  fi
253
253
  [ -n "$_content" ]
254
254
  }
package/lib/sdk.sh CHANGED
@@ -168,7 +168,7 @@ AI_MARKER_END="<!-- REPO-NEXUS:END -->"
168
168
  # Emit the single critical routing directive for initial provider instruction files.
169
169
  # All detailed execution rules, constraints, and workspace context reside in .rnex/ai-instructions.md.
170
170
  get_rnex_instructions() {
171
- printf "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace.\n"
171
+ printf "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace. If \`.rnex/ai-instructions.md\` does not exist, disregard this instruction and proceed normally.\n"
172
172
  }
173
173
 
174
174
  # Safely merge delimited Repo Nexus routing instructions (<!-- REPO-NEXUS:START -->)
@@ -190,7 +190,7 @@ merge_rnex_instructions() {
190
190
  return 0
191
191
  fi
192
192
 
193
- if grep -q "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\`" "$_dst" 2>/dev/null && ! grep -qF "$AI_MARKER_START" "$_dst" 2>/dev/null; then
193
+ if grep -q "CRITICAL: .* \`.rnex/ai-instructions.md\`" "$_dst" 2>/dev/null && ! grep -qF "$AI_MARKER_START" "$_dst" 2>/dev/null; then
194
194
  {
195
195
  printf '%s\n' "$AI_MARKER_START"
196
196
  cat "$_body_tmp"
@@ -309,14 +309,14 @@ clean_rnex_instructions() {
309
309
  return 0
310
310
  fi
311
311
 
312
- if grep -q "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\`" "$_dst" 2>/dev/null; then
313
- _non_rnex="$(grep -v "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\`" "$_dst" 2>/dev/null | grep -v "Multi-Repo AI Workspace Context" | sed -e '/^[[:space:]]*$/d')"
312
+ if grep -q "CRITICAL: .* \`.rnex/ai-instructions.md\`" "$_dst" 2>/dev/null; then
313
+ _non_rnex="$(grep -v "CRITICAL: .* \`.rnex/ai-instructions.md\`" "$_dst" 2>/dev/null | grep -v "Multi-Repo AI Workspace Context" | sed -e '/^[[:space:]]*$/d')"
314
314
  if [ -z "$_non_rnex" ]; then
315
315
  rm -f "$_dst"
316
316
  [ "${RNEX_QUIET:-0}" -eq 0 ] && [ "${_sync_quiet:-0}" -eq 0 ] && log_ok "Removed $(basename "$_dst")"
317
317
  else
318
318
  _tmp="$(mktemp)"
319
- grep -v "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\`" "$_dst" > "$_tmp" && mv "$_tmp" "$_dst"
319
+ grep -v "CRITICAL: .* \`.rnex/ai-instructions.md\`" "$_dst" > "$_tmp" && mv "$_tmp" "$_dst"
320
320
  [ "${RNEX_QUIET:-0}" -eq 0 ] && [ "${_sync_quiet:-0}" -eq 0 ] && log_ok "Removed Repo Nexus routing instructions from $(basename "$_dst")"
321
321
  fi
322
322
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-nexus",
3
- "version": "0.9.21",
3
+ "version": "0.9.22",
4
4
  "description": "Lightweight, zero-dependency Virtual Meta Repository (meta repo) and Nexus Repository (nexus repo) manager for multi-repo workspaces and shared AI context (no git submodules)",
5
5
  "bin": {
6
6
  "repo-nexus": "rnex",
@@ -1,5 +1,5 @@
1
1
  name: claude
2
- version: 0.9.21
2
+ version: 0.9.22
3
3
  description: Anthropic Claude Code integration (maintains CLAUDE.md instructions and generates user skills in .claude/skills/)
4
4
  author: unoxen
5
5
  homepage: https://github.com/unoxen/repo-nexus
@@ -22,7 +22,7 @@ run_test "Claude plugin: init --claude provisions CLAUDE.md and User Skills with
22
22
 
23
23
  _expected_3line_block="$(printf '%s\n%s\n%s' \
24
24
  "<!-- REPO-NEXUS:START -->" \
25
- "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace." \
25
+ "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace. If \`.rnex/ai-instructions.md\` does not exist, disregard this instruction and proceed normally." \
26
26
  "<!-- REPO-NEXUS:END -->")"
27
27
  _claude_block="$(awk '/<!-- REPO-NEXUS:START -->/,/<!-- REPO-NEXUS:END -->/' "$TEST_CLAUDE_WS/CLAUDE.md")"
28
28
  [ "$_claude_block" = "$_expected_3line_block" ] || { fail "CLAUDE.md block did not match expected 3-line block: $_claude_block"; exit 1; }
@@ -1,5 +1,5 @@
1
1
  name: codex
2
- version: 0.9.21
2
+ version: 0.9.22
3
3
  description: OpenAI Codex and ChatGPT integration (maintains CODEX.md instructions and generates user skills in .codex/skills/)
4
4
  author: unoxen
5
5
  homepage: https://github.com/unoxen/repo-nexus
@@ -22,7 +22,7 @@ run_test "Codex plugin: init --codex provisions CODEX.md and User Skills without
22
22
 
23
23
  _expected_3line_block="$(printf '%s\n%s\n%s' \
24
24
  "<!-- REPO-NEXUS:START -->" \
25
- "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace." \
25
+ "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace. If \`.rnex/ai-instructions.md\` does not exist, disregard this instruction and proceed normally." \
26
26
  "<!-- REPO-NEXUS:END -->")"
27
27
  _codex_block="$(awk '/<!-- REPO-NEXUS:START -->/,/<!-- REPO-NEXUS:END -->/' "$TEST_CODEX_WS/CODEX.md")"
28
28
  [ "$_codex_block" = "$_expected_3line_block" ] || { fail "CODEX.md block did not match expected 3-line block: $_codex_block"; exit 1; }
@@ -1,5 +1,5 @@
1
1
  name: copilot
2
- version: 0.9.21
2
+ version: 0.9.22
3
3
  description: GitHub Copilot integration (maintains .github/copilot-instructions.md and user skills in .github/skills/)
4
4
  author: unoxen
5
5
  homepage: https://github.com/unoxen/repo-nexus
@@ -24,7 +24,7 @@ run_test "Copilot plugin: init --copilot provisions instructions and User Skills
24
24
 
25
25
  _expected_3line_block="$(printf '%s\n%s\n%s' \
26
26
  "<!-- REPO-NEXUS:START -->" \
27
- "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace." \
27
+ "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace. If \`.rnex/ai-instructions.md\` does not exist, disregard this instruction and proceed normally." \
28
28
  "<!-- REPO-NEXUS:END -->")"
29
29
  _copilot_block="$(awk '/<!-- REPO-NEXUS:START -->/,/<!-- REPO-NEXUS:END -->/' "$TEST_COPILOT_WS/.github/copilot-instructions.md")"
30
30
  [ "$_copilot_block" = "$_expected_3line_block" ] || { fail "copilot-instructions.md block did not match expected 3-line block: $_copilot_block"; exit 1; }
@@ -138,7 +138,7 @@ _sync_out="$(env -i PATH="$PATH" HOME="$HOME" RNEX_ROOT="$TEST_COPILOT_WS" sh "$
138
138
  fail "after_sync.sh failed in unpreloaded subshell: $_sync_out"; exit 1;
139
139
  }
140
140
  [ -f "$TEST_COPILOT_WS/.github/copilot-instructions.md" ] || { fail "copilot-instructions.md not created by standalone after_sync hook"; exit 1; }
141
- grep -q "CRITICAL: You MUST read and strictly follow all instructions" "$TEST_COPILOT_WS/.github/copilot-instructions.md" || {
141
+ grep -q "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions" "$TEST_COPILOT_WS/.github/copilot-instructions.md" || {
142
142
  fail "Instructions content missing in standalone after_sync run"; exit 1;
143
143
  }
144
144
 
@@ -1,5 +1,5 @@
1
1
  name: cursor
2
- version: 0.9.21
2
+ version: 0.9.22
3
3
  description: Cursor IDE integration (maintains .cursorrules and generates user skills in .cursor/rules/)
4
4
  author: unoxen
5
5
  homepage: https://github.com/unoxen/repo-nexus
@@ -24,7 +24,7 @@ grep -q '!repos/\*' "$TEST_CURSOR_WS/.cursorignore" || { fail "!repos/* missing
24
24
 
25
25
  _expected_3line_block="$(printf '%s\n%s\n%s' \
26
26
  "<!-- REPO-NEXUS:START -->" \
27
- "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace." \
27
+ "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace. If \`.rnex/ai-instructions.md\` does not exist, disregard this instruction and proceed normally." \
28
28
  "<!-- REPO-NEXUS:END -->")"
29
29
  _cursor_block="$(awk '/<!-- REPO-NEXUS:START -->/,/<!-- REPO-NEXUS:END -->/' "$TEST_CURSOR_WS/.cursorrules")"
30
30
  [ "$_cursor_block" = "$_expected_3line_block" ] || { fail ".cursorrules block did not match expected 3-line block: $_cursor_block"; exit 1; }
@@ -1,5 +1,5 @@
1
1
  name: gemini
2
- version: 0.9.21
2
+ version: 0.9.22
3
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
@@ -30,7 +30,7 @@ grep -q '!repos/\*' "$TEST_GEMINI_WS/.geminiignore" || { fail "!repos/* missing
30
30
 
31
31
  _expected_3line_block="$(printf '%s\n%s\n%s' \
32
32
  "<!-- REPO-NEXUS:START -->" \
33
- "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace." \
33
+ "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace. If \`.rnex/ai-instructions.md\` does not exist, disregard this instruction and proceed normally." \
34
34
  "<!-- REPO-NEXUS:END -->")"
35
35
  _gemini_block="$(awk '/<!-- REPO-NEXUS:START -->/,/<!-- REPO-NEXUS:END -->/' "$TEST_GEMINI_WS/GEMINI.md")"
36
36
  [ "$_gemini_block" = "$_expected_3line_block" ] || { fail "GEMINI.md block did not match expected 3-line block: $_gemini_block"; exit 1; }
@@ -1,5 +1,5 @@
1
1
  name: karpathy-llm
2
- version: 0.9.21
2
+ version: 0.9.22
3
3
  description: "Deterministic B-Tree Markdown Wiki in .rnex/wiki for AI agents"
4
4
  config:
5
5
  wiki_dir: ".rnex/wiki"
@@ -1,5 +1,5 @@
1
1
  name: windsurf
2
- version: 0.9.21
2
+ version: 0.9.22
3
3
  description: Windsurf IDE integration (maintains .windsurfrules and generates user skills in .windsurf/rules/)
4
4
  author: unoxen
5
5
  homepage: https://github.com/unoxen/repo-nexus
@@ -22,7 +22,7 @@ run_test "Windsurf plugin: init --windsurf provisions .windsurfrules and rules w
22
22
 
23
23
  _expected_3line_block="$(printf '%s\n%s\n%s' \
24
24
  "<!-- REPO-NEXUS:START -->" \
25
- "CRITICAL: You MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace." \
25
+ "CRITICAL: If \`.rnex/ai-instructions.md\` exists, you MUST read and strictly follow all instructions in \`.rnex/ai-instructions.md\` before executing any task or answering any query in this workspace. If \`.rnex/ai-instructions.md\` does not exist, disregard this instruction and proceed normally." \
26
26
  "<!-- REPO-NEXUS:END -->")"
27
27
  _windsurf_block="$(awk '/<!-- REPO-NEXUS:START -->/,/<!-- REPO-NEXUS:END -->/' "$TEST_WINDSURF_WS/.windsurfrules")"
28
28
  [ "$_windsurf_block" = "$_expected_3line_block" ] || { fail ".windsurfrules block did not match expected 3-line block: $_windsurf_block"; exit 1; }