Skip to content

Path-pattern overlap engine

State: open/verified · Kind: module · Audience: system

  • Decides whether two path patterns (globs) or a path and a pattern share a common matching path, as pure pattern algebra with no filesystem access.
  • Layered as a zero-dependency segment core and path-string API, with an opt-in fs layer for resolving against a real tree.

Intersect answers one question — do two path patterns overlap? — by compiling each glob into an automaton and testing product-automaton reachability, never touching disk except through its separate fs entry point. It exposes pairwise primitives (intersects, matches, whichMatch, overlapping, witness) and a compiled Matcher for repeated queries against a fixed pattern set, plus a registry (index) for resolving which labeled pattern-sets (guidelines, standards) apply to a scope.

  • intersects/matches/overlapping/witness pairwise overlap primitives over glob strings
  • compile for an amortized Matcher bound to a fixed pattern set
  • index/registry for scope-to-labeled-pattern-set resolution
  • @sksizer/intersect/fs for resolving patterns against real files (pulls tinyglobby)
  • packages/ts/intersect/index.ts (L1 path API)
  • packages/ts/intersect/segments/ (L0 core engine)
  • packages/ts/intersect/fs.ts (L2 filesystem layer)
  • packages/ts/intersect/
  • packages/ts/intersect/index.ts
  • packages/ts/intersect/segments/index.ts
  • packages/ts/intersect/fs.ts
  • packages/rust/intersect/
  • packages/rust/intersect/src/path.rs#intersects
  • packages/rust/intersect/src/segments/
  • packages/rust/intersect/src/fs.rs#resolve_intersection

← Back to Capabilities