ワンクリックで
refacil-up-code
Push code and create PR for integration — git add, commit, push, and PR to the target branch
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Push code and create PR for integration — git add, commit, push, and PR to the target branch
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Guided complete flow to investigate and fix bugs — delegates investigation and fix to the refacil-debugger sub-agent in two passes separated by user confirmation
Internal reference — SDD-AI prerequisites shared by all other refacil skills (do not invoke manually)
Validate that the implementation meets the specs — builds a briefing with testCommand and CA/CR criteria, delegates to the refacil-validator sub-agent for the report, and handles corrections with user approval
Implement the tasks of a proposed change — verifies artifacts and working branch, builds a structured briefing, and delegates to the refacil-implementer sub-agent to execute the implementation in isolated context
Archive a completed change — move artifacts to archive and sync specs
Run the SDD implementation cycle autonomously after /refacil:propose was approved by the human — chains apply → test → verify → review → archive → up-code in a single invocation, and notifies the user via WhatsApp through Kapso when finished (success or failure). Use when the user says "autopilot", "ejecuta el resto del flujo", "termina solo", "modo autónomo", or indicates they will step away from the computer.
| name | refacil:up-code |
| description | Push code and create PR for integration — git add, commit, push, and PR to the target branch |
| user-invocable | true |
Pushes changes to the remote repository and generates the PR for integration.
Applies the branch and integration policy defined in refacil-prereqs/METHODOLOGY-CONTRACT.md (no exceptions).
Prerequisites: agents profile from refacil-prereqs/SKILL.md + rules from METHODOLOGY-CONTRACT.md (branch policy applies without exceptions).
Run git branch --show-current to get the branch name.
Run refacil-sdd-ai sdd config --json to obtain the effective protectedBranches list for this project.
If the command fails or exits non-zero, use the default list: master, main.
protectedBranches list, stop and inform the user:
Cannot push code from a protected branch ([name]).
Branch validation is done in /refacil:apply or /refacil:bug before writing code.
Switch to your working branch (feature/*, fix/*, etc.) and run /refacil:up-code again.
feature/*, fix/*, hotfix/*, refactor/*, etc.), continue.Autopilot mode detection: try to read refacil-sdd/.autopilot-active. If the file exists → autopilotMode = true, extract baseBranch and createPR from the file. Otherwise autopilotMode = false (normal mode, ask user as usual).
Before continuing, verify if there are active changes in refacil-sdd/changes/ (exclude the archive/ folder).
If there are active changes:
.review-passed file exists (hidden marker: METHODOLOGY-CONTRACT.md §8 — do not conclude from ls without -a)..review-passed → continue to step 3..review-passed:
/refacil:review <change-name> on that change..review-passed) → continue to step 3..review-passed:
/refacil:review <selected-change-name> only for that change.IMPORTANT: /refacil:review internally verifies if .review-passed exists and if there are changes after it. It only re-runs if it detects new changes after the last approved review.
If there is no refacil-sdd/changes/ folder or no active changes → continue to step 3 (nothing to review).
Run git status to verify if there are changes to push.
git status --short and show the user the list of detected files.autopilotMode = false (normal): ask the user for confirmation before staging:
git add -A.autopilotMode = true: run git add -A immediately — do NOT ask.$ARGUMENTS), use it as the commit message.git diff --staged --stat.git commit -m "[message]".Run git push -u origin [current-branch] to push the changes.
=== Code pushed ===
Branch: [branch-name]
Commit: [short-hash] [message]
Remote: origin/[branch-name]
Select target branch:
autopilotMode = false (normal): ask the user which branch to PR to, showing the protected branches list:
Which branch do you want to create the PR to?
Protected branches available: [list from sdd config --json]
Verify the chosen branch exists on the remote (git branch -r). If not, inform the user and ask to confirm or correct. Warn if not in the protected branches list.autopilotMode = true: use baseBranch from refacil-sdd/.autopilot-active as the target branch, and respect the createPR flag:
createPR = true → generate the PR link against baseBranch.createPR = false → skip PR creation entirely. Do NOT generate a link.Get the remote repository URL with git remote get-url origin and detect the VCS hosting used by this repository to generate the correct PR/MR link:
github.com): https://github.com/[owner]/[repo]/compare/[target-branch]...[current-branch]?expand=1bitbucket.org): https://bitbucket.org/[workspace]/[repo]/pull-requests/new?source=[current-branch]&dest=[target-branch]gitlab. or gitlab.com): https://[gitlab-host]/[group]/[repo]/-/merge_requests/new?merge_request[source_branch]=[current-branch]&merge_request[target_branch]=[target-branch]dev.azure.com or visualstudio.com): build the "create PR" URL for the detected project/repo using source and target branches.git@host:group/repo.git), extract host/namespace/repo from the segment after :.Show the generated link (provider-specific) to the user:
Create your PR here: [link]
Tip: PRing to a protected branch (e.g. one of those listed by `sdd config --json`) is recommended
before promoting to main/master.
This is the terminal step of the SDD flow. Do not ask for a next skill — the cycle closes here. Apply the terminal step rule from METHODOLOGY-CONTRACT.md §5.
METHODOLOGY-CONTRACT.md/refacil:apply or /refacil:bug, not here