Write task todo

From yusifeng/formax · View interactive version

Write task todo is an AI agent skill from the GitHub repository yusifeng/formax. Use after task analysis when a non-trivial Formax repository task needs a structured `docs/todolist.md` with [x]/[ ] items, definitions-before-UI ordering, explicit non-goals, tests, and loop-ready execution slices.

How to use this skill

Skill file

Write Task Todo

Use this skill after analyze-task and after the analysis has been discussed and aligned when a task is large enough to need multiple implementation loops, commits, reviews, or cross-layer coordination.

This skill turns an analysis result into a single working task document:

Purpose

Create a todo that is:

This skill is not for coding and not for long-form design writing.

Preflight gate for large cross-layer tasks

Before writing docs/todolist.md, use a short Decision Draft when the task crosses any of these Formax boundaries:

Do not write the final todo until the Decision Draft is aligned. The draft should be short and must answer:

For small single-layer fixes, skip the Decision Draft and keep the todo lightweight.

Core rules

  1. Use a single working todo file
  1. Do not create a parallel source-of-truth doc at the start
  1. Prefer definitions before implementation
  1. Use [x] and [ ] strictly
  1. The todo must be loop-ready
  1. If the task is too small to justify a todo
  1. Do not generate a todo while key alignment questions are still unresolved
  1. Add a spec lock / review-scope lock for high-risk multi-loop work
  1. Add an EntryPoint Matrix for cross-entrypoint features
  1. Attribute critical semantic decisions
  1. Prefer existing Formax models before inventing new concepts
  1. Make non-goals actionable
  1. Run a vague-language scan before finalizing the todo
  1. Source thresholds and IO bounds

Required structure

Use this shape unless a task has a strong reason to be simpler:

# <Feature Name> Todo

## 0. Context and Boundary

### 0.1 Confirmed facts
- [x] ...

### 0.2 Goals
- [ ] ...

### 0.3 Non-goals
- [x] ...

### 0.4 Spec lock and review-scope
- [x/ ] Spec lock required:
- [x/ ] Review findings log:
- [x/ ] Review findings must be classified before code changes
- [x/ ] Current-loop review is scoped by each loop's `Loop Contract`
- [x/ ] Later-loop findings are logged, not chased in the current loop
- [x/ ] Spec ambiguity stops implementation until contracts/todo/user alignment are updated

### 0.5 Decision Draft Summary
- [ ] Storage/config source:
- [ ] Schema/defaults/rejected fields:
- [ ] Startup/activation timing:
- [ ] Permission model:
- [ ] Capability level:
- [ ] Result/IO/cleanup bounds:
- [ ] Explicit non-goals:

## 1. Definitions First

### 1.1 Canonical docs
- [ ] align with existing canonical docs
- [ ] decide whether a new canonical doc will be needed later

### 1.2 Data model
- [ ] ...

### 1.3 Types / Interfaces
- [ ] ...

### 1.4 Semantic decision table
| Decision | Accepted rule | Source | Alternatives rejected / deferred | Contract target | Test implication |
|---|---|---|---|---|---|
| ... | ... | `Reference-derived` / `Formax-existing` / `Formax-Phase-1 safety choice` / `User-aligned` | ... | ... | ... |

### 1.5 EntryPoint Matrix
| EntryPoint | Reads config? | Activates runtime? | Exposes capability? | UI/transcript behavior | Tests |
|---|---|---|---|---|---|
| REPL | ... | ... | ... | ... | ... |
| SDK | ... | ... | ... | ... | ... |
| app-server | ... | ... | ... | ... | ... |
| Web | ... | ... | ... | ... | ... |
| Electron | ... | ... | ... | ... | ... |

### 1.6 Review finding triage policy
- [ ] Classify every review finding as `true blocker`, `valid but later-loop`, `spec ambiguity`, `reviewer preference`, or `conflicts with accepted contract`
- [ ] Fix code only for true blockers inside the current loop contract, accepted contract violations, or localized low-risk implementation bugs
- [ ] For later-loop findings, update the review findings log and make sure a future loop owns the acceptance item
- [ ] For spec ambiguity, stop implementation and update contracts/todo or ask the user before editing code
- [ ] For reviewer preference, do not adopt unless it is low-risk, local to the current loop, and does not change behavior or scope
- [ ] For contract conflicts, do not implement the finding; cite the accepted contract and add a focused regression test if needed
- [ ] Re-run review only after triage is documented and targeted tests pass

## 2. Runtime / Platform
- [ ] core
- [ ] contracts
- [ ] app
- [ ] runtime

## 3. Frontend Boundary
- [ ] repo
- [ ] service
- [ ] runtime
- [ ] ui

## 4. Tests
- [ ] runtime tests
- [ ] ui tests
- [ ] integration tests

## 5. Recommended Execution Order

### Loop 1
#### Loop Contract
- Purpose:
- In scope:
- Out of scope:
- Blocking findings:
- Non-blocking / later-loop findings:
- Known unresolved semantics:
- Required targeted tests:
- Review prompt scope:
- Exit criteria:

- [ ] ...
- [ ] triage review findings into the review findings log
- [ ] run `codex review` for this loop after targeted verification passes

### Loop 2
#### Loop Contract
- Purpose:
- In scope:
- Out of scope:
- Blocking findings:
- Non-blocking / later-loop findings:
- Known unresolved semantics:
- Required targeted tests:
- Review prompt scope:
- Exit criteria:

- [ ] ...
- [ ] triage review findings into the review findings log
- [ ] run `codex review` for this loop after targeted verification passes

Adaptation rules

What good looks like

A good todo should:

Review rule

When writing ## 5. Recommended Execution Order:

Review churn trigger

For large multi-loop tasks, include a stop/escalation rule in the todo or review findings log. Stop implementation edits and run a convergence pass when any condition is true:

Vague-language final check

Before handing the todo back to the user, run a text search over the todo for ambiguous planning language:

rg -n "where needed|if needed|if practical|either|or explicitly|fallback|unless scoped|later|may|might|optional|as needed|TBD|unresolved" docs/todolist.md

Classify every match. It is acceptable for a match to remain only when it is clearly inside a Phase 2 backlog item, a stop condition, or a review triage rule. It is not acceptable for a Phase 1 implementation item to leave the decision open.

Completion rule

When the work is finished:

  1. stable long-lived facts should live in the repo's canonical docs
  2. docs/todolist.md should be deleted
  3. no parallel definitions should remain behind
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.