/** * THEN Clause Pattern Engine * * Transforms natural-language THEN clauses from OpenSpec scenarios into * framework-specific assertion lines — without any LLM call. * * Design principles: * - Pure functions only, no I/O * - Each pattern matches a common spec phrase and emits assertions * - Multiple assertions can be emitted per THEN line * - Falls back to a TODO placeholder when no pattern matches * - Framework-aware: same pattern emits different syntax per framework * * Adding a new pattern: * 1. Add a ThenPattern to PATTERNS below * 2. Add assertions for every framework in its `assertions` object * (the Record type makes the compiler enforce this) */ import type { TestFramework } from '../../types/test-generator.js'; export interface ThenMatch { /** Assertion source lines for the given framework */ lines: string[]; /** Which THEN clause index this matched */ thenIndex: number; /** true = came from pattern engine; false = placeholder */ fromPattern: boolean; } /** * Match THEN clauses against the pattern library and return assertion lines. * * @param thenClauses Array of THEN clause strings (one per bullet) * @param framework Target test framework * @returns Array of ThenMatch — one per THEN clause */ export declare function matchThenClauses(thenClauses: string[], framework: TestFramework): ThenMatch[]; //# sourceMappingURL=then-matchers.d.ts.map