AGENTS.md β€” chaindoc-labs / esignature-laws

Jekyll-published open dataset and narrative guides on electronic-signature law by jurisdiction. Site is built by GitHub Pages from main; published at https://labs.chaindoc.io.

For human-facing contribution rules see CONTRIBUTING.md and README.md. This file captures only what an AI agent needs that is not obvious from the file tree.

Architecture at a glance

Three parallel surfaces share the same facts:

Surface Path Purpose
Narrative guide (Markdown) docs/<region>/<country>.md Long-form prose, β‰₯800 words original before β€œFurther reading”.
Structured law row (JSON) data/laws.json Machine-readable summary of the same statute, validated by data/schema.json.
Handbook record (JSON) data/handbook/<country>/<slug>.json Per-contract-type drafting record, validated by data/handbook/schema.json. Bundled into data/handbook/<country>.json by CI.

When a narrative is added or changed, the matching data/laws.json row must be updated in the same PR. lastVerified and sources[].accessed should advance together.

Build, validate, run

Project-specific conventions

Adding a new jurisdiction (checklist)

  1. Create docs/<region>/<country>.md with required frontmatter (jurisdiction, country_code, region, statute, enacted, lastVerified, sources β‰₯2, confidence, validationConflicts: []). Mirror an existing file such as docs/eu/germany.md.
  2. Append a row to data/laws.json covering the same statute; required fields are listed in data/schema.json. additionalProperties: false β€” unknown keys fail validation silently in editors but break CI.
  3. Write β‰₯800 words of original prose before the ## Further Reading section.
  4. Run the ajv validation commands above locally before pushing.

Adding a handbook record

  1. Place the file at data/handbook/<country>/<slug>.json. Files at depth 1 (data/handbook/<country>.json) are bundles, not records β€” never edit them by hand.
  2. schema_version is currently 1. form_requirement.base ∈ textform | schriftform | electronic | qualified_electronic | notarial | free β€” these are German civil-law form categories; pick the closest equivalent for non-DE jurisdictions, do not invent new values.
  3. After saving, run ./scripts/build-handbook-bundle.sh so the bundle in data/handbook/<country>.json matches your records (CI auto-bundles de; other countries currently rely on the script being run manually or via workflow_dispatch).

Pitfalls