diff --git a/AGENTS.md b/AGENTS.md index 81d8b41..f72bb71 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -67,9 +67,16 @@ Hard rule: - `git branch --set-upstream-to=origin/ ` - Create PR on Gitea: - `tea pr create --base main --head --title "" --description "<body>"` + - If PR body includes backticks (`` ` ``), slash commands, or markdown that can be shell-expanded, do not pass it directly in double quotes. + - Preferred safe flow: + - `cat > /tmp/pr_body.md <<'EOF'` ... `EOF` + - `tea pr create --base main --head <branch> --title "<title>" --description "$(cat /tmp/pr_body.md)"` + - If the body is malformed after creation, patch it with API: + - `tea api -X PATCH repos/{owner}/{repo}/pulls/<number> -F body=@/tmp/pr_body.md` - Sync local main: - `git checkout main` - `git pull --ff-only` + - When user confirms the PR is merged, always run this sync immediately to keep local `main` up to date before any next task. Safety: - Do not commit or print tokens in logs/docs.