validate_chain_draft
Validates nanopubs/chain-draft.json for wizard readiness, returning readyForWizard true only when no errors exist. Run after build-chain-draft to catch template, prefill, citation, and required-field issues.
Instructions
Check nanopubs/chain-draft.json before handing it to the chain wizard.
Run this at the end of Phase 5b, after pixi run build-chain-draft and
BEFORE pushing the file and opening the wizard URL. readyForWizard is true
only when nothing came back as an error.
This file — not the markdown drafts — is what the wizard pre-fills each step
from, and therefore what a human reviews and signs. validate_draft checks
the authoring input; this checks the artifact.
What it catches that reading the file cannot:
a superseded
template_uri, which is invisible in the JSON but makes the wizard pre-fill the old form. Re-run build-chain-draft to fix;a
prefillkey that is neither a template field nor a known platform form-field — the wizard silently drops it;a complex field in the wrong shape:
06_citation.st02must be[{cites, cited}]with at least one entry, and04_study.disciplineSelectionis a single object, NOT an array;a required field that is neither prefilled nor carried forward;
values violating the template's own regex (the Quote's 500-character cap lives there), an invalid vocabulary term, a malformed date, an unresolved
{{TOKEN}}, or a DOI that does not resolve;a
carry_forwardedge that runs backwards through the chain.
Fields the wizard fills itself are exempt, not reported missing: 02_aida
has no project, 03_claim no aida, 04_study no claim, because each
is carried forward from the step published before it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | ||
| path | Yes |