From 0236e1b2723c7506455496ced8096a1b7f805251 Mon Sep 17 00:00:00 2001 From: "Snow W. Lee (Sungwon)" Date: Mon, 27 Jul 2026 14:49:58 +0900 Subject: [PATCH] feat(cli): multi-folder --shared at init + bdrive scope to edit the sync scope (#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(cli): init --shared accepts multiple subfolders (repeatable or comma-separated) --shared is now a slice flag: `--shared wiki --shared docs` or `--shared wiki,docs` sync several subfolders into one project (include list ["wiki/", "docs/"]). The interactive scope prompt takes a space- or comma-separated list. Entries resolving to ".", "", or ".." error out — silently dropping them would widen scope to the whole folder. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01AubcaQscjcQucXwh578vqG * docs(plugin): skills/commands propose multiple --shared folders at init The init/install flows now scan for all knowledge folder candidates and offer them as one --shared list (one project, one permission set), noting that folders needing different access belong in separate projects. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01AubcaQscjcQucXwh578vqG * feat(cli): bdrive scope — add/remove shared subfolders without editing JSON `bdrive scope` shows the include list; `scope add`/`scope rm` edit it from the mount root. The daemon re-reads config each tick, so changes apply in seconds. rm deletes nothing (newly filtered paths drop from the cache with no delete op); removing the last entry is refused since an empty include list means whole-folder sync. add onto a whole-folder project is refused for the same narrowing hazard. Skill/README/docs updated; scope added to the cli-sync diagram's command list. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01AubcaQscjcQucXwh578vqG * docs+cli: scoping guide covers multi-folder --shared and bdrive scope; init hints on ignored --shared at resume The scoping guide (the dedicated page for this feature) now shows --shared wiki,docs and a "Change the scope later" section for bdrive scope; setup-by-hand and project-files point at it. init resume with an explicit --shared now says the flag is ignored instead of staying silent. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01AubcaQscjcQucXwh578vqG --------- Co-authored-by: Claude Fable 5 --- README.md | 5 +- architecture/cli-sync.md | 2 +- cmd/bdrive/init.go | 75 +++++--- cmd/bdrive/init_test.go | 57 ++++++ cmd/bdrive/main.go | 1 + cmd/bdrive/scope.go | 169 ++++++++++++++++++ plugin/commands/init.md | 18 +- plugin/commands/install.md | 28 +-- plugin/skills/beardrive/SKILL.md | 11 +- web/docs/src/content/docs/guides/scoping.md | 26 ++- .../src/content/docs/manual/setup-by-hand.md | 8 +- web/docs/src/content/docs/reference/cli.md | 4 +- .../content/docs/reference/project-files.md | 4 +- 13 files changed, 350 insertions(+), 58 deletions(-) create mode 100644 cmd/bdrive/init_test.go create mode 100644 cmd/bdrive/scope.go diff --git a/README.md b/README.md index a10f42b..34748ad 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,8 @@ $ bdrive login https://your-hub && cd ~/workspace && bdrive init (last-writer-wins), and the losing version is preserved as a `name.bdrive-conflict--