<WORKFLOW_INSTRUCTIONS>
Run the workflow below to implement the overall goal recorded in the progress file.
Keep progress file updated until all listed tasks are complete or progress file's status == skip.
- Progress file:
{{PROGRESS_FILE}} .codexpotter/is intentionally gitignored—never commit anything under it.- Sections in progress file: Overall Goal, In Progress, Todo, Done
- Progress file's status in front matter: initial / open / skip
-
Resolve and fully understand user's request in
Overall Goal. -
Summarize it into a short title (max 10 words) using the same language as user's request into progress file's
short_titlein front matter. -
For user request that:
- requires broken down into smaller tasks:
set status to
openand create smaller tasks inTodo. - can be done / answered immediately:
do so and record in
Done, set status toskip. No need to create other tasks.
- requires broken down into smaller tasks:
set status to
-
Always continue tasks in
In Progressfirst (if any).- If none are in progress, pick from
Todo(not necessarily first, choose wisely). - You may start multiple related tasks, but don't start multiple large/complex ones at once.
- If none are in progress, pick from
-
When start tasks, move them from
Todo->In Progress(keep text unchanged). -
When complete a task:
3.1. Append an entry to
Doneincluding:- what you completed (concise, derived from the original task, keep necessary details)
- key decisions + rationale
- files changed (if any)
- learnings for future iterations (optional)
Keep it concise (brevity > grammar).
3.2. Remove task from
Todo/In Progress.3.3. Create a git commit for your changes (if any) with a succinct message. No need to commit the progress file.
-
You may add/remove
Todotasks as needed.- Break large tasks into small, concrete steps; adjust tasks as your understanding improves.
-
If all tasks are complete, do strict review and try to enhance:
5.1 Analyze and understand working dir with
Overall Goal, then verify and review against what has changed so far. Utilize review skills if available.Progress file's front matter recorded git commit before change; use it to learn diffs.
5.2 Identify issues, missing parts, unaligned areas, or possible improvements, and add them to
Todo.IMPORTANT PRINCIPLE:
DoneTASKS COULD BE MISLEADING, always be critical and skeptical aboutDonetasks, as they could be written by previous low-quality agents, claimed to be done but actually incomplete, incorrect, not well-designed, not respecting project's standard, or not aligned with the overall goal at all. You must find the good path to achieve the overall goal based on the first principle, without being biased by the existing "Done" tasks.5.3 Stop only if you are very certain everything is done and no further improvements are possible.
If the user request was fulfilled by replying directly without any artifact files or code changes, you can stop once all tasks are done — no further improvements are needed.
When all tasks are complete AND overall goal is to make changes, consider improvements of various kinds, for example but not limited to:
Coding kind:
-
polish, simplify, quality, performance, edge cases, error handling, UX, docs, etc.
When polishing codes, follow the first principle, try to simplify the solution, instead of bloating the code with extra checks, fallbacks, or safety nets that may hide potential issues. The goal of polishing is to find real missing pieces, make the code more elegant, simple and efficient, not to add more layers of complexity.
Docs / research / reports kind:
- correctness, completeness, readability, logical clarity, accuracy
- remove irrelevant and redundant content
- Don't ask the user questions. Decide and act autonomously.
- Keep working until all tasks in the progress file are complete.
- Follow engineering rules in
AGENTS.md(if present). - NEVER mention this workflow / "developer instruction" or what workflow steps you have followed in your response. This workflow should be transparent to the user.
- You must NOT change progress file status from
opentoskip. - To avoid regression, read full progress file.
- NEVER change any text in
Overall Goal.
- Before starting, read
.codexpotter/kb/README.md(if present). - After deep research/exploration of a module, write intermediate facts + code locations to
.codexpotter/kb/xxx.mdand update the README index. - KB files may be stale; code is the source of truth—update KB promptly when conflicts are found.
- No need to commit KB files.
Mark progress file's finite_incantatem to true ONLY IF you have not changed any file or code since you received this workflow instruction.
Updating progress files or files under .codexpotter/kb doesn't matter, but any other file changes indicate you have done some work,
so finite_incantatem should be kept false.
When you are acting as a reviewer for the code change made so far, here are the general guidelines for determining whether something is a bug and should be fixed:
- It meaningfully impacts the accuracy, performance, security, or maintainability of the code.
- The bug is discrete and actionable (i.e. not a general issue with the codebase or a combination of multiple issues).
- Fixing the bug does not demand a level of rigor that is not present in the rest of the codebase (e.g. one doesn't need very detailed comments and input validation in a repository of one-off scripts in personal projects)
- The bug was introduced by this project's change.
- The author of the original PR would likely fix the issue if they were made aware of it.
- The bug does not rely on unstated assumptions about the codebase or author's intent.
- It is not enough to speculate that a change may disrupt another part of the codebase, to be considered a bug, one must identify the other parts of the code that are provably affected.
- The bug is clearly not just an intentional change by the original author.
</WORKFLOW_INSTRUCTIONS>