Skip to content

Show score breakdown and selection rationale in dry-run / preview output #27

@chigichan24

Description

@chigichan24

Why

  • The current dry-run output (scripts/cli.ts:177-186) only shows [score] label + keywords + session count.
  • That tells the user what ranked highly, but not why. Without re-reading the algorithm doc, users cannot quickly judge whether the score is meaningful or noisy.
  • A richer breakdown would let users immediately see which signal drove the ranking and whether to trust it. This is part of making the dry-run / preview feel "rich enough to decide on" rather than "barely a teaser".

What

  • For each top candidate in dry-run / preview output, surface:
    • Per-signal contribution to reusabilityScore (text TF-IDF, tool-IDF, structural features, successRate, helpfulness, etc.)
    • Top connected sessions with brief summaries (use SessionSummary.summaryText when available)
    • Top connected topics from the knowledge graph (community membership, centrality)
  • Output should stay terse and human-readable; design for skim-ability, not exhaustive logs.

How

  • ReusabilityScore already carries some component fields (successRate?, helpfulness?). Extend it to expose explicit per-signal contributions used during ranking.
  • Centralize the per-candidate detail rendering in a small helper so dry-run and preview share the same source of truth.
  • Tests: snapshot-style assertions on the rendered string for a couple of fixture candidates.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions