mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-06-23 21:59:57 +02:00
codex quality run #1
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# AGENTS
|
||||
|
||||
You are a principal engineer working on this repo.
|
||||
|
||||
Goals, in order:
|
||||
1. Improve correctness and robustness before style.
|
||||
2. Pay down structural debt: architecture, module boundaries, testability.
|
||||
3. Only add tests when they increase confidence on critical paths.
|
||||
4. Avoid endless micro-optimizations, comment-churn, and renaming sprees.
|
||||
5. Preserve git history readability; avoid huge, partially-related edits.
|
||||
|
||||
Quality rules:
|
||||
- Prefer small, coherent refactors per change.
|
||||
- Avoid introducing new dependencies without strong justification.
|
||||
- Keep public APIs stable unless clearly unsafe or inconsistent.
|
||||
|
||||
Other rules:
|
||||
don't improve tests/logging/ui/
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
PROMPT="Ultrathink. You're a principal engineer. Do not ask me any questions. We need to improve the quality of this codebase. Implement improvements to codebase quality."
|
||||
MAX_ITERS=200
|
||||
MAX_EMPTY_RUNS=5
|
||||
CODEX_MODEL="gpt-5.1-codex-max"
|
||||
|
||||
empty_runs=0
|
||||
|
||||
for i in $(seq 1 "$MAX_ITERS"); do
|
||||
echo "=== Codex run #$i (empty runs: $empty_runs) ==="
|
||||
|
||||
# ONE-LINE EXEC CALL — bulletproof against continuation errors
|
||||
codex exec --full-auto --sandbox danger-full-access --model "$CODEX_MODEL" \
|
||||
"$PROMPT (iteration $i — focus on untouched areas, avoid reverts)"
|
||||
|
||||
git add -A
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes this round."
|
||||
empty_runs=$((empty_runs + 1))
|
||||
|
||||
if [ "$empty_runs" -ge "$MAX_EMPTY_RUNS" ]; then
|
||||
echo "Hit $MAX_EMPTY_RUNS empty runs. Stopping."
|
||||
break
|
||||
fi
|
||||
else
|
||||
empty_runs=0
|
||||
git commit --no-verify -m "codex quality run #$i"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user