mit einem Klick
spaces-architecture
// Use when working on massCode spaces such as code, notes, math, or tools, especially when changing their state, behavior, synchronization, or spaces IPC channels.
// Use when working on massCode spaces such as code, notes, math, or tools, especially when changing their state, behavior, synchronization, or spaces IPC channels.
Use when working in massCode and you need repo-wide architecture rules, naming conventions, decomposition boundaries, or guidance on which massCode skill to load next.
Use when adding or updating massCode documentation, documenting a new feature, changing docs website pages, adding docs assets, updating the VitePress sidebar, or adding README feature mentions.
Use when working with massCode issues, branches, commits, pull requests, or merge preparation in GitHub.
Use when defining or reviewing massCode renderer types that come from generated API clients or DTOs, especially when deciding whether to reuse existing API shapes, derive narrower local types, or introduce a UI-only model.
Use when following massCode repo workflow rules, especially for scoped lint and test commands, or when changes require required follow-up commands like code generation or locale sync.
Use when changing massCode API routes, DTOs, IPC handlers, Electron bridges, or any renderer-to-main communication and storage-access boundaries.
| name | spaces-architecture |
| description | Use when working on massCode spaces such as code, notes, math, or tools, especially when changing their state, behavior, synchronization, or spaces IPC channels. |
massCode использует систему Spaces для разделения функциональных областей. Это не просто UI tabs: у каждого space есть собственное состояние, свои правила обновления и свой способ синхронизации с данными в vault.
code — snippets, folders, tagsnotes — notes, folders, tags, markdown-based flowsmath — calculation sheets и состояние math notebooktools — developer utilitiesОсновные определения живут в src/renderer/spaceDefinitions.ts.
__spaces__/{spaceId}/.state.yaml внутри vault.src/main/storage/providers/markdown/runtime/spaces.tssrc/main/storage/providers/markdown/runtime/spaceState.ts__spaces__/ — служебная часть vault для состояния spaces.state.json.pendingStateWriteByPath и flush-on-exit поведением.src/main/ipc/handlers/spaces.ts.spaces:math:readspaces:math:writespaces:* flow, он должен работать через общую модель состояния spaces, а не в обход неё.system:storage-synced обновляет активное пространство через getActiveSpaceId().code → refresh folders + snippetsnotes → refresh notes + note foldersmath → reloadFromDisk() через useMathNotebook()tools → no-opmarkPersistedStorageMutation(), чтобы не создавать sync loops.markPersistedStorageMutation().