-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat: Python env paths redesign v2 with PowerShell fixes #1229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
36cfc33
46a0064
c3959ce
f5841b8
524ab9e
d733060
5bc0c40
43e4b1d
6ae3b1c
2d4e70f
951aae3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,10 +14,11 @@ Auto Claude is a multi-agent autonomous coding framework that builds software th | |
| autonomous-coding/ | ||
| ├── apps/ | ||
| │ ├── backend/ # Python backend/CLI - ALL agent logic lives here | ||
| │ │ ├── core/ # Client, auth, security | ||
| │ │ ├── core/ # Client, auth, security, git provider detection | ||
| │ │ ├── agents/ # Agent implementations | ||
| │ │ ├── spec_agents/ # Spec creation agents | ||
| │ │ ├── integrations/ # Graphiti, Linear, GitHub | ||
| │ │ ├── runners/ # GitHub & GitLab automation | ||
| │ │ ├── integrations/ # Graphiti, Linear | ||
| │ │ └── prompts/ # Agent system prompts | ||
| │ └── frontend/ # Electron desktop UI | ||
| ├── guides/ # Documentation | ||
|
|
@@ -195,6 +196,8 @@ See [RELEASE.md](RELEASE.md) for detailed release process documentation. | |
| **Integrations:** | ||
| - **linear_updater.py** - Optional Linear integration for progress tracking | ||
| - **runners/github/** - GitHub Issues & PRs automation | ||
| - **runners/gitlab/** - GitLab Issues & MRs automation | ||
| - **core/git_provider.py** - Multi-provider support (GitHub, GitLab) with auto-detection | ||
| - **Electron MCP** - E2E testing integration for QA agents (Chrome DevTools Protocol) | ||
| - Enabled with `ELECTRON_MCP_ENABLED=true` in `.env` | ||
| - Allows QA agents to interact with running Electron app | ||
|
|
@@ -237,7 +240,7 @@ main (user's branch) | |
| **Key principles:** | ||
| - ONE branch per spec (`auto-claude/{spec-name}`) | ||
| - Parallel work uses subagents (agent decides when to spawn) | ||
| - NO automatic pushes to GitHub - user controls when to push | ||
| - NO automatic pushes to remote (GitHub/GitLab) - user controls when to push | ||
| - User reviews in spec worktree (`.worktrees/{spec-name}/`) | ||
| - Final merge: spec branch → main (after user approval) | ||
|
|
||
|
|
@@ -248,6 +251,65 @@ main (user's branch) | |
| 4. User runs `--merge` to add to their project | ||
| 5. User pushes to remote when ready | ||
|
|
||
| ### Git Provider Support | ||
|
|
||
| Auto Claude supports both **GitHub** and **GitLab** for pull request / merge request creation: | ||
|
|
||
| **Configuration:** | ||
| - **Per-project setting** in project settings UI or `.env` file | ||
| - **Options**: Auto-detect (default), GitHub, GitLab | ||
| - **Auto-detection**: Parses git remote URL to determine provider | ||
| - `github.com` → Uses GitHub (`gh pr create`) | ||
| - `gitlab.com` → Uses GitLab (`glab mr create`) | ||
| - Self-hosted GitLab instances also supported (e.g., `gitlab.mycompany.com`) | ||
| - Unknown/no remote → Defaults to GitHub | ||
|
|
||
| **CLI Requirements:** | ||
| - **GitHub**: Requires `gh` CLI installed and authenticated | ||
| - Install: `brew install gh` (macOS), `scoop install gh` (Windows), `sudo apt install gh` (Linux) | ||
| - Authenticate: `gh auth login` | ||
| - More info: https://cli.github.com/ | ||
| - **GitLab**: Requires `glab` CLI installed and authenticated | ||
| - Install: `brew install glab` (macOS), `scoop install glab` (Windows) | ||
| - Download: https://gitlab.com/gitlab-org/cli/-/releases | ||
| - Authenticate: `glab auth login` | ||
|
|
||
| **Configuration Options:** | ||
|
|
||
| *In Project Settings UI:* | ||
| 1. Open project settings | ||
| 2. Expand "Git Provider Settings" | ||
| 3. Choose: Auto-detect (recommended), GitHub, or GitLab | ||
|
|
||
| *In `.env` file:* | ||
|
|
||
| ```bash | ||
| # Set git provider (optional, defaults to auto-detect) | ||
| GIT_PROVIDER=auto # auto | github | gitlab | ||
| ``` | ||
|
|
||
| **Example Usage:** | ||
|
|
||
| ```bash | ||
| # Auto-detect provider from git remote (default) | ||
| python run.py --spec 001 --create-pr | ||
|
|
||
| # Works automatically with both: | ||
| # - [email protected]:user/repo.git → Creates GitHub PR using gh CLI | ||
| # - [email protected]:user/repo.git → Creates GitLab MR using glab CLI | ||
| ``` | ||
|
|
||
| **Provider Detection Logic:** | ||
| 1. **Explicit setting** (if gitProvider is "github" or "gitlab") → Use that provider | ||
| 2. **Auto-detect** (if gitProvider is "auto" or not set) → Parse git remote URL | ||
| 3. **Fallback** (if no remote or unknown) → Default to GitHub | ||
|
|
||
| **Implementation Details:** | ||
| - Detection: `apps/backend/core/git_provider.py` | ||
| - GitHub PR creation: `apps/backend/core/worktree.py` (`_create_github_pr()`) | ||
| - GitLab MR creation: `apps/backend/core/worktree.py` (`_create_gitlab_mr()`) | ||
| - UI settings: `apps/frontend/src/renderer/components/project-settings/IntegrationSettings.tsx` | ||
|
|
||
| ### Contributing to Upstream | ||
|
|
||
| **CRITICAL: When submitting PRs to AndyMik90/Auto-Claude, always target the `develop` branch, NOT `main`.** | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,60 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Summary | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This PR implements comprehensive Conda environment management for Auto Claude, enabling isolated Python environments at both application and project levels. It also includes significant Windows/PowerShell compatibility fixes to ensure reliable terminal integration across platforms. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+3
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use an H1 as the first heading. Markdownlint MD041: first line should be a top-level heading. ✏️ Suggested fix-## Summary
+# Summary📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.18.1)1-1: First line in a file should be a top-level heading (MD041, first-line-heading, first-line-h1) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Key Features | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Conda Detection Service**: Automatically detects conda installations across OS-specific locations (miniconda, anaconda, mambaforge) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Application-Level Environment**: Managed conda env at `~/miniconda3/envs/auto-claude` using `apps/backend/requirements.txt` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Project-Level Environments**: Self-contained environments in `.envs/<project-name>/` within each project | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Automatic Terminal Activation**: Conda environments auto-activate when opening terminals for configured projects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Cross-Platform Activation Scripts**: Generated scripts for CMD, PowerShell, and Bash | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **VS Code Integration**: Auto-generated `.code-workspace` files with conda terminal profiles | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **Python Version Detection**: Parses `requirements.txt`, `pyproject.toml`, and `environment.yml` for version constraints | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Windows Compatibility Fixes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Added `windowsHide: true` to all spawn calls to prevent console window popups | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Fixed PowerShell command syntax (`;` instead of `&&`, `$env:PATH=` instead of `PATH=`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Platform-aware shell escaping (PowerShell uses `''` for quotes, bash uses `'\''`) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Added `pathWasModified` optimization to skip unnecessary PATH modifications (eliminates massive PATH echo) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - PowerShell-specific conda activation using init scripts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Test plan | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] **Conda Detection**: Open App Settings > Paths, verify conda installation detected | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] **App Env Setup**: Click "Setup Auto Claude Environment", verify stepper completes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] **Project Toggle**: Enable conda env for a project in Project Settings > General | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] **Project Env Setup**: Navigate to Python Env section, run setup, verify environment created | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] **Terminal Activation**: Open terminal for conda-enabled project, verify env activates automatically | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] **Windows Popup**: Verify no external PowerShell windows appear during operations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] **Connect Claude (Windows)**: Click "Connect Claude", verify PowerShell syntax works without errors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - [ ] **Settings Persistence**: Navigate away and back, verify all conda settings retained | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Files Changed | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### New Files (11) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `conda-detector.ts` - Conda installation detection service | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `conda-env-manager.ts` - Environment creation and management | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `conda-workspace-generator.ts` - VS Code workspace file generation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `conda-project-structure.ts` - Project structure detection (pure-python vs mixed) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `conda-handlers.ts` - IPC handlers for conda operations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `conda-api.ts` - Preload API for renderer access | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `PythonEnvSettings.tsx` - Project-level Python environment settings UI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `CondaSetupWizard.tsx` - Multi-step setup wizard with progress | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `CondaDetectionDisplay.tsx` - Conda detection status display | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `useCondaSetup.ts` - React hook for setup progress | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `conda.ts` - TypeScript type definitions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Modified Files (48) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+36
to
+49
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add blank lines around section headings. Markdownlint MD022 expects blank lines before/after headings. ✏️ Suggested fix-### New Files (11)
+### New Files (11)
...
-### Modified Files (48)
+### Modified Files (48)📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.18.1)36-36: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 49-49: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Terminal integration: `pty-manager.ts`, `terminal-lifecycle.ts`, `terminal-manager.ts` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Claude integration: `claude-cli-utils.ts`, `claude-integration-handler.ts` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Shell utilities: `shell-escape.ts`, `env-utils.ts` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Settings UI: `GeneralSettings.tsx`, `AppSettings.tsx`, `ProjectSettingsContent.tsx` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - IPC handlers: Various handlers with `windowsHide` fixes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Type definitions: `settings.ts`, `project.ts`, `terminal.ts`, `ipc.ts` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - i18n: English and French translation files | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generated with [Claude Code](https://claude.ai/code) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,6 +40,7 @@ | |
| from recovery import RecoveryManager | ||
| from security.constants import PROJECT_DIR_ENV_VAR | ||
| from task_logger import ( | ||
| LogEntryType, | ||
| LogPhase, | ||
| get_task_logger, | ||
| ) | ||
|
|
@@ -55,6 +56,7 @@ | |
| print_key_value, | ||
| print_status, | ||
| ) | ||
| from user_feedback import get_unread_feedback | ||
|
|
||
| from .base import AUTO_CONTINUE_DELAY_SECONDS, HUMAN_INTERVENTION_FILE | ||
| from .memory_manager import debug_memory_system_status, get_graphiti_context | ||
|
|
@@ -247,6 +249,30 @@ | |
| subtask_id = next_subtask.get("id") if next_subtask else None | ||
| phase_name = next_subtask.get("phase_name") if next_subtask else None | ||
|
|
||
| # Check for unread user feedback before starting this subtask | ||
| unread_feedback = get_unread_feedback(spec_dir) | ||
| feedback_text = None | ||
| if unread_feedback: | ||
| # Combine all unread feedback messages with their ACTUAL indices from full list | ||
| # unread_feedback is now a list of (actual_index, feedback_dict) tuples | ||
| feedback_messages = [] | ||
| for actual_idx, fb in unread_feedback: | ||
| msg = fb.get("message", "") | ||
| timestamp = fb.get("timestamp", "") | ||
| # Use actual_idx so agent knows the correct index for mark_feedback_read tool | ||
| feedback_messages.append(f"[Index {actual_idx}] [{timestamp}]\n{msg}") | ||
| feedback_text = "\n\n".join(feedback_messages) | ||
Check warningCode scanning / CodeQL Variable defined multiple times Warning
This assignment to 'feedback_text' is unnecessary as it is
redefined Error loading related location Loading |
||
|
|
||
| # Log feedback detection to task_logs.json (visible in UI) | ||
| task_logger = get_task_logger(spec_dir) | ||
| if task_logger: | ||
| task_logger.log( | ||
| content=f"USER FEEDBACK DETECTED - {len(unread_feedback)} unread feedback item(s) will be incorporated into this subtask", | ||
| entry_type=LogEntryType.INFO, | ||
| phase=LogPhase.CODING, | ||
| print_to_console=True, | ||
| ) | ||
|
|
||
|
Comment on lines
+252
to
+275
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pass a string path into The helper signature expects 🛠️ Suggested fix- unread_feedback = get_unread_feedback(spec_dir)
+ unread_feedback = get_unread_feedback(str(spec_dir))🤖 Prompt for AI Agents |
||
| # Update status for this session | ||
| status_manager.update_session(iteration) | ||
| if phase_name: | ||
|
|
@@ -476,6 +502,17 @@ | |
| if sync_spec_to_source(spec_dir, source_spec_dir): | ||
| print_status("Implementation plan synced to main project", "success") | ||
|
|
||
| # Show plan statistics | ||
| from implementation_plan import ImplementationPlan | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| plan = ImplementationPlan.load(spec_dir / "implementation_plan.json") | ||
| total_phases = len(plan.phases) | ||
| total_subtasks = sum(len(p.subtasks) for p in plan.phases) | ||
| print_status( | ||
| f"Planning complete: {total_phases} phase(s), {total_subtasks} subtask(s)", | ||
| "success", | ||
| ) | ||
|
|
||
| # Handle session status | ||
| if status == "complete": | ||
| # Don't emit COMPLETE here - subtasks are done but QA hasn't run yet | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Use Markdown link syntax for URLs.
The bare URLs should be converted to proper Markdown links for consistency with documentation standards.
📝 Suggested fix
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
271-271: Bare URL used
(MD034, no-bare-urls)
274-274: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents