Repository navigation
Fix Codex project skill discovery - #1154
Conversation
|
🚨 SLOP COP 🚨 · I am the SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and practical behavior. |
SawyerHood
left a comment
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
ELI5: This PR teaches BB to find Codex team skills from the repository root down to the current folder. It also updates the daemon protocol.
Result: I found one high-impact correctness and safety issue.
Different .agents/skills roots can contain the same skill path. The daemon gives those skills the same opaque ID.
BB lists both records. However, view, edit, and delete operations select the first record with that ID.
A user can select a nested skill and act on the repository-root skill instead. I left an inline comment with the exact cause and fix.
The command menu also removes same-named project skills. The root skill wins because this PR orders roots from the repository root to the current folder.
Codex can show both same-named skills. BB should preserve both, or it should clearly choose and show the closest skill.
The change correctly shares one root resolver between command and skill discovery. That avoids duplicate scan logic.
However, each root needs typed identity metadata. list-skills.ts should not infer identity only from path basenames and one shared root kind.
I also found two compatibility gaps. BB ignores custom project_root_markers, and BB skips repository skill symlinks that Codex supports.
I did not find a separate credential or code-execution vulnerability. I also found no measured blocking performance regression.
Validation completed:
- Three BB child threads reviewed security, code quality, architecture, and performance.
- The exact PR commit passed both package type checks.
- The host daemon passed 490 tests.
- The host daemon contract passed 49 tests.
- A local dev server and browser API check reproduced two distinct skills with one identical ID.
- Current official Codex documentation confirmed the repository-root-to-current-folder scan and duplicate-name behavior.
Closes get-bb#1105. ## Summary - Scan `.agents/skills` from the Git repository root through the current directory. - Keep the legacy `.codex/skills` path. - Classify canonical roots as Codex project skills. - Increase the host daemon protocol version to 79. ## Tests - `pnpm exec turbo run test --filter=@bb/host-daemon -- --run src/command-discovery.test.ts src/command-handlers/list-skills.test.ts` - `pnpm exec turbo run test --filter=@bb/host-daemon-contract -- --run test/contract.test.ts` - `pnpm exec turbo run typecheck --filter=@bb/host-daemon --filter=@bb/host-daemon-contract` - Prettier check - `git diff --check`
Closes #1105.
Summary
.agents/skillsfrom the Git repository root through the current directory..codex/skillspath.Tests
pnpm exec turbo run test --filter=@bb/host-daemon -- --run src/command-discovery.test.ts src/command-handlers/list-skills.test.tspnpm exec turbo run test --filter=@bb/host-daemon-contract -- --run test/contract.test.tspnpm exec turbo run typecheck --filter=@bb/host-daemon --filter=@bb/host-daemon-contractgit diff --check