Kasih agen kontrol penuh atas operasi git, panggilan API, dan interaksi eksternal. Setup lebih simpel, tapi butuh kepercayaan lebih.Contoh: Di cookbook Auto Update Documentation kita, workflow pertama ngebiarin agen buat:
Nganalisis perubahan PR
Bikin dan ngelola branch git
Commit dan push perubahan
Ngepost komentar di pull request
Nanganin semua skenario error
Copy
Ask AI
- name: Update docs (full autonomy) run: | cursor-agent -p "You have full access to git, GitHub CLI, and PR operations. Handle the entire docs update workflow including commits, pushes, and PR comments."
Kita saranin pakai pendekatan ini dengan pembatasan berbasis izin buat workflow CI production. Ini ngasih lo yang terbaik dari dua dunia: agen bisa dengan cerdas nangani analisis kompleks dan modifikasi file, sementara operasi kritikal tetap deterministik dan bisa diaudit.
Batesin operasi agen sambil mindahin langkah kritikal ke step workflow terpisah. Kontrol dan prediktabilitas jadi lebih baik.Contoh: Workflow kedua di cookbook yang sama ngebatesin agen cuma buat modifikasi file:
Copy
Ask AI
- name: Generate docs updates (restricted) run: | cursor-agent -p "IMPORTANT: Do NOT create branches, commit, push, or post PR comments. Only modify files in the working directory. A later workflow step handles publishing."- name: Publish docs branch (deterministic) run: | # Deterministic git operations handled by CI git checkout -B "docs/${{ github.head_ref }}" git add -A git commit -m "docs: update for PR" git push origin "docs/${{ github.head_ref }}"- name: Post PR comment (deterministic) run: | # Deterministic PR commenting handled by CI gh pr comment ${{ github.event.pull_request.number }} --body "Docs updated"