/** * Projection: decision store → first-class graph nodes + `affects` edges (spec-16). * * This is the decisions analogue of src/core/analyzer/iac/project.ts. The JSON * store (.openlore/decisions/pending.json) remains the authored source of truth; * this projection is derived and regenerable. Promoting a Decision to a graph node * with `affects` edges to the files it governs turns orient's runtime * set-membership filter into a deterministic graph join, and lets * analyze_impact / get_subgraph answer "what decisions govern this code?" with the * same machinery they use for code edges. * * Edge direction is decision → governed file, mirroring the IaC convention * (dependent/owner → dependency): a decision "affects" the files it governs. */ import type { DecisionStore, DecisionStatus } from '../../types/index.js'; /** Graph node-id namespace for projected decisions (keeps them distinct from code ids). */ export declare const DECISION_NODE_PREFIX = "decision::"; /** Stable graph node id for a decision's 8-char store id. */ export declare function decisionNodeId(decisionId: string): string; /** A projected decision — a first-class, clearly-typed graph node (not a FunctionNode). */ export interface DecisionNode { /** Graph node id, e.g. "decision::c6d1ad07". */ id: string; /** Original 8-char store id. */ decisionId: string; /** Discriminator so callers never confuse this with a code node. */ kind: 'decision'; title: string; status: DecisionStatus; rationale: string; consequences: string; affectedDomains: string[]; affectedFiles: string[]; confidence: 'high' | 'medium' | 'low'; /** 8-char id of a prior decision this one reverses, if any. */ supersedes?: string; } /** An `affects` edge: decision node → a governed file path. */ export interface DecisionAffectsEdge { /** Graph node id of the decision ("decision::"). */ decisionNodeId: string; /** Repo-relative, POSIX path of the governed file. */ filePath: string; kind: 'affects'; } export interface ProjectedDecisions { nodes: DecisionNode[]; edges: DecisionAffectsEdge[]; } /** * Project the active decisions in a store onto decision nodes + `affects` edges. * * - Inactive decisions (synced / rejected / phantom) are excluded, matching * orient's INACTIVE_STATUSES — their content already lives in ADRs / spec.md. * - An empty or legacy store projects to zero nodes/edges. * - Output is fully sorted for deterministic, regenerable persistence. */ export declare function projectDecisions(store: DecisionStore): ProjectedDecisions; //# sourceMappingURL=project.d.ts.map