diff --git a/.claude/project-instructions.md b/.claude/project-instructions.md index 947dec0..deae4d8 100644 --- a/.claude/project-instructions.md +++ b/.claude/project-instructions.md @@ -1,5 +1,19 @@ # Obsidian PKM 助理工作指南 + + +## Memvid MCP memory rules + +- Use the `memvid` MCP server only for durable preferences, decisions, and long-lived project context. +- At the start of each task, query memory before acting. + - Use `memvid_search` (or `memvid_search_by_tag` when tags are available). +- After each task, write back any new durable preferences/decisions/constraints. + - Use `memvid_add_text` or `memvid_add_file`, then `memvid_commit`. +- Never store secrets, tokens, credentials, or transient errors/logs. +- Use consistent tags like `project`, `decision`, `preference`, `constraint`. +- Default memory file path: `.claude/memory/memvid.mv2` (override only if user specifies). + + > 本指南叠加在 Claudian 基础能力之上,专注于个人知识管理的内容整理与组织。 --- diff --git a/.claude/sessions/conv-1767620030117-cqj3f0arx.jsonl b/.claude/sessions/conv-1767620030117-cqj3f0arx.jsonl index 9cb9e19..b872f72 100644 --- a/.claude/sessions/conv-1767620030117-cqj3f0arx.jsonl +++ b/.claude/sessions/conv-1767620030117-cqj3f0arx.jsonl @@ -1,4 +1,4 @@ -{"type":"meta","id":"conv-1767620030117-cqj3f0arx","title":"/git-commit-msg update","createdAt":1767620030117,"updatedAt":1767752872348,"lastResponseAt":1767620353101,"sessionId":"d46e9525-e912-4bac-94ff-4a17ac9bf0ec","usage":{"model":"claude-sonnet-4-5-20250929","inputTokens":106,"cacheCreationInputTokens":54552,"cacheReadInputTokens":486529,"contextWindow":200000,"contextTokens":541187,"percentage":100},"titleGenerationStatus":"failed"} +{"type":"meta","id":"conv-1767620030117-cqj3f0arx","title":"/git-commit-msg update","createdAt":1767620030117,"updatedAt":1767796005454,"lastResponseAt":1767620353101,"sessionId":"d46e9525-e912-4bac-94ff-4a17ac9bf0ec","usage":{"model":"claude-sonnet-4-5-20250929","inputTokens":106,"cacheCreationInputTokens":54552,"cacheReadInputTokens":486529,"contextWindow":200000,"contextTokens":541187,"percentage":100},"titleGenerationStatus":"failed"} {"type":"message","message":{"id":"msg-1767620039866-rvyouq1ys","role":"user","content":"# AI Git Commit Message Generator\r\n\r\nAnalyzes your staged git changes and generates a well-structured conventional commit message using AI. Perfect for creating meaningful, consistent commit messages that follow best practices.\r\n\r\n## Task\r\n\r\nReview staged changes, analyze the modifications, and generate a descriptive conventional commit message that accurately describes what was changed and why.\r\n\r\n## Process\r\n\r\n### 1. **Check Git Status**\r\n\r\nFirst, verify there are changes to commit:\r\n\r\n```bash\r\ngit status\r\n```\r\n\r\nIf no changes are staged, check if there are unstaged changes:\r\n- If yes: Ask user if they want to stage all changes\r\n- If no: Exit with message \"No changes to commit\"\r\n\r\n### 2. **Review Changes**\r\n\r\nShow detailed diff of staged changes:\r\n\r\n```bash\r\n# Show staged changes\r\ngit diff --cached --stat\r\ngit diff --cached\r\n```\r\n\r\nAlso check recent commits for context on commit message style:\r\n\r\n```bash\r\ngit log --oneline -5\r\n```\r\n\r\n### 3. **Analyze Changes**\r\n\r\nExamine the diff output to understand:\r\n- **What changed**: Files modified, added, or deleted\r\n- **Scope**: Which modules/components are affected\r\n- **Type**: Is this a feature, fix, refactor, docs, etc.?\r\n- **Impact**: Breaking changes, new functionality, bug fixes\r\n- **Details**: Specific changes worth mentioning\r\n\r\n### 4. **Generate Commit Message**\r\n\r\nCreate a conventional commit message following this format:\r\n\r\n```\r\n(): \r\n\r\n\r\n\r\n