Skip to main content
Engineering/repository-discovery

Repository Discovery

You need to map verified services to code repositories, service root paths, and maintainers.

Contributed by: Mark Whaley · Source: PM Starter Kit

Use this when a PM needs to know which code repositories implement which services, where in those repos each service lives, and who maintains them. Takes verified services from /architecture-context-reviewer and resolves them to repos, service root paths, and ownership using service catalogs, repo metadata, CODEOWNERS, and build artifacts.

This skill grounds downstream code analysis in the correct locations. It sits in the Feature Impact Radar pipeline: /technical-intent-parser/architecture-context-reviewer/repository-discovery/codependency-analyzer.

Process

Step 1: Gather inputs

Ask the user:

  1. Services — The verified service names from /architecture-context-reviewer (e.g., billing-service, notification-service). If coming from the pipeline, these are already available.
  2. Systems involved — The system domains (e.g., billing, notifications, user_preferences).
  3. Repo host — Where does your code live? (GitHub, GitLab, Bitbucket.) Which org(s) should I search?
  4. Repo model — Is the codebase primarily a monorepo, many service repos (polyrepo), or mixed?
  5. Service catalog link (optional) — Do you have a service catalog/registry (Backstage, Cortex, etc.) that maps services to repos?

If services and systems are missing, stop and request them (or run the upstream skills first).

Step 2: Identify which personas are affected

Before generating the discovery, prompt the user:

Persona check: Which user persona(s) does this codebase serve? If you have defined personas (e.g., from /persona-create or /persona-draft), name them. If not, describe who uses the product these services power.

This connects repository structure to real user outcomes and helps prioritize which repos matter most for product decisions.

Step 3: Resolve service → repo mapping

For each service, follow this priority order:

Primary path — Service catalog/registry:

  • Check for repo URL, repo slug (org/repo), service descriptor (catalog-info.yaml), and owning team.

Fallback — Repo host search (only if catalog mapping is missing):

  • Search with progressively broader queries:
    • Exact service name: "billing-service"
    • Likely variants: "billing", "billing svc", "billing api"
    • Service descriptors: catalog-info.yaml or service.yaml containing the service name
    • Deployment artifacts: Helm chart names, Docker image names

Verification rule: Do not accept a repo as a match until you see at least one of:

  • Service descriptor file declaring the service
  • Build artifact naming the service
  • Documentation clearly stating "this repo is the service"

Step 4: Identify service root paths

If monorepo:

  • Locate the service root directory using catalog-info.yaml/service.yaml paths, Dockerfile + build pipeline references, or directory conventions (services/<name>, apps/<name>).

If single-service repo:

  • Service path is / (repo root), unless evidence says otherwise.

Step 5: Extract maintainers/owners

For each repo and/or service path, extract maintainers from:

  • CODEOWNERS (path-level owners preferred)
  • OWNERS / MAINTAINERS
  • Service catalog ownership fields
  • On-call/team metadata

Prefer team slugs/handles over individuals (e.g., payments-team). If only individuals are available, include them and note that team owner is unknown.

Step 6: Present the discovery

## Repository Discovery — (Feature/Context Name)

**Date:** (Date)
**Repo host:** (GitHub/GitLab/Bitbucket)
**Repo model:** (Monorepo / Polyrepo / Mixed)
**Confidence level:** (High / Medium / Low)

---

### Repositories

| Repository | Description | Primary language |
|---|---|---|
| (org/repo) | (What this repo contains) | (Language/framework) |

### Service → Repo Mapping

| Service | Repository | Service root path | Evidence |
|---|---|---|---|
| (service-name) | (org/repo) | (path, e.g., `/` or `services/billing`) | (How this was confirmed) |

### Maintainers / Owners

| Repository : Path | Owning team | Source |
|---|---|---|
| (org/repo:path) | (team slug) | (CODEOWNERS / catalog / repo settings) |

### Discovery Gaps

- (What couldn't be resolved — e.g., "No repo found for user-preferences-service")
- (Missing evidence — e.g., "CODEOWNERS not present in messaging/notification-platform")

### Questions for the Team

1. (Question about gaps — e.g., "Which repo implements user-preferences-service?")
2. (Question about ownership — e.g., "Who maintains the shared libraries in core/monorepo:libs/?")

Step 7: Review and validate

Ask the user:

  • Do the repo mappings look correct?
  • Are there repos I missed that contain relevant services?
  • Are the ownership mappings accurate?
  • Ready to proceed to /codependency-analyzer with these repo locations?

Adjust as needed.

Related skills

  • /architecture-context-reviewer — upstream: provides the verified services this skill maps to repos.
  • /codependency-analyzer — next step: analyzes code dependencies within the discovered repos.
  • /technical-intent-parser — pipeline entry point: decomposes a feature into technical signals.
  • /context-packet — when building broader project context that includes codebase as one input.

Output location

Present the repo mapping, maintainers, and gaps as formatted text in the conversation. The output feeds directly into /codependency-analyzer and downstream pipeline skills. The user may also use it as a standalone reference for codebase onboarding or engagement discovery.

Example Output

Input

  • Services (from /architecture-context-reviewer): subscription-service, invoice-service, payment-gateway-adapter, notification-dispatcher
  • Systems involved: billing, payments, notifications
  • Repo host: GitHub — org luminary-health
  • Repo model: Mixed — core platform is a monorepo (luminary-health/platform), but legacy payment integration lives in a standalone polyrepo
  • Service catalog link: Backstage instance at backstage.internal.luminaryhealth.com

Output (abbreviated)

Repository Discovery — Subscription Billing Overhaul

Date: 2025-01-14 Repo host: GitHub (luminary-health org) Repo model: Mixed (monorepo + legacy polyrepo) Confidence level: Medium — three services confirmed via Backstage; one resolved via fallback search only


Repositories

RepositoryDescriptionPrimary language
luminary-health/platformCore platform monorepo — billing, notifications, and internal APIsTypeScript / Node.js
luminary-health/stripe-adapterLegacy standalone service wrapping Stripe API; predates platform monorepo migrationPython

Service → Repo Mapping

ServiceRepositoryService root pathEvidence
subscription-serviceluminary-health/platformservices/billing/subscriptioncatalog-info.yaml declares service; Backstage record confirmed
invoice-serviceluminary-health/platformservices/billing/invoicingcatalog-info.yaml present; Dockerfile at path root
payment-gateway-adapterluminary-health/stripe-adapter/Backstage record links to this repo; service.yaml names payment-gateway-adapter
notification-dispatcherluminary-health/platformservices/notifications/dispatcherDirectory convention match + Helm chart named notification-dispatcher; no catalog-info.yaml present

Maintainers / Owners

Repository : PathOwning teamSource
luminary-health/platform:services/billing@luminary-health/billing-platformCODEOWNERS line /services/billing/ @luminary-health/billing-platform
luminary-health/platform:services/notifications/dispatcher@luminary-health/comms-engBackstage catalog spec.owner field
luminary-health/stripe-adapter:/Individual: @rpetrescu (team owner unknown)CODEOWNERS — no team slug assigned

Discovery Gaps

  • notification-dispatcher has no catalog-info.yaml; ownership was inferred from Backstage only — not corroborated by CODEOWNERS at the service path level
  • luminary-health/stripe-adapter has no team slug in CODEOWNERS; only individual @rpetrescu is listed — team ownership is unconfirmed
  • No evidence found for a separate billing-events service mentioned informally in the architecture notes; excluded pending confirmation

Questions for the Team

  1. Is @rpetrescu the correct escalation point for payment-gateway-adapter, or has ownership transferred to a team since the monorepo migration began?
  2. Should notification-dispatcher have a catalog-info.yaml added before the /codependency-analyzer pass, or is Backstage metadata sufficient?
  3. Is there a billing-events producer service in scope for this feature, and if so, which repo and path should we target?

Ready to proceed to /codependency-analyzer — confirm mappings above or flag corrections before continuing.