Skip to content
StatusContactDeveloper previewSign in

Quickstart

Produce and compare artifact revisions

Two revisions of an artifact exist, and you can read the structured diff between them.

preview15 minbeginnerEnvironment: testContract >=0.8 <1.0

What you will build

An artifact with two immutable revisions. New work appends a revision and advances the head pointer; nothing is overwritten, so you can compare exactly what changed.

Architecture preview

Each revision records its inputs, sources, and claim deltas. The kernel stores revisions immutably and returns a structured diff, not a text diff.

Prerequisites

  • A governed session (see the first quickstart)

Steps

  1. Create the first revision

    Produce a revision against the session's artifact. The body is illustrative; your blueprint defines the artifact type.

    bashwrites data
    curl --request POST \
      --url "$CRESCEVO_BASE_URL/v1/artifacts/a_123/revisions" \
      --header "Authorization: Bearer $CRESCEVO_API_KEY" \
      --header "Content-Type: application/json" \
      --header "Idempotency-Key: quickstart-rev-001" \
      --data '{ "body": { "title": "Draft brief", "sections": ["Summary"] } }'
    Expected response
    { "revision_id": "rev_1", "version_no": 1, "head": true }
  2. Create a second revision

    Submit a change. A new revision is appended; revision 1 is retained.

    bashwrites data
    curl --request POST \
      --url "$CRESCEVO_BASE_URL/v1/artifacts/a_123/revisions" \
      --header "Authorization: Bearer $CRESCEVO_API_KEY" \
      --header "Content-Type: application/json" \
      --header "Idempotency-Key: quickstart-rev-002" \
      --data '{ "body": { "title": "Draft brief", "sections": ["Summary", "Evidence"] } }'
    Expected response
    { "revision_id": "rev_2", "version_no": 2, "head": true }
  3. Inspect the diff

    Read the structured diff between the two revisions: added, changed, and removed fields, including claim and evidence-coverage changes.

    bash
    curl --url "$CRESCEVO_BASE_URL/v1/artifacts/a_123/diff?from=rev_1&to=rev_2" \
      --header "Authorization: Bearer $CRESCEVO_API_KEY"

Verify success

  • Two revisions exist with distinct version numbers.
  • The head pointer references the second revision.
  • The diff lists the section added between revisions.

Clean up

Test-tenant resources expire automatically; reset the fixture to start over.

Next: Ground a claim with evidence →

Start building on Crescevo.