conversation-logs

Rules for investigating product AI failures through conversation logs. A trace ID is a 32-character event identifier, while a conversation ID is a UUID that identifies a session.

In plain words
What is it for?
Use it when someone supplies an ID or asks what happened in a failed AI run, review, or inspection. It helps query the right log source, timeline, database records, or diagnostic package.
Why use it?
Searching the wrong logs or opening logs for ordinary design discussions wastes time and can confuse product behavior with development-agent transcripts. These rules select the correct evidence and investigation command.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/lawofall/agentcore/conversation-logs
Clone the repo
git clone --depth 1 https://github.com/Lawofall/AgentCore

Made for: Cursor.

Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,226 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.01226
Opus 5 $0.00028 $0.00613
Sonnet 5 $0.00011 $0.00245
Haiku 4.5 $0.00006 $0.00123

Measured yesterday against content hash 24cc8bc16f71, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

conversation-logs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/conversation-logs.mdc · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

对话日志查询

何时打开(默认关)

满足任一才往下查:贴了 32-hex / UUID / 排查包;或明说查这次失败 / 巡检 / reviews。其余讨论(产品、架构、拦截、取舍)→ 不 sync、不 patrol、不 --recent。打开后只答「这次发生了什么」;驱动改动须码核 HEAD;与已确认设计冲突时日志让路。按问题选证据 → dev-process.mdc

两套日志,不要混

产品 AI 日志 Cursor IDE Agent 会话
位置 logs/dev.jsonl + Postgres agent-transcripts/(UUID.jsonl)
ID 32 位 hex 无连字符 = trace_id;带连字符 UUID = conversation_id 文件名 = UUID 带连字符

用户给 id → logs/dev.jsonl + DB禁止在文件系统搜。agent-transcripts/ 与产品 AI 无关。日志不含消息正文(在 Postgres)。

查询入口(apps/server 下)

uv run python scripts/log_timeline.py --trace <trace_id>          # 默认 decision_spine
uv run python scripts/log_timeline.py --pack <dir> --trace <tid>  # 排查包制品
uv run python scripts/log_timeline.py --pack <dir> --full --trace <tid>
uv run python scripts/log_timeline.py --raw --trace <trace_id>    # 全量仅需要时
uv run python scripts/log_timeline.py <conversation_id>
uv run python scripts/log_timeline.py --recent
uv run python scripts/log_stats.py --json
uv run python scripts/log_patrol.py --export-dir ../../logs/prod-export --since 2d  # 巡检①

有 ID → 优先 decision_spine / 排查包--pack);--raw 仅深挖。包内必有 decision_spine.json + timeline.jsonl + meta.json;有 journal 时附 journal.redacted.jsonl + journal.summary.json永不带原文)。失败回合 persist 后可能已有 logs/packs/<trace_id>/(journal-only:meta.json + journal.redacted.jsonl,无原文,不等 jsonl)。--trace 人读 / --jsonmeta.failure_pack 会标明这份自动存档在不在;过期删除记 journal.failure_pack_gc_expiredspine_events = turn_spine,勿与产品面混称。

最短路径(已打开时)

读本 rule CLI 即可;禁止整篇读分析指南;禁止派探子。缺正文再 --pack(必要时 --full)。单条 ID(即便夹讨论根因)→ 主 Agent 自跑 CLI,不套分相。

巡检 / reviews / 开案 / 多 trace 宽窗(仅用户明说)→ logs/reviews/README.md + STATUS.md 主自跑 log_patrol.py 按密度拆只读审阅桶(拆几飞几,禁垫桶)。写成「建议改」前须对 HEAD 打开指针文件码核;翻 STATUS ≠ 码核。巡检①用 log_patrol.py--families / --snapshot-out / --baseline / --diff),别复制一次性扫描脚本。

症状进层(假卡 / 本机横幅 / 缺窗 / token 空…)→ 分析指南 · 症状进层(按需开节)。Token 两口径 / 事件词表 / 接缝深挖 → 同文按需开节。Dogfood 入槽 → evals/dogfood/README.md。本地无命中且像线上 → pnpm sync:logs(脱敏 turn_journal;深挖本机才 --full)后 --export-dir ../../logs/prod-export。勿再用 AGENTCORE_SSH / $AGENTCORE_HOME/logs

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 51 lines · 55 tokens per session scan A 24cc8bc16f71

Subscribe to this mod's changes

conversation-logs is a cursor rule published in the GitHub repository Lawofall/AgentCore (78 stars, last pushed 2d ago), licensed MIT. It adds 55 tokens to every session and 1,226 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.