DIXI Spec Kit documentation Español · Source on GitHub

/dixi.bugfix

Purpose

Fix a bug with traceability: reproduction, failing test first, minimal fix, spec updated.

Take the bug described in $ARGUMENTS from report to fix with a failing test committed before the code, and leave a traced record of cause, test and fix.

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

Invocation

Argument: [bug report, issue number or failing behaviour]. 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. Reproduce: write down the steps, the expected and the actual behaviour, and the environment. If you cannot reproduce it, say so and stop.
  2. Find the criterion, contract clause or principle the behaviour breaks in the feature's specs and 00-governance/principles.md. If the expected behaviour is not specified, it is a spec gap, not a bug: stop and suggest /dixi.clarify or /dixi.change.
  3. Write 05-features/<slug>/bugs/BUG-NNN.md (next free number): report, reproduction, broken criterion, and later the root cause, the test and the fix.
  4. Write a test that fails for the reported reason, in the project's language. Run it and show it fails. Propose committing it on its own, without Signed-off-by; the person signs later. From then on it is frozen.
  5. Write the minimal fix. Do not change frozen tests. Run make verify and show the real result; if it fails, fix the code, not the test.
  6. If the fix changes specified behaviour, update the spec or contract only after the person agrees, and record it in BUG-NNN.md. Register the test in .dixi/traceability.json (kind: test).
  7. Suggest /dixi.verify and /dixi.review.

Files read and written

Paths named by the command text:

Stops and human gates

Closing

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

Next step