session-commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSession Commit
会话提交
Analyze the current coding session, propose improvements to , and apply approved changes.
AGENTS.md分析当前编码会话,提出的优化建议并应用已获批的变更。
AGENTS.mdAvailable scripts
可用脚本
- - Checks whether required instruction files exist and optionally repairs missing files.
scripts/preflight.sh
- - 检查所需的指令文件是否存在,可选择修复缺失的文件。
scripts/preflight.sh
Workflow
工作流程
- Run preflight checks:
bash
bash scripts/preflight.sh- If preflight fails and user approves repairs, run:
bash
bash scripts/preflight.sh --fix- Read the current and build a mental map of existing sections.
AGENTS.md - Extract only durable learnings from the current session.
- Propose changes using the format in .
references/change-proposal-format.md - Wait for explicit user approval before applying any edits.
- Apply approved changes and merge with existing content.
- 执行预检检查:
bash
bash scripts/preflight.sh- 如果预检失败且用户同意修复,执行:
bash
bash scripts/preflight.sh --fix- 读取当前的,构建现有章节的逻辑映射。
AGENTS.md - 仅提取当前会话中可长期复用的经验。
- 按照中的格式提出变更建议。
references/change-proposal-format.md - 应用任何编辑前需等待用户明确批准。
- 应用已获批的变更并与现有内容合并。
What to capture
需要记录的内容
- Coding patterns and conventions established in the session
- Architecture decisions and reasoning that should persist
- Debugging playbooks and recurring gotchas
- Workflow preferences that improve future sessions
- 本次会话中确立的编码模式和规范
- 需要留存的架构决策及背后逻辑
- 调试手册和反复出现的问题点
- 可提升后续会话效率的工作流偏好
Guardrails
约束规则
- Do not capture transient implementation details that will age quickly.
- Prefer updating existing sections before creating new headings.
- Use concise bullet points rather than long paragraphs.
- Keep guidance tool-agnostic unless behavior differs by tool.
- If no meaningful learning occurred, report that and stop.
- 不要记录很快就会过时的临时实现细节。
- 优先更新现有章节,再考虑新增标题。
- 使用简洁的项目符号而非长段落。
- 除非不同工具的行为存在差异,否则指南应保持工具无关性。
- 如果没有产生有价值的经验,直接报告该情况并终止流程。
Pointer file behavior
指针文件行为
If , , or are missing or empty, create symlinks that point to .
CLAUDE.mdCODEX.mdGEMINI.mdAGENTS.md如果、或缺失或为空,创建指向的符号链接。
CLAUDE.mdCODEX.mdGEMINI.mdAGENTS.mdOutput contract
输出约定
- Proposal stage: output only proposed changes with explicit add/modify/remove counts.
- Apply stage: update only after explicit approval.
AGENTS.md - Completion stage: summarize what changed and where.
- 提案阶段:仅输出变更提案,附带明确的新增/修改/删除计数。
- 应用阶段:仅在获得明确批准后更新。
AGENTS.md - 完成阶段:总结变更内容和变更位置。