// Quality Intelligence evidence atom (Epic #270, Issue #277).
//
// An atom is the smallest reviewable provenance unit. Atoms are produced by
// dereferencing a `QualityIntelligenceSourceEnvelope` and slicing the underlying
// content into a single coherent claim. The contract surface NEVER carries raw
// content — only:
//   * the atom id
//   * the source envelope id it was derived from
//   * a canonical hash of the content (so audit can detect drift)
//   * a redaction status marker
//   * a lifecycle status
//
// Discriminated union over `kind`:
//   * requirement       — atomic acceptance criterion / behaviour statement
//   * design-fragment   — UI/UX intent fragment (e.g. a Figma frame caption)
//   * code-fragment     — code-level claim (e.g. a function signature)
//   * document-excerpt  — passage from a connector document
//   * human-statement   — human-authored claim (Conversation Center)
export const QUALITY_INTELLIGENCE_EVIDENCE_ATOM_KINDS = [
    "requirement",
    "design-fragment",
    "code-fragment",
    "document-excerpt",
    "human-statement",
];
export const QUALITY_INTELLIGENCE_REDACTION_STATUSES = ["redacted", "not-required"];
export const QUALITY_INTELLIGENCE_LIFECYCLE_STATUSES = ["draft", "finalised", "archived"];
/** Pure structural guard: returns true if the atom's hash field looks like sha256 hex. */
export const hasCanonicalSha256Hash = (atom) => /^[0-9a-f]{64}$/u.test(atom.canonicalHashSha256Hex);
