Files
gitlore/docs/ideas/unlinked.md
Taylor Eernisse 4185abe05d docs: add feature ideas catalog, time-decay scoring plan, and timeline issue doc
Ideas catalog (docs/ideas/): 25 feature concept documents covering future
lore capabilities including bottleneck detection, churn analysis, expert
scoring, collaboration patterns, milestone risk, knowledge silos, and more.
Each doc includes motivation, implementation sketch, data requirements, and
dependencies on existing infrastructure. README.md provides an overview and
SYSTEM-PROPOSAL.md presents the unified analytics vision.

Plans (plans/): Time-decay expert scoring design with four rounds of review
feedback exploring decay functions, scoring algebra, and integration points
with the existing who-expert pipeline.

Issue doc (docs/issues/001): Documents the timeline pipeline bug where
EntityRef was missing project context, causing ambiguous cross-project
references during the EXPAND stage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:16:48 -05:00

2.5 KiB

Unlinked MR Finder

  • Command: lore unlinked [--since <date>]
  • Confidence: 83%
  • Tier: 2
  • Status: proposed
  • Effort: low — LEFT JOIN queries

What

Two reports:

  1. Merged MRs with no entity_references at all (no "closes", no "mentioned", no "related") — orphan MRs with no issue traceability
  2. Closed issues with no MR reference — issues closed manually without code change

Why

Process compliance metric. Unlinked MRs mean lost traceability — you can't trace a code change back to a requirement. Manually closed issues might mean work was done outside the tracked process, or issues were closed prematurely.

Data Required

All exists today:

  • merge_requests (state, merged_at)
  • issues (state, closed/updated_at)
  • entity_references (for join/anti-join)

Implementation Sketch

-- Orphan merged MRs (no references at all)
SELECT mr.iid, mr.title, mr.author_username, mr.merged_at,
       p.path_with_namespace
FROM merge_requests mr
JOIN projects p ON mr.project_id = p.id
LEFT JOIN entity_references er
    ON er.source_entity_type = 'merge_request' AND er.source_entity_id = mr.id
WHERE mr.state = 'merged'
  AND mr.merged_at >= ?1
  AND er.id IS NULL
ORDER BY mr.merged_at DESC;

-- Closed issues with no MR reference
SELECT i.iid, i.title, i.author_username, i.updated_at,
       p.path_with_namespace
FROM issues i
JOIN projects p ON i.project_id = p.id
LEFT JOIN entity_references er
    ON er.target_entity_type = 'issue' AND er.target_entity_id = i.id
    AND er.source_entity_type = 'merge_request'
WHERE i.state = 'closed'
  AND i.updated_at >= ?1
  AND er.id IS NULL
ORDER BY i.updated_at DESC;

Human Output

Unlinked MRs (merged with no issue reference, last 30 days)

  !245  Fix typo in README              (alice, merged 2d ago)
  !239  Update CI pipeline              (bob, merged 1w ago)
  !236  Bump dependency versions         (charlie, merged 2w ago)

Orphan Closed Issues (closed without any MR, last 30 days)

  #92   Update documentation for v2      (closed by dave, 3d ago)
  #88   Investigate memory usage          (closed by eve, 2w ago)

Downsides

  • Some MRs legitimately don't reference issues (chores, CI fixes, dependency bumps)
  • Some issues are legitimately closed without code (questions, duplicates, won't-fix)
  • Noise level depends on team discipline

Extensions

  • lore unlinked --ignore-labels "chore,ci" — filter out expected orphans
  • Compliance score: % of MRs with issue links over time (trend metric)