ZCoP: The Plan That Rewrites Itself
Keywords: Zero Chain of Prompt · LLM planning · task decomposition · definition of done · agentic AI · context engineering · orchestration
Most attempts to make a language model do real work fail in the planning, not the execution. You hand the model a fat goal, it produces a confident wall of steps, and then it marches down that wall even as the first step teaches it the third step was wrong. The plan was written when the system knew the least, and it never gets revised. By the time the work is done the plan describes a project nobody is doing anymore.
ZCoP, Zero Chain of Prompt, is the doctrine I wrote to fix that. The first version is in my notes by February 2024; the full template, the one I still use, dates from October 2024. It grew up alongside the agent frameworks of 2023, and further down I place it among them.
The mechanic fits in a sentence. ZCoP drafts the whole roadmap up front (goal, tasks, subtasks, a definition of done and a prompt for each), then trusts only the next step and regenerates the table after every step it executes, so everything past the current step stays a draft. This is the Architecture series, so I will give you the blueprint, not the war story.
Zero, chain, prompt, table: what the name says
Zero is zero-shot: the model gets no worked examples. In May 2022 Kojima and colleagues added one sentence, “Let’s think step by step”, and InstructGPT’s accuracy on the MultiArith word problems rose from 17.7% to 78.7%, with no examples at all (Kojima et al., 2022). That was one model on arithmetic; chain of thought itself had arrived that January, with worked examples in the prompt (Wei et al., 2022).
Chain of prompt is the next move. A chain of thought reasons its way to one answer; a chain of prompts writes the instruction for every step of a longer job, each one built on what the steps before it produced. In February 2024, choosing a method for a research paper, I put it like this: “we are not only making the zero chain of thoughts (step-by-step thinking about the task), but also adding Zero Chain of Prompts (= the best out-of-the-box instructions to the large language model of how to achieve the Goal sequentially, while having all tasks interconnected).” The name on that page was longer: Tab-ZCoP-ZCoT.
Tab is the table, the heart of the thing: “as a cherry on the top = tabular format of an output, that helps an LLM to build intercorrelation and reasoning not only vertical, but horizontal as well.” Read down a column and you follow one property across every task; read across a row and you see one task whole. A 2023 paper, Tab-CoT, had shown that a table helps zero-shot reasoning, modestly: with one model it beat the best ordinary chain of thought on five of six arithmetic tasks, by 2.2 points on average (Jin and Lu, 2023). My February version capped the plan at “6 tasks maximum with unlimited number of subtasks”.
Initiation: refuse to start until the goal is written down
Garbage goal, confident garbage plan. The most underrated work happens before a single task is broken out.
The first move is to pin the end goal in plain words: target outcomes, key deliverables, desired impacts. If the person asking has no clear vision yet, the system asks three questions: who is the beneficiary, what deliverables should the work produce, and what impact counts as success. Then it writes the goal back in one sentence and waits for confirmation before it builds anything.
This sounds like a courtesy. It is a load-bearing gate. A goal you cannot state in one confirmable sentence is a goal you cannot define done against, and a plan with no definition of done is a plan that will run forever. My template calls the target “one COMPLETE PICTURE = Definition of Success for the Sum of all goals”.
The Prompt Roadmap: a table with done at every node
ZCoP breaks the goal into three levels with one skeleton. The goal has a description, its reasoning, a definition of done, acceptance criteria and a progress bar: tasks done over tasks planned. Tasks, the epics, and subtasks, the features, each have their own definition of done, a prompt, and the facts to surface or ask the user for.
The status column is where the design earns its keep. A node in flight records its next actions and its missing values. A finished node collapses to its key elements, its atomic facts and a one-line summary, and the plan stops carrying its working context.

Take a small job: pick a support-chatbot vendor, done when the head of support signs a one-page shortlist of three. Two of seven subtasks in, the ticket analysis has shrunk to three ticket types and two facts, and the budget to one line. The live row is the data rules. Its next action is to send yes-or-no questions to legal; its missing value is where customer data may live. Tasks two and three are drafted, each with its own definition of done. Nobody trusts them yet.
That compression does real work. Models use information at the start and the end of a long context better than in the middle (Liu et al., 2024), one of the cracks every mind shares, and a plan of facts stays short. Scrum defines done as “a formal description of the state of the Increment when it meets the quality measures required for the product” (Schwaber and Sutherland, 2020). ZCoP puts one on every row.
Draft everything, believe only the next step
A naive planner writes the whole tree and executes it frozen. ZCoP writes the whole tree too, then declines to believe it: it plans the next step in full and treats the rest as a draft. The template is blunt: “This table should be generated each time after execution of the current step before proceeding with the next one. It MUST be updated with the note on WHAT has Been already Achieved.”
The next step is the only one you are allowed to fully believe in yet.
A plan written for step seven before step three runs is a guess dressed as a decision, unless you label it a draft and promise to rewrite it. Project managers call this rolling-wave planning: near-term work planned in detail, later work at a higher level (PMI, 2026). Programmers will hear lazy evaluation, where a value is computed only when something needs it (Hughes, 1989). Here the laziness is in the commitment: the later steps are drafted early and believed late.
Why draft the whole tree if much of it will change?
- A person can confirm a whole picture. A goal and seven drafted subtasks are something a human can look at and say “you forgot legal”. A single next step is not.
- The progress bar needs a denominator. Two of seven done means something. Two done, out of an unknown number, does not.
- Gaps surface on day one. Drafting the data-rules subtask on the first day is what reveals that nobody knows who signs off.
Plan-first prompting has evidence behind it. Least-to-most prompting, also from May 2022, splits a problem into simpler subproblems and solves them in order; on the length split of a compositional benchmark, SCAN, one model reached 99.7% where chain of thought reached 16.2% (Zhou et al., 2023). Plan-and-Solve asks the model to devise a plan and then carry it out; on six sets of math word problems it averaged 76.7% against 70.4% for “Let’s think step by step”, with one model, GPT-3 (Wang et al., 2023).
The other way is sometimes right. ADaPT, from November 2023, breaks a step down only when the executor fails at it; in three simulated environments, with GPT-3.5, it beat plan-then-act baselines by up to 28.3 points in ALFWorld, 27 in WebShop and 33 in TextCraft (Prasad et al., 2024). When steps are cheap and failure shows at once, expanding on demand wastes less. When a person must approve the plan, each step costs money, or a missing input takes a week to arrive, drafting the whole tree first pays for itself. I chose the draft because the work I plan this way has people and slow inputs in it.
The reflexes at every step
Five reflexes run at every node and keep the plan honest.

Vocalize. Before a step, the system says briefly what it is about to do; after it, what comes next. The reasoning stays on the surface, where a human can catch a wrong turn early.
Check externally. At every node it asks one question: do I have everything I need, or should I do some research first? This is the seam where the plan admits its own ignorance. A step that needs outside information has to go and get it, or say that it cannot.
Execute, then regenerate. The step runs against its own definition of done, and the table is rewritten before anything else happens.
Confirm. After each task the system stops for the human’s confirmation, with a preview of the next task and a question: is there anything you could give me now that would help? The work moves in confirmed increments. Nobody wakes up to discover the agent took twelve steps in the wrong direction overnight.
Read it as a case. The symptom is an agent marching down a stale plan. The mechanism has two parts: the plan was written when the system knew least, and in the tests we have, models judge their own plans poorly. In a 2023 study, about 12% of the plans GPT-4 wrote alone for classical planning problems were valid, averaged across domains; with an external validator feeding back its errors, it solved 82% of the Blocksworld problems it had first failed (Valmeekam et al., 2023). In a follow-up, GPT-4 checking its own plans passed 38 of 45 invalid ones (Valmeekam, Marquez and Kambhampati, 2023).
In a position paper first posted in February 2024, Kambhampati’s group argues that LLMs cannot plan or verify on their own but help inside “LLM-Modulo” loops where external verifiers check every candidate (Kambhampati et al., 2024). A newer reasoning model, o1-preview, solved 97.8% of Blocksworld problems in 2024, but 52.8% once the names were disguised, in a preprint from the same group (Valmeekam et al., 2024). The treatment is what the template already had: a definition of done to test against, a check that looks outside the model, and a person at the gate.
What the table does when the agent is interrupted
How does an AI agent keep its context when it gets interrupted or restarted? In ZCoP, by keeping its state outside the model, in the table: the goal and its definition of done, every finished step as a handful of atomic facts, the current step’s next actions and missing values. After a crash or a reset, the agent reloads the table, checks the missing values against what changed while it was away, and resumes from the next action without replaying the transcript.
The Loop of Attention describes agents that rewrite a todo file to keep the goal in their most recent attention; the regenerated table is that file, with a definition of done on every line. Observation Is the Cut describes the field on my agent board, called next, that carries a task across a restart; the table keeps one on every row.
Where ZCoP sits in time
When I first published this essay I wrote that ZCoP came before the agent frameworks made this fashionable. The dates say otherwise.

ReAct, in October 2022, had models interleave reasoning with actions (Yao et al., 2023). Reflexion, in March 2023, had agents write lessons from failure into memory and retry (Shinn et al., 2023). AutoGPT and BabyAGI, that spring, ran models in autonomous loops, and BabyAGI re-prioritized its task list after every executed task (AutoGPT; BabyAGI). Plan-and-Solve and Tab-CoT followed in May 2023. My own February 2024 note, titled “(ZCoP-ish) Frameworks to compare”, lists Tab-CoT, Cue-CoT, PEARL and Plan-and-Solve as the work to measure against.
What ZCoP added was the assembly, for a practitioner rather than a benchmark: a definition of done at every node, finished work collapsed to atomic facts, an external check and a human gate, in one table a person can read. Its closing line, “Take a deep breath and proceed step-by-step”, belongs to its time too: in 2023 an automated prompt search found that “Take a deep breath and work on this problem step-by-step” scored 80.2% on grade-school math for one model, PaLM 2-L, against 71.8% for “Let’s think step by step” (Yang et al., 2024).
What 2026 changed
In March 2026 a review in my agent workspace checked the template against the systems I now run. The verdict: keep ZCoP as the planning doctrine, and upgrade the runtime.

The task list became a graph with parallel branches. The roles, all in one model in 2024, can now be split across specialized agents. And the human gate after every task, too slow for long autonomous runs, became a policy that allows, denies or escalates to a person.
The doctrine did not move, and I still work by it. My own agent society, Conny (on Nous Research’s Hermes runtime), Claude and Codex, shares one board with fixed columns, an owner on every task, a status of todo, doing, blocked or done, and a handoff file, and done is my word. Since September its task cards carry a binary definition of done and a named file where the reviewer writes its verdict. Several of my agent personas still load Tab-ZCoP as a shared skill when they plan multi-step work.
When teams of agents fail, the casebook in Orchestration Is the System lists missing or wrong verification, and agents unaware of when to stop, among the recurring failure modes in benchmark runs (Cemri et al., 2025). A definition of done at every node is the oldest treatment for both.
The blueprint in one breath
Strip away the detail and ZCoP is four commitments stacked in order.
- Write the goal down before you plan. One confirmable sentence, or you have nothing to define done against.
- Draft the whole roadmap as a table where every node carries its own definition of done. Finished nodes compress to atomic facts so the plan stays light.
- Believe only the next step. Plan it in full, keep the rest as drafts, and regenerate the table after every step with what you just learned.
- Keep the reflexes at every node. Vocalize the move, check whether you actually have what you need, and confirm before you proceed.
None of the four is hard on its own. The architecture is in the ordering and the insistence: the plan is a living object, and the next step is the only one you are allowed to fully believe in yet. Build it that way and you get something most LLM workflows never manage. A plan that is still true at the end of the work, because it rewrote itself the whole way there.
Key takeaways
- The name is the design: zero-shot, a chain of prompts the model writes itself, and a table.
- Done at every node. Goal, tasks and subtasks each carry a definition of done; finished work shrinks to atomic facts.
- Draft everything, believe only the next step, and regenerate the table after every step.
- Check outside the model. In planning tests, GPT-4 passed most of its own invalid plans; the external check and the human gate do that job.
- The table is the agent’s state. After an interruption it resumes from the next action, not from the transcript.
Related reading: Orchestration Is the System is the companion argument from the floor: the layer that routes the work, gates it and decides when the model is wrong is the real product. The Internet of Agents is the runtime this doctrine now plans for.
Sources
- Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., & Iwasawa, Y. (2022). “Large Language Models are Zero-Shot Reasoners.” NeurIPS 2022: 22199-22213. Headline numbers are for one model, InstructGPT (text-davinci-002). https://arxiv.org/abs/2205.11916
- Wei, J., Wang, X., Schuurmans, D., et al. (2022). “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models.” NeurIPS 2022: 24824-24837. https://arxiv.org/abs/2201.11903
- Jin, Z., & Lu, W. (2023). “Tab-CoT: Zero-shot Tabular Chain of Thought.” Findings of ACL 2023: 10259-10277. Best results with one model, code-davinci-002. https://doi.org/10.18653/v1/2023.findings-acl.651
- Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., & Liang, P. (2024). “Lost in the Middle: How Language Models Use Long Contexts.” Transactions of the ACL 12: 157-173. https://doi.org/10.1162/tacl_a_00638
- Schwaber, K., & Sutherland, J. (2020). The Scrum Guide, November 2020. https://scrumguides.org/scrum-guide.html
- Project Management Institute (2026). PMI Lexicon of Project Management Terms, Version 5.0, entry “rolling wave planning”. A standards definition, not a study. https://www.pmi.org/-/media/pmi/documents/registered/pdf/pmbok-standards/pmi-lexicon-pm-terms.pdf
- Hughes, J. (1989). “Why Functional Programming Matters.” The Computer Journal 32(2): 98-107. https://doi.org/10.1093/comjnl/32.2.98
- Zhou, D., Schärli, N., Hou, L., et al. (2023). “Least-to-Most Prompting Enables Complex Reasoning in Large Language Models.” ICLR 2023. The 99.7% is code-davinci-002 with 14 examples on the SCAN length split. https://arxiv.org/abs/2205.10625
- Wang, L., Xu, W., Lan, Y., Hu, Z., Lan, Y., Lee, R. K.-W., & Lim, E.-P. (2023). “Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models.” ACL 2023: 2609-2634. GPT-3 (text-davinci-003). https://doi.org/10.18653/v1/2023.acl-long.147
- Prasad, A., Koller, A., Hartmann, M., Clark, P., Sabharwal, A., Bansal, M., & Khot, T. (2024). “ADaPT: As-Needed Decomposition and Planning with Language Models.” Findings of NAACL 2024: 4226-4252. Simulated environments, GPT-3.5; gains are maxima over different baselines. https://doi.org/10.18653/v1/2024.findings-naacl.264
- Valmeekam, K., Marquez, M., Sreedharan, S., & Kambhampati, S. (2023). “On the Planning Abilities of Large Language Models: A Critical Investigation.” NeurIPS 2023: 75993-76005. https://arxiv.org/abs/2305.15771
- Valmeekam, K., Marquez, M., & Kambhampati, S. (2023). “Can Large Language Models Really Improve by Self-critiquing Their Own Plans?” NeurIPS 2023 Workshop on Foundation Models for Decision Making. One model (GPT-4), one domain, 100 problems. https://arxiv.org/abs/2310.08118
- Kambhampati, S., Valmeekam, K., Guan, L., et al. (2024). “Position: LLMs Can’t Plan, But Can Help Planning in LLM-Modulo Frameworks.” ICML 2024, PMLR 235: 22895-22907. A position paper. https://proceedings.mlr.press/v235/kambhampati24a.html
- Valmeekam, K., Stechly, K., & Kambhampati, S. (2024). “LLMs Still Can’t Plan; Can LRMs? A Preliminary Evaluation of OpenAI’s o1 on PlanBench.” Preprint. https://arxiv.org/abs/2409.13373
- Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., & Cao, Y. (2023). “ReAct: Synergizing Reasoning and Acting in Language Models.” ICLR 2023. https://arxiv.org/abs/2210.03629
- Shinn, N., Cassano, F., Gopinath, A., Narasimhan, K., & Yao, S. (2023). “Reflexion: Language Agents with Verbal Reinforcement Learning.” NeurIPS 2023: 8634-8652. https://arxiv.org/abs/2303.11366
- Significant Gravitas (2023). AutoGPT, GitHub repository; first commits March 2023. https://github.com/Significant-Gravitas/AutoGPT
- Nakajima, Y. (2023). BabyAGI, GitHub repository (original version), April 2023; the README describes the loop that re-prioritizes the task list after each task. https://github.com/yoheinakajima/babyagi_archive
- Sun, S., Liu, Y., Wang, S., Iter, D., Zhu, C., & Iyyer, M. (2024). “PEARL: Prompting Large Language Models to Plan and Execute Actions Over Long Documents.” EACL 2024: 469-486. https://doi.org/10.18653/v1/2024.eacl-long.29
- Wang, H., Wang, R., Mi, F., et al. (2023). “Cue-CoT: Chain-of-thought Prompting for Responding to In-depth Dialogue Questions with LLMs.” Findings of EMNLP 2023: 12047-12064. https://doi.org/10.18653/v1/2023.findings-emnlp.806
- Yang, C., Wang, X., Lu, Y., Liu, H., Le, Q. V., Zhou, D., & Chen, X. (2024). “Large Language Models as Optimizers.” ICLR 2024. The 80.2% is one scorer model, PaLM 2-L, on GSM8K. https://arxiv.org/abs/2309.03409
- Cemri, M., Pan, M. Z., Yang, S., et al. (2025). “Why Do Multi-Agent LLM Systems Fail?” NeurIPS 2025, Datasets and Benchmarks Track. Benchmark runs, mostly labelled by an LLM judge. https://arxiv.org/abs/2503.13657
My own sources are dated files: the “Paper” page and the note “(ZCoP-ish) Frameworks to compare” in a Notion export of 12 February 2024; the Tab-ZCoP Universal Template in my course vault, 29 October 2024; the March 2026 review in my agent workspace. The roadmap example is illustrative.
Common Questions
- How does an AI agent keep its context when it gets interrupted or restarted?
- It keeps its state outside the model, in a plan it rewrites after every step, and reloads that plan instead of the transcript. In ZCoP the plan is a table: the goal and its definition of done, each finished step collapsed to a few atomic facts, and the current step's next actions and missing values. After a restart the agent reads the table, checks the missing values against what changed, and resumes from the next action.
- What is Zero Chain of Prompt (ZCoP)?
- ZCoP is a planning template for LLM work that I first wrote down in February 2024: the model turns a confirmed goal into a table of tasks and subtasks, each with a definition of done and a prompt, and rewrites that table after every step. Zero means zero-shot (no worked examples), chain of prompt means the model writes the instruction for each step, and the table lets it reason down the columns and across the rows. Finished steps shrink to atomic facts, and a human confirms each task before the next one starts.
- How do I make an LLM plan a multi-step task?
- Have it write the goal down and get your confirmation first, then draft every task and subtask in a table, each with a definition of done and a prompt. Run one step at a time: before each step, ask whether it has what it needs or must research first; after each step, collapse the finished work to facts and regenerate the table. Check each step against its definition of done with something outside the model, such as a test, a tool or a person: in planning studies, GPT-4 passed most of its own invalid plans.
- Should an AI agent plan everything up front or one step at a time?
- Draft the whole plan up front, but commit only to the next step and rewrite the rest after every step. The draft gives a person a full picture to confirm, gives progress a denominator and exposes missing inputs early. When steps are cheap and failures are visible, breaking a step down only after it fails, as the ADaPT method does, can work better.
- What is a definition of done for an AI agent?
- It is a test, written before the work starts, that says when a step counts as finished, such as 'legal confirms where customer data may live'. In ZCoP every goal, task and subtask carries one, so the agent knows when to stop and what to check, and the goal's definition of done is what the tasks' definitions add up to. Make it binary, and checkable from outside the model where you can.
- Can LLMs plan on their own?
- Not reliably on their own. In a NeurIPS 2023 study GPT-4 produced valid plans for only about 12% of classical planning problems on average, and in a follow-up it passed 38 of 45 invalid plans when asked to check them; a 2024 reasoning model solved 97.8% of Blocksworld problems but about half once the names were disguised. Models work better as proposers inside a loop where an external checker or a person verifies each step.