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 +2 -2
- package/lib/sdk.sh +5 -5
- package/package.json +1 -1
- package/plugins/claude/plugin.yaml +1 -1
- package/plugins/claude/tests/test_plugin.sh +1 -1
- package/plugins/codex/plugin.yaml +1 -1
- package/plugins/codex/tests/test_plugin.sh +1 -1
- package/plugins/copilot/plugin.yaml +1 -1
- package/plugins/copilot/tests/test_plugin.sh +2 -2
- package/plugins/cursor/plugin.yaml +1 -1
- package/plugins/cursor/tests/test_plugin.sh +1 -1
- package/plugins/gemini/plugin.yaml +1 -1
- package/plugins/gemini/tests/test_plugin.sh +1 -1
- package/plugins/karpathy-llm/plugin.yaml +1 -1
- package/plugins/windsurf/plugin.yaml +1 -1
- package/plugins/windsurf/tests/test_plugin.sh +1 -1
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
313
|
-
_non_rnex="$(grep -v "CRITICAL:
|
|
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:
|
|
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.
|
|
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",
|
|
@@ -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:
|
|
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; }
|
|
@@ -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:
|
|
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; }
|
|
@@ -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:
|
|
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:
|
|
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
|
|
|
@@ -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:
|
|
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; }
|
|
@@ -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:
|
|
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; }
|
|
@@ -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:
|
|
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; }
|