Skip to content

Commit 4a28c27

Browse files
backlog: tighten ACs on TASK-342.1–342.6, fix AGENTS.md backlog policy
Pin each Plex subtask to specific file paths, function signatures, and project conventions so an agent can start without re-reading the cliamp reference or guessing at idioms: - 342.2: column-presence migration idiom, index guards, Track model fields, source_filter param, idempotency test - 342.3: settings.json store (not SQLite KV), client_identifier UUIDv4, plex_list_libraries command, sidebar unchanged, corrects misleading "same as Last.fm" wording - 342.4: PlexMergeStats shape, normalize_for_match at plex/merge.rs, content_hash-then-fuzzy match algorithm, PlexState mutex cache, integration test fixture counts - 342.5: resolve_plex_path insertion point, path sanitization, atomic .partial rename, 500 MiB mid-stream cap, token log redaction, spawn_blocking constraint - 342.6: rewrite description (no Plex sidebar/view β€” cloud badges in existing artist/album/library views), isRemote helper, sequential prefetch worker, single-download mutex, Show Remote toggle, @tauri E2E AGENTS.md: - Add "Preventing ID Collisions" subsection with detection command and resolution steps (closes the gap that caused TASK-341 duplicate) - Correct parentTaskId row in parameter table: task_edit does not support it β€” frontmatter must be edited directly - Append re-parent note to Common error line Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 89ff249 commit 4a28c27

14 files changed

Lines changed: 340 additions & 347 deletions

β€ŽAGENTS.mdβ€Ž

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,25 @@ This project uses Backlog.md MCP for all task and project management.
226226

227227
**IMPORTANT**: Use `task_edit(status: "Done")` to mark tasks as done. Do NOT use `task_complete` unless the user explicitly asks to archive/clean up β€” it removes the task from the kanban.
228228

229+
### Preventing ID Collisions
230+
231+
Backlog.md does NOT enforce ID uniqueness on the filesystem. If two task files declare the same `id:` in their frontmatter, `task_view`/`task_search` silently resolve to whichever has the newer `updated_date`, hiding the other from the kanban and MCP lookups. This is how TASK-341 ended up with two owners (iOS-sync vs. Plex umbrella) in commit `89ff249`.
232+
233+
**Before creating any task, ALWAYS:**
234+
235+
1. Run `task_list` (or `rg "^id: TASK-" backlog/tasks/ backlog/archive/tasks/ backlog/completed/`) to find the highest existing ID.
236+
2. Let `task_create` auto-assign the next ID β€” **never set `id:` manually in frontmatter or filenames**.
237+
3. For subtasks, pass `parentTaskId` to `task_create` so Backlog.md generates the hierarchical ID (e.g., `TASK-342.1`) for you.
238+
239+
**Detecting a collision:**
240+
241+
```bash
242+
rg -N "^id: " backlog/tasks/ backlog/archive/tasks/ backlog/completed/ \
243+
| awk -F': ' '{print $NF}' | sort | uniq -d
244+
```
245+
246+
**Resolving a collision:** the MCP has no rename/change-id operation. Renumbering requires: (1) `git mv` the file to a new filename with the new ID; (2) edit the frontmatter `id:` field; (3) edit `parent_task_id:` if the task is a subtask whose parent was also renumbered (this field is NOT settable via `task_edit`); (4) edit `dependencies:` arrays in other tasks that reference the old ID; (5) verify with `rg "^id: TASK-OLD$" backlog/tasks/` returning zero results.
247+
229248
### Cross-Branch Task Scanning (disabled)
230249

231250
`check_active_branches` and `remote_operations` are both **disabled** in `backlog/config.yml`. With worktrees, these features scan other branches and pull in tasks that were already completed/archived on `main` but still exist in `backlog/tasks/` on older branches β€” bloating the kanban with ghost tasks. Do not re-enable without accounting for worktree branch divergence.
@@ -248,15 +267,15 @@ The `finalSummary`, `description`, `implementationNotes`, and `planSet` MCP para
248267
| Description | `description` | `description` |
249268
| Acceptance Criteria | `acceptanceCriteria` | **`acceptanceCriteriaSet`** (replaces all), `acceptanceCriteriaAdd`, `acceptanceCriteriaRemove`, `acceptanceCriteriaCheck`, `acceptanceCriteriaUncheck` |
250269
| Dependencies | `dependencies` | `dependencies` |
251-
| Parent Task | `parentTaskId` | `parentTaskId` |
270+
| Parent Task | `parentTaskId` | **not supported β€” edit `parent_task_id:` in the markdown frontmatter directly** |
252271
| Status | `status` | `status` |
253272
| Notes | β€” | `notesAppend`, `notesSet`, `notesClear` |
254273
| Plan | β€” | `planAppend`, `planSet`, `planClear` |
255274
| Final Summary | β€” | `finalSummary`, `finalSummaryAppend` |
256275
| References | `references` | `references`, `addReferences`, `removeReferences` |
257276
| Documentation | `documentation` | `documentation`, `addDocumentation`, `removeDocumentation` |
258277

259-
**Common error:** Using `taskId` instead of `id`, or `acceptanceCriteria` instead of `acceptanceCriteriaSet` in `task_edit` calls. Always use `id` and the `acceptanceCriteria*` variant names.
278+
**Common error:** Using `taskId` instead of `id`, or `acceptanceCriteria` instead of `acceptanceCriteriaSet` in `task_edit` calls. Always use `id` and the `acceptanceCriteria*` variant names, and `task_edit` cannot re-parent β€” edit the file's `parent_task_id:` frontmatter directly when a parent ID changes.
260279

261280
The overview resource contains additional detail on decision frameworks, search-first workflow, and guides for task creation, execution, and completion.
262281

β€Žbacklog/tasks/task-341.1 - Backend-Plex-API-client-library-Rust.mdβ€Ž

Lines changed: 0 additions & 44 deletions
This file was deleted.

β€Žbacklog/tasks/task-341.2 - Backend-Database-migration-for-Plex-source-tracking.mdβ€Ž

Lines changed: 0 additions & 41 deletions
This file was deleted.

β€Žbacklog/tasks/task-341.3 - Backend-Plex-config-storage-Settings-UI.mdβ€Ž

Lines changed: 0 additions & 52 deletions
This file was deleted.

β€Žbacklog/tasks/task-341.4 - Backend-Plex-library-fetch-merge-with-local-library.mdβ€Ž

Lines changed: 0 additions & 61 deletions
This file was deleted.

β€Žbacklog/tasks/task-341.5 - Backend-Download-on-play-for-remote-tracks.mdβ€Ž

Lines changed: 0 additions & 60 deletions
This file was deleted.

β€Žbacklog/tasks/task-341.6 - Frontend-Cloud-icons-download-UI-and-Plex-library-views.mdβ€Ž

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
Β (0)