/** * peaks-workflow v3.0.0 โ€” Slice A.1 + Slice B.1 * * Schema for `.peaks/workflows/.yaml` (text + git, reviewable per ADR * 0007 v2 concern #1). Workflows are the WHO/HOW/WITH-WHAT layer; SOPs * remain the WHAT layer (gate definitions). Workflows reference SOPs * for their gates โ€” never duplicate gate logic. * * The schema is intentionally narrow on v3.0.0: * - phases[] (ordered or grouped for parallelism) * - gates[] (sop-id references โ€” the leaf primitive) * - evaluators[] (native evaluator types the runtime can call directly * without LLM scheduling) * - contextSnapshot (files + scope the LLM/worker should preload) * - budget (token + wall + cycle caps) * * Karpathy ยง2 Simplicity First: no external framework, no DSL, no new * IO. Pure types + a single `parseWorkflowYaml` / `lintWorkflowSpec` * pair. Anything more elaborate (e.g. conditionals on outputs) belongs * in a future minor. * * File budget: 300 raw lines (the cap decided by * `src/services/scan/file-size-policy.ts`). This file holds the parser; * the private constants and build helpers live in * `workflow-spec-builders.ts` (wave-5 hoist); types live in * `workflow-spec-types.ts`; YAML field helpers live in * `workflow-spec-yaml.ts`; lint lives in `workflow-spec-lint.ts`. * The re-export shim at the bottom preserves the original public surface * so external callers (`workflow-loader.ts`, `loop-eval-commands.ts`, * `evaluator-dispatcher.ts`) compile unchanged. */ import type { WorkflowSpec } from './workflow-spec-types.js'; /** Parse a raw yaml string into a workflow spec. Pure (no IO), throws on * unparseable input. Use `lintWorkflowSpec` after parsing for semantic checks. */ export declare function parseWorkflowYaml(raw: string, expectedId: string): WorkflowSpec; export { lintWorkflowSpec } from './workflow-spec-lint.js'; export type { EvaluatorKind, WorkflowBudget, WorkflowContextSnapshot, WorkflowEvaluator, WorkflowGate, WorkflowLintReport, WorkflowPhase, WorkflowSpec } from './workflow-spec-types.js';