Loading...
Loading...
Compare original and translation side by side
<imperative summary line>
<optional body explaining the change>
Constraint: <external constraint that shaped this decision>
Rejected: <alternative> | <reason it was rejected>
Confidence: <high | medium | low>
Scope-risk: <narrow | moderate | broad>
Reversibility: <clean | moderate | difficult>
Directive: <warning or instruction for future modifiers>
Tested: <what was verified>
Not-tested: <known coverage gaps>
Related: <commit hash or description of related commit><祈使语气的摘要行>
<可选的变更说明正文>
Constraint: <影响决策的外部约束条件>
Rejected: <备选方案> | <否决理由>
Confidence: <high | medium | low>
Scope-risk: <narrow | moderate | broad>
Reversibility: <clean | moderate | difficult>
Directive: <给后续修改者的警告或说明>
Tested: <已验证的内容>
Not-tested: <已知的测试覆盖缺口>
Related: <相关提交的哈希值或描述>| Trailer | Purpose | Example |
|---|---|---|
| External limit that shaped the decision | |
| Alternative considered and why it was dropped. Use ` | ` to separate alternative from reason |
| How sure you are this is right: | |
| Blast radius: | |
| How easy to undo: | |
| Warning to future modifiers — what NOT to do or what to check first | |
| What was verified and how | |
| Known gaps in verification | |
| Linked commits forming a decision chain | |
Constraint:Rejected:Deadline:Stakeholder:Migration:| Trailer | 用途 | 示例 |
|---|---|---|
| 影响决策的外部限制条件 | |
| 曾考虑但被否决的方案及理由。使用` | `分隔方案与理由 |
| 对决策正确性的确定程度: | |
| 影响范围: | |
| 撤销难度: | |
| 给后续修改者的警告——哪些操作不能做或需要优先检查的内容 | |
| 已验证的内容及方式 | |
| 已知的验证缺口 | |
| 构成决策链的关联提交 | |
Constraint:Rejected:Deadline:Stakeholder:Migration:Prevent silent session drops during long-running operations
The auth service returns inconsistent status codes on token
expiry, so the interceptor catches all 4xx responses and
triggers an inline refresh.
Constraint: Auth service does not support token introspection
Constraint: Must not add latency to non-expired-token paths
Rejected: Extend token TTL to 24h | security policy violation
Rejected: Background refresh on timer | race condition
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Error handling is intentionally broad (all 4xx)
-- do not narrow without verifying upstream behavior
Tested: Single expired token refresh (unit)
Not-tested: Auth service cold-start > 500ms behaviorPrevent silent session drops during long-running operations
The auth service returns inconsistent status codes on token
expiry, so the interceptor catches all 4xx responses and
triggers an inline refresh.
Constraint: Auth service does not support token introspection
Constraint: Must not add latency to non-expired-token paths
Rejected: Extend token TTL to 24h | security policy violation
Rejected: Background refresh on timer | race condition
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Error handling is intentionally broad (all 4xx)
-- do not narrow without verifying upstream behavior
Tested: Single expired token refresh (unit)
Not-tested: Auth service cold-start > 500ms behaviorundefinedundefined
This turns your git history into a **queryable decision database** at zero infrastructure cost.
这无需额外基础设施成本,就能将你的git历史转化为**可查询的决策数据库**。| Mistake | Fix |
|---|---|
| Writing trailers as prose paragraphs | Use |
| Putting trailers before the body | Trailers must come after the body, separated by a blank line |
Omitting the reason in | Always use `alternative |
| Adding trailers to trivial commits | Only add when real decisions were made |
| Duplicating diff content in trailers | Trailers capture what's NOT in the diff — the why, not the what |
Using | Use the scale: |
| 错误 | 修正方式 |
|---|---|
| 将trailer写成散文段落 | 使用 |
| 将trailer放在正文之前 | trailer必须放在正文之后,用空行分隔 |
| 始终使用`备选方案 |
| 给微小变更添加trailer | 仅在存在实质决策时添加 |
| 在trailer中重复差异内容 | trailer应记录差异中没有的信息——即原因,而非内容 |
使用 | 使用标准级别: |