Skip to content

docs(spec): drive search workspace scope and --path-prefix [skip deploy] - #138

Merged
pocketsharkk merged 2 commits into
mainfrom
claude/product-goal-ready-spec-f4fb2a
Oct 7, 2026
Merged

pocketsharkk merged 2 commits into
mainfrom
claude/product-goal-ready-spec-f4fb2a

Conversation

@pocketsharkk

@pocketsharkk pocketsharkk commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

使用者遇到的問題

wspc backend 已經支援一次搜整個 Workspace 與 path_prefix,但 published @wspc/cli 0.14.0 的 wspc drive search 仍要求 <id>、沒有 --path-prefix,--cursor 的說明也過時。使用者要跨 library 或限定資料夾只能自己打 HTTP。

背景

問題出在哪裡

codegen 以 x-cli.command 當輸出檔名,兩個 op 都寫到 src/generated/cli/drive/search.ts,後者蓋掉前者,而 index.ts 仍 import 兩個名字。對 live spec 乾跑 sync-spec → generate → typecheck:

src/generated/cli/index.ts(39,10): error TS2305: Module '"./drive/search.js"' has no exported member 'driveSearchCommand'.

Release workflow 每次都先 sync-spec 再 generate 再 typecheck,所以在修好之前任何一次 release 都會中止。

修法

本 PR 只新增 spec 與 brief,不含實作:

  • docs/superpowers/specs/2026-10-07-drive-search-workspace-scope-brief.md:產品決策依據(已核准)。
  • docs/superpowers/specs/2026-10-07-drive-search-workspace-scope-design.md:實作 spec。決定 wspc drive search [id] 以 optional positional 表達 scope,codegen 新增 Paired Command 規則合成同名 op,其他重名直接報錯。
  • README.md Roadmap 連結本 spec;CONTEXT.md 新增 Search Scope 詞條。

這個 PR 不修什麼

不改程式碼、不同步 spec、不 regenerate。實作由後續 ready-for-agent Todo 進行。Release 在實作 merge 前仍會失敗。

已知副作用

無。

測試

文件變更,git diff --check 通過。無 regression test 適用。

未完成驗收

無(spec PR 本身無 acceptance;實作 acceptance 見 spec)。

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

pocketsharkk and others added 2 commits October 7, 2026 11:04
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pocketsharkk
pocketsharkk merged commit b2b8847 into main Oct 7, 2026
2 checks passed
@pocketsharkk
pocketsharkk deleted the claude/product-goal-ready-spec-f4fb2a branch October 7, 2026 03:06
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.

1 participant