Skip to content
StatusContactDeveloper previewSign in

Quickstart

Request and resolve a decision

A decision is recorded with a structured reason, advancing the workflow, and it appears in the audit trail.

preview15 minbeginnerEnvironment: testContract >=0.8 <1.0

What you will build

A decision that advances the work. Decisions separate proposal from authority: advancing state requires a decision by someone permitted to make it, recorded as an auditable event.

Architecture preview

The decision's structured reason makes it auditable. Resolving it changes the workflow state and can unlock or lock subsequent commands.

Prerequisites

  • An artifact revision with evidence (see the previous quickstart)

Steps

  1. Request a decision

    Open a decision request against the revision.

    bashwrites data
    curl --request POST \
      --url "$CRESCEVO_BASE_URL/v1/decisions" \
      --header "Authorization: Bearer $CRESCEVO_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{ "target": { "type": "artifact_revision", "id": "rev_2" }, "kind": "approval" }'
    Expected response
    { "decision_id": "d_1", "state": "pending", "evidence_ready": true }
  2. Resolve with a structured reason

    Approve, reject, or request a revision, recording the basis. The kernel checks your authority.

    bashwrites data
    curl --request POST \
      --url "$CRESCEVO_BASE_URL/v1/decisions/d_1/resolve" \
      --header "Authorization: Bearer $CRESCEVO_API_KEY" \
      --header "Content-Type: application/json" \
      --data '{ "resolution": "approve", "reason": "All required sources satisfied; conflict reviewed and accepted." }'
    Expected response
    { "decision_id": "d_1", "state": "resolved", "resolution": "approve" }
  3. Verify the audit history

    Read the audit events to confirm the request and resolution are both recorded.

    bash
    curl --url "$CRESCEVO_BASE_URL/v1/decisions/d_1/audit" \
      --header "Authorization: Bearer $CRESCEVO_API_KEY"

Verify success

  • The decision entered the resolved state with your resolution.
  • The structured reason is stored with the decision.
  • Both the request and the resolution appear in the audit history.

Clean up

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

Next: Execute an approved effect →

Start building on Crescevo.