frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Brf.it – Extracting code interfaces for LLM context

1•jeff-lee•1h ago
I've been experimenting with ways to make AI coding assistants more efficient when working with large codebases.

The problem

When sharing repository context with LLMs, we often give them everything: full files, implementation details, comments, etc. But for many tasks (like understanding architecture or navigating a repo), the model doesn't actually need most of that.

This creates two problems.

* unnecessary token usage * noisy context that can obscure the structure of the codebase

The idea

Instead of sharing the full implementation, what if we only shared the interface surface of the code?

Function signatures, types, imports, and documentation. Basically the parts that describe how the system is structured rather than how every function is implemented.

The experiment

I built a small CLI tool called Brf.it to test this idea. It uses Tree-sitter to parse source code and extract structural information, producing a compact representation of the repository.

Example output:

  <file path="src/api.ts">
    <function>fetchUser(id: string): Promise<User></function>
    <doc>Fetches user from API, throws on 404</doc>
  </file>
In one simple comparison from a repo:

* original function: ~50 tokens * extracted interface: ~8 tokens

The goal isn't to replace sharing full code, but to provide a lightweight context layer that can help with things like:

* architecture understanding * repo navigation * initial prompt context for AI agents

The idea was partly inspired by tools like repomix, but Brf.it takes a slightly different approach. Instead of compressing the full repository, it extracts only the API-level structure.

Language support so far:

Go, TypeScript, JavaScript, Python, Rust, C, C++, Java, Swift, Kotlin, C#, Lua

Project:

https://github.com/indigo-net/Brf.it

Docs:

https://indigo-net.github.io/Brf.it/

Curious if others have experimented with similar ideas.

What information do you think is actually essential for LLM code understanding?

Are function signatures and docs enough for architecture reasoning?

Are there formats that work better for LLM consumption than XML or Markdown?

Comments

guerython•1h ago
Brf.it's interface-first angle resonates. We built a little service-map pipeline that uses tree-sitter to dump exported functions, public types, and a lightweight dependency graph before hitting the model. Instead of XML I emit one line per symbol (`module::symbol | signature | return | doc`) so the agent sees the shape of the repo without the implementation noise and the dependency graph gives it enough flow context to answer architecture questions. When I combine that dump with the docstrings and a list of entry points, Claude (or any agent) routes to the right files in one shot. Do you plan to bake the graph metadata into the interface output or keep it as a separate layer?

Books and Blogs (2017)

https://stratechery.com/2017/books-and-blogs/
1•herbertl•2m ago•0 comments

Find roles, meetups, and bounties that showcase what you can do–now, not later

https://earlygrad.com
2•M0HD197•4m ago•2 comments

Show HN: AlliHat – Claude on Safari

https://allihat.com
1•nate•4m ago•0 comments

Tech Layoffs Are Not About AI: An Insider View from a Former Amazon Manager [video]

https://www.youtube.com/watch?v=uyCcgG4nm90
1•DeathArrow•9m ago•0 comments

Workaround to get a functional search bar on a stock Google Pixel homescreen

https://listed.to/@Balias/70754/pixel-persistent-google-search-bar-workaround-if-you-use-another-...
1•prism56•10m ago•1 comments

Berkson's Paradox

https://en.wikipedia.org/wiki/Berkson%27s_paradox
1•scapecast•12m ago•0 comments

Apple's 512GB Mac Studio vanishes, a quiet acknowledgment of the RAM shortage

https://arstechnica.com/gadgets/2026/03/apples-512gb-mac-studio-vanishes-a-quiet-acknowledgement-...
1•reenorap•16m ago•1 comments

Update Your Favicon in Search Results

https://crawler.sh/blog/how-to-force-google-to-update-your-favicon/
1•mehmetkose•17m ago•1 comments

Full Stack Claude with VS Code Workspaces

https://twitter.com/BosonJoe/status/2030300175969698266
1•banjoe•18m ago•0 comments

Ageless Linux

https://goblincorps.com/ageless-linux.html
1•validatori•18m ago•0 comments

Why Brave is opposing Google's Android developer registry

https://brave.com/blog/keep-android-open/
3•XzetaU8•22m ago•0 comments

Rewriting Our Database in Rust

https://medium.com/airtable-eng/rewriting-our-database-in-rust-f64e37a482ef
1•eatonphil•23m ago•0 comments

During WWI, a daredevil pilot helped invent the first 'drones'

https://www.popsci.com/technology/drones-autopilot-invented-wwi-lawrence-sperry/
1•Brajeshwar•23m ago•0 comments

A unicorn-like Spinosaurus found in the Sahara

https://arstechnica.com/science/2026/03/a-unicorn-like-spinosaurus-found-in-the-sahara/
1•Brajeshwar•23m ago•0 comments

We have more privacy controls yet less privacy

https://www.bbc.com/news/articles/c4gj39zk1k0o
3•Brajeshwar•23m ago•0 comments

AI Accelerator Open-source platform for running AI systems in production

https://pypi.org/project/ai-accelerator/
1•Ayoubstudent•26m ago•0 comments

Never Snooze a Future

https://jacko.io/snooze.html
2•lukastyrychtr•26m ago•0 comments

Show HN: How to train and run models with RL Envs

https://astrofolio.pages.dev/blog/rl-env/
1•vrn21•30m ago•1 comments

Best Monitoring and Observability Platform?

1•kebforlifer1•31m ago•1 comments

Show HN: BunnyNet – A Modern Java SDK for BunnyCDN Storage

https://github.com/range79/bunnynet-lib
2•range79•32m ago•0 comments

Algorithm names are the new cognitive activators. Your vocabulary is your tool

https://sderosiaux.substack.com/p/algorithm-names-are-the-new-cognitive
1•chtefi•33m ago•0 comments

Plan management patches for Postgres 19

http://rhaas.blogspot.com/2026/03/pgplanadvice-plan-stability-and-user.html
1•biehl•36m ago•0 comments

Show HN: Fingerprinting Text Embedding Models via Floating-Point Artifacts

https://colab.research.google.com/drive/1CTFltQrHRTViYSs3JLrwC4leSTWIrPc9
1•yantrams•36m ago•0 comments

Cutie Fly: CuTe Layout Representation and Algebra, CuTeDSL, FlyDSL

https://ianbarber.blog/2026/03/06/cutie-fly/
2•matt_d•38m ago•0 comments

Same ladder, different game: Why working harder stops working

https://www.atbrakhi.dev/blog/why-working-harder-stops-working
1•atbrakhi•43m ago•0 comments

Show HN: VaultIt – an app to save kids' artwork and memories without the clutter

https://vaultit.kids
1•GoodRoots•43m ago•0 comments

AST-filtered eval() is not a sandbox: Severity 10 CVE-2026-26030, and others

https://daridor.blog/2026/03/05/ast-filtered-eval-is-not-a-sandbox-remote-code-execution-in-micro...
1•beagle3•44m ago•0 comments

OdinTools

1•OdinTools•48m ago•0 comments

Why the AI Discourse Cannot Ask Who Bears the Cost of Automation

https://eventuallymarching.substack.com/p/the-last-rung
1•mridlll•49m ago•1 comments

Ember 6.11 Released

https://blog.emberjs.com/ember-released-6-11/
1•thunderbong•50m ago•0 comments