Skip to content

v3.6.0

Choose a tag to compare

@ym259 ym259 released this 27 Apr 06:12
· 22 commits to main since this release
3e27bb6

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 now case → 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/. Writes firm_templates_path to ~/.claude-bengo/global.json. Drops a PII-warning README into the folder on first setup.
  • --scope firm accepted in /template-install and /template-create. /template-promote --to firm and /template-demote --from firm for 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_user firm-unavailable paths (caught by Codex review during PR #8)

Full changelog: https://github.com/llamadrive/claude-bengo/blob/main/CHANGELOG.md