Loading...
Loading...
Compare original and translation side by side
git statusgit branch --show-currentgit log --oneline -5mainmastergh auth statusghgit statusgit branch --show-currentgit log --oneline -5mainmastergh auth statusghNIGHT-LOG.md../<repo>-NIGHT-LOG.mdgit add -Areferences/night-log-template.mdNIGHT-LOG.md../<repo>-NIGHT-LOG.mdgit add -Areferences/night-log-template.md1. UNDERSTAND read code, docs, patterns, data flow, related tests
2. RESEARCH external APIs/libs — official docs, verify versions. Time-box it.
3. IMPLEMENT follow existing architecture and conventions
4. VALIDATE tests, typecheck, lint, build — actually run them
5. SELF-REVIEW read your own full diff against requirements
6. PR create it; review the diff; fix findings; watch CI
7. MERGE GATE see references/merge-gate.md — all gates pass → merge
8. VERIFY target branch healthy, post-merge CI green
9. NEXT related tests? edge cases? docs? related bug? → back to 11. 理解 阅读代码、文档、模式、数据流、相关测试
2. 调研 外部API/库——官方文档、验证版本。设置时间限制。
3. 实现 遵循现有架构和约定
4. 验证 测试、类型检查、lint、构建——实际运行这些命令
5. 自我评审 对照需求阅读完整的代码差异
6. PR 创建PR;评审差异;修复问题;关注CI状态
7. 合并闸门 查看references/merge-gate.md——所有闸门通过→合并
8. 验证 目标分支状态健康,合并后CI显示绿色
9. 下一步 相关测试?边缘情况?文档?相关bug?→回到步骤1| # | Rule |
|---|---|
| 1 | Never stop on ambiguity. Inspect → search docs → find similar code → research → infer → implement → document assumption. |
| 2 | Pick one. Multiple reasonable options → choose the one fitting existing architecture with least complexity. Do not ask. |
| 3 | A blocker blocks one thing, not the night. Record it, move to the next useful work. |
| 4 | PR opened ≠ done. You review it. You merge it. Never leave "PR opened — waiting for review." |
| 5 | Never fake green. No skipped tests, no loosened assertions, no mocked-away integration, no swallowed errors to make a suite pass. A real failure honestly reported beats a fake pass. |
| 6 | Never claim unverified. "Tests pass" requires having run them and seen the output. |
| 7 | Scope discipline. Necessary or clearly beneficial → do it. Merely interesting → leave it. No unrelated rewrites. |
| 8 | Destructive/irreversible stays blocked. Force-push shared branches, dropping data, deleting resources, prod deploys, rewriting others' history, secrets rotation — not authorized by "keep working". |
references/autonomy-scope.md| 序号 | 规则 |
|---|---|
| 1 | 永远不要因模糊性而停滞。 检查→搜索文档→查找相似代码→调研→推断→实现→记录假设。 |
| 2 | 选其一。 有多个合理选项时→选择最符合现有架构且复杂度最低的选项。不要询问。 |
| 3 | 阻塞仅针对单个事项,而非整晚工作。 记录阻塞,转而去做其他有效工作。 |
| 4 | PR创建≠完成。 你要评审它,你要合并它。永远不要停留在“PR已创建——等待评审”的状态。 |
| 5 | 永远不要伪造绿色状态。 不要跳过测试、放松断言、模拟掉集成逻辑、忽略错误来让测试套件通过。如实报告真实的失败比伪造通过更好。 |
| 6 | 永远不要声称未经验证的结果。 “测试通过”需要你实际运行并看到输出。 |
| 7 | 范围约束。 必要或明显有益的工作→去做。只是有趣的工作→留待以后。不要进行无关的重写。 |
| 8 | 破坏性/不可逆操作保持阻塞状态。 强制推送共享分支、删除数据、删除资源、生产环境部署、重写他人提交历史、密钥轮换——这些操作不属于“继续工作”授权范围。 |
references/autonomy-scope.mdNIGHT-LOG.mdreferences/morning-report.mdNIGHT-LOG.mdreferences/morning-report.md| Failure | Fix |
|---|---|
| Asks a clarifying question and idles | Rule 1. Infer, implement, document. |
| Stops at "PR opened" | Rule 4. Review and merge it yourself. |
| Researches for hours | Time-box. Enough to decide → implement. |
| One blocker halts everything | Rule 3. Blocker is scoped to its task. |
| Reports PASS without running | Rule 6. Paste the actual command output into the journal. |
| Skips a failing test to go green | Rule 5. Fix it or report it honestly. |
| Rewrites unrelated subsystems | Rule 7. |
| Journal written only at the end | Journal continuously — compaction will eat your memory. |
| 失误 | 修复方法 |
|---|---|
| 提出澄清问题后闲置 | 遵循规则1。推断、实现、记录。 |
| 停留在“PR已创建”状态 | 遵循规则4。自行评审并合并。 |
| 调研数小时 | 设置时间限制。足够做出决策后→开始实现。 |
| 一个阻塞导致所有工作停滞 | 遵循规则3。阻塞仅针对其对应的任务。 |
| 未运行就报告通过 | 遵循规则6。将实际命令输出粘贴到日志中。 |
| 跳过失败测试以显示绿色 | 遵循规则5。修复或如实报告。 |
| 重写无关子系统 | 遵循规则7。 |
| 仅在最后才写日志 | 持续记录日志——压缩会清空你的记忆。 |