Feature/apps restructure v2.7.2 (#138)

* refactor: restructure project to Apps/frontend and Apps/backend

- Move auto-claude-ui to Apps/frontend with feature-based architecture
- Move auto-claude to Apps/backend
- Switch from pnpm to npm for frontend
- Update Node.js requirement to v24.12.0 LTS
- Add pre-commit hooks for lint, typecheck, and security audit
- Add commit-msg hook for conventional commits
- Fix CommonJS compatibility issues (postcss.config, postinstall scripts)
- Update README with comprehensive setup and contribution guidelines
- Configure ESLint to ignore .cjs files
- 0 npm vulnerabilities

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* feat(refactor): clean code and move to npm

* feat(refactor): clean code and move to npm

* chore: update to v2.7.0, remove Docker deps (LadybugDB is embedded)

* feat: v2.8.0 - update workflows and configs for Apps/ structure, npm

* fix: resolve Python lint errors (F401, I001)

* fix: update test paths for Apps/backend structure

* fix: add missing facade files and update paths for Apps/backend structure

- Fix ruff lint error I001 in auto_claude_tools.py
- Create missing facade files to match upstream (agent, ci_discovery, critique, etc.)
- Update test paths from auto-claude/ to Apps/backend/
- Update .pre-commit-config.yaml paths for Apps/ structure
- Add pytest to pre-commit hooks (skip slow/integration/Windows-incompatible tests)
- Fix Unicode encoding in test_agent_architecture.py for Windows

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* feat: improve readme

* fix: new path

* fix: correct release workflow and docs for Apps/ restructure

- Fix ARM64 macOS build: pnpm → npm, auto-claude-ui → Apps/frontend
- Fix artifact upload paths in release.yml
- Update Node.js version to 24 for consistency
- Update CLI-USAGE.md with Apps/backend paths
- Update RELEASE.md with Apps/frontend/package.json paths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: rename Apps/ to apps/ and fix backend path resolution

- Rename Apps/ folder to apps/ for consistency with JS/Node conventions
- Update all path references across CI/CD workflows, docs, and config files
- Fix frontend Python path resolver to look for 'backend' instead of 'auto-claude'
- Update path-resolver.ts to correctly find apps/backend in development mode

This completes the Apps restructure from PR #122 and prepares for v2.8.0 release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(electron): correct preload script path from .js to .mjs

electron-vite builds the preload script as ESM (index.mjs) but the main
process was looking for CommonJS (index.js). This caused the preload to
fail silently, making the app fall back to browser mock mode with fake
data and non-functional IPC handlers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* - Introduced `dev:debug` script to enable debugging during development.
- Added `dev:mcp` script for running the frontend in MCP mode.

These enhancements streamline the development process for frontend developers.

* refactor(memory): make Graphiti memory mandatory and remove Docker dependency

Memory is now a core component of Auto Claude rather than optional:
- Python 3.12+ is required for the backend (not just memory layer)
- Graphiti is enabled by default in .env.example
- Removed all FalkorDB/Docker references (migrated to embedded LadybugDB)
- Deleted guides/DOCKER-SETUP.md and docker-handlers.ts
- Updated onboarding UI to remove "optional" language
- Updated all documentation to reflect LadybugDB architecture

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat: add cross-platform Windows support for npm scripts

- Add scripts/install-backend.js for cross-platform Python venv setup
  - Auto-detects Python 3.12 (py -3.12 on Windows, python3.12 on Unix)
  - Handles platform-specific venv paths
- Add scripts/test-backend.js for cross-platform pytest execution
- Update package.json to use Node.js scripts instead of shell commands
- Update CONTRIBUTING.md with correct paths and instructions:
  - apps/backend/ and apps/frontend/ paths
  - Python 3.12 requirement (memory system now required)
  - Platform-specific install commands (winget, brew, apt)
  - npm instead of pnpm
  - Quick Start section with npm run install:all

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* remove doc

* fix(frontend): correct Ollama detector script path after apps restructure

The Ollama status check was failing because memory-handlers.ts
was looking for ollama_model_detector.py at auto-claude/ but the
script is now at apps/backend/ after the directory restructure.

This caused "Ollama not running" to display even when Ollama was
actually running and accessible.

* chore: bump version to 2.7.2

Downgrade version from 2.8.0 to 2.7.2 as the Apps/ restructure
is better suited as a patch release rather than a minor release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: update package-lock.json for Windows compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs(contributing): add hotfix workflow and update paths for apps/ structure

Add Git Flow hotfix workflow documentation with step-by-step guide
and ASCII diagram showing the branching strategy.

Update all paths from auto-claude/auto-claude-ui to apps/backend/apps/frontend
and migrate package manager references from pnpm to npm to match the
new project structure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): remove duplicate ARM64 build from Intel runner

The Intel runner was building both x64 and arm64 architectures,
while a separate ARM64 runner also builds arm64 natively. This
caused duplicate ARM64 builds, wasting CI resources.

Now each runner builds only its native architecture:
- Intel runner: x64 only
- ARM64 runner: arm64 only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Alex Madera <e.a_madera@hotmail.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andy
2025-12-22 21:34:51 +01:00
committed by GitHub
parent 91f7051dda
commit 0adaddacaa
1061 changed files with 2322 additions and 24226 deletions
+2 -2
View File
@@ -56,8 +56,8 @@ body:
label: Component
description: Which part of Auto Claude is affected?
options:
- Python Backend (auto-claude/)
- Electron UI (auto-claude-ui/)
- Python Backend (apps/backend/)
- Electron UI (apps/frontend/)
- Both
- Not sure
validations:
+2 -2
View File
@@ -38,8 +38,8 @@ body:
label: Component
description: Which part of Auto Claude would this affect?
options:
- Python Backend (auto-claude/)
- Electron UI (auto-claude-ui/)
- Python Backend (apps/backend/)
- Electron UI (apps/frontend/)
- Both
- New component
- Not sure
+7 -12
View File
@@ -32,22 +32,17 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
node-version: '24'
- name: Install Visual Studio Build Tools
uses: microsoft/setup-msbuild@v2
- name: Install node-pty and rebuild for Electron
working-directory: auto-claude-ui
working-directory: apps/frontend
shell: pwsh
run: |
# Install only node-pty
pnpm add node-pty@1.1.0-beta42
npm install node-pty@1.1.0-beta42
# Get Electron ABI version
$electronAbi = (npx electron-abi $env:ELECTRON_VERSION)
@@ -57,7 +52,7 @@ jobs:
npx @electron/rebuild --version $env:ELECTRON_VERSION --module-dir node_modules/node-pty --arch ${{ matrix.arch }}
- name: Package prebuilt binaries
working-directory: auto-claude-ui
working-directory: apps/frontend
shell: pwsh
run: |
$electronAbi = (npx electron-abi $env:ELECTRON_VERSION)
@@ -83,7 +78,7 @@ jobs:
Get-ChildItem $prebuildDir
- name: Create archive
working-directory: auto-claude-ui
working-directory: apps/frontend
shell: pwsh
run: |
$electronAbi = (npx electron-abi $env:ELECTRON_VERSION)
@@ -98,14 +93,14 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: node-pty-win32-${{ matrix.arch }}
path: auto-claude-ui/node-pty-*.zip
path: apps/frontend/node-pty-*.zip
retention-days: 90
- name: Upload to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: auto-claude-ui/node-pty-*.zip
files: apps/frontend/node-pty-*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+28 -29
View File
@@ -29,30 +29,34 @@ jobs:
version: "latest"
- name: Install dependencies
working-directory: auto-claude
working-directory: apps/backend
run: |
uv venv
uv pip install -r requirements.txt
uv pip install -r ../tests/requirements-test.txt
uv pip install -r ../../tests/requirements-test.txt
- name: Run tests
working-directory: auto-claude
working-directory: apps/backend
env:
PYTHONPATH: ${{ github.workspace }}/apps/backend
run: |
source .venv/bin/activate
pytest ../tests/ -v --tb=short -x
pytest ../../tests/ -v --tb=short -x
- name: Run tests with coverage
if: matrix.python-version == '3.12'
working-directory: auto-claude
working-directory: apps/backend
env:
PYTHONPATH: ${{ github.workspace }}/apps/backend
run: |
source .venv/bin/activate
pytest ../tests/ -v --cov=. --cov-report=xml --cov-report=term-missing
pytest ../../tests/ -v --cov=. --cov-report=xml --cov-report=term-missing
- name: Upload coverage reports
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
file: ./auto-claude/coverage.xml
file: ./apps/backend/coverage.xml
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -67,39 +71,34 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Get pnpm store directory
id: pnpm-cache
run: echo "dir=$(pnpm store path)" >> "$GITHUB_OUTPUT"
- name: Get npm cache directory
id: npm-cache
run: echo "dir=$(npm config get cache)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- name: Install dependencies
working-directory: auto-claude-ui
run: pnpm install --frozen-lockfile --ignore-scripts
working-directory: apps/frontend
run: npm ci --ignore-scripts
- name: Lint
working-directory: auto-claude-ui
run: pnpm run lint
working-directory: apps/frontend
run: npm run lint
- name: Type check
working-directory: auto-claude-ui
run: pnpm run typecheck
working-directory: apps/frontend
run: npm run typecheck
- name: Run tests
working-directory: auto-claude-ui
run: pnpm run test
working-directory: apps/frontend
run: npm run test
- name: Build
working-directory: auto-claude-ui
run: pnpm run build
working-directory: apps/frontend
run: npm run build
+9 -14
View File
@@ -23,10 +23,10 @@ jobs:
run: pip install ruff
- name: Run ruff check
run: ruff check auto-claude/ --output-format=github
run: ruff check apps/backend/ --output-format=github
- name: Run ruff format check
run: ruff format auto-claude/ --check --diff
run: ruff format apps/backend/ --check --diff
# TypeScript/React linting
frontend:
@@ -38,21 +38,16 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
node-version: '24'
- name: Install dependencies
working-directory: auto-claude-ui
run: pnpm install --frozen-lockfile --ignore-scripts
working-directory: apps/frontend
run: npm ci --ignore-scripts
- name: Run ESLint
working-directory: auto-claude-ui
run: pnpm lint
working-directory: apps/frontend
run: npm run lint
- name: Run TypeScript check
working-directory: auto-claude-ui
run: pnpm typecheck
working-directory: apps/frontend
run: npm run typecheck
+49 -69
View File
@@ -23,31 +23,26 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Get pnpm store directory
id: pnpm-cache
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Get npm cache directory
id: npm-cache
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.dir }}
key: ${{ runner.os }}-x64-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-x64-pnpm-
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- name: Install dependencies
run: cd auto-claude-ui && pnpm install --frozen-lockfile
run: cd apps/frontend && npm ci
- name: Build application
run: cd auto-claude-ui && pnpm run build
run: cd apps/frontend && npm run build
- name: Package macOS (Intel)
run: cd auto-claude-ui && pnpm run package:mac -- --arch=x64
run: cd apps/frontend && npm run package:mac -- --arch=x64
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
@@ -63,7 +58,7 @@ jobs:
echo "Skipping notarization: APPLE_ID not configured"
exit 0
fi
cd auto-claude-ui
cd apps/frontend
for dmg in dist/*.dmg; do
echo "Notarizing $dmg..."
xcrun notarytool submit "$dmg" \
@@ -80,8 +75,8 @@ jobs:
with:
name: macos-intel-builds
path: |
auto-claude-ui/dist/*.dmg
auto-claude-ui/dist/*.zip
apps/frontend/dist/*.dmg
apps/frontend/dist/*.zip
# Apple Silicon build on ARM64 runner for native compilation
build-macos-arm64:
@@ -92,31 +87,26 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Get pnpm store directory
id: pnpm-cache
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Get npm cache directory
id: npm-cache
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.dir }}
key: ${{ runner.os }}-arm64-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-arm64-pnpm-
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- name: Install dependencies
run: cd auto-claude-ui && pnpm install --frozen-lockfile
run: cd apps/frontend && npm ci
- name: Build application
run: cd auto-claude-ui && pnpm run build
run: cd apps/frontend && npm run build
- name: Package macOS (Apple Silicon)
run: cd auto-claude-ui && pnpm run package:mac -- --arch=arm64
run: cd apps/frontend && npm run package:mac -- --arch=arm64
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.MAC_CERTIFICATE }}
@@ -132,7 +122,7 @@ jobs:
echo "Skipping notarization: APPLE_ID not configured"
exit 0
fi
cd auto-claude-ui
cd apps/frontend
for dmg in dist/*.dmg; do
echo "Notarizing $dmg..."
xcrun notarytool submit "$dmg" \
@@ -149,8 +139,8 @@ jobs:
with:
name: macos-arm64-builds
path: |
auto-claude-ui/dist/*.dmg
auto-claude-ui/dist/*.zip
apps/frontend/dist/*.dmg
apps/frontend/dist/*.zip
build-windows:
runs-on: windows-latest
@@ -160,32 +150,27 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Get pnpm store directory
id: pnpm-cache
- name: Get npm cache directory
id: npm-cache
shell: bash
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- name: Install dependencies
run: cd auto-claude-ui && pnpm install --frozen-lockfile
run: cd apps/frontend && npm ci
- name: Build application
run: cd auto-claude-ui && pnpm run build
run: cd apps/frontend && npm run build
- name: Package Windows
run: cd auto-claude-ui && pnpm run package:win
run: cd apps/frontend && npm run package:win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.WIN_CERTIFICATE }}
@@ -196,7 +181,7 @@ jobs:
with:
name: windows-builds
path: |
auto-claude-ui/dist/*.exe
apps/frontend/dist/*.exe
build-linux:
runs-on: ubuntu-latest
@@ -206,31 +191,26 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Get pnpm store directory
id: pnpm-cache
run: echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Get npm cache directory
id: npm-cache
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- name: Install dependencies
run: cd auto-claude-ui && pnpm install --frozen-lockfile
run: cd apps/frontend && npm ci
- name: Build application
run: cd auto-claude-ui && pnpm run build
run: cd apps/frontend && npm run build
- name: Package Linux
run: cd auto-claude-ui && pnpm run package:linux
run: cd apps/frontend && npm run package:linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -239,8 +219,8 @@ jobs:
with:
name: linux-builds
path: |
auto-claude-ui/dist/*.AppImage
auto-claude-ui/dist/*.deb
apps/frontend/dist/*.AppImage
apps/frontend/dist/*.deb
create-release:
needs: [build-macos-intel, build-macos-arm64, build-windows, build-linux]
+11 -14
View File
@@ -28,17 +28,19 @@ jobs:
version: "latest"
- name: Install dependencies
working-directory: auto-claude
working-directory: apps/backend
run: |
uv venv
uv pip install -r requirements.txt
uv pip install -r ../tests/requirements-test.txt
uv pip install -r ../../tests/requirements-test.txt
- name: Run tests
working-directory: auto-claude
working-directory: apps/backend
env:
PYTHONPATH: ${{ github.workspace }}/apps/backend
run: |
source .venv/bin/activate
pytest ../tests/ -v --tb=short
pytest ../../tests/ -v --tb=short
# Frontend tests
test-frontend:
@@ -50,17 +52,12 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
node-version: '24'
- name: Install dependencies
working-directory: auto-claude-ui
run: pnpm install --frozen-lockfile --ignore-scripts
working-directory: apps/frontend
run: npm ci --ignore-scripts
- name: Run tests
working-directory: auto-claude-ui
run: pnpm test
working-directory: apps/frontend
run: npm run test
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
id: package_version
run: |
# Read version from package.json
PACKAGE_VERSION=$(node -p "require('./auto-claude-ui/package.json').version")
PACKAGE_VERSION=$(node -p "require('./apps/frontend/package.json').version")
echo "version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
echo "Package.json version: $PACKAGE_VERSION"
+111 -36
View File
@@ -1,31 +1,69 @@
# OS
# ===========================
# OS Files
# ===========================
.DS_Store
.DS_Store?
._*
Thumbs.db
ehthumbs.db
Desktop.ini
# Environment files (contain API keys)
# ===========================
# Security - Environment & Secrets
# ===========================
.env
.env.local
.env.*
!.env.example
*.pem
*.key
*.crt
*.p12
*.pfx
.secrets
secrets/
credentials/
# Git worktrees (used by auto-build parallel mode)
.worktrees/
# IDE
# ===========================
# IDE & Editors
# ===========================
.idea/
.vscode/
*.swp
*.swo
*.sublime-workspace
*.sublime-project
.project
.classpath
.settings/
# ===========================
# Logs
# ===========================
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Personal notes
OPUS_ANALYSIS_AND_IDEAS.md
# ===========================
# Git Worktrees (parallel builds)
# ===========================
.worktrees/
# Documentation
docs/
# ===========================
# Auto Claude Generated
# ===========================
.auto-claude/
.auto-build-security.json
.auto-claude-security.json
.auto-claude-status
.claude_settings.json
.update-metadata.json
# Python
# ===========================
# Python (apps/backend)
# ===========================
__pycache__/
*.py[cod]
*$py.class
@@ -33,25 +71,19 @@ __pycache__/
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
/lib/
/lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Virtual environments
.venv/
venv/
ENV/
env/
.conda/
# Testing
.pytest_cache/
@@ -64,26 +96,69 @@ coverage.xml
*.py,cover
.hypothesis/
# mypy
# Type checking
.mypy_cache/
.dmypy.json
dmypy.json
.pytype/
.pyre/
# Auto-build generated files
.auto-build-security.json
.auto-claude-security.json
.auto-claude-status
.claude_settings.json
.update-metadata.json
# ===========================
# Node.js (apps/frontend)
# ===========================
node_modules/
.npm
.yarn/
.pnp.*
# Development of Auto Build with Auto Build
# Build output
dist/
out/
*.tsbuildinfo
# Cache
.cache/
.parcel-cache/
.turbo/
.eslintcache
.prettiercache
# ===========================
# Electron
# ===========================
apps/frontend/dist/
apps/frontend/out/
*.asar
*.blockmap
*.snap
*.deb
*.rpm
*.AppImage
*.dmg
*.exe
*.msi
# ===========================
# Testing
# ===========================
coverage/
.nyc_output/
test-results/
playwright-report/
playwright/.cache/
# ===========================
# Misc
# ===========================
*.local
*.bak
*.tmp
*.temp
# Development
dev/
.auto-claude/
_bmad/
_bmad-output/
.claude/
/docs
_bmad
_bmad-output
.claude
OPUS_ANALYSIS_AND_IDEAS.md
+73
View File
@@ -0,0 +1,73 @@
#!/bin/sh
# Commit message validation
# Enforces conventional commit format: type(scope): description
#
# Valid types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
# Examples:
# feat(tasks): add drag and drop support
# fix(terminal): resolve scroll position issue
# docs: update README with setup instructions
# chore: update dependencies
commit_msg_file=$1
commit_msg=$(cat "$commit_msg_file")
# Regex for conventional commits
# Format: type(optional-scope): description
pattern="^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([a-z0-9-]+\))?: .{1,100}$"
# Allow merge commits
if echo "$commit_msg" | grep -qE "^Merge "; then
exit 0
fi
# Allow revert commits
if echo "$commit_msg" | grep -qE "^Revert "; then
exit 0
fi
# Check first line against pattern
first_line=$(echo "$commit_msg" | head -n 1)
if ! echo "$first_line" | grep -qE "$pattern"; then
echo ""
echo "ERROR: Invalid commit message format!"
echo ""
echo "Your message: $first_line"
echo ""
echo "Expected format: type(scope): description"
echo ""
echo "Valid types:"
echo " feat - A new feature"
echo " fix - A bug fix"
echo " docs - Documentation changes"
echo " style - Code style changes (formatting, semicolons, etc.)"
echo " refactor - Code refactoring (no feature/fix)"
echo " perf - Performance improvements"
echo " test - Adding or updating tests"
echo " build - Build system or dependencies"
echo " ci - CI/CD configuration"
echo " chore - Other changes (maintenance)"
echo " revert - Reverting a previous commit"
echo ""
echo "Examples:"
echo " feat(tasks): add drag and drop support"
echo " fix(terminal): resolve scroll position issue"
echo " docs: update README"
echo " chore: update dependencies"
echo ""
exit 1
fi
# Check description length (max 100 chars for first line)
if [ ${#first_line} -gt 100 ]; then
echo ""
echo "ERROR: Commit message first line is too long!"
echo "Maximum: 100 characters"
echo "Current: ${#first_line} characters"
echo ""
exit 1
fi
exit 0
+93 -3
View File
@@ -1,6 +1,96 @@
#!/bin/sh
# Run lint-staged in auto-claude-ui if there are staged files there
if git diff --cached --name-only | grep -q "^auto-claude-ui/"; then
cd auto-claude-ui && pnpm exec lint-staged
echo "Running pre-commit checks..."
# =============================================================================
# BACKEND CHECKS (Python) - Run first, before frontend
# =============================================================================
# Check if there are staged Python files in apps/backend
if git diff --cached --name-only | grep -q "^apps/backend/.*\.py$"; then
echo "Python changes detected, running backend checks..."
# Run ruff linting
echo "Running ruff lint..."
ruff check apps/backend/ --fix
if [ $? -ne 0 ]; then
echo "Ruff lint failed. Please fix Python linting errors before committing."
exit 1
fi
# Run ruff format check
echo "Running ruff format check..."
ruff format apps/backend/ --check
if [ $? -ne 0 ]; then
echo "Ruff format check failed. Run 'ruff format apps/backend/' to fix."
exit 1
fi
# Run pytest (skip slow/integration tests and Windows-incompatible tests for pre-commit speed)
echo "Running Python tests..."
cd apps/backend
# Tests to skip: graphiti (external deps), merge_file_tracker/service_orchestrator/worktree/workspace (Windows path/git issues)
IGNORE_TESTS="--ignore=../../tests/test_graphiti.py --ignore=../../tests/test_merge_file_tracker.py --ignore=../../tests/test_service_orchestrator.py --ignore=../../tests/test_worktree.py --ignore=../../tests/test_workspace.py"
if [ -d ".venv" ]; then
# Use venv if it exists
if [ -f ".venv/bin/pytest" ]; then
PYTHONPATH=. .venv/bin/pytest ../../tests/ -v --tb=short -x -m "not slow and not integration" $IGNORE_TESTS
elif [ -f ".venv/Scripts/pytest.exe" ]; then
# Windows
PYTHONPATH=. .venv/Scripts/pytest.exe ../../tests/ -v --tb=short -x -m "not slow and not integration" $IGNORE_TESTS
else
PYTHONPATH=. python -m pytest ../../tests/ -v --tb=short -x -m "not slow and not integration" $IGNORE_TESTS
fi
else
PYTHONPATH=. python -m pytest ../../tests/ -v --tb=short -x -m "not slow and not integration" $IGNORE_TESTS
fi
if [ $? -ne 0 ]; then
echo "Python tests failed. Please fix failing tests before committing."
exit 1
fi
cd ../..
echo "Backend checks passed!"
fi
# =============================================================================
# FRONTEND CHECKS (TypeScript/React)
# =============================================================================
# Check if there are staged files in apps/frontend
if git diff --cached --name-only | grep -q "^apps/frontend/"; then
echo "Frontend changes detected, running frontend checks..."
cd apps/frontend
# Run lint-staged (handles staged .ts/.tsx files)
npm exec lint-staged
# Run TypeScript type check
echo "Running type check..."
npm run typecheck
if [ $? -ne 0 ]; then
echo "Type check failed. Please fix TypeScript errors before committing."
exit 1
fi
# Run linting
echo "Running lint..."
npm run lint
if [ $? -ne 0 ]; then
echo "Lint failed. Run 'npm run lint:fix' to auto-fix issues."
exit 1
fi
# Check for vulnerabilities (only high severity)
echo "Checking for vulnerabilities..."
npm audit --audit-level=high
if [ $? -ne 0 ]; then
echo "High severity vulnerabilities found. Run 'npm audit fix' to resolve."
exit 1
fi
cd ../..
echo "Frontend checks passed!"
fi
echo "All pre-commit checks passed!"
+18 -8
View File
@@ -1,29 +1,39 @@
repos:
# Python linting (auto-claude/)
# Python linting (apps/backend/)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
hooks:
- id: ruff
args: [--fix]
files: ^auto-claude/
files: ^apps/backend/
- id: ruff-format
files: ^auto-claude/
files: ^apps/backend/
# Frontend linting (auto-claude-ui/)
# Python tests (apps/backend/) - skip slow/integration tests for pre-commit speed
- repo: local
hooks:
- id: pytest
name: Python Tests
entry: bash -c 'cd apps/backend && PYTHONPATH=. python -m pytest ../../tests/ -v --tb=short -x -m "not slow and not integration" --ignore=../../tests/test_graphiti.py'
language: system
files: ^(apps/backend/.*\.py$|tests/.*\.py$)
pass_filenames: false
# Frontend linting (apps/frontend/)
- repo: local
hooks:
- id: eslint
name: ESLint
entry: bash -c 'cd auto-claude-ui && pnpm lint'
entry: bash -c 'cd apps/frontend && npm run lint'
language: system
files: ^auto-claude-ui/.*\.(ts|tsx|js|jsx)$
files: ^apps/frontend/.*\.(ts|tsx|js|jsx)$
pass_filenames: false
- id: typecheck
name: TypeScript Check
entry: bash -c 'cd auto-claude-ui && pnpm typecheck'
entry: bash -c 'cd apps/frontend && npm run typecheck'
language: system
files: ^auto-claude-ui/.*\.(ts|tsx)$
files: ^apps/frontend/.*\.(ts|tsx)$
pass_filenames: false
# General checks
+70 -49
View File
@@ -9,89 +9,109 @@ Auto Claude is a multi-agent autonomous coding framework that builds software th
## Commands
### Setup
**Requirements:**
- Python 3.12+ (required for backend)
- Node.js (for frontend)
```bash
# Install dependencies (from auto-claude/)
uv venv && uv pip install -r requirements.txt
# Or: python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt
# Install all dependencies from root
npm run install:all
# Or install separately:
# Backend (from apps/backend/)
cd apps/backend && uv venv && uv pip install -r requirements.txt
# Frontend (from apps/frontend/)
cd apps/frontend && npm install
# Set up OAuth token
claude setup-token
# Add to auto-claude/.env: CLAUDE_CODE_OAUTH_TOKEN=your-token
# Add to apps/backend/.env: CLAUDE_CODE_OAUTH_TOKEN=your-token
```
### Creating and Running Specs
```bash
cd apps/backend
# Create a spec interactively
python auto-claude/spec_runner.py --interactive
python spec_runner.py --interactive
# Create spec from task description
python auto-claude/spec_runner.py --task "Add user authentication"
python spec_runner.py --task "Add user authentication"
# Force complexity level (simple/standard/complex)
python auto-claude/spec_runner.py --task "Fix button" --complexity simple
python spec_runner.py --task "Fix button" --complexity simple
# Run autonomous build
python auto-claude/run.py --spec 001
python run.py --spec 001
# List all specs
python auto-claude/run.py --list
python run.py --list
```
### Workspace Management
```bash
cd apps/backend
# Review changes in isolated worktree
python auto-claude/run.py --spec 001 --review
python run.py --spec 001 --review
# Merge completed build into project
python auto-claude/run.py --spec 001 --merge
python run.py --spec 001 --merge
# Discard build
python auto-claude/run.py --spec 001 --discard
python run.py --spec 001 --discard
```
### QA Validation
```bash
cd apps/backend
# Run QA manually
python auto-claude/run.py --spec 001 --qa
python run.py --spec 001 --qa
# Check QA status
python auto-claude/run.py --spec 001 --qa-status
python run.py --spec 001 --qa-status
```
### Testing
```bash
# Install test dependencies (required first time)
cd auto-claude && uv pip install -r ../tests/requirements-test.txt
cd apps/backend && uv pip install -r ../../tests/requirements-test.txt
# Run all tests (use virtual environment pytest)
auto-claude/.venv/bin/pytest tests/ -v
apps/backend/.venv/bin/pytest tests/ -v
# Run single test file
auto-claude/.venv/bin/pytest tests/test_security.py -v
apps/backend/.venv/bin/pytest tests/test_security.py -v
# Run specific test
auto-claude/.venv/bin/pytest tests/test_security.py::test_bash_command_validation -v
apps/backend/.venv/bin/pytest tests/test_security.py::test_bash_command_validation -v
# Skip slow tests
auto-claude/.venv/bin/pytest tests/ -m "not slow"
apps/backend/.venv/bin/pytest tests/ -m "not slow"
# Or from root
npm run test:backend
```
### Spec Validation
```bash
python auto-claude/validate_spec.py --spec-dir auto-claude/specs/001-feature --checkpoint all
python apps/backend/validate_spec.py --spec-dir apps/backend/specs/001-feature --checkpoint all
```
### Releases
```bash
# Automated version bump and release (recommended)
node scripts/bump-version.js patch # 2.5.5 -> 2.5.6
node scripts/bump-version.js minor # 2.5.5 -> 2.6.0
node scripts/bump-version.js major # 2.5.5 -> 3.0.0
node scripts/bump-version.js 2.6.0 # Set specific version
node scripts/bump-version.js patch # 2.8.0 -> 2.8.1
node scripts/bump-version.js minor # 2.8.0 -> 2.9.0
node scripts/bump-version.js major # 2.8.0 -> 3.0.0
node scripts/bump-version.js 2.9.0 # Set specific version
# Then push to trigger GitHub release workflows
git push origin main
git push origin v2.6.0
git push origin v2.9.0
```
See [RELEASE.md](RELEASE.md) for detailed release process documentation.
@@ -111,18 +131,18 @@ See [RELEASE.md](RELEASE.md) for detailed release process documentation.
3. QA Reviewer validates acceptance criteria
4. QA Fixer resolves issues in a loop
### Key Components
### Key Components (apps/backend/)
- **client.py** - Claude SDK client with security hooks and tool permissions
- **security.py** + **project_analyzer.py** - Dynamic command allowlisting based on detected project stack
- **worktree.py** - Git worktree isolation for safe feature development
- **memory.py** - File-based session memory (primary, always-available storage)
- **graphiti_memory.py** - Optional graph-based cross-session memory with semantic search
- **graphiti_memory.py** - Graph-based cross-session memory with semantic search
- **graphiti_providers.py** - Multi-provider factory for Graphiti (OpenAI, Anthropic, Azure, Ollama, Google AI)
- **graphiti_config.py** - Configuration and validation for Graphiti integration
- **linear_updater.py** - Optional Linear integration for progress tracking
### Agent Prompts (auto-claude/prompts/)
### Agent Prompts (apps/backend/prompts/)
| Prompt | Purpose |
|--------|---------|
@@ -139,7 +159,7 @@ See [RELEASE.md](RELEASE.md) for detailed release process documentation.
### Spec Directory Structure
Each spec in `auto-claude/specs/XXX-name/` contains:
Each spec in `.auto-claude/specs/XXX-name/` contains:
- `spec.md` - Feature specification
- `requirements.json` - Structured user requirements
- `context.json` - Discovered codebase context
@@ -188,35 +208,36 @@ Dual-layer memory architecture:
- Human-readable files in `specs/XXX/memory/`
- Session insights, patterns, gotchas, codebase map
**Graphiti Memory (Optional Enhancement)** - `graphiti_memory.py`
**Graphiti Memory** - `graphiti_memory.py`
- Graph database with semantic search (LadybugDB - embedded, no Docker)
- Cross-session context retrieval
- Requires Python 3.12+
- Multi-provider support:
- LLM: OpenAI, Anthropic, Azure OpenAI, Ollama, Google AI (Gemini)
- Embedders: OpenAI, Voyage AI, Azure OpenAI, Ollama, Google AI
```bash
# Setup (requires Python 3.12+)
pip install real_ladybug graphiti-core
```
Enable with: `GRAPHITI_ENABLED=true` + provider credentials. See `.env.example`.
- Configure with provider credentials in `.env.example`
## Project Structure
Auto Claude can be used in two ways:
**As a standalone CLI tool** (original project):
```bash
python auto-claude/run.py --spec 001
```
auto-claude/
├── apps/
│ ├── backend/ # Python backend/CLI (the framework code)
│ └── frontend/ # Electron desktop UI
├── guides/ # Documentation
├── tests/ # Test suite
└── scripts/ # Build and utility scripts
```
**With the optional Electron frontend** (`auto-claude-ui/`):
- Provides a GUI for task management and progress tracking
- Wraps the CLI commands - the backend works independently
**As a standalone CLI tool**:
```bash
cd apps/backend
python run.py --spec 001
```
**With the Electron frontend**:
```bash
npm start # Build and run desktop app
npm run dev # Run in development mode
```
**Directory layout:**
- `auto-claude/` - Python backend/CLI (the framework code)
- `auto-claude-ui/` - Optional Electron frontend
- `.auto-claude/specs/` - Per-project data (specs, plans, QA reports) - gitignored
+152 -58
View File
@@ -5,6 +5,7 @@ Thank you for your interest in contributing to Auto Claude! This document provid
## Table of Contents
- [Prerequisites](#prerequisites)
- [Quick Start](#quick-start)
- [Development Setup](#development-setup)
- [Python Backend](#python-backend)
- [Electron Frontend](#electron-frontend)
@@ -30,37 +31,77 @@ Thank you for your interest in contributing to Auto Claude! This document provid
Before contributing, ensure you have the following installed:
- **Python 3.8+** - For the backend framework
- **Node.js 18+** - For the Electron frontend
- **pnpm** - Package manager for the frontend (`npm install -g pnpm`)
- **Python 3.12+** - For the backend framework
- **Node.js 24+** - For the Electron frontend
- **npm 10+** - Package manager for the frontend (comes with Node.js)
- **uv** (recommended) or **pip** - Python package manager
- **Git** - Version control
### Installing Python 3.12
**Windows:**
```bash
winget install Python.Python.3.12
```
**macOS:**
```bash
brew install python@3.12
```
**Linux (Ubuntu/Debian):**
```bash
sudo apt install python3.12 python3.12-venv
```
## Quick Start
The fastest way to get started:
```bash
# Clone the repository
git clone https://github.com/AndyMik90/Auto-Claude.git
cd Auto-Claude
# Install all dependencies (cross-platform)
npm run install:all
# Run in development mode
npm run dev
# Or build and run production
npm start
```
## Development Setup
The project consists of two main components:
1. **Python Backend** (`auto-claude/`) - The core autonomous coding framework
2. **Electron Frontend** (`auto-claude-ui/`) - Optional desktop UI
1. **Python Backend** (`apps/backend/`) - The core autonomous coding framework
2. **Electron Frontend** (`apps/frontend/`) - Optional desktop UI
### Python Backend
The recommended way is to use `npm run install:backend`, but you can also set up manually:
```bash
# Navigate to the auto-claude directory
cd auto-claude
# Navigate to the backend directory
cd apps/backend
# Create virtual environment (using uv - recommended)
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -r requirements.txt
# Create virtual environment
# Windows:
py -3.12 -m venv .venv
.venv\Scripts\activate
# Or using standard Python
python3 -m venv .venv
# macOS/Linux:
python3.12 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Install test dependencies
pip install -r ../tests/requirements-test.txt
pip install -r ../../tests/requirements-test.txt
# Set up environment
cp .env.example .env
@@ -70,31 +111,31 @@ cp .env.example .env
### Electron Frontend
```bash
# Navigate to the UI directory
cd auto-claude-ui
# Navigate to the frontend directory
cd apps/frontend
# Install dependencies
pnpm install
npm install
# Start development server
pnpm dev
npm run dev
# Build for production
pnpm build
npm run build
# Package for distribution
pnpm package
npm run package
```
## Running from Source
If you want to run Auto Claude from source (for development or testing unreleased features), follow these steps:
### Step 1: Clone and Set Up Python Backend
### Step 1: Clone and Set Up
```bash
git clone https://github.com/AndyMik90/Auto-Claude.git
cd Auto-Claude/auto-claude
cd Auto-Claude/apps/backend
# Using uv (recommended)
uv venv && uv pip install -r requirements.txt
@@ -105,6 +146,7 @@ source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
# Set up environment
cd apps/backend
cp .env.example .env
# Edit .env and add your CLAUDE_CODE_OAUTH_TOKEN (get it via: claude setup-token)
```
@@ -112,16 +154,16 @@ cp .env.example .env
### Step 2: Run the Desktop UI
```bash
cd ../auto-claude-ui
cd ../frontend
# Install dependencies
pnpm install
npm install
# Development mode (hot reload)
pnpm dev
npm run dev
# Or production build
pnpm run build && pnpm run start
npm run build && npm run start
```
<details>
@@ -132,7 +174,7 @@ Auto Claude automatically downloads prebuilt binaries for Windows. If prebuilts
1. Download [Visual Studio Build Tools 2022](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
2. Select "Desktop development with C++" workload
3. In "Individual Components", add "MSVC v143 - VS 2022 C++ x64/x86 Spectre-mitigated libs"
4. Restart terminal and run `pnpm install` again
4. Restart terminal and run `npm install` again
</details>
@@ -158,10 +200,10 @@ When you commit, the following checks run automatically:
| Check | Scope | Description |
|-------|-------|-------------|
| **ruff** | `auto-claude/` | Python linter with auto-fix |
| **ruff-format** | `auto-claude/` | Python code formatter |
| **eslint** | `auto-claude-ui/` | TypeScript/React linter |
| **typecheck** | `auto-claude-ui/` | TypeScript type checking |
| **ruff** | `apps/backend/` | Python linter with auto-fix |
| **ruff-format** | `apps/backend/` | Python code formatter |
| **eslint** | `apps/frontend/` | TypeScript/React linter |
| **typecheck** | `apps/frontend/` | TypeScript type checking |
| **trailing-whitespace** | All files | Removes trailing whitespace |
| **end-of-file-fixer** | All files | Ensures files end with newline |
| **check-yaml** | All files | Validates YAML syntax |
@@ -218,7 +260,7 @@ def gnc(sd):
### TypeScript/React
- Use TypeScript strict mode
- Follow the existing component patterns in `auto-claude-ui/src/`
- Follow the existing component patterns in `apps/frontend/src/`
- Use functional components with hooks
- Prefer named exports over default exports
- Use the UI components from `src/renderer/components/ui/`
@@ -248,20 +290,25 @@ export default function(props) {
### Python Tests
```bash
# Run all tests
pytest tests/ -v
# Run all tests (from repository root)
npm run test:backend
# Or manually with pytest
cd apps/backend
.venv/Scripts/pytest.exe ../tests -v # Windows
.venv/bin/pytest ../tests -v # macOS/Linux
# Run a specific test file
pytest tests/test_security.py -v
npm run test:backend -- tests/test_security.py -v
# Run a specific test
pytest tests/test_security.py::test_bash_command_validation -v
npm run test:backend -- tests/test_security.py::test_bash_command_validation -v
# Skip slow tests
pytest tests/ -m "not slow"
npm run test:backend -- -m "not slow"
# Run with coverage
pytest tests/ --cov=auto-claude --cov-report=html
pytest tests/ --cov=apps/backend --cov-report=html
```
Test configuration is in `tests/pytest.ini`.
@@ -269,26 +316,26 @@ Test configuration is in `tests/pytest.ini`.
### Frontend Tests
```bash
cd auto-claude-ui
cd apps/frontend
# Run unit tests
pnpm test
npm test
# Run tests in watch mode
pnpm test:watch
npm run test:watch
# Run with coverage
pnpm test:coverage
npm run test:coverage
# Run E2E tests (requires built app)
pnpm build
pnpm test:e2e
npm run build
npm run test:e2e
# Run linting
pnpm lint
npm run lint
# Run type checking
pnpm typecheck
npm run typecheck
```
### Testing Requirements
@@ -326,15 +373,15 @@ Before a PR can be merged:
```bash
# Python tests
cd auto-claude
cd apps/backend
source .venv/bin/activate
pytest ../tests/ -v
pytest ../../tests/ -v
# Frontend tests
cd auto-claude-ui
pnpm test
pnpm lint
pnpm typecheck
cd apps/frontend
npm test
npm run lint
npm run typecheck
```
## Git Workflow
@@ -378,6 +425,7 @@ Use descriptive branch names with a prefix indicating the type of change:
|--------|---------|---------|
| `feature/` | New feature | `feature/add-dark-mode` |
| `fix/` | Bug fix | `fix/memory-leak-in-worker` |
| `hotfix/` | Urgent production fix | `hotfix/critical-crash-fix` |
| `docs/` | Documentation | `docs/update-readme` |
| `refactor/` | Code refactoring | `refactor/simplify-auth-flow` |
| `test/` | Test additions/fixes | `test/add-integration-tests` |
@@ -443,6 +491,52 @@ git branch -d release/v2.8.0
git push origin --delete release/v2.8.0
```
### Hotfix Workflow
For urgent production fixes that can't wait for the normal release cycle:
**1. Create hotfix from main**
```bash
git checkout main
git pull origin main
git checkout -b hotfix/150-critical-fix
```
**2. Fix the issue**
```bash
# ... make changes ...
git commit -m "hotfix: fix critical crash on startup"
```
**3. Open PR to main (fast-track review)**
```bash
gh pr create --base main --title "hotfix: fix critical crash on startup"
```
**4. After merge to main, sync to develop**
```bash
git checkout develop
git pull origin develop
git merge main
git push origin develop
```
```
main ─────●─────●─────●─────●───── (production)
↑ ↑ ↑ ↑
develop ──●─────●─────●─────●───── (integration)
↑ ↑ ↑
feature/123 ────●
feature/124 ──────────●
hotfix/125 ─────────────────●───── (from main, merge to both)
```
> **Note:** Hotfixes branch FROM `main` and merge TO `main` first, then sync back to `develop` to keep branches aligned.
### Commit Messages
Write clear, concise commit messages that explain the "why" behind changes:
@@ -487,11 +581,11 @@ git commit -m "WIP"
3. **Test thoroughly**:
```bash
# Python
pytest tests/ -v
# Python (from repository root)
npm run test:backend
# Frontend
cd auto-claude-ui && pnpm test && pnpm lint && pnpm typecheck
cd apps/frontend && npm test && npm run lint && npm run typecheck
```
4. **Update documentation** if your changes affect:
@@ -550,7 +644,7 @@ When requesting a feature:
Auto Claude consists of two main parts:
### Python Backend (`auto-claude/`)
### Python Backend (`apps/backend/`)
The core autonomous coding framework:
@@ -560,9 +654,9 @@ The core autonomous coding framework:
- **Memory**: `memory.py` (file-based), `graphiti_memory.py` (graph-based)
- **QA**: `qa_loop.py`, `prompts/qa_*.md`
### Electron Frontend (`auto-claude-ui/`)
### Electron Frontend (`apps/frontend/`)
Optional desktop interface:
Desktop interface:
- **Main Process**: `src/main/` - Electron main process, IPC handlers
- **Renderer**: `src/renderer/` - React UI components
+161 -208
View File
@@ -1,269 +1,222 @@
# Auto Claude
Your AI coding companion. Build features, fix bugs, and ship faster — with autonomous agents that plan, code, and validate for you.
**Autonomous multi-agent coding framework that plans, builds, and validates software for you.**
![Auto Claude Kanban Board](.github/assets/Auto-Claude-Kanban.png)
[![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/KCXaPBr4Dj)
[![Version](https://img.shields.io/badge/version-2.8.0-blue?style=flat-square)](https://github.com/AndyMik90/Auto-Claude/releases/latest)
[![License](https://img.shields.io/badge/license-AGPL--3.0-green?style=flat-square)](./agpl-3.0.txt)
[![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/KCXaPBr4Dj)
[![CI](https://img.shields.io/github/actions/workflow/status/AndyMik90/Auto-Claude/ci.yml?branch=main&style=flat-square&label=CI)](https://github.com/AndyMik90/Auto-Claude/actions)
## What It Does ✨
---
**Auto Claude is a desktop app that supercharges your AI coding workflow.** Whether you're a vibe coder just getting started or an experienced developer, Auto Claude meets you where you are.
## Download
- **Autonomous Tasks** — Describe what you want to build, and agents handle planning, coding, and validation while you focus on other work
- **Agent Terminals** — Run Claude Code in up to 12 terminals with a clean layout, smart naming based on context, and one-click task context injection
- **Safe by Default** — All work happens in git worktrees, keeping your main branch undisturbed until you're ready to merge
- **Self-Validating** — Built-in QA agents check their own work before you review
Get the latest pre-built release for your platform:
**The result?** 10x your output while maintaining code quality.
| Platform | Download | Notes |
|----------|----------|-------|
| **Windows** | [Auto-Claude-2.8.0.exe](https://github.com/AndyMik90/Auto-Claude/releases/latest) | Installer (NSIS) |
| **macOS (Apple Silicon)** | [Auto-Claude-2.8.0-arm64.dmg](https://github.com/AndyMik90/Auto-Claude/releases/latest) | M1/M2/M3 Macs |
| **macOS (Intel)** | [Auto-Claude-2.8.0-x64.dmg](https://github.com/AndyMik90/Auto-Claude/releases/latest) | Intel Macs |
| **Linux** | [Auto-Claude-2.8.0.AppImage](https://github.com/AndyMik90/Auto-Claude/releases/latest) | Universal |
| **Linux (Debian)** | [Auto-Claude-2.8.0.deb](https://github.com/AndyMik90/Auto-Claude/releases/latest) | Ubuntu/Debian |
## Key Features
> All releases include SHA256 checksums and VirusTotal scan results for security verification.
- **Parallel Agents**: Run multiple builds simultaneously while you focus on other work
- **Context Engineering**: Agents understand your codebase structure before writing code
- **Self-Validating**: Built-in QA loop catches issues before you review
- **Isolated Workspaces**: All work happens in git worktrees — your code stays safe
- **AI Merge Resolution**: Intelligent conflict resolution when merging back to main — no manual conflict fixing
- **Cross-Platform**: Desktop app runs on Mac, Windows, and Linux
- **Any Project Type**: Build web apps, APIs, CLIs — works with any software project
---
## Requirements
- **Claude Pro/Max subscription** - [Get one here](https://claude.ai/upgrade)
- **Claude Code CLI** - `npm install -g @anthropic-ai/claude-code`
- **Git repository** - Your project must be initialized as a git repo
- **Python 3.12+** - Required for the backend and Memory Layer
---
## Quick Start
### Download Auto Claude
Download the latest release for your platform from [GitHub Releases](https://github.com/AndyMik90/Auto-Claude/releases/latest):
| Platform | Download |
|----------|----------|
| **macOS (Apple Silicon M1-M4)** | `*-arm64.dmg` |
| **macOS (Intel)** | `*-x64.dmg` |
| **Windows** | `*.exe` |
| **Linux** | `*.AppImage` or `*.deb` |
> **Not sure which Mac?** Click the Apple menu () > "About This Mac". Look for "Chip" - M1/M2/M3/M4 = Apple Silicon, otherwise Intel.
### Prerequisites
Before using Auto Claude, you need:
1. **Claude Subscription** - Requires [Claude Pro or Max](https://claude.ai/upgrade) for Claude Code access
2. **Claude Code CLI** - Install with: `npm install -g @anthropic-ai/claude-code`
### Install and Run
1. **Download** the installer for your platform from the table above
2. **Install**:
- **macOS**: Open the `.dmg`, drag Auto Claude to Applications
- **Windows**: Run the `.exe` installer (see note below about security warning)
- **Linux**: Make the AppImage executable (`chmod +x`) and run it, or install the `.deb`
3. **Launch** Auto Claude
4. **Add your project** and start building!
<details>
<summary><b>Windows users:</b> Security warning when installing</summary>
The Windows installer is not yet code-signed, so you may see a "Windows protected your PC" warning from Microsoft Defender SmartScreen.
**To proceed:**
1. Click "More info"
2. Click "Run anyway"
This is safe — all releases are automatically scanned with VirusTotal before publishing. You can verify any installer by checking the **VirusTotal Scan Results** section in each [release's notes](https://github.com/AndyMik90/Auto-Claude/releases).
We're working on obtaining a code signing certificate for future releases.
</details>
> **Want to build from source?** See [CONTRIBUTING.md](CONTRIBUTING.md#running-from-source) for development setup.
1. **Download and install** the app for your platform
2. **Open your project** - Select a git repository folder
3. **Connect Claude** - The app will guide you through OAuth setup
4. **Create a task** - Describe what you want to build
5. **Watch it work** - Agents plan, code, and validate autonomously
---
## 🎯 Features
## Features
| Feature | Description |
|---------|-------------|
| **Autonomous Tasks** | Describe your goal; agents handle planning, implementation, and validation |
| **Parallel Execution** | Run multiple builds simultaneously with up to 12 agent terminals |
| **Isolated Workspaces** | All changes happen in git worktrees - your main branch stays safe |
| **Self-Validating QA** | Built-in quality assurance loop catches issues before you review |
| **AI-Powered Merge** | Automatic conflict resolution when integrating back to main |
| **Memory Layer** | Agents retain insights across sessions for smarter builds |
| **Cross-Platform** | Native desktop apps for Windows, macOS, and Linux |
| **Auto-Updates** | App updates automatically when new versions are released |
---
## Interface
### Kanban Board
Plan tasks and let AI handle the planning, coding, and validation — all in a visual interface. Track progress from "Planning" to "Done" while agents work autonomously.
Visual task management from planning through completion. Create tasks and monitor agent progress in real-time.
### Agent Terminals
AI-powered terminals with one-click task context injection. Spawn multiple agents for parallel work.
Spawn up to 12 AI-powered terminals for hands-on coding. Inject task context with a click, reference files from your project, and work rapidly across multiple sessions.
**Power users:** Connect multiple Claude Code subscriptions to run even more agents in parallel — perfect for teams or heavy workloads.
![Auto Claude Agent Terminals](.github/assets/Auto-Claude-Agents-terminals.png)
### Insights
Have a conversation about your project in a ChatGPT-style interface. Ask questions, get explanations, and explore your codebase through natural dialogue.
![Agent Terminals](.github/assets/Auto-Claude-Agents-terminals.png)
### Roadmap
AI-assisted feature planning with competitor analysis and audience targeting.
Based on your target audience, AI anticipates and plans the most impactful features you should focus on. Prioritize what matters most to your users.
![Roadmap](.github/assets/Auto-Claude-roadmap.png)
![Auto Claude Roadmap](.github/assets/Auto-Claude-roadmap.png)
### Ideation
Let AI help you create a project that shines. Rapidly understand your codebase and discover:
- Code improvements and refactoring opportunities
- Performance bottlenecks
- Security vulnerabilities
- Documentation gaps
- UI/UX enhancements
- Overall code quality issues
### Changelog
Write professional changelogs effortlessly. Generate release notes from completed Auto Claude tasks or integrate with GitHub to create masterclass changelogs automatically.
### Context
See exactly what Auto Claude understands about your project — the tech stack, file structure, patterns, and insights it uses to write better code.
### AI Merge Resolution
When your main branch evolves while a build is in progress, Auto Claude automatically resolves merge conflicts using AI — no manual `<<<<<<< HEAD` fixing required.
**How it works:**
1. **Git Auto-Merge First** — Simple non-conflicting changes merge instantly without AI
2. **Conflict-Only AI** — For actual conflicts, AI receives only the specific conflict regions (not entire files), achieving ~98% prompt reduction
3. **Parallel Processing** — Multiple conflicting files resolve simultaneously for faster merges
4. **Syntax Validation** — Every merge is validated before being applied
**The result:** A build that was 50+ commits behind main merges in seconds instead of requiring manual conflict resolution.
### Additional Features
- **Insights** - Chat interface for exploring your codebase
- **Ideation** - Discover improvements, performance issues, and vulnerabilities
- **Changelog** - Generate release notes from completed tasks
---
## CLI Usage (Terminal-Only)
For terminal-based workflows, headless servers, or CI/CD integration, see **[guides/CLI-USAGE.md](guides/CLI-USAGE.md)**.
## ⚙️ How It Works
Auto Claude focuses on three core principles: **context engineering** (understanding your codebase before writing code), **good coding standards** (following best practices and patterns), and **validation logic** (ensuring code works before you see it).
### The Agent Pipeline
**Phase 1: Spec Creation** (3-8 phases based on complexity)
Before any code is written, agents gather context and create a detailed specification:
1. **Discovery** — Analyzes your project structure and tech stack
2. **Requirements** — Gathers what you want to build through interactive conversation
3. **Research** — Validates external integrations against real documentation
4. **Context Discovery** — Finds relevant files in your codebase
5. **Spec Writer** — Creates a comprehensive specification document
6. **Spec Critic** — Self-critiques using extended thinking to find issues early
7. **Planner** — Breaks work into subtasks with dependencies
8. **Validation** — Ensures all outputs are valid before proceeding
**Phase 2: Implementation**
With a validated spec, coding agents execute the plan:
1. **Planner Agent** — Creates subtask-based implementation plan
2. **Coder Agent** — Implements subtasks one-by-one with verification
3. **QA Reviewer** — Validates all acceptance criteria
4. **QA Fixer** — Fixes issues in a self-healing loop (up to 50 iterations)
Each session runs with a fresh context window. Progress is tracked via `implementation_plan.json` and Git commits.
**Phase 3: Merge**
When you're ready to merge, AI handles any conflicts that arose while you were working:
1. **Conflict Detection** — Identifies files modified in both main and the build
2. **3-Tier Resolution** — Git auto-merge → Conflict-only AI → Full-file AI (fallback)
3. **Parallel Merge** — Multiple files resolve simultaneously
4. **Staged for Review** — Changes are staged but not committed, so you can review before finalizing
### 🔒 Security Model
Three-layer defense keeps your code safe:
- **OS Sandbox** — Bash commands run in isolation
- **Filesystem Restrictions** — Operations limited to project directory
- **Command Allowlist** — Only approved commands based on your project's stack
## Project Structure
```
your-project/
├── .worktrees/ # Created during build (git-ignored)
── auto-claude/ # Isolated workspace for AI coding
├── .auto-claude/ # Per-project data (specs, plans, QA reports)
│ ├── specs/ # Task specifications
│ ├── roadmap/ # Project roadmap
│ └── ideation/ # Ideas and planning
├── auto-claude/ # Python backend (framework code)
│ ├── run.py # Build entry point
│ ├── spec_runner.py # Spec creation orchestrator
│ ├── prompts/ # Agent prompt templates
│ └── ...
└── auto-claude-ui/ # Electron desktop application
└── ...
Auto-Claude/
├── apps/
── backend/ # Python agents, specs, QA pipeline
│ └── frontend/ # Electron desktop application
├── guides/ # Additional documentation
├── tests/ # Test suite
└── scripts/ # Build utilities
```
### Understanding the Folders
---
**You don't create these folders manually** - they serve different purposes:
## CLI Usage
- **`auto-claude/`** - The framework repository itself (clone this once from GitHub)
- **`.auto-claude/`** - Created automatically in YOUR project when you run Auto Claude (stores specs, plans, QA reports)
- **`.worktrees/`** - Temporary isolated workspaces created during builds (git-ignored, deleted after merge)
For headless operation, CI/CD integration, or terminal-only workflows:
**When using Auto Claude on your project:**
```bash
cd your-project/ # Your own project directory
python /path/to/auto-claude/run.py --spec 001
# Auto Claude creates .auto-claude/ automatically in your-project/
cd apps/backend
# Create a spec interactively
python spec_runner.py --interactive
# Run autonomous build
python run.py --spec 001
# Review and merge
python run.py --spec 001 --review
python run.py --spec 001 --merge
```
**When developing Auto Claude itself:**
See [guides/CLI-USAGE.md](guides/CLI-USAGE.md) for complete CLI documentation.
---
## Configuration
Create `apps/backend/.env` from the example:
```bash
git clone https://github.com/yourusername/auto-claude
cd auto-claude/ # You're working in the framework repo
cp apps/backend/.env.example apps/backend/.env
```
The `.auto-claude/` directory is gitignored and project-specific - you'll have one per project you use Auto Claude on.
## Environment Variables (CLI Only)
> **Desktop UI users:** These are configured through the app settings — no manual setup needed.
| Variable | Required | Description |
|----------|----------|-------------|
| `CLAUDE_CODE_OAUTH_TOKEN` | Yes | OAuth token from `claude setup-token` |
| `AUTO_BUILD_MODEL` | No | Model override (default: claude-opus-4-5-20251101) |
| `GRAPHITI_ENABLED` | No | Enable Memory Layer for cross-session context |
| `AUTO_BUILD_MODEL` | No | Override the default Claude model |
See `auto-claude/.env.example` for complete configuration options.
---
## 💬 Community
## Building from Source
Join our Discord to get help, share what you're building, and connect with other Auto Claude users:
For contributors and development:
[![Discord](https://img.shields.io/badge/Discord-Join%20Community-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/KCXaPBr4Dj)
```bash
# Clone the repository
git clone https://github.com/AndyMik90/Auto-Claude.git
cd Auto-Claude
## 🤝 Contributing
# Install all dependencies
npm run install:all
We welcome contributions! Whether it's bug fixes, new features, or documentation improvements.
# Run in development mode
npm run dev
See **[CONTRIBUTING.md](CONTRIBUTING.md)** for guidelines on how to get started.
# Or build and run
npm start
```
## Acknowledgments
**System requirements for building:**
- Node.js 24+
- Python 3.12+
- npm 10+
This framework was inspired by Anthropic's [Autonomous Coding Agent](https://github.com/anthropics/claude-quickstarts/tree/main/autonomous-coding). Thank you to the Anthropic team for their innovative work on autonomous coding systems.
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development setup.
---
## Security
Auto Claude uses a three-layer security model:
1. **OS Sandbox** - Bash commands run in isolation
2. **Filesystem Restrictions** - Operations limited to project directory
3. **Dynamic Command Allowlist** - Only approved commands based on detected project stack
All releases are:
- Scanned with VirusTotal before publishing
- Include SHA256 checksums for verification
- Code-signed where applicable (macOS)
---
## Available Scripts
| Command | Description |
|---------|-------------|
| `npm run install:all` | Install backend and frontend dependencies |
| `npm start` | Build and run the desktop app |
| `npm run dev` | Run in development mode with hot reload |
| `npm run package` | Package for current platform |
| `npm run package:mac` | Package for macOS |
| `npm run package:win` | Package for Windows |
| `npm run package:linux` | Package for Linux |
| `npm run lint` | Run linter |
| `npm test` | Run frontend tests |
| `npm run test:backend` | Run backend tests |
---
## Contributing
We welcome contributions! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for:
- Development setup instructions
- Code style guidelines
- Testing requirements
- Pull request process
---
## Community
- **Discord** - [Join our community](https://discord.gg/KCXaPBr4Dj)
- **Issues** - [Report bugs or request features](https://github.com/AndyMik90/Auto-Claude/issues)
- **Discussions** - [Ask questions](https://github.com/AndyMik90/Auto-Claude/discussions)
---
## License
**AGPL-3.0** - GNU Affero General Public License v3.0
This software is licensed under AGPL-3.0, which means:
Auto Claude is free to use. If you modify and distribute it, or run it as a service, your code must also be open source under AGPL-3.0.
- **Attribution Required**: You must give appropriate credit, provide a link to the license, and indicate if changes were made. When using Auto Claude, please credit the project.
- **Open Source Required**: If you modify this software and distribute it or run it as a service, you must release your source code under AGPL-3.0.
- **Network Use (Copyleft)**: If you run this software as a network service (e.g., SaaS), users interacting with it over a network must be able to receive the source code.
- **No Closed-Source Usage**: You cannot use this software in proprietary/closed-source projects without open-sourcing your entire project under AGPL-3.0.
**In simple terms**: You can use Auto Claude freely, but if you build on it, your code must also be open source under AGPL-3.0 and attribute this project. Closed-source commercial use requires a separate license.
For commercial licensing inquiries (closed-source usage), please contact the maintainers.
Commercial licensing available for closed-source use cases.
+3 -3
View File
@@ -30,7 +30,7 @@ We provide an automated script that handles version bumping, git commits, and ta
```
This script will:
- ✅ Update `auto-claude-ui/package.json` with the new version
- ✅ Update `apps/frontend/package.json` with the new version
- ✅ Create a git commit with the version change
- ✅ Create a git tag (e.g., `v2.5.6`)
- ⚠️ **NOT** push to remote (you control when to push)
@@ -71,7 +71,7 @@ We provide an automated script that handles version bumping, git commits, and ta
If you need to create a release manually, follow these steps **carefully** to avoid version mismatches:
1. **Update `auto-claude-ui/package.json`:**
1. **Update `apps/frontend/package.json`:**
```json
{
@@ -82,7 +82,7 @@ If you need to create a release manually, follow these steps **carefully** to av
2. **Commit the change:**
```bash
git add auto-claude-ui/package.json
git add apps/frontend/package.json
git commit -m "chore: bump version to 2.5.6"
```
@@ -117,9 +117,9 @@
# ELECTRON_DEBUG_PORT=9222
# =============================================================================
# GRAPHITI MEMORY INTEGRATION (OPTIONAL)
# GRAPHITI MEMORY INTEGRATION (REQUIRED)
# =============================================================================
# Enable Graphiti-based persistent memory layer for cross-session context
# Graphiti-based persistent memory layer for cross-session context
# retention. Uses LadybugDB as the embedded graph database.
#
# REQUIREMENTS:
@@ -133,8 +133,8 @@
# - Ollama (local, fully offline)
# - Google AI (Gemini)
# Enable Graphiti integration (default: false)
# GRAPHITI_ENABLED=true
# Graphiti is enabled by default. Set to false to disable memory features.
GRAPHITI_ENABLED=true
# =============================================================================
# GRAPHITI: Database Settings
@@ -61,3 +61,6 @@ Thumbs.db
# Tests (development only)
tests/
# Auto Claude data directory
.auto-claude/
+120
View File
@@ -0,0 +1,120 @@
# Auto Claude Backend
Autonomous coding framework powered by Claude AI. Builds software features through coordinated multi-agent sessions.
## Getting Started
### 1. Install
```bash
cd apps/backend
python -m pip install -r requirements.txt
```
### 2. Configure
```bash
cp .env.example .env
```
Set your Claude API token in `.env`:
```
CLAUDE_CODE_OAUTH_TOKEN=your-token-here
```
Get your token by running: `claude setup-token`
### 3. Run
```bash
# List available specs
python run.py --list
# Run a spec
python run.py --spec 001
```
## Requirements
- Python 3.10+
- Claude API token
## Commands
| Command | Description |
|---------|-------------|
| `--list` | List all specs |
| `--spec 001` | Run spec 001 |
| `--spec 001 --isolated` | Run in isolated workspace |
| `--spec 001 --direct` | Run directly in repo |
| `--spec 001 --merge` | Merge completed build |
| `--spec 001 --review` | Review build changes |
| `--spec 001 --discard` | Discard build |
| `--spec 001 --qa` | Run QA validation |
| `--list-worktrees` | List all worktrees |
| `--help` | Show all options |
## Configuration
Optional `.env` settings:
| Variable | Description |
|----------|-------------|
| `AUTO_BUILD_MODEL` | Override Claude model |
| `DEBUG=true` | Enable debug logging |
| `LINEAR_API_KEY` | Enable Linear integration |
| `GRAPHITI_ENABLED=true` | Enable memory system |
## Troubleshooting
**"tree-sitter not available"** - Safe to ignore, uses regex fallback.
**Missing module errors** - Run `python -m pip install -r requirements.txt`
**Debug mode** - Set `DEBUG=true DEBUG_LEVEL=2` before running.
---
## For Developers
### Project Structure
```
backend/
├── agents/ # AI agent execution
├── analysis/ # Code analysis
├── cli/ # Command-line interface
├── core/ # Core utilities
├── integrations/ # External services (Linear, Graphiti)
├── merge/ # Git merge handling
├── project/ # Project detection
├── prompts/ # Prompt templates
├── qa/ # QA validation
├── spec/ # Spec management
└── ui/ # Terminal UI
```
### Design Principles
- **SOLID** - Single responsibility, clean interfaces
- **DRY** - Shared utilities in `core/`
- **KISS** - Simple flat imports via facade modules
### Import Convention
```python
# Use facade modules for clean imports
from debug import debug, debug_error
from progress import count_subtasks
from workspace import setup_workspace
```
### Adding Features
1. Create module in appropriate folder
2. Export API in `__init__.py`
3. Add facade module at root if commonly imported
## License
AGPL-3.0
+23
View File
@@ -0,0 +1,23 @@
"""
Auto Claude Backend - Autonomous Coding Framework
==================================================
Multi-agent autonomous coding framework that builds software through
coordinated AI agent sessions.
This package provides:
- Autonomous agent execution for building features from specs
- Workspace isolation via git worktrees
- QA validation loops
- Memory management (Graphiti + file-based)
- Linear integration for project management
Quick Start:
python run.py --spec 001 # Run a spec
python run.py --list # List all specs
See README.md for full documentation.
"""
__version__ = "2.5.5"
__author__ = "Auto Claude Team"
+92
View File
@@ -0,0 +1,92 @@
"""
Agents Module
=============
Modular agent system for autonomous coding.
This module provides:
- run_autonomous_agent: Main coder agent loop
- run_followup_planner: Follow-up planner for completed specs
- Memory management (Graphiti + file-based fallback)
- Session management and post-processing
- Utility functions for git and plan management
Uses lazy imports to avoid circular dependencies.
"""
__all__ = [
# Main API
"run_autonomous_agent",
"run_followup_planner",
# Memory
"debug_memory_system_status",
"get_graphiti_context",
"save_session_memory",
"save_session_to_graphiti",
# Session
"run_agent_session",
"post_session_processing",
# Utils
"get_latest_commit",
"get_commit_count",
"load_implementation_plan",
"find_subtask_in_plan",
"find_phase_for_subtask",
"sync_plan_to_source",
# Constants
"AUTO_CONTINUE_DELAY_SECONDS",
"HUMAN_INTERVENTION_FILE",
]
def __getattr__(name):
"""Lazy imports to avoid circular dependencies."""
if name in ("AUTO_CONTINUE_DELAY_SECONDS", "HUMAN_INTERVENTION_FILE"):
from .base import AUTO_CONTINUE_DELAY_SECONDS, HUMAN_INTERVENTION_FILE
return locals()[name]
elif name == "run_autonomous_agent":
from .coder import run_autonomous_agent
return run_autonomous_agent
elif name in (
"debug_memory_system_status",
"get_graphiti_context",
"save_session_memory",
"save_session_to_graphiti",
):
from .memory_manager import (
debug_memory_system_status,
get_graphiti_context,
save_session_memory,
save_session_to_graphiti,
)
return locals()[name]
elif name == "run_followup_planner":
from .planner import run_followup_planner
return run_followup_planner
elif name in ("post_session_processing", "run_agent_session"):
from .session import post_session_processing, run_agent_session
return locals()[name]
elif name in (
"find_phase_for_subtask",
"find_subtask_in_plan",
"get_commit_count",
"get_latest_commit",
"load_implementation_plan",
"sync_plan_to_source",
):
from .utils import (
find_phase_for_subtask,
find_subtask_in_plan,
get_commit_count,
get_latest_commit,
load_implementation_plan,
sync_plan_to_source,
)
return locals()[name]
raise AttributeError(f"module 'agents' has no attribute '{name}'")
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
"""
Analyzer facade module.
Provides backward compatibility for scripts that import from analyzer.py at the root.
Actual implementation is in analysis/analyzer.py.
"""
from analysis.analyzer import (
ProjectAnalyzer,
ServiceAnalyzer,
analyze_project,
analyze_service,
main,
)
__all__ = [
"ServiceAnalyzer",
"ProjectAnalyzer",
"analyze_project",
"analyze_service",
"main",
]
if __name__ == "__main__":
main()
+36
View File
@@ -0,0 +1,36 @@
"""
Auto Claude tools module facade.
Provides MCP tools for agent operations.
Re-exports from agents.tools_pkg for clean imports.
"""
from agents.tools_pkg.models import ( # noqa: F401
ELECTRON_TOOLS,
TOOL_GET_BUILD_PROGRESS,
TOOL_GET_SESSION_CONTEXT,
TOOL_RECORD_DISCOVERY,
TOOL_RECORD_GOTCHA,
TOOL_UPDATE_QA_STATUS,
TOOL_UPDATE_SUBTASK_STATUS,
is_electron_mcp_enabled,
)
from agents.tools_pkg.permissions import get_allowed_tools # noqa: F401
from agents.tools_pkg.registry import ( # noqa: F401
create_auto_claude_mcp_server,
is_tools_available,
)
__all__ = [
"create_auto_claude_mcp_server",
"get_allowed_tools",
"is_tools_available",
"TOOL_UPDATE_SUBTASK_STATUS",
"TOOL_GET_BUILD_PROGRESS",
"TOOL_RECORD_DISCOVERY",
"TOOL_RECORD_GOTCHA",
"TOOL_GET_SESSION_CONTEXT",
"TOOL_UPDATE_QA_STATUS",
"ELECTRON_TOOLS",
"is_electron_mcp_enabled",
]
@@ -93,14 +93,76 @@ def list_specs(project_dir: Path, dev_mode: bool = False) -> list[dict]:
return specs
def print_specs_list(project_dir: Path, dev_mode: bool = False) -> None:
"""Print a formatted list of all specs."""
def print_specs_list(
project_dir: Path, dev_mode: bool = False, auto_create: bool = True
) -> None:
"""Print a formatted list of all specs.
Args:
project_dir: Project root directory
dev_mode: If True, use dev/auto-claude/specs/
auto_create: If True and no specs exist, automatically launch spec creation
"""
import subprocess
specs = list_specs(project_dir, dev_mode)
if not specs:
print("\nNo specs found.")
print("\nCreate your first spec:")
print(" claude /spec")
if auto_create:
# Get the backend directory and find spec_runner.py
backend_dir = Path(__file__).parent.parent
spec_runner = backend_dir / "runners" / "spec_runner.py"
# Find Python executable - use current interpreter
python_path = sys.executable
if spec_runner.exists() and python_path:
# Quick prompt for task description
print("\n" + "=" * 60)
print(" QUICK START")
print("=" * 60)
print("\nWhat do you want to build?")
print(
"(Enter a brief description, or press Enter for interactive mode)\n"
)
try:
task = input("> ").strip()
except (EOFError, KeyboardInterrupt):
print("\nCancelled.")
return
if task:
# Direct mode: create spec and start building
print(f"\nStarting build for: {task}\n")
subprocess.run(
[
python_path,
str(spec_runner),
"--task",
task,
"--complexity",
"simple",
"--auto-approve",
],
cwd=project_dir,
)
else:
# Interactive mode
print("\nLaunching interactive mode...\n")
subprocess.run(
[python_path, str(spec_runner), "--interactive"],
cwd=project_dir,
)
return
else:
print("\nCreate your first spec:")
print(" python runners/spec_runner.py --interactive")
else:
print("\nCreate your first spec:")
print(" python runners/spec_runner.py --interactive")
return
print("\n" + "=" * 70)
+25
View File
@@ -0,0 +1,25 @@
"""
Claude client module facade.
Provides Claude API client utilities.
Uses lazy imports to avoid circular dependencies.
"""
def __getattr__(name):
"""Lazy import to avoid circular imports with auto_claude_tools."""
from core import client as _client
return getattr(_client, name)
def create_client(*args, **kwargs):
"""Create a Claude client instance."""
from core.client import create_client as _create_client
return _create_client(*args, **kwargs)
__all__ = [
"create_client",
]
@@ -96,7 +96,7 @@ CONTEXT7_TOOLS = [
]
# Graphiti MCP tools for knowledge graph memory (when GRAPHITI_MCP_ENABLED is set)
# See: https://docs.falkordb.com/agentic-memory/graphiti-mcp-server.html
# See: https://github.com/getzep/graphiti
GRAPHITI_MCP_TOOLS = [
"mcp__graphiti-memory__search_nodes", # Search entity summaries
"mcp__graphiti-memory__search_facts", # Search relationships between entities
@@ -321,7 +321,7 @@ def create_client(
}
# Add Graphiti MCP server if enabled
# Requires running: docker run -d -p 8000:8000 falkordb/graphiti-knowledge-graph-mcp
# Graphiti MCP server for knowledge graph memory (uses embedded LadybugDB)
if graphiti_mcp_enabled:
mcp_servers["graphiti-memory"] = {
"type": "http",

Some files were not shown because too many files have changed in this diff Show More