Skip to content

feat(discipline): place the lever-rerun, lever-audit, shared-recipe and baseline-first principle parts - #12221

Merged
kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-12145-41374161600-1
Nov 2, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-12145-41374161600-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #12145

Summary

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

Placed four parts of pstack's build-the-lever and sequence-verifiable-units principles as reasoned sentences in the skill steps that apply them. Each sentence gives its reason and the test that shows it applies, and names its source principle. The lever pilot now reruns the lever on its own output and expects no diff. The lever audit flags a claimed lever that has no script in its diff. implement-dispatch's brief step keeps one shared recipe file that every worker is forbidden to edit. implement's delivery order now puts a baseline ahead of the change it measures and a scaffold ahead of the feature built on it. Design choices: (1) The shared-recipe rule is a bold paragraph inside step 1 rather than a numbered item 18. A numbered item after item 17's sub-bullets breaks markdownlint MD029, and renumbering would break existing 'item 17' cross-references. (2) After review, the rerun check was also added to the pilot text in the two callers (implement's multi-site step and implement-dispatch's fan-out lever check) and to the discipline README. The lever-check mode only answers and stops, and the callers run the pilot from their own text, so without this the new step would never run. The callers' text is also the fallback when the discipline skill is off. No new sentence sends work to a /discipline:* skill, so none needs its own fallback.

Not verified

  • Tidy step not run: the change spans 2 areas (plugins/discipline and plugins/implementation, each with its .changes dir), over the tidy cutoff of 1 area.
  • The PR's CI being green (an issue done-when item) is left to the PR's CI. CI-only checks listed by check-affected (line-citations, lychee-offline, portability-lint, editorconfig and the rest) were not run here.
  • typos was skipped by check-affected because it is not installed in this lane.
  • docs/upstream/cursor-pstack.md was not updated. Its build-the-lever and sequence-verifiable-units rows still cite line numbers in the edited skills (already drifted before this change), and it does not list the new takes. Recording them there is follow-on ledger upkeep, not part of this issue's done
  • Untracked dotfiles at the checkout root (.bashrc, .bash_profile, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) appear in git status. This run did not create them (they look like sandbox mount artifacts) and they are not part of the change.

Fix

  • plugins/discipline/skills/script-the-deterministic-work/SKILL.md: Lever check step 4 adds a second run of the lever on its own output for the piloted site, expecting no diff, with the reason. The audit list gains an item that flags work citing a lever with no script (or no cited tool command) in its
  • plugins/discipline/README.md: the lever-check summary mentions the rerun-on-own-output check.
  • plugins/implementation/skills/implement-dispatch/SKILL.md: step 1 'Compose the brief' gains a 'One recipe, one file' paragraph. A recipe that several workers share lives in one file outside every ALLOWED set and on each FORBIDDEN list, and each brief points at it, with the reason and the test. The f
  • plugins/implementation/skills/implement/SKILL.md: the default delivery-order rule adds baseline-before-change and scaffold-before-feature, each with its reason and test, citing pstack's sequence-verifiable-units principle. The multi-site lever pilot (and its fallback when the discipline skill is una
  • .changes/discipline/work-resolve-issue-issue-12145-41374161600-1-4a48b487.md: new patch fragment describing the discipline additions.
  • .changes/implementation/work-resolve-issue-issue-12145-41374161600-1-8af15946.md: new patch fragment describing the implementation additions.

Verification

The runner ran each check from the base copy against dad2d8d:

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

The run reports:

  • read https: //raw.githubusercontent.com/cursor/plugins/88d47514b82e7c44f00f2b2a72ff6dd12158038c/pstack/skills/principle-build-the-lever/SKILL.md: do the first unit by hand, confirm the tool reproduces it, make it safe to rerun; when work is fanned out, keep the recipe in a shared skill outside the d
  • read https: //raw.githubusercontent.com/cursor/plugins/88d47514b82e7c44f00f2b2a72ff6dd12158038c/pstack/skills/principle-sequence-verifiable-units/SKILL.md: delivery orders include a failing test before the fix, removing code before reshaping, capturing a baseline before changing behavior, and scaffo
  • check-changelog-fragments: all 10 fragments valid (run before and after the review fixes)
  • check-changed-skills: 3 skills checked, 0 failed (warnings only: pre-existing size and description-length warnings, plus body-growth warnings for the added lines)
  • check-affected: first run failed markdownlint MD029 on a numbered item 18 in implement-dispatch; after changing it to a paragraph, 11 passed, 7 skipped, 0 failed (run again after the review fixes, same result)
  • scripts/check-line-citations.py (read, not run): it flags only citations past the end of the cited file. Every edited file grew, so the line citations in docs/upstream/cursor-pstack.md cannot newly fail it
  • fresh-context review subagent over the full diff: 5 findings plus 1 lower-confidence point, all applied (rerun check carried into the callers' pilot text, rerun wording made precise, audit test widened to accept a cited tool command, recipe file added to FORBIDDEN lists, 'snapshot' dropped from the
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41374161600

Left out: the items under Not verified.

Related

#12145

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

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #12221, no security issues found

I read every hunk of all 6 changed files in .claude-lane/pr.diff:

  • two .changes/ fragments
  • plugins/discipline/README.md
  • plugins/discipline/skills/script-the-deterministic-work/SKILL.md
  • plugins/implementation/skills/implement-dispatch/SKILL.md
  • plugins/implementation/skills/implement/SKILL.md

None of these files match a trusted-path glob. There are no workflow, action, script, manifest or userConfig changes, so no manifest lines apply.

Instruction surface. Every change adds to skill text, and no rule is deleted, narrowed or softened:

  • The lever pilot gains a rerun check that expects no diff.
  • The audit list gains an item for a claimed lever with no script in its diff.
  • implement-dispatch gains a "One recipe, one file" paragraph. It adds the shared recipe file to each brief's FORBIDDEN list, which narrows what a worker may write rather than widening it.
  • implement's delivery order adds baseline-before-change and scaffold-before-feature.

No rule was removed, so the protected classes in the instruction exception register had nothing to be checked against.

Trust controls. No trust control, token scope, kill switch or merge hold is touched. The PR context contains no embedded instructions aimed at this lane.

The round cap did not apply (0 prior rounds out of a cap of 3), and there were no prior findings to carry over.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed dad2d8d57f6b99e461c827454c905694b439759b: read 6 of 6 changed file(s); 4 finding(s), 0 as inline comments.

Code review: PR #12221 (head dad2d8d5)

I read all 6 changed files in full. The PR only changes Markdown: skill and README text plus two changelog fragments. Nothing in it can cause a charge, and no hold applies.

Closing issue #12145, checked against its done-when list:

  • Lever-check step 4 rerun with a reason: met (script-the-deterministic-work/SKILL.md L186-195). The two caller skills (implement's multi-site step and implement-dispatch's fan-out lever check) and the discipline README now say the same thing.
  • Audit item for a lever cited with no script in the diff, with its test: met (L98-104).
  • Shared recipe kept outside every worker's write scope, with a reason: met (implement-dispatch L97). It is placed inside step 1 "Compose the brief" and uses that skill's own ALLOWED/FORBIDDEN fence terms.
  • Baseline before the change and scaffold before the feature, each with a reason: met (implement L133).
  • Wording rule: met. Each added sentence gives its reason and the test that shows it applies, and names pstack's build-the-lever or sequence-verifiable-units principle. No new sentence sends work to a /discipline:* skill, so none needs a fallback.
  • bump: patch fragments under .changes/discipline/ and .changes/implementation/: met.
  • CI green: this lane cannot see it. It is left to CI.

Path-scoped rules: skill-bodies-state-current-rules.md and cost-claims.md match the changed skill files. The added text restates no volatile upstream detail and makes no cost claim. It names pstack principles as its source and does not quote upstream wording.

Findings (4, all advisory): each of the four behaviour criteria above is met, but no eval or test in the PR or the repository would fail if the new text were removed. The repository already keeps per-skill evals/evals.json files for all three skills. I searched them for the rerun, recipe, baseline-ordering and scaffold behaviour and found no case. The only near match is refactor-parity-contract-baseline-first, which covers visual-parity baselines, not the order of commits. The inline comments say which file each case would go in.

Not verified by me: the author reports that check-changelog-fragments, check-changed-skills and check-affected passed. That is the author's claim, and I did not run them. No plugin.json or marketplace.json changed, so the manifest checks do not apply. There are no prior findings or settled threads, and this is round 1 of a cap of 3.

critical-findings: 4

Findings not posted inline (their lines are not in the diff):

  • plugins/discipline/skills/script-the-deterministic-work/SKILL.md:195 (RIGHT): Advisory: no eval covers the new rerun check. Issue feat(discipline): place the lever-rerun, lever-audit, shared-recipe and baseline-first principle parts #12145 criterion: "lever-check step 4 says to run the lever a second time on the pilot and expect no diff, with the reason". The text meets it. But no case in plugins/discipline/skills/script-the-deterministic-work/evals/evals.json checks it, and I found no repo eval that does either. If this sentence were deleted or reworded so that the rerun step is gone, nothing would fail.

A possible fix is a lever-check case whose lever is not idempotent, for example a sed that prepends a ctx, argument to a call. The expectation would be that the answer requires a second run on the piloted site and sends the lever back to be fixed when that run leaves a diff.

  • plugins/discipline/skills/script-the-deterministic-work/SKILL.md:104 (RIGHT): Advisory: no eval covers the new audit item. Issue feat(discipline): place the lever-rerun, lever-audit, shared-recipe and baseline-first principle parts #12145 criterion: "The same skill's audit list gains an item: work that cites a lever but has no script in its diff did not apply one, with the test that shows it." The item is present, but no audit-mode case in script-the-deterministic-work/evals/evals.json presents a report that says "a codemod made these edits" with a diff that contains no script or command. The skill could stop flagging that case and nothing would fail. One such case, expecting the audit to flag that no lever was applied, would cover it.
  • plugins/implementation/skills/implement-dispatch/SKILL.md:97 (RIGHT): Advisory: no eval covers the shared-recipe rule. Issue feat(discipline): place the lever-rerun, lever-audit, shared-recipe and baseline-first principle parts #12145 criterion: "when several workers apply one recipe, the recipe lives in one file outside every worker's write scope and each brief points at it, with the reason". The paragraph meets it, but plugins/implementation/skills/implement-dispatch/evals/evals.json has no case where two or more briefs in one wave share the same steps. The expected briefs in such a case would each cite one recipe path by its absolute path, keep that path out of every ALLOWED set and put it on every FORBIDDEN list. Without that case, a regression back to copying the recipe into each brief would pass.
  • plugins/implementation/skills/implement/SKILL.md:133 (RIGHT): Advisory: no eval covers the two new delivery orders. Issue feat(discipline): place the lever-rerun, lever-audit, shared-recipe and baseline-first principle parts #12145 criterion: "the delivery-order rule names two more orders, each with its reason: a baseline is captured before the change it measures, and a scaffold lands before the feature built on it." Both orders are written in, but nothing in plugins/implementation/skills/implement/evals/evals.json checks commit order for either one. The existing refactor-parity-contract-baseline-first case covers /testing:check-visual-parity baselines, not a commit that captures a benchmark ahead of the change it measures. Two cases would cover this gap. One would be a plan that claims a speedup, expecting the baseline commit first. The other would be a feature that needs a new module and wiring, expecting the scaffold commit, green on its own, ahead of the feature commit.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 2, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head dad2d8d57f6b99e461c827454c905694b439759b.

Merged via the queue into main with commit 0948d5a Nov 2, 2026
44 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-12145-41374161600-1 branch November 2, 2026 03:13
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(discipline): place the lever-rerun, lever-audit, shared-recipe and baseline-first principle parts

1 participant