Problem
claude-smart currently has a partial boundary between Reflexio setup state and claude-smart runtime state:
- Runtime services already load
~/.claude-smart/.env through REFLEXIO_ENV_FILE so a shared OSS Reflexio ~/.reflexio/.env cannot leak into claude-smart backend startup.
- The Python/Bash runtime path treats
~/.claude-smart/.env as the claude-smart runtime config file.
- Some setup surfaces still write claude-smart-specific keys into
~/.reflexio/.env, which makes the conceptual ownership boundary muddy and creates room for future host/config drift.
This is related to, but broader than, PR #99. PR #99 should stay focused on Windows/OpenCode first-try install behavior.
Current leaks to clean up
bin/claude-smart.js: npm installer mirrors local defaults into both ~/.reflexio/.env and ~/.claude-smart/.env, including CLAUDE_SMART_HOST, CLAUDE_SMART_USE_LOCAL_CLI, CLAUDE_SMART_USE_LOCAL_EMBEDDING, and CLAUDE_SMART_READ_ONLY.
scripts/setup-claude-smart.sh: interactive setup writes CLAUDE_SMART_READ_ONLY and local CLAUDE_SMART_* defaults into ~/.reflexio/.env.
plugin/dashboard/lib/config-file.ts and the dashboard configure page read/write ~/.reflexio/.env for claude-smart runtime flags.
- README/Troubleshooting still describe claude-smart runtime flags under
~/.reflexio/.env in places.
Desired boundary
~/.reflexio/.env: Reflexio setup/connection state only, for example REFLEXIO_URL, REFLEXIO_API_KEY, and REFLEXIO_USER_ID.
~/.claude-smart/.env: claude-smart runtime/host/provider state, for example CLAUDE_SMART_HOST, CLAUDE_SMART_USE_LOCAL_CLI, CLAUDE_SMART_USE_LOCAL_EMBEDDING, CLAUDE_SMART_READ_ONLY, CLAUDE_SMART_OPENCODE_PATH, CLAUDE_SMART_CLI_PATH, and related runtime knobs.
Acceptance criteria
- Installers no longer generate host-specific
CLAUDE_SMART_* runtime keys in ~/.reflexio/.env.
- Setup/dashboard/docs all agree on which file owns each key.
- Legacy installs with
CLAUDE_SMART_READ_ONLY=1 or other claude-smart keys in ~/.reflexio/.env are migrated or respected without silently changing behavior.
- Backend/dashboard startup continues to read the intended runtime config from
~/.claude-smart/.env.
- Tests cover local mode, managed mode, read-only mode, dashboard config writes, and at least one legacy migration case.
Notes
Do this separately from PR #99 to avoid expanding a Windows/OpenCode compatibility PR into cross-host setup/dashboard semantics.
Problem
claude-smart currently has a partial boundary between Reflexio setup state and claude-smart runtime state:
~/.claude-smart/.envthroughREFLEXIO_ENV_FILEso a shared OSS Reflexio~/.reflexio/.envcannot leak into claude-smart backend startup.~/.claude-smart/.envas the claude-smart runtime config file.~/.reflexio/.env, which makes the conceptual ownership boundary muddy and creates room for future host/config drift.This is related to, but broader than, PR #99. PR #99 should stay focused on Windows/OpenCode first-try install behavior.
Current leaks to clean up
bin/claude-smart.js: npm installer mirrors local defaults into both~/.reflexio/.envand~/.claude-smart/.env, includingCLAUDE_SMART_HOST,CLAUDE_SMART_USE_LOCAL_CLI,CLAUDE_SMART_USE_LOCAL_EMBEDDING, andCLAUDE_SMART_READ_ONLY.scripts/setup-claude-smart.sh: interactive setup writesCLAUDE_SMART_READ_ONLYand localCLAUDE_SMART_*defaults into~/.reflexio/.env.plugin/dashboard/lib/config-file.tsand the dashboard configure page read/write~/.reflexio/.envfor claude-smart runtime flags.~/.reflexio/.envin places.Desired boundary
~/.reflexio/.env: Reflexio setup/connection state only, for exampleREFLEXIO_URL,REFLEXIO_API_KEY, andREFLEXIO_USER_ID.~/.claude-smart/.env: claude-smart runtime/host/provider state, for exampleCLAUDE_SMART_HOST,CLAUDE_SMART_USE_LOCAL_CLI,CLAUDE_SMART_USE_LOCAL_EMBEDDING,CLAUDE_SMART_READ_ONLY,CLAUDE_SMART_OPENCODE_PATH,CLAUDE_SMART_CLI_PATH, and related runtime knobs.Acceptance criteria
CLAUDE_SMART_*runtime keys in~/.reflexio/.env.CLAUDE_SMART_READ_ONLY=1or other claude-smart keys in~/.reflexio/.envare migrated or respected without silently changing behavior.~/.claude-smart/.env.Notes
Do this separately from PR #99 to avoid expanding a Windows/OpenCode compatibility PR into cross-host setup/dashboard semantics.