Recall Reasoning

作者 parcadeid07ff4b06b62无许可证3.9K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库8个月前更新

Search past reasoning for relevant decisions and approaches

仅含说明AI & Agents
AI 生成的概览

检索过往会话记录,找出以前的决策、成功做法与失败尝试。

功能
查询两个本地来源:包含事后复盘的交接文档、计划与台账所构成的产物索引,以及记录构建尝试、测试失败与提交上下文的推理文件。返回匹配条目,并用结果标记区分成功、失败与未知。目的是呈现可复用的模式,避免重复过去的错误。
适用场景
适用于开始与以往会话相似的工作、询问某个主题上次是如何处理的,或调查某项实现为何采用某种方式时。也适合排查此前可能遇到过的故障。
运行要求
需要项目中存在所引用的脚本:通过 uv 运行的 Python 产物查询脚本,以及项目 .claude 脚本目录下的 shell 检索脚本。还依赖此前生成的交接文档、台账与推理文件;该技能本身不附带脚本。

Recall Past Work

Search through previous sessions to find relevant decisions, approaches that worked, and approaches that failed. Queries two sources:

  1. Artifact Index - Handoffs, plans, ledgers with post-mortems (what worked/failed)
  2. Reasoning Files - Build attempts, test failures, commit context

When to Use

  • Starting work similar to past sessions
  • "What did we do last time with X?"
  • Looking for patterns that worked before
  • Investigating why something was done a certain way
  • Debugging an issue encountered previously

Usage

Primary: Artifact Index (rich context)

bash
uv run python scripts/core/artifact_query.py "<query>" [--outcome SUCCEEDED|FAILED] [--limit N]

This searches handoffs with post-mortems (what worked, what failed, key decisions).

Secondary: Reasoning Files (build attempts)

bash
bash "$CLAUDE_PROJECT_DIR/.claude/scripts/search-reasoning.sh" "<query>"

This searches .git/claude/commits/*/reasoning.md for build failures and fixes.

Examples

bash
# Search for authentication-related workuv run python scripts/core/artifact_query.py "authentication OAuth JWT"
# Find only successful approachesuv run python scripts/core/artifact_query.py "implement agent" --outcome SUCCEEDED
# Find what failed (to avoid repeating mistakes)uv run python scripts/core/artifact_query.py "hook implementation" --outcome FAILED
# Search build/test reasoningbash "$CLAUDE_PROJECT_DIR/.claude/scripts/search-reasoning.sh" "TypeError"

What Gets Searched

Artifact Index (handoffs, plans, ledgers):

  • Task summaries and status
  • What worked - Successful approaches
  • What failed - Dead ends and why
  • Key decisions - Choices with rationale
  • Goal and constraints from ledgers

Reasoning Files (.git/claude/):

  • Failed build attempts and error output
  • Successful builds after failures
  • Commit context and branch info

Interpreting Results

From Artifact Index:

  • ✓ = SUCCEEDED outcome (pattern to follow)
  • ✗ = FAILED outcome (pattern to avoid)
  • ? = UNKNOWN outcome (not yet marked)
  • Post-mortem sections show distilled learnings

From Reasoning:

  • build_fail = approach that didn't work
  • build_pass = what finally succeeded
  • Multiple failures before success = non-trivial problem

Process

  1. Run Artifact Index query first - richer context, post-mortems
  2. Review relevant handoffs - check what worked/failed sections
  3. If needed, search reasoning - for specific build errors
  4. Apply learnings - follow successful patterns, avoid failed ones

No Results?

Artifact Index empty:

  • Run uv run python scripts/core/artifact_index.py --all to index existing handoffs
  • Create handoffs with post-mortem sections for future recall

Reasoning files empty:

  • Use /commit after builds to capture reasoning
  • Check if .git/claude/ directory exists

来源与署名

来源:parcadei/continuous-claude-v3位于.claude/skills/recall-reasoning提交d07ff4b

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架