Files
waggle-os/docs/oss/adr/0011-separate-data-directory.md
shumeiko.it e0836388f1 docs: record the separate data directory (ADR-0011)
Add ADR-0011: the community edition defaults to ~/.waggle-community, a
temporary name that follows the product-name decision (Q8), and copies
nothing from the commercial ~/.waggle. It supersedes point 4 of
ADR-0009 and closes the pending "separate data directory" decision.

Update the install guide, troubleshooting, capabilities, memory,
architecture, the Windows build notes, THREAT_MODEL, README,
.env.example and the changelog. Log UF-068 (Open): marketplace skills
and plugins ignore a custom data directory.
2026-11-04 10:32:08 +01:00

48 lines
2.5 KiB
Markdown

# ADR-0011: The community edition has its own data directory
- Status: Accepted
- Date: 2026-11-04
- Supersedes: point 4 of ADR-0009
## Context
The community edition was made from the commercial Waggle and kept its default data directory,
`~/.waggle` (`%USERPROFILE%\.waggle` on Windows). On a computer with both editions, the two
would open the same `config.json`, vault, `waggle.db`, marketplace catalog, skills and logs. Their
schemas and features have diverged: the community edition ignores the commercial keys in
`config.json` (ADR-0001) and the commercial `.mind` memory files (ADR-0007), and the commercial
edition does not know the mem0 store. Sharing one directory risks one edition changing data the
other relies on.
## Decision
1. **The default data directory is `~/.waggle-community`** (`%USERPROFILE%\.waggle-community` on
Windows) for the sidecar, the CLI, the marketplace, the desktop shell and the server
installer. The project owner chose this on 2026-11-04.
2. **`WAGGLE_DATA_DIR` still overrides the default** wherever it did before.
3. **Nothing is migrated.** The community edition does not read, copy or move anything from
`~/.waggle`. The owner explicitly does not want a migration: the product is still in
development and nobody has data to bring over.
4. **The name is temporary.** The final name follows the product-name decision (Q8). It is defined
once per runtime so that the rename is one change in each:
- TypeScript: `DEFAULT_DATA_DIR_NAME` and `DEFAULT_DATA_DIR_LABEL` in `@waggle/shared`, with
`defaultDataDir()` in `@waggle/core` for Node code;
- the Tauri shell: `DEFAULT_DATA_DIR_NAME` in `app/src-tauri/src/lib.rs`;
- the server installer, which uses only Node's built-in modules: `DATA_DIR_NAME` in
`packages/launcher/src/platform.ts`;
- the marketplace, which installs on its own without the workspace packages:
`DATA_DIR_NAME` in `packages/marketplace/src/data-dir.ts`.
`packages/shared/tests/data-dir.test.ts` fails when these copies differ. The CLI help text,
which loads no dependency, spells the path out and `packages/cli/tests/cli-runtime.test.ts`
checks it.
## Consequences
- A user who ran an earlier build of the community edition finds an empty data directory and
sets Waggle up again.
- The commercial keys stay untouched in `config.json` (ADR-0001), which still matters when a user
points `WAGGLE_DATA_DIR` at `~/.waggle`.
- The marketplace security scan flags skills that reference the skills folder of either
directory.