Create Pull Request
Creates reviewer-friendly PR drafts for a repository selected from the active agent-harness project.
Quick start
- Read
.agents/harness/config/agent-harness.yaml, resolveactive_projects, and inspect the active project profiles relevant to the task. - Pick the target repository using this order: the repo named by the user; otherwise the repo owning the current file if it is unambiguous; otherwise the only repo in the active context; otherwise ask.
- Run git and gh commands in the target repository root, not in the
agent-harnessrepository root. - Save generated analysis and PR body files only under
.github/skills/create-pull-request/temp-files/inagent-harness. - Draft first and ask for approval before creating or updating the PR, unless the user explicitly asked for immediate creation.
Workflow
- Resolve the target repository path from the active context.
- Use
Push-Location/Pop-Locationor an equivalent directory stack when switching into the target repository. - Run
scripts/analyze_changes.pyfrom the target repository to produce the analysis JSON. - Choose the PR template from
assets/templates/based on branch intent, then runscripts/generate_pr_body.py. - Run
scripts/quality_checks.pybefore presenting or creating the PR. - Present the draft and warnings to the user, or create or update the PR immediately if the user explicitly asked for that fast path.
Guardrails
- Never run git or gh against the
agent-harnessrepository unless the PR is intentionally foragent-harnessitself. - Keep all temporary PR artifacts inside
temp-files/in this skill directory. - Treat a requested output language as binding for the final PR title and body.
- Preserve issue references, but only emit closing keywords when the PR targets the repository default branch.
- See REFERENCE.md for the full workflow, PowerShell examples, and error handling.