import type { Spec, SpecStatus, SpecVersion, SpecSummary, DefinitionOfReady, DefinitionOfDone } from '../types/index.js';
/**
 * Thrown when code tries to write `status` via `updateSpec` directly.
 * All status transitions must go through `handleUpdateStatus` → `transitionSpec`.
 */
export declare class DirectStatusWriteForbiddenError extends Error {
    constructor(specId: string, attemptedStatus: string, caller: string);
}
/** Evict the cache for a project (e.g. after external file changes). */
export declare function invalidateSpecsCache(projectId: string): void;
/**
 * List every spec for a project.
 */
export declare function listSpecs(projectId: string): Promise<Spec[]>;
/**
 * Get a single spec by ID. Returns `null` when not found.
 */
export declare function getSpec(projectId: string, specId: string): Promise<Spec | null>;
/** SPEC-601: Lookup a spec by its globally unique UUID. */
export declare function getSpecByUuid(projectId: string, uuid: string): Promise<Spec | null>;
/**
 * Create a new spec. Throws if a spec with the same ID already exists.
 */
export declare function createSpec(projectId: string, spec: Spec): Promise<Spec>;
/**
 * SPEC-720: Internal-only status write. NOT exported from the barrel.
 * Importable exclusively from `src/engine/spec-state-machine/transition-spec.ts`.
 * All status transitions must flow through `transitionSpec` → `__internalSetStatus`.
 */
export declare function __internalSetStatus(projectId: string, specId: string, status: SpecStatus): Promise<Spec>;
/**
 * Replace an existing spec entirely (non-status fields only).
 * Throws `DirectStatusWriteForbiddenError` if `updates` contains a `status` field.
 * To change status, call `handleUpdateStatus` from the tool layer.
 */
export declare function updateSpec(projectId: string, specId: string, updates: Omit<Partial<Spec>, 'status'>): Promise<Spec>;
/**
 * @deprecated SPEC-720: updateSpecStatus is removed from the public API.
 * Use `handleUpdateStatus` from `src/tools/update-status/index.ts` instead.
 * This stub remains only to produce a descriptive compile error for any
 * remaining callers until they are migrated.
 * @throws {DirectStatusWriteForbiddenError} Always.
 */
export declare function updateSpecStatus(_projectId: string, specId: string, status: SpecStatus): Promise<Spec>;
/**
 * Delete a spec by ID. Returns `true` if removed, `false` if not found.
 */
export declare function deleteSpec(projectId: string, specId: string): Promise<boolean>;
/**
 * Find specs matching a predicate.
 */
export declare function findSpecs(projectId: string, predicate: (spec: Spec) => boolean): Promise<Spec[]>;
/**
 * Count specs for a project, optionally filtered by status.
 */
export declare function countSpecs(projectId: string, status?: SpecStatus): Promise<number>;
/**
 * Persist a DoR checklist for a spec.
 */
export declare function saveDor(projectId: string, specId: string, dor: DefinitionOfReady): Promise<void>;
/**
 * Load the persisted DoR checklist for a spec. Returns null if not found.
 */
export declare function loadDor(projectId: string, specId: string): Promise<DefinitionOfReady | null>;
/**
 * Persist a DoD checklist for a spec.
 */
export declare function saveDoD(projectId: string, specId: string, dod: DefinitionOfDone): Promise<void>;
/**
 * Load the persisted DoD checklist for a spec. Returns null if not found.
 */
export declare function loadDoD(projectId: string, specId: string): Promise<DefinitionOfDone | null>;
/**
 * Append a new SpecVersion to the version history for a spec.
 */
export declare function saveVersion(projectId: string, specId: string, version: SpecVersion): Promise<void>;
/**
 * Load all persisted versions for a spec. Returns empty array if none exist.
 */
export declare function loadVersions(projectId: string, specId: string): Promise<SpecVersion[]>;
/**
 * Get the latest version number for a spec (0 if no versions exist).
 */
export declare function getLatestVersion(projectId: string, specId: string): Promise<number>;
/**
 * Persist a SpecSummary for a spec. Used by summarize_spec to cache results.
 */
export declare function saveSummary(projectId: string, specId: string, summary: SpecSummary): Promise<void>;
/**
 * Load the persisted SpecSummary for a spec. Returns null if not found.
 */
export declare function loadSummary(projectId: string, specId: string): Promise<SpecSummary | null>;
//# sourceMappingURL=spec-store.d.ts.map