/**
 * sanity/perspective-pin-guard.ts
 *
 * Stale-pin guard for task-level perspective canonical doc refs.
 *
 * A task's `PerspectiveDocRef` pins it to a content release, and that
 * expansion is unconditional — every run that includes the task fetches
 * whatever the release currently contains, with no signal when the pin
 * has gone stale (release published/archived/deleted) or was wrong from
 * the start (release unrelated to the task's area). The audited
 * nuxt-integration case silently injected three Canvas articles into a
 * frameworks task's context on every run.
 *
 * This module computes operator-visible warnings for both cases. It is
 * deliberately **non-fatal**: expansion stays unconditional, the guard
 * only warns, so a stale pin is surfaced without breaking runs.
 *
 * "Unrelated to the task's area" reuses the feature-registry section→area
 * mapping that release classification already uses
 * (`buildSectionMapping`), rather than any hardcoded section list. The
 * guard stays quiet whenever the signal is inconclusive — no feature
 * registry available, the task has no area, the area is unknown to the
 * registry, or none of the expanded articles carry a resolvable section.
 *
 * @see docs/audits/2026-06-10-nuxt-stale-perspective-pin.md
 * @see docs/design-docs/canonical-doc-resolution.md
 */
import type { ProductFeature } from "../_vendor/ailf-core/index.d.ts";
/** A task that pinned itself to a release via a perspective doc ref. */
export interface PerspectivePinTaskRef {
    taskId: string;
    /** The task's feature area, when authored. */
    area?: string;
}
/** An article the release expanded to, with its (optional) section. */
export interface PerspectivePinArticle {
    slug: string;
    /** Parent section slug (`primarySection->slug.current`), when resolvable. */
    sectionSlug?: string;
}
/**
 * Compute stale-pin warnings for one perspective ref expansion.
 *
 * Two non-fatal conditions are flagged:
 *
 * 1. **Empty expansion** — the pinned release expanded to zero articles.
 *    The release no longer exists, was published/archived, or contains no
 *    article documents; in every case the pin no longer does what its
 *    author intended.
 * 2. **Unrelated expansion** — the release expanded to articles, but none
 *    of their sections relate to the pinning task's area per the feature
 *    registry's section→area mapping. Warned per task (different tasks
 *    pinning the same release can have different areas). A release whose
 *    articles span several sections counts as related if *any* expanded
 *    section maps to the task's area — multi-section releases are
 *    legitimate, so only a complete mismatch is flagged.
 *
 * Returns human-readable warning lines; empty array when nothing is
 * suspect or the relatedness signal is inconclusive.
 */
export declare function buildPerspectivePinWarnings(perspectiveId: string, taskRefs: PerspectivePinTaskRef[], articles: PerspectivePinArticle[], features: ProductFeature[] | null | undefined): string[];
