type TestLayer = 'contract' | 'unit' | 'integration' | 'e2e' | 'api' | 'ui' | 'data' | 'cli'; type TestMode = 'mock' | 'live' | 'hybrid'; interface TestEnvBase { mode: TMode; stop: () => Promise; } interface SpecCase { id: string; observation: string; given: string; when: string; then: string; priority: 'P0' | 'P1' | 'P2' | 'P3'; automation: 'yes' | 'no' | 'manual'; mode?: TestMode; route?: string; notes?: string; } interface SpecDoc { module: string; layer: TestLayer; cases: SpecCase[]; raw: string; warnings: string[]; } interface Lease { value: T; release: () => Promise; } interface Pool { size: number; borrow: () => Promise>; stopAll: () => Promise; } interface ParseOptions { module?: string; defaultLayer?: TestLayer; } declare function parseSpec(markdown: string, opts?: ParseOptions): SpecDoc; interface PoolFactoryOptions { size: number; acquire: () => Promise; reset?: (value: T) => Promise; release?: (value: T) => Promise; } declare function createPool(opts: PoolFactoryOptions): Promise>; export { type Lease, type ParseOptions, type Pool, type PoolFactoryOptions, type SpecCase, type SpecDoc, type TestEnvBase, type TestLayer, type TestMode, createPool, parseSpec };