Skip to content

feat(planning): give acceptance criteria ids and trace them to plan phases and decompose slices - #10136

Merged
kyle-sexton merged 3 commits into
mainfrom
work-resolve-issue/issue-10039-40232713480-1
Oct 26, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
work-resolve-issue/issue-10039-40232713480-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #10039

Summary

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

Each Brief and plan acceptance criterion now carries an id (- AC<n>: ...). /planning:plan phases name the ids they satisfy on a **Satisfies:** line. check-plan-outcome.sh gains a criteria criterion that names every id no phase satisfies (unmapped=), plus unknown, missing and duplicate ids. /work-items:decompose traces each id to the slices that carry it, reports uncovered ids before approval, and keeps the id on each carried criterion in an item's ## Done when. Part of #6917 W5 (Refs: #6917).

Not verified

  • plugins/planning/scripts/check-plan-outcome.test.sh was not executed: this lane runs only the named wrappers, and check-affected runs without --tests. The new cases were hand-traced by the review subagent and left to CI's test lane.
  • bash plugins/skill-quality/scripts/check-skill.sh plugins/planning/skills and ... plugins/work-items/skills (issue done-when) were not run: check-affected skips changed-skills because it runs the checked tree's code, and no wrapper here runs it. Left to CI's changed-skills check.
  • Issue done-when: ci-status green on the PR, and the PR body carries Refs: #6917. Both are left to the PR's CI and the lane that opens the PR; the summary carries Refs: #6917.
  • plugins/planning/surface/exporters.py does not add ids itself; it keeps the AC<n>: prefix the restatement writes, and surface.md now tells the restatement to write it. A Brief exported without ids still passes the plan gate with a warning, and Step 4.7 says to add ids and rerun.

Fix

  • plugins/planning/scripts/check-plan-outcome.sh: new criteria criterion. It reads AC<n> ids from list items under any Acceptance criteria heading and **Satisfies:** lines inside phase sections. It fails on unmapped, unknown, without-id and duplicate ids. A plan with no ids passes with a `
  • plugins/planning/scripts/check-plan-outcome.test.sh: 11 new cases. Among them, a plan that leaves AC2 unmapped fails and names unmapped=AC2. Others cover unknown, without-id, duplicate, no-id warning, Satisfies outside a phase, checkbox and bold ids, AC10 vs AC1, and fenced criteria.
  • plugins/planning/skills/plan/SKILL.md: Step 4.7 lists criterion-to-phase mapping as a scripted criterion, says what to do on the no-id warning, and keeps Out-of-scope exclusion and phase-to-criterion tracing as checks done by reading.
  • plugins/planning/skills/plan/context/plan-template.md: new 'Criterion ids (traced to phases)' section (id format, numbering of id-less Brief criteria, ids for criteria the plan adds, the Satisfies line, what the gate fails), plus a contents entry.
  • plugins/planning/skills/plan/templates/plan-md-anatomy.md: a **Satisfies:** line in the phase skeleton, an optional ### Acceptance criteria slot under ## Plan, and the Brief's kept-as-written exception for added ids.
  • plugins/planning/skills/plan/evals/evals.json: case 10's expected output and expectation updated, since the script now claims the criterion-to-phase mapping.
  • plugins/planning/skills/interview/SKILL.md: the EARS section's emitted shape is - AC&lt;n&gt;: &lt;criterion&gt;, the tag goes after the id, and a slice keeps only the criterion's id.
  • plugins/planning/skills/interview/context/loop.md: the Brief template and EARS example carry AC ids, and the criteria-bullet rule defines the id and who traces it.
  • plugins/planning/skills/interview/context/surface.md: the restated acceptance section writes each criterion with its AC&lt;n&gt;: id, which export-brief keeps.
  • plugins/work-items/skills/decompose/SKILL.md: Step 1 collects criterion ids (numbering id-less sources in order). A Step 2 criterion trace reports uncovered ids. Step 3 adds a per-item 'Criteria carried' field and shows the trace with uncovered ids asked about by name. The ## Done when template an
  • plugins/work-items/skills/decompose/context/re-decompose.md: a criterion an implemented child carries counts as carried only when its text is unchanged, never by id alone.
  • .changes/planning/feat-10039-acceptance-criterion-ids-3f9c2a71.md: new minor fragment for planning.
  • .changes/work-items/feat-10039-acceptance-criterion-ids-3f9c2a71.md: new minor fragment for work-items.

Verification

The runner ran each check from the base copy against 8f58829:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • .lane/checks/bin/check-changelog-fragments: all 7 fragments under .changes/ valid
  • .lane/checks/bin/check-affected: 10 passed, 6 skipped over 13 changed files (skips: three validate-plugins steps and changed-skills run the checked tree's own code; no changed .py; typos not installed)
  • .lane/verify/bin/check-evals-quality plugins/planning/skills/plan/evals/evals.json: PASS, with 4 warnings that predate this change (path-shaped tokens in cases 7, 8 and 10)
  • .lane/verify/bin/cant-fail-scan --file plugins/planning/scripts/check-plan-outcome.test.sh --check: PASS, no gating findings
  • Fresh-context review subagent over the whole diff: hand-traced every new and existing test case to a pass and found no script bug under GNU awk or mawk. It raised 5 prose findings (no-id warning unhandled in Step 4.7, surface export path not producing ids, re-decompose matching on id alone, Step 5 r
  • read https: //github.com/melodic-software/claude-code-plugins/issues /6917: W5 lists 'acceptance criteria trace to phases and slices'; Q5 says implementation mechanisms are settled at /planning:plan per workstream; no id format is prescribed
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/40232713480

Left out: the items under Not verified.

Related

#10039

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed ec660fbd09df26f1a7a808c55c954c7bef656684: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

critical-findings: 0

Scope read: the whole 14-file diff and the PR context. The PR context text carried no embedded instructions. Nothing in the diff matches a TRUSTED PATHS: glob. No trust control changed: not the trusted-trigger check, the lane token request, the kill switch, resolve-config, any merge hold, or pr-pipeline.yaml. No plugin.json or marketplace.json changed, so there are no manifest <field> lines.

plugins/planning/scripts/check-plan-outcome.sh

  • This is the only executable change. It adds a criteria criterion to a local PLAN.md linter.
  • The script reads the plan file only. It does not use eval, build a command from plan text, or write files. Ids parsed from the plan reach only awk associative arrays and printf output. The format strings are fixed.
  • printf '...%s...' and the commas/wc -w helpers get plan-derived text as arguments, never as a format string or a command.
  • The failure path is closed: a mapped or unknown id fails the criterion and exits non-zero. The only softer path is the "no ids anywhere" case. It passes with a warning by design, and nothing outside the planning workflow trusts it.

Instruction-surface check: I reviewed the removal of the "every Brief acceptance criterion maps to a phase" prose check in plugins/planning/skills/plan/SKILL.md.

  • The script now enforces it (unmapped=).
  • The Out-of-scope exclusion check stays as a reading check.
  • The register-protected rules are untouched: no-silent-resolve and USER-RESERVED arbiter. The diff to those sections only prefixes AC<n>: ids to the examples.
  • I did not read docs/conventions/instruction-exception-register/README.md. I judged these edits by consequence: no removed rule leaves an action unchecked.

Re-pinned digests (plugins/planning/tests/interview-defenses.test.sh): the Stance and loop.md Step 4 digests changed.

  • The diff shows only the AC<n>: edits in those ranges, so the pins still guard the same rules.
  • I did not recompute the digests. I confirmed only that the changed lines in the diff are the AC-id prefixes.

Cost: none. This is a prose and shell-script change with no billing surface, so no hold.

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed ec660fbd09df26f1a7a808c55c954c7bef656684: 0 finding(s), 0 as inline comments.

No blocking or advisory findings on this head (ec660fb).

What I checked

  • I read the full diff and the PR context. I traced the new criteria awk block in plugins/planning/scripts/check-plan-outcome.sh and each of the 11 new cases in check-plan-outcome.test.sh against good_plan. I did not run the script or the tests, because this lane has no shell. The traces are my own reading, not execution.
    • Each id-form case grades as its expected string says: id after a checkbox or bold, AC10 vs AC1, a Satisfies line outside a phase, duplicate ids, an id-less criterion beside ones with ids, the no-id warning count, and a fenced ### Acceptance criteria block.
    • The ids=0 pass and the unmapped=, unknown=, without-id= and duplicate= details match the printed strings the tests grep for.
  • I could not recompute the two SHA-256 pins in plugins/planning/tests/interview-defenses.test.sh. They are author-claimed and unverified here, and CI's test lane covers them.
  • The SKILL, template, anatomy, interview, decompose and re-decompose prose is consistent with the script's behaviour: the id format, the **Satisfies:** line, and the no-id warning pass.

Closing issue #10039 (done-when)

  • A test under plugins/planning/ with one id unmapped, where the check names that id: met by "a criterion id no phase satisfies fails and names the id", which asserts unmapped=AC2 and exit 1.
  • git grep -n showing the criterion-id trace step in the plan and decompose skills: met. plan/SKILL.md Step 4.7 and decompose/SKILL.md Steps 1–3 carry it.
  • check-skill.sh on plugins/planning/skills and plugins/work-items/skills, and ci-status green: not run by me, and the author says they were not run either. These are left to CI.
  • The PR body carries Refs: #6917: met per the PR context.

Manifest: no plugin.json or marketplace.json changes, so no manifest lines apply. The two changelog fragments are bump: minor and match the additive change.

Spend: none. The change adds no paid resources and no new lane runs. No hold.

Minor observation, not counted: the in_ac heading match is exact (Acceptance criteria with optional trailing colon). A heading such as ### Acceptance criteria (EARS) is not graded, so that plan passes as ids=0 without a warning. The current templates all use the exact heading, so I'm not flagging this.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 25, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped on this pull request and needs a person: the lane could not fix every failing check; its run log names each one and why.

  • Reason: ci-fix-escalated
  • Resume key: 8f58829fc4f73f27a27fe6a575ab1b0e4110d476 (the head the lane stopped on)

To resume, deal with the reason above, remove the needs-human label (and do-not-merge, if set), then dispatch the pr-unblock workflow with pr-number=10136 and activity=fix-ci:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=10136 -f activity=fix-ci

@kyle-sexton kyle-sexton removed the needs-human Human-in-the-loop required; autonomous sessions must not resolve items carrying this. label Oct 26, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 44c7d9a Oct 26, 2026
54 of 55 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-10039-40232713480-1 branch October 26, 2026 17:44
kyle-sexton added a commit that referenced this pull request Oct 26, 2026
Brings in #10308, #10136, #10315 and #10311; merged cleanly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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): give acceptance criteria ids and trace them to plan phases and decompose slices

1 participant