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

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...

8 points | by fur-tea-laser 1 day ago

4 comments

  • Zambyte 8 hours 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 23 hours 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-laser 19 hours 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 13 hours 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.

  • high_byte 14 hours ago
    that's sort of what skills are.

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

  • cheekygeeky 22 hours ago
    They do. See: Claude Code leak.
    • fur-tea-laser 19 hours ago
      can you expand? i'm looking, but havent come across anything along the lines of what i want