Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
bump: minor
---

### Added

- **`/planning:draft-goal-condition` gives a condition that waits on the user a way to end.** When the intent has a step only the user can decide (a choice, a waiver, an approval, a change of plan), Step 2 ends the condition with an OR exit that names those items: each one still unmet is recorded in a named file as waiting on the user, with the exact reply or command they must give, and the file's contents are shown in the conversation. Step 2 also refuses, or rewrites with the user's agreement, a draft whose only end state needs a decision the user may make the other way, names an identifier the user can replace (a pull request number, an artifact or document URL), or fixes an order of work the user may reorder or defer.
36 changes: 33 additions & 3 deletions plugins/planning/skills/draft-goal-condition/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,35 @@ or drop an element so the evaluator can say yes. A user who asks mid-run for an
hears the same thing. If no approach gets there, the run ends by laying out the dead end with its
evidence (what was tried and what blocked each attempt) and handing the decision to the user.

**A step only the user can decide gets an exit the evaluator can credit.** When the intent has
such a step (a choice, a waiver, an approval, a change of plan), end the condition with an OR exit
that names those items, like: "...or each of `<the user-gated items>` still unmet is recorded in
`<named file>` as waiting on the user, with the exact reply or command they must give, and that
file's contents are shown in this conversation." The exit turns the hand-off above into an ending
the evaluator can credit. It names only items whose next step is a user decision, never items that
are merely hard, and where work was attempted the record carries the evidence of what was tried.
The file survives `/clear` and a session change; the evaluator credits only what the conversation
shows, so the turn shows the file's contents. Add the exit when drafting, never mid-run to get past
a stall. A condition with no user-gated step gets no exit.

- **Pointer**: <https://code.claude.com/docs/en/goal#how-evaluation-works>, for the verdicts the
evaluator returns and when a loop that makes no progress stops.
- **As of**: 2026-10-29
- **Recheck trigger**: that section adds a verdict for a condition waiting on the user, or changes
the no-progress stop.

**Refuse a fragile end state.** Refuse a draft, or rewrite it with the user's agreement, when its
only end state:

- needs a decision the user may make the other way, such as a verifier PASS on a phase the user
may waive;
- names an identifier the user can replace or an account change can kill: a pull request number,
an artifact or document URL;
- fixes an order of work the user may reorder or defer.

Offer the OR exit, a more stable reference (the branch rather than the pull request number, "the
artifact titled X" rather than its URL), or a wording about the outcome alone.

### When the outcome is not quantifiable

When the intent has no honest metric, do **not** manufacture one: a made-up number lets a run pass
Expand All @@ -156,9 +185,10 @@ If the intent is too vague to name a structure or a content list, settle it with

## Step 3. Mechanical length check

Validate the draft's character count against the **live limit from Step 1** with the deterministic
counter (no model estimation). Write the draft to a temp file and pass `--file`; this survives a
condition containing a single quote, backtick, or `$` that would mangle a piped string:
Validate the whole draft's character count, any OR exit included, against the **live limit from
Step 1** with the deterministic counter (no model estimation). Write the draft to a temp file and
pass `--file`; this survives a condition containing a single quote, backtick, or `$` that would
mangle a piped string:

```shell
bash "${CLAUDE_PLUGIN_ROOT}/scripts/goal-condition-length.sh" --limit <LIMIT_FROM_STEP_1> --file <path-to-draft>
Expand Down
63 changes: 63 additions & 0 deletions plugins/planning/skills/draft-goal-condition/evals/evals.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,69 @@
"Output does NOT emit a paste-ready /goal invocation for this intent",
"Output does NOT route to the /performance chain as a hill-climb loop"
]
},
{
"id": 7,
"name": "waivable-verifier-pass-gets-user-exit",
"prompt": "/planning:draft-goal-condition keep working until the phase verifier passes phase 3 of the migration plan. I may decide to waive phase 3 if it turns out to be too costly.",
"expected_output": "Step 2 spots that the only end state, a verifier PASS on phase 3, depends on a decision the user may make the other way (a waiver). The skill either refuses that draft or ends the condition with an OR exit: each unmet item is recorded in a named file as waiting on the user, with the exact reply or command they must give, and that file's contents are shown in the conversation. The exit covers only the user-gated item and does not loosen the PASS requirement for work that is merely hard.",
"files": [],
"expectations": [
"Output identifies the phase 3 verifier PASS as an end state the user can waive",
"Output either refuses the draft or adds an OR exit that records the waiting item in a named file whose contents are shown in the conversation",
"Any added exit names the exact reply or command the user must give",
"Output does NOT drop or weaken the verifier PASS for items that are not waiting on the user",
"Any drafted condition, the OR exit included, passes the length counter"
]
},
{
"id": 8,
"name": "pull-request-number-flagged-as-replaceable",
"prompt": "/planning:draft-goal-condition keep going until pull request #123 is merged.",
"expected_output": "Step 2 flags the pull request number as an identifier the user can invalidate by replacing the pull request, and suggests a more stable reference such as the branch name, or the waiting-on-the-user OR exit. It does not emit, without that flag, a condition whose only end state names #123.",
"files": [],
"expectations": [
"Output flags the pull request number as an identifier the user can replace, which would make the condition false",
"Output suggests the branch name or the waiting-on-the-user OR exit",
"Output does NOT emit, without that flag, a condition whose only end state is pull request #123 being merged"
]
},
{
"id": 9,
"name": "artifact-url-flagged-as-able-to-die",
"prompt": "/planning:draft-goal-condition keep working until the status report is republished at https://example.com/artifacts/abc123 with the new numbers.",
"expected_output": "Step 2 flags the artifact URL as an identifier that can die, for example when the account changes or the artifact is recreated under a new URL, and suggests a stable reference such as the artifact's title, or the waiting-on-the-user OR exit.",
"files": [],
"expectations": [
"Output flags the artifact URL as an identifier that an account switch or a recreation can kill",
"Output suggests a stable reference (for example the artifact's title) or the waiting-on-the-user OR exit",
"Output does NOT emit, without that flag, a condition whose only end state is republishing at that exact URL"
]
},
{
"id": 10,
"name": "fixed-work-order-offers-user-exit",
"prompt": "/planning:draft-goal-condition keep this one session going, resumed after each break, until work items W0 through W11 are finished in order, then run the audit.",
"expected_output": "Step 2 notices the condition fixes an order of work the user may reorder or defer, and offers the waiting-on-the-user OR exit for those items: each one the user reorders or defers is recorded in a named file as waiting on the user, with the reply they must give, and the file's contents are shown in the conversation.",
"files": [],
"expectations": [
"Output names the fixed order (W0 to W11, then the audit) as something the user may reorder or defer",
"Output offers the waiting-on-the-user OR exit for items the user may reorder or defer",
"Output does NOT accept the fixed order as the only end state without that offer",
"Any drafted condition, the OR exit included, passes the length counter"
]
},
{
"id": 11,
"name": "no-user-gated-step-adds-no-exit",
"prompt": "/planning:draft-goal-condition keep working until all tests in test/payments pass at commit a1b2c3d.",
"expected_output": "The intent has no step only the user can decide, so the skill drafts the condition with no waiting-on-the-user OR exit, and the draft passes the length counter.",
"files": [],
"expectations": [
"Output emits a paste-ready /goal invocation about all tests in test/payments passing at the named commit",
"The drafted condition does NOT carry a waiting-on-the-user OR exit",
"Output runs the length counter on the drafted condition"
]
}
]
}
Loading