repo-nexus 0.10.1 → 0.10.2
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/package.json +1 -1
- package/plugins/claude/plugin.yaml +1 -1
- package/plugins/codex/plugin.yaml +1 -1
- package/plugins/copilot/plugin.yaml +1 -1
- package/plugins/cursor/plugin.yaml +1 -1
- package/plugins/gemini/plugin.yaml +1 -1
- package/plugins/llm-wiki/README.md +9 -3
- package/plugins/llm-wiki/bin/ingest.sh +40 -27
- package/plugins/llm-wiki/bin/lint.sh +23 -18
- package/plugins/llm-wiki/lib/btree_helpers.sh +476 -51
- package/plugins/llm-wiki/lib/lint_helpers.sh +152 -70
- package/plugins/llm-wiki/lib/source_helpers.sh +77 -34
- package/plugins/llm-wiki/plugin.yaml +3 -3
- package/plugins/llm-wiki/skills/ingest.md +9 -4
- package/plugins/llm-wiki/skills/lint.md +11 -1
- package/plugins/llm-wiki/tests/test_plugin.sh +207 -16
- package/plugins/windsurf/plugin.yaml +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repo-nexus",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
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",
|
|
@@ -117,12 +117,18 @@ The `llm-wiki` plugin exposes a streamlined 2-command CLI:
|
|
|
117
117
|
# Ingest missing sources from configured plugins.llm-wiki.sources
|
|
118
118
|
rnex plugin llm-wiki ingest
|
|
119
119
|
|
|
120
|
-
# Ingest a specific markdown source file directly in place
|
|
120
|
+
# Ingest a specific markdown source file or directory directly in place
|
|
121
121
|
rnex plugin llm-wiki ingest <source_path>
|
|
122
|
-
rnex plugin llm-wiki ingest --file <source_path>
|
|
123
122
|
|
|
124
|
-
#
|
|
123
|
+
# Force re-index existing entries for a modified file, directory, or all configured sources
|
|
124
|
+
rnex plugin llm-wiki ingest --force [<source_path>]
|
|
125
|
+
rnex plugin llm-wiki ingest -f [<source_path>]
|
|
126
|
+
|
|
127
|
+
# Validate and auto-heal existing wiki docs, headers, link integrity, and B-Tree shards
|
|
125
128
|
rnex plugin llm-wiki lint
|
|
129
|
+
|
|
130
|
+
# Fast link-and-structure-only validation without reading source document content
|
|
131
|
+
rnex plugin llm-wiki lint --shallow
|
|
126
132
|
```
|
|
127
133
|
|
|
128
134
|
### Automated Synchronization Hooks (Strictly Opt-In)
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# File: plugins/llm-wiki/bin/ingest.sh
|
|
5
5
|
# Architectural Layer: Plugin CLI Entrypoint (ingest)
|
|
6
|
-
# Single Responsibility: Ingest
|
|
7
|
-
#
|
|
6
|
+
# Single Responsibility: Ingest Markdown documentation sources into the
|
|
7
|
+
# encapsulated .rnex/wiki/ B-Tree store.
|
|
8
8
|
#
|
|
9
9
|
# Constraints & Principles:
|
|
10
|
-
# - Single Responsibility Principle (SRP): Confined strictly to
|
|
10
|
+
# - Single Responsibility Principle (SRP): Confined strictly to source
|
|
11
11
|
# ingestion. Performs zero linting or graph operations.
|
|
12
|
-
# -
|
|
13
|
-
#
|
|
14
|
-
#
|
|
12
|
+
# - Strategy Pattern: By default ingests ONLY missing sources (preserving
|
|
13
|
+
# existing entries). With `--force` (`-f`), re-indexes existing entries
|
|
14
|
+
# matched by the positional path or configured sources.
|
|
15
15
|
# - POSIX Compliance: Standard /bin/sh syntax without bashisms.
|
|
16
16
|
# =============================================================================
|
|
17
17
|
set -e
|
|
@@ -39,8 +39,10 @@ esac
|
|
|
39
39
|
# main_ingest
|
|
40
40
|
# Summary: Entrypoint for the `rnex plugin llm-wiki ingest` CLI command.
|
|
41
41
|
# Parses CLI arguments, loads the wiki configuration contract,
|
|
42
|
-
# resolves missing
|
|
43
|
-
#
|
|
42
|
+
# resolves missing (or forced candidate) source files from a
|
|
43
|
+
# positional file/directory/glob path or configured sources, and
|
|
44
|
+
# ingests them into B-Tree shards.
|
|
45
|
+
# @param $@: CLI arguments ([<source_path>], --force/-f, --rewrite-links,
|
|
44
46
|
# --strip-links, --quiet/-q, --help/-h).
|
|
45
47
|
# @returns: 0 on successful ingestion; 1 on configuration or source error.
|
|
46
48
|
# @sideEffects: Mutates configured wikiDir shards, indexFile, and logFile.
|
|
@@ -50,17 +52,13 @@ main_ingest() {
|
|
|
50
52
|
load_wiki_config_contract "$_ws_root" || exit 1
|
|
51
53
|
|
|
52
54
|
_source_arg=""
|
|
55
|
+
_force=0
|
|
53
56
|
_quiet=0
|
|
54
57
|
|
|
55
58
|
while [ $# -gt 0 ]; do
|
|
56
59
|
case "$1" in
|
|
57
|
-
--
|
|
58
|
-
|
|
59
|
-
_source_arg="${1:-}"
|
|
60
|
-
if [ -z "$_source_arg" ]; then
|
|
61
|
-
printf 'Error [ingest]: Missing path argument after flag.\n' >&2
|
|
62
|
-
exit 1
|
|
63
|
-
fi
|
|
60
|
+
--force|-f)
|
|
61
|
+
_force=1
|
|
64
62
|
shift
|
|
65
63
|
;;
|
|
66
64
|
--quiet|-q)
|
|
@@ -78,14 +76,18 @@ main_ingest() {
|
|
|
78
76
|
shift
|
|
79
77
|
;;
|
|
80
78
|
--help|-h)
|
|
81
|
-
printf 'Usage: rnex plugin llm-wiki ingest [<source_path>] [--
|
|
79
|
+
printf 'Usage: rnex plugin llm-wiki ingest [<source_path>] [--force|-f] [--rewrite-links] [--strip-links] [--quiet|-q]\n'
|
|
82
80
|
exit 0
|
|
83
81
|
;;
|
|
84
82
|
-*)
|
|
85
|
-
printf 'Error [ingest]: Unknown option "%s". Usage: rnex plugin llm-wiki ingest [<source_path>]\n' "$1" >&2
|
|
83
|
+
printf 'Error [ingest]: Unknown option "%s". Usage: rnex plugin llm-wiki ingest [<source_path>] [--force|-f] [--rewrite-links] [--strip-links] [--quiet|-q]\n' "$1" >&2
|
|
86
84
|
exit 1
|
|
87
85
|
;;
|
|
88
86
|
*)
|
|
87
|
+
if [ -n "$_source_arg" ]; then
|
|
88
|
+
printf 'Error [ingest]: Unexpected extra argument "%s". Pass at most one <source_path>.\n' "$1" >&2
|
|
89
|
+
exit 1
|
|
90
|
+
fi
|
|
89
91
|
_source_arg="$1"
|
|
90
92
|
shift
|
|
91
93
|
;;
|
|
@@ -93,19 +95,30 @@ main_ingest() {
|
|
|
93
95
|
done
|
|
94
96
|
|
|
95
97
|
mkdir -p "$RNEX_WIKI_ROOT"
|
|
96
|
-
|
|
97
|
-
if
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
_manifest="${RNEX_WIKI_ROOT}/.ingest_sources.$$"
|
|
99
|
+
if [ "$_force" -eq 1 ]; then
|
|
100
|
+
if ! resolve_candidate_sources "$_source_arg" "$_manifest"; then
|
|
101
|
+
rm -f "$_manifest"
|
|
102
|
+
exit 1
|
|
103
|
+
fi
|
|
104
|
+
if [ "$_quiet" -eq 1 ]; then
|
|
105
|
+
force_reingest_sources_into_btree "$_manifest" "$_source_arg" >/dev/null
|
|
106
|
+
else
|
|
107
|
+
force_reingest_sources_into_btree "$_manifest" "$_source_arg"
|
|
108
|
+
fi
|
|
104
109
|
else
|
|
105
|
-
|
|
110
|
+
if ! resolve_missing_sources_to_ingest "$_source_arg" "$_manifest"; then
|
|
111
|
+
rm -f "$_manifest"
|
|
112
|
+
exit 1
|
|
113
|
+
fi
|
|
114
|
+
if [ "$_quiet" -eq 1 ]; then
|
|
115
|
+
ingest_missing_sources_into_btree "$_manifest" "$_source_arg" >/dev/null
|
|
116
|
+
else
|
|
117
|
+
ingest_missing_sources_into_btree "$_manifest" "$_source_arg"
|
|
118
|
+
fi
|
|
106
119
|
fi
|
|
107
120
|
_rc=$?
|
|
108
|
-
rm -f "$
|
|
121
|
+
rm -f "$_manifest"
|
|
109
122
|
exit "$_rc"
|
|
110
123
|
}
|
|
111
124
|
|
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
# =============================================================================
|
|
4
4
|
# File: plugins/llm-wiki/bin/lint.sh
|
|
5
5
|
# Architectural Layer: Plugin CLI Entrypoint (lint)
|
|
6
|
-
# Single Responsibility:
|
|
7
|
-
# .rnex/wiki/. Does NOT inspect rnex config `sources` and
|
|
6
|
+
# Single Responsibility: Validate and auto-heal existing documentation and
|
|
7
|
+
# references inside .rnex/wiki/. Does NOT inspect rnex config `sources` and
|
|
8
|
+
# does NOT ingest missing documents.
|
|
8
9
|
#
|
|
9
10
|
# Design Patterns & Principles:
|
|
10
|
-
# - Single Responsibility Principle (SRP): Confined strictly to
|
|
11
|
-
#
|
|
12
|
-
# -
|
|
11
|
+
# - Single Responsibility Principle (SRP): Confined strictly to existing
|
|
12
|
+
# wiki verification and auto-healing. Zero missing-source ingestion.
|
|
13
|
+
# - Strategy Pattern: Deep content validation by default (refreshes stale
|
|
14
|
+
# entry titles and summaries from authoritative sources); `--shallow`
|
|
15
|
+
# validates and heals links and B-Tree structure only without reading
|
|
16
|
+
# document content.
|
|
17
|
+
# - Fail-Fast Principle: Exits with non-zero status on unresolvable errors.
|
|
13
18
|
#
|
|
14
19
|
# Standards: Pure POSIX Shell (/bin/sh), zero external runtime dependencies.
|
|
15
20
|
# =============================================================================
|
|
@@ -40,22 +45,22 @@ esac
|
|
|
40
45
|
# -----------------------------------------------------------------------------
|
|
41
46
|
# main_lint
|
|
42
47
|
# Summary: Entrypoint for the `rnex plugin llm-wiki lint` CLI command.
|
|
43
|
-
# Parses CLI arguments, loads configuration, and delegates to
|
|
44
|
-
#
|
|
45
|
-
# @param $@: CLI arguments (--
|
|
46
|
-
# @returns: 0 on successful validation; 1 on any
|
|
48
|
+
# Parses CLI arguments, loads configuration, and delegates to
|
|
49
|
+
# lint_existing_wiki_directory.
|
|
50
|
+
# @param $@: CLI arguments (--shallow, --quiet/-q, --help/-h).
|
|
51
|
+
# @returns: 0 on successful validation/healing; 1 on any unresolvable error.
|
|
47
52
|
# -----------------------------------------------------------------------------
|
|
48
53
|
main_lint() {
|
|
49
54
|
_ws_root="${RNEX_WORKSPACE_ROOT:-${RNEX_ROOT:-$(pwd)}}"
|
|
50
55
|
load_wiki_config_contract "$_ws_root" || exit 1
|
|
51
56
|
|
|
57
|
+
_shallow=0
|
|
52
58
|
_quiet=0
|
|
53
|
-
_strict=0
|
|
54
59
|
|
|
55
60
|
while [ $# -gt 0 ]; do
|
|
56
61
|
case "$1" in
|
|
57
|
-
--
|
|
58
|
-
|
|
62
|
+
--shallow)
|
|
63
|
+
_shallow=1
|
|
59
64
|
shift
|
|
60
65
|
;;
|
|
61
66
|
--quiet|-q)
|
|
@@ -63,15 +68,15 @@ main_lint() {
|
|
|
63
68
|
shift
|
|
64
69
|
;;
|
|
65
70
|
--help|-h)
|
|
66
|
-
printf 'Usage: rnex plugin llm-wiki lint [--
|
|
71
|
+
printf 'Usage: rnex plugin llm-wiki lint [--shallow] [--quiet|-q]\n'
|
|
67
72
|
printf '\n'
|
|
68
|
-
printf 'Validates existing wiki documentation, B-Tree
|
|
69
|
-
printf '
|
|
73
|
+
printf 'Validates and auto-heals existing wiki documentation, headers, B-Tree shards, and references.\n'
|
|
74
|
+
printf 'Use --shallow to validate only links and structure without reading source document content.\n'
|
|
70
75
|
exit 0
|
|
71
76
|
;;
|
|
72
77
|
-*)
|
|
73
78
|
printf 'Error [lint]: Unknown option "%s".\n' "$1" >&2
|
|
74
|
-
printf 'Usage: rnex plugin llm-wiki lint [--
|
|
79
|
+
printf 'Usage: rnex plugin llm-wiki lint [--shallow] [--quiet|-q]\n' >&2
|
|
75
80
|
exit 1
|
|
76
81
|
;;
|
|
77
82
|
*)
|
|
@@ -81,9 +86,9 @@ main_lint() {
|
|
|
81
86
|
done
|
|
82
87
|
|
|
83
88
|
if [ "$_quiet" -eq 1 ]; then
|
|
84
|
-
lint_existing_wiki_directory "$
|
|
89
|
+
lint_existing_wiki_directory "$_shallow" "$_quiet" >/dev/null
|
|
85
90
|
else
|
|
86
|
-
lint_existing_wiki_directory "$
|
|
91
|
+
lint_existing_wiki_directory "$_shallow" "$_quiet"
|
|
87
92
|
fi
|
|
88
93
|
}
|
|
89
94
|
|