jscpd-rs 0.1.0

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.
Files changed (96) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/Cargo.lock +1323 -0
  3. package/Cargo.toml +54 -0
  4. package/LICENSE +21 -0
  5. package/README.md +372 -0
  6. package/docs/api-parity.md +49 -0
  7. package/docs/cloning-plan.md +281 -0
  8. package/docs/compat-baseline.md +535 -0
  9. package/docs/format-porting.md +86 -0
  10. package/docs/junior-task-template.md +62 -0
  11. package/docs/junior-workflow.md +87 -0
  12. package/docs/migrating-from-jscpd.md +193 -0
  13. package/docs/npm-release.md +116 -0
  14. package/docs/public-benchmark-suite.md +81 -0
  15. package/docs/release-checklist.md +200 -0
  16. package/docs/release-decisions.md +103 -0
  17. package/docs/release-readiness.md +51 -0
  18. package/docs/upstream-bugs.md +501 -0
  19. package/docs/upstream-issue-drafts.md +393 -0
  20. package/docs/user-guide.md +309 -0
  21. package/examples/dump_oxc_tokens.rs +112 -0
  22. package/examples/library_api.rs +42 -0
  23. package/npm/bin/jscpd-rs.js +6 -0
  24. package/npm/bin/jscpd-server.js +6 -0
  25. package/npm/lib/run-binary.js +68 -0
  26. package/npm/scripts/postinstall.js +50 -0
  27. package/package.json +53 -0
  28. package/skills/dry-refactoring/SKILL.md +63 -0
  29. package/skills/jscpd/SKILL.md +85 -0
  30. package/src/app.rs +512 -0
  31. package/src/bin/jscpd-server.rs +429 -0
  32. package/src/blame.rs +130 -0
  33. package/src/cli/config.rs +543 -0
  34. package/src/cli/parsing.rs +301 -0
  35. package/src/cli/tests.rs +543 -0
  36. package/src/cli.rs +671 -0
  37. package/src/detector/matching/secondary.rs +387 -0
  38. package/src/detector/matching.rs +274 -0
  39. package/src/detector/model.rs +190 -0
  40. package/src/detector/prepare.rs +71 -0
  41. package/src/detector/skip_local.rs +40 -0
  42. package/src/detector/statistics.rs +138 -0
  43. package/src/detector/store.rs +96 -0
  44. package/src/detector/tests.rs +238 -0
  45. package/src/detector.rs +265 -0
  46. package/src/files/discovery.rs +508 -0
  47. package/src/files/gitignore.rs +203 -0
  48. package/src/files/paths.rs +68 -0
  49. package/src/files/shebang.rs +106 -0
  50. package/src/files/tests.rs +523 -0
  51. package/src/files.rs +25 -0
  52. package/src/formats.rs +570 -0
  53. package/src/lib.rs +433 -0
  54. package/src/main.rs +26 -0
  55. package/src/report/ai.rs +125 -0
  56. package/src/report/badge.rs +238 -0
  57. package/src/report/console.rs +180 -0
  58. package/src/report/console_common.rs +37 -0
  59. package/src/report/console_full.rs +139 -0
  60. package/src/report/csv.rs +65 -0
  61. package/src/report/escape.rs +8 -0
  62. package/src/report/file_output.rs +28 -0
  63. package/src/report/html/assets.rs +47 -0
  64. package/src/report/html.rs +336 -0
  65. package/src/report/json.rs +119 -0
  66. package/src/report/markdown.rs +125 -0
  67. package/src/report/sarif.rs +302 -0
  68. package/src/report/silent.rs +22 -0
  69. package/src/report/source.rs +38 -0
  70. package/src/report/summary.rs +50 -0
  71. package/src/report/test_support.rs +133 -0
  72. package/src/report/threshold.rs +76 -0
  73. package/src/report/xcode.rs +90 -0
  74. package/src/report/xml.rs +119 -0
  75. package/src/report.rs +250 -0
  76. package/src/server/mcp.rs +942 -0
  77. package/src/server.rs +1081 -0
  78. package/src/tokenizer/apex.rs +97 -0
  79. package/src/tokenizer/blocks.rs +532 -0
  80. package/src/tokenizer/embedded.rs +106 -0
  81. package/src/tokenizer/generic.rs +511 -0
  82. package/src/tokenizer/hash.rs +27 -0
  83. package/src/tokenizer/ignore.rs +33 -0
  84. package/src/tokenizer/line_index.rs +33 -0
  85. package/src/tokenizer/markdown.rs +289 -0
  86. package/src/tokenizer/markup_attrs.rs +289 -0
  87. package/src/tokenizer/oxc/fallback.rs +275 -0
  88. package/src/tokenizer/oxc/jsx.rs +168 -0
  89. package/src/tokenizer/oxc/kind.rs +177 -0
  90. package/src/tokenizer/oxc/lexical.rs +67 -0
  91. package/src/tokenizer/oxc.rs +659 -0
  92. package/src/tokenizer/scan.rs +88 -0
  93. package/src/tokenizer/tap.rs +150 -0
  94. package/src/tokenizer/tests.rs +915 -0
  95. package/src/tokenizer.rs +328 -0
  96. package/src/verbose.rs +195 -0
@@ -0,0 +1,200 @@
1
+ # Release Checklist
2
+
3
+ This checklist is the publication runbook for the first Rust release candidate.
4
+ Policy decisions live in `docs/release-decisions.md`; current evidence lives in
5
+ `docs/compat-baseline.md` and `docs/release-readiness.md`.
6
+
7
+ ## Current Release Candidate Evidence
8
+
9
+ Latest full local prepublish gate:
10
+
11
+ ```bash
12
+ scripts/prepublish-check.sh
13
+ ```
14
+
15
+ Passed on 2026-05-31 at code commit `8c3da0e`. This includes
16
+ `scripts/release-candidate.sh`, package/install verification, crate/tag
17
+ availability checks, npm package/name/npx verification, and
18
+ `cargo publish --dry-run --locked`. Later documentation-only commits may reuse
19
+ the release-candidate evidence if they do not change code, scripts, package
20
+ metadata, or benchmark configuration; rerun
21
+ `RUN_RELEASE_CANDIDATE=0 scripts/prepublish-check.sh` after documentation edits
22
+ so package/dry-run evidence matches the exact package contents being tagged.
23
+
24
+ GitHub Actions default `release-gate` must pass on the exact pushed commit
25
+ being published. Check the current run in GitHub Actions after the final push;
26
+ the publish blocker below is the authoritative gate.
27
+
28
+ Latest GitHub Actions default release-gate:
29
+
30
+ ```text
31
+ push
32
+ ```
33
+
34
+ Passed on 2026-05-31 at code commit `8c3da0e`:
35
+ https://github.com/vv-bogdanov/jscpd-rs/actions/runs/26710762680
36
+
37
+ CI timing snapshot after the first cache/timing pass, from cold GitHub Actions
38
+ run `26710415211` on commit `7bdf12f`:
39
+
40
+ | Step | Time |
41
+ | --- | ---: |
42
+ | `package/install check` | 192s |
43
+ | `CLI compatibility` | 56s |
44
+ | `cargo test` | 35s |
45
+ | `server compatibility` | 28s |
46
+ | `config compatibility` | 4s |
47
+
48
+ Optimized default CI run `26710686373` on commit `71088f1` completed in
49
+ 2m18s. Current warm-cache bottlenecks:
50
+
51
+ | Step | Time |
52
+ | --- | ---: |
53
+ | `CLI compatibility` | 36s |
54
+ | `server compatibility` | 29s |
55
+ | `package/install check` | 23s |
56
+ | `cargo test` | 6s |
57
+ | `config compatibility` | 6s |
58
+
59
+ The workflow now restores Cargo, pnpm, and upstream build caches, resolves the
60
+ pnpm store with upstream's `pnpm@10.28.0`, validates restored pnpm
61
+ `node_modules` symlinks before using upstream builds, skips `clippy`
62
+ installation outside release-candidate runs, and uses a target-reuse npm
63
+ package smoke. Keep the full cold npm source-build in
64
+ `scripts/prepublish-check.sh` and release-candidate runs.
65
+
66
+ Recorded public benchmark baseline for this release candidate:
67
+
68
+ | Case | Commit | Format | Rust avg | Upstream avg | Speedup | Compat |
69
+ | --- | --- | --- | ---: | ---: | ---: | --- |
70
+ | `react` | `f0dfee3` | `javascript` | 0.199097s | 10.079214s | 50.62x | pass |
71
+ | `next` | `2bbb67b9` | `typescript` | 0.262433s | 14.715736s | 56.07x | pass |
72
+ | `prometheus` | `a0524ee` | `go` | 0.085239s | 4.642435s | 54.46x | pass |
73
+
74
+ ## Publish Blockers
75
+
76
+ Before publishing, all of these must be true:
77
+
78
+ - `git status --short` is clean.
79
+ - `git submodule status jscpd` points at the reviewed upstream reference.
80
+ - `scripts/release-candidate.sh` passes on the exact code commit being tagged.
81
+ - GitHub Actions `release-gate` passes on the pushed commit.
82
+ - `scripts/package-check.sh` passes and the package file list excludes
83
+ `jscpd/`, `target/`, `node_modules/`, and `scripts/`.
84
+ - `scripts/npm-package-check.sh` passes, including `npm pack`,
85
+ `npm publish --dry-run --json`, local install smoke checks for `jscpd-rs`,
86
+ `jscpd`, and `jscpd-server`, and an `npx --package <tarball>` smoke run.
87
+ - `cargo publish --dry-run --locked` passes for the exact package manifest and
88
+ include list being published.
89
+ - `README.md`, `docs/compat-baseline.md`, and
90
+ `docs/public-benchmark-suite.md` contain the same recorded public benchmark
91
+ numbers.
92
+ - For the first publication, the `jscpd-rs` crate and npm package names are
93
+ still available or already owned by this project, and `v0.1.0` does not
94
+ already exist locally or on the remote.
95
+ - `docs/upstream-bugs.md` contains concrete repro commands for upstream issues
96
+ we plan to file.
97
+ - `docs/upstream-issue-drafts.md` contains reviewed issue drafts ready to
98
+ verify against current upstream and post.
99
+ - `CHANGELOG.md` contains the exact release notes for the version being tagged.
100
+
101
+ ## First-Release Scope
102
+
103
+ Treat these as release scope:
104
+
105
+ - `jscpd` and `jscpd-server` binaries with upstream-compatible command names.
106
+ - CLI/config option surface covered by `scripts/compat-cli.sh` and
107
+ `scripts/compat-config.sh`.
108
+ - Coverage-first duplicate parity: Rust must not miss duplicated upstream lines
109
+ for the same inputs and options.
110
+ - Built-in native reporters: `ai`, `console`, `consoleFull`, `csv`, `html`,
111
+ `json`, `markdown`, `silent`, `sarif`, `threshold`, `xcode`, `xml`, and
112
+ `badge`.
113
+ - Native file discovery, format registry, JS/TS/JSX/TSX tokenization, generic
114
+ long-tail tokenization, blame, native API, and native server endpoints listed
115
+ in `docs/release-readiness.md`.
116
+
117
+ ## Intentional First-Release Deviations
118
+
119
+ These are not publication blockers for the first release:
120
+
121
+ - Dynamic npm reporters, stores, listeners, and plugins are not loaded. The
122
+ compatible option surface and upstream-style missing-package warnings are the
123
+ release contract.
124
+ - Exact token totals, pair ordering, and boundaries are diagnostic while
125
+ upstream duplicated lines remain covered.
126
+ - HTML output is self-contained and practically compatible, not pixel-perfect.
127
+ - The Rust crate exposes a native Rust API, not the upstream JavaScript package
128
+ API.
129
+ - Persistent store/cache backends remain demand-driven until benchmark data
130
+ shows the in-memory path is insufficient.
131
+ - Full Prism grammar parity for every long-tail format is not attempted; promote
132
+ formats only when coverage gates show missed upstream lines.
133
+
134
+ ## Pre-Tag Commands
135
+
136
+ Run from the repository root:
137
+
138
+ ```bash
139
+ scripts/prepublish-check.sh
140
+ ```
141
+
142
+ The script checks clean git state, the reviewed `jscpd` submodule reference,
143
+ local and remote tag availability, exact crate-name availability through
144
+ `cargo search`, exact npm package-name availability through `npm view`,
145
+ benchmark-number consistency across release docs, the full release-candidate
146
+ gate, package/install validation, npm pack/npx validation, and
147
+ `cargo publish --dry-run --locked`. Set `RUN_RELEASE_CANDIDATE=0` only when the
148
+ same code commit already has fresh local and CI release-candidate evidence.
149
+
150
+ Then push the exact release commit and verify the GitHub Actions
151
+ `release-gate` result. Use the workflow dispatch `release_candidate` input for a
152
+ full CI-side release-candidate run when needed.
153
+
154
+ For the first publication candidate checked on 2026-05-31, local and remote
155
+ `v0.1.0` tag lookups returned no entries. `cargo search jscpd-rs --limit 5`
156
+ returned no exact crate, `npm view jscpd-rs version` returned `E404`, and the
157
+ sparse crates.io index path
158
+ `https://index.crates.io/js/cp/jscpd-rs` returned 404.
159
+
160
+ ## Post-Tag Smoke
161
+
162
+ After tagging or publishing, install the package into a temporary Cargo root and
163
+ check the binaries:
164
+
165
+ ```bash
166
+ cargo install --path . --bin jscpd --root /tmp/jscpd-rs-install --force --locked
167
+ cargo install --path . --bin jscpd-server --root /tmp/jscpd-rs-install --force --locked
168
+ /tmp/jscpd-rs-install/bin/jscpd --version
169
+ /tmp/jscpd-rs-install/bin/jscpd --help
170
+ /tmp/jscpd-rs-install/bin/jscpd-server --version
171
+ ```
172
+
173
+ The package gate itself installs both binaries with `cargo install --bins`; the
174
+ two explicit commands above are a manual smoke equivalent for post-tag checks.
175
+
176
+ ## Next Release Themes
177
+
178
+ Track these after the first release candidate:
179
+
180
+ - Reduce noisy extra Rust findings where they are user-visible false positives.
181
+ - Add native persistent store/cache only if release-scale benchmark data needs
182
+ it.
183
+ - Tighten MCP Streamable HTTP SDK edge cases if real MCP clients require them.
184
+ - Promote long-tail tokenizers only from concrete missed-coverage evidence.
185
+ - File upstream bug reports from `docs/upstream-issue-drafts.md`.
186
+
187
+ ## CI Speed Plan
188
+
189
+ Keep this as part of the release plan:
190
+
191
+ - Treat `package/install check`, `CLI compatibility`, `cargo test`, and
192
+ `server compatibility` as the CI bottleneck watchlist.
193
+ - Compare future warm-cache GitHub Actions runs with optimized run
194
+ `26710686373` and cold run `26710415211`.
195
+ - Keep default push/PR CI as a fast confidence gate; keep cold npm source
196
+ install, `clippy`, full matrix, and public benchmark coverage in
197
+ `scripts/prepublish-check.sh` and manual release-candidate workflow runs.
198
+ - If default CI remains above roughly three minutes after warm caches, split the
199
+ package surface smoke from the compatibility gates into separate jobs or make
200
+ package source-build a release-candidate-only job.
@@ -0,0 +1,103 @@
1
+ # Release Decisions
2
+
3
+ Approved on 2026-05-30.
4
+
5
+ These decisions define the first-release direction. They can change only when a
6
+ compatibility gate, public benchmark, or real user workflow proves the current
7
+ choice insufficient.
8
+
9
+ ## Compatibility Gate
10
+
11
+ - The blocking rule is coverage-first parity: Rust must not miss duplicate
12
+ lines reported by upstream `jscpd` for the same input and options.
13
+ - Rust may report additional duplicates while compatibility is converging.
14
+ Extra findings remain visible in comparison output and should be reduced when
15
+ they are false positives or noisy user-visible ranges.
16
+ - Exact 1:1 clone boundaries, pair ordering, and token totals are quality
17
+ metrics, not the default release blocker.
18
+
19
+ ## Runtime Strategy
20
+
21
+ - Do not embed a JavaScript runtime or spawn upstream JavaScript from Rust to
22
+ implement tokenizers, reporters, stores, or plugins.
23
+ - Prefer native Rust implementations backed by maintained crates.
24
+ - If a format cannot be supported well without a large custom port, keep it on
25
+ generic tokenization until a fixture or public-repo gate shows missed
26
+ upstream coverage.
27
+
28
+ ## Reporters
29
+
30
+ - Built-in reporters are first-release scope and should be implemented natively:
31
+ `ai`, `console`, `consoleFull`, `csv`, `html`, `json`, `markdown`, `silent`,
32
+ `sarif`, `threshold`, `xcode`, `xml`, and the commonly used badge reporter.
33
+ - Machine-readable reporter contracts are strict release scope: JSON, XML,
34
+ SARIF, CSV, and Markdown should stay structurally compatible with upstream.
35
+ - HTML must remain practically compatible and self-contained. Pixel-perfect
36
+ upstream parity is not a first-release blocker.
37
+ - Dynamic npm reporter loading is post-MVP. Unknown reporter names should keep
38
+ the upstream-style warning and continue where upstream continues.
39
+
40
+ ## Stores And Cache
41
+
42
+ - The default in-memory store is the first-release store path.
43
+ - `--store <name>` should keep the upstream missing-store fallback shape unless
44
+ a native store backend is deliberately added.
45
+ - Dynamic npm store loading is post-MVP.
46
+ - Native persistent/cache stores are demand-driven. Add one only if public
47
+ benchmark data shows the in-memory path is not enough for release viability.
48
+ - `cache`, config `listeners`, and `tokensToSkip` remain option-surface
49
+ compatibility fields while upstream exposes but does not consume them in the
50
+ current CLI runtime.
51
+
52
+ ## Formats And Tokenization
53
+
54
+ - JS/TS/JSX/TSX stay on the Oxc-backed native path.
55
+ - Markdown, Vue, Svelte, Astro, Apex, and markup keep small native block
56
+ splitters where that unlocks upstream coverage without a full grammar port.
57
+ - Long-tail formats use the upstream-synchronized registry plus generic
58
+ tokenization by default.
59
+ - Promote a long-tail format only with a focused fixture, `STRICT=coverage`
60
+ comparison, and a clear reason that generic tokenization is insufficient.
61
+
62
+ ## CLI And Upstream Quirks
63
+
64
+ - Mirror upstream behavior when it is visible, common, and covered by tests.
65
+ - Crash-only Commander edge cases are documented first and mirrored only if a
66
+ release gate or user workflow makes exact behavior necessary.
67
+ - Keep upstream bug candidates in `docs/upstream-bugs.md` so we can file them
68
+ later with concrete repro commands.
69
+
70
+ ## Blame
71
+
72
+ - Blame stays native through Git commands or a Git library.
73
+ - Prefer per-file failure isolation over inheriting upstream nested-repository
74
+ failure modes.
75
+
76
+ ## Performance
77
+
78
+ - Performance remains a product requirement. Public benchmark runs should be
79
+ repeated before publication with pinned commits and recorded speedups.
80
+ - The aspirational target is 50x on representative cases, but release gating
81
+ should use measured thresholds from the selected public benchmark suite.
82
+
83
+ ## Approved Complex Feature Choices
84
+
85
+ These are the current choices for features that are expensive to clone exactly:
86
+ the user explicitly approved these tradeoffs on 2026-05-30.
87
+
88
+ - Dynamic npm reporters, stores, listeners, and plugins: do not implement for
89
+ the first release. Keep option-surface compatibility, native built-ins, and
90
+ upstream-style missing-package warnings.
91
+ - Long-tail Prism tokenizer parity: do not port all grammars eagerly. Keep the
92
+ upstream-synchronized format registry plus generic tokenization, then promote
93
+ formats only when fixtures or public-repo gates show missed upstream coverage.
94
+ - Extra Rust findings: acceptable while compatibility converges. The release
95
+ blocker is missing upstream duplicated line coverage, not 1:1 pair identity.
96
+ - Node/Commander quirks: mirror visible behavior only when covered by gates.
97
+ Document crash-only or incidental quirks in `docs/upstream-bugs.md`.
98
+ - HTML reporter: keep self-contained and practically compatible. Pixel-perfect
99
+ parity is not a first-release blocker.
100
+ - Persistent cache/store backends: postpone until benchmark data shows the
101
+ in-memory detector is insufficient on release-scale repositories.
102
+ - Blame failures: prefer native per-file isolation instead of inheriting
103
+ upstream failure modes around nested or unusual Git repositories.
@@ -0,0 +1,51 @@
1
+ # Release Readiness
2
+
3
+ Last updated: 2026-05-31.
4
+
5
+ This is the working component checklist for the first release. The authoritative
6
+ policy decisions are still in `docs/release-decisions.md`; this file tracks the
7
+ current implementation status.
8
+
9
+ ## Ready For First Release
10
+
11
+ | Component | Status | Notes |
12
+ | --- | --- | --- |
13
+ | Binary/package surface | ready | `jscpd` binary name, Cargo package include list, publish dry-run, install check, version/help smoke checks, npm package metadata, and local `npx` smoke checks. |
14
+ | CLI option surface | ready | Main upstream flags are parsed, including visible Commander quirks gated by `scripts/compat-cli.sh`. |
15
+ | Config loading | ready | `.jscpd.json` and `package.json#jscpd`, config-relative paths/ignore, malformed JSON behavior, symlinked explicit config paths. |
16
+ | File discovery | ready | Format filters, custom extensions/names, `.gitignore`, global Git excludes, symlink policy, shebang detection, max size/line filtering. |
17
+ | Format registry | ready | Generated from upstream tokenizer build; current registry has 223 formats and 206 extension mappings. |
18
+ | Detector core | ready | Numeric hashes, compact token streams, per-format sharding, parallel preparation/detection, coverage-first comparator. |
19
+ | Hot JS/TS tokenization | ready | Native Oxc-backed paths for JavaScript, TypeScript, JSX, and TSX with coverage gates. |
20
+ | Embedded/block formats | ready | Markdown, markup, Vue, Svelte, Astro, Apex, and TAP have native block handling where needed for upstream coverage. |
21
+ | Built-in reporters | ready | `ai`, `console`, `consoleFull`, `csv`, `html`, `json`, `markdown`, `silent`, `sarif`, `threshold`, `xcode`, `xml`, and `badge`; file reporters are gated for clone and no-duplicate reports. |
22
+ | Blame | ready | Native `git blame -w` data is populated and gated by `scripts/compat-blame.sh`. |
23
+ | Native Rust API | ready | `jscpd`, `jscpd_with_exit_callback`, `Tokenizer`, `Detector`, `Statistic`, `MemoryStore`, `detect_clones`, `detect_clones_and_statistic`, `detect_clones_and_statistics`, `detect_source_files`, default options, argv option parsing, supported formats, and format lookup helpers expose the app, tokenizer, detector, statistics, and store core for path-based and in-memory integrations. See `docs/api-parity.md`. |
24
+ | Native server | partial | `jscpd-server` exposes `/`, `/api/health`, `/api/stats`, `/api/check`, `/api/recheck`, and `/mcp`; exact help text, stable CLI, HTTP success/error, and MCP contracts are gated; `/api/check` reuses prepared project token maps; exact upstream Streamable HTTP SDK behavior remains follow-up. |
25
+ | Performance harness | ready | Local benchmark script and public benchmark suite with pinned output recording and speedup gates. |
26
+ | Release gates | ready | Default CI gate, full compatibility matrix, Cargo/npm package checks, reporter/config/CLI/blame gates. The default gate now prints per-step timings, caches Cargo/pnpm/upstream build artifacts, and uses target-reuse npm package smoke in push/PR CI while keeping cold npm source-build in release-candidate/prepublish gates. |
27
+
28
+ ## Partial Or Follow-Up
29
+
30
+ | Component | Status | Recommended action |
31
+ | --- | --- | --- |
32
+ | Long-tail tokenization | coverage-first | Keep generic tokenization by default. Promote formats only when fixtures or public repos show missed upstream coverage. |
33
+ | Exact pair parity | diagnostic | Do not block release while every upstream duplicated line is covered. Reduce noisy extras after user-facing reports become annoying. |
34
+ | Token totals | diagnostic | Native token streams may differ from Prism. Keep report-visible clone coverage as the gate. |
35
+ | HTML reporter polish | practical parity | Keep self-contained HTML stable. Do not chase pixel-perfect upstream parity for the first release. |
36
+ | Terminal cosmetics | practical parity | Important messages are gated; exact wrapping/order remains lower priority. |
37
+ | Upstream JavaScript API parity | follow-up | Native Rust helpers cover the practical app/tokenizer/detector/statistics/store concepts, including an embeddable argv runner and tokenizer map generation; exact JS package export shape is not implemented in the Rust crate. See `docs/api-parity.md`. |
38
+ | Server snippet matching | optimized baseline | Native `/api/check` and MCP `check_duplication` are functional and reuse project token maps from the last scan; add a dedicated window index only if real server benchmarks require it. |
39
+ | Npm prebuilt binaries | follow-up | The first npm package is source-build: install/postinstall compiles with Cargo. Add platform-specific prebuilt packages before broad npm promotion if install speed or Rust toolchain requirements become a blocker. |
40
+ | Latest full publication gate | ready | `scripts/prepublish-check.sh` passed locally on code commit `8c3da0e`, including `scripts/release-candidate.sh`, package/install verification, crate/tag availability checks, npm package/name/npx verification, and `cargo publish --dry-run --locked`. GitHub Actions default `release-gate` passed on code commit `8c3da0e` in run `26710762680`. After benchmark documentation updates, `RUN_RELEASE_CANDIDATE=0 scripts/prepublish-check.sh` is the package/dry-run refresh gate for the exact package contents being tagged. |
41
+
42
+ ## Post-MVP
43
+
44
+ | Component | Decision |
45
+ | --- | --- |
46
+ | Dynamic npm reporters | Do not implement for the first release; keep upstream-style missing-package warnings. |
47
+ | Dynamic npm stores | Do not implement for the first release; default in-memory store is the release path. |
48
+ | Listeners/plugins runtime | Option-surface compatibility only unless a real workflow requires native support. |
49
+ | MCP endpoint polish | Core native endpoint exists; tighten exact SDK edge cases only when MCP client compatibility demands it. |
50
+ | Persistent cache/store backends | Add only if public benchmark data proves the in-memory path is insufficient. |
51
+ | Full Prism grammar port | Do not rewrite all grammars eagerly; use native crates or small scanners only for proven gaps. |