Remix.run Logo
hakanderyal a day ago

I have rule files that guides the agent towards my coding standards, code style, house rules etc. They alone cost 60-80k tokens, and they are the backbone of my system that prevents slop. Pre 1M context, I had to build complicated tooling to re-include the relevant docs to the context upon compaction, which relied on unstable transcription file format, which was a pain to maintain. With 1M context I deleted all of those. Nowadays most of my sessions uses 300-450k context.

Another thing that's preventing me from trying Codex. (the other is @ referencing files not auto including them to the context)

1M should be table stakes for frontier models at this point for programming.

yearolinuxdsktp a day ago | parent [-]

Try running your rule files through an LLM for optimization. 60k-80k tokens is massive.

Funnily enough, most anti-slop skills I found are both way too verbose and miss some common slop constructs.

I also reduced many rules from “When doing X, don’t do Y, but do Z.” Instead, the rule is “When doing X, do Z.” Fewer tokens and often works better.

I had one critical rule I was maintaining about searching the codebase using a structural index/graph and not grep. Every time the agent missed it, I asked it how to improve the rules. Eventually, I asked the AI to review that rule file and it rewrote it to be 30% smaller, but, crucially, structured to be more understandable by the LLM.

Another helpful thing was to ask AI to review my rules for things it can load on-demand when it works in that area.

hakanderyal a day ago | parent | next [-]

It’s optimized to death. Every word, every comma. I have a rule file for writing rule files.

Problem stems from using my own abstractions instead of common frameworks.

For a full stack session, backend + front end + docs about the part we are working on adds to that amount.

I’ve accepted it because it results in code exactly the style I would’ve written. It’s a good tradeoff to cut off the slop.

wonnage 18 hours ago | parent | prev [-]

AI cannot tell you why it did something. If you ask it why it didn't do X even though your prompt said so, it can come up with some plausible sounding explanation, which might even be correct, but there's a fundamental impedance mismatch between giving you the most plausible sounding answer and actually grounding that in knowledge of how it generated that answer.

TBF having a 60k personal style guide is also a bad idea, people get borderline AI-psychosed about how their special prompts are really steering the AI when in reality there is no way to evaluate this stuff. You invariably end up trying to define your style in terms of what it is and it isn't, it's like trying to define "red". "follow the style of my 5 most recent PRs" works pretty well.