From 0b866f425b6946807559d8c92294ef85962ec0ce Mon Sep 17 00:00:00 2001 From: Sho Nakatani Date: Sun, 17 Aug 2025 14:55:34 +0900 Subject: [PATCH 1/3] docs: Add code style and conventions, project overview, and suggested commands documentation --- .../document_symbols_cache_v23-06-25.pkl | Bin 0 -> 80330 bytes .serena/memories/code_style_conventions.md | 35 +++++++++ .serena/memories/project_overview.md | 30 ++++++++ .serena/memories/suggested_commands.md | 28 ++++++++ .serena/project.yml | 68 ++++++++++++++++++ 5 files changed, 161 insertions(+) create mode 100644 .serena/cache/python/document_symbols_cache_v23-06-25.pkl create mode 100644 .serena/memories/code_style_conventions.md create mode 100644 .serena/memories/project_overview.md create mode 100644 .serena/memories/suggested_commands.md create mode 100644 .serena/project.yml diff --git a/.serena/cache/python/document_symbols_cache_v23-06-25.pkl b/.serena/cache/python/document_symbols_cache_v23-06-25.pkl new file mode 100644 index 0000000000000000000000000000000000000000..a7751ad35fe3803e63c1fccf7741f455ff30198a GIT binary patch literal 80330 zcmeHw50D+jc_#)530VU1M;HNu(Gx~*VfU>Ttq@*Y*g{Akgg_@@5Lqqj+4tt{drxoQ zTV~$VYAv>)TxE!J>*O4kDhKBZ`;ItuaX4SOQn|XAOP$X?bD?aPQ%U7wm+x%jx|EaH z#JRiFU2NmJ-`CwU)7{fEvw(VDU7eSrSJT_w)ARej{`%|g@B8|xHP4M-@Qw@UXKAIp zyfyHvqrtr2?e|9ey=FV8%rA}{a@&Eovh3Wpckdn5UE|)Ku|2!TXKowcv-^(Sdv=Z2 zcfaTM@tND}^_8iWGBvWM+AuWxs&E>&i)y{PXuSC)^}n{97mbab@Qo%2T9 z?qcAc?)&a&Ww!D7C;>9t>^1r`m1=ix^n_Qv+dDIIzdIAcWI${s{L029%NyO9pxf^E zykl;!v9f&lJicV3@3rwQXGGIintIY-zIfinxA#^a=o2h!m)8+lPI$eQ#=0Y$8tW-j zz;`7Oj^U%Hb^U&0b8d;NrdAqPQ>kk#K-svqQEFUwK5=VoYuwOp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BQagnFvnjH!<}5O@}`bURb8{q{#$_^4pst$GRFpD#k_{p<^A zPhfHT?(-X<0+)v(Y71H zX%v$U-9SBz8gs1U zL98{p3ywPjncfFD^l3`FSzT6i9;wT$0a6B_yUN_h@)H|~yTn~lYjJGVx`L7$DH*2Z zJ(L`x-oQ9 zPn@}3a)0F=nZB+ghg^)xK{_mtqu+2?-b26A9F}jxAIV-oE(>4G+YQ+Ra#$WiSL_`` zhIE@f2XU4mEgUFcguUdc!4RrZdk_M`beGp1o6%Pz&MfEd2P zCWy(UI1A#8YJ-6I(Ly1X9EGzGzKIVYeSnB;auhZqoL_Aa2z!Mh9Qgrf;k(m}ugE4p zU?aZy)dqp@aXR0f$EQoL65W_}A5yc{# zoE3}^=T{p9#2+gd;?M;&8{%8d5R2?oi1Vur0^;Wig;?>N&0^y_&5}Z7ljp3Fjq|Gw z0^`pVim~nyn+5ax%`l5>@`yFUoL_AaFuznN%-q8@3*7rSxbSdQM6t*w4_70&`PBvi z?!PM%T)3oW0eg%C3zt*{SdmSZ`$k~%s|^C!uM`RFa>5Zc3+E{_1B+~OL^a}^Uu_UL zf3r}WHz`M0+4{s|W|&2Gsy>llZ4fYjr%;$x$I&cab~(s!993k7$WE0R`PBvi@(&9I zS#t`_Lb+;2S!9!sh*4tXR~rP%|Eo}xH^gQZ+2UfBW2|pXifr=gG-8}zZ4ek=a7mH- znUa%c78f_o2#f4gF3ztu2!uBlim>W_nFVskEGk5HszA=KHVBZfDHLSQt1=7az>KoU zPG#l%YJ))erb1Dc+#<6O?wN&!$WBE#zuF)W-c=~V!s{^$-M$%JkxgEY#>pB{}zW?-!&H5w0yg` - Create a new worktree +- `sprout ls` - List all worktrees +- `sprout rm ` - Remove a worktree +- `sprout path ` - Get worktree path + +## Git Commands +- `git worktree list` - List git worktrees +- `git worktree add` - Add a worktree +- `git worktree remove` - Remove a worktree + +## Important: After Task Completion +Always run: +1. `make lint` - Check for linting errors +2. `make format` - Format the code +3. `make test` - Ensure all tests pass \ No newline at end of file diff --git a/.serena/project.yml b/.serena/project.yml new file mode 100644 index 0000000..95708b4 --- /dev/null +++ b/.serena/project.yml @@ -0,0 +1,68 @@ +# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby) +# * For C, use cpp +# * For JavaScript, use typescript +# Special requirements: +# * csharp: Requires the presence of a .sln file in the project folder. +language: python + +# whether to use the project's gitignore file to ignore files +# Added on 2025-04-07 +ignore_all_files_in_gitignore: true +# list of additional paths to ignore +# same syntax as gitignore, so you can use * and ** +# Was previously called `ignored_dirs`, please update your config if you are using that. +# Added (renamed) on 2025-04-07 +ignored_paths: [] + +# whether the project is in read-only mode +# If set to true, all editing tools will be disabled and attempts to use them will result in an error +# Added on 2025-04-18 +read_only: false + + +# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details. +# Below is the complete list of tools for convenience. +# To make sure you have the latest list of tools, and to view their descriptions, +# execute `uv run scripts/print_tool_overview.py`. +# +# * `activate_project`: Activates a project by name. +# * `check_onboarding_performed`: Checks whether project onboarding was already performed. +# * `create_text_file`: Creates/overwrites a file in the project directory. +# * `delete_lines`: Deletes a range of lines within a file. +# * `delete_memory`: Deletes a memory from Serena's project-specific memory store. +# * `execute_shell_command`: Executes a shell command. +# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced. +# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type). +# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type). +# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes. +# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file. +# * `initial_instructions`: Gets the initial instructions for the current project. +# Should only be used in settings where the system prompt cannot be set, +# e.g. in clients you have no control over, like Claude Desktop. +# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol. +# * `insert_at_line`: Inserts content at a given line in a file. +# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol. +# * `list_dir`: Lists files and directories in the given directory (optionally with recursion). +# * `list_memories`: Lists memories in Serena's project-specific memory store. +# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building). +# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context). +# * `read_file`: Reads a file within the project directory. +# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store. +# * `remove_project`: Removes a project from the Serena configuration. +# * `replace_lines`: Replaces a range of lines within a file with new content. +# * `replace_symbol_body`: Replaces the full definition of a symbol. +# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen. +# * `search_for_pattern`: Performs a search for a pattern in the project. +# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase. +# * `switch_modes`: Activates modes by providing a list of their names +# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information. +# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task. +# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed. +# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store. +excluded_tools: [] + +# initial prompt for the project. It will always be given to the LLM upon activating the project +# (contrary to the memories, which are loaded on demand). +initial_prompt: "" + +project_name: "sprout" From 9b96bc371f5c4ddd4ecc56cf83da9f9855d897eb Mon Sep 17 00:00:00 2001 From: Sho Nakatani Date: Sun, 17 Aug 2025 14:55:43 +0900 Subject: [PATCH 2/3] feat: Add support for {{ branch() }} placeholder in .env.example templates --- CHANGELOG.md | 1 + README.md | 13 +++++++++-- src/sprout/commands/create.py | 3 ++- src/sprout/utils.py | 11 ++++++++-- tests/test_integration.py | 41 +++++++++++++++++++++++++++++++++++ tests/test_utils.py | 41 +++++++++++++++++++++++++++++++++++ 6 files changed, 105 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9d8ae2..eb0e2fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- Support for `{{ branch() }}` placeholder in `.env.example` templates - replaced with the current branch/subtree name ### Changed diff --git a/README.md b/README.md index 3b96a49..ac8f6ec 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,10 @@ API_PORT={{ auto_port() }} DB_HOST=localhost DB_PORT={{ auto_port() }} +# Branch-specific Configuration +SERVICE_NAME=myapp-{{ branch() }} +DEPLOYMENT_ENV={{ branch() }} + # Example: Docker Compose variables (preserved as-is) # sprout will NOT process ${...} syntax - it's passed through unchanged # DB_NAME=${DB_NAME} @@ -152,7 +156,7 @@ Show the version of sprout. ## Template Syntax -sprout supports two types of placeholders in `.env.example`: +sprout supports three types of placeholders in `.env.example`: 1. **Variable Placeholders**: `{{ VARIABLE_NAME }}` - **First**: Checks if the variable exists in your environment (e.g., `export API_KEY=xxx`) @@ -165,7 +169,12 @@ sprout supports two types of placeholders in `.env.example`: - Checks system port availability - Ensures global uniqueness even in monorepo setups -3. **Docker Compose Syntax (Preserved)**: `${VARIABLE}` +3. **Branch Name**: `{{ branch() }}` + - Replaced with the current branch/subtree name + - Useful for branch-specific configurations + - Example: `SERVICE_NAME=myapp-{{ branch() }}` becomes `SERVICE_NAME=myapp-feature-auth` + +4. **Docker Compose Syntax (Preserved)**: `${VARIABLE}` - NOT processed by sprout - passed through as-is - Useful for Docker Compose variable substitution - Example: `${DB_NAME:-default}` remains unchanged in generated `.env` diff --git a/src/sprout/commands/create.py b/src/sprout/commands/create.py index 5a01a91..68790f5 100644 --- a/src/sprout/commands/create.py +++ b/src/sprout/commands/create.py @@ -109,7 +109,8 @@ def create_worktree(branch_name: BranchName, path_only: bool = False) -> Never: # Parse template with combined used ports env_content = parse_env_template( - env_example, silent=path_only, used_ports=all_used_ports | session_ports + env_example, silent=path_only, used_ports=all_used_ports | session_ports, + branch_name=branch_name ) # Extract ports from generated content and add to session_ports diff --git a/src/sprout/utils.py b/src/sprout/utils.py index 156328d..01d7fbd 100644 --- a/src/sprout/utils.py +++ b/src/sprout/utils.py @@ -126,7 +126,8 @@ def find_available_port() -> PortNumber: def parse_env_template( - template_path: Path, silent: bool = False, used_ports: PortSet | None = None + template_path: Path, silent: bool = False, used_ports: PortSet | None = None, + branch_name: str | None = None ) -> str: """Parse .env.example template and process placeholders. @@ -134,6 +135,7 @@ def parse_env_template( template_path: Path to the .env.example template file silent: If True, use stderr for prompts to keep stdout clean used_ports: Set of ports already in use (in addition to system-wide used ports) + branch_name: Branch name to use for {{ branch() }} placeholders """ if not template_path.exists(): raise SproutError(f".env.example file not found at {template_path}") @@ -161,6 +163,10 @@ def replace_auto_port(match: re.Match[str]) -> str: line = re.sub(r"{{\s*auto_port\(\)\s*}}", replace_auto_port, line) + # Process {{ branch() }} placeholders + if branch_name: + line = re.sub(r"{{\s*branch\(\)\s*}}", branch_name, line) + # Process {{ VARIABLE }} placeholders def replace_variable(match: re.Match[str]) -> str: var_name = match.group(1).strip() @@ -187,7 +193,8 @@ def replace_variable(match: re.Match[str]) -> str: value = console.input(prompt) return value - line = re.sub(r"{{\s*([^}]+)\s*}}", replace_variable, line) + # Only match variables that don't look like function calls (no parentheses) + line = re.sub(r"{{\s*([^}()]+)\s*}}", replace_variable, line) lines.append(line) diff --git a/tests/test_integration.py b/tests/test_integration.py index e5e5d13..d566215 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -198,6 +198,47 @@ def test_create_existing_branch(self, git_repo, monkeypatch): worktree_path = git_repo / ".sprout" / "existing-branch" assert worktree_path.exists() + def test_branch_placeholder(self, git_repo, monkeypatch): + """Test that {{ branch() }} placeholder is replaced with branch name.""" + git_repo, default_branch = git_repo + monkeypatch.chdir(git_repo) + monkeypatch.setenv("API_KEY", "test_key") + + # Create .env.example with branch() placeholder + env_example = git_repo / ".env.example" + env_example.write_text( + "# Branch-specific configuration\n" + "BRANCH_NAME={{ branch() }}\n" + "SERVICE_NAME=myapp-{{ branch() }}\n" + "API_KEY={{ API_KEY }}\n" + "PORT={{ auto_port() }}\n" + "COMPOSE_VAR=${BRANCH_NAME}\n" + ) + + # Add to git + subprocess.run(["git", "add", ".env.example"], cwd=git_repo, check=True) + subprocess.run( + ["git", "commit", "-m", "Add .env.example with branch placeholder"], + cwd=git_repo, + check=True, + ) + + # Create worktree + branch_name = "feature-auth" + result = runner.invoke(app, ["create", branch_name]) + assert result.exit_code == 0 + + # Verify .env was created with correct branch name substitution + env_file = git_repo / ".sprout" / branch_name / ".env" + env_content = env_file.read_text() + + # Check branch name substitutions + assert f"BRANCH_NAME={branch_name}" in env_content + assert f"SERVICE_NAME=myapp-{branch_name}" in env_content + assert "API_KEY=test_key" in env_content + assert "PORT=" in env_content # Should have a port number + assert "COMPOSE_VAR=${BRANCH_NAME}" in env_content # Docker syntax preserved + def test_error_cases(self, git_repo, monkeypatch, tmp_path): """Test various error conditions.""" git_repo, default_branch = git_repo diff --git a/tests/test_utils.py b/tests/test_utils.py index 9e393e5..f413d15 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -179,6 +179,47 @@ def test_parse_env_template_preserves_docker_syntax(self, tmp_path): result = parse_env_template(template) assert result == "COMPOSE_VAR=${COMPOSE_VAR:-default}" + def test_parse_env_template_branch_placeholder(self, tmp_path): + """Test parsing {{ branch() }} placeholders.""" + template = tmp_path / ".env.example" + template.write_text("BRANCH_NAME={{ branch() }}\nFEATURE={{ branch() }}_feature") + + result = parse_env_template(template, branch_name="feature-auth") + assert result == "BRANCH_NAME=feature-auth\nFEATURE=feature-auth_feature" + + def test_parse_env_template_branch_placeholder_none(self, tmp_path): + """Test {{ branch() }} placeholder when branch_name is None.""" + template = tmp_path / ".env.example" + template.write_text("BRANCH={{ branch() }}") + + # When branch_name is None, placeholder should remain unchanged + result = parse_env_template(template, branch_name=None) + assert result == "BRANCH={{ branch() }}" + + def test_parse_env_template_mixed_placeholders(self, tmp_path, mocker): + """Test parsing mixed placeholders in one template.""" + mocker.patch("sprout.utils.find_available_port", return_value=8080) + mocker.patch.dict(os.environ, {"API_KEY": "secret"}) + mocker.patch("sprout.utils.console.input", return_value="password123") + + template = tmp_path / ".env.example" + template.write_text( + "API_KEY={{ API_KEY }}\n" + "PORT={{ auto_port() }}\n" + "BRANCH={{ branch() }}\n" + "DB_PASS={{ DB_PASS }}\n" + "COMPOSE_VAR=${COMPOSE_VAR}" + ) + + result = parse_env_template(template, branch_name="feature-xyz") + assert result == ( + "API_KEY=secret\n" + "PORT=8080\n" + "BRANCH=feature-xyz\n" + "DB_PASS=password123\n" + "COMPOSE_VAR=${COMPOSE_VAR}" + ) + def test_parse_env_template_file_not_found(self, tmp_path): """Test error when template file doesn't exist.""" template = tmp_path / "nonexistent.env" From 10b5f922ccf72a63091753a52fb96f3ae507e339 Mon Sep 17 00:00:00 2001 From: Sho Nakatani Date: Sun, 17 Aug 2025 15:06:46 +0900 Subject: [PATCH 3/3] fix --- Makefile | 2 +- sample/monorepo/backend/.env.example | 3 ++- sample/monorepo/frontend/.env.example | 3 ++- src/sprout/commands/create.py | 6 ++++-- src/sprout/utils.py | 6 ++++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 01d5c8b..24ccf0f 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ lint: # Format code using ruff format: @echo "Formatting code..." - uv run ruff check --fix + uv run ruff format # Run tests test: diff --git a/sample/monorepo/backend/.env.example b/sample/monorepo/backend/.env.example index 5bcce62..f68a64c 100644 --- a/sample/monorepo/backend/.env.example +++ b/sample/monorepo/backend/.env.example @@ -1,3 +1,4 @@ # Backend service JWT_SECRET={{ JWT_SECRET }} -API_PORT={{ auto_port() }} \ No newline at end of file +API_PORT={{ auto_port() }} +DOCKER_NETWORK={{ branch() }}-sprout-nw \ No newline at end of file diff --git a/sample/monorepo/frontend/.env.example b/sample/monorepo/frontend/.env.example index c03781c..03116be 100644 --- a/sample/monorepo/frontend/.env.example +++ b/sample/monorepo/frontend/.env.example @@ -1,3 +1,4 @@ # Frontend service REACT_APP_API_KEY={{ REACT_APP_API_KEY }} -FRONTEND_PORT={{ auto_port() }} \ No newline at end of file +FRONTEND_PORT={{ auto_port() }} +DOCKER_NETWORK={{ branch() }}-sprout-nw \ No newline at end of file diff --git a/src/sprout/commands/create.py b/src/sprout/commands/create.py index 68790f5..9250987 100644 --- a/src/sprout/commands/create.py +++ b/src/sprout/commands/create.py @@ -109,8 +109,10 @@ def create_worktree(branch_name: BranchName, path_only: bool = False) -> Never: # Parse template with combined used ports env_content = parse_env_template( - env_example, silent=path_only, used_ports=all_used_ports | session_ports, - branch_name=branch_name + env_example, + silent=path_only, + used_ports=all_used_ports | session_ports, + branch_name=branch_name, ) # Extract ports from generated content and add to session_ports diff --git a/src/sprout/utils.py b/src/sprout/utils.py index 01d7fbd..bd01dc5 100644 --- a/src/sprout/utils.py +++ b/src/sprout/utils.py @@ -126,8 +126,10 @@ def find_available_port() -> PortNumber: def parse_env_template( - template_path: Path, silent: bool = False, used_ports: PortSet | None = None, - branch_name: str | None = None + template_path: Path, + silent: bool = False, + used_ports: PortSet | None = None, + branch_name: str | None = None, ) -> str: """Parse .env.example template and process placeholders.