Repository navigation
Unify skill discovery and dedupe; pass picked skills to Codex - #6185
Merged
Merged
Conversation
Drop the SDK ESM load test: it needs dist output that the test task does not build, and runtime-entries.test.mjs already guards the require shim. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A picked skill missing from Codex's skills/list no longer fails the turn; the prompt text still carries the mention, as before structured inputs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Recursive skill roots charged every supporting file against one 1,000-entry budget shared by all roots, so a normal Pi library hid most skills and every later root. Each root now gets its own cap, and recursive skill roots count only folders. Fixes #6173 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/swing-7a-one-skills-index-thr_rbpr4bpfnt
branch
from
October 23, 2026 22:49
e6cf3f6 to
70fa7fc
Compare
Merged
ymichael
added a commit
that referenced
this pull request
Oct 24, 2026
## Human comments ## What was wrong `main` has 14 commits since 0.47.0, including #6195, which fixes the timeline staying detached at the bottom (a regression from #5951 that shipped in 0.47.0). `bb-app` and `@bb/desktop` were still at 0.47.0, so the publish and desktop workflows can't ship them. ## What changed - `packages/bb-app/package.json`, `apps/desktop/package.json`: 0.47.0 → 0.47.1 (`node scripts/bump-version.mjs --patch`). - No `CHANGELOG.md` or `RELEASE_META` entry: like earlier fix-only patches, these changes go into the 0.48.0 notes. The release commit sits directly on `b17bfc8fdd` (#6217). Everything below was tested on `22d41249ee`, and the sidebar was tested again on `b17bfc8fdd`. This release includes the daemon protocol bump from #6185 (251 → 252), so enrolled machines will update their daemon. ## How you verified - `node .github/workflows/check-version-lockstep.mjs`: `bb-app=0.47.1 @bb/desktop=0.47.1`. - Typecheck, tests and the `bb-app` tarball smoke run in CI on this PR, instead of locally. - `git diff --check`, and `oxfmt --check` on the changed files: clean. - Manual QA of `22d41249ee` with `pnpm start:worktree` (production bundle) and headless Chrome, on a fresh data dir: - **Timeline (#6195):** a long unread reply stops at NEW, detached. A short unread reply opens at the end with no jump arrow. Scrolling up 150 px and growing the viewport 900 → 1200 attaches. Scrolling up 400 px and growing it stays detached. Sending after scrolling up 1,800 px jumps to the end and follows the streamed Claude Code reply. The view is still at the end after a reload. - **Docs (#6146):** typing in a note while `bb docs pull`/`push` appended a paragraph kept both edits on disk and in the editor. A stale push after a UI edit was refused as a conflict. A new note was renamed from its first line and kept its Markdown after a reload. - **Skills (#6185):** `bb project commands` lists project skills from the documented roots for Claude Code and Codex, with no duplicate names. A Codex `/skill` turn ran the skill. - **Storage & retention (#6190, #6205):** two outside worktrees were listed. Bulk removal removed the clean one, kept its branch, and kept the dirty one. The table fits a 390 px viewport. - **Sidebar multi-select (#6191, #6217), on `b17bfc8fdd`:** with the experiment on, Cmd+Shift-click selected a second thread without navigating ("Actions for 2 threads"). Pressing it again on the same thread deselected it. Shift-click selected a range of 4. Escape cleared the selection. Cmd-click cleared the selection and opened a split. Bulk Pin applied to the two selected threads (checked with `bb thread list`). With the experiment off, Cmd-click opens a split. - **omp (#6186):** the picker labels GPT-5.6 Terra rows `openai` and `openai-codex`. Not exercised: the Ultrafast icon (#6198), because no Codex model on the test account offers Ultrafast. Also not exercised: the Android touch-drag attach, the desktop app, the SDK realtime reconnect (#6183) and retryable host RPCs (#6184). Those last two are covered by unit tests only. > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
ymichael
added a commit
that referenced
this pull request
Oct 29, 2026
## Human comments ## What was wrong Every turn start (and the project command list and plugin skill listing) calls `resolveSkillCatalog`, and `SkillTreeRegistry.readTree` streamed and SHA-256-hashed every file of every skill tree on every call, even when nothing had changed. The registry already recorded a per-file `statKey` (dev, inode, size, mtime, ctime) in each manifest for the tree-content endpoint, but never consulted it before rehashing. On a real `~/.bb` plus the repo's plugin skill roots, each resolve re-read 74 files (576 KB). Reproduction and root-cause report: https://get-bb.github.io/reports/issues/5963.html ## What changed This replaces the original commit on this branch, which targeted the old synchronous skill code and no longer applied after #6330, #6335 and #6185. - `apps/server/src/services/skills/injected-skills.ts`: `readTree` looks up the root's previous manifest and reuses a file's `sha256` when its `statKey` is unchanged, instead of reading it again. Mode, size and path still come from the fresh `lstat`/`stat`, and symlink and non-regular-file rejection are unchanged. - Racy timestamps: on filesystems with coarse timestamps (the Linux CI runner), a same-size rewrite can land in the same ctime tick as the version already hashed and produce an identical `statKey`. Following Git's racy-clean rule, a hash is reusable only if the file's ctime is at least 2 s older than the moment hashing started (`HASH_REUSE_SETTLE_NS`). Recently changed files are rehashed until they settle. - `hashReusable` is a server-only field on `SkillTreeFile`; the `/skills/tree/:hash` route projects fields explicitly, so the wire format is unchanged. There are no protocol, public API, schema, CLI or config changes. ## How you verified - New `apps/server/test/skills/skill-catalog-cache.test.ts` (8 tests): - Settled unchanged files are not reread on the second resolve (`createReadStream` not called). This fails on `origin/main` (2 reads). - Unchanged files changed too recently to trust are reread. This fails on the previous commit, which had no settle window and failed CI on Linux. - Content (size change with restored mtime), replacement (new inode), rename, mode, addition and removal changes to settled files each produce the same tree hash as a fresh registry. - Real-data repro (`resolveSkillCatalogEntries` over `~/.bb` plus repo plugin skill roots, one shared registry): before, 74 reads / 576,146 bytes per resolve, ~12 ms warm median; after, 0 reads / 0 bytes on repeat resolves, ~7 ms, with an identical catalog. - End to end on `pnpm start:worktree`: a Claude Code thread read a `qa-canary` user skill's reference file (`ALPHA`). The file was then rewritten at the same size with its mtime restored (`BRAVO`), and the next turn read `BRAVO`. This still held after a server restart on the final commit. - `pnpm exec turbo run test --filter=@bb/server -- test/skills test/internal test/threads/thread-runtime-config.test.ts`: 296 tests pass in 26 files. - `pnpm exec turbo run typecheck lint --filter=@bb/server`: passes. `oxfmt --check`: passes. Fixes #5963 > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- slopcop:rule=new-issue-autopilot run=run_ju693husmvhjw9nc sha=issue-5963 kind=summary --> --------- Co-authored-by: Michael Yong <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Skill discovery was implemented four times (daemon command discovery, daemon skill listing, workspace context reads, server catalogs/staging), each with its own symlink, traversal and frontmatter rules. Listings had no cross-root identity, so the same skill showed 2–3 times (#3774), and Claude received injected copies of skills it already loads natively (#4164). Symlinked skill folders and
SKILL.mdfiles were skipped or rejected (#3238, #2602). Codex received a picked/skillas plain text, never as a structured skill input (#5201).What changed
@bb/skill-indexpackage: one scanner for every skill and command root. Real paths are resolved; links are followed for user roots and bounded to the workspace for project roots. Cycles stop. Each recursive skill root reads at most 1,000 folders and each command root at most 1,000 entries; files inside skill folders never count, so one large root no longer hides later ones (Pi skill listing drops most user skills: the recursive scan shares one 1,000-entry budget across all roots #6173). Frontmatter parsing lives in the core-only@bb/skill-index/metadatasubpath.SKILL.mdentries now work; supporting files inside an injected tree must still be ordinary files.SKILL.mdbytes, preferring the widest scope as Same skill listed 2-3x when registered under both a shared root and a provider's native root #3774 asks. Hidden registration IDs still resolve for read/write/delete. Runtime staging collapses same-name identical trees.skillinput with the path from Codex'sskills/list, for turn start and steer. Matching is by catalog name, then by skill folder name. A selected skill missing from Codex's catalog is sent as plain text only, as before.provider-bridge, 0.6.77):experimental_scanSkillFiles,experimental_selectedSkillMentions,ExperimentalSkillScanRoot,ExperimentalIndexedSkillFile. Entry indocs/api_to_audit.md; Plugin Guide surface and authoring skill updated.DiscoveredSkillgainsrealPathandcontentSha256.HOST_DAEMON_PROTOCOL_VERSION251 → 252, and the compatible list drops 250.docs/configuration.mdand the bb guide's agent-configuration chapter.setImmediateflush now wait for the outcome. Skill-root reads are async, so dispatch settles one I/O turn later.How you verified
.cursor/skills → .agents/skillsroot, or a Claude-plugin skill folder that was also listed unprefixed, now appears once instead of twice.pnpm exec turbo run lint typecheck build --filter='...[origin/main]': 213/213 tasks pass.turbo run teston skill-index, host-daemon, server, host-daemon-contract, plugin-sdk, templates, provider-claude-code, provider-codex, provider-pi, bb-guide and plugin-api-docs. Failures seen under machine load (5–15 s timeouts) pass when rerun alone.skills/listconfirmed it names skills by frontmattername, which is why the folder-name fallback exists.start:worktreeapp: a skill registered five ways (real file plus links from.bb/skills,.claude/skills,.claude/commandsand the data dir) lists once in the composer's/menu, and a same-content link under another name lists separately (project skills appear in the composer, not on the Skills page, which shows the personal scope). In a Codex thread, picking/swing-folder-name(frontmattername: swing-frontmatter-name) delivered the skill: the reply was the skill's token instead of a "Selected skill is unavailable" error.Fixes #3774
Fixes #4164
Fixes #3238
Fixes #2602
Fixes #5201
Fixes #6173
🤖 Generated with Claude Code