Skip to content

feat(toolchain): skip a command whose declared prerequisite is missing - #16687

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-16646-43997949136-1
Nov 17, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-16646-43997949136-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Refs: #16646

Summary

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

Ecosystem records can now declare what a command needs beyond its tool on PATH: a new top-level requires map keyed by command key, plus a gates\[\].requires list (ecosystem-commands contract 1.4.0). Each entry has a name, a read-only probe whose exit 0 means present, an optional hint and an optional run-from. When a probe finds an entry absent, /toolchain:check and /toolchain:lint do not run that command. Its cell reads skip (prerequisite missing: <name>), an environment skip that makes the Overall line INCOMPLETE, never FAIL and never PASS. Neither skill ever installs a declared prerequisite, and /toolchain:check's lockfile install now runs only in attended sessions. This follows the owner's recorded decision (comment 6935227338): the cell wording, INCOMPLETE with no new overall state, no version comparison, the 30-second probe limit, tool-presence first, repo-root default, and the unattended signals lint already reads. Design choices made from the code: a probe's run-from reuses the gate key's two values (repo-root default, ecosystem) rather than taking a free path. The opt-in check runs before the probes, so a lint the consumer opted out of is never reported INCOMPLETE. A command that runs at some roots and is skipped at others reads FAIL if any run failed, else the skip. Two follow-ups the decision names stay outside this issue: moving records to a provider-agnostic home, and automated provisioning of declared prerequisites.

Remaining work

  • Record repositories, per the owner's decision 6: melodic-software/github-iac's yaml record declares the runner-policy runtime (ajv) under requires
  • melodic-software/ci-workflows: the yaml record declares the actionlint fork build under requires, and the TypeScript record declares its package and drops the npm ci in test-cmd
  • melodic-software/songwriting and melodic-software/agent-automations: their yaml records declare the actionlint fork build under requires
  • plugins/verification/skills/confirm/SKILL.md: the copy of check's counting rules on the direct path (toolchain not enabled) still installs lockfile dependencies in any session, and its environment-skip lists do not name prerequisite missing
  • plugins/review/agents/ecosystem-specialist.md: listed as an execution consumer of the verb keys, it does not yet run requires probes before a command

Not verified

  • Tidy skipped: the change is 19 files across 2 areas (plugins/toolchain with .changes/toolchain, and docs/contracts), over the 10-file and 1-area cutoffs
  • docs/contracts/ecosystem-commands/examples.test.sh new cases were not executed here (check-jsonschema cannot be invoked in this lane); left to the PR's CI
  • The new eval case was not run, and its grader samples were checked by reading only. The eval-cases and evals-quality validators are CI-only here; left to the PR's CI
  • check-affected's typos check skipped (typos not installed); left to the PR's CI

Fix

  • docs/contracts/ecosystem-commands/ecosystem.schema.json: new optional top-level requires (keys limited to the five command keys) and gates\[\].requires, both using new $defs prerequisites/prerequisite (name, probe, hint, run-from)
  • docs/contracts/ecosystem-commands/README.md: new 'Command prerequisites' section with a worked example, the order a resolver applies them in (tool presence, then an unmet single-condition opt-in skips the command without probing, then the probes), the skip cell, and the no-install rule
  • docs/contracts/ecosystem-commands/CHANGELOG.md: 1.4.0 entry for the additive schema change
  • docs/contracts/ecosystem-commands/examples.test.sh: schema cases showing that a command requires and a gate requires validate, and that an entry with no probe, a key naming no command, and a bad run-from are each rejected
  • plugins/toolchain/skills/check/SKILL.md: 'Declared prerequisites' rule (probe after tool presence and opt-in, 30 s Bash timeout, skip cell, partial-root rule, never install), lockfile install limited to attended runs (skip (dependencies missing: unattended run) otherwise), new skip-class table…
  • plugins/toolchain/skills/check/context/gates.md: a gate's own requires is probed after tool presence and skips the gate with the prerequisite cell; covers where its probe runs and the partial-root outcome
  • plugins/toolchain/skills/lint/SKILL.md: lint applies the same probes to the command its mode runs, lists prerequisite missing as an environment skip that blocks done, adds an edge case, and notes the requires exception to the un-probed sub-tool rule. Under --code-fix no probe runs before the confirmation gate grants an apply: the plan lists declared prerequisites as not probed yet, so --dry-run, an unattended run without --yes and a declined confirmation run no probe
  • plugins/toolchain/skills/setup/SKILL.md: setup lists requires among the optional keys it writes, and says to declare a prerequisite rather than put an install step in a command string
  • plugins/toolchain/reference/resolution-ladder.md: requires added to the record keys
  • plugins/toolchain/evals/ck-prerequisite-missing-incomplete/ (case.yaml, prompt.md, scaffold.sh, samples/*.json): new eval. A tracked bash.yaml declares an absent runtime for check-cmd. The graders check that Lint reads the prerequisite skip, Overall is INCOMPLETE and names it, Overall is never PASS…
  • .changes/toolchain/work-resolve-issue-issue-16646-43997949136-1-140e9b3b.md: minor changelog fragment

Verification

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

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

The run reports:

  • .lane/checks/bin/check-changelog-fragments: All 4 changelog fragment(s) under .changes/ are valid (run before and after the review fixes)
  • .lane/checks/bin/check-changed-skills: 3 skill(s) checked, 0 failed (check, lint, setup; warnings only: body size and token count above advisory caps, mostly from before this change)
  • .lane/checks/bin/check-affected: 16 passed, 6 skipped over 19 changed files (typos not installed; the rest are checks that run tree code and are reported as CI-only)
  • fresh-context review subagent over the whole diff: no high findings. Fixed from it: probe/opt-in order, partial-root outcome under run-from: ecosystem, multi-name cell format, Bash-tool timeout wording, a more robust actionlint probe in the README example, run-from documented in the README and…
  • read https: //github.com/rhysd/actionlint/blob/main/docs/usage.md: actionlint accepts a -version flag (the README example's probe calls actionlint -version); the page does not document its output format
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43997949136

Left out: the items under Not verified.

Related

#16646

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 success
Activity step success
Commits pushed none (read lane)
Run 44000305076

Failed GitHub API calls

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

@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-security-review: 1 inline finding(s) on e8cc2294cca9b4dbf24c0736e45d7b467929a465; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

Comment thread plugins/toolchain/skills/lint/SKILL.md Resolved
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #16687, incremental (e8cc229 → 4c25813)

This was an incremental review, and only blocking findings were in scope because this lane already reviewed an earlier head. I read every hunk of both files in scope: docs/contracts/ecosystem-commands/README.md and plugins/toolchain/skills/lint/SKILL.md. Neither file matches a trusted-path glob, and the push changes no workflow, action, token, trusted-actor list, kill switch, merge hold or plugin manifest.

What I checked

  • plugins/toolchain/skills/lint/SKILL.md, around line 143. This push fixes the earlier SUGGESTION: under --code-fix, the requires probes ran before the confirmation gate. Under --code-fix, no probe now runs until the confirmation gate grants an apply. The plan lists each declared prerequisite as not probed yet, so these three runs execute no probe at all:

    • --dry-run
    • a non-interactive run without --yes
    • a run where the user declines the confirmation

    After the apply is granted, probes run exactly where code-fix-cmd would have run. No new execution path appears. The added plan line, around line 166, is display text only.

  • docs/contracts/ecosystem-commands/README.md, around lines 177-178. The resolver order now states that an unmet single-condition opt-in skips the command without running its probes. This means fewer commands run, and it matches the skill text.

  • Instruction-surface lens. No guardrail was deleted or softened; the change tightens the consent and dry-run promise. I did not consult docs/contracts/instruction-exception-register/README.md.

No security issues in this push.

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 e8cc2294cca9b4dbf24c0736e45d7b467929a465; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental, blocking only): e8cc2294 → 4c258137

I read every hunk of both files in scope in .claude-lane/incremental.diff. This lane already reviewed an earlier head (blocking only: yes), so this review reports only blocking findings.

What changed:

  • docs/contracts/ecosystem-commands/README.md:177-178: step 1 of the resolver order now says that an unmet single-condition opt-in skips the command (skip (opt-in unmet: <condition>)) before any probe runs. That puts the contract in the same order as /toolchain:check and /toolchain:lint, and it fixes this lane's earlier finding (discussion_r4594419672, now resolved).
  • plugins/toolchain/skills/lint/SKILL.md:143 and :166: under --code-fix, no requires probe runs before the confirmation gate grants an apply. The plan now lists each declared code-fix-cmd prerequisite as not probed yet, so --dry-run, a non-interactive run without --yes, and a declined confirmation run no probe. Once the gate grants the apply, the probes run and an absent entry gives the usual skip (prerequisite missing: <name>). The plan example in the gate section shows the new line. This fixes the settled thread about probes running before consent.

Consistency check: I read the gate table (SKILL.md:171-177) and the scope fence (:183-187) against the new wording. Each of the three no-apply paths stops before any probe, which matches the paragraph. The opt-in rule at :127 still runs before the probes. I found no blocking problem.

Closing issue: the PR body says Refs: #16646 and has no closing-issue section, so there are no acceptance criteria to check. I ran nothing myself. The verification results in the PR body are the author's claims and I did not confirm them.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44001786447

Failed GitHub API calls

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

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM64POyz
Lane-Thread: PRRT_kwDOTCGFQM64PPjo
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-feedback-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 4c25813
Run 44001786447

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44001786447

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 4c258137bb80119e166e4c485207241278f981d6. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 4c25813

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-16687-4c258137bb80119e166e4c485207241278f981d6, expires on 2026-12-17.

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=4c258137bb80119e166e4c485207241278f981d6 rubric=10.0.1 rater=claude-opus-5-5 checker=claude-opus-5-5

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.

0 participants