Individual skill

git-ops

Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving. Push reaches only the bare replica; prod-triggering tags are refused.

sdk/apc/skills/git-ops/SKILL.md

Read pinned source

Source commit f83b859a173802a73d978197e92328ab2bf57a6e

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
No
Repository scan complete
No
Skill scan complete
No
Observed behavior
Not checked yet
Last checked
Nov 3, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
1,364
Repository last updated
Oct 22, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# git-ops

收口一个本地 coding task 的 git 动作——在 workdir 上 `commit` / `branch` / `merge` / `push`,并把 branch+sha 落回 task metadata(`apc/05` §1 A2 · S8)。核心纪律:**merge 冲突绝不自动解决**——停手、列出冲突文件、escalate 给人,workdir 保持现场不回滚(`apc/00` §3 不变量 6)。

**什么时候用**:一个 coding task 改完,需要把改动收口成 commit / 分支、merge 回主线、并把 provenance(branch/sha)记到 task 上。

## 承重约束(先记死)

- **`commit` 不自动 stage**:`cloud git commit` 只提交**已 staged** 的内容。你必须先自己 `git add <task-owned files>`,只 stage 本 task 拥有的文件,别把无关改动带进去。
- **单任务串行不变量**:同一 repo 同时只有一个 coding task 在飞。别假设并发安全。
- **prod tag 禁止**:四个 prod 触发前缀(`k8s-prod-*` / `desktop-prod-*` / `prod-*` / `ali-k8s-prod-*`)的 tag push 被 daemon 拒(真闸是 GitLab protected tags)。
- **push 只到 bare 替身**:remote 必须是 daemon allowlist 里的**纯名字**(默认 `origin`,本地指向 bare 替身);URL / 带 `--` 的值一律被拒。无 `--force`。
- **provenance 写 metadata 要用 `--set-string`**:sha / branch 是字符串,用 `--set`(推断 JSON)会把全数字 sha 变成 number(40 位 sha 会被 `1.2e+39` 精度毁掉,7 位全数字 sha ≈3.7% 概率)。