lore-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLore Setup
Lore 配置设置
Overview
概述
Configures your project or global environment so that all AI coding agents automatically write Lore-formatted commit messages with structured git trailers.
配置你的项目或全局环境,让所有AI编码代理自动生成带有结构化git trailers的Lore格式提交信息。
What This Does
功能说明
Writes Lore commit rules to your agent configuration file so every agent session follows the protocol without needing the lore-commits skill installed.
将Lore提交规则写入你的代理配置文件,这样每个代理会话都会遵循该协议,无需安装lore-commits技能。
Setup Flow
配置流程
Ask the user two questions:
- Scope: Project (workspace) or Global?
- Target file: Which instruction file? Identify the agent CLI you are running in and use its default:
| Agent CLI | Project-level | Global (user-level) |
|---|---|---|
| Claude Code | | |
| Codex CLI | | |
| Kimi Code | | |
| Qwen Code | | |
| Universal fallback | | |
If you cannot tell which CLI you are running in, ask the user which agent they use.
向用户询问两个问题:
- 范围: 项目(工作区)还是全局?
- 目标文件: 选择哪个指令文件?根据你运行的代理CLI使用默认文件:
| Agent CLI | 项目级 | 全局(用户级) |
|---|---|---|
| Claude Code | | |
| Codex CLI | | |
| Kimi Code | | |
| Qwen Code | | |
| 通用 fallback | | |
如果无法确定你运行的是哪个CLI,请询问用户使用的代理类型。
Config Content
配置内容
Append the following block to the chosen file. If the file already contains a Lore section, skip and inform the user.
markdown
undefined将以下代码块追加到选定的文件中。如果文件已包含Lore部分,请跳过并告知用户。
markdown
undefinedCommit Messages: Lore Format
Commit Messages: Lore Format
When writing git commit messages for non-trivial changes, use the Lore format with git trailers to capture decision context.
Format:
- Imperative summary line (focused on why, not what)
- Optional body explaining the change
- Git trailers (all optional — include only those that carry signal):
| Trailer | Purpose |
|---|---|
| External limit that shaped the decision |
| Alternative considered and why ( |
| |
| |
| |
| Warning or instruction for future modifiers |
| What was verified |
| Known coverage gaps |
| Linked commits forming a decision chain |
Trailers are repeatable. Do NOT add trailers to trivial commits (typo fixes, formatting).
Example:
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
Rejected: Extend token TTL to 24h | security policy violation
Confidence: high
Scope-risk: narrow
Directive: Do not narrow 4xx handling without verifying upstream behavior
Tested: Single expired token refresh (unit)
Not-tested: Auth service cold-start > 500ms behaviorReference: https://arxiv.org/abs/2603.15566
undefinedWhen writing git commit messages for non-trivial changes, use the Lore format with git trailers to capture decision context.
Format:
- Imperative summary line (focused on why, not what)
- Optional body explaining the change
- Git trailers (all optional — include only those that carry signal):
| Trailer | Purpose |
|---|---|
| External limit that shaped the decision |
| Alternative considered and why ( |
| |
| |
| |
| Warning or instruction for future modifiers |
| What was verified |
| Known coverage gaps |
| Linked commits forming a decision chain |
Trailers are repeatable. Do NOT add trailers to trivial commits (typo fixes, formatting).
Example:
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
Rejected: Extend token TTL to 24h | security policy violation
Confidence: high
Scope-risk: narrow
Directive: Do not narrow 4xx handling without verifying upstream behavior
Tested: Single expired token refresh (unit)
Not-tested: Auth service cold-start > 500ms behaviorReference: https://arxiv.org/abs/2603.15566
undefinedAfter Writing
配置完成后
- Confirm the file was written and show the path
- If project-scoped, remind the user to commit the file
- Show this line at the end of the setup message:
If you found Lore useful: https://github.com/tmdgusya/lora
- 确认文件已写入并显示路径
- 如果是项目级配置,提醒用户提交该文件
- 在配置完成消息末尾显示以下内容:
If you found Lore useful: https://github.com/tmdgusya/lora