{{command_prefix}}unlock-decision
A locked decision is hard - it cannot be amended. This skill is the only way back, and it is
deliberately heavyweight: it requires a named approver and records an audit entry, so reopening a
locked decision is always traceable. Contract: ../../reference/multi-author-model.md.
Invocation
| Command | Behavior |
|---|---|
{{command_prefix}}unlock-decision <id> --approver <who> | Unlock <id> (locked → reviewing), recording the approver. |
{{command_prefix}}unlock-decision <id> --approver <who> --reason <text> | Same, with a reason in the audit entry. |
{{command_prefix}}unlock-decision <id> --dry-run | Preview the audit record + the resulting state; change nothing. |
Steps
-
Validate args.
<decision-id>required;--approverrequired (a non-empty name). Missing--approver→ print the usage + exit without changing anything. -
Load the entry from
.design/reviews/<decision-id>/state.json. Not found → report it. Not inlockedstate → printunlock-decision: <id> is not locked (state: <state>); nothing to unlock. -
Preview. Show the audit entry that will be appended (
{ action: unlock, from: locked, to: reviewing, approver, reason }) and the resulting state. If--dry-run, stop here. -
Apply via the pure helper:
bashnode -e ' const fs = require("fs"); const rq = require("./scripts/lib/collab/review-queue.cjs"); const p = process.argv[1], approver = process.argv[2], reason = process.argv[3] || ""; const entry = JSON.parse(fs.readFileSync(p, "utf8")); const next = rq.unlock(entry, { approver, reason }); fs.writeFileSync(p, JSON.stringify(next, null, 2) + "\n"); console.log(JSON.stringify(next.audit[next.audit.length - 1])); ' ".design/reviews/<id>/state.json" "<who>" "<reason>" -
Report the new state + the recorded approver. The decision is now
reviewingand amendable again; it must be re-reviewed + re-locked to become durable.
Output
End with:
## UNLOCK-DECISION COMPLETE


