/** * Project-local Design Studio store — a gitignored `/.design/` directory * that persists design DECISIONS and project-specific design RULES across * sessions, separate from the committed `.wrongstack/design-kits/` (shared * custom kits). Layout: * * .design/.gitignore `*` — self-ignores so the dir is untracked in ANY repo * .design/rules.md project design rules (always injected when UI work is active) * .design/active.json { kit, stack } — the pinned kit, restored on session start * .design/decisions.md append-only log of kit choices (timestamp · kit · stack · via) * * All writes are best-effort: a failure here must never break the tool, slash * command, or a turn. */ export declare function designProjectDir(projectRoot: string): string; /** Read `.design/rules.md` (or RULES.md / design.md). Cached per project root. */ export declare function loadProjectDesignRules(projectRoot: string): Promise; /** * User color/token overrides. Keys are token names (`primary`, `bg`, …) applied * to BOTH themes, or theme-scoped (`light.primary`, `dark.bg`). Values are any * token string (OKLCH/hex). These override kit `tokens.json` everywhere tokens * are consumed — the `use` snapshot, `materialize`, and `verify`. */ export type DesignOverrides = Record; export interface PersistedActiveKit { kit: string; stack?: string | undefined; overrides?: DesignOverrides | undefined; } /** Read the persisted active kit from `.design/active.json`, if any. */ export declare function loadActiveKit(projectRoot: string): Promise; /** * Apply token overrides onto a kit's light/dark token sets. A bare key * (`primary`) is applied to both themes; a scoped key (`light.bg`/`dark.bg`) * only to that theme. Returns NEW objects — never mutates the input. */ export declare function applyTokenOverrides | undefined; dark?: Record | undefined; }>(tokens: T, overrides: DesignOverrides | undefined): T; /** * Persist a kit choice: update `active.json` and append to `decisions.md`. * `isoTime` is passed in so callers control the timestamp (and tests stay * deterministic). Best-effort — swallows all errors. */ export declare function recordKitChoice(projectRoot: string, kit: string, stack: string | undefined, source: string, isoTime: string, overrides?: DesignOverrides | undefined): Promise; /** * Merge color/token overrides into `active.json` WITHOUT changing the pinned * kit (used by `design set primary=…`). Returns the merged override map, or * undefined if there is no active kit to attach them to. Best-effort on write. */ export declare function recordOverrides(projectRoot: string, patch: DesignOverrides, isoTime: string): Promise; /** Clear the persisted active kit (e.g. `/design off`). Best-effort. */ export declare function clearPersistedActiveKit(projectRoot: string): Promise; /** Test helper — clears the rules cache. */ export declare function _resetDesignRulesCache(): void; //# sourceMappingURL=design-project-store.d.ts.map