Skip to content

fix: insert intake at the top of ## Items, not at EOF - #48

Merged
hkwuks merged 1 commit into
mainfrom
fix/todo-intake-insert
Sep 22, 2026
Merged

hkwuks merged 1 commit into
mainfrom
fix/todo-intake-insert

Conversation

@hkwuks

@hkwuks hkwuks commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Summary

hooks/task intake wrote every new entry at end-of-file. When ## Removed was the last section, the new live entry landed in the deleted region — outside ## Items and inside the range todo-check reads for authorized deletions — and it contradicted the documented convention at the top of todo.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 shared emit() path.

TaskFlow traceability

  • Task: TaskFlowDocs/2026-09-22-todo-intake-insert/
  • Todo item: TF-20260921-337ab8
  • Scope: hooks/task (intake branch only), hooks/smoke-test (new section), task documents, TaskFlowDocs/todo.md status bookkeeping
  • Base branch: main
  • Target repository: hkwuks/TaskFlow (origin)

Verification

  • bash hooks/smoke-testALL SMOKE PASSED
  • git diff --check — clean
  • Relevant Skill/plugin validation — quick_validate.py skills/taskflowSkill is valid!; no skill file is touched by this PR
  • Results recorded in the TaskFlow Plan — TaskFlowDocs/2026-09-22-todo-intake-insert/plan.md, ## Verification / Review

Beyond the suite: bash -n hooks/task and bash -n hooks/smoke-test clean; four manual fixtures (Items+trailing Removed, bare # Todo, no Items+Removed, Removed-above-first-entry) confirmed order Items < new < seed < Removed and that the new ID is absent from the removed_at range.

Review boundaries

  • No secrets or opaque remote payloads included
  • No unrelated task or user files changed — only the intake insertion path, its smoke section, and this task's documents/status
  • Remote/base assumptions are stated — pushed to origin (hkwuks/TaskFlow), targeting main
  • Known limitations and follow-ups are documented below

Known limitations

  • Promote still derives the task directory from the section heading. Titles that do not match Goal are unchanged (deferred; PRD Open Question 1).
  • A todo.md with ## Removed but no ## Items is malformed relative to the documented layout; intake inserts before ## Removed and does not refuse (PRD Open Question 2 / R2).
  • The EOF path for a bare # Todo file is intentionally unchanged so existing minimal smoke fixtures stay valid (R3).

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
hkwuks merged commit 2dfffe3 into main Sep 22, 2026
6 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant