Settings

Theme

Ask HN: Why don't LLM harnesses enable/expose custom middleware hooks?

8 points by fur-tea-laser 9 days ago · 10 comments · 1 min read


I want to be able to execute a prompt derived from a piece of structured data (JSON) by transforming it into markdown and decorating it at prompt-time, without building my own infrastructure around or alongside the harness...

Zambyte 8 days ago

https://pi.dev specifically prides itself on having many extensions hook points. Is that one you've looked at? If so, it might be something they'd be willing to add a hook for if you open an issue.

coreyp_1 9 days ago

I am writing my own harness, and I would love to hear more about what you have in mind.

Can you give an example of your use case?

  • fur-tea-laserOP 9 days ago

    i have a bunch of md templates at my disposal, which serve as the basis for my prompt toolbelt... these templates are populated and crystalized with concrete json instances... the json instances are tailored & scoped for various tasks... currently i have to synthesize a bunch of markdown artifacts that pollute my project directory and are at risk of becoming stale and out-of-sync... prompt-time middleware hooks that allow me to transform a json file into my final markdown prompt would alleviate these issues and improve developer ergonomics...

    • coreyp_1 8 days ago

      Yes, that sounds like something that a harness would do internally, but not expose. My own project will do something similar for spinning off worker agents. You could expose it, however, by (1) a custom MCP server that assembles and provides the result directly into the context, or (2) see if you can wrangle the skill feature of an existing harness.

      The newer models are nice, but the harness is the secret sauce that can make or break the experience. I wish we had better open tools for using/modifying these types of things.

pradeep1177 7 days ago

I've been pondering over the same question, but also on an enterprise scale. For example, how could I scrub the customer data, like name, domain, etc., before sending it to LLM if my Claude code is using some MCP to fetch and debug an issue?

I mean, hooks are nice, but they are messy to manage/operate for many developers at a time.

https://github.com/softcane/cc-blackbox I started investigating the proxy path, which I think would be useful for such scenarios.

high_byte 9 days ago

that's sort of what skills are.

create a skill that transformed the json then "/<skill> <prompt>"

cheekygeeky 9 days ago

They do. See: Claude Code leak.

  • fur-tea-laserOP 9 days ago

    can you expand? i'm looking, but havent come across anything along the lines of what i want

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection