wikifier 4.6.5__tar.gz → 4.6.8__tar.gz
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.
- {wikifier-4.6.5/wikifier.egg-info → wikifier-4.6.8}/PKG-INFO +32 -17
- {wikifier-4.6.5 → wikifier-4.6.8}/README.md +31 -16
- {wikifier-4.6.5 → wikifier-4.6.8}/skills/run.md +65 -5
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_import_cache.py +7 -1
- wikifier-4.6.8/tests/test_index_map_paths.py +459 -0
- wikifier-4.6.8/tests/test_init_seed.py +114 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/__init__.py +1 -1
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/cache_store.py +66 -21
- wikifier-4.6.8/wikifier/candidates.py +702 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/cli.py +56 -17
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/scripts/wikifier.sh +47 -6
- {wikifier-4.6.5 → wikifier-4.6.8/wikifier.egg-info}/PKG-INFO +32 -17
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier.egg-info/SOURCES.txt +2 -0
- wikifier-4.6.5/wikifier/candidates.py +0 -409
- {wikifier-4.6.5 → wikifier-4.6.8}/CONTRIBUTING.md +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/LICENSE +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/MANIFEST.in +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/diagnostics.html +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/docs/spec.md +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/index.html +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/pyproject.toml +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/setup.cfg +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_agent_loop.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_agent_scale.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_barrel_invalidation.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_cache_store.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_gap_closure.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_health.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_multi_lang_parsers.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_parsers.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_selftest_wrappers.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/tests/test_walk_coverage_resolvers.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/__main__.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/agent_loop.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/contracts.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/daemon.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/diagnostics.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/health.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/import_cache.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/index.html +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/library.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/locking.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/mcp/__init__.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/mcp/server.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/__init__.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/_edge.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/bree.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/c_cpp.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/cdia.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/csharp.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/go_lang.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/java.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/javascript.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/python.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/parsers/rust.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/project_root.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/resolution.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/scripts/wikifier.bat +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/scripts/wikifier.ps1 +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier/serve.py +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier.egg-info/dependency_links.txt +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier.egg-info/entry_points.txt +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier.egg-info/requires.txt +0 -0
- {wikifier-4.6.5 → wikifier-4.6.8}/wikifier.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wikifier
|
|
3
|
-
Version: 4.6.
|
|
3
|
+
Version: 4.6.8
|
|
4
4
|
Summary: Zero-dependency agent-to-agent codebase wiki for LLMs and AI agents. Autonomously maintained via record-change and mark-green for token-efficient lookup of files, dependencies, health, and summaries — across tiny scripts to 50k+ monorepos. Optional MCP server with rich tools for agents.
|
|
5
5
|
Author-email: Aron Amos <aron@example.com>
|
|
6
6
|
Maintainer: Aron Amos
|
|
@@ -52,7 +52,14 @@ Works from small scripts to large monorepos. **Deep import/include maps** (zero-
|
|
|
52
52
|
| C# | `.cs` | `using` namespaces |
|
|
53
53
|
| Java | `.java` | `import` / `import static` |
|
|
54
54
|
|
|
55
|
-
Health/journal still work for any monitored path. Parsers are **pragmatic regex** (not full cargo/`go.mod`/classpath/`-I` resolution).
|
|
55
|
+
Health/journal still work for any monitored path. Parsers are **pragmatic regex** (not full cargo/`go.mod`/classpath/`-I` resolution). On huge monorepos, split scope deliberately:
|
|
56
|
+
|
|
57
|
+
| File | Surface |
|
|
58
|
+
|------|---------|
|
|
59
|
+
| **`map_paths.txt`** | Package roots for **import maps** (`update-maps` walk). Prefer package dirs (`src/`, `packages/foo/`) — not a wiki-only file list. |
|
|
60
|
+
| **`monitored_paths.txt`** | **Wiki / health** watch list (can be individual `.md` files). Does **not** define the map. |
|
|
61
|
+
|
|
62
|
+
Or pass `--directory=pkg/` / `--max-files=N` per run. Raise dirty cap with `WIKIFIER_CHECK_CHANGES_MAX` (default 2000) only when needed. Never set `project_root` to a multi-repo parent of clones.
|
|
56
63
|
|
|
57
64
|
## Why
|
|
58
65
|
|
|
@@ -74,7 +81,8 @@ pip install wikifier # pure Python stdlib core — no runtime deps
|
|
|
74
81
|
pip install wikifier[mcp] # optional Model Context Protocol (MCP) server
|
|
75
82
|
|
|
76
83
|
cd /path/to/your/project
|
|
77
|
-
wikifier init # seeds +
|
|
84
|
+
wikifier init # seeds index.html + lean path-list templates
|
|
85
|
+
# Edit monitored_paths.txt + map_paths.txt to package roots (not bare ".") on real trees
|
|
78
86
|
wikifier update-maps # full structural map → library.md + import cache
|
|
79
87
|
wikifier health --summary # matrix counts
|
|
80
88
|
wikifier suggest-next # or MCP suggest_next_actions — 🔴/🟡 only
|
|
@@ -82,6 +90,8 @@ wikifier suggest-next # or MCP suggest_next_actions — 🔴/🟡 only
|
|
|
82
90
|
|
|
83
91
|
Always set an explicit root for external trees: `WIKIFIER_PROJECT_ROOT=/abs/path wikifier …`
|
|
84
92
|
|
|
93
|
+
**MCP `session_bootstrap` → `readiness: blocked`?** That means lean scope and/or the map are missing (often bare `.` monitor + never ran `update-maps`) — not a broken install. Fix: write lean `monitored_paths.txt` / `map_paths.txt`, then `update-maps`. Agent contract: **`skills/run.md`** § *Readiness blocked*; dogfood: `Findings/readiness-blocked-bare-monitor-2026-07.md`.
|
|
94
|
+
|
|
85
95
|
## Steady state (only touch what needs it)
|
|
86
96
|
|
|
87
97
|
Full protocol: [`skills/run.md`](skills/run.md) (Agent Protocol v0.6 — package **4.6.x**).
|
|
@@ -109,10 +119,11 @@ Advanced intel as needed: `get_dependencies`, `get_dependents`, `get_cycles`, ba
|
|
|
109
119
|
|
|
110
120
|
- **Import analysis** — Python, JS/TS (ESM/CJS, barrels), Rust (`use`/`mod` + best-effort `crate::` paths), Go, C/C++ includes, C# usings; per-edge confidence; barrel expansion for TS/JS
|
|
111
121
|
- **Incremental pipeline** — pure-Python `update-maps`: dirty parse → import cache → reverse deps → cycles → `library.md`
|
|
112
|
-
- **Warm agent maps (4.6.3–4.6.
|
|
113
|
-
- **
|
|
114
|
-
- **
|
|
115
|
-
- **
|
|
122
|
+
- **Warm agent maps (4.6.3–4.6.7)** — zero-dirty + **index-first** candidates (re-list only when fingerprint / map-scoped index / live count disagree); **MapScope** keeps collect, live count, index filter, and prune aligned; **stdlib SQLite**; content-hash dirty
|
|
123
|
+
- **Two path lists** — `map_paths.txt` = map package roots; `monitored_paths.txt` = wiki/health watch (**independent** — wiki file lists never collapse the map)
|
|
124
|
+
- **Partial-map honesty** — `map_coverage` on `update_maps` / bootstrap / **`suggest_next`**; `update_maps_until_complete` when incomplete
|
|
125
|
+
- **Cache ops** — `wikifier cache-status`; JSON dual-write **deprecated default-off** (`WIKIFIER_CACHE_JSON=1` opt-in); dual-read for migrate
|
|
126
|
+
- **Selective agent work** — health + suggest bias to 🔴/actionable 🟡 only; **ACS v1.3** `reason_code` / `agent_signal`; prefer `actionable_low_conf_edges` + reason codes — **never** raw `low_conf_edges` averages alone
|
|
116
127
|
- **Scale** — reverse index + barrel invalidation so one edit doesn’t re-scan the monorepo
|
|
117
128
|
- **MCP tools** — optional server for Claude, Cursor, Cline, and other MCP clients
|
|
118
129
|
- **Zero core dependencies** — stdlib only; forks can add their own stack on top
|
|
@@ -126,18 +137,21 @@ Full / heavy runs (historical order-of-magnitude):
|
|
|
126
137
|
|---------|-------|----------------------------|
|
|
127
138
|
| llama_index | ~3.8k Python files | ~8.5s class full |
|
|
128
139
|
| Babylon.js | ~3.9k TS files, barrel-heavy | minutes full; scoped re-runs tens of seconds |
|
|
129
|
-
| Large trees (e.g. LLVM-scale) | tens of thousands of files |
|
|
140
|
+
| Large trees (e.g. LLVM-scale) | tens of thousands of files | `map_paths` / `--directory` / `--max-files` — never unscoped one-shot |
|
|
141
|
+
|
|
142
|
+
Warm **0-dirty** re-runs after **4.6.7** (same machine class; scoped; candidates **reused** — agent session path):
|
|
130
143
|
|
|
131
|
-
|
|
144
|
+
| Project | Scope | Warm `update-maps` | n |
|
|
145
|
+
|---------|-------|--------------------|---|
|
|
146
|
+
| Wikifier (self) | `map_paths`: `wikifier/` + `tests/` | **~30 ms** | 50 |
|
|
147
|
+
| llama_index | `llama-index-core` | **~76 ms** | 724 |
|
|
148
|
+
| rust | `library/std` | **~79 ms** | 719 |
|
|
149
|
+
| airflow | `airflow-core` | **~180 ms** | 1920 |
|
|
150
|
+
| Babylon.js | `packages` | **~400 ms** | 3895 |
|
|
132
151
|
|
|
133
|
-
|
|
134
|
-
|---------|-------|---------------------|
|
|
135
|
-
| Wikifier (self) | incremental full | ~43 ms |
|
|
136
|
-
| redox | `src` | ~17 ms |
|
|
137
|
-
| llama_index | `llama-index-core` | ~0.6 s |
|
|
138
|
-
| rust | `library/std/src` (budgeted) | ~0.7 s (vs multi-second full-tree walk before scoped collect) |
|
|
152
|
+
Residual floor on large scopes is mtime/stat + live count under MapScope (not full JSON re-walk). Sub-100ms is not a hard SLA on every 1k+ tree.
|
|
139
153
|
|
|
140
|
-
Tests: `python -m unittest discover tests` (stdlib only;
|
|
154
|
+
Tests: `python -m unittest discover tests` (stdlib only; **125** cases including MapScope / index-first / dual-write).
|
|
141
155
|
|
|
142
156
|
## Commands
|
|
143
157
|
|
|
@@ -151,7 +165,8 @@ Tests: `python -m unittest discover tests` (stdlib only; 86+ cases including age
|
|
|
151
165
|
| `wikifier mark-green <file>` | Mark wiki current + source content-hash baseline |
|
|
152
166
|
| `wikifier record-deletion <file> "reason"` | Mark removed paths 🔴 + prune barrel refs |
|
|
153
167
|
| `wikifier suggest-next` | Next actions (🔴/actionable 🟡 only; `--json` for `actions[]`) |
|
|
154
|
-
| `wikifier update-maps [--directory=src/] [--max-files=N]` | Rebuild graph + `library.md` (warm 0-dirty is fast) |
|
|
168
|
+
| `wikifier update-maps [--directory=src/] [--max-files=N]` | Rebuild graph + `library.md` (warm 0-dirty is fast; honors `map_paths.txt`) |
|
|
169
|
+
| `wikifier cache-status` | SQLite/JSON backend, dual-write policy, coverage snapshot (no full pair load) |
|
|
155
170
|
| `wikifier health [--summary\|--json]` | Health matrix (machine-friendly flags) |
|
|
156
171
|
| `wikifier validate` | Missing wiki rows + ghost paths |
|
|
157
172
|
| `wikifier cycles` | Circular deps + break hints |
|
|
@@ -20,7 +20,14 @@ Works from small scripts to large monorepos. **Deep import/include maps** (zero-
|
|
|
20
20
|
| C# | `.cs` | `using` namespaces |
|
|
21
21
|
| Java | `.java` | `import` / `import static` |
|
|
22
22
|
|
|
23
|
-
Health/journal still work for any monitored path. Parsers are **pragmatic regex** (not full cargo/`go.mod`/classpath/`-I` resolution).
|
|
23
|
+
Health/journal still work for any monitored path. Parsers are **pragmatic regex** (not full cargo/`go.mod`/classpath/`-I` resolution). On huge monorepos, split scope deliberately:
|
|
24
|
+
|
|
25
|
+
| File | Surface |
|
|
26
|
+
|------|---------|
|
|
27
|
+
| **`map_paths.txt`** | Package roots for **import maps** (`update-maps` walk). Prefer package dirs (`src/`, `packages/foo/`) — not a wiki-only file list. |
|
|
28
|
+
| **`monitored_paths.txt`** | **Wiki / health** watch list (can be individual `.md` files). Does **not** define the map. |
|
|
29
|
+
|
|
30
|
+
Or pass `--directory=pkg/` / `--max-files=N` per run. Raise dirty cap with `WIKIFIER_CHECK_CHANGES_MAX` (default 2000) only when needed. Never set `project_root` to a multi-repo parent of clones.
|
|
24
31
|
|
|
25
32
|
## Why
|
|
26
33
|
|
|
@@ -42,7 +49,8 @@ pip install wikifier # pure Python stdlib core — no runtime deps
|
|
|
42
49
|
pip install wikifier[mcp] # optional Model Context Protocol (MCP) server
|
|
43
50
|
|
|
44
51
|
cd /path/to/your/project
|
|
45
|
-
wikifier init # seeds +
|
|
52
|
+
wikifier init # seeds index.html + lean path-list templates
|
|
53
|
+
# Edit monitored_paths.txt + map_paths.txt to package roots (not bare ".") on real trees
|
|
46
54
|
wikifier update-maps # full structural map → library.md + import cache
|
|
47
55
|
wikifier health --summary # matrix counts
|
|
48
56
|
wikifier suggest-next # or MCP suggest_next_actions — 🔴/🟡 only
|
|
@@ -50,6 +58,8 @@ wikifier suggest-next # or MCP suggest_next_actions — 🔴/🟡 only
|
|
|
50
58
|
|
|
51
59
|
Always set an explicit root for external trees: `WIKIFIER_PROJECT_ROOT=/abs/path wikifier …`
|
|
52
60
|
|
|
61
|
+
**MCP `session_bootstrap` → `readiness: blocked`?** That means lean scope and/or the map are missing (often bare `.` monitor + never ran `update-maps`) — not a broken install. Fix: write lean `monitored_paths.txt` / `map_paths.txt`, then `update-maps`. Agent contract: **`skills/run.md`** § *Readiness blocked*; dogfood: `Findings/readiness-blocked-bare-monitor-2026-07.md`.
|
|
62
|
+
|
|
53
63
|
## Steady state (only touch what needs it)
|
|
54
64
|
|
|
55
65
|
Full protocol: [`skills/run.md`](skills/run.md) (Agent Protocol v0.6 — package **4.6.x**).
|
|
@@ -77,10 +87,11 @@ Advanced intel as needed: `get_dependencies`, `get_dependents`, `get_cycles`, ba
|
|
|
77
87
|
|
|
78
88
|
- **Import analysis** — Python, JS/TS (ESM/CJS, barrels), Rust (`use`/`mod` + best-effort `crate::` paths), Go, C/C++ includes, C# usings; per-edge confidence; barrel expansion for TS/JS
|
|
79
89
|
- **Incremental pipeline** — pure-Python `update-maps`: dirty parse → import cache → reverse deps → cycles → `library.md`
|
|
80
|
-
- **Warm agent maps (4.6.3–4.6.
|
|
81
|
-
- **
|
|
82
|
-
- **
|
|
83
|
-
- **
|
|
90
|
+
- **Warm agent maps (4.6.3–4.6.7)** — zero-dirty + **index-first** candidates (re-list only when fingerprint / map-scoped index / live count disagree); **MapScope** keeps collect, live count, index filter, and prune aligned; **stdlib SQLite**; content-hash dirty
|
|
91
|
+
- **Two path lists** — `map_paths.txt` = map package roots; `monitored_paths.txt` = wiki/health watch (**independent** — wiki file lists never collapse the map)
|
|
92
|
+
- **Partial-map honesty** — `map_coverage` on `update_maps` / bootstrap / **`suggest_next`**; `update_maps_until_complete` when incomplete
|
|
93
|
+
- **Cache ops** — `wikifier cache-status`; JSON dual-write **deprecated default-off** (`WIKIFIER_CACHE_JSON=1` opt-in); dual-read for migrate
|
|
94
|
+
- **Selective agent work** — health + suggest bias to 🔴/actionable 🟡 only; **ACS v1.3** `reason_code` / `agent_signal`; prefer `actionable_low_conf_edges` + reason codes — **never** raw `low_conf_edges` averages alone
|
|
84
95
|
- **Scale** — reverse index + barrel invalidation so one edit doesn’t re-scan the monorepo
|
|
85
96
|
- **MCP tools** — optional server for Claude, Cursor, Cline, and other MCP clients
|
|
86
97
|
- **Zero core dependencies** — stdlib only; forks can add their own stack on top
|
|
@@ -94,18 +105,21 @@ Full / heavy runs (historical order-of-magnitude):
|
|
|
94
105
|
|---------|-------|----------------------------|
|
|
95
106
|
| llama_index | ~3.8k Python files | ~8.5s class full |
|
|
96
107
|
| Babylon.js | ~3.9k TS files, barrel-heavy | minutes full; scoped re-runs tens of seconds |
|
|
97
|
-
| Large trees (e.g. LLVM-scale) | tens of thousands of files |
|
|
108
|
+
| Large trees (e.g. LLVM-scale) | tens of thousands of files | `map_paths` / `--directory` / `--max-files` — never unscoped one-shot |
|
|
109
|
+
|
|
110
|
+
Warm **0-dirty** re-runs after **4.6.7** (same machine class; scoped; candidates **reused** — agent session path):
|
|
98
111
|
|
|
99
|
-
|
|
112
|
+
| Project | Scope | Warm `update-maps` | n |
|
|
113
|
+
|---------|-------|--------------------|---|
|
|
114
|
+
| Wikifier (self) | `map_paths`: `wikifier/` + `tests/` | **~30 ms** | 50 |
|
|
115
|
+
| llama_index | `llama-index-core` | **~76 ms** | 724 |
|
|
116
|
+
| rust | `library/std` | **~79 ms** | 719 |
|
|
117
|
+
| airflow | `airflow-core` | **~180 ms** | 1920 |
|
|
118
|
+
| Babylon.js | `packages` | **~400 ms** | 3895 |
|
|
100
119
|
|
|
101
|
-
|
|
102
|
-
|---------|-------|---------------------|
|
|
103
|
-
| Wikifier (self) | incremental full | ~43 ms |
|
|
104
|
-
| redox | `src` | ~17 ms |
|
|
105
|
-
| llama_index | `llama-index-core` | ~0.6 s |
|
|
106
|
-
| rust | `library/std/src` (budgeted) | ~0.7 s (vs multi-second full-tree walk before scoped collect) |
|
|
120
|
+
Residual floor on large scopes is mtime/stat + live count under MapScope (not full JSON re-walk). Sub-100ms is not a hard SLA on every 1k+ tree.
|
|
107
121
|
|
|
108
|
-
Tests: `python -m unittest discover tests` (stdlib only;
|
|
122
|
+
Tests: `python -m unittest discover tests` (stdlib only; **125** cases including MapScope / index-first / dual-write).
|
|
109
123
|
|
|
110
124
|
## Commands
|
|
111
125
|
|
|
@@ -119,7 +133,8 @@ Tests: `python -m unittest discover tests` (stdlib only; 86+ cases including age
|
|
|
119
133
|
| `wikifier mark-green <file>` | Mark wiki current + source content-hash baseline |
|
|
120
134
|
| `wikifier record-deletion <file> "reason"` | Mark removed paths 🔴 + prune barrel refs |
|
|
121
135
|
| `wikifier suggest-next` | Next actions (🔴/actionable 🟡 only; `--json` for `actions[]`) |
|
|
122
|
-
| `wikifier update-maps [--directory=src/] [--max-files=N]` | Rebuild graph + `library.md` (warm 0-dirty is fast) |
|
|
136
|
+
| `wikifier update-maps [--directory=src/] [--max-files=N]` | Rebuild graph + `library.md` (warm 0-dirty is fast; honors `map_paths.txt`) |
|
|
137
|
+
| `wikifier cache-status` | SQLite/JSON backend, dual-write policy, coverage snapshot (no full pair load) |
|
|
123
138
|
| `wikifier health [--summary\|--json]` | Health matrix (machine-friendly flags) |
|
|
124
139
|
| `wikifier validate` | Missing wiki rows + ghost paths |
|
|
125
140
|
| `wikifier cycles` | Circular deps + break hints |
|
|
@@ -9,11 +9,14 @@
|
|
|
9
9
|
|
|
10
10
|
**Package 4.5.x + gap-closure notes (additive; protocol still v0.6):**
|
|
11
11
|
- File Tree + `wikifier serve`; MCP status/attention use library + emoji (not `[GREEN]` tags).
|
|
12
|
-
- **First-run:** `init` → `update-maps` → `health --summary` → `suggest_next_actions`. Map is automatic; wiki *prose* is agent-filled over time.
|
|
12
|
+
- **First-run:** `init` → lean `monitored_paths.txt` + `map_paths.txt` (not bare `.`) → `update-maps` → `health --summary` → `suggest_next_actions`. Map is automatic; wiki *prose* is agent-filled over time.
|
|
13
|
+
- **`session_bootstrap` readiness `blocked`:** not a crash — see **§ Readiness blocked** below. Typical causes: bare `.` monitor and/or no map/health yet. Fix scope → `update-maps` before treating the project as map-ready.
|
|
13
14
|
- **Map-first ≠ wiki-done:** `health_score` **Map Ready** + many 🟡 *Initial stubs* means structural coverage only. Do **not** bulk-wiki stubs. Wiki a file when you edit it, then `mark-green`. Prefer `actionable_yellow` / 🔴 over raw yellow counts.
|
|
14
15
|
- **Steady-state selective work:** only 🔴 and *actionable* 🟡 (never re-wiki 🟢; never re-wiki the whole stub set). **ACS v1.3:** use `actionable_low_conf_edges` + `reason_code_counts` / `agent_signal` (`skip`|`investigate`). Do **not** thrash on raw `low_conf_edges` (includes external/bare scores ~0.48). Prefer `map_coverage.complete` / `files_remaining_dirty` after budgeted `update-maps` — `success: true` ≠ map complete.
|
|
15
|
-
- **Warm maps:**
|
|
16
|
-
- **
|
|
16
|
+
- **Warm maps:** SQLite primary; zero-dirty uses mtime index + meta. **Index-first:** re-list candidates only when fingerprint / map-scoped index / live count disagree (`index_first_dirty` / `candidates_reused` on `update_maps`). Prefer `--directory=` or `map_paths.txt` package roots (not bare `.`). Collect, live count, index filter, and prune share **MapScope** so full-tree→`map_paths` narrow does not thrash.
|
|
17
|
+
- **map_paths vs monitored_paths:** `map_paths.txt` = import-map package roots; `monitored_paths.txt` = wiki/health thrash bound. Independent. Wiki-only monitored lists do **not** define the map.
|
|
18
|
+
- **Cache ops:** `wikifier cache-status`. Dual-write JSON **deprecated default-off** (`WIKIFIER_CACHE_JSON=1` to opt in). Dual-read legacy JSON for migrate remains.
|
|
19
|
+
- **ACS:** prefer `actionable_low_conf_edges` + `reason_code_counts` / `agent_signal`; never thrash on raw `low_conf_edges` alone.
|
|
17
20
|
- **Dual scope:** `monitored_paths` = check-changes/health scope (keep lean). `update-maps --directory=` / `--max-files=` = map walk. Never set `project_root` to a multi-repo parent (e.g. `cloned_sample_projects`).
|
|
18
21
|
- **CLI target:** `wikifier --target /abs/project health --summary` (flags stripped before the command). Or `WIKIFIER_PROJECT_ROOT=…`.
|
|
19
22
|
- **Long-horizon:** `wikifier autonomous-status` (or `readiness`) before unattended runs; daemon writes `.wikifier_staging/daemon_heartbeat.json`. Soak ≥72h is still evidence work, not automatic.
|
|
@@ -43,8 +46,9 @@ Do **not** open megamodules (`javascript.py`, `import_cache.py`, `bree.py`) to d
|
|
|
43
46
|
|
|
44
47
|
| Need | Use |
|
|
45
48
|
|------|-----|
|
|
46
|
-
| First-run map | `init` → `update-maps` → `health --summary` → `suggest-next` |
|
|
47
|
-
| **Session start (4.6+)** | `session_bootstrap` (or CLI `session-bootstrap`) — one shot: root, health, attention, `actions[]` |
|
|
49
|
+
| First-run map | `init` → lean paths (not bare `.`) → `update-maps` → `health --summary` → `suggest-next` |
|
|
50
|
+
| **Session start (4.6+)** | `session_bootstrap` (or CLI `session-bootstrap`) — one shot: root, health, attention, `actions[]`. If `readiness` is `blocked`, fix `actions[]` / `blockers[]` first (usually scope + maps). |
|
|
51
|
+
| **Unblock readiness** | Write lean `monitored_paths.txt` + `map_paths.txt` → `update_maps` (full once) → re-`session_bootstrap` until `ready_for_daemon` / Map Ready |
|
|
48
52
|
| **Core tool list** | `list_core_tools` / bootstrap `core_surface` — prefer Core 6; advanced is non-core |
|
|
49
53
|
| Steady-state | `check-changes` (content-honest) → edit 🔴/actionable 🟡 only → `record-change` → wiki → `mark-green` |
|
|
50
54
|
| **Hash migration** | `seed_source_content_hashes` / CLI `seed-source-hashes` — baseline Greens without mass Yellow |
|
|
@@ -63,6 +67,62 @@ Do **not** open megamodules (`javascript.py`, `import_cache.py`, `bree.py`) to d
|
|
|
63
67
|
**Scope:** `monitored_paths` = change detection; `exclude_patterns` + optional `--directory` = map walk.
|
|
64
68
|
**Human HTML** is secondary observation only.
|
|
65
69
|
|
|
70
|
+
## Readiness blocked (`session_bootstrap` / external projects)
|
|
71
|
+
|
|
72
|
+
When MCP `session_bootstrap` (or CLI `session-bootstrap`) returns:
|
|
73
|
+
|
|
74
|
+
```text
|
|
75
|
+
readiness: "blocked"
|
|
76
|
+
scope.ok: false
|
|
77
|
+
blockers: [ ... ]
|
|
78
|
+
actions: [ { "action": "fix_scope", ... }, ... ]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**this is expected on a project that has never been scoped/mapped**, not a Wikifier install failure.
|
|
82
|
+
|
|
83
|
+
### Why it happens (Grok-Bevy 2026-07 dogfood)
|
|
84
|
+
|
|
85
|
+
On **Grok-Bevy** (Rust workspace), first bootstrap reported:
|
|
86
|
+
|
|
87
|
+
| Blocker | Meaning |
|
|
88
|
+
|---------|---------|
|
|
89
|
+
| `monitored_paths is bare '.'` | Default/missing lean list → `check-changes` would walk the whole tree (`target/`, caches, etc.) and thrash. Action: **`fix_scope`**. |
|
|
90
|
+
| `No import map (run update-maps first)` | No dependency/import map yet → map-first tools have nothing to trust. |
|
|
91
|
+
| `No file_health` | Health matrix not seeded (comes with map/health pipeline). |
|
|
92
|
+
|
|
93
|
+
Also: `bare_dot_monitor: true` and `scope.ok: false` until `monitored_paths.txt` lists **lean package roots**, not bare `.`.
|
|
94
|
+
|
|
95
|
+
### Fix once per project (agents must do this, not ignore blockers)
|
|
96
|
+
|
|
97
|
+
1. **Scope (wiki/health thrash bound)** — create/edit **`monitored_paths.txt`** at project root with *specific* dirs/files, e.g.:
|
|
98
|
+
```text
|
|
99
|
+
crates/foo/src/
|
|
100
|
+
crates/bar/src/
|
|
101
|
+
README.md
|
|
102
|
+
docs/
|
|
103
|
+
```
|
|
104
|
+
Never leave only `.` on non-tiny trees.
|
|
105
|
+
2. **Map roots** — create/edit **`map_paths.txt`** (import-map package roots; independent of monitored):
|
|
106
|
+
```text
|
|
107
|
+
crates/foo/src/
|
|
108
|
+
crates/bar/src/
|
|
109
|
+
```
|
|
110
|
+
3. **Build map + health** — from the target project (or with `project_root=` / `WIKIFIER_PROJECT_ROOT=`):
|
|
111
|
+
```bash
|
|
112
|
+
wikifier update-maps --full # or MCP update_maps full=true
|
|
113
|
+
# re-run session_bootstrap until readiness is ready_for_daemon / Map Ready
|
|
114
|
+
```
|
|
115
|
+
4. **Do not** bulk-re-wiki 🟡 *Initial stubs* after maps land — stubs = map coverage only.
|
|
116
|
+
|
|
117
|
+
After a successful fix, bootstrap looks like: `scope.ok: true`, `blockers: []`, `health_score: Map Ready` (stubs OK), `readiness: ready_for_daemon`.
|
|
118
|
+
|
|
119
|
+
### Product note for Wikifier maintainers
|
|
120
|
+
|
|
121
|
+
- Default bare `.` is convenient for tiny toys and a footgun for real repos; agents must treat **`fix_scope` as P0** when `session_bootstrap` says blocked.
|
|
122
|
+
- **`wikifier init` (4.6.8+)** seeds comment-guided lean templates for `monitored_paths.txt` and `map_paths.txt` (examples for `src/`, `crates/*/src/`, etc.) instead of a silent single-dot file. Tiny toys may keep `.`; multi-crate / monorepo agents must replace with package roots before map-ready work.
|
|
123
|
+
|
|
124
|
+
See also: Findings note `Findings/readiness-blocked-bare-monitor-2026-07.md`.
|
|
125
|
+
|
|
66
126
|
## Mandatory New-Session Rule
|
|
67
127
|
|
|
68
128
|
**Copy this exact block into the system prompt or the very first instruction of every new LLM session that uses Wikifier:**
|
|
@@ -32,7 +32,13 @@ class TestCacheRoundTrip(TempProjectTestCase):
|
|
|
32
32
|
cache["_barrel_resolutions"] = {"deadbeef": {"importers": ["a.py"]}}
|
|
33
33
|
|
|
34
34
|
ic.save_cache(self.root, cache)
|
|
35
|
-
|
|
35
|
+
# SQLite is primary (4.6.6+); JSON dual-write is opt-in only
|
|
36
|
+
staging = self.root / ".wikifier_staging"
|
|
37
|
+
self.assertTrue(
|
|
38
|
+
(staging / "import_cache.sqlite").exists()
|
|
39
|
+
or (staging / "import_cache.json").exists(),
|
|
40
|
+
"expected sqlite or legacy json cache",
|
|
41
|
+
)
|
|
36
42
|
|
|
37
43
|
loaded = ic.load_cache(self.root)
|
|
38
44
|
self.assertEqual(loaded, cache)
|