FS FormScript

Resilience

Drafts that survive a device change

They start on the phone and finish on a laptop, and the in-progress answers have changed meaning.

what this buys you

  • Specified JSON snapshots
  • Restore recomputes validity
  • Your edit survives
  • Unimplemented versions are refused
Language specification 1.0 · level 3 of 5

Promise. A snapshot is specified JSON: content, touched, applicability, overrides, page, document version, and profile. Restoring recomputes validity. A snapshot whose version or profile is unimplemented is rejected — not partially restored. An overridable suggested value keeps the person’s edit. Save and resume across devices can share that shape.

Specified JSON

Content, touched, applicability, overrides, page, document version and profile — a shape, not a blob.

Restore recomputes validity

Resuming a draft re-evaluates the rules against the restored answers instead of trusting stored state.

Your edit survives

An overridable suggested value keeps the person’s edit rather than overwriting it with the default.

forms
form loan version = "1.0" {
  field annual_income {
    type = number
    validate { min = 0 }
  }
  group guarantor {
    field guarantor_name {
      type = string
      when = annual_income > 10000
      required = true
    }
  }
}

A phone that saved with income 8000 and a laptop that resumes it must agree the guarantor was never asked — and must not invent a blank guarantor_name.

Boundary. Byte-stable restore across *two* runtimes is level 4 — not claimed until a second implementation agrees. There is no automatic migration between form revisions; the application binds a session to a file.