v3.6.0
v3.6.0 — Firm-scope templates (Phase 1, OS-synced folder)
Adds the third template scope — firm — between case and user. Enables firm-wide template sharing across multiple lawyers without an OAuth dance: each lawyer points the plugin at a local path that their OS sync client (Drive for desktop, Dropbox, OneDrive, SMB) is already syncing. The plugin treats it as a local directory; the OS handles sharing and permissions.
This is Phase 1 of the firm-scope work, designed in collaboration with two PE reviews (Anthropic + OpenAI Codex) over four iteration rounds. Phase 2/3 hardening is explicitly deferred.
What changed
- New scope:
firm. Resolver order is nowcase → firm → user. firm is silently skipped when unconfigured or unreachable, so existing case/user workflows are unchanged. - New command:
/template-firm-setup <path>. Validates path exists + is dir + not under~/.claude-bengo/. Writesfirm_templates_pathto~/.claude-bengo/global.json. Drops a PII-warning README into the folder on first setup. --scope firmaccepted in/template-installand/template-create./template-promote --to firmand/template-demote --from firmfor firm round-trips.- firm writes go through the same PII gate as user (hard block via
pii_scan.py). Bundled-template installs are manifest-verified and skip PII scan even at firm scope. - New exit code 6 + structured JSON error (
{"code": "firm_unavailable", "state": "unconfigured"|"unreachable", ...}) when firm operations attempted while not reachable.
Setup (one-time per lawyer)
/template-firm-setup ~/Library/CloudStorage/GoogleDrive-xxx@firm.jp/Shared\ drives/事務所/法人テンプレート
Admin creates the Shared Drive folder once and grants editor access. Each lawyer runs the command above on their own machine.
Explicitly deferred
| Phase | What |
|---|---|
| 2 | Canonical xlsx hash + fill-time PII rescan + case-local sidecar cache |
| 2 | TOCTOU temp-copy on firm reads |
| 3 | Shape-diff [c]/[f]/[d] shadow drift prompt at fill time |
| 3 | Parent-mount-vs-leaf reachability remediation |
These flow naturally from the v4 design and are tracked in CHANGELOG breadcrumbs.
Test coverage
- workspace 40/40, template_lib 36/36, audit 18/18, verify 52/52, e2e 37/37 — all green
- 4 dedicated tests pin exit-code-6 + structured-JSON contract for
_cmd_install/_cmd_save_userfirm-unavailable paths (caught by Codex review during PR #8)
Full changelog: https://github.com/llamadrive/claude-bengo/blob/main/CHANGELOG.md