Decomposer

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/src/orchestrator/core/decomposer.tsRelative: loom/src/orchestrator/core/decomposer.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 230Bytes: 8,248Imports: 7Exports: 2

Content Preview

  1. /**
  2. * H1.3 — Decompose a goal spec into a sequence of StageSpec[] via a single
  3. * model call. Each StageSpec is validated against stage-spec.schema.json.
  4. *
  5. * Rejects any stage whose done_criteria are not machine-evaluable every
  6. * predicate must have kind ∈ {exit_code, http_status, schema_valid,
  7. * file_exists, test_pass, sql_assert}. On violation, re-prompt with the
  8. * SPECIFIC violation text, max 2 model attempts, then throw DecompositionError.
  9. */
  10. import { parseContract, checkContract } f