c0357b152f
Imhotep-core: add predicate-specs.ts with 34 PredicateSpec entries as
the single source of truth for predicate metadata (name, arity,
aliases, requiredFacts, validOptions, diagnosticCode, relationCode,
decompose rules, category flags). Lookup helpers derive all
per-predicate information from the static table.
Extraction.ts (3 consumers converted):
- computeRequiredFacts: replace getRequiredFactsForPredicate (global
registry) with getPredicateRequiredFacts (static spec table).
Removes registerDefaultPredicates() dependency from fact planning.
- compileCanonicalClauseToFormula: replace 4 string-branch patterns
('between'/'separatedFrom'/'atLeast'/'aspectRatio'/'inStackingContext')
with spec-driven getPredicateDecomposition() and isUnaryPredicate().
Same behavior, zero string dispatch in predicate selection.
- mapFolDiagnostic: replace PREDICATE_TO_DIAGNOSTIC_CODE (13-entry
Record) with getPredicateDiagnosticCode() from spec table.
595 SDK + 57 hard E2E tests pass.
imhotep-core
Foundation types and contracts for Imhotep. Defines the AST/IR, geometry world schema, diagnostic taxonomy, pipeline contracts, FOL AST/IR representations, domain/value types, scene target descriptors, property contract/results types, and geometry snapshot caching.
Key Exports
| Module | Description |
|---|---|
types |
Core type definitions (positions, IDs, results, proofs) |
ast |
Unist-style AST node definitions |
ir |
Semantic IR and execution IR |
world |
Geometry world schema tables |
contracts |
Extractor, solver, compiler, reporter interfaces |
diagnostics |
Diagnostic categories, error codes, traces, shrinking |
logic-ast |
FOL AST types (quantifiers, connectives, predicates) |
logic-ir |
Lowered FOL IR for logic engine |
canonical |
Canonical world adapter for solver |
geometry-cache |
Disk-based extraction caching |