I replaced every function in a codebase with English – it still works

Tril converts every function in a repo into plain English descriptions, then runs and tests them — using an LLM as the interpreter instead of a runtime. The concept: programming languages exist because machines couldn't understand human intent. LLMs can. So what happens if you remove the code entirely and just... describe what each function should do? The tool replaces functions one by one, runs your test suite after each swap to confirm nothing breaks, and outputs a .md file. Then `tril run` spins up an HTTP server that sends each function's English description to Claude and returns the result. Tested on a unit converter (JS) and a 625-line Python CLI tool — tests passed, results matched to 6 decimal places (fortunately). This is mainly a thought experiment: can any code become plain natural language? Will it still work? Let's find out! npm: npx @sliday/tril convert https://github.com/your/repo GitHub: https://github.com/sliday/tril

  • AI 에이전트
  • 대형 언어 모델
  • 오픈 소스

AI 요약

Tril is a tool that converts code functions into plain English descriptions and uses an LLM to interpret and execute them. It replaces functions one by one, running tests after each change to ensure the codebase remains functional.

추천 대상

Developers exploring LLM capabilities in code interpretation, Researchers investigating natural language programming, Teams experimenting with code abstraction

중요한 이유

Tril enables a codebase to function using natural language descriptions interpreted by an LLM, serving as a proof of concept for LLM-driven code execution.

주요 기능

  • Converts code functions into plain English descriptions.
  • Uses an LLM as an interpreter instead of a traditional runtime.
  • Replaces functions one by one and runs test suites to ensure functionality.
  • Outputs a Markdown file documenting the English descriptions.

사용 사례

  • A software developer could use Tril to quickly generate documentation for their existing codebase. By converting functions into plain English, the tool can create human-readable descriptions that can be easily integrated into project documentation, saving developers time on manual writing.
  • For educational purposes, an instructor could employ Tril to demonstrate the underlying logic of code to students. By translating complex functions into natural language, students can grasp the intended behavior of code without needing to be proficient in a specific programming language.
  • A product manager or technical writer could leverage Tril to understand the functionality of a legacy system without needing deep programming expertise. The tool's ability to describe functions in English allows for a more accessible review of code, facilitating better communication between technical and non-technical stakeholders.