/** * Backfill of the canonical document link (T13985, owner decision D11180). * * A document attached to an owner is recorded in BRAIN as the edge * `llmtxt: --documents--> :`. `cleo docs add` writes * it through the docs projection; this backfill writes it for attachments that * predate the edge, or that were attached while the projection could not run. * It replaces the "Doc attached" observation the backfill used to emit. * * Code placed in `packages/core/` per Package-Boundary Check — verified against AGENTS.md. * * @module docs/document-edges * @task T13985 */ /** Outcome of {@link backfillDocumentEdges}. */ export interface DocumentEdgeBackfillResult { /** Attachment bindings examined (one per owner of each attachment). */ total: number; /** Bindings whose `documents` edge was written by this run. */ written: number; /** Bindings that already had the edge, or carry no content hash to link. */ skipped: number; /** Attachment ids whose edge this run wrote. */ writtenAttachmentIds: string[]; } /** * Write the missing `llmtxt --documents--> owner` edges for every attachment * binding in the project. Idempotent: an existing edge is left alone. * * @param projectRoot - Project whose attachments and brain are read. * @returns Counts of written and skipped bindings. * @example * ```ts * const { written } = await backfillDocumentEdges(projectRoot); * ``` */ export declare function backfillDocumentEdges(projectRoot: string): Promise; //# sourceMappingURL=document-edges.d.ts.map