ofa14-prog/Loop ? reverse-engineered prompt
Reverse engineered prompt
Build me a TypeScript tool called LoopGuard that watches OpenTelemetry traces from an autonomous agent and tells me when it looks stuck or is wasting time.
I want it to catch repeated tool calls, no progress loops, bad arguments showing up over and over, and sudden token cost spikes, then turn that into a simple health score from 0 to 100. It should accept trace data over HTTP, work with both JSON and protobuf, and expose a health check and metrics endpoint too.
Please include a small terminal dashboard that shows the current score, recent spans, and live verdicts, plus a way to export results as NDJSON and JUnit XML for CI. It should also have a CLI so I can run it in server mode, evaluate a saved trace file, or generate a report. Keep the core logic dependency free if possible, and add tests so the main detection rules are covered. If you need to check anything, look up current docs online.
Are you gonna build this?
make sure you review the code using coderabbit