name: audit-response-validator description: > Validates AiVIS Cite Ledger audit response payloads against the canonical server-side CITE LEDGER contract. Use this skill when reviewing, generating, or repairing AI audit JSON that must pass deterministic validation in server/validators/validateAuditResponse.ts. It enforces the exact seven- dimension model, blocks legacy labels, checks score consistency, and ensures every recommendation and remediation path is evidence-backed.
Audit Response Validator
Use this skill to verify that an AI-generated audit payload is structurally valid, deterministic, and traceable to the AiVIS Cite Ledger ten-family (avs-v3) CITE LEDGER model.
Validation order
Follow this order exactly.
- Run base schema validation first.
- Reject the payload immediately if the schema fails.
- Validate CITE LEDGER structure and dimensional integrity.
- Validate score consistency and summary-layer counts.
- Validate recommendation and evidence traceability.
- Return a concise pass/fail result with exact error messages.
Canonical source of truth
Treat server/validators/validateAuditResponse.ts as the authoritative contract.
Do not invent extra sections, rename dimensions, or soften validation rules.
Required audit structure
The payload must contain:
visibility_scoreai_platform_scoressummarykey_takeawaystopical_keywordskeyword_intelligencebrand_entitiesprimary_topicsfaq_countcategory_gradescontent_highlightsrecommendationscrypto_intelligencecite_ledger
The cite_ledger block must contain:
cite_ledger_scoredata_confidencedimensionsbrag_entrieshard_blockersverdicttop_fixescitation_probability
Seven-dimension enforcement
The only valid dimensions are:
- Schema & Structured Data
- Content Depth
- Technical Trust
- Meta Tags & Open Graph
- AI Readability
- Heading Structure
- Security & Trust
Apply these checks:
- Exactly 7 dimensions must be present.
- No duplicate dimension names.
- No legacy labels are allowed.
- Every required dimension must exist.
- Every required weight must match the canonical value.
- Total dimension weight must equal 100.
Score consistency checks
Enforce these invariants:
visibility_scoremust equalcite_ledger.cite_ledger_score.category_gradesmust contain exactly 7 entries.cite_ledger.brag_entriescannot be empty.cite_ledger.top_fixesmust contain exactly 5 entries.
Recommendation checks
Every recommendation must be evidence-linked and measurable.
Validate that:
priorityis valid.descriptionstarts withMeasured:.difficultyis one of the allowed values.implementationis concrete and sufficiently detailed.evidence_idsis non-empty.- every
evidence_idbegins withev_. estimatedVisibilityLossmatches a percentage range such as10-20%.
Evidence and remediation quality gates
Treat these as completion criteria for a valid audit payload:
- Findings must be grounded in observable page or ledger evidence.
- Remediations must point to a specific fix path.
- No hallucinated dimensions, labels, or sections.
- No legacy terminology from older scoring systems.
- No partial schema acceptance.
Failure handling
If any rule fails, return:
valid: false- a complete list of exact validation errors
If the schema passes but a business rule fails, report the business rule error separately and do not downgrade it to a warning.
Output format
Always produce one of these two outcomes:
Pass
valid: trueerrors: []
Fail
valid: falseerrors: [exact messages]
Example use cases
- validating a new AI audit response before saving it
- repairing a payload that changed dimension names or weights
- checking that remediation items still point to evidence IDs
- blocking legacy category drift before it reaches the client