DIXI Spec Kit documentation Español · Source on GitHub

/dixi.contract

Purpose

Define or change a contract and its impact on consumers.

Write the contract (API, events, CLI or schema) for the target in $ARGUMENTS, linked to its consumers.

Generated by scripts/build-command-reference.py from the packaged command text; do not edit by hand.

Invocation

Argument: <module or feature ID>. Angle brackets mark a required value and square brackets an optional one. In the steps, $ARGUMENTS is the text written after the command.

Example

The text after the command is the request; change it to match your project.

When to use it

Steps

  1. Run dixi workflow prepare contract --target <ID> --request "<interface to define or change>" and follow its steps.
  2. Write or update 07-contracts/<slug>.md with inputs, outputs, errors, limits and version.
  3. If the change breaks compatibility, flag it explicitly and list the affected consumers; propose the migration and ask the person to decide.
  4. Register the contract in .dixi/traceability.json (kind: contract, with the feature or module as parent).
  5. State which contract tests are missing, without writing them here.
  6. Suggest /dixi.threat-model or /dixi.plan.

Files read and written

Paths named by the command text:

Stops and human gates

Closing

Run dixi check before finishing and report: files touched, checks (run, failed, not run), open items and the suggested next command.

Next step