Skip to content

feat: registry query layer — shared foundation for layout manifest (#670) and impact analysis (#733) #748

Closed

Description

@diberry

Summary

PRD: docs/proposals/registry-query-layer.md

PR #737 ships .squad/repo-registry.json with module/owner/package/criticality data and low-level utilities. But both #670 (versioned file layout manifest) and #733 (PR impact analysis) need a query and analysis layer on top of that data — and they need the same one, or they'll diverge on file resolution, criticality scoring, and owner mapping.

This issue tracks building scripts/registry-query.mjs: a set of pure functions that take the repo registry + a list of file paths and return structured analysis (modules touched, owners involved, criticality distribution, risk tier, boundary crossings).

Why This Must Be One Shared Foundation

  1. Single resolution algorithm. File→module uses longest-prefix matching. Independent implementations will disagree on edge cases (nested modules like src/cli/shell/ vs src/cli/).
  2. Single criticality model. Both need the same tier definitions and scoring.
  3. Single owner resolution. PRD: Versioned file layout manifest - single source of truth for directory structure #670 needs it for validation diagnostics; feat: PR architectural impact analysis — blast radius, module boundaries, reviewer routing #733 needs it for reviewer routing.
  4. Composability. Pure function: analyzeFiles(registry, filePaths) → AnalysisResult. PRD: Versioned file layout manifest - single source of truth for directory structure #670 calls it with expected files; feat: PR architectural impact analysis — blast radius, module boundaries, reviewer routing #733 calls it with PR diff files.

API Surface

Depends On

Feeds Into

Acceptance Criteria

See full PRD at docs/proposals/registry-query-layer.md for detailed criteria. Key gates:

File Layout

scripts/registry-query.mjs ← NEW (this issue) test/registry-query.test.ts ← NEW (this issue)

Builds on top of #737's scripts/registry-utils.mjs and .squad/repo-registry.json.

Activity

  1. diberry commented on Apr 6, 2026

    @diberry
    ContributorAuthor

    ✈️ Flight PRD Assessment

    Verdict: PRD is complete — well-specified with clear API surface and dependency chain.

    The issue body defines the full API (5 functions), acceptance criteria, and file layout. References the external PRD at docs/proposals/registry-query-layer.md.

    Strengths:

    Assessment:

    Recommendation: Ready to implement immediately after #736 ships. Pure-function design makes this easy to test in isolation.

  2. diberry commented on Apr 8, 2026

    @diberry
    ContributorAuthor

    Closing: blocked — dependency PR #737 closed without merge, implementation PR #749 also closed. Would need full restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions