@micuintus/enforced-todo1.0.0
Enforced TODO loop for Pi: after every turn the agent reassesses its list, then works the top item, until the list is empty.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
EnforcedTodo
A TODO loop for Pi that follows through. After every agent run, while the TODO list still has items, EnforcedTodo sends one hidden follow-up prompt:
- If every item is completed, clear the list (an empty list ends the loop).
- Reassess the list against what the last turn learned: reorder, add, remove, merge or split items.
- Work the top item and mark it completed.
The reassessment step runs every turn. That is what "enforced" means: the protocol always runs. Whether each item succeeds is still up to the agent.
The loop stays idle when the list is empty, when the run was aborted, when messages are already queued, and when the run ended on a provider error such as a rate limit (it notifies you instead of retrying at API speed). An agent that genuinely cannot continue is told to clear the list or mark items completed, which stops the loop.
Install
pi install git:github.com/micuintus/enforced-todo
pi install git:github.com/tintinweb/pi-manage-todo-list
or pi install npm:@micuintus/enforced-todo.
Engine
EnforcedTodo drives the manage_todo_list tool from
tintinweb/pi-manage-todo-list
and reads its results from the session by tool name and shape. It does
not work with other TODO extensions. If the tool is missing, the
prompt tells the agent to say so and stop rather than invent a list.
Why tintinweb's tool: it mirrors the manage_todo_list shape models
already know from Copilot; see the
Pi ecosystem TODO survey.
Development
npm install
npm run check
npm test
Extracted with its history from pi-dacmicu, where it shipped as the
deterministic TODO loop. The loop driver lives in
@micuintus/loop-driver.