import type { ModelTier } from './multi-agent.js';
export interface ConventionRule {
    id: string;
    category: 'naming' | 'i18n' | 'architecture' | 'file-limits' | 'code-quality' | 'testing' | 'custom';
    description: string;
    severity: 'critical' | 'warning' | 'info';
    source: 'claude-md' | 'rules-file';
    sourceFile: string;
    pattern?: RegExp;
}
export interface ConventionViolation {
    ruleId: string;
    category: ConventionRule['category'];
    severity: ConventionRule['severity'];
    file: string;
    line?: number;
    message: string;
    suggestion?: string;
}
export interface ConventionScanResult {
    rules: ConventionRule[];
    violations: ConventionViolation[];
    summary: {
        totalRules: number;
        totalViolations: number;
        bySeverity: Record<string, number>;
        byCategory: Record<string, number>;
    };
    scannedAt: string;
}
export interface ConventionBaseline {
    projectId: string;
    snapshot: ConventionScanResult;
    createdAt: string;
    updatedAt: string;
}
export interface GrepMatch {
    file: string;
    lineNum: number;
    code: string;
}
export interface RulesReconciliation {
    rulesInSync: boolean;
    newRulesNeeded: string[];
    staleRules: string[];
    updatedRules: string[];
    healthScore: number;
}
export interface SkillsReconciliation {
    skillsInSync: boolean;
    newSkillsDetected: string[];
    staleSkills: string[];
    updatedSkills: string[];
    healthScore: number;
}
/** Result returned when autoFix:true is passed to reconcile_skills (SPEC-395). */
export interface SkillsAutoFixResult {
    /** Skills successfully installed during the auto-fix run. */
    installed: string[];
    /** Skills removed from disk and manifest during the auto-fix run. */
    removed: string[];
    /** Manifest entries whose paths were corrected during the auto-fix run. */
    pathsFixed: string[];
    /** Health score after all fixes were applied (0–100). */
    healthScore: number;
}
export interface ComplianceGateResult {
    conventionWarnings: string[];
    constitutionWarnings: {
        description: string;
    }[];
    lintWarnings: string[];
    testWarnings: string[];
    compileWarnings: string[];
}
export interface BaselineComparison {
    /** Violations present in the current scan but absent from the baseline */
    newViolations: ConventionViolation[];
    /** Violations present in the baseline but absent from the current scan (fixed) */
    fixedViolations: ConventionViolation[];
    /**
     * Net change in total violations.
     * Positive = regression (more violations than baseline).
     * Negative = improvement (fewer violations than baseline).
     */
    totalDelta: number;
    /** True when the current scan has more violations than the baseline */
    regressionDetected: boolean;
}
export interface HooksReconciliation {
    hooksInSync: boolean;
    /** Expected checks not present in existing hook scripts (e.g., pre-commit missing typecheck) */
    missingHooks: string[];
    /** Hooks that could be enhanced based on detected project capabilities */
    outdatedHooks: string[];
    healthScore: number;
}
/** Internal candidate for patching a single hook step. */
export interface PatchCandidate {
    hook: string;
    line: string;
    description: string;
}
/** Result of auto-patching husky hook files with missing quality checks. */
export interface HooksPatchResult {
    /** Checks that were successfully appended to hook files. */
    patched: {
        hook: string;
        added: string;
    }[];
    /** Checks skipped because they were already present or covered by lint-staged. */
    skipped: string[];
    /** Updated health score after patching (0–100). */
    healthScore: number;
}
export interface ProjectCapabilities {
    hasTypeScript: boolean;
    hasEsLint: boolean;
    hasTestRunner: boolean;
    hasCommitlint: boolean;
    hasPrettier: boolean;
}
export interface HookScripts {
    'pre-commit': string;
    'commit-msg': string;
    'pre-push': string;
}
export interface LintCheckResult {
    passed: boolean;
    command: string;
    issueCount: number;
    output: string;
}
/** A generated agent prompt for a specific architecture layer. */
export interface AgentPrompt {
    /** Unique agent name, e.g. "frontend-agent". */
    name: string;
    /** Canonical layer name, e.g. "frontend", "backend". */
    layer: string;
    /** Directories the agent owns exclusively, e.g. ["src/components/", "src/pages/"]. */
    ownedPaths: string[];
    /** Full prompt text ready to use as a teammate definition. */
    prompt: string;
    /** Recommended model tier based on task complexity. */
    recommendedModel: 'haiku' | 'sonnet' | 'opus';
}
export interface AreaScore {
    label: string;
    score: number;
    suggestions: string[];
}
export interface ConventionSyncReport {
    /** Weighted average of all four health dimensions (0–100). */
    overallScore: number;
    /** Health score from reconcile_rules (25% weight). */
    rulesHealth: number;
    /** Health score from reconcile_skills (25% weight). */
    skillsHealth: number;
    /** Health score from reconcile_hooks (25% weight). */
    hooksHealth: number;
    /** Score derived from convention violation count (25% weight). */
    conventionHealth: number;
    /** Human-readable one-line summary of the overall sync state. */
    summary: string;
    /** Ordered list of actionable next steps (highest impact first). */
    recommendations: string[];
}
export interface PlatformDefinition {
    id: string;
    name: string;
    rulesFile: string | null;
    skillsDir: string | null;
    format: 'markdown' | 'json' | 'yaml' | 'toml';
    configFiles: string[];
}
/** Internal type for package.json parsing in stack-detector */
export interface PackageJsonShape {
    dependencies?: Record<string, string>;
    devDependencies?: Record<string, string>;
    scripts?: Record<string, string>;
}
/** Internal type for coverage-summary.json parsing in quality-baseline */
export interface CoverageSummaryShape {
    total?: {
        statements?: {
            pct?: number;
        };
        lines?: {
            pct?: number;
        };
    };
}
/** Naming style classifications used in convention-detector */
export type NamingStyle = 'kebab-case' | 'camelCase' | 'snake_case' | 'PascalCase' | 'unknown';
export interface DetectedStack {
    language: string;
    framework: string | null;
    testRunner: string | null;
    linter: string | null;
    formatter: string | null;
    bundler: string | null;
}
export interface DetectedConventions {
    fileNaming: 'kebab-case' | 'camelCase' | 'snake_case' | 'PascalCase' | 'unknown';
    functionNaming: 'camelCase' | 'snake_case' | 'PascalCase' | 'unknown';
    testLocation: 'separate' | 'colocated' | 'unknown';
    importStyle: 'relative' | 'alias' | 'mixed' | 'unknown';
    errorHandling: 'exceptions' | 'result-type' | 'error-returns' | 'mixed' | 'unknown';
}
export interface QualityBaseline {
    testCount: number;
    lintWarnings: number | null;
    coveragePercent: number | null;
}
/** SPEC-645: Canonical LLM client identifier after 4-signal detection. */
export type LLMClientKind = 'claude-code' | 'cursor' | 'windsurf' | 'copilot' | 'codex' | 'gemini' | 'unknown';
/** SPEC-644: Map of canonical tier → provider-specific model ID. */
export type ModelTierMapping = Record<ModelTier, string>;
/** SPEC-644: Internal — provider API response shapes for JSON parsing. */
export interface ProviderModelListData {
    data?: {
        id?: string;
    }[];
}
export interface ProviderModelListModels {
    models?: {
        name?: string;
    }[];
}
/** SPEC-644: Cached model tier mapping with TTL metadata. */
export interface ModelMappingCache {
    /** Map of provider ID → tier mapping (haiku/sonnet/opus → model ID). */
    providers: Record<string, ModelTierMapping>;
    /** ISO timestamp of the last fetch. */
    resolvedAt: string;
}
/** SPEC-714: Cascade hooks disable configuration in planu/conventions.json. */
export interface CascadeHooksConfig {
    /** Hook IDs to disable. Matched against CascadeHook.id. */
    disabled?: string[];
}
export interface ScannedConventions {
    detectedAt: string;
    stack: DetectedStack;
    conventions: DetectedConventions;
    /** SPEC-645: Detected LLM client cached here to avoid re-detection on every call. */
    detectedClient?: LLMClientKind;
    baseline: QualityBaseline;
    /** SPEC-644: Cached model tier mapping from provider APIs. */
    modelMapping?: ModelMappingCache;
    /** SPEC-651: Persisted business/policy decisions keyed by decision slug. */
    decisions?: Record<string, string>;
    /** SPEC-714: Per-project cascade hook disable list. */
    cascadeHooks?: CascadeHooksConfig;
}
/** Internal cache entry for ConventionsCache (SPEC-232) */
export interface ConventionsCacheEntry {
    value: ScannedConventions;
    expiresAt: number;
}
/** SPEC-705: RAM guardrail configuration in planu/conventions.json. */
export interface RamGuardrailConfig {
    /** When false, bypasses RAM checks entirely. Default: true. */
    enabled?: boolean;
    /** Free GB threshold below which pressure is treated as critical. Default: 4. */
    criticalGB?: number;
    /** Free GB threshold below which pressure is treated as moderate. Default: 8. */
    moderateGB?: number;
    /** Estimated RAM cost per agent in MB. Default: 800. */
    agentMB?: number;
}
export interface PlanuJsonConfig {
    customPlatforms?: PlatformDefinition[];
    specTemplate?: {
        acceptanceCriteria?: unknown;
        qualityGates?: unknown;
    };
    autoInstallSkills?: boolean;
    lastSeenVersion?: string;
    /** SPEC-705: RAM-aware agent spawn guardrail configuration. */
    ramGuardrail?: RamGuardrailConfig;
}
//# sourceMappingURL=conventions.d.ts.map