Commit 25f2709
authored
feat(evangeliser): implement phases 1-5 — scanner, tests, CLI, 40 patterns (#41)
## Summary
- **Phase 1**: Consolidate canonical/satellite drift, fix SPDX headers
to PMPL-1.0-or-later, replace npx with Deno, update rescript.json for
v12 deprecations
- **Phase 2**: New `Scanner.res` + `Analyser.res` — regex-based JS
pattern detection engine with confidence scoring, coverage analysis,
difficulty assessment, and pattern suggestions
- **Phase 3**: 38 tests across 6 suites (Types, Glyphs, Narrative,
Patterns, Scanner, Analyser) — all passing
- **Phase 4**: Expand pattern library from 15 to 40 patterns covering
all 21 categories (added Destructuring, Defaults, Templates,
ArrowFunctions, Variants, Modules, TypeSafety, Immutability,
PatternMatching, PipeOperator, OopToFp, ClassesToRecords,
InheritanceToComposition, StateMachines, DataModeling)
- **Phase 5**: CLI with `scan`/`patterns`/`legend`/`stats` commands,
RAW/FOLDED/GLYPHED view layers, plain/markdown/html output formats
## Test plan
- [x] `deno run -A npm:rescript build` — 0 errors, 0 warnings
- [x] `deno run --allow-read --allow-env test/run_all.js` — 38/38 tests
pass
- [x] `bin/evangeliser.js scan <file>` — scans JS files, outputs
narratives with glyphs
- [x] `bin/evangeliser.js patterns` — lists all 40 patterns by category
- [x] `bin/evangeliser.js stats` — shows library statistics
- [ ] CI workflows pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)25 files changed
Lines changed: 2708 additions & 374 deletions
File tree
- rescript-ecosystem/packages/tooling/evangeliser
- bin
- scripts
- src
- test
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 10 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
16 | 14 | | |
17 | 15 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
26 | 19 | | |
27 | 20 | | |
28 | 21 | | |
| |||
31 | 24 | | |
32 | 25 | | |
33 | 26 | | |
34 | | - | |
| 27 | + | |
35 | 28 | | |
36 | 29 | | |
37 | | - | |
38 | 30 | | |
39 | 31 | | |
40 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
| |||
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | | - | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | | - | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | | - | |
23 | | - | |
| 26 | + | |
24 | 27 | | |
Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 0 additions & 68 deletions
This file was deleted.
0 commit comments