Files
gitlore/docs/ideas/collaboration.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.9 KiB

Author Collaboration Network

  • Command: lore collaboration [--since <date>]
  • Confidence: 70%
  • Tier: 3
  • Status: proposed
  • Effort: medium — self-join on notes, graph construction

What

Build a weighted graph of author pairs: (author_A, author_B, weight) where weight = number of times A reviewed B's MR + B reviewed A's MR + they both commented on the same entity.

Why

Reveals team structure empirically. Shows who collaborates across team boundaries and where knowledge transfer happens. Useful for re-orgs, onboarding planning, and identifying isolated team members.

Data Required

All exists today:

  • merge_requests (author_username)
  • notes (author_username, note_type='DiffNote')
  • discussions (for co-participation)

Implementation Sketch

-- Review relationships: who reviews whose MRs
SELECT
    mr.author_username as author,
    n.author_username as reviewer,
    COUNT(*) as review_count
FROM merge_requests mr
JOIN discussions d ON d.merge_request_id = mr.id
JOIN notes n ON n.discussion_id = d.id
WHERE n.note_type = 'DiffNote'
  AND n.is_system = 0
  AND n.author_username != mr.author_username
  AND mr.created_at >= ?1
GROUP BY mr.author_username, n.author_username;

-- Co-participation: who comments on the same entities
WITH entity_participants AS (
    SELECT
        COALESCE(d.issue_id, d.merge_request_id) as entity_id,
        d.noteable_type,
        n.author_username
    FROM discussions d
    JOIN notes n ON n.discussion_id = d.id
    WHERE n.is_system = 0
      AND n.created_at >= ?1
)
SELECT
    a.author_username as person_a,
    b.author_username as person_b,
    COUNT(DISTINCT a.entity_id) as shared_entities
FROM entity_participants a
JOIN entity_participants b
    ON a.entity_id = b.entity_id
    AND a.noteable_type = b.noteable_type
    AND a.author_username < b.author_username  -- avoid duplicates
GROUP BY a.author_username, b.author_username;

Output Formats

JSON (for further analysis)

{
  "nodes": ["alice", "bob", "charlie"],
  "edges": [
    { "source": "alice", "target": "bob", "reviews": 15, "co_participated": 8 },
    { "source": "bob", "target": "charlie", "reviews": 3, "co_participated": 12 }
  ]
}

Human

Collaboration Network (last 90 days)

  alice <-> bob         15 reviews, 8 shared discussions    [strong]
  bob <-> charlie        3 reviews, 12 shared discussions   [moderate]
  alice <-> charlie      1 review, 2 shared discussions     [weak]
  dave <-> (none)        0 reviews, 0 shared discussions    [isolated]

Downsides

  • Interpretation requires context; high collaboration might mean dependency
  • Doesn't capture collaboration outside GitLab
  • Self-join can be slow with many notes

Extensions

  • lore collaboration --format dot — GraphViz network diagram
  • lore collaboration --isolated — find team members with no collaboration edges
  • Team boundary detection via graph clustering algorithms