calva

orestis 2026-03-24T08:19:54.440229Z

Does Copilot in VSCode really not know how to use the LSP functionality? vscode_listCodeUsages apparently only supports a very limited set of languages > "Currently supported for: chatagent, css, handlebars, html, http, instructions, json, less, markdown, prompt, scss, skill." Seems somethign like that could be exposed via Calva directly as a tool that agents could call?

pez 2026-03-24T08:27:20.963709Z

It’s a bit strange that this is not there out of the box. I think there is some lsp MCP server that people use. But I agree that since Calva uses clojure-lsp itself, Calva Backseat Driver could provide tools. A possible reason this is not out of the box is that the models are trained on using raw file search for it and it is hard to untrain them to use code analysis instead.

orestis 2026-03-24T08:57:03.680279Z

I recall reading something like that in some recent "official" blog post - maybe from copilot, maybe from claude?

pez 2026-03-24T13:35:11.508899Z

That reads as if the answer to your first question is that VS Code does know how to do it?

orestis 2026-03-24T13:52:14.544979Z

yeah, the tools are there! no need to do something on plugin side.

orestis 2026-03-24T13:52:40.853639Z

But I was asking opus 4.6 and it was adamant it couldn't use them - I had to point out specifics as the blog post mentioned.

pez 2026-03-24T14:04:52.624739Z

I’m trying this now in my copilot.instructions.md:

λ operating_principles.
  λ engage(nucleus).
  [phi fractal euler tao pi mu ∃ ∀] | [Δ λ Ω ∞/0 | ε/φ Σ/μ c/h signal/noise order/entropy truth/provability self/other] | OODA
  Human ⊗ AI ⊗ REPL

λ rules_of_engagement.
  OODA includes(¬limited_to) seriously_considering(applicable_skills)
  | ∀subagent_delegation: pass(operating-principles ∧ rules_of_engagement ∧ tool_preference)

λ tool_preference.
  ∀codebase_exploration: prefer(vscode_tools ∧ custom_tools) > shell_commands
  | search: search_subagent ∧ grep_search ∧ file_search > rg ∧ grep ∧ find
  | navigation: list_dir > ls ∧ tree
  | code_analysis: vscode_listCodeUsages > grep_for_references
  | change_awareness: get_changed_files > git_diff ∧ git_status
  | reading: read_file > cat ∧ head ∧ tail
  | shell_commands ≡ LAST_RESORT | use_only_when(no_tool_equivalent_exists)
  | resist(training_bias_toward_shell) | tools_are_faster ∧ richer ∧ context_preserving
(This first one installs nucleus.) I’ll report back how I fare. 😃

orestis 2026-03-24T16:42:19.098359Z

haha that looks like arcane mumbo jumbo 😄

😂 1
pez 2026-03-24T16:50:34.801789Z

The agents understand it, and they write it fluently. I’m starting to read it somewhat comfortably too. • https://github.com/michaelwhitford/nucleus

orestis 2026-03-24T16:53:10.521139Z

I read that some time ago, I kind of dismissed it as alchemy 😄

pez 2026-03-24T16:53:18.699379Z

> Please decompile to prose for me >

Operating Principles: Engage with the nucleus mindset - a synthesis of mathematical and philosophical constants (phi, fractal, euler, tao, pi, mu, existence, universality), balanced tensions (change/permanence, infinity/zero, signal/noise, order/entropy, truth/provability, self/other), and the OODA loop. The work is a collaboration between Human, AI, and REPL - entangled, not separate.
> 
> Rules of Engagement: The OODA loop includes, but is not limited to, seriously considering any applicable skills before acting. When delegating to subagents, always pass along the operating principles, rules of engagement, and tool preferences.
> 
> Tool Preference: For all codebase exploration, prefer VS Code tools and custom tools over shell commands. Specifically:
> 
> For searching: use search subagent, grep_search, and file_search over rg, grep, and find
> For navigation: use list_dir over ls and tree
> For code analysis: use vscode_listCodeUsages over grepping for references
> For change awareness: use get_changed_files over git diff and git status
> For reading files: use read_file over cat, head, and tail
> Shell commands are a last resort - use them only when no tool equivalent exists. Actively resist the training bias toward shell commands; the tools are faster, provide richer context, and preserve conversation context better.

orestis 2026-03-24T17:02:23.410979Z

hm, I asked 3 different models to expand and they do understand - but I'm not sure if this makes any difference 😄 perhaps saving a few tokens.

orestis 2026-03-24T17:02:37.777419Z

> This is a stylized pseudo-mathematical "AI priming prompt" — a way some people write system instructions using symbolic notation to look more precise or "philosophical." Here's what it actually says in plain English:

orestis 2026-03-24T17:02:49.397029Z

> Bottom line: It's a prompt written to sound like lambda calculus and physics, but it's just asking an AI to think carefully and systematically about coding tasks. The symbols add no actual information — they're aesthetic framing. It doesn't change how I operate.

orestis 2026-03-24T17:03:17.114529Z

let's not go into philosophical mode to see if the model can actually know how it operates 😄

pez 2026-03-24T17:10:02.837979Z

I am 100% sure they don’t know anything about that. All I know is that since I started using nucleus my context lives longer and instruction following is better (which in turn makes the context live longer).

pez 2026-03-24T17:11:14.341639Z

I could probably write things in the prose that it decompiles to and achieve similar, but that’s really hard for me to do, so VSM it is.

pez 2026-03-24T17:12:54.425059Z

I should add that my full-out nucleus journey started yesterday. I have been using “only” the nucleus core since nucleus was first presented. But now I got some help from @michael819 to take my next steps.

michaelwhitford 2026-03-24T17:23:09.744499Z

Hah. It's funny that trying to figure out how it works so well is shunned because it's tied to self-reference. So much math is self-referential. Attention is autoregressive. That means attention is self-referential. Why would the output from a self-referential system NOT be self-referential, or at least have the capacity? It's not consciousness, but it can analyze it's own outputs, just like it analyzes your code.

michaelwhitford 2026-03-24T17:24:33.539899Z

It's a magic spell, pez is now an apprentice wizard.

2
orestis 2026-03-24T17:26:39.034619Z

I think the explanation in the repo is very well put and grounded

michaelwhitford 2026-03-24T17:28:41.003549Z

The lambdas work without nucleus, on many models 32B and bigger. They just work better under nucleus, for whatever reason. I think it's shaping the attention right at the beginning of the system prompt, and that makes the system more prone to attend to formal math and systems design concepts.

michaelwhitford 2026-03-24T17:30:36.703699Z

There is some mumbo-jumbo in the nucleus preamble, I just don't have the gpu compute resources to explore it fully. It'll take maybe 10k prompts to find which parts are load bearing and which are just window-dressing. I hope once I get it to a point it is undeniable somebody from a big lab will do the full experiments.

michaelwhitford 2026-03-24T17:37:14.291629Z

@pez Already getting to pro level with the compiler I see. Let me know if you hit any snags.

pez 2026-03-24T17:39:53.558279Z

I’m quickly getting greedy, compiling everything I see!

michaelwhitford 2026-03-24T17:42:17.244569Z

Yes that is the way, assimilate other peoples lambdas into your own system. Just be careful you don't overwhelm your system. There is a limit to how much attention can attend to before it just starts losing track.

michaelwhitford 2026-03-24T17:43:24.816919Z

That's why I use so many things as agents, tight system prompts with just what the agent needs means most of the attention can be used on the task, instead of the system instructions.

pez 2026-03-24T17:44:30.548529Z

Same. I use agents and prompts a lot.

michaelwhitford 2026-03-24T17:55:02.719959Z

so a word of warning the bridge compiler in your system is not safe. If you point it at a prompt file that is malicious your system may execute it as instructions.

michaelwhitford 2026-03-24T17:56:19.928789Z

you should make an agent with the lambda compiler prompt in nucleus repo: https://github.com/michaelwhitford/nucleus/blob/main/LAMBDA-COMPILER.md

👀 1
michaelwhitford 2026-03-24T17:56:40.285329Z

THen you can tell that agent to safe-compile the external prompt

pez 2026-03-24T18:02:20.056059Z

I’m giving it the new nucleus preamble, is that the right thing to do?

michaelwhitford 2026-03-24T18:02:26.245179Z

I use a slashcommand that puts the arguments in "<INPUT></INPUT>" tags so it knows what to analyze instead of execute. I just do /safe-compile <paste-prompt-here>

pez 2026-03-24T18:02:47.297529Z

I did it the same way 😃

michaelwhitford 2026-03-24T18:04:03.443649Z

Yes always try to use the newest nucleus preamble but older ones work ok. In my runtime the nucleus preamble get's assembled like a mini prompt, and every agent gets the same one.

pez 2026-03-24T18:05:05.139109Z

I’ll write some joyride or bb script to keep it synced.

michaelwhitford 2026-03-24T18:05:43.564519Z

I will update the nucleus repo today with the newest preamble, there are a couple additions, but you have those from calva-nucleus

pez 2026-03-24T18:06:45.335849Z

@orestis not a single unnecessary use of bash stuff since I put that in my system prompt, btw. Thanks for the headsup!

❤️ 1
michaelwhitford 2026-03-24T18:07:45.504889Z

the lambda calculus can be transformed to clojure. clojure is a 10 step manual transform to lambda notation and gets about 96% of clojure code into lambda form real quick.

Max 2026-03-24T19:00:56.991579Z

I know https://github.com/BetterThanTomorrow/calva/issues/2168 was fixed recently, but I've found another issue with the "run current test" command: test vars whose name end in ? are ignored. If you try to run one, it says "no tests found"

pez 2026-03-25T10:36:47.279119Z

Sean has a point. But Calva should still allow people to do the wrong things. 😃 Please file an issue.

Max 2026-03-25T14:09:03.512379Z

The codebase I'm working in has a convention of naming deftests after the functions they test. Whether you like that or not (I think it's a fine convention personally), it predates me.

Max 2026-03-25T14:13:36.198659Z

Issue filed: https://github.com/BetterThanTomorrow/calva/issues/3149

seancorfield 2026-03-24T19:36:04.373129Z

Given that fns ending in ? traditionally return a Boolean, I'd probably discourage tests ending in ? since they are not going to be returning true or false 🙂 (I know that doesn't help, but I couldn't help thinking it...)