[ANN] tricorder - a new development tool for Haskell and LLMs

Hey everyone,

for those of you who don’t know me, my name is Christian and I’m an engineer at Tweag.

I am very pleased to announce the very first release of tricorder! :tada:

tricorder has been my daily driver for Haskell development for months now. It works really well as a standalone replacement for ghcid or ghciwatch with some features that make it very attractive:

  • Multiple component support and auto-discovery out of the box.
  • A daemon that builds the code in the background and serves as the backend for any number of TUI/CLI sessions so nothing gets built twice.
  • A TUI with different levels of detail: overview, test failures, complete test output.
  • Configurable hotkeys, mouse scrolling support.

However, it really shines when pair programming with an LLM agent. The included CLI surfaces build information in a way that is context-aware and reliable, so the feedback loop is very tight:

  • tricorder status –wait will wait until the current build cycle is done and return diagnostis - warnings, errors, test results.
  • tricorder status –expand N zooms in on a specific diagnostic whenever more information is needed.
  • tricorder source Dependency.ModuleName#functionName will attempt to retrieve the source code for a specific function so the agent can verify APIs instead of hallucinating them. Omitting the #functionName will return the entire contents of the module.

The CLI is mostly for agents to consume, though, with the familiar TUI being the dashboard for developers.

A picture is worth a thousand words, so here’s a moving one, quickly demonstrating the TUI and using tricorder with an agent (invoking the included /tricorder skill):

tricorder-demo

Please check the README for installation instructions. (Discourse won’t let me post more links)

Tricorder is fully built in Haskell using the atelier toolkit, which was extracted from a project I built at Tweag since my colleagues and I liked the structure and ergonomics of algebraic effects so much.

I’m looking forward to hacking on tricorder with more people in person tomorrow at ZuriHac and welcome any and all feedback!

Special thanks to Victor Bakke who’s been my sparring partner (and the other maintainer of tricorder/atelier) and Aleksandr Vershilov for supporting the project on Tweag’s side! :slight_smile:

24 Likes

It seems to be a normal cabal multi-package project. As evidenced by cabal.project.

Looking at the Nix, it uses haskell.nix which itself runs the solver etc. So I wouldn’t be surprised if you could run cabal-install on this project without Nix’s involvement.

tricorder is also available on hackage, so you can do:

cabal update
cabal install tricorder

It should work! If it doesn’t let me know. No nix necessary!

2 Likes

Thanks, it would be great if it could be mentioned in readme.

1 Like

Looks like an awesome tool! +1 on @bmobn00b s comment the readme implies “Nix or go away”

README updated to include cabal installation options:

Any feedback is welcome!

2 Likes

The idea of having a separate daemon that the LLM can query is very neat!

In the demo, you explicitly use the /tricorder command to invoke tricorder. I guess you can also say something like “Use tricorder for getting compilation errors” in the session to activate the skill?

Multiple component support and auto-discovery out of the box

Does it mean that it tries to use multiple home units by default?

The executable this creates is called tricorder-exe. Perhaps it should be simply tricorder?

fwiw, I managed to compile it for GHC 9.14.1 by --allow-newer the base, template-haskell, containers and time packages.

1 Like

Does it mean that it tries to use multiple home units by default?

Yes, that’s correct!

The executable this creates is called tricorder-exe. Perhaps it should be simply tricorder?

Whoops! I just released version 1.0.0.1 that is actually called tricorder. Thanks for catching it!

Have you tried running it for an existing project? I’m at ZuriHac and found a case where a module using a custom GHC plugin does not reload correctly. This is going to be a great stress test for the tool :slight_smile:

1 Like

looks nice only two things:

  1. minor thing .. should have also support for other coding agents like opencode
  2. … , base ==4.20.* and all deps in this format for exact ghc version and all other libs versions pretty much limiting usability anywhere :frowning:
4 Likes

This is very cool! The server-client approach for managing a GHCi session is neat.

One thing ghciwatch and ghcid both do is supporting eval comments - -- $> execute this code will execute that code in the context of the module. We use this for selectively running tests (ie -- $> hspec spec) so we don’t have to compile/build the entire test binary. Does tricorder plan on supporting this?

Hey, thanks for the feedback!

  1. I’ll look into making skills agent agnostic, but for a friend we simply instructed codex to adapt the provided skill file and it worked perfectly afterwards - so you can also try that in the meantime.
  2. We’re expanding our CI to test versions 9.8 - 9.14 and will publish a new version soon relaxing these constraints. I’ll update you here when it happens.

Hey Matt,

This is something I always had in the back of my head but never really wrote it down - so thanks a lot for opening the issues!

I’m using it! So far so good - thanks for making it!

1 Like