Skip to content

[M10/LNS-004] Implement 5 core lenses #233

@flyingrobots

Description

@flyingrobots

LNS-004: Implement 5 Core Lenses

Parent: #227 (M10 LENS)

What

Implement 5 core lenses using DAG utilities from LNS-001:

  1. incomplete — filter to nodes missing status:done/status:closed (needs properties)
  2. frontier — filter to leaf nodes (no outgoing edges in the filtered set)
  3. critical-path — filter to longest dependency chain (uses topoSort + chain walking)
  4. blocked — filter to nodes with unresolved incoming blocks edges
  5. parallel — filter to nodes with no mutual dependency (can execute concurrently)

Why

These are the most immediately useful projections for task/project management workflows.

Acceptance Criteria

  • Each lens registered via defineLens from LNS-002
  • Each lens uses DAG utilities from src/dag.js (LNS-001)
  • incomplete correctly checks node properties for status
  • frontier finds leaves in the filtered subgraph
  • critical-path returns the longest chain
  • blocked checks blocks edge type specifically
  • parallel identifies independent nodes
  • Comprehensive tests for each lens with fixture graphs
  • Edge cases: empty graph, single node, cycles (critical-path should handle gracefully)

Dependencies

  • LNS-001 (DAG utilities)
  • LNS-002 (lens registry)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmilestone:M10M10 LENS — Composable View Projectionswave:1Wave 1 — Foundation (lenses + context + contracts)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions