Skip to content

feat(session-flow): gate optional plugin calls on available skills and record the plugin profile in handoffs - #16446

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-16430-43762479916-1
Nov 15, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Refs: #16430

Summary

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

The seam-phrasing contract's gate is now an availability condition: a reference invokes another plugin's skill when it is among the available skills (enabled), so a plugin that is installed but switched off, for example by a plugin profile, takes the documented fallback. The handoff structure reference gains one gated sentence that writes /plugin-profiles:profile status output into Environment to re-establish only when that skill is available, and nothing otherwise. The hook review rules gain the hook-unit rule. The named session-flow, planning and knowledge sites move to the availability wording, and a new eval covers the installed-but-disabled case. Choices: sites already reading "when it is among the available skills" count as the enabled wording and stay unchanged. That covers both /session-flow:orient gates, so orient needed no edit. A user-only target's description is never in context, so its gate reads "when the plugin is enabled", judged by another of its skills being available. The fleet-wide migration and the ADR are left for later (see remaining).

Remaining work

  • Write the plugin-profiles ADR via /architecture:record-decision: profile file format and keys, profile homes (the ADR 0075 fix 9 departure), the marketplace governance rule, the extend rule, the hook-unit rule and the two hook plugin names, and the removal of core. The decisions are not recorded in…
  • Move every other classified gate site across the marketplace from installed-ness wording to the availability wording, leaving fixtures and plugin-sync wording unchanged, with a changelog fragment per plugin.

Not verified

  • The ho-disabled-profile-plugin-no-entry eval was not run (no eval runner in this lane); its 4-run pass is left for an eval run.
  • check-evals-quality takes skill-level evals.json files, so it does not apply to the new case.yaml eval; validate-cases.py (eval-cases) is CI only and was not run here.
  • Tidy skipped: the change is over the tidy cutoffs (14 files, several areas).
  • scaffold.sh is written without its executable bit (the file tools cannot set modes). Sibling evals' scaffolds may be run through bash, but this was not checked.
  • The ADR was not written. Its one-way doors (profile file format and keys, profile homes, the two hook plugin names) are in neither the repo, the issue nor the container issue #16428, and writing them would invent the design.
  • Many installed-ness gate sites remain across the other plugins (for example session-flow clean-stop, workflow wrap-up and retro, planning devils-advocate and interview, coupling reduce, attribution audit, architecture improve). The site classification the issue mentions is not in the repo.

Fix

  • docs/contracts/seam-phrasing/README.md: gate element is now an availability condition ("among the available skills (enabled)") with a cited docs link. User-only targets gate on the plugin being enabled. Install-state text (plugin sync, install recipes, eval fixtures) is declared not a gate. The…
  • docs/review/hooks.md: adds the hook-unit rule (a hook unit never depends on a skill, agent or file of another plugin; skill plugins may read what it records through a documented path and must fall back when it is off).
  • plugins/session-flow/reference/structure.md: one gated Plugin profile sentence under Environment to re-establish naming /plugin-profiles:profile status; fallback writes nothing about plugin profiles.
  • plugins/session-flow/skills/continue-in-background/SKILL.md: /planning:draft-goal-condition gate reads "when it is among the available skills".
  • plugins/planning/skills/plan/context/plan-template.md: domain-specialist guidance cites a skill only when it is among the available skills (enabled, not merely installed).
  • plugins/knowledge/skills/course-digest/context/workflow.md: /discovery:explore and /discovery:research gates read "when it is among the available skills".
  • plugins/session-flow/evals/ho-disabled-profile-plugin-no-entry/ (case.yaml, scaffold.sh, samples/*.json): new eval, runs: 4. The scaffold writes a stub plugin-profiles plugin with a profile skill and a user-scope install record for plugin-profiles@fixture-market into the run's temporary home. It refuses the account's real home and never overwrites a file. The project settings switch that plugin off, so it is installed but disabled. Graders: no plugin-profiles Skill call, no profile entry in the save-point, save-point written.
  • .changes/session-flow/work-resolve-issue-issue-16430-43762479916-1-412a066f.md: minor fragment (Added profile entry and eval; Changed continue-in-background gate).
  • .changes/planning/work-resolve-issue-issue-16430-43762479916-1-59e92d7a.md: patch fragment for the plan-template gate.
  • .changes/knowledge/work-resolve-issue-issue-16430-43762479916-1-20487268.md: patch fragment for the course-digest gates.

Verification

The runner ran each check from the base copy against 2ae299b:

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

The run reports:

  • check-changelog-fragments: all 4 fragments valid (run before and after review fixes)
  • check-changed-skills: 3 skills checked, 0 failed (warnings only, all pre-existing size/description warnings)
  • check-affected: 15 passed, 6 skipped, over 14 changed files
  • Fresh-context review subagent over the whole diff: 9 findings. Fixed: eval prompt planted plugin-profiles text, so it is dropped and the disabled state moved to scaffold settings; skill-call grader too loose; title-case gap in the entry grader; user-only gate could never be true; Conformance claim…
  • Grep: docs/contracts/seam-phrasing/README.md no longer contains "if that plugin is installed"; plugins/session-flow/skills/orient has no installed-ness gate (its two gates already read "among the available skills")
  • read https: //code.claude.com/docs/en/discover-plugins: a plugin can be installed but off (defaultEnabled: false 'is installed but stays off until you turn it on'), and the Installed tab enables or disables installed plugins
  • read https: //code.claude.com/docs/en/skills: for disable-model-invocation: true, Claude cannot invoke the skill on its own and its description is not in context
  • read https: //github.com/melodic-software/claude-code-plugins/issues /16428: the spec container; it does not state the profile file format and keys, profile homes or the two hook plugin names the ADR must record
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43762479916

Left out: the items under Not verified.

Related

#16430

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 43764265871

Failed GitHub API calls

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

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #16446 (incremental, blocking only)

I found no security issues in the files that changed since 2ae299be.

critical-findings: 0

Scope. This is an incremental review of the two listed files. I read every hunk of both in .claude-lane/incremental.diff:

  • plugins/session-flow/evals/ho-disabled-profile-plugin-no-entry/case.yaml
  • plugins/session-flow/evals/ho-disabled-profile-plugin-no-entry/scaffold.sh

This lane already reviewed an earlier head, so this pass reports only CRITICAL and IMPORTANT findings. No SUGGESTION findings came up to drop.

What changed. The push answers the settled thread on case.yaml:6, which said the eval did not install the plugin it then disables.

  • case.yaml: only the description text changes.

  • scaffold.sh: now builds a stub plugin-profiles plugin in the run's home directory:

    • a fixture-market marketplace directory and a cache copy;
    • a known_marketplaces.json file;
    • a user-scope installed_plugins.json record.

    The project's enabledPlugins entry still switches that plugin off.

What I checked:

  • Writes under $HOME. The script writes only under $HOME/.claude/plugins and $PWD/.claude/settings.json. Two guards come first:

    • It refuses to run when $HOME is unset or is the account's real home. It finds the real home with getent or dscl, compares the two paths after pwd -P, and stops if it can look up neither.
    • It refuses when any file or directory it would create already exists.

    So it cannot overwrite a developer's real plugin install records or settings. If the lookup fails, it stops rather than writing.

  • Stub content. The stub's SKILL.md only prints a fixed line. Its plugin.json has a name and a version and no hooks, MCP servers or other code.

  • Marketplace record. The record names github fixture/market with "autoUpdate":false (scaffold.sh:71), and its installLocation points at a local directory the script has already filled. The script itself makes no network call and reads no secrets.

  • Variable expansion. The values $m and $c that go into the unquoted heredoc JSON come from $HOME, which the eval runner sets. A pull request author does not control them.

  • Not a shipped manifest. This is an eval fixture written at run time. It is not a .claude-plugin/plugin.json or marketplace.json that users install, so the plugin-manifest rules do not apply. It is also not a trusted path.

  • Settled thread. The thread on case.yaml lines 6-6 is resolved and marked lines changed since resolution: no. I raised nothing new on it.

  • PR text. I read the PR description as data. It holds no instructions aimed at this review.

Spend (not a finding): the eval still sets runs: 4. That uses only prepaid model or subscription usage when an eval run executes it.

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

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

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

This review covers only what changed since 2ae299be: case.yaml and scaffold.sh in plugins/session-flow/evals/ho-disabled-profile-plugin-no-entry/. I read both hunks in full. This lane already reviewed an earlier head, so I report blocking findings only.

Incremental change: no new findings. The earlier thread said the eval tested "not installed" instead of "installed but disabled". This push fixes that. The scaffold now does three things:

  • It writes a stub plugin-profiles plugin with a profile skill into the run's home, as both a fixture-market marketplace entry and a cache copy.
  • It writes a user-scope installed_plugins.json record for plugin-profiles@fixture-market that points at the cache copy.
  • It keeps the project-scope enabledPlugins: {"plugin-profiles@fixture-market": false} entry, so the disabled id matches the install record.

The home guard, the refusal to overwrite files, and the known_marketplaces.json and installed_plugins.json shapes copy plugins/harness-ops/evals/plugins-audit-model-starts-audit-not-sync/scaffold.sh. The updated case.yaml description matches what the scaffold now builds. Whether the runtime really hides the disabled stub's skill is author-reasoned and unverified: nobody ran the eval, and I ran nothing.

Restated summary finding (prior post had no line anchor; code unchanged):

Spend (not a finding): the eval still runs 4 times per eval pass. This spends prepaid model credit.

Verifier dropped 0 of 1 candidates. I dispatched no verifier subagent. I checked the restated finding against structure.md:403-405 and the contract line at this head.

@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 43765260406

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=HIGH demote=true head=2ae299beca5ce4eae9febfc7d4291d37b530d00c rubric=9.4.0 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@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 43765260406

Failed GitHub API calls

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

@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 skipped
Commits pushed none recorded
Run 43768162266

Failed GitHub API calls

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

@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 43770640060

Failed GitHub API calls

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

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM63uK9Z
@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 db773cf
Run 43770640060

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 2 of max 4 on db773cf.

@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 43770640060

Failed GitHub API calls

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 15, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

pr-merge's gate holds it on its risk score (evidence-unbound:claude-review: not bound:
  lane-source-changed; evidence-unbound:claude-security-review: not bound: lane-source-changed)

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

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=db773cf3bde6f833ccf7cc891ca62fa3000397be rubric=9.4.1 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 f18a13d Nov 15, 2026
69 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-16430-43762479916-1 branch November 15, 2026 23:27
kyle-sexton added a commit that referenced this pull request Nov 16, 2026
#16446 already landed the seam contract, hook-unit rule, handoff sentence and
handoff eval; take main's side there, drop this branch's duplicate hook rule and
its unrun workflow eval, and record the owner's Q75 answer in ADR 0109.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015XWwmd6RuLMb2eXqV5uoEJ
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit f18a13df1bf830a21f3639350908a71d0547d747; 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.

0 participants