The weekly review pipeline still allocates tech-debt IDs by scanning, so the batched filing it does can still mint a duplicate
Id: TD-PPagop-26081605 · Status: resolved · Filed: 2026-08-16 · Resolved: 2026-08-17 · Ref: #505
PR #476 adopted the canonical atomic reservation
(scripts/reserve-tech-debt-id.pl) as this repository’s filing step and
described it as the tooling the implementation pipeline works to. The
weekly review pipeline was left on the scan: prompts/project-reviewer.md
tells the Reviewer-Agent that scripts/next-tech-debt-id.pl allocates new
IDs (line 110) and that step 2 files the review’s items by allocating IDs
with it (line 133), and docs/REVIEW-PIPELINE-SPEC.md requires the same in
R12 and names it again in the Environment section’s summary of the target
repositories’ shared conventions.
That was deliberate — #476’s body says so, and its scope was this
repository’s own register — but CLAUDE.md asks a deferred gap to be
recorded here rather than left in a commit message or a pull request body,
and until now it was only in #476’s body and in its Reviewer’s comment.
Why it matters
Section titled “Why it matters”The review is the largest batch writer into any of these registers: one
run files every item a whole project review surfaced, in one pull request.
That is the workload most exposed to the collision the reservation exists
to prevent — two hourly-pipeline pull requests, each filing a single item,
were enough to mint TD-PPagop-26081401 twice on 2026-08-14 (#346 and
#350), the day after the fix existed upstream. A review run filing a dozen
items alongside a live hourly cycle has a dozen chances at the same
add/add conflict, and each side passes td-check.pl locally.
The instruction is also now self-contradicting on one of its two target
repositories. R12’s own words are to follow “the repo’s own register
workflow exactly”, and Poetic-Poems/poetic’s TECH-DEBT.md has
prescribed reservation since Poetic-Poems/poetic#166 — so a Reviewer-Agent
obeying R12’s literal script name disobeys R12’s actual rule.
prompts/project-reviewer.md— line 110 (the shared-conventions list) and line 133 (procedure step 2, “allocate IDs withscripts/next-tech-debt-id.pl”).docs/REVIEW-PIPELINE-SPEC.md— R12, and the Environment section’s parenthetical namingscripts/next-tech-debt-id.plas part of the target repositories’ shared register conventions..claude/skills/project-review/references/output-templates.md— its register template still describes the retired single-file “Ledger” format and tells the agent to use “the repo’snext-tech-debt-idhelper if it has one”. R12 exists to override that template per repository, so this is not a second defect so much as the reason R12 has to be right; worth confirming whether that vendored copy is canonical here before editing it.
Suggested fix
Section titled “Suggested fix”Two things have to be settled before the wording changes, and neither is a rename:
- The batched filing does not fit one reservation per branch.
reserve-tech-debt-id.plreserves exactly one ID by pushing itstd/<id>branch fromorigin/main, and the filing workflow it belongs to files that one item on that branch. The review files several items in one pull request on one branch. So either the review files one pull request per item — a change to the shape and cost of its output, not just to its ID allocation — or it reserves N IDs, leaves the Ntd/<id>refs standing as reservations, and files all N items on a branch of its own. Decide which, and say so in R12; if it is the second, say what becomes of the reservation refs once the filing merges, since nothing deletes them today. Poetic-Poems/poetic-fiddlehas no reservation script. It carriesget-tech-debt-record.pl,next-tech-debt-id.plandtd-check.plonly. Until Poetic-Poems/poetic-fiddle#326 mirrors the tooling, a prompt namingreserve-tech-debt-id.plwould name a script one of its two target repositories does not have — so sequence this behind that issue, or write the instruction so it degrades to the scan where the script is absent.
Then amend the spec first and the prompt after it, per CLAUDE.md’s rule
that the specs outrank the operating prompts: R12 and the Environment
paragraph, then prompts/project-reviewer.md’s two lines.
Deferred from PR #476 (out of that item’s explicit scope) and flagged for the maintainer by its Reviewer: https://github.com/Poetic-Poems/agent-ops/pull/476#issuecomment-5304611637