91 const std::function<
bool(
const std::string& path)>& exists);
Definition design_adherence.hpp:32
std::vector< std::string > reconcile(DesignLedger &ledger, const std::function< bool(const std::string &path)> &exists)
Drop assets whose file no longer exists, per the caller-supplied predicate (the "ledger vs reality" r...
std::optional< ReviewStatus > review_status_from_name(std::string_view name)
Parse a status slug; std::nullopt if it is not one of the three.
std::vector< std::string > remove_asset(DesignLedger &ledger, const std::string &selector)
Remove a specific asset.
constexpr std::string_view kDesignLedgerVersion
On-disk format id stamped into DesignLedger::ledger_version; bump on a non-additive shape change.
Definition design_ledger.hpp:35
ReviewStatus
Where an asset stands in review.
Definition design_ledger.hpp:40
@ needs_review
Definition design_ledger.hpp:40
@ approved
Definition design_ledger.hpp:40
@ changes_requested
Definition design_ledger.hpp:40
const char * review_status_name(ReviewStatus status)
Canonical lowercase slug for a status ("needs-review" | "approved" | "changes-requested").
LedgerAsset & upsert_asset(DesignLedger &ledger, const LedgerAsset &incoming)
Record or update an asset.
std::string ledger_to_json(const DesignLedger &ledger)
Serialize a ledger to deterministic JSON (assets sorted, fixed key order, design_systems sorted).
DesignLedger parse_ledger(const std::string &json)
Parse a ledger from JSON.
The whole project ledger: a format id plus the recorded assets.
Definition design_ledger.hpp:63
std::string ledger_version
kDesignLedgerVersion when compiled here
Definition design_ledger.hpp:64
std::vector< LedgerAsset > assets
sorted by (name, version) for clean diffs
Definition design_ledger.hpp:65
One recorded artifact revision.
Definition design_ledger.hpp:51
std::string source
provenance ("fig", "figma-plugin", "claude", …)
Definition design_ledger.hpp:56
std::string path
emitted artifact path (e.g. "ui.js")
Definition design_ledger.hpp:54
std::string inherit_from
parent version this revision derives from ("" = root)
Definition design_ledger.hpp:55
ReviewStatus status
Definition design_ledger.hpp:59
std::string name
logical asset name (e.g. "main-panel")
Definition design_ledger.hpp:52
std::vector< std::string > design_systems
bound design system(s) ("ink-signal", …), sorted
Definition design_ledger.hpp:58
std::string viewport
design viewport ("340x280"), "" if unknown
Definition design_ledger.hpp:57
std::string version
monotonic per name ("v1", "v2", …); assigned by upsert if empty
Definition design_ledger.hpp:53