/** * Architecture lint as a registry of visitor functions: each rule inspects ParsedLintGraph * and returns IrStructuralFinding[] (layer: lint). Deterministic, no AI, no cloud. */ import type { IrStructuralFinding } from './ir-structural.js'; import type { ParsedLintGraph } from './lint-graph.js'; /** IR-LINT-DIRECT-DB-ACCESS-002 — HTTP-like → datastore-like in one hop (broader than strict api/gateway + database enum). */ export declare function ruleDirectDbAccess(g: ParsedLintGraph): IrStructuralFinding[]; /** IR-LINT-HIGH-FANOUT-004 */ export declare function ruleHighFanout(g: ParsedLintGraph): IrStructuralFinding[]; /** * IR-LINT-SYNC-CHAIN-001 — longest **synchronous** path from HTTP entry nodes. * Edges marked async (see `edgeRepresentsAsyncBoundary` in `lint-graph.ts`) are excluded from depth. * * **HTTP entry roots:** Prefer HTTP-like nodes with **no incoming sync** edges. If every HTTP-like node * has an incoming sync edge (e.g. internal-only graph shape), we **fall back** to treating **all** HTTP-like * nodes as possible starts so the rule can still surface deep sync chains. See `docs/ENGINEERING_NOTES.md`. */ export declare function ruleSyncChainFromHttpEntry(g: ParsedLintGraph): IrStructuralFinding[]; /** IR-LINT-NO-HEALTHCHECK-003 */ export declare function ruleNoHealthcheck(g: ParsedLintGraph): IrStructuralFinding[]; /** * IR-LINT-ISOLATED-NODE-005 — node with no incident edges while the graph has at least one edge elsewhere. */ export declare function ruleIsolatedNode(g: ParsedLintGraph): IrStructuralFinding[]; /** IR-LINT-DUPLICATE-EDGE-006 — same from→to pair appears more than once. */ export declare function ruleDuplicateEdge(g: ParsedLintGraph): IrStructuralFinding[]; /** IR-LINT-HTTP-MISSING-NAME-007 */ export declare function ruleHttpMissingName(g: ParsedLintGraph): IrStructuralFinding[]; /** IR-LINT-DATASTORE-NO-INCOMING-008 */ export declare function ruleDatastoreNoIncoming(g: ParsedLintGraph): IrStructuralFinding[]; /** IR-LINT-MULTIPLE-HTTP-ENTRIES-009 — more than one HTTP node with no incoming edges (multiple public entry surfaces). */ export declare function ruleMultipleHttpEntries(g: ParsedLintGraph): IrStructuralFinding[]; /** * IR-LINT-MISSING-AUTH-010 — HTTP entry node (no incoming sync edges) with no auth coverage. * * A node is considered auth-covered when ANY of: * 1. One of its immediate outgoing neighbours is an auth-like node type. * 2. An auth-like node has a direct edge TO it (auth-as-gateway pattern). * 3. Its own `config` carries an auth-signal key: `auth`, `authRequired`, * `authentication`, `authorization`, or `security`. * * Escape hatch: set `config.authRequired: false` (explicit opt-out) to silence the rule * for intentionally public endpoints (health, public assets, etc.). */ export declare function ruleHttpMissingAuth(g: ParsedLintGraph): IrStructuralFinding[]; /** * IR-LINT-DEAD-NODE-011 — non-sink node with incoming edges but no outgoing edges. * * Datastore-like, queue-like, common infra sinks (cache, DNS, SMTP, blob search/store), and * HTTP-face nodes are valid sinks/leaves at this abstraction and are excluded. * Nodes with no incident edges at all are already caught by IR-LINT-ISOLATED-NODE-005. * This rule targets nodes that receive data but forward it nowhere — likely a missing * edge, an incomplete integration step, or a stale component. */ export declare function ruleDeadNode(g: ParsedLintGraph): IrStructuralFinding[]; /** Omit findings matching these codes (built-in **`IR-LINT-*`** only). */ export type RunArchitectureLintingOptions = { omitFindingCodes?: ReadonlySet; }; /** Suppress layered-microservice-centric rules irrelevant to typical monolith backends. */ export declare const MONOLITH_RELAXED_PROFILE_OMIT_CODES: ReadonlySet; /** * Ordered registry: add a new rule by implementing `(g) => findings` and appending here. */ export declare const LINT_RULE_REGISTRY: ReadonlyArray<(g: ParsedLintGraph) => IrStructuralFinding[]>; /** Run all registered architecture lint visitors. */ export declare function runArchitectureLinting(g: ParsedLintGraph, options?: RunArchitectureLintingOptions): IrStructuralFinding[]; //# sourceMappingURL=lint-rules.d.ts.map