[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C4Y1J4R5YYBA2NRHX147H2":3,"skill-same:01M7C4Y1J4R5YYBA2NRHX147H2":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7C4Y1J4R5YYBA2NRHX147H2","drive-filing",null,"Brain Drive upload, archive this, post-digest archival, docs.local cleanup\u002Frollup. NOT for Gemini Deep Research\u002Fqueries.","EtanHey\u002Fgolems","EtanHey","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93338119?v=4","01M7C4SKC9HJC3B9TAX0D9MZ1E","Etan Heyman","01M7C4SKCT59Z49TTN4WWDDEYD",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: drive-filing\ndescription: \"Brain Drive upload, archive this, post-digest archival, docs.local cleanup\u002Frollup. NOT for Gemini Deep Research\u002Fqueries.\"\n---\n\n# \u002Fdrive-filing — filing, archival, and the docs.local lifecycle\n\n> One skill for everything that moves durable artifacts out of `docs.local\u002F` (formerly `drive-usage`,\n> `google-drive-archive`, and the `archive` skill).\n> Drive queries use connected Drive search tools; this skill owns filing.\n>\n> Etan's pain: agents (except researchers) don't use Drive right and **leave artifacts scattered in `docs.local\u002F`**. 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\u002F` is a cache, not a home.**\n\n| Need | Go to |\n|---|---|\n| Which folder, what name | § Brain Drive folder model, § Decision tree, § Naming convention (below) |\n| Put a heavy (>100KB \u002F media \u002F transcript) artifact into Drive, with ledger + brain_digest | § Archive a heavy artifact → [references\u002Farchive-procedure.md](references\u002Farchive-procedure.md) |\n| Keep `docs.local\u002F` legible over time (daily → monthly → Drive) | § docs.local lifecycle |\n| Manifest schema, disk measurement commands, path reconciliation | [references\u002Farchiving-convention.md](references\u002Farchiving-convention.md) |\n\nNot this skill: connected Drive search tools query existing files; `\u002Fgemini-research` does web research with Drive sources.\n\n## Brain Drive folder model\n\nFolder IDs are private deployment values. Resolve them from the environment or private operator\nconfiguration; never copy live Drive IDs into this skill.\n\n| Folder | id | What goes here |\n|--------|----|----|\n| `01_STANDARDS` | `${BRAIN_DRIVE_STANDARDS_FOLDER_ID}` | Canonical specs, conventions, locked schemas, standards docs (durable reference). |\n| `02_GROUNDING` | `${BRAIN_DRIVE_GROUNDING_FOLDER_ID}` | Grounding corpora \u002F reference data agents ground answers on. |\n| `03_RESEARCH` | `${BRAIN_DRIVE_RESEARCH_FOLDER_ID}` | Research **prompts + results**. In-flight → `03_RESEARCH\u002FActive\u002F\u003Ctopic>\u002F` via `${BRAIN_DRIVE_RESEARCH_ACTIVE_FOLDER_ID}`. |\n| `04_INGEST` | `${BRAIN_DRIVE_INGEST_FOLDER_ID}` | Raw inbound to be processed\u002Fdigested (not yet curated). |\n| `06_ARCHIVE` | `${BRAIN_DRIVE_ARCHIVE_FOLDER_ID}` | **Forever** storage of finished heavy artifacts (transcripts, audio\u002Fvideo, big audits\u002Fplans). Target of § Archive a heavy artifact. |\n\n> Folder *semantics* (what each numbered folder means) are confirmed with brainlayer-LEAD (s:57, owns Drive\u002Fbackup). 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.)\n\nLegacy `Brain Drive\u002FResearch\u002F\u003Cproject>\u002F` folders are being moved under 03_RESEARCH\u002FActive; if a prompt isn't found in Active, check the legacy path read-only and report it, never write there.\n\n## Decision tree (where does THIS artifact go?)\n\n1. **A research prompt or its results?** → `03_RESEARCH\u002FActive\u002F\u003Ctopic>\u002F` (e.g. `skills-eval\u002F`). Drive-ground prompts by uploading the real artifacts beside them.\n2. **A finished heavy artifact (>100KB \u002F media \u002F raw transcript \u002F big audit)?** → § Archive a heavy artifact → lands in `06_ARCHIVE\u002F\u003Carea>\u002F\u003Ctopic>\u002F\u003CYYYY-MM-DD>\u002F`, leaves a `_DRIVE-LEDGER.md` pointer in `docs.local\u002F`.\n3. **A canonical standard \u002F spec \u002F locked schema?** → `01_STANDARDS\u002F`.\n4. **Grounding corpus \u002F reference data?** → `02_GROUNDING\u002F`.\n5. **Raw, not-yet-digested inbound?** → `04_INGEST\u002F`.\n6. **Lightweight, session-scoped scratch?** → fine to leave in `docs.local\u002F` — but if anyone else (or future-you) needs it, FILE it per 1–5.\n\n## Naming convention\nNew standalone artifacts: `YYYY-MM-DD-\u003Cproject>-\u003Ctopic>-\u003Ckind>[-by-\u003Cproducer>].\u003Cext>`, lowercase kebab-case. Example: `2026-11-04-voicebar-focus-audit-by-author.md`. Topic must describe the work; `Theo.md`, `Model.md` and `2026-11-04-golems-theo-report.md` fail. Put a person\u002Fmodel attribution in `by-\u003Cproducer>` (exactly one lowercase token), never in the project, topic or kind slots. Kinds: report, prompt, result, transcript, recording, audit, plan, review, frame, image, notes, receipt, manifest, data, archive, index, dashboard, summary, eval, log.\n\nBefore uploading a new standalone artifact, set `GOLEMS_ROOT` to the absolute golems checkout (normally `$HOME\u002FGits\u002Fgolems`) and run `node \"$GOLEMS_ROOT\u002Fscripts\u002Fdrive\u002Flint-name.mjs\" \u003Cbasename>` from any repo; nonzero blocks filing until renamed. Existing files and preserved archive members (including `MANIFEST.json` and frame names) are grandfathered: `--existing` reports issues without blocking or renaming. Research-lifecycle's sequential context\u002FR-number names keep their own contract. Folders retain `\u003Ctopic>-\u003Cdomain>\u002F`; keep local mirror and Drive names identical for 1:1 ledger mapping.\n\n## Verify the ledger after uploads\n\nUse one bullet per file: `- \u003Clocal path> → Brain Drive\u002F\u003Cexact path>\u002F\u003Cname> | bytes=\u003Cinteger> | SHA256=\u003C64 hex> | account=\u003Cexpected-email> | cloud=pending`. SHA256 is mandatory: missing or invalid hashes are malformed rows. Bare `Brain Drive\u002F` paths require `account=\u003Cexpected-email>`; mount paths derive it from `GoogleDrive-\u003Caccount>` (an explicit account, if provided, must agree). Record hashes from the source manifest; metadata such as Drive ID\u002FURL and manifest pointer may follow as extra pipe fields. Absolute Drive-for-Desktop paths containing `\u002FMy Drive\u002FBrain Drive\u002F` are also accepted. Old Markdown tables remain readable history; add a machine-readable pending row for verification.\n\n```bash\nGOLEMS_ROOT=\"${GOLEMS_ROOT:-$HOME\u002FGits\u002Fgolems}\"\nnode \"$GOLEMS_ROOT\u002Fscripts\u002Fdrive\u002Fverify-ledger.mjs\" \u003Cledger.md>            # dry-run; no ledger write\nnode \"$GOLEMS_ROOT\u002Fscripts\u002Fdrive\u002Fverify-ledger.mjs\" \u003Cledger.md> --apply    # only verified rows change\n```\n\nRun after each upload batch from any repo using the absolute `GOLEMS_ROOT`. The token has full Drive scope; the verifier only reads, using GET requests through the existing outside-repo OAuth guard. It checks the recorded account for every path, resolves every exact path (duplicates fail), compares bytes and the mandatory recorded SHA-256 (downloads remote bytes if Drive omits the checksum), and alone writes `cloud=verified \u003CISO timestamp>`. A local mount\u002Fcache is not sync proof. Missing, malformed, mismatched or unauthenticated rows remain pending with a reason on stdout; exit 1 means some rows remain, exit 2 is usage\u002Fledger failure. Names in old rows are report-only. `--apply` is idempotent and never uploads or deletes. Deletion still requires the full preservation and authorization gates below.\n\n## Machine hygiene: no ad-hoc home folders\n\nApplies to both Macs. Each kind of artifact has one home:\n\n| Kind | Lives in | Never in |\n|---|---|---|\n| Rerunnable source, harnesses, test kits, eval scripts, fixtures | A repo, committed; generated fixtures in its `docs.local\u002F` or `fixtures\u002F` with a regeneration recipe | `~\u002F`, `~\u002FDesktop`, `~\u002Ftemp`, ad-hoc repo copies |\n| Live lane reports, receipts, logs | Owning repo's `docs.local\u002F\u003Clane>\u002F` on the machine that ran it | `~\u002Fm1-*`, `~\u002Fvlv*` \u002F `~\u002F.vl*`, `~\u002Fvl-harness*` copies, `~\u002FBrainLayer-*`, Desktop handoff folders |\n| Finished heavy artifacts, including benchmark runs | § Decision tree → § Archive a heavy artifact; leave `_DRIVE-LEDGER.md` | Local disk “for later” |\n| Personal or client documents Etan keeps | iCloud Drive `Archive\u002F\u003CYYYY>\u002F\u003CYYYY-MM-DD>-\u003Ctopic>\u002F` | Desktop root |\n| Models and caches (Whisper, HF, npm\u002Fbun) | Tool's own cache directory, one copy recorded in app config | `~\u002FDocuments`, duplicate caches |\n| Worktrees | `~\u002F.t3\u002Fworktrees\u002F` or `\u003Crepo>\u002F.worktrees\u002F`; retire through the lifecycle contract | Other locations or ad-hoc repo copies |\n\n**Naming and manifests.** Local scratch\u002Flane folder names use\n`YYYY-MM-DD-\u003Ctopic>` in lowercase kebab-case, without machine prefixes (`m1-*`)\nor retired names (Ralph). Drive placement follows the existing layout above\nand the rollup targets below, including their `\u003CYYYY-MM>` units; this local\nfolder rule does not rename Drive archive units.\n\nEvery archive unit carries `MANIFEST.json` with:\n\n- Source path and host.\n- Byte count and SHA-256 for each file.\n- Producer (lead thread or plan).\n- Restore command.\n\nSchema and measurement commands: [references\u002Farchiving-convention.md](references\u002Farchiving-convention.md).\n\n**Five rules:**\n\n1. Agents create no ad-hoc folders in `~\u002F` or `~\u002FDesktop`. Use sanctioned T3\n   scratch or repo `docs.local\u002F` scratch under the\n   [workspace lifecycle contract](..\u002F_shared\u002Flifecycle\u002FCONTRACT.md).\n2. Delete a local archive copy only after the Drive or iCloud copy exists,\n   manifest hashes match verified remote bytes, and a one-file restore drill\n   succeeds. A matching name or folder listing is insufficient. Keep the ledger\n   and preservation proof outside any retiring scope; follow the archive\n   procedure and lifecycle contract for their additional verification gates.\n3. Measure disk recovery with `diskutil` container free space and APFS allocation.\n   Finder free space includes purgeable space; logical `du` sums do not prove\n   physical recovery. Record the host and before\u002Fafter measurements.\n4. Leads reap their own lane leftovers at settle, after harvesting and releasing\n   consumers under the lifecycle contract. Unowned leftovers go to the\n   local-files lead's per-Mac ledger; never silently delete them.\n5. Deleting data remains a one-way door. Reviewed empty directories may be\n   removed with `rmdir`. Nonempty data needs an identified owner, verified\n   preservation and Etan's explicit instruction for that deletion, or a door he\n   already opened for that work (quote his authorization). A lead's own call\n   is insufficient; archive proof alone grants no deletion authority.\n\n**Enforcement follow-up (not implemented by this section):** add a report-only\ninventory check for new agent-created top-level `~\u002F` and `~\u002FDesktop` directories\n(uid 501, recent birthtime, patterns such as `m1-*`, `vlv*` \u002F `.vl*`,\n`vl-harness*` copies and `BrainLayer-*`). These are investigation signals,\nnot ownership or deletion proof. The local-files lead must register and link the\nM4 Max and M1 Pro ledgers here once their canonical locations are confirmed;\nuntil then, report unowned leftovers to that lead. Never infer a ledger path or\nadd a destructive home-wide reaper.\n\n## The discipline (the one rule)\n**Before you finish a task that produced a durable artifact: did you FILE it in its home, or leave it scattered in `docs.local\u002F`?** 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.\"\n\n## Quick reference (MCP)\n- Upload: `mcp__google-drive__uploadFile(localPath, parentFolderId=\u003Cresolved private ID>)`. For text, pass `mimeType` from the extension (`.md` → `text\u002Fmarkdown`, `.txt` → `text\u002Fplain`, `.json` → `application\u002Fjson`); a `.md` starting with `\u003C!--` otherwise lands as `text\u002Fhtml`.\n- New topic folder: `mcp__google-drive__createFolder(name, parent=\u003Cresolved private ID>)`.\n- Find: `mcp__google-drive__search(query=\"'\u003CRESOLVED_PRIVATE_PARENT_ID>' in parents\", rawQuery=true)`.\n- Heavy\u002Fforever: § Archive a heavy artifact.\n\n## Research grounding folder contract\n\nOne folder per research holds only the curated documents that research needs as a\nprovenance record. Agents prepare ONE folder holding exactly the curated grounding\nfiles with unique names. The hand-off names that folder and the files to attach;\nthe owner attaches them when he starts the run with Drive source off by default. A folder is not a Deep Research access route:\nits connected Drive workspace provides title SEARCH only, not folder listing or\nopening Docs by link. Native Google Docs do not solve this limitation. If Drive\nis explicitly used, name each document by its exact title, unique across the whole\nDrive with no duplicate or look-alike titles; expect search to miss documents.\nBefore the real run, one cheap Deep Research probe asks only for each named\nfile's first line, checked against the author key. Missing or mismatched lines\nblock the real run; retain the admission table\u002Fkey for the real run too.\n\n- **Where:** `Brain Drive\u002F03_RESEARCH\u002FActive\u002F\u003Ctopic>\u002FR{NN}-grounding\u002F` (via `${BRAIN_DRIVE_RESEARCH_ACTIVE_FOLDER_ID}`), beside that research's prompt and results.\n- **Name:** `R{NN}-grounding` for the folder; files keep their `\u002Fresearch-lifecycle` context numbers. For the optional Drive route, titles must be unique across the whole Drive, not only inside this folder (include project, research number and topic to disambiguate).\n- **Manifest:** `00-GROUNDING-MANIFEST.md` in the folder: one row per file with `title | why it is here | drive_file_id | revision_id`. Native Google Docs have no stable bytes, so identity is the Drive file id plus revision id, never a byte hash. Serialize each row as exactly `title|drive_file_id|revision_id` (the why stays out of the hash), UTF-8, LF line ends, rows sorted by `drive_file_id`; `manifest_sha256` is the sha256 of those lines joined by LF. The prompt names exactly the manifest's files and says to use ONLY them.\n- **After harvest:** the folder is the research's record. Keep it as that record, or consolidate lasting findings into the topic's `context\u002F` files per `\u002Fresearch-lifecycle`, so Drive stays in good context. Either way the folder link, the manifest and `manifest_sha256` stay in the harvest record so provenance keeps its identity. Archiving the folder (§ Archive a heavy artifact) is optional, not required.\n\n## Archive a heavy artifact\n\nFull procedure: [references\u002Farchive-procedure.md](references\u002Farchive-procedure.md) (was\n`\u002Fgoogle-drive-archive`). Fire it on \"save this to Drive\", \"archive this\", \"put this in the\narchive\", a >100KB write to `docs.local\u002F{research,audits,plans}\u002F`, a post-`brain_digest` raw file,\nor a `\u002Ftmp` cleanup that may hold forever-knowledge. The eight steps, in short:\n\n1. Ephemeral or forever? Only originals go up; list regeneratable derivatives and how to rebuild them.\n   Not archiving a file grants no deletion authority; apply § Machine hygiene rule 5.\n2. Resolve `Brain Drive\u002F06_ARCHIVE\u002F\u003Carea>\u002F\u003Ctopic>\u002F\u003CYYYY-MM-DD>[-\u003Ctag>]\u002F` (`research`, `audits`, `plans`,\n   `repos`, `voice`); `mcp__google-drive__search` for precedent first.\n3. `createFolder` per level, keeping every ID. 4. `uploadFile`; keep `id`, `link`, `size`.\n5. `brain_digest` every text file (a background agent for >150KB).\n6. Write `docs.local\u002F\u003Carea>\u002F\u003Ctopic>\u002F_DRIVE-LEDGER.md` (never committed) with pending rows, then run § Verify the ledger after uploads. Never mark rows verified by hand.\n7. Write the ledger, then apply § Machine hygiene rules 2 and 5 as the single deletion gate:\n   manifest hashes must match verified archive bytes, a one-file restore test must pass,\n   and Etan must authorize deletion (or have already opened that door for this work, quoted).\n   A `listFolder` result and ledger alone never authorize deletion.\n8. `brain_store` unusual archive decisions only.\n\nNever: commit a 1.5GB transcript, `rm -rf \u002Ftmp\u002F…` before the forever check, digest without\nuploading, upload without a ledger row, re-upload what Drive already has.\n\n## docs.local lifecycle\n\n### Monthly qa-video archive\n\nJob `monthly-qa-video-drive-archive`: first day of each month, Asia\u002FJerusalem, ONLY on the skill-creator lead's scheduling child (seat\u002Frole resolution: \u002Fagent-routing). The lead creates it after merge. Exact scheduled command: `node \"$HOME\u002FGits\u002Fgolems\u002Fscripts\u002Fdrive\u002Farchive-qa-video.mjs\" --apply`. Never add pruning to the scheduled command.\n\nConfigure `~\u002F.config\u002Fgolems\u002Fqa-video-archive.json` outside repos: `{\"account\":\"\u003Cexpected-email>\",\"repos\":[{\"path\":\"\u003Cabsolute-repo-root>\",\"owner\":\"\u003Cproducer>\",\"harvestedRuns\":[\"\u003Ccompleted-run-name>\"]}]}`. The scheduled job reports a missing config path and these required fields on stderr (exit 2). Before activation, create the config and run a configured `--dry-run` with eligible runs. Owners register only harvested runs; unknown ownership\u002Fharvest state stays held. Default command (or `--dry-run`) reports counts\u002Fbytes without writes or Drive calls. For unconfigured read-only inventory, repeat `--repo \u003Cabsolute-repo-root>` with `--dry-run`; those units remain held until owners register them. `--apply` uploads preserved members plus MANIFEST.json to `Brain Drive\u002F06_ARCHIVE\u002Fdocs-local\u002F\u003Crepo>\u002Fqa-video\u002F\u003CYYYY-MM>\u002F\u003Crun>\u002F`, writes pending member rows, restores one image (or a member if no image), checks its bytes\u002Fhash, then runs the verifier. Existing members and MANIFEST.json keep their names. No derivative is omitted.\n\nOld means newest member mtime before the first day of the preceding calendar month (Asia\u002FJerusalem month); current\u002Fprevious months stay local. Producer holds (`active`, `pinned`, `hold`, `latest`, `partial`, `unharvested`), credentials\u002Fcontent scans, symlinks, unknown ownership and regenerable directories hold the whole run. Manifests and the ledger stay outside the run. Re-runs reuse matching remote files\u002Frows; conflicts stop. The existing outside-repo OAuth guard provides authentication; never call `op`. The token has full scope; image fetch uses only GETs.\n\nLocal pruning is optional, never implied by archive success: only `--apply --prune-verified`, with ownership and explicit deletion authority under Machine hygiene rule 5, may remove unchanged members after every row is verified, every remote hash matches and a restore drill passes. It preserves the ledger\u002Fmanifests; logical bytes are not physical disk recovery. An existing `.archive-lock` holds only that repo; other repos continue. The job names the lock on stderr and exits nonzero. Confirm no archive process is active, then clear only the empty lock directory with `rmdir` and rerun; never automatically delete it. Pending counts include each remaining ledger row once across runs. Pruning removes empty nested directories; any newly nonempty directories remain intact without a cleanup error.\n\nFor a missing cited image, use `node \"$HOME\u002FGits\u002Fgolems\u002Fscripts\u002Fdrive\u002Ffetch-qa-image.mjs\" \u003Cledger.md> \u003Coriginal-image-path>`; it restores exact verified ledger bytes into `~\u002F.cache\u002Fqa-video\u002F`, reports the Drive path\u002FID\u002FURL\u002Fhash, and never changes Drive or the ledger. Open that returned image before making a visual claim; ambiguity, missing bytes or hash\u002Fauth failure stays NOT DETERMINED.\n\n`docs.local\u002F` stays legible, \"not just walls of MD files\": daily items (`YYYY-MM-DD-*`) roll up into\nmonthly folders (`YYYY-MM\u002F`), and months older than N go to Brain Drive through § Archive a heavy\nartifact, with a `_DRIVE-LEDGER.md` pointer left behind. `\u002Ffleet-wrap` is to run it at sprint close\n(skillcreator owns that call site; golems owns this skill).\n\n```bash\nnode \"$GOLEMS_ROOT\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup.mjs\" --repo \u003Cpath> --keep-months N            # dry-run (default): report only\nnode \"$GOLEMS_ROOT\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup.mjs\" --repo \u003Cpath> --keep-months N --json     # the full plan\nnode \"$GOLEMS_ROOT\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup.mjs\" --repo \u003Cpath> --keep-months N --apply    # month moves + plan file\n```\n\nThe last stdout line is the one-line summary `\u002Ffleet-wrap` records: `drive-filing rollup: mode=… files=…\nbytes=… · monthly-moves=… · to-drive months=… files=… bytes=… · mtime-units=… bytes=… · held=… credentials-skipped=…`.\n**Dating (v2):** an item's month is the first `YYYY-MM-DD` anywhere in its own name, else the first\n`YYYY-MM` (`examplechannel-2026-09-19-015034\u002F`, `probe-2026-03\u002F`); an exact `YYYY-MM\u002F` folder is the month itself.\nAn undated folder with a dated name somewhere below it is an *area* and is descended. An undated folder\nwith none is **one mtime unit** (the highest such folder), dated by the newest file inside; it joins the\nupload plan once old but is **never moved**; its planned Drive target keeps its own path\n(`…\u002F\u003Crepo>\u002F\u003Carea>\u002F\u003CunitName>`, no month segment: it mirrors the unmoved local path), so no two units share a target.\nAt upload, an mtime unit gets a date level: `…\u002F\u003Crepo>\u002F\u003Carea>\u002F\u003CunitName>\u002F\u003CYYYY-MM-DD>\u002F`,\ndated by its newest file (the date the plan used), recorded in the ledger and its `MANIFEST.json`. `--json` lists the 5 largest under\n`mtimeUnits`. A unit with no files or only empty ones is counted (`empty-units=`) and never planned.\nUndated files are counted and left alone. **Regenerable dirs** (`__pycache__`, `node_modules`, `.venv`,\n`venv`, `.pytest_cache`, `.mypy_cache`, `.ruff_cache`, `.build`, `.next`, `.turbo`, `.probe`) are never\nplanned, never an mtime unit and never deleted; each is reported once as `skipped: regenerable \u003Cpath>\u002F`\nwith its size, and the summary adds `regenerable-skipped=N bytes=B`. A credential inside one still wins\n(the dir is held). A month rolls up once it is over; months more than N back form\nthe upload plan, one unit per folder, targeting `Brain Drive\u002F06_ARCHIVE\u002Fdocs-local\u002F\u003Crepo>\u002F\u003Carea>\u002F\u003CYYYY-MM>`\n(the one named exception to the `YYYY-MM-DD` date level: a rollup unit is a month).\n`--apply` moves items into their month folders (never overwriting; a clash is reported as `conflict:`)\nand first saves immutable `docs.local\u002F_drive-filing\u002Frollup-plan-\u003Cdate>-\u003Cuuid>.json` intent.\nA separate `rollup-progress-\u003Cdate>-\u003Cuuid>.json` records source\u002Fdestination locations (both during a move).\nReruns reconcile file identities before publishing `rollup-handoff-\u003Cdate>-\u003Cuuid>.json` (`planFile` in `--json`);\nconflicting or missing files stop with a progress path. Earlier plans stay intact. **The script never uploads or deletes.**\nNewly held sources remain in place as `not-moved` with a reason. Safety checks run before the first move.\nAfter the handoff is saved, completion markers keep settled intents out of future reads. With no moves or\nunfinished intents, `--apply` writes nothing and prints the current inventory (`--json` has no `planFile`).\nHuman output names a saved handoff before its final summary. Receipts store absolute paths: resume at the same repo path.\nUpload exactly the files in that handoff through the [archive procedure](references\u002Farchive-procedure.md)\n(ledger + `brain_digest`), and nothing that is not in it. The plan is **not** a manifest (it lists paths\nand sizes, with no hashes, host, producer or restore command): until `rollup.mjs` emits one, write each\nunit's `MANIFEST.json` by hand before its upload and upload it with the unit.\n\n**Credentials never move.** Nothing whose name contains `credential`, `secret`, `token` or `.env` (`.env*`,\n`deploy.env`, `.ENV.prod`, `.envrc`) or has `env` as a word (`prod-env.json`, `app-env.yml`,\n`staging_env`), or ends in `auth.json`, `.pem` or `.key` — file **or directory** — and nothing under a\n`codexhome`\u002F`codex-home*`, `claudehome`\u002F`claude-home*`, `.codex`, `.claude` or `*-HOME*` directory or a\nbrowser profile (a dir holding `Local State`, `Cookies`, `Login Data` or `Web Data`), is uploaded,\nmoved or deleted. Every name rule matches anywhere in the name, case-insensitively, because\ndocs.local names are date-prefixed. `token` releases only proven-safe words: `tokeniz*`,\n`design-token(s)` and `Trust Tokens` are stripped first, so `tokenizer-remap.md` passes and\n`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\nas `skipped: credential \u003Cpath>` (a credential directory is one line plus its credential-named\nfiles), and a month group (the `YYYY-MM\u002F` folder plus that month's dated siblings in the same\nfolder) that holds one is **held whole**: no moves into or out of it, no upload unit. It is reported\nonce as `held: contains credentials \u003Cpath>` with its items and credentials listed under it.\n**Content scan (B1).** Every file the plan would move or upload is read (text only, in overlapping 1 MiB\nchunks; a file with a NUL in its first chunk counts as binary and is skipped) for high-confidence secret\nshapes: Supabase `sbp_`, Google `AIza`, GitHub `gh[pousr]_` \u002F `github_pat_`, OpenAI `sk-`, AWS `AKIA`,\nSlack `xox?-`, and PEM private-key headers. A hit holds the whole month group as\n`held: credential-content \u003Cpath>`, listing `content: \u003Cfile> (\u003Cshape>)`. **A matched value is never kept,\nlogged or printed.** The summary adds `content-held=N`.\nCleaning them up is the owner's call.\n\n> **After creating\u002Fediting this skill it must be REGISTERED** (golem-install \u002F symlink into `~\u002F.claude\u002Fskills`) before any agent can invoke it — committed ≠ installed.\n","# \u002Fdrive-filing — filing, archival, and the docs.local lifecycle\n\n> One skill for everything that moves durable artifacts out of `docs.local\u002F` (formerly `drive-usage`,\n> `google-drive-archive`, and the `archive` skill).\n> Drive queries use connected Drive search tools; this skill owns filing.\n>\n> Etan's pain: agents (except researchers) don't use Drive right and **leave artifacts scattered in `docs.local\u002F`**. 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\u002F` is a cache, not a home.**\n\n| Need | Go to |\n|---|---|\n| Which folder, what name | § Brain Drive folder model, § Decision tree, § Naming convention (below) |\n| Put a heavy (>100KB \u002F media \u002F transcript) artifact into Drive, with ledger + brain_digest | § Archive a heavy artifact → [references\u002Farchive-procedure.md](references\u002Farchive-procedure.md) |\n| Keep `docs.local\u002F` legible over time (daily → monthly → Drive) | § docs.local lifecycle |\n| Manifest schema, disk measurement commands, path reconciliation | [references\u002Farchiving-convention.md](references\u002Farchiving-convention.md) |\n\nNot this skill: connected Drive search tools query existing files; `\u002Fgemini-research` does web research with Drive sources.\n\n## Brain Drive folder model\n\nFolder IDs are private deployment values. Resolve them from the environment or private operator\nconfiguration; never copy live Drive IDs into this skill.\n\n| Folder | id | What goes here |\n|--------|----|----|\n| `01_STANDARDS` | `${BRAIN_DRIVE_STANDARDS_FOLDER_ID}` | Canonical specs, conventions, locked schemas, standards docs (durable reference). |\n| `02_GROUNDING` | `${BRAIN_DRIVE_GROUNDING_FOLDER_ID}` | Grounding corpora \u002F reference data agents ground answers on. |\n| `03_RESEARCH` | `${BRAIN_DRIVE_RESEARCH_FOLDER_ID}` | Research **prompts + results**. In-flight → `03_RESEARCH\u002FActive\u002F\u003Ctopic>\u002F` via `${BRAIN_DRIVE_RESEARCH_ACTIVE_FOLDER_ID}`. |\n| `04_INGEST` | `${BRAIN_DRIVE_INGEST_FOLDER_ID}` | Raw inbound to be processed\u002Fdigested (not yet curated). |\n| `06_ARCHIVE` | `${BRAIN_DRIVE_ARCHIVE_FOLDER_ID}` | **Forever** storage of finished heavy artifacts (transcripts, audio\u002Fvideo, big audits\u002Fplans). Target of § Archive a heavy artifact. |\n\n> Folder *semantics* (what each numbered folder means) are confirmed with brainlayer-LEAD (s:57, owns Drive\u002Fbackup). 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.)\n\nLegacy `Brain Drive\u002FResearch\u002F\u003Cproject>\u002F` folders are being moved under 03_RESEARCH\u002FActive; if a prompt isn't found in Active, check the legacy path read-only and report it, never write there.\n\n## Decision tree (where does THIS artifact go?)\n\n1. **A research prompt or its results?** → `03_RESEARCH\u002FActive\u002F\u003Ctopic>\u002F` (e.g. `skills-eval\u002F`). Drive-ground prompts by uploading the real artifacts beside them.\n2. **A finished heavy artifact (>100KB \u002F media \u002F raw transcript \u002F big audit)?** → § Archive a heavy artifact → lands in `06_ARCHIVE\u002F\u003Carea>\u002F\u003Ctopic>\u002F\u003CYYYY-MM-DD>\u002F`, leaves a `_DRIVE-LEDGER.md` pointer in `docs.local\u002F`.\n3. **A canonical standard \u002F spec \u002F locked schema?** → `01_STANDARDS\u002F`.\n4. **Grounding corpus \u002F reference data?** → `02_GROUNDING\u002F`.\n5. **Raw, not-yet-digested inbound?** → `04_INGEST\u002F`.\n6. **Lightweight, session-scoped scratch?** → fine to leave in `docs.local\u002F` — but if anyone else (or future-you) needs it, FILE it per 1–5.\n\n## Naming convention\nNew standalone artifacts: `YYYY-MM-DD-\u003Cproject>-\u003Ctopic>-\u003Ckind>[-by-\u003Cproducer>].\u003Cext>`, lowercase kebab-case. Example: `2026-11-04-voicebar-focus-audit-by-author.md`. Topic must describe the work; `Theo.md`, `Model.md` and `2026-11-04-golems-theo-report.md` fail. Put a person\u002Fmodel attribution in `by-\u003Cproducer>` (exactly one lowercase token), never in the project, topic or kind slots. Kinds: report, prompt, result, transcript, recording, audit, plan, review, frame, image, notes, receipt, manifest, data, archive, index, dashboard, summary, eval, log.\n\nBefore uploading a new standalone artifact, set `GOLEMS_ROOT` to the absolute golems checkout (normally `$HOME\u002FGits\u002Fgolems`) and run `node \"$GOLEMS_ROOT\u002Fscripts\u002Fdrive\u002Flint-name.mjs\" \u003Cbasename>` from any repo; nonzero blocks filing until renamed. Existing files and preserved archive members (including `MANIFEST.json` and frame names) are grandfathered: `--existing` reports issues without blocking or renaming. Research-lifecycle's sequential context\u002FR-number names keep their own contract. Folders retain `\u003Ctopic>-\u003Cdomain>\u002F`; keep local mirror and Drive names identical for 1:1 ledger mapping.\n\n## Verify the ledger after uploads\n\nUse one bullet per file: `- \u003Clocal path> → Brain Drive\u002F\u003Cexact path>\u002F\u003Cname> | bytes=\u003Cinteger> | SHA256=\u003C64 hex> | account=\u003Cexpected-email> | cloud=pending`. SHA256 is mandatory: missing or invalid hashes are malformed rows. Bare `Brain Drive\u002F` paths require `account=\u003Cexpected-email>`; mount paths derive it from `GoogleDrive-\u003Caccount>` (an explicit account, if provided, must agree). Record hashes from the source manifest; metadata such as Drive ID\u002FURL and manifest pointer may follow as extra pipe fields. Absolute Drive-for-Desktop paths containing `\u002FMy Drive\u002FBrain Drive\u002F` are also accepted. Old Markdown tables remain readable history; add a machine-readable pending row for verification.\n\n```bash\nGOLEMS_ROOT=\"${GOLEMS_ROOT:-$HOME\u002FGits\u002Fgolems}\"\nnode \"$GOLEMS_ROOT\u002Fscripts\u002Fdrive\u002Fverify-ledger.mjs\" \u003Cledger.md>            # dry-run; no ledger write\nnode \"$GOLEMS_ROOT\u002Fscripts\u002Fdrive\u002Fverify-ledger.mjs\" \u003Cledger.md> --apply    # only verified rows change\n```\n\nRun after each upload batch from any repo using the absolute `GOLEMS_ROOT`. The token has full Drive scope; the verifier only reads, using GET requests through the existing outside-repo OAuth guard. It checks the recorded account for every path, resolves every exact path (duplicates fail), compares bytes and the mandatory recorded SHA-256 (downloads remote bytes if Drive omits the checksum), and alone writes `cloud=verified \u003CISO timestamp>`. A local mount\u002Fcache is not sync proof. Missing, malformed, mismatched or unauthenticated rows remain pending with a reason on stdout; exit 1 means some rows remain, exit 2 is usage\u002Fledger failure. Names in old rows are report-only. `--apply` is idempotent and never uploads or deletes. Deletion still requires the full preservation and authorization gates below.\n\n## Machine hygiene: no ad-hoc home folders\n\nApplies to both Macs. Each kind of artifact has one home:\n\n| Kind | Lives in | Never in |\n|---|---|---|\n| Rerunnable source, harnesses, test kits, eval scripts, fixtures | A repo, committed; generated fixtures in its `docs.local\u002F` or `fixtures\u002F` with a regeneration recipe | `~\u002F`, `~\u002FDesktop`, `~\u002Ftemp`, ad-hoc repo copies |\n| Live lane reports, receipts, logs | Owning repo's `docs.local\u002F\u003Clane>\u002F` on the machine that ran it | `~\u002Fm1-*`, `~\u002Fvlv*` \u002F `~\u002F.vl*`, `~\u002Fvl-harness*` copies, `~\u002FBrainLayer-*`, Desktop handoff folders |\n| Finished heavy artifacts, including benchmark runs | § Decision tree → § Archive a heavy artifact; leave `_DRIVE-LEDGER.md` | Local disk “for later” |\n| Personal or client documents Etan keeps | iCloud Drive `Archive\u002F\u003CYYYY>\u002F\u003CYYYY-MM-DD>-\u003Ctopic>\u002F` | Desktop root |\n| Models and caches (Whisper, HF, npm\u002Fbun) | Tool's own cache directory, one copy recorded in app config | `~\u002FDocuments`, duplicate caches |\n| Worktrees | `~\u002F.t3\u002Fworktrees\u002F` or `\u003Crepo>\u002F.worktrees\u002F`; retire through the lifecycle contract | Other locations or ad-hoc repo copies |\n\n**Naming and manifests.** Local scratch\u002Flane folder names use\n`YYYY-MM-DD-\u003Ctopic>` in lowercase kebab-case, without machine prefixes (`m1-*`)\nor retired names (Ralph). Drive placement follows the existing layout above\nand the rollup targets below, including their `\u003CYYYY-MM>` units; this local\nfolder rule does not rename Drive archive units.\n\nEvery archive unit carries `MANIFEST.json` with:\n\n- Source path and host.\n- Byte count and SHA-256 for each file.\n- Producer (lead thread or plan).\n- Restore command.\n\nSchema and measurement commands: [references\u002Farchiving-convention.md](references\u002Farchiving-convention.md).\n\n**Five rules:**\n\n1. Agents create no ad-hoc folders in `~\u002F` or `~\u002FDesktop`. Use sanctioned T3\n   scratch or repo `docs.local\u002F` scratch under the\n   [workspace lifecycle contract](..\u002F_shared\u002Flifecycle\u002FCONTRACT.md).\n2. Delete a local archive copy only after the Drive or iCloud copy exists,\n   manifest hashes match verified remote bytes, and a one-file restore drill\n   succeeds. A matching name or folder listing is insufficient. Keep the ledger\n   and preservation proof outside any retiring scope; follow the archive\n   procedure and lifecycle contract for their additional verification gates.\n3. Measure disk recovery with `diskutil` container free space and APFS allocation.\n   Finder free space includes purgeable space; logical `du` sums do not prove\n   physical recovery. Record the host and before\u002Fafter measurements.\n4. Leads reap their own lane leftovers at settle, after harvesting and releasing\n   consumers under the lifecycle contract. Unowned leftovers go to the\n   local-files lead's per-Mac ledger; never silently delete them.\n5. Deleting data remains a one-way door. Reviewed empty directories may be\n   removed with `rmdir`. Nonempty data needs an identified owner, verified\n   preservation and Etan's explicit instruction for that deletion, or a door he\n   already opened for that work (quote his authorization). A lead's own call\n   is insufficient; archive proof alone grants no deletion authority.\n\n**Enforcement follow-up (not implemented by this section):** add a report-only\ninventory check for new agent-created top-level `~\u002F` and `~\u002FDesktop` directories\n(uid 501, recent birthtime, patterns such as `m1-*`, `vlv*` \u002F `.vl*`,\n`vl-harness*` copies and `BrainLayer-*`). These are investigation signals,\nnot ownership or deletion proof. The local-files lead must register and link the\nM4 Max and M1 Pro ledgers here once their canonical locations are confirmed;\nuntil then, report unowned leftovers to that lead. Never infer a ledger path or\nadd a destructive home-wide reaper.\n\n## The discipline (the one rule)\n**Before you finish a task that produced a durable artifact: did you FILE it in its home, or leave it scattered in `docs.local\u002F`?** 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.\"\n\n## Quick reference (MCP)\n- Upload: `mcp__google-drive__uploadFile(localPath, parentFolderId=\u003Cresolved private ID>)`. For text, pass `mimeType` from the extension (`.md` → `text\u002Fmarkdown`, `.txt` → `text\u002Fplain`, `.json` → `application\u002Fjson`); a `.md` starting with `\u003C!--` otherwise lands as `text\u002Fhtml`.\n- New topic folder: `mcp__google-drive__createFolder(name, parent=\u003Cresolved private ID>)`.\n- Find: `mcp__google-drive__search(query=\"'\u003CRESOLVED_PRIVATE_PARENT_ID>' in parents\", rawQuery=true)`.\n- Heavy\u002Fforever: § Archive a heavy artifact.\n\n## Research grounding folder contract\n\nOne folder per research holds only the curated documents that research needs as a\nprovenance record. Agents prepare ONE folder holding exactly the curated grounding\nfiles with unique names. The hand-off names that folder and the files to attach;\nthe owner attaches them when he starts the run with Drive source off by default. A folder is not a Deep Research access route:\nits connected Drive workspace provides title SEARCH only, not folder listing or\nopening Docs by link. Native Google Docs do not solve this limitation. If Drive\nis explicitly used, name each document by its exact title, unique across the whole\nDrive with no duplicate or look-alike titles; expect search to miss documents.\nBefore the real run, one cheap Deep Research probe asks only for each named\nfile's first line, checked against the author key. Missing or mismatched lines\nblock the real run; retain the admission table\u002Fkey for the real run too.\n\n- **Where:** `Brain Drive\u002F03_RESEARCH\u002FActive\u002F\u003Ctopic>\u002FR{NN}-grounding\u002F` (via `${BRAIN_DRIVE_RESEARCH_ACTIVE_FOLDER_ID}`), beside that research's prompt and results.\n- **Name:** `R{NN}-grounding` for the folder; files keep their `\u002Fresearch-lifecycle` context numbers. For the optional Drive route, titles must be unique across the whole Drive, not only inside this folder (include project, research number and topic to disambiguate).\n- **Manifest:** `00-GROUNDING-MANIFEST.md` in the folder: one row per file with `title | why it is here | drive_file_id | revision_id`. Native Google Docs have no stable bytes, so identity is the Drive file id plus revision id, never a byte hash. Serialize each row as exactly `title|drive_file_id|revision_id` (the why stays out of the hash), UTF-8, LF line ends, rows sorted by `drive_file_id`; `manifest_sha256` is the sha256 of those lines joined by LF. The prompt names exactly the manifest's files and says to use ONLY them.\n- **After harvest:** the folder is the research's record. Keep it as that record, or consolidate lasting findings into the topic's `context\u002F` files per `\u002Fresearch-lifecycle`, so Drive stays in good context. Either way the folder link, the manifest and `manifest_sha256` stay in the harvest record so provenance keeps its identity. Archiving the folder (§ Archive a heavy artifact) is optional, not required.\n\n## Archive a heavy artifact\n\nFull procedure: [references\u002Farchive-procedure.md](references\u002Farchive-procedure.md) (was\n`\u002Fgoogle-drive-archive`). Fire it on \"save this to Drive\", \"archive this\", \"put this in the\narchive\", a >100KB write to `docs.local\u002F{research,audits,plans}\u002F`, a post-`brain_digest` raw file,\nor a `\u002Ftmp` cleanup that may hold forever-knowledge. The eight steps, in short:\n\n1. Ephemeral or forever? Only originals go up; list regeneratable derivatives and how to rebuild them.\n   Not archiving a file grants no deletion authority; apply § Machine hygiene rule 5.\n2. Resolve `Brain Drive\u002F06_ARCHIVE\u002F\u003Carea>\u002F\u003Ctopic>\u002F\u003CYYYY-MM-DD>[-\u003Ctag>]\u002F` (`research`, `audits`, `plans`,\n   `repos`, `voice`); `mcp__google-drive__search` for precedent first.\n3. `createFolder` per level, keeping every ID. 4. `uploadFile`; keep `id`, `link`, `size`.\n5. `brain_digest` every text file (a background agent for >150KB).\n6. Write `docs.local\u002F\u003Carea>\u002F\u003Ctopic>\u002F_DRIVE-LEDGER.md` (never committed) with pending rows, then run § Verify the ledger after uploads. Never mark rows verified by hand.\n7. Write the ledger, then apply § Machine hygiene rules 2 and 5 as the single deletion gate:\n   manifest hashes must match verified archive bytes, a one-file restore test must pass,\n   and Etan must authorize deletion (or have already opened that door for this work, quoted).\n   A `listFolder` result and ledger alone never authorize deletion.\n8. `brain_store` unusual archive decisions only.\n\nNever: commit a 1.5GB transcript, `rm -rf \u002Ftmp\u002F…` before the forever check, digest without\nuploading, upload without a ledger row, re-upload what Drive already has.\n\n## docs.local lifecycle\n\n### Monthly qa-video archive\n\nJob `monthly-qa-video-drive-archive`: first day of each month, Asia\u002FJerusalem, ONLY on the skill-creator lead's scheduling child (seat\u002Frole resolution: \u002Fagent-routing). The lead creates it after merge. Exact scheduled command: `node \"$HOME\u002FGits\u002Fgolems\u002Fscripts\u002Fdrive\u002Farchive-qa-video.mjs\" --apply`. Never add pruning to the scheduled command.\n\nConfigure `~\u002F.config\u002Fgolems\u002Fqa-video-archive.json` outside repos: `{\"account\":\"\u003Cexpected-email>\",\"repos\":[{\"path\":\"\u003Cabsolute-repo-root>\",\"owner\":\"\u003Cproducer>\",\"harvestedRuns\":[\"\u003Ccompleted-run-name>\"]}]}`. The scheduled job reports a missing config path and these required fields on stderr (exit 2). Before activation, create the config and run a configured `--dry-run` with eligible runs. Owners register only harvested runs; unknown ownership\u002Fharvest state stays held. Default command (or `--dry-run`) reports counts\u002Fbytes without writes or Drive calls. For unconfigured read-only inventory, repeat `--repo \u003Cabsolute-repo-root>` with `--dry-run`; those units remain held until owners register them. `--apply` uploads preserved members plus MANIFEST.json to `Brain Drive\u002F06_ARCHIVE\u002Fdocs-local\u002F\u003Crepo>\u002Fqa-video\u002F\u003CYYYY-MM>\u002F\u003Crun>\u002F`, writes pending member rows, restores one image (or a member if no image), checks its bytes\u002Fhash, then runs the verifier. Existing members and MANIFEST.json keep their names. No derivative is omitted.\n\nOld means newest member mtime before the first day of the preceding calendar month (Asia\u002FJerusalem month); current\u002Fprevious months stay local. Producer holds (`active`, `pinned`, `hold`, `latest`, `partial`, `unharvested`), credentials\u002Fcontent scans, symlinks, unknown ownership and regenerable directories hold the whole run. Manifests and the ledger stay outside the run. Re-runs reuse matching remote files\u002Frows; conflicts stop. The existing outside-repo OAuth guard provides authentication; never call `op`. The token has full scope; image fetch uses only GETs.\n\nLocal pruning is optional, never implied by archive success: only `--apply --prune-verified`, with ownership and explicit deletion authority under Machine hygiene rule 5, may remove unchanged members after every row is verified, every remote hash matches and a restore drill passes. It preserves the ledger\u002Fmanifests; logical bytes are not physical disk recovery. An existing `.archive-lock` holds only that repo; other repos continue. The job names the lock on stderr and exits nonzero. Confirm no archive process is active, then clear only the empty lock directory with `rmdir` and rerun; never automatically delete it. Pending counts include each remaining ledger row once across runs. Pruning removes empty nested directories; any newly nonempty directories remain intact without a cleanup error.\n\nFor a missing cited image, use `node \"$HOME\u002FGits\u002Fgolems\u002Fscripts\u002Fdrive\u002Ffetch-qa-image.mjs\" \u003Cledger.md> \u003Coriginal-image-path>`; it restores exact verified ledger bytes into `~\u002F.cache\u002Fqa-video\u002F`, reports the Drive path\u002FID\u002FURL\u002Fhash, and never changes Drive or the ledger. Open that returned image before making a visual claim; ambiguity, missing bytes or hash\u002Fauth failure stays NOT DETERMINED.\n\n`docs.local\u002F` stays legible, \"not just walls of MD files\": daily items (`YYYY-MM-DD-*`) roll up into\nmonthly folders (`YYYY-MM\u002F`), and months older than N go to Brain Drive through § Archive a heavy\nartifact, with a `_DRIVE-LEDGER.md` pointer left behind. `\u002Ffleet-wrap` is to run it at sprint close\n(skillcreator owns that call site; golems owns this skill).\n\n```bash\nnode \"$GOLEMS_ROOT\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup.mjs\" --repo \u003Cpath> --keep-months N            # dry-run (default): report only\nnode \"$GOLEMS_ROOT\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup.mjs\" --repo \u003Cpath> --keep-months N --json     # the full plan\nnode \"$GOLEMS_ROOT\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup.mjs\" --repo \u003Cpath> --keep-months N --apply    # month moves + plan file\n```\n\nThe last stdout line is the one-line summary `\u002Ffleet-wrap` records: `drive-filing rollup: mode=… files=…\nbytes=… · monthly-moves=… · to-drive months=… files=… bytes=… · mtime-units=… bytes=… · held=… credentials-skipped=…`.\n**Dating (v2):** an item's month is the first `YYYY-MM-DD` anywhere in its own name, else the first\n`YYYY-MM` (`examplechannel-2026-09-19-015034\u002F`, `probe-2026-03\u002F`); an exact `YYYY-MM\u002F` folder is the month itself.\nAn undated folder with a dated name somewhere below it is an *area* and is descended. An undated folder\nwith none is **one mtime unit** (the highest such folder), dated by the newest file inside; it joins the\nupload plan once old but is **never moved**; its planned Drive target keeps its own path\n(`…\u002F\u003Crepo>\u002F\u003Carea>\u002F\u003CunitName>`, no month segment: it mirrors the unmoved local path), so no two units share a target.\nAt upload, an mtime unit gets a date level: `…\u002F\u003Crepo>\u002F\u003Carea>\u002F\u003CunitName>\u002F\u003CYYYY-MM-DD>\u002F`,\ndated by its newest file (the date the plan used), recorded in the ledger and its `MANIFEST.json`. `--json` lists the 5 largest under\n`mtimeUnits`. A unit with no files or only empty ones is counted (`empty-units=`) and never planned.\nUndated files are counted and left alone. **Regenerable dirs** (`__pycache__`, `node_modules`, `.venv`,\n`venv`, `.pytest_cache`, `.mypy_cache`, `.ruff_cache`, `.build`, `.next`, `.turbo`, `.probe`) are never\nplanned, never an mtime unit and never deleted; each is reported once as `skipped: regenerable \u003Cpath>\u002F`\nwith its size, and the summary adds `regenerable-skipped=N bytes=B`. A credential inside one still wins\n(the dir is held). A month rolls up once it is over; months more than N back form\nthe upload plan, one unit per folder, targeting `Brain Drive\u002F06_ARCHIVE\u002Fdocs-local\u002F\u003Crepo>\u002F\u003Carea>\u002F\u003CYYYY-MM>`\n(the one named exception to the `YYYY-MM-DD` date level: a rollup unit is a month).\n`--apply` moves items into their month folders (never overwriting; a clash is reported as `conflict:`)\nand first saves immutable `docs.local\u002F_drive-filing\u002Frollup-plan-\u003Cdate>-\u003Cuuid>.json` intent.\nA separate `rollup-progress-\u003Cdate>-\u003Cuuid>.json` records source\u002Fdestination locations (both during a move).\nReruns reconcile file identities before publishing `rollup-handoff-\u003Cdate>-\u003Cuuid>.json` (`planFile` in `--json`);\nconflicting or missing files stop with a progress path. Earlier plans stay intact. **The script never uploads or deletes.**\nNewly held sources remain in place as `not-moved` with a reason. Safety checks run before the first move.\nAfter the handoff is saved, completion markers keep settled intents out of future reads. With no moves or\nunfinished intents, `--apply` writes nothing and prints the current inventory (`--json` has no `planFile`).\nHuman output names a saved handoff before its final summary. Receipts store absolute paths: resume at the same repo path.\nUpload exactly the files in that handoff through the [archive procedure](references\u002Farchive-procedure.md)\n(ledger + `brain_digest`), and nothing that is not in it. The plan is **not** a manifest (it lists paths\nand sizes, with no hashes, host, producer or restore command): until `rollup.mjs` emits one, write each\nunit's `MANIFEST.json` by hand before its upload and upload it with the unit.\n\n**Credentials never move.** Nothing whose name contains `credential`, `secret`, `token` or `.env` (`.env*`,\n`deploy.env`, `.ENV.prod`, `.envrc`) or has `env` as a word (`prod-env.json`, `app-env.yml`,\n`staging_env`), or ends in `auth.json`, `.pem` or `.key` — file **or directory** — and nothing under a\n`codexhome`\u002F`codex-home*`, `claudehome`\u002F`claude-home*`, `.codex`, `.claude` or `*-HOME*` directory or a\nbrowser profile (a dir holding `Local State`, `Cookies`, `Login Data` or `Web Data`), is uploaded,\nmoved or deleted. Every name rule matches anywhere in the name, case-insensitively, because\ndocs.local names are date-prefixed. `token` releases only proven-safe words: `tokeniz*`,\n`design-token(s)` and `Trust Tokens` are stripped first, so `tokenizer-remap.md` passes and\n`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\nas `skipped: credential \u003Cpath>` (a credential directory is one line plus its credential-named\nfiles), and a month group (the `YYYY-MM\u002F` folder plus that month's dated siblings in the same\nfolder) that holds one is **held whole**: no moves into or out of it, no upload unit. It is reported\nonce as `held: contains credentials \u003Cpath>` with its items and credentials listed under it.\n**Content scan (B1).** Every file the plan would move or upload is read (text only, in overlapping 1 MiB\nchunks; a file with a NUL in its first chunk counts as binary and is skipped) for high-confidence secret\nshapes: Supabase `sbp_`, Google `AIza`, GitHub `gh[pousr]_` \u002F `github_pat_`, OpenAI `sk-`, AWS `AKIA`,\nSlack `xox?-`, and PEM private-key headers. A hit holds the whole month group as\n`held: credential-content \u003Cpath>`, listing `content: \u003Cfile> (\u003Cshape>)`. **A matched value is never kept,\nlogged or printed.** The summary adds `content-held=N`.\nCleaning them up is the owner's call.\n\n> **After creating\u002Fediting this skill it must be REGISTERED** (golem-install \u002F symlink into `~\u002F.claude\u002Fskills`) before any agent can invoke it — committed ≠ installed.\n",{"name":5,"description":7},"master","954a2459b9c3d1eb731f17464457cd4b4718be81","skills\u002Fgolem-powers\u002Fdrive-filing","https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems","https:\u002F\u002Fgithub.com\u002FEtanHey","etanheyman.com","2026-11-15 03:05:08",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add EtanHey\u002Fgolems --skill drive-filing",{"tool":37,"command":38},"bunx","bunx skills add EtanHey\u002Fgolems --skill drive-filing",{"tool":40,"command":41},"pnpm","pnpm dlx skills add EtanHey\u002Fgolems --skill drive-filing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002FSKILL.md",true,[45,51,55,59,65,69,73,77,81],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"evals\u002Fevals.json","REFERENCE","参考文档",12846,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fevals\u002Fevals.json",{"path":52,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Farchive-procedure.md",13762,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Freferences\u002Farchive-procedure.md",{"path":56,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Farchiving-convention.md",3504,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Freferences\u002Farchiving-convention.md",{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"scripts\u002Frollup-recovery.test.mjs","SCRIPT","脚本",8060,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup-recovery.test.mjs",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"scripts\u002Frollup-test-parts\u002Fcases01.mjs",26512,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup-test-parts\u002Fcases01.mjs",{"path":70,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":71,"sourceHtmlUrl":72},"scripts\u002Frollup-test-parts\u002Fcases02.mjs",10643,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup-test-parts\u002Fcases02.mjs",{"path":74,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":75,"sourceHtmlUrl":76},"scripts\u002Frollup-test-parts\u002Fcommon.mjs",1992,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup-test-parts\u002Fcommon.mjs",{"path":78,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":79,"sourceHtmlUrl":80},"scripts\u002Frollup.mjs",26840,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup.mjs",{"path":82,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Frollup.test.mjs",147,"https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fdrive-filing\u002Fscripts\u002Frollup.test.mjs",[86,93,100,107,114,121],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7C53JEF6A6SS20Q0D2YJYM8","yash","Push dependency bugs upstream. Triggers: dependency bug, workaround, monkey-patch, fork\u002Ffix. NOT app bugs.","https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fyash\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7C53EPMNSZKHK47VY7WQDP0","whats-new","Diff Claude\u002FCodex\u002FCursor\u002FWispr\u002Fagy changelogs vs local setup. Triggers: whats new, changelog, version bump.","https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fwhats-new\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M7C53C4TVQ9G7AB3X57DACPB","weave","Orchestrator convergence: mine JSONLs, cite findings, route actions. Triggers: weave, run weave.","https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Fweave\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":19},"01M7C5342EDDN7YH53KKW511V2","unslop","Cut AI tells while keeping every receipt, number, path, and hedge intact. Triggers: unslop, cut the slop, wall of text, too verbose, rambly, make this readable. NOT for delivery cadence (see i-have-adhd), channel choice, or artifact length governance.","https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Funslop\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":19},"01M7C52M0CTDW5DDP4452FJV0G","tmp-block","Guard denying durable writes to \u002Ftmp, \u002Fprivate\u002Ftmp, \u002Fvar\u002Ffolders, $TMPDIR; enforces \u003Crepo>\u002F.worktrees\u002F\u003Cname>. Triggers: tmp guard, TMP-BLOCK deny, WORKTREE-CONVENTION deny, bypass ledger. NOT for storage policy.","https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Ftmp-block\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":19},"01M7C52HN4Q9E1Z74Z11K23E2H","t3-visuals","Show\u002Fvisualize\u002Fchart\u002Fdiagram\u002Fcompare\u002Fstatus board in T3 with compact interactive HTML. Not standalone dashboards.","https:\u002F\u002Fgithub.com\u002FEtanHey\u002Fgolems\u002Fblob\u002Fmaster\u002Fskills\u002Fgolem-powers\u002Ft3-visuals\u002FSKILL.md",[],[]]