Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,16 @@ jobs:
test:
name: ${{ matrix.os }} / Rust
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
experimental: [false]
include:
- os: windows-latest
experimental: true
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v6

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.83.0

- name: Test
run: cargo test --locked
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@1.83.0
- name: Test
run: cargo test --locked

Expand All @@ -25,7 +25,7 @@ jobs:
needs: test
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@1.83.0
- name: Build release binary
run: cargo build --release --locked
- name: Create GitHub Release
Expand Down
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Prefer the CLI when the connected MCP server is still `python3 -m wikifier.mcp.s
- Do not hand-edit `library.md`, `file_health.md`, `file_health.json`, or `pending_updates.md`. `update-maps` rewrites `library.md`. Health and pending change only through the commands. They take `.wikifier_staging/.lock`.
- `init` copies `index.html` only when it is missing, and it does not clobber an existing path list. `diagnostics.html` stays in this repo. `index.v2.html` and `diagnostics.v2.html` are comparison pages and are not deployed.
- This repo's map roots are `src/` and `tests/` (`map_paths.txt`). `monitored_paths.txt` is the extra watch list for docs and `wikifier.sh`.
- The import scan is comment-masked regex, plus named JS/TS re-exports to depth 8 (`parser: "regex+reexport"`). An indented Python import is conditional. `import()` is dynamic. The accuracy gate is `accuracy_fixtures_match_frozen_edges` (four frozen fixtures). Do not describe the scan as a CPython `ast` walk, and do not claim it has been run on Babylon.js. It does not read tsconfig paths, package exports, or workspaces.
- `mark_green` checks Python and JS/TS public names against the wiki. Rust, Go, C/C++, C#, Java, and Markdown come back `unchecked`. That is expected.
- The import scan is comment-masked regex, plus named JS/TS re-exports to depth 8 (`parser: "regex+reexport"`). An indented Python import is conditional. `import()` is dynamic. Rust resolves `mod`, `crate::`, `self::`, `super::`, and the root `Cargo.toml` package or lib name (`-` to `_`). `crate::` stays in that file's crate (`tests/*.rs` and `src/bin/*.rs` included). The package or lib name points at the library, which is how `src/main.rs` and `tests/*.rs` show up as dependents. The accuracy gate is `accuracy_fixtures_match_frozen_edges` (the frozen layouts, including a Cargo crate). Do not describe the scan as a CPython `ast` walk, and do not claim it has been run on Babylon.js. It does not read tsconfig paths, package exports, or workspaces.
- `mark_green` checks Python, JS/TS, and Rust public names against the wiki. Rust names are top-level `pub` items, not `pub(crate)` and not methods inside `impl`. Go, C/C++, C#, Java, and Markdown come back `unchecked`. That is expected.
- `wikifier serve` binds `127.0.0.1:8787`. Do not bind port 8080.
- Do not set the project root to a parent that contains several repos.
- Git: honor hooks. Do not use `--no-verify`. Do not commit `.cursor/`, `target/`, or gitignored leftovers (`wikifier/*.pyc`, `build/`, `dist/`, `.venv-build/`).
Expand All @@ -56,8 +56,8 @@ Prefer the CLI when the connected MCP server is still `python3 -m wikifier.mcp.s

These files still describe the deleted Python package. They are records. Do not implement them, and do not rewrite them to sound current.

- `MODULARIZATION_PLAN.md`
- `SIMPLIFICATION_PLAN_AND_LOG.md`
- `Findings/archive/MODULARIZATION_PLAN.md`
- `Findings/archive/SIMPLIFICATION_PLAN_AND_LOG.md`
- `Findings/` and `Findings/archive/`
- `journal/` entries from before the Rust cutover
- Released sections of `CHANGELOG.md` (Unreleased is the live note)
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md.wiki.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

**Role:** Entry point for any coding agent in this repository.

It points at `skills/run.md` (protocol v0.7) and names the live Rust binary, the daily loop, and the files that are historical Python-era records. Map roots stay `src/` and `tests/`. The import scan stays comment-masked regex plus named re-exports.
It points at `skills/run.md` (protocol v0.7) and names the live Rust binary, the daily loop, and the Python-era records kept under `Findings/archive/`. Map roots stay `src/` and `tests/`. The import scan stays comment-masked regex plus named re-exports. Rust also resolves `crate::`, `self::`, `super::`, and the root Cargo.toml package or lib name, so `src/main.rs` and `tests/*.rs` are dependents of the library modules they import. `mark-green` checks Rust top-level `pub` names.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The CI empty-dependency check reads `Cargo.toml` with `awk`. The workflow does not run Python.
- The live daemon actions are `start`, `stop`, `status`, and `run`.
- This repo's import-map roots are `src/` and `tests/`.
- The import scan remains comment-masked regex plus named JS/TS re-exports to depth 8 (`parser: "regex+reexport"`). It is not a CPython `ast` walk, and it has not been run on Babylon.js. The accuracy gate is still the four frozen fixtures.
- The import scan remains comment-masked regex plus named JS/TS re-exports to depth 8 (`parser: "regex+reexport"`). It is not a CPython `ast` walk, and it has not been run on Babylon.js. The accuracy gate is `accuracy_fixtures_match_frozen_edges`, now including a Cargo crate layout.
- Rust `mod`, `crate::`, `self::`, `super::`, and the root `Cargo.toml` package or lib name resolve to files. Hyphens in the package name become underscores. `crate::` stays inside the file's crate (`tests/*.rs` and `src/bin/*.rs` are separate crates). The package or lib name points at the library, so binaries and integration tests are dependents of the library modules they import.
- `mark-green` checks Rust top-level `pub` items (`fn`, `struct`, `enum`, `trait`, `mod`, `type`, `const`, `static`, and `pub use` names) the same way it checks Python and JS/TS names. `pub(crate)` and items inside `impl` stay out of that set. A Rust file can be `verified` Green. Go, C/C++, C#, and Java stay `unchecked`.
- Tests cover `WIKIFIER_MCP_DEADLINE_S`, `WIKIFIER_CHECK_CHANGES_MAX`, an `import_cache.sqlite` import (including `sqlite_present_unread`), and `actionable_low_conf_edges`.
- CI pins Rust 1.83.0 (`dtolnay/rust-toolchain@1.83.0`). Ubuntu, macOS, and Windows all run `cargo test --locked`, and a Windows failure fails the workflow.

### Removed
- The README section "Does it pay off? (measured)" is gone. It cited `scripts/benchmark_lookup.py`, which left with the Python package, and its numbers were measured on that package. The performance table that remains is still labeled as Python-era.

## [4.7.0] - 2026-10-01

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md.wiki.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

**Role:** Keep a Changelog history for package 4.7.x.

The 4.7.0 section is the record of that release, including the Python package that shipped then. Unreleased notes describe the Rust binary: map artifacts, dependency flags, wiki checks, deletion, background commands, the dashboard serve routes, MCP error reporting, `heal-stubs --dry-run`, and `init DIR`. The import scan is recorded as `regex+reexport`. CI checks the empty dependency list without Python.
The 4.7.0 section is the record of that release, including the Python package that shipped then. Unreleased notes describe the Rust binary: map artifacts, dependency flags, wiki checks, deletion, background commands, the dashboard serve routes, MCP error reporting, `heal-stubs --dry-run`, and `init DIR`. The import scan is recorded as `regex+reexport`. Unreleased notes that Rust crate-name imports resolve to the library, that the unreproducible lookup benchmark was removed, that Rust top-level `pub` names can be verified Green, and that the MCP deadline, check-changes cap, sqlite import, and low-confidence edges have tests. CI pins Rust 1.83.0 and requires Ubuntu, macOS, and Windows. CI checks the empty dependency list without Python.
6 changes: 3 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Pipeline: **scan → parse → resolve → cache → health → artifacts**, imp

- `src/api.rs` — the library surface: `session_bootstrap`, `check_changes`, `prepare_edit`, `suggest_next_actions`, `record_change`, `record_changes`, `record_deletion`, `mark_green`, `verify_wikis`, `update_maps` / `update_maps_run`, `dependency_report`, `load_dependents`, `cycles`, `init_project`, `serve_loop`, `monitor_loop`, `daemon_ctl`. `check_changes` watches mapped files, Green files, and `monitored_paths.txt`. `record_changes` reads `git status` (git is optional).
- `src/scope.rs` — project root, `map_paths.txt`, `monitored_paths.txt`, excludes, and the file walk. A missing configured map directory is a scope error. Three or more child projects make the root a container and the walk stops.
- `src/parse.rs` — comment-masked regex scans for Python, JS/TS, Rust, Go, C/C++, C#, and Java. Named JS/TS re-exports are followed to depth 8 (`via_barrel`). An indented Python import is `conditional`. `import()` is `dynamic`. This is not a CPython `ast` parser and it does not read tsconfig paths, package `exports`, or workspaces. The accuracy gate is `accuracy_fixtures_match_frozen_edges`.
- `src/parse.rs` — comment-masked regex scans for Python, JS/TS, Rust, Go, C/C++, C#, and Java. Named JS/TS re-exports are followed to depth 8 (`via_barrel`). An indented Python import is `conditional`. `import()` is `dynamic`. Rust resolves `mod`, `crate::`, `self::`, `super::`, and the root `Cargo.toml` package or lib name (`-` to `_`). `crate::` stays in the file's crate; the package or lib name points at the library. This is not a CPython `ast` parser and it does not read tsconfig paths, package `exports`, or workspaces. The accuracy gate is `accuracy_fixtures_match_frozen_edges`.
- `src/cache.rs` + `src/cache_commit.rs` — text index at `.wikifier_staging/wk_cache` (per-file payload, `by_src`, `by_dst`, notes, barrels). One commit per `update-maps`. Size and mtime skip unchanged files. `--full` rehashes. `src/legacy_cache.rs` imports an empty cache from `import_cache.sqlite` (the `sqlite3` CLI) or `import_cache.json`.
- `src/artifacts.rs` — `file_health.json` (schema version 2) plus the `file_health.md` view, pending lines, and the journal. Identical journal retries within 120 seconds are skipped. `mark_green` stores `public_symbols`, `wiki_hash`, and `source_mtime_ns`, and refuses a Python or JS/TS wiki that misses the current public names, still mentions a removed name in backticks, or is unchanged after the public surface changed.
- `src/maps_out.rs` — `library.md` (a file tree, a Mermaid block capped at 80 edges, and the dependency table) and sharded folder cards at `.wikifier_staging/maps/_root.json` and `maps/{prefix}/_index.json`.
Expand All @@ -69,7 +69,7 @@ Pipeline: **scan → parse → resolve → cache → health → artifacts**, imp

Generated artifacts (in the target project root): `file_health.md/.json`, `library.md`, `pending_updates.md`, `journal/YYYY/MM/DD.md`, per-file `*.wiki.md`, `.wikifier_staging/` (`wk_cache`, folder maps, `incremental_status.json`, locks, daemon state). Scoping: `monitored_paths.txt` (extra watch list), `map_paths.txt` (import-map roots), `exclude_patterns.txt`. This repo's map roots are `src/` and `tests/`.

Adding a language means a scan in `src/parse.rs` with the same edge shape, a frozen fixture kept green by `accuracy_fixtures_match_frozen_edges`, and, when wiki verification should refuse that language, a symbol extractor beside `python_public_symbols` / `js_public_symbols` in `src/api.rs`. Languages without an extractor are marked `unchecked`.
Adding a language means a scan in `src/parse.rs` with the same edge shape, a frozen fixture kept green by `accuracy_fixtures_match_frozen_edges`, and, when wiki verification should refuse that language, a symbol extractor beside `python_public_symbols` / `js_public_symbols` / `rust_public_symbols`. Languages without an extractor are marked `unchecked`. Rust's extractor is `rust_public_symbols` in `src/parse.rs`.

## Versioning & Releases

Expand All @@ -83,5 +83,5 @@ Adding a language means a scan in `src/parse.rs` with the same edge shape, a fro
- `skills/run.md` — the agent protocol (primary contract for any LLM operating Wikifier)
- `docs/spec.md` — original requirements, then the living Core Principles
- `Findings/` — dogfood evidence (`README.md` index; superseded plans in `Findings/archive/`). Historical. Do not treat it as the current design.
- `SIMPLIFICATION_PLAN_AND_LOG.md`, `MODULARIZATION_PLAN.md` — Python-era logs. Do not implement them.
- `Findings/archive/SIMPLIFICATION_PLAN_AND_LOG.md`, `Findings/archive/MODULARIZATION_PLAN.md` — Python-era logs. Do not implement them.
- `file_health.md`, `pending_updates.md`, `journal/`, `library.md` — this repo's own live wiki state (dogfood)
2 changes: 1 addition & 1 deletion CLAUDE.md.wiki.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

**Role:** Repo guidance for an agent working in this tree.

Hard constraints: empty Cargo dependencies, no hand-edits of `library.md` or the health and pending files, and the human dashboard stays secondary. It points agents at `AGENTS.md` and `skills/run.md`. The architecture section names the Rust modules under `src/`, the library file tree, and this repo's map roots `src/` and `tests/`. JSON failures use `success: false`.
Hard constraints: empty Cargo dependencies, no hand-edits of `library.md` or the health and pending files, and the human dashboard stays secondary. The Python-era plan logs live under `Findings/archive/`. It points agents at `AGENTS.md` and `skills/run.md`. The architecture section names the Rust modules under `src/`, the library file tree, and this repo's map roots `src/` and `tests/`. The parse note includes Rust `crate::`, `self::`, `super::`, the Cargo.toml crate name, and `rust_public_symbols` for wiki checks. JSON failures use `success: false`.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Please use the appropriate GitHub issue template:
```bash
wikifier mark-green "path/to/your/file"
```
5. Before opening a PR: `cargo test`, then `wikifier update-maps` and `wikifier validate` on this repo. Parser changes must keep `accuracy_fixtures_match_frozen_edges` green.
5. Before opening a PR: `cargo test`, then `wikifier update-maps` and `wikifier validate` on this repo. Parser changes must keep `accuracy_fixtures_match_frozen_edges` green. CI pins Rust 1.83.0 and runs `cargo test --locked` on Ubuntu, macOS, and Windows. All three jobs are required.

### 3. Pull Request Guidelines

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md.wiki.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

**Role:** How to change Wikifier without adding dependencies.

New commands go in `src/api.rs` and `src/main.rs`, with a test and a `skills/run.md` update. The launchers only exec the binary. After an edit, record the change, refresh that file's wiki, and mark it green.
New commands go in `src/api.rs` and `src/main.rs`, with a test and a `skills/run.md` update. The launchers only exec the binary. After an edit, record the change, refresh that file's wiki, and mark it green. CI pins Rust 1.83.0 and runs the tests on Ubuntu, macOS, and Windows.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
> Archived Python-era record. The package it describes is gone. Kept so the history stays readable.

# Wikifier Modularization Plan

> **Status (4.7.0, 2026-10-01):** `cache/` and `health_pkg/` are done for real — `cache/_core.py` and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
> Archived Python-era record. The package it describes is gone. Kept so the history stays readable.

# Wikifier Simplification Plan & Execution Log (Post M5 Audit)

**Date started**: 2026-06-07
Expand Down
Loading
Loading