provenance
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProvenance Skill
Provenance Skill
Trace knowledge artifact lineage to sources.
追踪知识工件的来源谱系。
Execution Steps
执行步骤
Given :
/provenance <artifact>当输入时:
/provenance <artifact>Step 1: Read the Artifact
步骤1:读取工件
Tool: Read
Parameters:
file_path: <artifact-path>Look for provenance metadata:
- Source references
- Session IDs
- Dates
- Related artifacts
Tool: Read
Parameters:
file_path: <artifact-path>查找来源元数据:
- 来源引用
- 会话ID
- 日期
- 相关工件
Step 2: Trace Source Chain
步骤2:追溯来源链
bash
undefinedbash
undefinedCheck for source metadata in the file
检查文件中的来源元数据
grep -i "source|session|from|extracted" <artifact-path>
grep -i "source|session|from|extracted" <artifact-path>
Search for related transcripts using ao
使用ao搜索相关对话记录
ao forge search "<artifact-name>" 2>/dev/null
undefinedao forge search "<artifact-name>" 2>/dev/null
undefinedStep 3: Search Session Transcripts with CASS
步骤3:使用CASS搜索会话对话记录
Use CASS to find when this artifact was discussed:
bash
undefined使用CASS查找该工件的讨论时间:
bash
undefinedExtract artifact name for search
提取工件名称用于搜索
artifact_name=$(basename "<artifact-path>" .md)
artifact_name=$(basename "<artifact-path>" .md)
Search session transcripts
搜索会话对话记录
cass search "$artifact_name" --json --limit 5
**Parse CASS results to find:**
- Sessions where artifact was created/discussed
- Timeline of references
- Related sessions by workspace
**CASS JSON output fields:**
```json
{
"hits": [{
"title": "...",
"source_path": "/path/to/session.jsonl",
"created_at": 1766076237333,
"score": 18.5,
"agent": "claude_code"
}]
}cass search "$artifact_name" --json --limit 5
**解析CASS结果以查找:**
- 工件创建/讨论的会话
- 引用时间线
- 工作区相关会话
**CASS JSON输出字段:**
```json
{
"hits": [{
"title": "...",
"source_path": "/path/to/session.jsonl",
"created_at": 1766076237333,
"score": 18.5,
"agent": "claude_code"
}]
}Step 4: Build Lineage Chain
步骤4:构建谱系链
Transcript (source of truth)
↓
Forge extraction (candidate)
↓
Human review (promotion)
↓
Pattern recognition (tier-up)
↓
Skill creation (automation)对话记录(事实来源)
↓
Forge提取(候选)
↓
人工审核(升级)
↓
模式识别(提升等级)
↓
Skill创建(自动化)Step 5: Write Provenance Report
步骤5:生成来源报告
markdown
undefinedmarkdown
undefinedProvenance: <artifact-name>
Provenance: <artifact-name>
Current State
当前状态
- Tier: <0-3>
- Created: <date>
- Citations: <count>
- Tier: <0-3>
- Created: <date>
- Citations: <count>
Source Chain
来源链
-
Origin: <transcript or session>
- Line/context: <where extracted>
- Extracted: <date>
-
Promoted: <tier change>
- Reason: <why promoted>
- Date: <when>
-
起源: <对话记录或会话>
- 行/上下文:<提取位置>
- 提取时间:<date>
-
升级: <等级变更>
- 原因:<升级理由>
- 时间:<when>
Session References (from CASS)
会话引用(来自CASS)
| Date | Session | Agent | Score |
|---|---|---|---|
| <date> | <session-id> | <agent> | <score> |
| 日期 | 会话 | Agent | 得分 |
|---|---|---|---|
| <date> | <session-id> | <agent> | <score> |
Related Artifacts
相关工件
- <related artifact 1>
- <related artifact 2>
undefined- <related artifact 1>
- <related artifact 2>
undefinedStep 6: Report to User
步骤6:向用户汇报
Tell the user:
- Artifact lineage
- Original source
- Promotion history
- Session references (from CASS)
- Related artifacts
需向用户告知:
- 工件谱系
- 原始来源
- 升级历史
- 会话引用(来自CASS)
- 相关工件
Finding Orphans
查找孤立工件
bash
/provenance --orphansFind artifacts without source tracking:
bash
undefinedbash
/provenance --orphans查找无来源追踪的工件:
bash
undefinedFiles without "Source:" or "Session:" metadata
无“Source:”或“Session:”元数据的文件
for f in .agents/learnings/*.md; do
grep -L "Source|Session" "$f" 2>/dev/null
done
undefinedfor f in .agents/learnings/*.md; do
grep -L "Source|Session" "$f" 2>/dev/null
done
undefinedFinding Stale Artifacts
查找过时工件
bash
/provenance --staleFind artifacts where source may have changed:
bash
undefinedbash
/provenance --stale查找来源可能已变更的工件:
bash
undefinedArtifacts older than their sources
存在超过30天的工件
find .agents/ -name "*.md" -mtime +30 2>/dev/null
undefinedfind .agents/ -name "*.md" -mtime +30 2>/dev/null
undefinedKey Rules
核心规则
- Every insight has a source - trace it
- Track promotions - know why tier changed
- Find orphans - clean up untracked knowledge
- Maintain lineage - provenance enables trust
- Use CASS - find when artifacts were discussed
- 所有洞见必有来源 —— 追踪到底
- 追踪升级记录 —— 了解等级变更原因
- 查找孤立工件 —— 清理未追踪的知识
- 维护谱系 —— 来源可追溯建立信任
- 使用CASS —— 查找工件的讨论时间