ReMe/reme-plugin/plugins/reme-service/hooks/hooks.json
huangsen ad6368fdf0
Some checks are pending
Pre-commit / run (ubuntu-latest) (push) Waiting to run
```
feat: add Claude Code marketplace plugin with service and expert tiers

Add comprehensive Claude Code marketplace plugin supporting two paradigms
for managing markdown vaults:

- reme-service: Service-tier plugin with high-level MCP tools
  (retrieve/remember/maintain) where reme2 internals handle R-M-W loop
- reme-expert: Expert-tier plugin where Claude Code agent runs R-M-W loop
  directly using raw memory_* primitives guided by reme protocol skill

Both plugins implement identical 4-phase work paradigm:
- Recall: Retrieve relevant context with ranking by relevance/proximity
- Log: Record event facts and raw materials via idempotent event-folder upsert
- Distill: Promote events to topic graph via R-M-W loop
- Maintain: Vault hygiene sweep with lint and decay operations

Include marketplace configuration, documentation, MCP server setup,
subagents (reme-distiller, reme-curator), hooks (PreCompact, SessionEnd,
Stop), and slash commands (/reme-distill, /reme-recall, /reme-clean).

Remove outdated plugin entries from gitignore.
```
2026-05-11 10:58:40 +08:00

36 lines
2.4 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"hooks": {
"PreCompact": [
{
"matcher": "auto|manual",
"hooks": [
{
"type": "prompt",
"prompt": "上下文即将被压缩。两步保住关键状态:\n1. 调用 `remember(mode=log, name=..., content=..., materials=[...])` 把任何尚未落盘的事实写入当前线程的 event folder——一定要在 `materials` 字段里塞进**会丢失的原始素材**(用户原文 prompt、关键工具输出、决策时的中间数据。**复用本任务一直在用的 `name`** 让 remember 在同一文件夹 upsert连续性靠这个保证只有开启全新逻辑线程时才换名字。零 LLM 成本。\n2. 输出压缩指引:\n\n## 压缩指引\n\n### 当前工作\n[正在做什么,做到哪一步,下一步是什么]\n\n### 关键上下文\n[必须保留的推理链、未完成的分析、重要的中间结论]\n\n### 已持久化\n[本次落盘的 event folder 路径——压缩时可省略 raw 细节,需要时再 retrieve / memory_get 索引或 materials 重新读]\n\n### 活跃约束\n[当前需要持续遵守的规则或用户要求]"
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "prompt",
"prompt": "会话即将结束。两步收尾:\n\n1. 先调用 `remember(mode=log, name=..., materials=[...])` 把所有尚未落盘的事实写入对应线程的 event folder`materials` 装原始素材,确定性、零 LLM、复用同名 upsert。\n\n2. 然后调用 `remember(mode=distill, content=..., related_paths=[...])` —— **reme2 内部的 Ingestor 会跑 R-M-W 循环**:读本次会话的 active event folders + materials + 相关 topic按 reme 协议4 轴 schema、claim-role confidence、wikilink 唯一性、path templates、status 状态机)决定哪些 topic update / createflip distilled events 的 status。在 `content` 里写一两行 session 摘要 + 提示,在 `related_paths` 里列本次 sync 过的 event folder 索引路径。\n\nDistill 是 cold-pathhandoff 一次就够了,不要每轮调。"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "${VAULT_PYTHON:-python} ${CLAUDE_PLUGIN_ROOT}/hooks/active_events_check.py",
"timeout": 5
}
]
}
]
}
}