lore-query

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Lore Query

Lore Query

Query Lore git trailers from commit history to surface decision context.
从提交历史中查询Lore git trailers以展示决策背景。

Usage

使用方法

Invoke the skill by name with optional arguments:
lore-query                          # Summarize all Lore trailers from recent commits
lore-query <trailer>                # Query specific trailer type
lore-query <trailer> <path>         # Scope to file or directory
Invocation syntax differs by agent CLI:
/lore-query
(Claude Code),
$lore-query
(Codex CLI),
/skill:lore-query
(Kimi Code), skill name or natural language (Qwen Code).
Natural language also works: "최근 제약조건 확인해줘", "show me rejected alternatives for src/auth/", etc.
通过技能名称调用,可附带可选参数:
lore-query                          # 汇总最近提交中的所有Lore trailers
lore-query <trailer>                # 查询特定类型的trailer
lore-query <trailer> <path>         # 限定到指定文件或目录
不同Agent CLI的调用语法不同:/lore-query(Claude Code)、$lore-query(Codex CLI)、/skill:lore-query(Kimi Code),技能名称或自然语言(Qwen Code)。
自然语言指令同样有效:"최근 제약조건 확인해줘"、"show me rejected alternatives for src/auth/"等。

Trailer Shortcuts

Trailer 快捷键

The user may refer to trailers by Korean shortcut, English shortcut, or full trailer name. Map them as follows:
ShortcutTrailer
제약조건, constraints
Constraint:
리젝, rejected
Rejected:
디렉티브, directive
Directive:
미테스트, not-tested
Not-tested:
테스트, tested
Tested:
신뢰도, confidence
Confidence:
범위위험, scope-risk
Scope-risk:
가역성, reversibility
Reversibility:
관련, related
Related:
Any unrecognized name is treated as a custom trailer (query it as-is).
用户可以通过韩文缩写、英文缩写或完整的trailer名称来引用trailer。映射关系如下:
快捷键Trailer
제약조건, constraints
Constraint:
리젝, rejected
Rejected:
디렉티브, directive
Directive:
미테스트, not-tested
Not-tested:
테스트, tested
Tested:
신뢰도, confidence
Confidence:
범위위험, scope-risk
Scope-risk:
가역성, reversibility
Reversibility:
관련, related
Related:
任何无法识别的名称将被视为自定义trailer(直接按原名称查询)。

How to Query

查询方法

Specific trailer

特定trailer查询

Run this via your shell execution tool (e.g. Bash):
bash
git log -n 20 --all --grep="^TRAILER_NAME:" --format="%h %s%n%b" -- [PATH]
Replace
TRAILER_NAME
with the mapped trailer name (e.g.,
Constraint
). Omit
-- [PATH]
if no path was specified.
Then parse the output: for each commit, display the short hash, summary line, and only the matching trailer lines.
通过你的shell执行工具(如Bash)运行以下命令:
bash
git log -n 20 --all --grep="^TRAILER_NAME:" --format="%h %s%n%b" -- [PATH]
TRAILER_NAME
替换为映射后的trailer名称(例如
Constraint
)。如果未指定路径,则省略
-- [PATH]
然后解析输出:对于每个提交,显示短哈希、摘要行以及匹配的trailer行。

Summary mode (no trailer specified)

摘要模式(未指定trailer)

Run this via your shell execution tool (e.g. Bash):
bash
git log -n 20 --format="%h %s%n%b"
Scan the output for any lines matching known Lore trailers (
Constraint:
,
Rejected:
,
Directive:
,
Confidence:
,
Scope-risk:
,
Reversibility:
,
Tested:
,
Not-tested:
,
Related:
). Only show commits that contain at least one Lore trailer.
通过你的shell执行工具(如Bash)运行以下命令:
bash
git log -n 20 --format="%h %s%n%b"
扫描输出,查找任何匹配已知Lore trailers的行(
Constraint:
Rejected:
Directive:
Confidence:
Scope-risk:
Reversibility:
Tested:
Not-tested:
Related:
)。仅展示包含至少一个Lore trailer的提交。

Output Format

输出格式

Present results as a compact list. Show the short commit hash and summary, then indent matching trailer lines below:
a1b2c3d Prevent silent session drops
  Constraint: Auth service does not support token introspection
  Constraint: Must not add latency to non-expired-token paths

f4e5d6c Add rate limiter to external API calls
  Constraint: Rate limit 100 req/s on external API
If no Lore trailers are found, say so clearly: "No Lore trailers found in recent commits."
In summary mode, group output by commit (not by trailer type) to preserve decision context.
以紧凑列表形式呈现结果。显示提交短哈希和摘要,然后在下方缩进显示匹配的trailer行:
a1b2c3d Prevent silent session drops
  Constraint: Auth service does not support token introspection
  Constraint: Must not add latency to non-expired-token paths

f4e5d6c Add rate limiter to external API calls
  Constraint: Rate limit 100 req/s on external API
如果未找到Lore trailers,请明确告知:"最近的提交中未找到Lore trailers。"
在摘要模式下,按提交分组输出(而非按trailer类型),以保留决策背景。

Notes

注意事项

  • Default limit is 20 commits. The user can request more.
  • Path argument supports files and directories (e.g.,
    src/auth/
    ,
    src/api/handler.ts
    ).
  • This skill is read-only — it never modifies commits or history.
  • 默认限制为20条提交。用户可请求更多。
  • 路径参数支持文件和目录(例如
    src/auth/
    src/api/handler.ts
    )。
  • 此技能为只读——绝不会修改提交或历史记录。