import { z } from "zod"; /** * `project.json` — the machine-readable repo contract. It is the SEAM between the * synthesizer (Phase 1, its sole writer) and every downstream consumer (Phase 2 * report/hooks/governance, which only READ it). Unlike `.aih-config.json` (the * committed bootstrap-intent marker at the repo ROOT — see {@link ../config/marker}), * the contract lives UNDER the context dir, is RE-DERIVED from the live tree on every * run, and records the synthesized stack/commands/scale/gaps a fresh agent needs to * make its first diff correct. The two are siblings with different lifecycles. * * Schema discipline (the §5 additive seam): every field is optional-with-default or * plainly optional, so an OLD committed contract still parses after the schema grows * and a MISSING contract degrades to omitted panels — never a fabricated metric. A * Phase-2 change may ADD optional fields; it may never add a required field or a * second writer. */ export declare const PROJECT_CONTRACT_FILE = "project.json"; /** The human-readable mirror, rendered from {@link PROJECT_CONTRACT_FILE} every run. */ export declare const PROJECT_DOC_FILE = "project.md"; /** The write-once first-run setup seed a team owns. */ export declare const SETUP_DOC_FILE = "setup.md"; /** * How sure we are a command is the right one to run. * - `verified` — actually executed (exit 0). DEFERRED to Phase 2 (2E); never emitted * in Phase 1, but kept in the enum so 2E adds it without a schema bump. * - `detected` — the repo DECLARES it (an explicit `package.json` script). * - `inferred` — derived from a dependency, a linter config file, or a language * default — plausible, but unconfirmed (surfaced as a `knownGap`). */ declare const ConfidenceSchema: z.ZodEnum<{ detected: "detected"; inferred: "inferred"; verified: "verified"; }>; export type Confidence = z.infer; /** * Coarse repo-size bucket, derived purely from the tracked-file count (+ a monorepo * floor). `unknown` when the count is unavailable (not a git repo) — distinct from a * genuine `small`, so a consumer never reads "0 files" as "tiny repo". */ declare const ScaleClassSchema: z.ZodEnum<{ large: "large"; medium: "medium"; small: "small"; unknown: "unknown"; }>; export type ScaleClass = z.infer; export declare const ProjectContractSchema: z.ZodObject<{ schemaVersion: z.ZodLiteral<1>; contextDir: z.ZodString; targets: z.ZodDefault>; description: z.ZodOptional; languages: z.ZodDefault>; frameworks: z.ZodDefault>; cloud: z.ZodDefault>; databases: z.ZodDefault>; deployment: z.ZodDefault>; packageManager: z.ZodOptional; entrypoints: z.ZodDefault>; mcpServers: z.ZodDefault>; commands: z.ZodDefault; }, z.core.$strip>>; typecheck: z.ZodOptional; }, z.core.$strip>>; test: z.ZodOptional; }, z.core.$strip>>; build: z.ZodOptional; }, z.core.$strip>>; lint: z.ZodOptional; }, z.core.$strip>>; start: z.ZodOptional; }, z.core.$strip>>; cdkSynth: z.ZodOptional; }, z.core.$strip>>; cdkDiff: z.ZodOptional; }, z.core.$strip>>; cdkDeploy: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; workspaces: z.ZodOptional>; packageManager: z.ZodOptional; commands: z.ZodDefault; }, z.core.$strip>>; typecheck: z.ZodOptional; }, z.core.$strip>>; test: z.ZodOptional; }, z.core.$strip>>; build: z.ZodOptional; }, z.core.$strip>>; lint: z.ZodOptional; }, z.core.$strip>>; start: z.ZodOptional; }, z.core.$strip>>; cdkSynth: z.ZodOptional; }, z.core.$strip>>; cdkDiff: z.ZodOptional; }, z.core.$strip>>; cdkDeploy: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; scale: z.ZodObject<{ trackedFiles: z.ZodOptional; class: z.ZodEnum<{ large: "large"; medium: "medium"; small: "small"; unknown: "unknown"; }>; isMonorepo: z.ZodBoolean; }, z.core.$strip>; sensitivePaths: z.ZodDefault>; knownGaps: z.ZodDefault>; }, z.core.$strip>; export type ProjectContract = z.infer; /** * Read the committed contract from `//project.json`, or `undefined` * when it is absent, unreadable, or fails validation. Fail-SOFT by design (like * {@link readAihConfig}, unlike fail-closed settings): a malformed contract must never * break a consumer — Phase-2 panels degrade to omitted, never to a fabricated metric. */ export declare function readProjectContract(root: string, contextDir: string): ProjectContract | undefined; /** * Validate a synthesized contract through the schema before it is written — the seam's * one guarantee: only a schema-valid contract is ever persisted (and key order is * normalized to the schema's, so the JSON is stable). Throws on a synthesizer bug * rather than writing a contract a reader would later reject. */ export declare function projectContractJson(contract: ProjectContract): ProjectContract; export {};