commit

Solid

提交当前变更到 Git。 当需要把已完成的工作落为一次 Git 提交时使用。

Code & Development 84 stars 5 forks Updated today MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 提交代码 > `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」:标准 AI 短名(`claude`/`codex`/`antigravity`/`opencode`/`cursor`)、长名归一化(`claude-code`→`claude`、`antigravity-cli`→`antigravity`)或人工例外 `human`。 在不覆盖用户本地工作的前提下创建 Git commit,并在需要时更新关联任务状态。 更新关联 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。 若入口业务操作数包含字面 `--orchestrated`,绑定 `{execution-flag}` = `--orchestrated`;否则绑定为空。不得从 run 文件或环境推断来源。 直接调用仍要求用户显式授权。编排调用只有在副作用前通过 commit intent 对 activated receipt 与一次性 `commitAuthorization` 的联合校验后才可继续,其他提交门禁保持不变。 ## 常见违规借口与反驳 | 借口 | 反驳 | |------|------| | 「测试之前跑过了,不用重跑」 | 暂存内容是最新现实;提交前必须重新核对 `git status`/`git diff`,不能凭记忆。 | | 「`git add -A` 更省事」 | 禁止 `git add -A`/`git add .`;只暂存明确列出的文件,避免带入无关改动。 | | 「改了带版权头的文件,年份先不动」 | 改了就更新版权年份(动态取 `date +%Y`),这是提交前的硬性检查。 | ## 任务上下文解析 > 入口允许省略 task ref,也接受旧位置 task ref 或 `--task <ref>` / `-t <ref>`。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用 `agent-infra-internal task-context resolve {task-scope}`;`{task-scope}` 为空、位置 ref 或 task flag 之一。只读取结构化结果的 `taskId`,后续把 `{task-id}` 绑定为该完整 `TASK-YYYYMMDD-HHMMSS`。解析失败时透传非零退出码,不自行扫描任务。 未显式指定 task scope 时,只有 `TASK_CONTEXT_NOT_FOUND` 可继续既有纯提交路径;detached HEAD、损坏候选或多匹配属于歧义,必须失败。显式 task scope 解析失败时一律失败。 ## 步骤开始:恢复或创建受控 attempt 已解析出 `{task-id}` 时,先调用 `agent-infra-internal task-orchestration {task-id} commit-status`: - `recoverable`:调用 `commit-recover --agent {standard-agent-token}` 完成收尾,不得重复 commit 或 push。 - `prepared`:调用 `commit-recover --agent {standard-agent-token}`...

Details

Author
fitlab-ai
Repository
fitlab-ai/agent-infra
Created
5 months ago
Last Updated
today
Language
TypeScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category