Skip to content

feat(planning): interview surface registry with the one-line default-and-alternatives offer - #12712

Merged
kyle-sexton merged 7 commits into
mainfrom
feat/12658-surface-registry
Nov 3, 2026
Merged

kyle-sexton merged 7 commits into
mainfrom
feat/12658-surface-registry

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #12658

Summary

Slice 5 of epic #12646: /planning:interview now picks its question surface through a surface registry instead of its own lane table. With surface unset and another surface available, it prints one line naming the default and the alternatives, then goes on with round 1.

Fix

  • plugins/planning/surfaces/registry.mjs: loadEntries reads one SurfaceEntry per file under surfaces/entries/ (terminal, page, shared-session); resolveSurface picks one in this order: a surface the user asks for in the session (--argument, matched on id, report name or alias), planning's surface userConfig, a surface key in the repository's .claude/interview-surface.json, then the plugin.json default. A literal ${user_config.surface} token, an empty value or an unknown value counts as unset (an unknown one is named in a notice). No rendered-view medium is read, so setting medium never moves the surface. CLI: node registry.mjs resolve --surface <value> [--argument <word>] prints one JSON line.
  • available(context) only checks PATH (no network, no process start). A configured surface whose tools are missing stays chosen with available.ok: false, so its spoke's existing degrade runs (eval 45 behavior kept).
  • start(session) returns a handle (spokes to read, rules); the spoke's own command starts any process. The shared session's handle sets needsYes unless the user asked for it, so a stored setting never opens a public link on its own; shared-session stays out of plugin.json's surface options.
  • SKILL.md "Question lanes" calls the resolver, prints its offer line once as the first line of the round-1 message, and names no surface value; the share action passes share. lane-page.md and lane-shared.md point at the resolution.
  • interview_server.py skips the repo file's surface key without a stderr note; the file is not moved onto ADR 0075 (separate issue, D5).
  • New eval case interview-surface-unset-offer-one-line; changelog fragment for planning.

Security: no new path off the machine. A tracked repo file can now select the surface (before, only userConfig could); the page stays on 127.0.0.1 and the shared session still needs share or the owner's yes.

Verification

  • plugins/planning/tests/surface-registry.test.sh (11 tests, pass): AC5 sets medium in every scope (userConfig, ~/.claude/rendered-views.md, .claude/rendered-views.md, .claude/rendered-views.local.md, docs/conventions/rendered-views{,.local}.yaml, .claude/interview-surface.json) and asserts the resolution equals the empty-fixture one; AC13 asserts exactly one offer line with surface unset and two surfaces available (in-process and through the CLI), with paired no-offer cases; AC15 adds a fixture entry file and the resolver offers and selects it with no skill edit.
  • Sabotage checks: making the resolver honor medium turned AC5 red; splitting the offer over two lines turned both AC13 tests red.
  • interview-defenses.test.sh: PASS=178 after re-pinning the Action Router and Stance digests (justification in the commit message and the test file).
  • test_interview_server.py settings resolver tests pass; scripts/run-ruff.sh check clean on the changed Python.
  • validate-cases.py on plugins/planning/evals: no FAIL for the new case. It lists Bash, which a PR eval run does not grant, so it grades only on a run with --allow-tools Bash.

Related

  • Epic: Epic: consolidate the planning chain #12646. Plan Phase 5 (planning-chain-consolidation).
  • Not done here: surface values still named in digested SKILL.md gate sections (Gates --surface, Step 2-4 page clauses, the "Page surface exit codes" heading); moving them means editing pinned defense sections and is left for a follow-up.

session: html-plan

🤖 Generated with Claude Code

https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt

kyle-sexton and others added 5 commits November 2, 2026 23:22
…and-alternatives offer

Adds plugins/planning/surfaces/registry.mjs and one SurfaceEntry file per
surface (terminal, page, shared session). resolveSurface reads a surface the
user asks for, then planning's surface userConfig, then a surface key in the
repository's .claude/interview-surface.json, then the plugin.json default; it
reads no rendered-view medium. With surface unset and another surface
available it returns one offer line, which the interview prints and then
proceeds. The interview skill drops its lane table and calls the resolver.

Re-pinned interview-defenses digests (repin.sh):
- SKILL.md Action Router section: 9081800701e5a506a131c1929285a2a767c8d2e8f59cc89b213e922d4ec73521
  -> 298e9864e4f8df46d8b3deea403af71eb5724c815a325d623ee663d6a9da6b66
- SKILL.md Stance section: 6e225b3afedb890bb993196b17b90536c81ea5d1ee1f6f259ab69c0a2de2a8c7
  -> 6abc026c684d4b26f2c5817504e1ce9c4cae4c4c500cd6c8a297abb755442a52
Why the defenses hold: the lane table gives way to the registry call, its
offer line opens the round-1 message, the share row passes share as its argument, and the Stance surface sentence names
the resolution; each changes how the surface is picked and resolves no row.
The lock row, STOP-on-gap and no-silent-resolve lines are byte-identical.

Closes #12658

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt
The registry replaced SKILL.md's lane table, so the page lane's mirror rule
lives in context/lane-page.md (and the page entry's handle rules); the pin
follows it there.

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 05:50
@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-03T05:52:22.323866Z 617aae3 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.

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

claude-lane: claude-review

Comment thread plugins/planning/surfaces/registry.mjs Resolved
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: incremental (03bb2a3 → 81a41dc)

I found nothing to flag in this push. I read every hunk of all 6 files in the incremental scope:

  • .changes/planning/feat-12658-surface-registry-5a3c91e7.md
  • plugins/planning/.claude-plugin/plugin.json
  • plugins/planning/README.md
  • plugins/planning/skills/interview/context/lane-page.md
  • plugins/planning/surfaces/registry.mjs
  • plugins/planning/tests/surface-registry.test.mjs

I also read the PR context, the settled threads and the prior findings. One round has had findings so far; the cap is 3 and this review is not past it.

What changed: the registry no longer reads the surface key from .claude/interview-surface.json. It drops the repo source, projectRoot()/repoSurface(), REPO_FILE and the --project-root CLI option. The resolution order is now argument, then the surface userConfig, then the plugin default. The changelog fragment, the userConfig.surface description, the README options row and lane-page.md all now say the same thing.

Checks:

  • Against feat(planning): interview surface registry with the one-line default-and-alternatives offer #12658 decision D5 ("resolveSurface reads today's sources unchanged"): before this PR only userConfig could pick the surface, so removing the repository-file source matches D5. interview_server.py is no longer in the PR's file list, and the changelog drops its server line to match.
  • Leftover callers: none. SKILL.md "Question lanes" (SKILL.md#L89) calls the resolver with --surface and --argument only, so dropping --project-root breaks no caller. A grep of plugins/planning finds no other user of projectRoot, REPO_FILE or the repo decidedBy.
  • Tests: the reworked order test (surface-registry.test.mjs#L91-L101) writes {surface: 'page'} to the repository file and asserts the result is terminal decided by default. If the repository source came back, this test would fail.
  • Manifest: manifest userConfig.surface.description: pass. It no longer names a source the code stopped reading. The default, the options and the fragment's bump: minor are unchanged.
  • Closing issue feat(planning): interview surface registry with the one-line default-and-alternatives offer #12658: AC5, AC13 (surface part) and AC15 still have tests that would catch a regression. This push only removes a source, and the CLI AC13 test still runs without --project-root.

Note, not counted as a finding: the PR description is now out of date. Its Fix and Security sections still say a tracked repository file can select the surface, and that interview_server.py skips the file's surface key. Neither is true at this head. Updating the description would keep the security note accurate.

Not verified by me: this lane has no shell, so I ran no tests.

No embedded instructions were found in the PR context, settled-threads or prior-findings files. I left security out of scope because this repository runs a separate security lane.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #12712, incremental (03bb2a3 → 81a41dc)

No security issues found. I read every hunk of all 6 files in scope: the changelog fragment, plugins/planning/.claude-plugin/plugin.json, plugins/planning/README.md, plugins/planning/skills/interview/context/lane-page.md, plugins/planning/surfaces/registry.mjs and plugins/planning/tests/surface-registry.test.mjs. None of them matches a TRUSTED PATHS: glob. This push touches no trust control: no trusted-actor list, token request, kill switch, merge hold or workflow.

critical-findings: 0

What I checked

  • Repository file can no longer pick the surface (registry.mjs). This push removes projectRoot(), repoSurface(), REPO_FILE, the repo source in resolveSurface and the --project-root CLI option. Before this push, a tracked .claude/interview-surface.json in the checked-out repository could pick the surface. The PR description named that as the one new input. Now only a surface the user asks for in the session, the plugin's surface userConfig, or the plugin default picks it. Repository content now reaches less of the resolver, so this narrows the surface rather than widening it. The CLI still rejects unknown options (registry.mjs L120-121). No file-system read of the project tree is left in the resolver.
  • Docs (lane-page.md, README.md, changelog). These only drop the wording about the repository file so it matches the code. No guardrail is deleted or softened: the page stays on 127.0.0.1, and the text that keeps the shared session behind share or the owner's yes is unchanged.
  • Test (surface-registry.test.mjs). The order test now writes a repository file that sets surface: page and asserts the result is still terminal / default. That locks in the narrowing. The change is test-only.

Plugin manifest

  • manifest userConfig.surface.description: pass. Only the key's description text changed, which is in the inert set. Its default ("terminal") and options are unchanged in this hunk.

Prior findings and settled threads

  • The lane's earlier summary-only post on this PR reported no findings, so there is nothing to restate.
  • The one settled thread (the symlink entry-guard fix at registry.mjs) is a correctness point and none of its lines changed in this push. I am not raising it again.

Spend: none beyond this review run.

…n path

Node resolves symlinks for the main module, so import.meta.url is the
real path while process.argv[1] keeps the symlink. The entry guard
compared the two, so a plugin root reached through a symlink made
`registry.mjs resolve` print nothing and exit 0. Compare real paths on
both sides, as the repository's other Node CLIs do, and add a test that
runs the CLI through a symlink.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VcupojdnckzkRQMdQRVNbt
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 03bb2a348bc688d3649a086cc946728acbcb5a17. What it wrote, as data:

What it wrote (33 lines)
Summary: Issue #12658 asks for a surface registry for the interview. The registry, the one-line
  offer and the tests for AC5, AC13 and AC15 are delivered, and every test-bash, test-node and
  test-python job passed on the judged head (run 41587614885). The PR still fails because it breaks
  decision D5, which says resolveSurface reads today's sources unchanged and leaves the interview
  server's settings file for a follow-up issue. resolveSurface now also reads a `surface` key from
  the repository's tracked `.claude/interview-surface.json`, and interview_server.py was changed to
  skip that key. The PR body itself says that before this change only userConfig could select the
  surface. So a cloned repo's tracked file can now choose the surface, for example starting a local
  page that opens a browser. Nobody asked for that new trust.
- plugins/planning/surfaces/registry.mjs:231: `repoSurface` adds a new surface source, the `surface`
  key in the repository's tracked `.claude/interview-surface.json`. Decision D5 says resolveSurface
  reads today's sources unchanged and leaves that settings file for a separate issue. Fix: remove
  the `['repo', ...]` entry from `sources` and drop `repoSurface`/`projectRoot`, so the order is
  argument, then userConfig, then the plugin.json default.
- plugins/planning/surface/interview_server.py:160: `REGISTRY_KEYS = {"surface"}` changes how the
  server's repo settings layer treats the file D5 defers. Revert this, along with the matching test
  `test_repo_surface_key_is_left_to_the_registry_without_a_note` in
  plugins/planning/surface/test_interview_server.py.
- plugins/planning/.claude-plugin/plugin.json:8: the `surface` description now says that when unset
  the value comes from the repository's .claude/interview-surface.json. Update it, the README.md
  options row, plugins/planning/surface/README.md 'Settings layers', the lane-page.md opening line
  and the changelog fragment .changes/planning/feat-12658-surface-registry-5a3c91e7.md once the repo
  source is removed.
- plugins/planning/tests/surface-registry.test.mjs:235: the 'order' test asserts `decidedBy:
  'repo'`. Rewrite it to cover only argument, then userConfig, then the default. Keep AC5 writing
  `medium` into the repo file, since that file stays a place where a medium value could appear.
- plugins/planning/skills/interview/SKILL.md: the PR body says the digested gate sections still name
  surface values (Gates `--surface`, the Step 2-4 page clauses, 'Page surface exit codes'). The
  contract says skills never name a surface value, so this leftover needs a follow-up issue. AC15
  itself is met.
- plugins/planning/tests/interview-defenses.test.sh:87: the Stance and Action Router digests were
  re-pinned, each with a justification comment. A person should confirm that the lock row,
  STOP-on-gap and no-silent-resolve text really are byte-identical.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass at a new commit removes the label.

@github-actions github-actions Bot added the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 3, 2026
Decision D5 of #12658 says resolveSurface reads today's sources
unchanged and leaves the interview server's settings file for a
separate issue. Drop the repository .claude/interview-surface.json
`surface` source and the --project-root option from the registry, and
revert the server's REGISTRY_KEYS skip with its test. Resolution is now
the session argument, then planning's `surface` userConfig, then the
plugin default. The order test now asserts a repository file never
picks the surface; the manifest description, README options row,
lane-page.md and the changelog fragment drop the repo source.

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

Copy link
Copy Markdown
Member Author

Reply to the pr-verify note on 03bb2a3. Fixed in 81a41dc.

# Finding Classification Disposition
1 registry.mjs adds the repo .claude/interview-surface.json surface source, against D5 VALID (fix now) Removed repoSurface, projectRoot, REPO_FILE and --project-root. Resolution: session argument, then planning's surface userConfig, then the plugin default
2 interview_server.py REGISTRY_KEYS and its test VALID (fix now) interview_server.py, test_interview_server.py and surface/README.md restored to origin/main
3 plugin.json description, README options row, surface/README.md, lane-page.md, changelog fragment VALID (fix now) Repo source dropped from each
4 The order test asserts decidedBy: 'repo' VALID (fix now) Now order: argument, then userConfig, then the default; a repository file never picks the surface: a repo file with surface: page resolves to terminal / default. AC5 still writes medium into the repo file
5 Surface values still named in the pinned SKILL.md gate sections VALID (follow-up) Carried into slice S6, #12660, which edits the same file next; the plan serializes S5, S6 and S7 on interview SKILL.md
6 A person should confirm the re-pinned digests left the lock row, STOP-on-gap and no-silent-resolve text byte-identical VALID (proved below) No hand check needed

Byte-identity proof (finding 6). The script takes each pinned passage's line from origin/main and from the PR head, then cmps them, and lists every line SKILL.md changes:

pick() { git show "$1:plugins/planning/skills/interview/SKILL.md" | grep -F -- "$2"; }
for p in <each passage below>; do cmp <(pick origin/main "$p") <(pick HEAD "$p"); done
git diff --unified=0 origin/main HEAD -- plugins/planning/skills/interview/SKILL.md | grep -E '^[-+][^-+]'

Output:

identical (574f94bb98d2): | `lock` | **Force synthesis, one problem question**
identical (99bccccb55fe): - **A gap during `lock` synthesis halts the run.**
identical (f2c615d694a4): For `lock`: skip Step 1.5 AND Step 2, synthesize directly. I
identical (3f9cf0f51f3c): - **Does not fudge gaps in `lock` mode**
identical (d02e6167ff73): **Confirmation gate (`me` and `auto`):**
identical (1ed1c4b81418): NEVER silently resolve an unanswered question to its recomme
identical (b07c8aad67f2): **Auto-guard. Never decide an interactive choice for the use
--- every line SKILL.md changes against origin/main:
-| `share [<topic>]` | **Shared session** | "Run this interview as a shared session", "let
+| `share [<topic>]` | **Shared session** | "Run this interview as a shared session", "let
-**Question lanes.** Pick the lane from this table and read only its spoke. All three carr
-| Lane | When | Read |
-|---|---|---|
-| terminal | `surface` is `terminal`, unset or unknown, and no other lane was asked for |
-| page | `surface` is `page`, or the user asks for the page (offer it on a dense terminal
-| shared | `share [<topic>]`, or several people should answer one interview together | [`
+**Question lanes.** The surface registry picks the lane; this skill names none. Before th
-Tone is collaborative but opinionated. You are not interrogating; you are helping the use
+Tone is collaborative but opinionated. You are not interrogating; you are helping the use

The only changed lines are the share row in the Action Router, the "Question lanes" paragraph and its removed lane table, and the last sentence of the Stance "Tone" paragraph. The lock row, the three STOP-on-gap lines and both no-silent-resolve lines (the auto-guard and the partial-round rule) are byte-identical. interview-defenses.test.sh also passes, PASS=178 FAIL=0, including "router lock row is byte-identical to the pinned defense" and "the auto-guard paragraph is byte-identical to the pinned defense".

Tests on 81a41dc: surface-registry.test.sh 12/12, with AC5, AC13 (in-process and CLI) and AC15. interview-defenses.test.sh PASS=178. interview-surface-decision-mirror.test.sh ok. test_interview_server.py OK (1 skipped).

@github-actions github-actions Bot removed the pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. label Nov 3, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 30628f2 Nov 3, 2026
77 of 78 checks passed
@kyle-sexton
kyle-sexton deleted the feat/12658-surface-registry branch November 3, 2026 07:28
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): interview surface registry with the one-line default-and-alternatives offer

1 participant