From 4031495c816439d5cc9744cf736fec727fb02950 Mon Sep 17 00:00:00 2001 From: "Snow Lee (Sungwon)" Date: Tue, 11 Aug 2026 05:04:12 +0900 Subject: [PATCH] feat(cli,docs): say that agent skills sync, and refuse ~/.claude as a mount root (BEA-117) (#138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `.claude/skills/**` has always synced — deliberately, per the reservation rule's own comment — but the only sentence saying so sits under the heading "What beardrive does not sync". Nobody knows. Track B, the one real bug: `bdrive init ~/.claude` was accepted. The reserved-path rule matches ".claude/settings.json" on its directory segment, so at that mount root the file is bare "settings.json" — reserved by nothing — along with .credentials.json and every saved session under projects/. New exported config.AgentConfigDir folds the keys of agentHookConfigs the way ReservedDir folds (case, trailing dots), and init refuses before any network call or file write. Only that direction leaks: a mount CONTAINING ~/.claude still sees .claude/settings.json, reserved at any depth. Track A, the content job: a README Features bullet stating the positive claim, a 7th use-case page (plus its astro.config.mjs sidebar entry, without which it is invisible), and a `skills` template appended last to the registry so `docs` keeps the RECOMMENDED badge. The embed directive becomes `//go:embed all:files` — a plain pattern drops dot-prefixed paths silently, so the template whose whole payload is .claude/skills//SKILL.md would have shipped empty. templates_test.go's every-directory-holds-a-file rule now marks ancestors, not just the direct parent: skills is the first template more than one level deep, and the rule was stricter than its own stated reason (an intermediate directory on the way to a file is not empty). Co-authored-by: Claude Opus 5 (1M context) --- README.md | 13 +- architecture/cli-sync.md | 8 +- architecture/overview.md | 2 +- cmd/bdrive/init.go | 10 ++ cmd/bdrive/sec_fixes13_test.go | 146 ++++++++++++++++++ internal/config/project.go | 24 +++ internal/config/sec_fixes13_test.go | 59 +++++++ .../.claude/skills/team-conventions/SKILL.md | 41 +++++ internal/templates/files/skills/AGENTS.md | 67 ++++++++ internal/templates/sec_drive_test.go | 2 +- internal/templates/templates.go | 12 +- internal/templates/templates_test.go | 37 ++++- web/docs/astro.config.mjs | 1 + web/docs/src/content/docs/reference/cli.md | 9 +- web/docs/src/content/docs/start/setup.md | 3 + .../content/docs/use-cases/shared-skills.md | 68 ++++++++ 16 files changed, 488 insertions(+), 14 deletions(-) create mode 100644 cmd/bdrive/sec_fixes13_test.go create mode 100644 internal/config/sec_fixes13_test.go create mode 100644 internal/templates/files/skills/.claude/skills/team-conventions/SKILL.md create mode 100644 internal/templates/files/skills/AGENTS.md create mode 100644 web/docs/src/content/docs/use-cases/shared-skills.md diff --git a/README.md b/README.md index d143ddc..cb06c64 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,13 @@ actually read (and which hot ones nobody maintains). - **Conflict-safe** — concurrent edits resolve deterministically (last-writer-wins), and the losing version is preserved as a `name.bdrive-conflict--