docs(spec): clarify agents plan correct accepts plan ID or decision ID #5612

Closed
HAL9000 wants to merge 1 commits from spec/plan-correct-plan-id-or-decision-id-5558 into master
+7 -7
View File
@@ -14912,14 +14912,14 @@ Including the raw model reasoning with `--show-reasoning`:
##### agents plan correct
<div class="highlight"><pre><code><span style="color: cyan; font-weight: 600;">agents</span> plan correct <span style="color: cyan;">--mode</span> (<span style="color: magenta;">revert|append</span>) (<span style="color: magenta;"><span style="color: cyan;">--guidance</span>|<span style="color: yellow;">-g</span></span>) <span style="color: #66cc66;">&lt;GUIDANCE&gt;</span>
[<span style="color: cyan;">--dry-run</span>] [<span style="color: cyan;">--yes</span>|<span style="color: yellow;">-y</span>] <span style="color: #66cc66;">&lt;DECISION_ID&gt;</span></code></pre></div>
[<span style="color: cyan;">--dry-run</span>] [<span style="color: cyan;">--yes</span>|<span style="color: yellow;">-y</span>] <span style="color: #66cc66;">&lt;PLAN_ID|DECISION_ID&gt;</span></code></pre></div>
**Purpose**
Correct a decision either by reverting and re-executing or by appending a fix.
**Arguments**
- `<DECISION_ID>`: Decision ID.
- `<PLAN_ID|DECISION_ID>`: The plan or decision to correct. When a plan ID is provided, the root decision of that plan is automatically selected as the correction target. When a decision ID is provided, that specific decision is targeted (backward-compatible behavior).
- `--mode revert|append`: Correction mode.
- `--guidance/-g TEXT`: Guidance text.
- `--dry-run`: Show impact without executing.
@@ -15857,7 +15857,7 @@ Show error decisions with recovery hints and retry history for a plan.
│ → Check sandbox permissions and retry execution │
│ <span style="opacity: 0.7;">$ agents plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J</span> │
│ → Revert to Strategize phase to adjust the plan │
│ <span style="opacity: 0.7;">$ agents plan correct --mode revert -g "..." &lt;DECISION_ID&gt;</span> │
│ <span style="opacity: 0.7;">$ agents plan correct --mode revert -g "..." &lt;PLAN_ID|DECISION_ID&gt;</span> │
╰────────────────────────────────────────────────────────────────────╯
<span style="color: #66cc66; font-weight: 600;">✓ OK</span>
@@ -15882,7 +15882,7 @@ Show error decisions with recovery hints and retry history for a plan.
→ Check sandbox permissions and retry execution
$ agents plan execute 01HXM8C2ZK4Q7C2B3F2R4VYV6J
→ Revert to Strategize phase to adjust the plan
$ agents plan correct --mode revert -g "..." <DECISION_ID>
$ agents plan correct --mode revert -g "..." <PLAN_ID|DECISION_ID>
[OK]
```
@@ -15909,7 +15909,7 @@ Show error decisions with recovery hints and retry history for a plan.
{
"action": "revert",
"message": "Revert to Strategize phase to adjust the plan",
"cli_command": "agents plan correct --mode revert -g \"...\" <DECISION_ID>"
"cli_command": "agents plan correct --mode revert -g \"...\" <PLAN_ID|DECISION_ID>"
}
]
}
@@ -18677,11 +18677,11 @@ Plan: 01KH29QDEE6DZTXKWNKCV8VP0F
All corrections use the same unified command:
<div class="highlight"><pre><code>
agents plan correct &lt;decision_id&gt; <span style="color: cyan;">--mode</span>=&lt;mode&gt; <span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">&quot;&lt;corrected decision text&gt;&quot;</span>
agents plan correct &lt;plan_id_or_decision_id&gt; <span style="color: cyan;">--mode</span>=&lt;mode&gt; <span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">&quot;&lt;corrected decision text&gt;&quot;</span>
</code></pre></div>
**Parameters:**
* `<decision_id>`: The ULID of the decision to correct
* `<plan_id_or_decision_id>`: Either a plan ULID (auto-selects the root decision) or a specific decision ULID. Using a plan ID is the most common usage — the root decision is automatically targeted. Providing a decision ID directly allows targeting any specific decision in the tree (backward-compatible).
* `--mode`: Either `revert` (rollback and re-run) or `append` (add fix at end)
* `--guidance`: Free-form text specifying what the correct decision should be