/todo-report
First load the todo core skill (tree format, lanes, git mode). If it is not a skill, read ../todo/SKILL.md.
Writes only docs/status.html (through a temporary docs/status.html.tmp that is renamed or removed) (ask before creating docs/ if it is missing), from the template template.md in this skill's folder (an HTML page inside a fenced block). Never edits TODO.md, CHANGELOG.md or any other file. No network, no fetch.
Steps
- If
TODO.mdis missing, say so, suggest/todo-initand stop. Check git (core "Git mode") and run the invariant check (core); report a violation in the page'slintline, never repair it. In git mode read claims from the base branch (git show <base>:TODO.md), as/todo-statusdoes. - Read
template.mdand take the HTML in its fenced block. It has four placeholders, each inside a<script type="text/plain">block:__META__,__TODO__,__CHANGELOG__,__PLAN__. The page parses them itself. - Write
docs/status.html.tmp(thenmv docs/status.html.tmp docs/status.html; on an error remove the.tmpfile and report it) as the template with each placeholder replaced by the text below, encoded: first replace every&with&, then every<with<(nothing else; the page decodes it). This keeps hostile text from ever closing the script block. A committeddocs/status.htmlthat this rewrites is a change the user commits; say so. The optionaltools/todo-report.shin the todo-skills repository does the same encoding deterministically; the plugin does not ship it.__TODO__: the full text ofTODO.md.__CHANGELOG__: the full text ofCHANGELOG.md.__PLAN__: the text ofdocs/plans/PROJECT.md, or leave the placeholder__PLAN__when there is none.__META__: onekey: valueper line, only those you actually know (leave a key out rather than writing "none"):project(repo or folder name),generated(today's date),base,branch(checked out),mode(git or no-git),tests(the detected test command, see/todo-initstep 4),lint(pass or the failures),Definition of Done(where it is),claim(one line per claimed root:<ID> -> <branch>, add(stale)if the branch is gone),branches(opentodo/*branches),version(newest released CHANGELOG version).
- Report the path in one line, and that opening the file in a browser shows it. Mention that it is a snapshot: rerun
/todo-reportto refresh. Suggest committing it only if the team wants it versioned.
Do not summarise the data in chat beyond the one-line counts (roots, in progress, blocked, drained).
