Depends on the browser extension scaffold (sibling Phase 6 issue, apps/gittensory-miner-extension/) landing first.
The score to surface already exists as a pure function: packages/gittensory-miner/lib/opportunity-ranker.js's rankCandidateIssues/rankCandidateIssuesWithSummary (:104-118) compose the deterministic engine ranker (rankMetadataOpportunities from @jsonbored/gittensory-engine) over normalized candidates and return a ranked list. This badge surfaces that same signal directly on a GitHub issue page — read-only, matching the Phase 1 design principle already written down in packages/gittensory-miner/docs/cross-repo-discovery-phase1.md's Acceptance section (:50-55): "Read-only... every deliverable in this Phase 1 batch performs GET/list/search only; no GitHub writes." The badge displays a precomputed or locally-computed rank/tier; it does not claim, comment, or otherwise act on the issue.
Mechanically, this is the same content-script-overlay pattern the existing (differently-scoped) apps/gittensory-extension/content.js already uses on GitHub pages — path-matching via a small regex against location.pathname (matchGitHubPageTarget), then mounting a DOM node into the page, falling back to a floating position if the expected sidebar host isn't found (mountOverlay). That pattern is directly reusable here even though the product/audience differs (see the scaffold issue for that distinction).
Deliverables
References
packages/gittensory-miner/lib/opportunity-ranker.js:104-118 (rankCandidateIssues, rankCandidateIssuesWithSummary) — the scoring signal this badge surfaces.
packages/gittensory-miner/docs/cross-repo-discovery-phase1.md:50-55 (Acceptance section) — the read-only boundary this badge must respect.
apps/gittensory-extension/content.js:1-19 (matchGitHubPageTarget, mountOverlay) — the mechanical DOM-mount pattern to reuse (different product, same mechanism).
- Sibling Phase 6 issue:
feat(miner-extension): scaffold browser extension surface — hard dependency.
Depends on the browser extension scaffold (sibling Phase 6 issue,
apps/gittensory-miner-extension/) landing first.The score to surface already exists as a pure function:
packages/gittensory-miner/lib/opportunity-ranker.js'srankCandidateIssues/rankCandidateIssuesWithSummary(:104-118) compose the deterministic engine ranker (rankMetadataOpportunitiesfrom@jsonbored/gittensory-engine) over normalized candidates and return a ranked list. This badge surfaces that same signal directly on a GitHub issue page — read-only, matching the Phase 1 design principle already written down inpackages/gittensory-miner/docs/cross-repo-discovery-phase1.md's Acceptance section (:50-55): "Read-only... every deliverable in this Phase 1 batch performs GET/list/search only; no GitHub writes." The badge displays a precomputed or locally-computed rank/tier; it does not claim, comment, or otherwise act on the issue.Mechanically, this is the same content-script-overlay pattern the existing (differently-scoped)
apps/gittensory-extension/content.jsalready uses on GitHub pages — path-matching via a small regex againstlocation.pathname(matchGitHubPageTarget), then mounting a DOM node into the page, falling back to a floating position if the expected sidebar host isn't found (mountOverlay). That pattern is directly reusable here even though the product/audience differs (see the scaffold issue for that distinction).Deliverables
opportunity-ranker.js's exports through the extension's background script (not duplicating the ranking math in extension code); if only the hosted discovery-index (Phase 6 discovery-plane issues) is available in a given install, degrade gracefully rather than erroring.cross-repo-discovery-phase1.md's Acceptance criteria.References
packages/gittensory-miner/lib/opportunity-ranker.js:104-118(rankCandidateIssues,rankCandidateIssuesWithSummary) — the scoring signal this badge surfaces.packages/gittensory-miner/docs/cross-repo-discovery-phase1.md:50-55(Acceptance section) — the read-only boundary this badge must respect.apps/gittensory-extension/content.js:1-19(matchGitHubPageTarget,mountOverlay) — the mechanical DOM-mount pattern to reuse (different product, same mechanism).feat(miner-extension): scaffold browser extension surface— hard dependency.