export type QualityGrade = 'A' | 'B' | 'C' | 'D' | 'F';
export interface SpecQualityScore {
    /** Total score 0-100 */
    total: number;
    /** Completeness dimension: title, description, AC, scope, estimation present (0-25) */
    completeness: number;
    /** Testability dimension: AC verifiable, no vague words (0-25) */
    testability: number;
    /** Ambiguity dimension: no contradictions, terms defined, edge cases specified (0-25) */
    ambiguity: number;
    /** Risk dimension: cross-module deps, architectural scope, NFRs (0-25) */
    risk: number;
    /** Letter grade derived from total */
    grade: QualityGrade;
}
export interface SpecQualityInput {
    specId: string;
    projectPath: string;
}
export interface QualityDimensionDetail {
    score: number;
    maxScore: number;
    issues: string[];
    recommendations: string[];
    /** Percentage of ACs with at least partial BDD structure (0-100). Only set for testability dimension. */
    bddCoverage?: number;
}
export interface SpecQualityReport {
    specId: string;
    score: SpecQualityScore;
    dimensions: {
        completeness: QualityDimensionDetail;
        testability: QualityDimensionDetail;
        ambiguity: QualityDimensionDetail;
        risk: QualityDimensionDetail;
    };
}
export type GenericSpecOutputIssueKind = 'generic-criterion' | 'unsupported-verification' | 'placeholder-reference' | 'generic-technical-reference';
export interface GenericSpecOutputIssue {
    kind: GenericSpecOutputIssueKind;
    phrase: string;
    reason: string;
}
export interface GenericSpecOutputGateResult {
    passed: boolean;
    issues: GenericSpecOutputIssue[];
}
/** A single over-engineering signal detected in a spec. SPEC-485 */
export interface ComplexitySignal {
    type: string;
    description: string;
    evidence: string;
}
/** Simplicity analysis result for a spec. SPEC-485 */
export interface SimplicityCheck {
    /** Score 0-100, higher = simpler design */
    score: number;
    /** Over-engineering signals detected in the spec text */
    signals: ComplexitySignal[];
    /** Suggested simpler alternative, or null if none needed */
    simpleAlternative: string | null;
    /** Effort vs value assessment */
    effortVsValue: {
        estimatedHours: number;
        roi: 'low' | 'medium' | 'high';
    };
    /** Overall recommendation */
    recommendation: 'approve' | 'simplify' | 'review';
}
/** Result of zero-ambiguity criteria quality check. SPEC-486 */
export interface CriteriaQualityResult {
    /** Score 0-100: 50pts for GWT, 30pts for concrete value, 20pts for function ref */
    score: number;
    /** What is missing or why the score was deducted */
    reason: string;
    /** Whether criterion has GIVEN/WHEN/THEN structure */
    hasGWT: boolean;
    /** Whether criterion contains a concrete value (number, type, quoted string, status code) */
    hasConcreteValue: boolean;
}
/** An ambiguous criterion detected during post-migration scan. SPEC-487 */
export interface AmbiguousCriterion {
    specId: string;
    specTitle: string;
    /** First 300 chars of spec body — context for the LLM to rewrite the criterion */
    specContext: string;
    criterionText: string;
    score: number;
    reason: string;
}
/** Issues detected after lean format migration. SPEC-487 */
export interface MigrationIssuesResult {
    ambiguousCriteria: AmbiguousCriterion[];
}
/** Result of the automatic post-creation pipeline (challenge + readiness). SPEC-445 */
export interface AutoPipelineResult {
    /** Short summary of challenge gaps found, or null if pipeline failed */
    challengeSummary: string | null;
    /** Readiness score 0-100, or null if pipeline failed */
    readinessScore: number | null;
    /** Human-readable readiness suggestion, or null if pipeline failed */
    readinessSuggestion: string | null;
    /** SPEC-501: Warning when ACs have testability score < 7 — includes rewrite suggestions */
    acTestabilityWarning?: string | null;
    /** SPEC-506: Top 3 relevant lessons from project history matching spec tags */
    relevantLessons?: string[] | null;
    /** SPEC-664: Resolved package versions found in spec text, e.g. ["next@15.2.0"] */
    resolvedVersions?: string[] | null;
    /** Error description if the pipeline timed out or threw */
    error?: string;
}
/** SPEC-664: Cache entry for a resolved package version. */
export interface SpecVersionEntry {
    version: string;
    resolvedAt: string;
    registry: string;
}
/** SPEC-664: Per-project package version cache keyed by package name. */
export type SpecVersionCache = Record<string, SpecVersionEntry>;
//# sourceMappingURL=spec-quality.d.ts.map