fix: insert intake at the top of ## Items, not at EOF - #48
Merged
Merged
Conversation
hooks/task intake always appended at end of file. With ## Removed last, the new live entry landed in the deleted region and outside the documented "add at the top" convention in todo.md. Insert after ## Items (skipping blanks and its leading HTML comment), else just before ## Removed, else keep the old EOF path for bare fixtures. Goal/ID duplicate checks and the field template are unchanged; the block now goes through emit(). Smoke covers Items+trailing Removed, no-Items+Removed, and a bare # Todo.
hkwuks
added a commit
that referenced
this pull request
Sep 22, 2026
PR #48 merged: complete + archive TF-20260921-337ab8 into achieved/. Close three unpromoted entries whose work already landed elsewhere: - TF-20260921-4d8ae2 — repository-docs reader fix merged in PR #46 - TF-20260919-76e7fb — release-flow exception merged in PR #42 - TF-20260919-2877ca — same delivery as 76e7fb task remove records each ID in ## Removed with the reason. Todo metadata only; no hook or skill changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hooks/task intakewrote every new entry at end-of-file. When## Removedwas the last section, the new live entry landed in the deleted region — outside## Itemsand inside the rangetodo-checkreads for authorized deletions — and it contradicted the documented convention at the top oftodo.md(<!-- Add new items at the top using the template below. -->).Insertion is now an index, not EOF: after
## Items(skipping blanks and its leading HTML comment), else just before## Removed, else the old EOF path for bare fixtures. Goal/ID duplicate checks and the field template are unchanged; the block goes through the sharedemit()path.TaskFlow traceability
TaskFlowDocs/2026-09-22-todo-intake-insert/TF-20260921-337ab8hooks/task(intakebranch only),hooks/smoke-test(new section), task documents,TaskFlowDocs/todo.mdstatus bookkeepingmainhkwuks/TaskFlow(origin)Verification
bash hooks/smoke-test—ALL SMOKE PASSEDgit diff --check— cleanquick_validate.py skills/taskflow→Skill is valid!; no skill file is touched by this PRTaskFlowDocs/2026-09-22-todo-intake-insert/plan.md,## Verification / ReviewBeyond the suite:
bash -n hooks/taskandbash -n hooks/smoke-testclean; four manual fixtures (Items+trailing Removed, bare# Todo, no Items+Removed, Removed-above-first-entry) confirmed orderItems < new < seed < Removedand that the new ID is absent from theremoved_atrange.Review boundaries
intakeinsertion path, its smoke section, and this task's documents/statusorigin(hkwuks/TaskFlow), targetingmainKnown limitations
todo.mdwith## Removedbut no## Itemsis malformed relative to the documented layout; intake inserts before## Removedand does not refuse (PRD Open Question 2 / R2).# Todofile is intentionally unchanged so existing minimal smoke fixtures stay valid (R3).