Skip to content

feat: set ID --title to retitle an item in place (#18) - #20

Merged
budhash merged 1 commit into
mainfrom
feat/set-title
Jul 13, 2026
Merged

budhash merged 1 commit into
mainfrom
feat/set-title

Conversation

@budhash

@budhash budhash commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Closes #18. Delivers the retitle half of #11 (the note verb remains open there).

What

set ID --title "New title" — replace an item's descriptive title in place, preserving its ID, status, priority, and all trailing machine tags (built on split_item_tags from the 1.1.1 tag-region work). Applies to the primary line and any @shadow copies, keeping derived copies in sync (same semantics as the #17 fix).

Guards

  • Empty title → rejected.
  • Title ending with a tag-shaped token (e.g. ... @milestone=m1) → rejected with a clear message, because on re-parse that trailing token would merge into the machine-tag region and silently become a real tag.
  • Tag-lookalikes elsewhere in the title stay prose (per the milestone rollup / migrate parse @milestone= from task prose, not the tag position #9 parsing rules) — verified no phantom milestone bucket.

Verification

  • New e2e scenario 50: retitle + effort/tags preservation, shadowed-feature sync, both guards, mid-title lookalike.
  • make check green: 265 assertions, 0 failures; smoke OK; 3.8-safe; single file, zero deps.

Minor version: __version__ 1.1.2 → 1.2.0 (new command surface); CHANGELOG + docstring updated.

There was no CLI verb to correct an item's descriptive title after creation —
the only options were a hook-discouraged manual TASKS.md edit or re-file +
defer (ID churn).

Add `set ID --title "New title"`: replaces the descriptive text while
preserving the ID, status, priority, and all trailing machine tags (via
split_item_tags), applied to the primary line and any @shadow copies so the
derived copies stay in sync.

Guards: empty titles are rejected, and so is a title that ENDS with a
tag-shaped token (e.g. "... @milestone=m1") — on re-parse that token would
merge into the trailing machine-tag region and silently become a real tag.
Tag-lookalikes elsewhere in the title remain prose, per the #9 parsing rules.

New e2e scenario 50 covers retitle + tag preservation, shadowed-feature sync,
both guards, and the mid-title lookalike case. version 1.1.2 -> 1.2.0.
@budhash
budhash merged commit 8ca3036 into main Jul 13, 2026
5 checks passed
@budhash
budhash deleted the feat/set-title branch July 13, 2026 19:50
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.

No verb to edit a task's title/description (set only does branch/pr/issue/tags/effort/milestone/prio)

1 participant