w-commit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Invocation requests a commit. Inspect staged and unstaged changes and the authorized task scope before staging anything. Follow git publish.
  1. Inspect the diff and distinguish task-owned changes from unrelated work, including pre-staged files. If the intended commit cannot be separated safely, clarify the file scope.
  2. Before staging: if behavior, commands, or conventions changed, matching MDX and nearest README must be in the diff (
    PRODUCT.md
    only if product facts changed); otherwise one line why not. Rely on commit hooks. Never the full pre-push suite.
  3. Stage explicit task-owned paths or hunks. Do not sweep unrelated or untracked work into the commit with a blanket add. Never
    git add -A
    . Never stage
    .env
    , credentials, or secrets.
  4. Write a Conventional Commit: lowercase type/scope, imperative summary of at most 60 characters, no period. Follow repository-specific scope conventions. Pass the message via a heredoc; commit with hooks enabled.
  5. Inspect the result and remaining working tree. Return commit ID and scope. A commit request alone does not authorize pushing.
调用请求提交。在暂存任何内容前,检查已暂存和未暂存的变更以及任务授权范围。遵循 git publish。
  1. 检查 diff,区分任务所属的变更与无关工作,包括已预先暂存的文件。如果无法安全地分离预期提交内容,请明确文件范围。
  2. 暂存前:如果行为、命令或约定发生变化,diff 中必须包含对应的 MDX 和最近的 README(仅当产品事实发生变化时才需要
    PRODUCT.md
    );否则用一行说明为什么不需要。依赖 commit hooks,绝不运行完整的 pre-push 测试套件。
  3. 明确暂存任务所属的文件路径或变更块。不要使用笼统的 add 将无关或未跟踪的工作加入提交。绝不执行
    git add -A
    ,绝不暂存
    .env
    、凭据或密钥。
  4. 编写 Conventional Commit:type/scope 使用小写字母,摘要采用祈使句且不超过 60 个字符,不加句号。遵循仓库特定的 scope 约定。通过 heredoc 传入提交信息;提交时启用 hooks。
  5. 检查提交结果和剩余工作区。返回 commit ID 和提交范围。仅有提交请求并不代表授权推送。