overengineeringstudio / overengineeringstudio/effect-utils

Standardize workspace resolution patterns in genie for megarepo consumers

Open
#244 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

origin:agent type:agent-tooling
Dominant language
TypeScript
Stars
82
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
121

Description

Context

createWorkspaceDepsResolver in @overeng/genie runtime enables import-based workspace resolution where each package's pnpm-workspace.yaml.genie.ts imports its deps' package.json.genie.ts files, and the resolver does BFS to find all transitive workspace deps.

This pattern works well for single-repo setups (effect-utils with ~12 @overeng/ packages). However, megarepo consumers composing multiple repos face additional challenges:

  1. Cross-repo scope mapping — packages span multiple scopes (@livestore/, @diffstream/, @overeng/, etc.) at different directory depths. The resolveWorkspacePath callback needs a scope-to-path mapping.

  2. Parallel patterns — livestore currently uses a separate approach: an explicit workspaceDeps graph with resolveTransitiveDeps() instead of createWorkspaceDepsResolver. Both solve the same problem differently.

Proposal

Short-term: Converge patterns

Migrate livestore to use createWorkspaceDepsResolver (same as effect-utils), eliminating the redundant manual dep graph + transitive resolver.

Medium-term: Upstream cross-repo helpers

Add reusable helpers to genie runtime for megarepo consumers:

  • Scope-path registry — declarative mapping from package name prefixes to workspace-root-relative directories:

    const scopePathMap = {
      '@livestore/': 'repos/livestore/packages/@livestore/',
      '@overeng/': 'packages/@overeng/',
    }
    
  • createMegarepoWorkspaceDepsResolver — wraps createWorkspaceDepsResolver with scope-based path computation, so consumers only declare the mapping instead of writing custom resolveWorkspacePath callbacks.

  • Effect-utils package registry re-export — effect-utils packages' package.json.genie.ts files need to be importable by downstream repos for BFS resolution. Consider a single re-export module.

Current Workaround

Each megarepo consumer implements their own resolveWorkspacePath with a scope map. This works but is boilerplate that could be shared.


Filed by Claude on behalf of @schickling

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the createWorkspaceDepsResolver pattern with livestore's workspaceDeps and resolveTransitiveDeps() approach. Review the pnpm-workspace.yaml.genie.ts and package.json.genie.ts entry points, then clarify the intended scope-map helper and migration boundaries. Done requires an agreed reusable cross-repo resolver design and a defined convergence plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.