Skip to content

Phase 1: Foundation — Engine + Core (E1-E3, C1-C11) #10

Description

@mikewolfd

Motivation

Push spec-level logic and structural queries down to the engine and core layers. These are prerequisites for MCP full coverage (Phase 2) and the ProposalManager (Phase 4A). Nothing else can start until this foundation is in place.

Parent epic: #9 — Unified Authoring Architecture

Scope

Pass 1a: Engine Exports (E1-E3)

  • E1: FEL identifier extraction — engine exports predicates instead of studio hardcoding
  • E2: Type predicates — item type checks, dataType checks, bind type checks
  • E3: Function catalog — engine exports the FEL function catalog for tooling/display

Pass 1b: Bind Normalization + Field Paths (C1, C8)

  • C1: Bind normalization — canonical form, eliminates studio duplication (normalizeBinds in LogicTab/CommandPalette)
  • C8: Field path flattening — flat path list from nested definition tree

Pass 1c: Tree + Selection Ops (C5-C7)

  • C5: Drop targets — valid drop target computation for DnD
  • C6: Tree flattening — flat item list with depth/parent metadata
  • C7: Selection operations — multi-select, range select, structural ops

Pass 1d: Queries + Serialization (C2-C4, C9-C11)

  • C2: Shape queries — list, lookup, filter by path/severity
  • C3: Option set queries — lookup, usage tracking
  • C4: Page queries — list, lookup, item-to-page mapping
  • C9: Search — item search by key/label/type with filtering
  • C10: Serialization — export definition/response/bundle in canonical form
  • C11: Diagnostics — structural validation queries (duplicate keys, cycle detection, ref resolution)

Acceptance Criteria

  • All predicates, queries, and operations are exported from formspec-engine or formspec-core (not hardcoded in studio)
  • Studio code that duplicates these functions is deleted and replaced with imports
  • Unit tests at the engine/core layer for each exported function
  • npm run check:deps passes (no upward dependency violations)

Layer

Engine / Core (Layers 1-2)

Dependencies

None — this is the foundation.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions