← 返回
未分类

fragments

Fragmented work logging and idea capture powered by Memos. Full memo lifecycle: create, search, update, delete, and comment. Daily-log: structured work journ...
碎片化工作记录与灵感捕获,依托Memos。完整备忘录生命周期:创建、搜索、更新、删除、评论。日志:结构化工作日志
hx-w hx-w 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 280
下载
💾 0
安装
1
版本
#latest

概述

Fragments

Setup Check

  1. Read ~/.config/fragments.json (Windows: %USERPROFILE%\.config\fragments.json).
  2. If file missing → first install. Detect current platform, read the matching setup guide:
    • Claude Code → references/setup-claude-code.md
    • OpenCode → references/setup-opencode.md
    • OpenClaw → references/setup-openclaw.md
  3. If file exists → verify MCP is configured. If incomplete → read the matching setup guide.
  4. All good → proceed to normal usage.

Platform Detection

Detect the current platform by checking for platform-specific markers:

PlatformDetection Marker
----------------------------
Claude Code~/.claude/ directory exists
OpenCode~/.config/opencode/ directory exists
OpenClaw~/.openclaw/ directory exists

Modes

memo — Full Lifecycle Management

Create, search, update, delete, and comment on memos via MCP tools.

Workflows:

  • Create & dedup → references/memo-capture.md
  • Update & delete → references/memo-capture.md#lifecycle
  • Comments → references/memo-comments.md

Write operations require user confirmation before calling.

daily-log — Daily Work Journal

One structured log per user per day. Content follows .plan format

enforced by the Memos server.

Format rules, diff-merge logic, and hook trigger workflow:

references/daily-log.md

search — Semantic Search

Server-side full-text retrieval via MCP, optional client-side

TF-IDF + LSA rerank for semantic/fuzzy queries.

Pipeline details and tuning parameters:

references/search-strategy.md

Retrieval Strategy

Data volume can be large. Always prefer targeted retrieval over bulk listing.

Memos

  1. Search first: memos_search_memos(query=...) — use when the user has

any intent, keyword, or topic. Returns bounded results.

  1. Get by ID: memos_get_memo(name=...) — use when you already know the

memo name. Expand full content only for shortlisted results.

  1. List as fallback: memos_list_memos(page_size=10) — use only for

explicit "show recent" requests. Always set a small page_size.

  1. Client-side rerank: pipe search results through scripts/fragments_search.py

for semantic ranking when server-side results need refinement.

Comments

  • List comments: memos_list_memo_comments(name=...) — retrieve all comments

on a memo. Comments inherit the parent memo's visibility.

Daily Logs

  1. Get by date: memos_get_daily_log(date=YYYY-MM-DD) — single log lookup.

Pass creator="users/{id}" to view another user's log (PROTECTED visibility).

  1. List with date range: memos_list_daily_logs(start_date, end_date, page_size=10)

— use only for explicit "show this week/month" requests. Always bound the range.

Tags

  • memos_list_tags — lightweight, use to discover available tags for filtering.

No read operations require user confirmation.

Write Operations

All write operations require explicit user confirmation before calling.

Read operations need no confirmation. Never echo PAT tokens to the conversation.

Memo Writes

OperationMCP ToolWhen to Use
----------------------------------
Creatememos_create_memoNew idea, note, snippet
Updatememos_update_memoModify content, visibility, pin
Deletememos_delete_memoRemove memo (irreversible)
Add commentmemos_create_memo_commentAppend discussion to memo

Daily Log Writes

  • memos_save_daily_log(date=..., content=...) — full replacement save.

Always include complete content (existing + new lines).

Hook Workflow (Passive Trigger)

When triggered by agent task completion:

  1. Assess whether this session performed meaningful work. Skip if trivial.
  2. Call memos_get_daily_log for today's date.
  3. Format new entries in .plan style.
  4. Diff against existing content. Skip if no new information.
  5. Long-form content → suggest creating a memo first, reference in daily log.
  6. Show user the full merged log (existing + new). Wait for confirmation.
  7. Call memos_save_daily_log with complete content (full replacement).

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 16:42 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

knowledge-management

Baidu web search

ide-rea
使用百度AI搜索引擎(BDSE)进行网络搜索。适用于获取实时信息、文档资料或研究课题。
★ 246 📥 108,141
knowledge-management

Summarize

paudyyin
智能摘要工具,自动为长文本、文档、网页生成摘要,提取要点与关键词,支持自定义摘要长度。
★ 963 📥 520,458
knowledge-management

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 447 📥 105,329