Done — I set this up in a fresh worktree and drafted the project plan.
- New worktree:
/Users/tarunsachdeva/code/traces-worktrees/feat-namespace-settings
- Branch:
feat/namespace-settings
- New project doc:
docs/projects/namespace-settings.md
I recommend using a dedicated namespaceSettings table (not adding config columns directly to namespaces), and handling sensitive values like OPENAI_API_KEY in a separate namespaceSecrets table (or secret-manager reference).
Why this is the safer fit for this repo:
api/convex/namespaces.ts:14 serves namespace profile data from namespaces on public paths.
api/convex/internal/namespaces.ts:9 returns full namespace docs and is used broadly in auth/session flows.
- Trace default visibility is currently hardcoded in
api/convex/services/traces.ts:125 and api/convex/services/traces.ts:166.
- Trace summary LLM key is currently global env only in
api/convex/utils/ai.ts:60.
So: keep namespaces as identity/profile, move configurable behavior to settings, and isolate secrets from general namespace reads.
If you want, I can now start Part 2 in this worktree and scaffold the schema + internal functions.