docs(spec): clarify agents plan correct accepts plan ID or decision ID
CI / build (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 28s
CI / push-validation (pull_request) Successful in 28s
CI / quality (pull_request) Successful in 40s
CI / typecheck (pull_request) Successful in 50s
CI / security (pull_request) Successful in 59s
CI / e2e_tests (pull_request) Successful in 3m21s
CI / integration_tests (pull_request) Successful in 4m16s
CI / unit_tests (pull_request) Successful in 5m11s
CI / docker (pull_request) Successful in 1m23s
CI / coverage (pull_request) Successful in 11m57s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m51s
CI / build (pull_request) Successful in 23s
CI / lint (pull_request) Successful in 38s
CI / helm (pull_request) Successful in 28s
CI / push-validation (pull_request) Successful in 28s
CI / quality (pull_request) Successful in 40s
CI / typecheck (pull_request) Successful in 50s
CI / security (pull_request) Successful in 59s
CI / e2e_tests (pull_request) Successful in 3m21s
CI / integration_tests (pull_request) Successful in 4m16s
CI / unit_tests (pull_request) Successful in 5m11s
CI / docker (pull_request) Successful in 1m23s
CI / coverage (pull_request) Successful in 11m57s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 57m51s
The implementation (plan.py correct_decision function) accepts either a plan ID or a decision ID as the positional identifier argument. When a plan ID is given, the root decision of that plan is auto-selected as the correction target. Updated documentation to reflect both identifier forms across the synopsis, argument description, recovery hints, correction guidance, and decision tree sections. ISSUES CLOSED: #5558
This commit is contained in:
+15
-11
@@ -339,7 +339,7 @@ The following standards are integrated into the architecture:
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> plan tree [<span style="color: cyan;">--show-superseded</span>] <span style="color: #66cc66;"><PLAN_ID></span>
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> plan explain [<span style="color: cyan;">--show-context</span>] [<span style="color: cyan;">--show-reasoning</span>] <span style="color: #66cc66;"><DECISION_ID></span>
|
||||
<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;"><GUIDANCE></span>
|
||||
[<span style="color: cyan;">--dry-run</span>] [<span style="color: cyan;">--yes</span>|<span style="color: yellow;">-y</span>] <span style="color: #66cc66;"><DECISION_ID></span>
|
||||
[<span style="color: cyan;">--dry-run</span>] [<span style="color: cyan;">--yes</span>|<span style="color: yellow;">-y</span>] <span style="color: #66cc66;"><PLAN_ID|DECISION_ID></span>
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> plan diff (<span style="color: magenta;"><span style="color: cyan;">--correction</span> <span style="color: #66cc66;"><CORRECTION_ATTEMPT_ID></span>|<span style="color: #66cc66;"><PLAN_ID></span></span>)
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> plan artifacts <span style="color: #66cc66;"><PLAN_ID></span>
|
||||
<span style="color: cyan; font-weight: 600;">agents</span> plan prompt <span style="color: #66cc66;"><PLAN_ID></span> <span style="color: #66cc66;"><GUIDANCE></span>
|
||||
@@ -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;"><GUIDANCE></span>
|
||||
[<span style="color: cyan;">--dry-run</span>] [<span style="color: cyan;">--yes</span>|<span style="color: yellow;">-y</span>] <span style="color: #66cc66;"><DECISION_ID></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;"><PLAN_ID|DECISION_ID></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 directly (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 "..." <DECISION_ID></span> │
|
||||
│ <span style="opacity: 0.7;">$ agents plan correct --mode revert -g "..." <PLAN_ID|DECISION_ID></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 <decision_id> <span style="color: cyan;">--mode</span>=<mode> <span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">"<corrected decision text>"</span>
|
||||
agents plan correct <plan_id|decision_id> <span style="color: cyan;">--mode</span>=<mode> <span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">"<corrected decision text>"</span>
|
||||
</code></pre></div>
|
||||
|
||||
**Parameters:**
|
||||
* `<decision_id>`: The ULID of the decision to correct
|
||||
* `<plan_id|decision_id>`: When a plan ID is provided, the command auto-selects the plan's root decision. Supplying a decision ID targets that specific decision directly.
|
||||
* `--mode`: Either `revert` (rollback and re-run) or `append` (add fix at end)
|
||||
* `--guidance`: Free-form text specifying what the correct decision should be
|
||||
|
||||
@@ -18713,6 +18713,10 @@ agents plan correct 01CRZ5QEHMVUX6TTHR81I7HCX <span style="color: cyan;">--mode<
|
||||
|
||||
<span style="opacity: 0.7;"># Add a missing invariant to the plan</span>
|
||||
agents invariant add <span style="color: cyan;">--plan</span> 01HXM8C2ZK4Q7C2B3F2R4VYV6J <span style="color: #66cc66;">"All database queries must use parameterized statements"</span>
|
||||
|
||||
<span style="opacity: 0.7;"># Use a plan ID to correct its root decision</span>
|
||||
agents plan correct 01HXM8C2ZK4Q7C2B3F2R4VYV6J <span style="color: cyan;">--mode</span>=revert <span style="opacity: 0.7;">\</span>
|
||||
<span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">"Re-run the plan with a revised authentication rollout before continuing child workstreams"</span>
|
||||
</code></pre></div>
|
||||
|
||||
**Note:** CLI commands should not require interactive input. The `--guidance` parameter provides the correction inline.
|
||||
@@ -19779,7 +19783,7 @@ agents action create <span style="color: cyan;">--config</span> ./actions/code-c
|
||||
agents plan use local/code-coverage local/api-service <span style="color: cyan;">--invariant</span> <span style="color: #66cc66;">"Mock all network calls"</span>
|
||||
|
||||
<span style="opacity: 0.7;"># Correct an invariant decision (remove or replace via standard correction)</span>
|
||||
agents plan correct <DECISION_ID> <span style="color: cyan;">--mode</span>=revert <span style="opacity: 0.7;">\</span>
|
||||
agents plan correct <PLAN_ID|DECISION_ID> <span style="color: cyan;">--mode</span>=revert <span style="opacity: 0.7;">\</span>
|
||||
<span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">"Remove this invariant - it does not apply to this module"</span>
|
||||
</code></pre></div>
|
||||
|
||||
@@ -28937,11 +28941,11 @@ agents plan explain <decision_id>
|
||||
<span style="opacity: 0.7;"># Shows: question, chosen option, alternatives, rationale, downstream impact</span>
|
||||
|
||||
<span style="opacity: 0.7;"># Correct via revert-and-replay</span>
|
||||
agents plan correct <decision_id> <span style="color: cyan;">--mode</span>=revert <span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">"<what the decision should be>"</span>
|
||||
agents plan correct <plan_id|decision_id> <span style="color: cyan;">--mode</span>=revert <span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">"<what the decision should be>"</span>
|
||||
<span style="opacity: 0.7;"># Re-executes from that point with the new guidance</span>
|
||||
|
||||
<span style="opacity: 0.7;"># Correct via append (add fix at end) </span>
|
||||
agents plan correct <decision_id> <span style="color: cyan;">--mode</span>=append <span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">"<description of the fix>"</span>
|
||||
agents plan correct <plan_id|decision_id> <span style="color: cyan;">--mode</span>=append <span style="color: cyan;">--guidance</span> <span style="color: #66cc66;">"<description of the fix>"</span>
|
||||
<span style="opacity: 0.7;"># Creates a new child plan to fix the outcome without rewriting history</span>
|
||||
|
||||
<span style="opacity: 0.7;"># Compare old vs new after correction</span>
|
||||
|
||||
Reference in New Issue
Block a user