Skip to content

feat(planning): offer maintained optional planning plugins, install on yes - #12785

Merged
kyle-sexton merged 5 commits into
mainfrom
feat/12660-plugin-offers
Nov 3, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
feat/12660-plugin-offers

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Closes #12660

Summary

Slice 6 of epic #12646. /planning:interview can now offer a maintained optional planning plugin and install it on a yes. With surface unset, the one surface line from #12658 also names an installed optional planner (html-plan, never required) and offers one that is not installed.

Fix

  • plugins/planning/offers/offerable.json lists the plugins the interview may offer. offers/offer-source.mjs is the one module that looks them up: the marketplace catalog must still list the name (a renamed or removed plugin gets no offer), and the newest commit on the plugin's source path sets the offer: under 3 months a plain offer, 3 to 6 months an offer with the date, older none. Each lookup is cached 24 hours in plugin data, a failed one too, and any failure means no offer. Installed plugins come from claude plugin list --json; without it there is nothing to install with, so no offer.
  • surfaces/registry.mjs resolve takes --data-dir and --unattended, looks offers up only when the default surface's line will print, and adds planners and offers to its JSON. An unattended run looks nothing up. On a yes the skill runs the offer's claude plugin install <name> --marketplace <repo> --scope user and points to /reload-plugins.
  • Carried from feat(planning): interview surface registry with the one-line default-and-alternatives offer #12658: the page lane's clauses in the digest-pinned gate sections of SKILL.md (the Brief cross-check's --surface flag and its Gates twin, where the confirmation gate is shown, the facts-field citation, the full recap, the procedure-check exception's tick rows, the terminal-lane wording, the share row's "a page") and the "Page surface exit codes" section move to context/lane-page.md. The Step 3 exception now applies only on a lane whose spoke says its restatement box offers commitment ticks; any other defect still halts.
  • New eval case interview-unattended-no-plugin-offer; changelog fragment for planning.

Acceptance criteria

From the plan Brief (planning-chain-consolidation, Phase 6):

  • AC10: tests with commit ages 30, 120 and 200 days give plain, dated and no offer; renamed, unlisted, lookup failure and unattended give no offer; the install command carries user scope.
  • AC13 (planner part): an installed html-plan is named as an alternative and never required.

Verification

  • plugins/planning/tests/offer-source.test.sh: 15 tests pass, against recorded catalog and commit responses (no network). Sabotage checks: a 4-month threshold, a dropped unattended check and --scope project each turned a test red.
  • plugins/planning/tests/surface-registry.test.sh: 16 tests pass, including the planner-in-line, offer-in-line and the new "gate sections name no surface value" test, which fails on the base SKILL.md.
  • interview-defenses.test.sh: PASS=181. Re-pinned Gates, Action Router, Steps 2-4, plus a new digest over lane-page.md's steps section (appending ", or on any lane" to the exception turned it red). The lock row, STOP-on-gap, no-silent-resolve, fudge-prohibition, confirmation-gate and auto-guard lines are byte-identical to the branch point. validate-cases.py on plugins/planning/evals: no FAIL; no model evals run.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt

session: html-plan

kyle-sexton and others added 2 commits November 3, 2026 02:47
…n yes

The interview's one surface line now names an installed optional planner
(html-plan, never required) and offers an optional plugin that is not
installed, when its marketplace still lists it under that name and the
newest commit on its source path is under 6 months old (the date shown
past 3). offers/offerable.json lists the plugins; offers/offer-source.mjs
does the lookups, cached 24 hours in plugin data (failures too). Any
failure, and an unattended run, means no offer. On a yes the skill runs
the offer's install command at user scope and points to /reload-plugins.

The page lane's clauses in SKILL.md's gate sections and the exit codes
section move to context/lane-page.md, so those sections name no surface
value.

Re-pinned digests (interview-defenses.test.sh):
- Gates: 51a7dec11947 -> d963f5607040
- lane-page.md steps section (new): ae49eb827fea
- Step 2: 84dd7366b274 -> abd084e635fc
- Step 3: b078b836bde8 -> 077bbe3eb7c4
- Step 4: d81a5c609d8d -> daef77ba68a3
- Action Router: 298e9864e4f8 -> 8e376330c3c7
Why the defenses hold: the moved clauses are page-only wording; the
procedure-check exception now applies only on a lane whose spoke says its
restatement box offers commitment ticks, any other defect still halts,
and the register gate still holds those rows. The lock row, STOP-on-gap,
no-silent-resolve, fudge-prohibition, confirmation-gate and auto-guard
lines are byte-identical to the branch point. The facts-field phrase pin
follows its sentence to lane-page.md, whose new steps section is digested
so an appended qualifier cannot widen the exception. The Gates twin says
to re-read the lane spoke after a compaction.

Closes #12660

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 3, 2026 08:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T08:21:28.285001Z 734e3c3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 734e3c3164

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

kyle-sexton and others added 3 commits November 3, 2026 03:39
offers/offer-source.mjs runs `claude plugin list --json` to find
installed plugins, and an offer's install command needs
`claude plugin install --marketplace` (2.1.292+). Declare claude as an
optional prerequisite of the interview skill so check-catalog's
declared-prerequisites check passes.

Refs #12660

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt
The page clauses this PR moved out of SKILL.md's gate sections also
live in context/surface.md, which the page lane reads beside
lane-page.md. Pin those twins (the confirm-understanding wait, the full
recap, the tick exception that still halts every other defect, and the
--surface flag on the Brief cross-check) so an edit to surface.md cannot
drop a gate the hub no longer states.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #12785 (feat(planning): offer maintained optional planning plugins, install on yes)

No security issues found. I read the whole diff, all 18 files. None of them is on a trusted path. None is a plugin manifest: plugins/planning/prerequisites.json is not plugin.json or marketplace.json, so no manifest <field> lines apply. The PR changes no trust control, kill switch, token scope or merge hold.

critical-findings: 0

What I checked

  • New outbound lookup (plugins/planning/offers/offer-source.mjs). githubJson sends a plain GET to https://api.github.com/ with no Authorization header (offer-source.mjs#L144-L155), so no token or secret can leak. A hostile catalog could set source.repo to another value, but that only changes which public api.github.com path gets a GET with no credentials.
  • What fetched data can affect. The install command and the offer text are built only from the static, in-repo offerable.json (offer-source.mjs#L139, #L230-L231). Fetched data controls only whether an offer appears and a 10-character date. That date must pass Date.parse and is cut with .slice(0, 10). No fetched text can inject a command or reach the line printed to the user.
  • Process and file handling.
    • installedPlugins runs execFileSync('claude', [...]) with a fixed argument list and no shell.
    • The cache file name comes from static offerable.json fields, so there is no path-traversal input.
    • A cache write that fails means no offer.
  • Install authority (SKILL.md "Question lanes"). The new instruction runs the fixed offers[].install command only on the user's yes.
    • A run the caller declares unattended passes --unattended, and findOffers then makes no lookup and no offer (offer-source.mjs#L246).
    • The new eval case grades that no install happens on an unattended run.
    • The installed target is a fixed name from a fixed marketplace (anthropics/claude-plugins-community), chosen under the owner's decision Q35. Nothing outside the repository can change which command runs.
  • Moved instruction text (SKILL.md → context/lane-page.md). Checked under the instruction-surface lens against the register's Gate 0 classes. docs/contracts/instruction-exception-register/README.md was present and read.
    • The confirmation-gate, recap, procedure-check exception and --surface clauses are page-lane only. They now live in lane-page.md, which the page lane must read, and in surface.md, which this PR leaves unchanged and now pins in interview-defenses.test.sh.
    • No halt is removed.
    • The owner already answered this point in a resolved thread on SKILL.md line 336 (lines changed since resolution: no), so I am not raising it again.

Spend (not a finding)

The new eval case interview-unattended-no-plugin-offer adds model eval runs (runs: 3, max_turns: 14) when evals are run. That uses prepaid API credit only.

Embedded text

There are no directives aimed at the review lane in the PR context or the settled-threads file.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 134468c5ae6f05e733c2bc0e39be347519685615: read 18 of 18 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #12785, offer optional planning plugins and install on a yes (#12660)

No blocking or advisory findings. I read every hunk of all 18 changed files in the full diff. None of them matches a trusted-path glob.

What I checked

  • offers/offer-source.mjs
    • The cache claims its slot before the lookup starts, so a slot that can't be written means no lookup.
    • Failed lookups are cached too, and the cache window is 24 hours.
    • The freshness cut-offs use calendar months. Checking by hand, ages of 30, 120 and 200 days from 2026-11-03 come out as plain, dated and stale.
    • A missing install list, an unattended run, or an unusable data directory (including the unsubstituted ${...} token) all mean no offer.
    • A renamed or unlisted plugin gets no offer.
    • Source paths are worked out for both ./path sources and github sources.
  • surfaces/registry.mjs
    • Parsing a bare --unattended uses i -= 1; continue, which correctly moves forward one argument.
    • With no planners and no offers, the line rule (parts.length > 1) gives the same result as the old alternatives.length > 0 rule.
    • resolveSurface now runs twice. start() only returns a handle, per the registry contract, so the second run is harmless.
    • The new static import doesn't break the AC15 or symlink tests, because those copy only entries/ or link the whole plugin.
  • SKILL.md and context/lane-page.md
    • Nothing else in the repo pointed at the removed "Page surface exit codes" section.
    • The new "gate sections name no surface value" test doesn't trip on the word "shared": the shared surface's id is shared-session, so \bshared-session\b can't match "shared understanding".
    • The four new surface.md pins point at text that already exists at L231, L234 and L293.
  • Eval case interview-unattended-no-plugin-offer
    • The grader regexes match their pass samples and reject their fail samples.
    • No transcript content, so .claude/rules/eval-case-transcripts.md is satisfied.
  • Closing issue feat(planning): offer maintained optional planning plugins, install on yes #12660
    • AC10: tests cover commit ages of 30, 120 and 200 days; renamed, unlisted, failed-lookup and unattended runs; and --scope user in the install command (plugins/planning/tests/offer-source.test.mjs).
    • AC13 (planner part): tests show an installed planner is named on the line, never replaces the surface, and is never looked up (surface-registry.test.mjs, offer-source.test.mjs).
    • Both criteria are met and have tests that would fail if they broke.
  • Settled thread: the thread on SKILL.md L336, about moving the page-lane gate clauses, is settled by an owner decision and marked lines changed since resolution: no. I did not re-raise it.
  • Prior findings: none; this is round 0 of 3.

Notes, not findings

  • An unattended run still starts claude plugin list --json, a local process with a 15 s timeout, before findOffers returns early. So an installed html-plan is still named as a planner on that run. It makes no network lookup and no offer, which matches the issue's "no offer in an unattended run".
  • prerequisites.json says the install command needs claude ≥ 2.1.292, but offer-source.mjs never checks the CLI version, so an older CLI can get an offer whose install then fails. The degrade text already documents this, so it reads as a deliberate choice.

Verification: I had no shell, so I ran no tests. The pass counts in the PR body (offer-source 15, surface-registry 16, interview-defenses 181/185) are the author's claims and unverified.

Spend: at most two unauthenticated GitHub API requests per offerable plugin per 24 hours, on interview runs where no surface is set. That costs nothing.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 3, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Unattended merge: risk MED at head 134468c5ae6f05e733c2bc0e39be347519685615. Only LOW, or MED on class, size and reported review-finding reasons alone, merges without a human. The lanes clear its holding reasons (a size reason holds nothing); pr-merge judges it again each run.

MED evidence-unbound:claude-review: not bound: rerun-not-allowed
MED evidence-unbound:claude-security-review: not bound: rerun-not-allowed

Merged via the queue into main with commit 61370d3 Nov 3, 2026
83 of 87 checks passed
@kyle-sexton
kyle-sexton deleted the feat/12660-plugin-offers branch November 3, 2026 14:56
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): offer maintained optional planning plugins, install on yes

1 participant