/**
 * Three-layer evaluation — the canonical scoring breakdown for
 * builder-of-builders workflows.
 *
 *   meta_score:    did the builder understand + satisfy user intent?
 *                  (judge verdict attached to the builder run)
 *   build_score:   did the generated scaffold build + pass its own tests?
 *                  (outcome.score on the app-build child run)
 *   runtime_score: did the generated agent pass its domain scenarios?
 *                  (mean outcome.score over app-runtime grandchild runs)
 *
 * Returns a structured report per project. The cross-layer correlation
 * is the highest-leverage signal the framework computes — if
 * meta_score doesn't predict runtime_score, the builder's self-scoring
 * is broken.
 *
 * Scaffold-only mode: when a project has no `app-runtime` runs (e.g. a
 * scaffold-builder eval that grades compose + build without driving a
 * runtime scenario), `kind` is `'scaffold-only'` and `complete` measures
 * meta + build only. Consumers can tell the two apart without having to
 * interpret null-runtime as either "not yet computed" or "N/A for this
 * project shape".
 */
import type { TraceStore } from '../trace/store';
export type ProjectKind = 'full' | 'scaffold-only';
export interface ThreeLayerProjectReport {
    projectId: string;
    /**
     * `'full'` when the project has at least one `app-runtime` run;
     * `'scaffold-only'` when it only has meta + build layers. Lets
     * downstream consumers treat a null runtime score as expected
     * (scaffold-only) vs. missing (full, pipeline broke).
     */
    kind: ProjectKind;
    builderRunId?: string;
    /** Judge-verdict score on the builder run (0..1 after normalization). */
    metaScore: number | null;
    buildRunId?: string;
    /** 0..1 from the sandbox harness (testsPassed / testsTotal). */
    buildScore: number | null;
    appRuntimeRunIds: string[];
    /** Mean of outcome.score over app-runtime runs, 0..1. Always null in scaffold-only mode. */
    runtimeScore: number | null;
    runtimePassRate: number | null;
    /**
     * Layer-aware completeness:
     *   - `kind='full'`: all three layers scored
     *   - `kind='scaffold-only'`: meta + build scored (runtime not applicable)
     */
    complete: boolean;
}
export declare function scoreProject(store: TraceStore, projectId: string): Promise<ThreeLayerProjectReport>;
/** Aggregate scoring across every project in a corpus. */
export declare function scoreAllProjects(store: TraceStore): Promise<ThreeLayerProjectReport[]>;
//# sourceMappingURL=three-layer-eval.d.ts.map