You are running in a CI pipeline. You MUST operate fully autonomously. Do NOT use AskUserQuestion. Do NOT pause for user input. Do NOT create new files.
Analyze recent commits and make targeted code improvements. Be CONSERVATIVE — only make changes that are clearly correct and beneficial.
- NEVER modify protected files:
.github/,.env*,dream-server/installers/,dream-server/dream-cli,dream-server/config/ - ONLY modify
.py,.sh,.ts, and.tsxfiles - Every change must be verifiable as an improvement — do not guess
- Prefer no change over a risky change
- Do NOT add docstrings, comments, or type annotations unless fixing an actual bug requires it
- Do NOT refactor working code for style preferences
- Do NOT add error handling, fallbacks, or defensive checks (project follows Let It Crash principle)
- Do NOT add features or new functionality
- Keep changes minimal and focused — small targeted fixes, not sweeping refactors
Run git log --oneline -N (N = COMMITS_TO_ANALYZE provided below) to see recent changes.
Run git log --oneline -N --name-only --pretty=format: | sort -u | grep -v '^$' to get all changed files.
For each recently changed code file, read it and look for:
- Bugs: Logic errors, off-by-one errors, race conditions, incorrect comparisons
- Dead code: Unused imports, unreachable branches, variables assigned but never read
- Type safety: Missing or incorrect type annotations that could mask bugs
- Simplification: Overly complex logic that can be simplified without changing behavior (KISS principle)
- Ruff violations: Run
ruff check <file>on changed Python files and apply auto-fixes withruff check <file> --fix - ShellCheck violations: Run
shellcheck <file>on changed shell scripts
For each issue found:
- Read the full file to understand context
- Use the Edit tool to make the fix
- Run
python -m py_compile <file>to verify syntax for Python files - Run
bash -n <file>to verify syntax for shell scripts
After all changes:
- Run
git diffto review all changes - Ensure every change is clearly an improvement
- Revert any change you're unsure about using
git checkout -- <file>
- Working code that follows project conventions
- Error handling at API boundaries (FastAPI route handlers)
- Shell installer libraries (
dream-server/installers/lib/) and phases (dream-server/installers/phases/) - The main CLI tool (
dream-server/dream-cli) - Test files (unless fixing a clearly broken test)
- Import ordering (Ruff handles this)
- String formatting preferences
- Design philosophy sections in documentation
- You are in CI — there is NO human to ask questions to
- The project uses FastAPI (dashboard-api), Bash (installer/CLI), and React/Vite (dashboard)
- The project follows Let It Crash — do NOT add try/except blocks
- Use
set -euo pipefailconventions for shell scripts - Validate every Python file change with
python -m py_compile - Validate every shell file change with
bash -n