Walden§ docs

JSON Contract

Every command takes --json and emits one versioned envelope on stdout — on success and error paths alike. This page is the contract for tooling: field names, the three evidence surfaces, and what "additive" promises.

The envelope

{
  "schema_version": "v0beta1",
  "command": "release-check",
  "ok": true,
  "result": { }
}

Common result fields

Every command populates the subset that applies:

FieldTypeMeaning
summarystringOne-line human outcome — display it, don't parse it
next_actionstringThe single next step, when one exists
blockersstring[]Named blockers, each carrying its remedy
warningsstring[]Non-blocking observations. Do not drop these — verify's purity violations surface here
exit_codeintMirrors the process exit code
created_files, updated_filesstring[]Filesystem effects (init, scaffold)
current_phasestringWorkflow position (status, review)
completed_tasks, auto_completedstring[]Execution effects (task complete)
validated_phases, skipped_phasesstring[]Validation scope
document_schema_versionstringSupported document schema (version command)

Evidence: one shape, three surfaces

Task evidence appears on three surfaces. Two are views — ordered lists under result.evidence, sharing one entry shape and one set of field names. One is storage — the on-disk ledger. Consumers should parse the commands, not the file.

The shared entry shape (result.evidence[], emitted by both verify --json and evidence status --json):

FieldTypeNotes
task_idstringLeaf task identifier
statestringverified | stale-spec | stale-code | failed | unrecorded | pending
passedboolThe proof outcome — this run's (verify) or the stored result (status). Omitted when no record exists
failurestringFailure detail, when the entry failed in this run (verify)
recorded_identitystringCode identity the record binds
current_identitystringCode identity of the present tree
profileobjectRecorded execution profile, {"key": "value"}
profile_driftarray{key, recorded, current} per differing profile entry (status)
profile_legacyboolRecord predates profiles

The on-disk ledger (.walden/evidence/<feature>.json, schema v1alpha1) is a state map keyed by task identifier, holding facts only — proof steps, chain fingerprints, code_identity, profile, result: passed|failed, verified_at. It never stores derived states: those are computed at read time by the views above. The map-versus-list difference is deliberate — the ledger is a claim about the plan's tasks; the outputs are reports.

Certification (release check --json)

{
  "result": {
    "summary": "RELEASABLE — 3 feature(s) certified, completion complete, commit ba53cfe55b40",
    "completion": "complete",
    "certified_commit": "ba53cfe55b40…",
    "release": {
      "releasable": true,
      "strict": false,
      "features": [
        {
          "feature": "user-auth",
          "criteria": [
            {"name": "chain", "passed": true},
            {"name": "validation", "passed": true},
            {"name": "decisions", "passed": true},
            {"name": "evidence", "passed": true}
          ],
          "pending": []
        }
      ],
      "worktree": {"git_skipped": false}
    }
  }
}

The gate criteria (chain, validation, decisions, evidence, plus the worktree policy) are a frozen public contract: semantic changes to what they judge are breaking changes, announced as such.

Adoption (adopt --json)

result.adoption: {"apply": bool, "features": []} where each feature carries class (backfill | re-prove | complete | blocked) and, per mode: plan — sealable_docs, reprove_count; apply — sealed_docs, verified, failed, skipped; plus reason when blocked or errored. Exit 1 when apply produced failures; the JSON envelope always carries the full report.

Error paths

Errors use the same envelope: ok: false, result.summary naming the error, exit_code: 1. There is no separate error format — a parser that handles the envelope handles everything.

Stability policy