Skip to content

box write

mrdulasolutions edited this page May 25, 2026 · 1 revision

box-write (on-prem variant)

Save a memory to the local Box Drive workspace. Append-only — never overwrites. Box Drive handles cloud sync on its own schedule.

Usage

/box-write [content] [--kind=<kind>] [--title=<title>] [--team=<team>] [--tags=<a,b,c>]

What it does

Same as the cloud variant in spirit, with FS-only operations:

  1. Verify workspace and backend (box-drive-detect)
  2. Generate ULID + slug
  3. Check slug collision in local _index.json
  4. Build frontmatter (ASCII only, no em-dashes — Cowork strictness)
  5. Compose body
  6. Acquire workspace lock
  7. Write file atomically: <filename>.tmpfsyncrename
  8. Compute SHA256 locally (no API call)
  9. Update folder _index.json
  10. Release lock
  11. Report

Differences from cloud variant

  • No Box MCP calls — all FS operations
  • No metadata template instance — Box API would be required
  • file_id in index entry is null — Box Drive assigns Box file IDs only after sync; reconciliation is out of scope for v0.0.x
  • local_path is the canonical pointer — relative path from workspace root
  • No URL link to the file in Box — file only exists locally until Box Drive syncs

When to expect Box-cloud visibility

After writing, Box Drive syncs on its own schedule:

Workflow Latency
Same agent reading via local _index.json Instant
Another machine reading via Box Drive (on-prem variant) Seconds to minutes (Box Drive sync)
Cloud variant reading via Box MCP Seconds to minutes after sync + ~10 min for Box search index
Box AI / Hubs Q&A (cloud variant only) ~10 min Hub warm-up

Plan workflows accordingly.

Quality bar

Same as cloud variant:

  • Title is searchable
  • Body explains WHY, not just WHAT
  • Tags sparse (2-5)
  • Wikilinks intentional

Errors

  • No workspace → run /box-init first
  • Lock not acquired → another writer active OR stale lock; /box-index-rebuild to inspect
  • Mount lost mid-write (Box Drive crashed) → write may be incomplete; surface clearly

See also

Clone this wiki locally