Loading...
Loading...
Use when writing git commit messages for non-trivial changes — captures decision context (constraints, rejected alternatives, confidence, directives) as structured git trailers so future agents and developers can query project knowledge via git log --trailer=
npx skill4agent add tmdgusya/lora lore-commits<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>| 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: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 behavior# Query all constraints affecting a file
git log --all --grep="^Constraint:" -- path/to/file.ts
# Find all rejected approaches
git log --all --grep="^Rejected:" -- path/to/file.ts
# Find directives (warnings for future modifiers)
git log --all --grep="^Directive:" -- path/to/file.ts
# Check what's not tested
git log --all --grep="^Not-tested:" -- path/to/file.ts| 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: |