|
| 1 | +# Playbook: Añadir docs/DEVELOPMENT.md con Gate Verde |
| 2 | + |
| 3 | +## 1) Crear archivo DEVELOPMENT.md |
| 4 | +mkdir -p docs |
| 5 | +cat > docs/DEVELOPMENT.md <<'EOFMD' |
| 6 | +# Development Guide — Always Green |
| 7 | + |
| 8 | +## Preflight (local) |
| 9 | +```bash |
| 10 | +poetry install --no-interaction |
| 11 | +poetry run ruff check . --fix |
| 12 | +poetry run ruff format . |
| 13 | +poetry run black . |
| 14 | +poetry run pytest -q |
| 15 | +``` |
| 16 | + |
| 17 | +## CI Replica (local) |
| 18 | +```bash |
| 19 | +export PYTHONPATH=src |
| 20 | +export PENDING_DIR="$(mktemp -d)" |
| 21 | +export PENDING_STORAGE="$PENDING_DIR/pending.json"; [ -f "$PENDING_STORAGE" ] || echo "{}" > "$PENDING_STORAGE" |
| 22 | +poetry run pytest -q |
| 23 | +``` |
| 24 | + |
| 25 | +## Policy |
| 26 | +- No push to `main`. |
| 27 | +- Open PR only when local checks are green. |
| 28 | +- Squash merge only with CI green. |
| 29 | +EOFMD |
| 30 | + |
| 31 | +## 2) Validar (Gate Verde) |
| 32 | +poetry install --no-interaction |
| 33 | +poetry run ruff check . --fix |
| 34 | +poetry run ruff format . |
| 35 | +poetry run black . |
| 36 | +poetry run pytest -q |
| 37 | + |
| 38 | +echo "[i] Si TODO está en verde, ejecutar Paso 3." |
| 39 | + |
| 40 | +## 3) Commit + Push + PR (solo si Paso 2 está OK) |
| 41 | +git add docs/DEVELOPMENT.md |
| 42 | +git commit -m "docs: add DEVELOPMENT guide with Always Green workflow" |
| 43 | +git push -u origin "$(git branch --show-current)" |
| 44 | + |
| 45 | +REPO="CoderDeltaLAN/ai-patch-verifier" |
| 46 | +gh pr create -R "$REPO" -t "docs: add DEVELOPMENT guide with Always Green workflow" -b "Adds a concise development guide: local preflight, CI replica, and merge policy. No code changes." |
| 47 | + |
| 48 | +gh pr checks -R "$REPO" --watch |
| 49 | +# merge squash solo cuando CI esté en verde |
| 50 | +# gh pr merge -R "$REPO" --squash --auto |
0 commit comments