Skip to content

feat(planning): open every plan with a behavior list the outcome gate checks - #13393

Merged
kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-13389-41924748797-1
Nov 5, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-13389-41924748797-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes #13389
Refs: #6917

Summary

Opened by the work-resolve-issue lane. The run's own summary:

A plan now opens with a ### Behavior list: each item is one observable claim that cites the acceptance criteria it serves, an optional Process criteria: line holds the criteria no behavior shows, and each phase names the behaviors it builds on a **Delivers:** line. The outcome gate (check-plan-outcome.sh) gains a behaviors criterion that fails a plan with AC ids whose list is missing or not the first ### under ## Plan, or has a duplicate B id, an item citing no AC, an unknown cite, an uncited criterion, a criterion both cited and on the Process line, an undelivered behavior, or an unknown Delivers id; a plan with no AC ids passes with warning=behaviors-without-criterion-ids. Design choices: failure tokens follow the existing criteria criterion's key=ids style (list=missing, list=not-first, duplicate=, no-cite=, unknown-cite=, uncited=, cited-and-process=, undelivered=, unknown-delivers=); no-cite= is a ninth reason added to enforce the contract's 'each item cites >= 1 defined AC id' rule, which none of the eight listed reasons covers for an item with no cite at all. PR body should carry Refs: #6917.

Not verified

  • bash plugins/planning/scripts/check-plan-outcome.test.sh was not executed: this lane's Bash runs only the named wrappers, and check-affected skips code from the checked tree. The cases were hand-traced by a review subagent; left to the PR's CI.
  • shellcheck and markdownlint on the touched files were not run here (no wrapper; check-changed-skills skips markdownlint); left to the PR's CI.
  • tidy recorded skipped: ai-slop pass 5 ran only its rubric read and a manual em-dash/vocabulary grep, because detect.sh and digest-guard.sh cannot run under this lane's Bash rule; passes 1-4 ran.
  • Review NITs left as is: Behavior items with no B id are skipped rather than reported; AC/B id scans are unanchored on the line; the Abbreviated template has a list but no phase to deliver it (the gate already fails that template on phases). None is in the issue's rule list.
  • Untracked files .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc in the checkout root were not created by this run and are not part of the change.

Fix

  • plugins/planning/scripts/check-plan-outcome.sh: new behaviors criterion (awk tracks ## Plan, its first ###, the ### Behavior items and Process line, and phase **Delivers:** lines; bash reports pass/fail with one token per failure reason and a warning when no AC id exists); header usage…
  • plugins/planning/scripts/check-plan-outcome.test.sh: traced_plan gets a valid two-item list and Delivers lines; one case per failure reason (missing, not-first, unknown-cite, uncited, cited-and-process, undelivered, unknown-delivers, duplicate, no-cite), a Process-line pass case, a plan-added…
  • plugins/planning/skills/plan/templates/plan-md-anatomy.md: ### Behavior with Process criteria: as the first ### under ## Plan (after Citations, before a plan-added Acceptance criteria block), a **Delivers:** line under Phase 1, a sentence naming the gate, and a new Reader-depth renders…
  • plugins/planning/skills/plan/context/plan-template.md: Full and Abbreviated templates open with the list; the Criterion ids example shows the list, a Process criterion and a Delivers line; new rules for placement, one-sentence split-by-behavior items, the Process line (still satisfied by a phase),…
  • plugins/planning/skills/plan/SKILL.md: Step 2 writes the behavior list first; Step 4.7 names the behaviors criterion and its warning.
  • plugins/planning/skills/plan/context/review-mode.md: a re-plan adds ### Behavior and Delivers lines when the list is missing.
  • plugins/planning/skills/plan/context/plan-reviewer.md: plan-mechanics axis checks the split by behavior and each phase's Delivers line.
  • plugins/planning/agents/plan-reviewer.md: a third every-plan check for behavior items split by file/layer/step and wrong Delivers lines.
  • .changes/planning/work-resolve-issue-issue-13389-41924748797-1-684787bc.md: minor changelog fragment for planning.

Verification

The runner ran each check from the base copy against 38ea3ab:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read https: //github.com/melodic-software/claude-code-plugins/issues /6927#issuecomment-6643576981: the plan's Phase 1 names the behaviors criterion's failure reasons (missing, not-first, unknown cite, uncited criterion, cited-and-process, undelivered behavior, unknown delivers, duplicate id) and…
  • check-changelog-fragments: All 8 changelog fragment(s) under .changes/ are valid (run after the last edit)
  • check-changed-skills: CHECK-SKILL plan PASS, 0 errors, 6 warnings (pre-existing size/description warnings plus body grew 386 -> 388 lines)
  • check-affected: 13 passed, 6 skipped over 9 changed files
  • fresh-context review subagent: hand-traced every run/approval_run case in check-plan-outcome.test.sh through the new gate and found each exit code and pattern matching (no BUG); its RISK finding (the Criterion ids example failed the criteria gate because the Process criterion had no Satisfies line)…
  • tidy-diff over the change's lines: one restating bullet cut in plan-template.md, the fragment names /planning:plan Step 2; no code edits or comment deletions
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41924748797

Left out: the items under Not verified.

Related

#13389

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head eed4ab7d3f5ee40bfba3814bd937042f40e9815e. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:fail)

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed eed4ab7d3f5ee40bfba3814bd937042f40e9815e: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #13393 (incremental, head eed4ab7)

I found no security issues in what changed since 38ea3abf. I read every hunk of both files in the incremental scope. Neither file matches a trusted-path glob.

What changed

  • plugins/planning/scripts/check-plan-outcome.sh: In the behaviors criterion, the inline AC-cite loop moved into an awk helper, b_scan(). A new close_b() lets a ### Behavior item stay open over its indented continuation lines, so a cite wrapped onto the next line still counts. The no-cite verdict is now made when the item closes: at a heading, at a non-indented non-blank line, or at END. The header comment was updated to match.
    • This is still awk regex parsing (match/substr) of a local plan file. Plan text never reaches eval, a command position, a file path or the network.
    • A hostile plan can only change the gate's pass or fail result. It could already do that before this change, and it gets no code execution.
  • plugins/planning/scripts/check-plan-outcome.test.sh: Two new fixture cases, one for a wrapped cite that passes and one for a wrapped item with no cite that fails. They write to $TMP only.

Other checks

  • Trust controls: nothing in this change touches the trusted-trigger check, the lane token, the kill switch, the token broker or any merge hold.
  • Plugin manifests: no manifest changed.
  • Instruction surfaces: no standing instruction was deleted or softened.
  • PR context: it describes the change and carries no embedded instruction aimed at this lane.

This review was blocking only: the prior-findings file shows that this lane already reviewed an earlier head. That earlier review reported no findings, so nothing carries over.

Spend: none. The change adds no lane runs, schedules or billed resources.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 38ea3abf710ee5b8d662e6943e497d1b480937cc; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed eed4ab7d3f5ee40bfba3814bd937042f40e9815e: read 2 of 2 changed file(s); 1 finding(s), 0 as inline comments.

Code review (incremental, blocking only): PR #13393

Scope: this round covers only what changed since 38ea3abf. That is the 2 files in .claude-lane/incremental.diff: plugins/planning/scripts/check-plan-outcome.sh and plugins/planning/scripts/check-plan-outcome.test.sh. I read every hunk of both and the head copy of the awk block around them. This lane already reviewed an earlier head, so this review reports blocking findings only.

The earlier inline finding is fixed

The earlier finding was that a Behavior item fails when its (AC…) cite wraps onto a second line. This push fixes it (check-plan-outcome.sh:170-185, :263-266, :277-279).

  • A B<n> item now stays open across its indented continuation lines, and each of those lines is scanned for AC ids.
  • no-cite is only recorded when the item closes. It closes on the next heading (:198), on a non-indented line or list marker, on a Process criteria: line, or at END (:347).
  • Blank lines leave the item open, so a loose-list continuation still counts.
  • I checked the order of the awk blocks. The in_behavior && b_open block runs before the item block, so a new - B<n>: line (including one with a single leading space) closes the previous item before it opens its own.

Two new tests cover the change: a wrapped cite that passes (.test.sh:403-404) and a wrapped item with no cite that still fails no-cite=B3 (:406-407). I traced them against traced_plan by reading the code. I did not run them.

Blocking finding (restated: it has no line anchor, and nothing in this push addresses it)

  1. Closing-issue criterion not met. feat(planning): open every plan with a behavior list the outcome gate checks #13389 "Done when" says: "The PR body carries Refs: #6917." The PR body still has no Refs: #6917 line.

The advisory finding from the last round (the anatomy/template ### Behavior placement is not guarded by any test) is not repeated, because this review reports blocking findings only.

No plugin manifest changed in this push. Nothing in the PR context or the prior-findings file tries to direct this lane.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6z1uXn
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on eed4ab7.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on eed4ab7.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the review replies the lane recorded did not pass validation, so none was posted. The lane sets no label: the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=13393 -f activity=address-feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(planning): open every plan with a behavior list the outcome gate checks

1 participant