add: solvent init — first-run scaffolding command#37
Conversation
Creates SOLVENT_HOME, data dir, reports dir, treasury DB, .env.example, and seeds workspace files (SOUL/BRAIN/AGENTS/etc) in a single idempotent command. --force overwrites existing workspace templates. Also fixes the CI test matrix job to use pip install -e .[dev,rich] now that requirements.txt is gone (pyproject.toml migration). 11 new tests covering: directory creation, DB init, env.example, workspace seeding, idempotency, --force, and CLI exit code. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SGjM79GJpSksy9wSSBa7e6
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SGjM79GJpSksy9wSSBa7e6
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7f01b6496
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| # --- workspace files -------------------------------------------------- | ||
| try: | ||
| workspace_root = seed_workspace(force=force) |
There was a problem hiding this comment.
Seed the workspace under the initialized home
When SOLVENT_HOME points outside the current working directory, this call still uses workspace_path()'s default .solvent/workspace under the process cwd. As a result, solvent init reports the selected home as initialized while placing SOUL/BRAIN/AGENTS elsewhere; a later solvent or solvent doctor run from a different cwd will not use the workspace that init just created. Set/pass the workspace path relative to home or make the chosen workspace path explicit before seeding.
Useful? React with 👍 / 👎.
Summary
solvent/init.pywithrun()+main()— creates the full runtime environment in one commandSOLVENT_HOME/,data/,data/reports/,data/solvent.db,.env.example, and all workspace files (SOUL/BRAIN/AGENTS etc.)--forceoverwrites workspace templates__main__.pyassolvent initand added to the HELP stringtestmatrix job to usepip install -e .[dev,rich]now thatrequirements.txtis removedTest plan
python3 -m pytest tests/test_init.py -v→ 11 passedpython3 -m pytest -q→ 303 passed, 6 skippedsolvent initon a clean~/.solventdir prints home path + "Next steps"solvent inita second time shows "Already present" and exits 0solvent init --forcerewrites workspace templates🤖 Generated with Claude Code
https://claude.ai/code/session_01SGjM79GJpSksy9wSSBa7e6
Generated by Claude Code