Created
July 1, 2026 16:25
-
-
Save mgreenly/504b1f90d460841b1628502687e87cb8 to your computer and use it in GitHub Desktop.
A continue, next, done ralph loop in codex with the /goal command (external cursor)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /goal Advance the gather -> build -> verify prompt cycle until DONE (verify wraps | |
| back to gather), using ./project/prompts/cursor.md as the durable current-step | |
| marker. Each iteration: read cursor.md for the current step; if it is missing or | |
| empty, the current step is gather. Spawn a Codex subagent to read and execute that | |
| step's prompt file (./project/prompts/{gather,build,verify}.md); it ends by | |
| emitting a single JSON object of the form {"status": ..., "message": ...}. Parse | |
| its "status" and relay its "message" so progress stays visible, then act: | |
| CONTINUE -- leave cursor.md unchanged and continue the goal with the same step. | |
| NEXT -- write the next step in the cycle to cursor.md and continue the goal. | |
| DONE -- delete cursor.md and stop the goal. If a subagent fails, or its final | |
| output is not a JSON object carrying a "status" of exactly CONTINUE, NEXT, or | |
| DONE, stop and surface the raw output -- never guess a status, and leave cursor.md | |
| unchanged. You are only the orchestrator: you read and write cursor.md for | |
| bookkeeping, but never read the prompt files themselves -- subagents read and | |
| execute those. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment