/**
 * featureRolloutScan — the fs/git side of the FeatureRolloutReconciler: turn
 * docs/specs + instar-dev traces + live config into SpecArtifact[] and a flag
 * observer. Kept separate from the reconciler so the reconciliation LOGIC stays
 * pure/unit-tested; this module is the (lightly-tested) I/O adapter.
 *
 * Merged-detection note: the reconciler primarily runs on DEPLOYED agents (on
 * the released version), where a present + approved spec is by definition shipped.
 * So "merged" = approved frontmatter + a completed trace referencing it; recency
 * comes from the trace timestamp. Precise git-merge introspection is a refinement.
 */
import type { SpecArtifact } from './FeatureRolloutReconciler.js';
import type { RolloutFlagObservation } from './featureRollout.js';
export declare function normalizeSpecId(specFileName: string): string;
/** Minimal frontmatter reader (the specs use simple `key: value` lines). */
export declare function parseSpecFrontmatter(content: string): Record<string, string>;
/** Scan docs/specs + traces into SpecArtifact[]. */
export declare function scanSpecArtifacts(repoRoot: string, now?: () => number): SpecArtifact[];
export interface CanonicalScanOpts {
    repoPath: string;
    /** A git remote name configured in repoPath; the canonical-remote allow-list
     *  on the caller's side already validated this. */
    canonicalRemote: string;
    fetchTimeoutMs?: number;
    now?: () => number;
}
export interface CanonicalScanResult {
    artifacts: SpecArtifact[];
    canonicalHeadSha: string;
}
export declare function scanSpecArtifactsCanonical(opts: CanonicalScanOpts): CanonicalScanResult;
/**
 * Repo-gated, feature-flagged scanner with graceful fallback to the local
 * scan on any failure. Never throws into the caller (boot-safe).
 */
export declare function scanSpecArtifactsWithCanonical(repoRoot: string, opts: {
    canonicalRefScanEnabled: boolean;
    canonicalRemote?: string;
    fetchTimeoutMs?: number;
    onDegradation?: (reason: string) => void;
}, now?: () => number): SpecArtifact[];
/**
 * Observe a feature's flag for stage derivation — READ-ONLY. Reads the agent's
 * live config and the shipped ConfigDefaults default. Never writes.
 */
export declare function makeFlagObserver(liveConfig: unknown, shippedDefaults: unknown): (flagPath: string) => RolloutFlagObservation;
//# sourceMappingURL=featureRolloutScan.d.ts.map