unic / unic/unic-agents-plugins

[unic-pr-review] Advisory Notice for Work Items mentioned in the PR title but not linked

Open
#253 0 comments 0 reactions 1 assignee View on GitHub

@orioltf is already working on this.

Since Aug 11, 2026.

app:unic-pr-review feature needs-specs
Dominant language
JavaScript
Stars
1
Forks
0
Avg merge
16h 43m
Merged PRs (30d)
19

Description

Summary

When a PR title references Work Item ids that are not linked to the PR via pullrequestworkitems, surface them to the Reviewer (and to PR owners, via the posted Review Summary) as an advisory Notice, so the owner can decide whether to link the missing Work Item(s) and re-review for intent coverage.

Spun out of #252. In that repro (PR #5647), the title was [42602] [42611] [42612] TravelData v2 Import... but only 42602, 42610, 42611 were linked — so 42612 is mentioned-but-unlinked. Nothing surfaces that today.

Why this is not a relaxation of the no-scraping doctrine

The ADR-0001 amendment forbids regex-scraping the title/description for intent discovery — i.e. scraped ids must never be treated as authoritative Work Items or fed to the Intent Checker. This feature is advisory only: it flags a possible missing link for a human. Scraped ids are never gathered as intent.

Design (pinned, AFK-ready)

  • Detection pattern (conservative, low-noise): match [NNNN] and AB#NNNN tokens in the PR title → capture the integer ids → compare against the linked workItemRefs ids.
  • One-directional: warn only about title-mentioned ids that are not linked. Never warn about linked-but-not-in-title (linking is authoritative).
  • Surface as a Notice at the top of the Review Summary (rides the existing Notice rail; appears in the terminal preview and, in --post, in the posted General Comment Thread so PR owners see it).
  • Never feeds intent gathering — purely informational.
  • Empty case (all title-mentioned ids are linked, or none found) → no Notice.

Likely touch-points

  • commands/review-pr.md — compute the title-vs-linked diff after Work Item discovery; add titleUnlinkedWorkItems (or similar) to the NoticesContext.
  • scripts/render-summary.mjs / the notices renderer — render the advisory Notice.
  • A small pure helper + unit test for the title-id extraction + set-diff (deterministic, [CI]-testable).

Acceptance criteria (draft)

  • [CI] Pure helper extracts [NNNN] and AB#NNNN ids from a title and returns the set difference against linked ids (covered by unit tests, incl. empty/no-match cases).
  • [doc-review] Review Summary shows a Notice listing title-mentioned-but-unlinked Work Item ids when the difference is non-empty; nothing when empty.
  • [doc-review] The Notice text invites the PR owner to link the missing Work Item(s) and re-review; the ids are never used for intent gathering.

Dependencies

Best landed after #252 (which moves workItemRefs to a top-level Fetcher field and reworks Step 1.5).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.