Oko/Docs

Command reference

oko defects plan

Writes or replaces the complete repair plan: the mechanism that prevents the defect and the sweep that removes every existing case. A defect without one cannot be recorded as repaired.

Invocation#

Command
oko defects plan <id> --text TEXT [--json]

Inputs and options#

  • The defect id and the plan.

Output and state effect#

  • Stores the plan and prints `planned <id>: <plan>`. Submitting the identical plan leaves the register unchanged. A replaced plan is retained as a dated observation.
  • A verified repair or closing revision belongs to the existing plan; reopen it with a reason before changing the plan. An unqualified claim is open work: replacing its plan retires the claim into a dated note instead of transferring it to new requirements.
  • The native API uses the same locked register operation. Oko Desktop keeps the Repair plan sheet open on refusal and displays the actual register cause without discarding the entered plan.
  • Run `cargo test --manifest-path rust/Cargo.toml --test defects-selection -- --nocapture`. The real CLI and resident native API journey uses an isolated register: an unqualified claim remains in unrepaired lists and replacement of its plan clears it with history. The defects-released target checks that a closed defect refuses replacement without changing its closing evidence.

Refusals and safe exits#

  • `oko defects plan requires <id>`, `oko defects requires --text <text>` (exit 2); a blank plan is refused by name; `no defect with id <id> is registered`.
  • A changed plan is refused when the defect has a verified repair or closing revision. The refusal names the defect, actual revision and `oko defects reopen`; the old plan and its measure remain unchanged.

CLI reference#