unity-forbidden-operations
Unity: Forbidden Operations
Section titled “Unity: Forbidden Operations”Always-loaded hard bans on Unity operations that destroy productivity or have no legitimate automation use case.
⛔ NEVER terminate, quit, or restart the Unity Editor
Section titled “⛔ NEVER terminate, quit, or restart the Unity Editor”The Unity Editor process is user-owned. NEVER terminate, quit, restart, or relaunch it on your own initiative — the only exception is an explicit in-session user order (“I think Unity is stuck” is not one). Forbidden: kill/pkill/killall on a Unity process, t1k unity menu "File/Quit", the CLI’s close subcommand, or any wrapper.
Enforcement: unity-process-guard.cjs (PreToolUse, theonekit-core) prompts on kill-family commands and blocks forbidden menu paths. The facade enforces the same list itself: unityCli.forbiddenMenus and unityCli.evalDeny in t1k-config-unity.json make t1k unity menu / eval exit 11 before anything reaches the Editor.
⛔ NEVER call Assets/Reimport All
Section titled “⛔ NEVER call Assets/Reimport All”Do NOT invoke without an explicit in-session user order: t1k unity menu "Assets/Reimport All" (exit 11), any “Reimport All” path, AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate) through eval, or a project-wide-reimport wrapper — 30+ min, cannot be cancelled. Use instead: t1k unity recompile to recompile · rename Library/EntityScenes/ aside (Editor closed) + Play mode for SubScenes · rm -rf Library/BurstCache Library/Bee/artifacts Library/ScriptAssemblies + t1k unity recompile for stale Burst · t1k unity eval with AssetDatabase.ImportAsset(path) for one asset · ask the user for “everything looks broken”.
A clean status with a stale assembly is not clean. A .cs with no .meta, or an external change the Editor has not noticed, leaves console at 0 errors on a recompile that never ran. t1k unity recompile refreshes first; if a type is still missing, check the assembly’s .rsp (references/incident-history.md in t1k-unity-editor-cli).
⛔ NEVER drive the Editor around the lock, and NEVER blind-retry a timed-out mutating call
Section titled “⛔ NEVER drive the Editor around the lock, and NEVER blind-retry a timed-out mutating call”The Editor is single-threaded and shared. Mutating t1k unity verbs hold Temp/t1k-unity.lock; exit 10 means a sibling session is mid-run: wait, never bypass. A timed-out call may have executed anyway — check state (console, file mtimes) first; never blind-retry. Never edit under Assets/ while a test run or Play session is live. Mutex obligations: t1k-unity-editor-cli SKILL.md § “Editor mutex”.
Diagnostics
Section titled “Diagnostics”An exit 7 or 14 is not an Editor problem until pgrep and the log say so · a mass CS0246 cascade is usually a package AUTH failure, not code · the Editor binds to the project by working directory, so a result is trustworthy once t1k unity instance current names the project root you mean. Full detail: docs/unity-forbidden-operations.md. Related: ai-velocity-batch-compile-unity.md.