grammar-inference-engine/bex
tobjend 44415c5b42 feat: runtime grammar lookup via MCP + fix YAML output
MCP server:
- analyze_directory: updated signature to match CLI (split_mixed,
  min_structure, min_methods, min_coverage=0.05)
- get_grammar(directory, file_path, context_symbol): returns the right
  GBNF for constrained generation at code generation time
- get_package_grammars(directory, file_path): lists all grammars for
  a file's package, ranked by quality

YAML output:
- _build_yaml_output now includes leaf grammars from recursive split
  (all_grammars in meta), so each calling context gets its own entry

Workflow for agents:
  1. analyze_directory → grammars.yml persisted
  2. get_grammar(file, 'return') → GBNF for constrained generation
  3. LLM generates code following the package's convention
2026-07-12 14:08:12 +02:00
..
tag_preprocessor feat: runtime grammar lookup via MCP + fix YAML output 2026-07-12 14:08:12 +02:00
__init__.py feat: CRX refined — cluster-then-infer for tighter grammars 2026-07-12 01:50:40 +02:00
__main__.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
automaton.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
baum_welch.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
cli.py purge make_charts.py, examples/, full-text papers, blog_post (moved to ~/Desktop/kesai/); translate German CLI to English 2026-07-01 11:28:42 +02:00
crx.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
crx_refined.py feat: CRX refined — cluster-then-infer for tighter grammars 2026-07-12 01:50:40 +02:00
ensemble.py perf: iDRegEx opt-in, GBNF newline fix, OverflowError fix 2026-07-12 02:52:05 +02:00
expr.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
gbnf.py feat: grammar_structure_score + min_structure filter 2026-07-12 03:02:50 +02:00
grammar_index.py feat: grammar index for runtime lookup 2026-07-12 14:08:05 +02:00
idregex.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
ikoa.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
ilocal.py fix badge position; purge remaining German user-reference comments 2026-07-01 13:28:55 +02:00
koa.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
kore.py Revert "parallelize kORE outer (k, n) trials via ProcessPoolExecutor" 2026-07-11 20:36:48 +02:00
marking.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
mcp_server.py feat: runtime grammar lookup via MCP + fix YAML output 2026-07-12 14:08:12 +02:00
mdl.py WIP: language size scoring + diversity threshold (step 1 pending) 2026-07-11 22:56:42 +02:00
pta.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
reduce.py feat: add reduce slicing, fix rwr0 timeout, fix sequence format 2026-07-12 13:13:16 +02:00
repair.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
rwr0.py feat: add reduce slicing, fix rwr0 timeout, fix sequence format 2026-07-12 13:13:16 +02:00
rwrsq.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
shrink.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
soa.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00
template.py fix badge position; purge remaining German user-reference comments 2026-07-01 13:28:55 +02:00
tokenizer.py fix badge position; purge remaining German user-reference comments 2026-07-01 13:28:55 +02:00
twotinf.py Initial commit: BEX-based grammar inference engine 2026-07-01 08:01:16 +02:00