import { ARTIFACT_DEFINITIONS, AUDIT_REPORT_FILENAME } from "../io/artifacts.js"; import { AGENT_FEEDBACK_FILENAME } from "audit-tools/shared"; /** * The canonical set of artifact filenames, derived from ARTIFACT_DEFINITIONS * (the single source of truth) plus the two special-cased files that participate * in the staleness DAG but are not writable registry entries. * * Constraining the canonical map to this type means a typo or a stale filename * literal (after a rename) is caught at compile time rather than silently * producing a no-op staleness edge. */ type ArtifactFileName = (typeof ARTIFACT_DEFINITIONS)[keyof typeof ARTIFACT_DEFINITIONS]["fileName"] | typeof AGENT_FEEDBACK_FILENAME | typeof AUDIT_REPORT_FILENAME; type DependencyMap = Partial>; /** * THE single canonical staleness DAG (ARC-cebe3421). * * Keyed by an artifact → the list of artifacts it DEPENDS ON (its upstream * inputs). When any upstream input's content hash or revision changes, this * artifact is stale and must be rebuilt. This is the natural direction for * `computeArtifactMetadata` (which records each artifact's dependency * revisions) and reduces stale detection to a single revision/hash compare * against the recorded upstream revisions. * * The forward "X → its dependents" view (`ARTIFACT_DEPENDENTS_MAP`, used by * `computeStaleArtifacts` to propagate staleness downstream) is DERIVED from * this table by `invertDependencyMap` — it is not maintained separately, so the * two can never drift. There is exactly one hand-authored adjacency * representation; everything else is computed from it. * * `satisfies` (rather than a type annotation) keeps the literal's precise keys * for downstream `keyof`-style derivations while still type-checking every key * and value against the known artifact filenames. */ export declare const ARTIFACT_DEPENDS_ON_MAP: { "repo_manifest.json": string[]; "file_disposition.json": string[]; "graph_bundle.json": string[]; "analyzer_capability.json": string[]; "unit_manifest.json": string[]; "surface_manifest.json": string[]; "critical_flows.json": string[]; "risk_register.json": string[]; "git_history.json": string[]; "external_analyzer_acquisition.json": string[]; "design_assessment.json": string[]; "docs_digest.json": string[]; "structure_decomposition.json": string[]; "charter_register.json": string[]; "charter_clarification.json": string[]; "systemic_challenge.json": string[]; "coverage_matrix.json": string[]; "audit_tasks.json": string[]; "access_memory.json": string[]; "audit_plan_metrics.json": string[]; "task_affinity_graph.json": string[]; "flow_coverage.json": string[]; "requeue_tasks.json": string[]; "runtime_validation_tasks.json": string[]; "runtime_validation_report.json": string[]; "audit-report.md": string[]; "synthesis-narrative.json": string[]; }; /** * Invert a `{ artifact: dependsOn[] }` map into a `{ upstream: dependents[] }` * map. The sole derivation from the canonical table — keeps the two adjacency * views in lockstep by construction. */ export declare function invertDependencyMap(dependsOn: DependencyMap): DependencyMap; /** * Forward staleness adjacency: keyed by an UPSTREAM artifact → the list of * DOWNSTREAM artifacts that depend on it (and so become stale when it changes). * DERIVED from `ARTIFACT_DEPENDS_ON_MAP` (the single canonical table) — never * hand-maintained, so it cannot drift from the dependency direction. * `computeStaleArtifacts` uses this view to propagate staleness downstream. */ export declare const ARTIFACT_DEPENDENTS_MAP: DependencyMap; /** * Every artifact participating in the staleness DAG — the union of those that * depend on something (`ARTIFACT_DEPENDS_ON_MAP` keys) and those that are * depended upon (`ARTIFACT_DEPENDENTS_MAP` keys, i.e. leaf inputs like * scope.json / intent_checkpoint.json that have no upstream of their own). * `computeArtifactMetadata` enumerates present artifacts from this set so a * pure-input artifact still gets a metadata entry (and so its dependents can * compare against its revision). */ export declare const ALL_DAG_ARTIFACTS: ReadonlySet; export {}; //# sourceMappingURL=dependencyMap.d.ts.map