/drive-filing
Brain Drive filing, archival, and docs.local lifecycle. Triggers: Drive/Brain Drive upload, archive this, post-digest archival, docs.local cleanup, docs.local artifacts, rollup, folders, prompts/results, audits, plans, transcripts, dashboards. NOT for Gemini Deep Research/queries.
$ golems-cli skills install drive-filingUpdated yesterday
One skill for everything that moves durable artifacts out of
docs.local/(formerlydrive-usage,google-drive-archive, and thearchiveskill). Nameddrive-filing, notbrain-drive, so it is not one hyphen away from/braindrive(the Gemini Drive query command).Etan's pain: agents (except researchers) don't use Drive right and leave artifacts scattered in
docs.local/. This skill makes filing automatic. Rule of thumb: if an artifact should outlive this session, file it by § Machine hygiene: code and harnesses in a repo, personal or client documents in iCloud, other durable artifacts in the RIGHT Brain Drive folder —docs.local/is a cache, not a home.
| Need | Go to |
|---|---|
| Which folder, what name | § Brain Drive folder model, § Decision tree, § Naming convention (below) |
| Put a heavy (>100KB / media / transcript) artifact into Drive, with ledger + brain_digest | § Archive a heavy artifact → references/archive-procedure.md |
Keep docs.local/ legible over time (daily → monthly → Drive) | § docs.local lifecycle |
| Manifest schema, disk measurement commands, path reconciliation | references/archiving-convention.md |
Not this skill: /braindrive queries Drive via Gemini; /gemini-research does web research with Drive sources.
Brain Drive folder model
Folder IDs are private deployment values. Resolve them from the environment or private operator configuration; never copy live Drive IDs into this skill.
| Folder | id | What goes here |
|---|---|---|
01_STANDARDS | ${BRAIN_DRIVE_STANDARDS_FOLDER_ID} | Canonical specs, conventions, locked schemas, standards docs (durable reference). |
02_GROUNDING | ${BRAIN_DRIVE_GROUNDING_FOLDER_ID} | Grounding corpora / reference data agents ground answers on. |
03_RESEARCH | ${BRAIN_DRIVE_RESEARCH_FOLDER_ID} | Research prompts + results. In-flight → 03_RESEARCH/Active/<topic>/ via ${BRAIN_DRIVE_RESEARCH_ACTIVE_FOLDER_ID}. |
04_INGEST | ${BRAIN_DRIVE_INGEST_FOLDER_ID} | Raw inbound to be processed/digested (not yet curated). |
06_ARCHIVE | ${BRAIN_DRIVE_ARCHIVE_FOLDER_ID} | Forever storage of finished heavy artifacts (transcripts, audio/video, big audits/plans). Target of § Archive a heavy artifact. |
Folder semantics (what each numbered folder means) are confirmed with brainlayer-LEAD (s:57, owns Drive/backup). Legacy non-numbered folders (
Research×2 duplicates,Sessions,Collabs,_inbox-*,BrainBar Design Audit) are pre-taxonomy scatter — do not add to them; file into the numbered model. (Consolidation of the legacy dupes is an s:57 cleanup task.)
Legacy Brain Drive/Research/<project>/ folders are being moved under 03_RESEARCH/Active; if a prompt isn't found in Active, check the legacy path read-only and report it, never write there.
Decision tree (where does THIS artifact go?)
- A research prompt or its results? →
03_RESEARCH/Active/<topic>/(e.g.skills-eval/). Drive-ground prompts by uploading the real artifacts beside them. - A finished heavy artifact (>100KB / media / raw transcript / big audit)? → § Archive a heavy artifact → lands in
06_ARCHIVE/<area>/<topic>/<YYYY-MM-DD>/, leaves a_DRIVE-LEDGER.mdpointer indocs.local/. - A canonical standard / spec / locked schema? →
01_STANDARDS/. - Grounding corpus / reference data? →
02_GROUNDING/. - Raw, not-yet-digested inbound? →
04_INGEST/. - Lightweight, session-scoped scratch? → fine to leave in
docs.local/— but if anyone else (or future-you) needs it, FILE it per 1–5.
Naming convention
YYYY-MM-DD-<topic>[-<surface/agent>].<ext> — date-prefixed, kebab-case, topic-first. Folders: <topic>-<domain>/ (e.g. weave-eval/). Keep the local mirror name identical to the Drive name so the ledger maps 1:1.
Full SKILL.md source — includes LLM directives, anti-patterns, and technical instructions stripped from the Overview tab.
One skill for everything that moves durable artifacts out of
docs.local/(formerlydrive-usage,google-drive-archive, and thearchiveskill). Nameddrive-filing, notbrain-drive, so it is not one hyphen away from/braindrive(the Gemini Drive query command).Etan's pain: agents (except researchers) don't use Drive right and leave artifacts scattered in
docs.local/. This skill makes filing automatic. Rule of thumb: if an artifact should outlive this session, file it by § Machine hygiene: code and harnesses in a repo, personal or client documents in iCloud, other durable artifacts in the RIGHT Brain Drive folder —docs.local/is a cache, not a home.
| Need | Go to |
|---|---|
| Which folder, what name | § Brain Drive folder model, § Decision tree, § Naming convention (below) |
| Put a heavy (>100KB / media / transcript) artifact into Drive, with ledger + brain_digest | § Archive a heavy artifact → references/archive-procedure.md |
Keep docs.local/ legible over time (daily → monthly → Drive) | § docs.local lifecycle |
| Manifest schema, disk measurement commands, path reconciliation | references/archiving-convention.md |
Not this skill: /braindrive queries Drive via Gemini; /gemini-research does web research with Drive sources.
Brain Drive folder model
Folder IDs are private deployment values. Resolve them from the environment or private operator configuration; never copy live Drive IDs into this skill.
| Folder | id | What goes here |
|---|---|---|
01_STANDARDS | ${BRAIN_DRIVE_STANDARDS_FOLDER_ID} | Canonical specs, conventions, locked schemas, standards docs (durable reference). |
02_GROUNDING | ${BRAIN_DRIVE_GROUNDING_FOLDER_ID} | Grounding corpora / reference data agents ground answers on. |
03_RESEARCH | ${BRAIN_DRIVE_RESEARCH_FOLDER_ID} | Research prompts + results. In-flight → 03_RESEARCH/Active/<topic>/ via ${BRAIN_DRIVE_RESEARCH_ACTIVE_FOLDER_ID}. |
04_INGEST | ${BRAIN_DRIVE_INGEST_FOLDER_ID} | Raw inbound to be processed/digested (not yet curated). |
06_ARCHIVE | ${BRAIN_DRIVE_ARCHIVE_FOLDER_ID} | Forever storage of finished heavy artifacts (transcripts, audio/video, big audits/plans). Target of § Archive a heavy artifact. |
Folder semantics (what each numbered folder means) are confirmed with brainlayer-LEAD (s:57, owns Drive/backup). Legacy non-numbered folders (
Research×2 duplicates,Sessions,Collabs,_inbox-*,BrainBar Design Audit) are pre-taxonomy scatter — do not add to them; file into the numbered model. (Consolidation of the legacy dupes is an s:57 cleanup task.)
Legacy Brain Drive/Research/<project>/ folders are being moved under 03_RESEARCH/Active; if a prompt isn't found in Active, check the legacy path read-only and report it, never write there.
Decision tree (where does THIS artifact go?)
- A research prompt or its results? →
03_RESEARCH/Active/<topic>/(e.g.skills-eval/). Drive-ground prompts by uploading the real artifacts beside them. - A finished heavy artifact (>100KB / media / raw transcript / big audit)? → § Archive a heavy artifact → lands in
06_ARCHIVE/<area>/<topic>/<YYYY-MM-DD>/, leaves a_DRIVE-LEDGER.mdpointer indocs.local/. - A canonical standard / spec / locked schema? →
01_STANDARDS/. - Grounding corpus / reference data? →
02_GROUNDING/. - Raw, not-yet-digested inbound? →
04_INGEST/. - Lightweight, session-scoped scratch? → fine to leave in
docs.local/— but if anyone else (or future-you) needs it, FILE it per 1–5.
Naming convention
YYYY-MM-DD-<topic>[-<surface/agent>].<ext> — date-prefixed, kebab-case, topic-first. Folders: <topic>-<domain>/ (e.g. weave-eval/). Keep the local mirror name identical to the Drive name so the ledger maps 1:1.
Machine hygiene: no ad-hoc home folders
Applies to both Macs. Each kind of artifact has one home:
| Kind | Lives in | Never in |
|---|---|---|
| Rerunnable source, harnesses, test kits, eval scripts, fixtures | A repo, committed; generated fixtures in its docs.local/ or fixtures/ with a regeneration recipe | ~/, ~/Desktop, ~/temp, ad-hoc repo copies |
| Live lane reports, receipts, logs | Owning repo's docs.local/<lane>/ on the machine that ran it | ~/m1-*, ~/vlv* / ~/.vl*, ~/vl-harness* copies, ~/BrainLayer-*, Desktop handoff folders |
| Finished heavy artifacts, including benchmark runs | § Decision tree → § Archive a heavy artifact; leave _DRIVE-LEDGER.md | Local disk “for later” |
| Personal or client documents Etan keeps | iCloud Drive Archive/<YYYY>/<YYYY-MM-DD>-<topic>/ | Desktop root |
| Models and caches (Whisper, HF, npm/bun) | Tool's own cache directory, one copy recorded in app config | ~/Documents, duplicate caches |
| Worktrees | ~/.t3/worktrees/ or <repo>/.worktrees/; retire through the lifecycle contract | Other locations or ad-hoc repo copies |
Naming and manifests. Local scratch/lane folder names use
YYYY-MM-DD-<topic> in lowercase kebab-case, without machine prefixes (m1-*)
or retired names (Ralph). Drive placement follows the existing layout above
and the rollup targets below, including their <YYYY-MM> units; this local
folder rule does not rename Drive archive units.
Every archive unit carries MANIFEST.json with:
- Source path and host.
- Byte count and SHA-256 for each file.
- Producer (lead thread or plan).
- Restore command.
Schema and measurement commands: references/archiving-convention.md.
Five rules:
- Agents create no ad-hoc folders in
~/or~/Desktop. Use sanctioned T3 scratch or repodocs.local/scratch under the workspace lifecycle contract. - Delete a local archive copy only after the Drive or iCloud copy exists, manifest hashes match verified remote bytes, and a one-file restore drill succeeds. A matching name or folder listing is insufficient. Keep the ledger and preservation proof outside any retiring scope; follow the archive procedure and lifecycle contract for their additional verification gates.
- Measure disk recovery with
diskutilcontainer free space and APFS allocation. Finder free space includes purgeable space; logicaldusums do not prove physical recovery. Record the host and before/after measurements. - Leads reap their own lane leftovers at settle, after harvesting and releasing consumers under the lifecycle contract. Unowned leftovers go to the local-files lead's per-Mac ledger; never silently delete them.
- Deleting data remains a one-way door. Reviewed empty directories may be
removed with
rmdir. Nonempty data needs an identified owner, verified preservation and Etan's explicit instruction for that deletion, or a door he already opened for that work (quote his authorization). A lead's own call is insufficient; archive proof alone grants no deletion authority.
Enforcement follow-up (not implemented by this section): add a report-only
inventory check for new agent-created top-level ~/ and ~/Desktop directories
(uid 501, recent birthtime, patterns such as m1-*, vlv* / .vl*,
vl-harness* copies and BrainLayer-*). These are investigation signals,
not ownership or deletion proof. The local-files lead must register and link the
M4 Max and M1 Pro ledgers here once their canonical locations are confirmed;
until then, report unowned leftovers to that lead. Never infer a ledger path or
add a destructive home-wide reaper.
The discipline (the one rule)
Before you finish a task that produced a durable artifact: did you FILE it in its home, or leave it scattered in docs.local/? Use the § Machine hygiene table: code and harnesses go to a repo, personal or client documents to iCloud, other durable artifacts to the right Brain Drive folder. If durable and still only local → file it now (the decision tree above, or § Archive a heavy artifact) and drop a one-line _DRIVE-LEDGER.md pointer. "It's in docs.local" is not "it's saved."
Quick reference (MCP)
- Upload:
mcp__google-drive__uploadFile(localPath, parentFolderId=<resolved private ID>). For text, passmimeTypefrom the extension (.md→text/markdown,.txt→text/plain,.json→application/json); a.mdstarting with<!--otherwise lands astext/html. - New topic folder:
mcp__google-drive__createFolder(name, parent=<resolved private ID>). - Find:
mcp__google-drive__search(query="'<RESOLVED_PRIVATE_PARENT_ID>' in parents", rawQuery=true). - Heavy/forever: § Archive a heavy artifact.
Archive a heavy artifact
Full procedure: references/archive-procedure.md (was
/google-drive-archive). Fire it on "save this to Drive", "archive this", "put this in the
archive", a >100KB write to docs.local/{research,audits,plans}/, a post-brain_digest raw file,
or a /tmp cleanup that may hold forever-knowledge. The eight steps, in short:
- Ephemeral or forever? Only originals go up; list regeneratable derivatives and how to rebuild them. Not archiving a file grants no deletion authority; apply § Machine hygiene rule 5.
- Resolve
Brain Drive/06_ARCHIVE/<area>/<topic>/<YYYY-MM-DD>[-<tag>]/(research,audits,plans,repos,voice);mcp__google-drive__searchfor precedent first. createFolderper level, keeping every ID. 4.uploadFile; keepid,link,size.brain_digestevery text file (a background agent for >150KB).- Write
docs.local/<area>/<topic>/_DRIVE-LEDGER.md(never committed). - Write the ledger, then apply § Machine hygiene rules 2 and 5 as the single deletion gate:
manifest hashes must match verified archive bytes, a one-file restore test must pass,
and Etan must authorize deletion (or have already opened that door for this work, quoted).
A
listFolderresult and ledger alone never authorize deletion. brain_storeunusual archive decisions only.
Never: commit a 1.5GB transcript, rm -rf /tmp/… before the forever check, digest without
uploading, upload without a ledger row, re-upload what Drive already has.
docs.local lifecycle
docs.local/ stays legible, "not just walls of MD files": daily items (YYYY-MM-DD-*) roll up into
monthly folders (YYYY-MM/), and months older than N go to Brain Drive through § Archive a heavy
artifact, with a _DRIVE-LEDGER.md pointer left behind. /fleet-wrap is to run it at sprint close
(skillcreator owns that call site; golems owns this skill).
node <drive-filing-dir>/scripts/rollup.mjs --repo <path> --keep-months N # dry-run (default): report only
node <drive-filing-dir>/scripts/rollup.mjs --repo <path> --keep-months N --json # the full plan
node <drive-filing-dir>/scripts/rollup.mjs --repo <path> --keep-months N --apply # month moves + plan fileThe last stdout line is the one-line summary /fleet-wrap records: drive-filing rollup: mode=… files=… bytes=… · monthly-moves=… · to-drive months=… files=… bytes=… · mtime-units=… bytes=… · held=… credentials-skipped=….
Dating (v2): an item's month is the first YYYY-MM-DD anywhere in its own name, else the first
YYYY-MM (examplechannel-2026-09-19-015034/, probe-2026-03/); an exact YYYY-MM/ folder is the month itself.
An undated folder with a dated name somewhere below it is an area and is descended. An undated folder
with none is one mtime unit (the highest such folder), dated by the newest file inside; it joins the
upload plan once old but is never moved; its planned Drive target keeps its own path
(…/<repo>/<area>/<unitName>, no month segment: it mirrors the unmoved local path), so no two units share a target.
At upload, an mtime unit gets a date level: …/<repo>/<area>/<unitName>/<YYYY-MM-DD>/,
dated by its newest file (the date the plan used), recorded in the ledger and its MANIFEST.json. --json lists the 5 largest under
mtimeUnits. A unit with no files or only empty ones is counted (empty-units=) and never planned.
Undated files are counted and left alone. Regenerable dirs (__pycache__, node_modules, .venv,
venv, .pytest_cache, .mypy_cache, .ruff_cache, .build, .next, .turbo, .probe) are never
planned, never an mtime unit and never deleted; each is reported once as skipped: regenerable <path>/
with its size, and the summary adds regenerable-skipped=N bytes=B. A credential inside one still wins
(the dir is held). A month rolls up once it is over; months more than N back form
the upload plan, one unit per folder, targeting Brain Drive/06_ARCHIVE/docs-local/<repo>/<area>/<YYYY-MM>
(the one named exception to the YYYY-MM-DD date level: a rollup unit is a month).
--apply moves items into their month folders (never overwriting; a clash is reported as conflict:)
and writes docs.local/_drive-filing/rollup-plan-<date>.json. The script never uploads or deletes.
Upload exactly the files in that plan through the archive procedure
(ledger + brain_digest), and nothing that is not in it. The plan is not a manifest (it lists paths
and sizes, with no hashes, host, producer or restore command): until rollup.mjs emits one, write each
unit's MANIFEST.json by hand before its upload and upload it with the unit.
Credentials never move. Nothing whose name contains credential, secret, token or .env (.env*,
deploy.env, .ENV.prod, .envrc) or has env as a word (prod-env.json, app-env.yml,
staging_env), or ends in auth.json, .pem or .key — file or directory — and nothing under a
codexhome/codex-home*, claudehome/claude-home*, .codex, .claude or *-HOME* directory or a
browser profile (a dir holding Local State, Cookies, Login Data or Web Data), is uploaded,
moved or deleted. Every name rule matches anywhere in the name, case-insensitively, because
docs.local names are date-prefixed. token releases only proven-safe words: tokeniz*,
design-token(s) and Trust Tokens are stripped first, so tokenizer-remap.md passes and
github_token_tokenizer.txt does not (a browser profile is still held whole). Holds run before dating. rollup.mjs enforces this in code: each credential is reported
as skipped: credential <path> (a credential directory is one line plus its credential-named
files), and a month group (the YYYY-MM/ folder plus that month's dated siblings in the same
folder) that holds one is held whole: no moves into or out of it, no upload unit. It is reported
once as held: contains credentials <path> with its items and credentials listed under it.
Content scan (B1). Every file the plan would move or upload is read (text only, in overlapping 1 MiB
chunks; a file with a NUL in its first chunk counts as binary and is skipped) for high-confidence secret
shapes: Supabase sbp_, Google AIza, GitHub gh[pousr]_ / github_pat_, OpenAI sk-, AWS AKIA,
Slack xox?-, and PEM private-key headers. A hit holds the whole month group as
held: credential-content <path>, listing content: <file> (<shape>). A matched value is never kept,
logged or printed. The summary adds content-held=N.
Cleaning them up is the owner's call.
After creating/editing this skill it must be REGISTERED (golem-install / symlink into
~/.claude/skills) before any agent can invoke it — committed ≠ installed.
Not yet evaluated on current models
Results will appear here once runs with a recorded model are published.
Changelog entries are derived from skill version updates. Full cascading changelog (Phase 4D) coming soon.
- +Initial release to Golems skill library
- +7 eval scenarios defined