import type { SpecStatus, Difficulty, RiskLevel, SpecType, SpecScope, SpecTarget, DiagramType, ToolResult } from '../common.js';
import type { Estimation, Actuals, ImpactAnalysis } from '../estimation.js';
import type { ConstitutionViolation } from '../project/core.js';
export interface Spec {
    id: string;
    title: string;
    slug: string;
    feature?: string;
    type: SpecType;
    scope: SpecScope;
    status: SpecStatus;
    difficulty: Difficulty;
    risk: RiskLevel;
    projectId: string;
    createdAt: string;
    updatedAt: string;
    specPath: string;
    technicalPath: string;
    planPath?: string;
    progressPath?: string;
    executiveReportPath?: string;
    technicalReportPath?: string;
    estimation: Estimation;
    actuals: Actuals | null;
    target: SpecTarget;
    tags: string[];
    dependencies: string[];
    blockedBy: string[];
    gitBranch: string;
    impactAnalysis: ImpactAnalysis | null;
    reviewNotes?: string[];
}
export interface SpecSummary {
    specId: string;
    title: string;
    oneLiner: string;
    keyDecisions: string[];
    riskHighlights: string[];
    estimationSummary: string;
    affectedModules: string[];
    criticalDependencies: string[];
    generatedAt: string;
}
export type SummaryFormat = 'executive' | 'technical' | 'oneliner';
export type ChecklistCategory = 'completeness' | 'consistency' | 'feasibility' | 'security' | 'edge-cases' | 'ux';
export interface ChecklistItem {
    id: string;
    question: string;
    category: ChecklistCategory;
    answer: 'yes' | 'no' | 'partial' | 'na' | 'pending';
    evidence?: string;
    autoChecked: boolean;
    passed?: boolean | null;
    detail?: string | null;
}
export interface ChecklistCategoryScore {
    category: ChecklistCategory;
    score: number;
    weight: number;
    items: ChecklistItem[];
}
export interface ChecklistScore {
    overall: number;
    categories: ChecklistCategoryScore[];
    autoCheckedCount: number;
    manualPendingCount: number;
    recommendation: 'approve' | 'review' | 'reject';
}
export interface SpecChecklist {
    specId: string;
    items: ChecklistItem[];
    passedCount: number;
    totalCount: number;
    score: number;
    checklistScore?: ChecklistScore;
    generatedAt: string;
}
export interface ReconcileReport {
    specId: string;
    changes: ReconcileChange[];
    specUpdated: boolean;
    reason: string;
    reconciledAt: string;
}
export interface ReconcileChange {
    section: string;
    originalValue: string;
    newValue: string;
    reason: string;
    approved: boolean;
}
export interface SpecVersion {
    specId: string;
    version: number;
    changes: SpecDiff[];
    changedBy: string;
    timestamp: string;
    reason: string;
}
export interface SpecDiff {
    file: 'spec.md' | 'technical.md' | 'PLAN.md' | 'HU.md' | 'FICHA-TECNICA.md';
    section: string;
    type: 'added' | 'modified' | 'removed';
    before: string;
    after: string;
}
export interface CascadeNotification {
    specId: string;
    title: string;
    status: SpecStatus;
    message: string;
}
export interface CascadeResult {
    affectedSpecs: string[];
    notifications: CascadeNotification[];
    checkedAt: string;
}
export interface VersionHistory {
    specId: string;
    versions: SpecVersion[];
    currentVersion: number;
}
export interface SpecDiagram {
    type: DiagramType;
    title: string;
    format: 'mermaid';
    content: string;
    description: string;
}
export interface SpecSplitSuggestion {
    originalSpecId: string;
    reason: string;
    suggestedSpecs: SpecSplitItem[];
    dependencyOrder: string[];
    totalEstimate: Estimation;
}
export interface SpecSplitItem {
    suggestedTitle: string;
    type: SpecType;
    target: SpecTarget;
    scope: SpecScope;
    description: string;
    criteriaCount: number;
    dependsOn: string[];
    estimatedHours: number;
}
export type ScopeFilter = 'generate_adr' | 'design_schema' | 'define_ui_contract' | 'challenge_spec' | 'generate_execution_plan';
export interface ScopeFilterConfig {
    scope: SpecScope;
    filters: ScopeFilter[];
    allowManualOverride: boolean;
}
/** Result of constitution validation during spec creation. */
export interface ConstitutionCheckResult {
    blocked: boolean;
    errorResult?: ToolResult;
    warnings: ConstitutionViolation[];
}
/** Context gathered during spec construction, passed to post-creation steps. */
export interface SpecBuildContext {
    spec: Spec;
    specDir: string;
    specPath: string;
    technicalPath: string;
    progressPath: string;
    diagrams: SpecDiagram[];
    estimation: Estimation;
    splitSuggestion: SpecSplitSuggestion | null;
    scopeFilters: ScopeFilterConfig;
    duplicate: Spec | undefined;
    projectId: string;
}
//# sourceMappingURL=core.d.ts.map