import type { WorkOrder } from "./prompts.js"; import type { FeatureFile, ScenarioSlice, VerticalSlice } from "./types.js"; export interface ScenarioQualityFinding { scenario: string; rule: string; problem: string; suggestion: string; } export interface ScenarioQualityReport { passed: boolean; findings: ScenarioQualityFinding[]; } /** Phase 0 — Orient and plan. */ export interface Orienter { readFeatureFile(path: string): Promise; /** * Gate 0: judge the scenarios' WRITING against the quality rules * (order.prompt). A failed verdict stops the run before any planning * or implementation — the Gherkin is the contract everything else is * built from, and a defect here propagates into every layer. */ validateScenarioQuality(order: WorkOrder, feature: FeatureFile): Promise; /** Read 1–2 similar acceptance tests to copy their structure. */ readSimilarAcceptanceTests(feature: FeatureFile): Promise; pickTemplateSlice(feature: FeatureFile): Promise; /** * Filter the run instructions against the guardrails (guardrail wins; * say so); the survivors are briefed to every role. */ reconcileExtraInstructions(instructions: string | undefined): Promise; /** Cut scenarios into slices with tag-resolved target clients (order.prompt). */ planScenarioSlices(order: WorkOrder, feature: FeatureFile, instructions: readonly string[]): Promise; }