svkozak/pi-acp — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small TypeScript adapter that lets an ACP compatible editor, especially Zed, use the pi coding agent as an external agent. It should speak ACP JSON RPC over standard input and output, start pi --mode rpc in the background, and translate requests, responses, and events both ways so chatting with pi in the editor feels smooth.

I want streaming assistant output, tool call updates, and useful file locations when pi edits or references files, including best effort line numbers and structured old versus new text for edits when possible. Please support session persistence so I can reopen past chats, plus slash commands loaded from user or project prompt files and a few built in commands for things like compacting, exporting, naming sessions, and switching model or thinking mode. Include registry friendly terminal login support too.

Keep it MVP and practical. It is fine if local file and terminal work stay inside pi instead of ACP. Look up current ACP and pi docs online if you need to.

Want more depth? Deep Reverse