Content pfp
Content
@
https://warpcast.com/~/channel/aichannel
0 reply
0 recast
0 reaction

Matt Galligan pfp
Matt Galligan
@mg
Watching my AI agents go crazy just to locate a single line of code  felt like hunting for a **needle in a stack of needles**. 🔍 🔍 🔍🤬 So I whipped up a little experiment called grep-anchors or "grepa". Just drop ":ga:<text>" anchors in comments and your tools (or agents) *teleport* to the right spot. Like the TODO's and FIXME's before, but with some conventions for predictability (and composability). 🚢 Early days, but I’m already seeing way fewer fruitless tool calls!
8 replies
9 recasts
69 reactions

ASM pfp
ASM
@asm.eth
Is the theory here that it just scans for the anchors and once it finds the correct anchor text it parses that portion of the code? Pretty cool idea
1 reply
0 recast
0 reaction

Matt Galligan pfp
Matt Galligan
@mg
Basically! But I'm putting together a CLI tool, and scripts that will streamline it a bunch. So you'll be able to do `grepa inventory` and quickly get all tags, sort by frequency of use, see the files that have them as well as the string that follows the tag. Should make finding stuff lightning fast.
1 reply
0 recast
1 reaction

ASM pfp
ASM
@asm.eth
Yea that’s dope — I wonder if you could do like a ‘grepa init’ that could do an indexing and sort of automatically add anchors and comments 🤔
1 reply
0 recast
0 reaction

Matt Galligan pfp
Matt Galligan
@mg
That's the plan! Likely would need to be powered by AI, but a grepa MCP server / set of rules files could solve for that.
0 reply
0 recast
1 reaction