Skip to content

API Contract: HELIX Tracker Mutation Surface [FEAT-002]

Example from HELIX’s own docs. This generated page comes from docs/helix/. Use it to see the method in practice; start with the artifact-type catalog for reusable templates. Historical plans and reports may describe retired architecture.

API Contract: HELIX Tracker Mutation Surface [FEAT-002]

Contract ID: API-001 Type: CLI | Library

CLI Interface

Command: ddx bead update

Purpose: Mutate one existing tracker issue through supported field-level operations.
Usage: $ ddx bead update <id> [mutation flags]

Supported mutation classes:

  • workflow state: --status, --claim, --assignee, --priority
  • descriptive fields: --title, --description, --design, --acceptance, --notes
  • structural metadata: --labels, --spec-id, --parent, --deps
  • supervisory refinement metadata: --execution-eligible, --superseded-by, --replaces
  • reserved future metadata surface:
    • --refs

Input: command-line flags mapped to one issue mutation request
Output: human-readable success or explicit failure

Exit Codes:

  • 0: mutation applied successfully
  • 1: invalid command usage, missing issue, malformed tracker state, or failed safety check
  • 2: conflict detected and mutation not applied

Examples:

$ ddx bead update hx-abc123 --description "Clarify failure handling"
$ ddx bead update hx-abc123 --spec-id workflows/TRACKER.md
$ ddx bead update hx-abc123 --deps hx-def456,hx-fedcba

Command: ddx bead dep add

Purpose: Add one dependency edge between tracker issues.

Safety Requirement:

  • The mutation must not silently overwrite unrelated concurrent changes.
  • If the tracker state is malformed or the write cannot be applied safely, the command must fail explicitly.

Supervisory Concurrency Requirements

  • Mutation APIs used by interactive refinement must be visible to a live ddx work session at the next safe execution boundary.
  • Structural mutations that affect execution validity must be queryable through first-class tracker reads; ddx work must not have to infer them from raw JSONL edits.
  • The mutation surface supports:
    • execution-eligibility changes
    • issue supersession or replacement relationships
    • structural re-parenting and dependency rewrites used by polish/alignment
    • execution-safe queue reads through ddx bead ready --execution

Library API

Function: tracker_write_all

tracker_write_all <json-array>
  • Purpose: Replace the tracker file with a validated JSON array serialized back to JSONL.
  • Returns: success only when the write completes safely
  • Fails: when the current tracker state is malformed, the target state is invalid, or the write cannot be applied safely under the supported local execution model

Function: tracker_read_all

tracker_read_all
  • Purpose: Read all tracker issues as a JSON array
  • Returns: valid JSON array of issues
  • Fails: when .helix/issues.jsonl is malformed

Data Contracts

Issue Mutation Request

{
  "id": "hx-abc123",
  "mutations": {
    "description": "Clarify failure handling",
    "spec-id": "workflows/TRACKER.md",
    "deps": ["hx-def456"],
    "execution-eligible": false,
    "superseded-by": "hx-def456",
    "replaces": "hx-older123"
  }
}

Error Response Format

{
  "error": {
    "code": "TRACKER_CONFLICT",
    "message": "Tracker mutation could not be applied safely",
    "details": {
      "issue_id": "hx-abc123",
      "reason": "stale base state or malformed tracker file"
    }
  }
}

Validation

Test Scenarios

  1. Happy Path: supported field mutations update exactly one issue and preserve valid JSONL output.
  2. Malformed Input File: tracker commands fail explicitly when .helix/issues.jsonl cannot be parsed as valid JSONL.
  3. Interrupted or Partial Write Detection: commands surface failure rather than continuing on invalid tracker state.
  4. Conflicting Mutation Handling: overlapping write attempts are detected or prevented under the supported local execution model.
  5. Metadata Mutation Coverage: supported HELIX refinement fields are mutated through CLI/API surfaces instead of direct JSONL edits.
  6. Runner Revalidation Support: the mutation surface exposes enough structural metadata for ddx work to detect material queue drift before claim or close.
Innsigle seal: model-primary by HELIX

The signature covers the markdown source of this page, not these HTML bytes. This page quotes that seal; verify it against the source file.

Composition
model-primary
Issuer
HELIX helix
Signing key
ed25519:b0865d76d834a52c48506414d16f4e5a (build key)
Signed source
artifacts/contracts/API-001-helix-tracker-mutation.md
Signed
2026-09-23T14:11:58Z
Content digest
sha256:ae52abdb…1df68113

This build key is endorsed by the human key for build signing; the signature is not a detector and not a truth guarantee.

Raw attestation JSON
{
  "payload": {
    "innsigle": "1",
    "type": "https://innsigle.dev/claim/colophon/v1",
    "issued_at": "2026-09-23T14:11:58Z",
    "issuer": {
      "id": "helix",
      "name": "HELIX",
      "key_id": "ed25519:b0865d76d834a52c48506414d16f4e5a",
      "key_url": "https://documentdrivendx.github.io/helix/.well-known/innsigle/keys.json"
    },
    "subjects": [
      {
        "uri": "https://documentdrivendx.github.io/helix/artifacts/contracts/API-001-helix-tracker-mutation/",
        "digest": {
          "alg": "sha256",
          "value": "ae52abdb25936a8c0951c03beb9733f69676e0672cc1134907bc19831df68113"
        }
      }
    ],
    "colophon": {
      "schema_version": "1",
      "composition": "model-primary",
      "ingredients": [
        {
          "kind": "model",
          "name": "Claude",
          "role": "draft"
        },
        {
          "kind": "tool",
          "name": "sloptimizer",
          "role": "rewrite"
        },
        {
          "kind": "human",
          "name": "operator",
          "role": "structure-edit"
        }
      ],
      "notes": null
    }
  },
  "payload_encoding": "json",
  "signatures": [
    {
      "key_id": "ed25519:b0865d76d834a52c48506414d16f4e5a",
      "alg": "ed25519",
      "sig": "CmzzlP_WaKC3gyxBvf5cJxPnwY3h9YN7CflWBe6mh4e75mi6we6uA1w0K8w0zKpYs616Z43zwMxajB7v4S8iBA",
      "signed_at": "2026-09-23T14:11:58Z"
    }
  ]
}