SuperAPI AI Directory

lore-query

Coding & development

View repository

Updated 10-16 04:40

About this skill

Lore Query

Query Lore git trailers from commit history to surface decision context.

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: "check recent constraints", "show me rejected alternatives for src/auth/", etc.

Trailer Shortcuts

The user may refer to trailers by Korean shortcut, English shortcut, or full trailer name. Map them as follows:

Shortcut Trailer
constraints, constraints Constraint:
rejected, rejected Rejected:
directive, directive Directive:
not-tested, not-tested Not-tested:
tested, tested Tested:
confidence, confidence Confidence:
scope-risk, scope-risk Scope-risk:
reversibility, reversibility Reversibility:
related, related Related:

Any unrecognized name is treated as a custom trailer (query it as-is).

How to Query

Specific trailer

Run this via your shell execution tool (e.g. 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.

Summary mode (no trailer specified)

Run this via your shell execution tool (e.g. 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.

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.

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.