You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: multi-language support for the encoder and decoder pipelines (#67)
### Summary
This PR extends CoderMind's **encoder** (repository → RPG graph) and
**decoder** (docs → repository) pipelines from Python-only to
**multi-language**, adding support for Python, JavaScript, TypeScript,
Go, C, C++, and Rust.
All language differences are isolated behind two abstraction layers:
- **`lang_parser`** — a tree-sitter–based parser module giving the
encoder uniform code-structure and dependency extraction.
- **`decoder_lang` backends** — one backend per language encapsulating
file layout, entry points, test commands, code structure, and build
environment; every decoder stage (plan / codegen / verification) goes
through these backends.
### Encoder
- New standalone `lang_parser` module (tree-sitter backend + 7 language
parsers/configs) wired into the RPG / dep-graph / encoder pipeline.
- Language metadata flows through `refactor_tree` `NodeMetaData`;
`rpg.json`'s `meta.language` reflects the real repo instead of always
`python`.
- Dominant-language detection; `add_file` and semantic re-runs dispatch
per language; non-Python class-like units normalized.
- `rpg.json` single source of truth (dep_graph embedded); atomic writes
eliminate half-written files.
- C/C++ calls resolve to the definition, not the header prototype; scan
exclusions centralized and per-commit LLM exclusion dropped (perf).
### Decoder
- Seven language backends with a unified protocol: entry points, test
commands, inheritance, code structure, build env, unit-kind.
- **Planning**: language metadata flows through feature spec → build →
tree → skeleton → interfaces → tasks; interface design/review works for
every language with language-neutral prompts; non-Python files ordered
by real imports, not Python AST.
- **Code generation**: codegen / post-verify / global-review /
subtree-review / final-test all route through the backend and use native
test commands (go test, npm, cargo, ctest, …); non-Python projects no
longer emit Python files or run venv/pip setup.
- **Verification**: on-disk source fallback for language resolution;
zero-test "no-op pass" rejected; bounded repair loop in final-test;
unified git branch-name sanitization.
- **Entry coordination**: `<MAIN_ENTRY>` and the skeleton entry are
reconciled across all 7 languages to avoid a duplicate `main`.
- **Interface review** (final fix): unit-level and feature-level orphan
checks unified into a single shared predicate, removing spurious WARNs
on framework roots/factories/callbacks; entry-point name matching
normalized (`RunMain` ↔ `function RunMain`).
---------
Co-authored-by: Qingtao Li <qingtaoli@microsoft.com>
0 commit comments