jfox-cli 0.3.0__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/CLAUDE.md +1 -1
  2. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/PKG-INFO +5 -6
  3. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/README.md +2 -2
  4. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/installation.md +1 -1
  5. jfox_cli-0.3.2/docs/superpowers/plans/2026-04-14-sync-docs-daemon-show.md +486 -0
  6. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/__init__.py +1 -1
  7. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/daemon/process.py +2 -1
  8. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/pyproject.toml +3 -5
  9. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/skills-recommend/claude-code/jfox-common/SKILL.md +1 -1
  10. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/skills-recommend/claude-code/jfox-ingest/SKILL.md +1 -1
  11. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/skills-recommend/claude-code/jfox-organize/SKILL.md +1 -1
  12. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/skills-recommend/claude-code/jfox-search/SKILL.md +1 -1
  13. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/uv.lock +6 -8
  14. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/.githooks/pre-push +0 -0
  15. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/.github/workflows/integration-test.yml +0 -0
  16. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/.github/workflows/publish.yml +0 -0
  17. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/.gitignore +0 -0
  18. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/.python-version +0 -0
  19. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/AGENTS.md +0 -0
  20. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/CHANGELOG.md +0 -0
  21. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/DEVELOPMENT_PLAN.md +0 -0
  22. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/SESSION.md +0 -0
  23. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/SESSION_SUMMARY.md +0 -0
  24. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-11-bulk-import-bm25-fix.md +0 -0
  25. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-11-edit-command.md +0 -0
  26. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-11-unify-format-option.md +0 -0
  27. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-12-ci-coverage-optimization.md +0 -0
  28. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-12-edit-content-file.md +0 -0
  29. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-12-fix-index-rebuild-clear.md +0 -0
  30. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-12-fix-index-verify-id-mismatch.md +0 -0
  31. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-12-fix-jfox-health-skill-kb-param.md +0 -0
  32. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-12-index-kb-param.md +0 -0
  33. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-12-lazy-import-perf.md +0 -0
  34. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/plans/2026-04-12-skill-redesign.md +0 -0
  35. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/specs/2026-04-03-bugfixes-design.md +0 -0
  36. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/specs/2026-04-12-skill-redesign-design.md +0 -0
  37. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/specs/2026-04-13-pr-auto-code-review-design.md +0 -0
  38. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/superpowers/specs/2026-04-14-show-command-design.md +0 -0
  39. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/docs/troubleshooting.md +0 -0
  40. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jessica-jones-static-cable.md +0 -0
  41. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/__main__.py +0 -0
  42. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/bm25_index.py +0 -0
  43. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/cli.py +0 -0
  44. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/config.py +0 -0
  45. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/daemon/__init__.py +0 -0
  46. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/daemon/__main__.py +0 -0
  47. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/daemon/client.py +0 -0
  48. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/daemon/server.py +0 -0
  49. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/embedding_backend.py +0 -0
  50. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/formatters.py +0 -0
  51. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/git_extractor.py +0 -0
  52. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/global_config.py +0 -0
  53. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/graph.py +0 -0
  54. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/indexer.py +0 -0
  55. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/kb_manager.py +0 -0
  56. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/models.py +0 -0
  57. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/note.py +0 -0
  58. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/performance.py +0 -0
  59. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/search_engine.py +0 -0
  60. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/template.py +0 -0
  61. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/template_cli.py +0 -0
  62. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/jfox/vector_store.py +0 -0
  63. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/pytest.ini +0 -0
  64. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/run_full_test.ps1 +0 -0
  65. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/skills-recommend/README.md +0 -0
  66. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/skills-recommend/claude-code/jfox-session-summary/SKILL.md +0 -0
  67. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/COVERAGE_PLAN.md +0 -0
  68. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/MIGRATION.md +0 -0
  69. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/TESTS.md +0 -0
  70. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/conftest.py +0 -0
  71. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/integration/__init__.py +0 -0
  72. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/integration/test_backlinks.py +0 -0
  73. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/performance/__init__.py +0 -0
  74. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/performance/test_performance.py +0 -0
  75. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/test_advanced_features.py +0 -0
  76. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/test_cli_format.py +0 -0
  77. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/test_config_unit.py +0 -0
  78. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/test_core_workflow.py +0 -0
  79. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/test_hybrid_search.py +0 -0
  80. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/test_integration.py +0 -0
  81. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/test_kb_current.py +0 -0
  82. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/test_suggest_links.py +0 -0
  83. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/__init__.py +0 -0
  84. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_bm25_batch.py +0 -0
  85. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_edit.py +0 -0
  86. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_format_unify.py +0 -0
  87. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_formatters.py +0 -0
  88. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_git_extractor.py +0 -0
  89. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_global_config.py +0 -0
  90. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_index_kb_param.py +0 -0
  91. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_indexer_clear_before_rebuild.py +0 -0
  92. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_indexer_verify.py +0 -0
  93. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_kb_manager.py +0 -0
  94. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_lazy_import.py +0 -0
  95. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_logging_config.py +0 -0
  96. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_show.py +0 -0
  97. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_template.py +0 -0
  98. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_template_cli.py +0 -0
  99. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/unit/test_vector_store_clear.py +0 -0
  100. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/utils/__init__.py +0 -0
  101. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/utils/assertions.py +0 -0
  102. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/utils/jfox_cli.py +0 -0
  103. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/utils/note_generator.py +0 -0
  104. {jfox_cli-0.3.0 → jfox_cli-0.3.2}/tests/utils/temp_kb.py +0 -0
@@ -67,7 +67,7 @@ Notes are Markdown files with YAML frontmatter stored under `~/.zettelkasten/<kb
67
67
  | `search_engine.py` | `HybridSearchEngine` with `SearchMode` enum, RRF fusion |
68
68
  | `bm25_index.py` | BM25 keyword search index |
69
69
  | `embedding_backend.py` | Sentence-transformers embedding backend(支持 daemon 代理) |
70
- | `daemon/` | Embedding 模型 HTTP 守护进程(可选依赖 `[daemon]`),`jfox daemon start/stop/status` |
70
+ | `daemon/` | Embedding 模型 HTTP 守护进程,`jfox daemon start/stop/status` |
71
71
  | `vector_store.py` | ChromaDB vector store for semantic search |
72
72
  | `graph.py` | NetworkX knowledge graph from links/backlinks |
73
73
  | `template.py` / `template_cli.py` | Jinja2 template system for structured note creation |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jfox-cli
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: JFox - Zettelkasten 知识管理 CLI 工具
5
5
  Project-URL: Homepage, https://github.com/zhuxixi/jfox
6
6
  Project-URL: Repository, https://github.com/zhuxixi/jfox
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
18
  Requires-Python: >=3.10
19
19
  Requires-Dist: chromadb>=0.5.0
20
+ Requires-Dist: fastapi>=0.110.0
20
21
  Requires-Dist: jinja2>=3.0
21
22
  Requires-Dist: networkx>=3.0
22
23
  Requires-Dist: pydantic>=2.0
@@ -25,10 +26,8 @@ Requires-Dist: rank-bm25>=0.2.2
25
26
  Requires-Dist: rich>=13.0.0
26
27
  Requires-Dist: sentence-transformers>=3.0
27
28
  Requires-Dist: typer>=0.12.0
29
+ Requires-Dist: uvicorn[standard]>=0.27.0
28
30
  Requires-Dist: watchdog>=3.0
29
- Provides-Extra: daemon
30
- Requires-Dist: fastapi>=0.110.0; extra == 'daemon'
31
- Requires-Dist: uvicorn[standard]>=0.27.0; extra == 'daemon'
32
31
  Provides-Extra: dev
33
32
  Requires-Dist: black>=23.0; extra == 'dev'
34
33
  Requires-Dist: pytest-cov>=4.0; extra == 'dev'
@@ -94,7 +93,7 @@ graph TB
94
93
  vs[vector_store.py<br/>ChromaDB]
95
94
  bm[bm25_index.py<br/>BM25Okapi]
96
95
  emb[embedding_backend.py<br/>all-MiniLM-L6-v2]
97
- daemon["daemon/<br/>HTTP Server (可选)"]
96
+ daemon["daemon/<br/>HTTP Server"]
98
97
  end
99
98
  subgraph Analysis ["Analysis Layer"]
100
99
  gph["graph.py<br/>NetworkX DiGraph"]
@@ -125,7 +124,7 @@ graph TB
125
124
  | `vector_store.py` | ChromaDB wrapper with cosine similarity search |
126
125
  | `bm25_index.py` | BM25 keyword index with Chinese/English tokenizer |
127
126
  | `embedding_backend.py` | Lazy-loaded SentenceTransformer (`all-MiniLM-L6-v2`, 384-dim vectors) |
128
- | `daemon/` | Embedding HTTP 守护进程(可选依赖 `[daemon]`),常驻模型避免重复加载 |
127
+ | `daemon/` | Embedding HTTP 守护进程,常驻模型避免重复加载 |
129
128
  | `graph.py` | NetworkX DiGraph built from links + wiki links; BFS, clusters, hubs |
130
129
  | `indexer.py` | File watcher (watchdog) with debounce for incremental ChromaDB updates |
131
130
  | `formatters.py` | Output in JSON, CSV, YAML, Table, Paths, Tree formats |
@@ -54,7 +54,7 @@ graph TB
54
54
  vs[vector_store.py<br/>ChromaDB]
55
55
  bm[bm25_index.py<br/>BM25Okapi]
56
56
  emb[embedding_backend.py<br/>all-MiniLM-L6-v2]
57
- daemon["daemon/<br/>HTTP Server (可选)"]
57
+ daemon["daemon/<br/>HTTP Server"]
58
58
  end
59
59
  subgraph Analysis ["Analysis Layer"]
60
60
  gph["graph.py<br/>NetworkX DiGraph"]
@@ -85,7 +85,7 @@ graph TB
85
85
  | `vector_store.py` | ChromaDB wrapper with cosine similarity search |
86
86
  | `bm25_index.py` | BM25 keyword index with Chinese/English tokenizer |
87
87
  | `embedding_backend.py` | Lazy-loaded SentenceTransformer (`all-MiniLM-L6-v2`, 384-dim vectors) |
88
- | `daemon/` | Embedding HTTP 守护进程(可选依赖 `[daemon]`),常驻模型避免重复加载 |
88
+ | `daemon/` | Embedding HTTP 守护进程,常驻模型避免重复加载 |
89
89
  | `graph.py` | NetworkX DiGraph built from links + wiki links; BFS, clusters, hubs |
90
90
  | `indexer.py` | File watcher (watchdog) with debounce for incremental ChromaDB updates |
91
91
  | `formatters.py` | Output in JSON, CSV, YAML, Table, Paths, Tree formats |
@@ -41,7 +41,7 @@ pip uninstall jfox-cli
41
41
  ## Requirements
42
42
 
43
43
  - Python >= 3.10
44
- - Dependencies: typer, rich, sentence-transformers, chromadb, networkx, watchdog, pyyaml
44
+ - Dependencies: typer, rich, sentence-transformers, chromadb, networkx, watchdog, pyyaml, fastapi, uvicorn
45
45
 
46
46
  ## Windows PATH
47
47
 
@@ -0,0 +1,486 @@
1
+ # 同步 daemon + show 命令文档,新增 session-summary skill,删除旧 skill 目录
2
+
3
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
+
5
+ **Goal:** 将 #144 (daemon) 和 #146 (show) 两个新功能的文档同步到 README.md、CLAUDE.md、skills-recommend/,新增 jfox-session-summary skill,删除旧 skill/ 目录。
6
+
7
+ **Architecture:** 纯文档和 skill 文件更新,不涉及 Python 代码改动。按依赖顺序:先更新核心文档(README/CLAUDE.md),再更新 skill 文件,最后清理旧目录。
8
+
9
+ **Tech Stack:** Markdown, GitHub CLI (`gh`)
10
+
11
+ ---
12
+
13
+ ## File Structure
14
+
15
+ | Action | File | Responsibility |
16
+ |--------|------|----------------|
17
+ | Modify | `README.md` | 添加 daemon 架构节点、Module Map 行、show/daemon 命令 |
18
+ | Modify | `CLAUDE.md` | 更新 cli.py 行数、添加 show 命令约定 |
19
+ | Modify | `skills-recommend/claude-code/jfox-common/SKILL.md` | 补充 show、daemon 命令 |
20
+ | Modify | `skills-recommend/claude-code/jfox-ingest/SKILL.md` | 补充 show 命令 |
21
+ | Modify | `skills-recommend/claude-code/jfox-organize/SKILL.md` | 补充 show 命令 |
22
+ | Modify | `skills-recommend/claude-code/jfox-search/SKILL.md` | 补充 show、daemon 提示 |
23
+ | Create | `skills-recommend/claude-code/jfox-session-summary/SKILL.md` | 新 skill:会话总结写入知识库 |
24
+ | Modify | `skills-recommend/README.md` | 目录添加 jfox-session-summary |
25
+ | Delete | `skill/` | 旧版 skill 目录(zk 前缀) |
26
+
27
+ ---
28
+
29
+ ### Task 1: README.md — 架构图添加 daemon 层
30
+
31
+ **Files:**
32
+ - Modify: `README.md:42-70` (Architecture 架构图)
33
+
34
+ - [ ] **Step 1: 在架构图 Index Layer 中添加 daemon 节点和连线**
35
+
36
+ 在 `README.md` 第 56 行(`emb[embedding_backend.py...]` 之后)添加 daemon 节点,并在连线部分添加 daemon 关系:
37
+
38
+ ```diff
39
+ subgraph Index ["Index Layer"]
40
+ se[search_engine.py<br/>HybridSearchEngine]
41
+ vs[vector_store.py<br/>ChromaDB]
42
+ bm[bm25_index.py<br/>BM25Okapi]
43
+ emb[embedding_backend.py<br/>all-MiniLM-L6-v2]
44
+ + daemon["daemon/<br/>HTTP Server (可选)"]
45
+ end
46
+ ```
47
+
48
+ 连线部分(第 65-69 行)添加:
49
+
50
+ ```diff
51
+ cmd --> note & se & gph
52
+ note --> models --> md
53
+ se --> vs & bm
54
+ vs --> emb
55
+ + emb -.->|"fallback"| daemon
56
+ idx --> vs
57
+ ```
58
+
59
+ - [ ] **Step 2: 在 Module Map 表格添加 daemon/ 行**
60
+
61
+ 在 `README.md` 第 85 行(`embedding_backend.py` 行之后)插入:
62
+
63
+ ```
64
+ | `daemon/` | Embedding HTTP 守护进程,常驻模型避免重复加载 |
65
+ ```
66
+
67
+ - [ ] **Step 3: Commit**
68
+
69
+ ```bash
70
+ git add README.md
71
+ git commit -m "docs: add daemon module to README architecture diagram and module map"
72
+ ```
73
+
74
+ ---
75
+
76
+ ### Task 2: README.md — Command Reference 添加 show 和 daemon 命令
77
+
78
+ **Files:**
79
+ - Modify: `README.md:257-273` (Notes 章节), `README.md:308-313` (Performance & Debug 章节)
80
+
81
+ - [ ] **Step 1: 在 Notes 章节表格添加 show 命令**
82
+
83
+ 在 `README.md` 第 273 行(`jfox ingest-log` 行之后,`### Search & Analysis` 之前)插入:
84
+
85
+ ```
86
+ | `jfox show NOTE_ID` | View full note content in terminal |
87
+ ```
88
+
89
+ - [ ] **Step 2: 在 Performance & Debug 章节之后添加 Daemon 章节**
90
+
91
+ 在 `README.md` 第 313 行(`jfox perf clear-cache` 行之后)添加新的表格章节:
92
+
93
+ ```markdown
94
+ ### Daemon
95
+
96
+ | Command | Description |
97
+ |---------|-------------|
98
+ | `jfox daemon start` | Start embedding daemon (background process) |
99
+ | `jfox daemon stop` | Stop embedding daemon |
100
+ | `jfox daemon status` | Show daemon PID, port, model info |
101
+ ```
102
+
103
+ - [ ] **Step 3: Commit**
104
+
105
+ ```bash
106
+ git add README.md
107
+ git commit -m "docs: add show and daemon commands to README command reference"
108
+ ```
109
+
110
+ ---
111
+
112
+ ### Task 3: CLAUDE.md — 更新 cli.py 行数和 show 命令约定
113
+
114
+ **Files:**
115
+ - Modify: `CLAUDE.md:59` (cli.py 行数), `CLAUDE.md:98` (Adding a CLI command)
116
+
117
+ - [ ] **Step 1: 更新 cli.py 行数**
118
+
119
+ `CLAUDE.md` 第 59 行:
120
+
121
+ ```diff
122
+ - | `cli.py` | All CLI commands (~1800 lines). Commands follow pattern: `@app.command()` → `_xxx_impl()` helper for reuse |
123
+ + | `cli.py` | All CLI commands (~2500 lines). Commands follow pattern: `@app.command()` → `_xxx_impl()` helper for reuse |
124
+ ```
125
+
126
+ - [ ] **Step 2: 添加 show 命令约定**
127
+
128
+ `CLAUDE.md` 第 98 行(`Adding a CLI command` 之后)添加一条约定:
129
+
130
+ ```
131
+ - **Viewing note content**: `jfox show <id_or_title>` 复用 `find_note_id_by_title_or_id` 定位笔记,只读输出完整 Markdown
132
+ ```
133
+
134
+ - [ ] **Step 3: Commit**
135
+
136
+ ```bash
137
+ git add CLAUDE.md
138
+ git commit -m "docs: update CLAUDE.md with current cli.py size and show command convention"
139
+ ```
140
+
141
+ ---
142
+
143
+ ### Task 4: jfox-common skill — 补充 show 和 daemon 命令
144
+
145
+ **Files:**
146
+ - Modify: `skills-recommend/claude-code/jfox-common/SKILL.md:310-340` (命令参考)
147
+
148
+ - [ ] **Step 1: 在笔记 CRUD 章节添加 show 命令**
149
+
150
+ 在 `jfox-common/SKILL.md` 的笔记 CRUD 部分(`jfox list` 命令之前)添加:
151
+
152
+ ```bash
153
+ jfox show <id_or_title> --format json # 查看笔记完整内容
154
+ ```
155
+
156
+ - [ ] **Step 2: 在健康检查章节之后添加 Daemon 章节**
157
+
158
+ 在 `jfox-common/SKILL.md` 命令参考末尾(健康检查章节之后)添加:
159
+
160
+ ```markdown
161
+ ### Daemon(可选)
162
+
163
+ ```bash
164
+ jfox daemon start # 启动 embedding 守护进程
165
+ jfox daemon stop # 停止守护进程
166
+ jfox daemon status # 查看 PID、端口、模型信息
167
+ ```
168
+
169
+ 注意:daemon 依赖(fastapi、uvicorn)已作为必选依赖安装,`jfox daemon start` 可直接使用。
170
+ ```
171
+
172
+ - [ ] **Step 3: Commit**
173
+
174
+ ```bash
175
+ git add skills-recommend/claude-code/jfox-common/SKILL.md
176
+ git commit -m "docs(skill): add show and daemon commands to jfox-common skill"
177
+ ```
178
+
179
+ ---
180
+
181
+ ### Task 5: jfox-ingest skill — 补充 show 命令
182
+
183
+ **Files:**
184
+ - Modify: `skills-recommend/claude-code/jfox-ingest/SKILL.md:219-242` (命令参考)
185
+
186
+ - [ ] **Step 1: 在命令参考中添加 show 命令**
187
+
188
+ 在 `jfox-ingest/SKILL.md` 命令参考部分(`jfox add` 手动添加命令之后)添加:
189
+
190
+ ```bash
191
+ # 查看导入结果
192
+ jfox show <note_id> --format json --kb name
193
+ ```
194
+
195
+ - [ ] **Step 2: Commit**
196
+
197
+ ```bash
198
+ git add skills-recommend/claude-code/jfox-ingest/SKILL.md
199
+ git commit -m "docs(skill): add show command to jfox-ingest skill"
200
+ ```
201
+
202
+ ---
203
+
204
+ ### Task 6: jfox-organize skill — 补充 show 命令
205
+
206
+ **Files:**
207
+ - Modify: `skills-recommend/claude-code/jfox-organize/SKILL.md:151-164` (命令参考)
208
+
209
+ - [ ] **Step 1: 在命令参考中添加 show 命令**
210
+
211
+ 在 `jfox-organize/SKILL.md` 命令参考部分(`jfox inbox` 命令之后)添加:
212
+
213
+ ```bash
214
+ jfox show <id_or_title> --format json # 查看笔记完整内容(整理前预览)
215
+ ```
216
+
217
+ - [ ] **Step 2: Commit**
218
+
219
+ ```bash
220
+ git add skills-recommend/claude-code/jfox-organize/SKILL.md
221
+ git commit -m "docs(skill): add show command to jfox-organize skill"
222
+ ```
223
+
224
+ ---
225
+
226
+ ### Task 7: jfox-search skill — 补充 show 和 daemon 提示
227
+
228
+ **Files:**
229
+ - Modify: `skills-recommend/claude-code/jfox-search/SKILL.md:38-48` (搜索结果展示), `README.md:102-106` (Error Handling)
230
+
231
+ - [ ] **Step 1: 在搜索结果展示中添加 show 提示**
232
+
233
+ 在 `jfox-search/SKILL.md` 的搜索结果展示模板(第 48 行后)添加提示:
234
+
235
+ ```
236
+ 提示:使用 `jfox show <note_id>` 查看笔记完整内容。
237
+ ```
238
+
239
+ - [ ] **Step 2: 在 Error Handling 中添加 daemon 提示**
240
+
241
+ 在 `jfox-search/SKILL.md` 的 Error Handling 部分("Slow search" 条目)替换为:
242
+
243
+ ```diff
244
+ - - **Slow search**: First search loads embedding model (30-60s). Subsequent searches are fast.
245
+ + - **Slow search**: First search loads embedding model (30-60s). Subsequent searches are fast. 可通过 `jfox daemon start` 启动守护进程避免重复加载。
246
+ ```
247
+
248
+ - [ ] **Step 3: Commit**
249
+
250
+ ```bash
251
+ git add skills-recommend/claude-code/jfox-search/SKILL.md
252
+ git commit -m "docs(skill): add show hint and daemon tip to jfox-search skill"
253
+ ```
254
+
255
+ ---
256
+
257
+ ### Task 8: 新增 jfox-session-summary skill
258
+
259
+ **Files:**
260
+ - Create: `skills-recommend/claude-code/jfox-session-summary/SKILL.md`
261
+ - Modify: `skills-recommend/README.md`
262
+
263
+ - [ ] **Step 1: 创建 skill 文件**
264
+
265
+ 创建 `skills-recommend/claude-code/jfox-session-summary/SKILL.md`:
266
+
267
+ ```markdown
268
+ ---
269
+ name: jfox-session-summary
270
+ description: |
271
+ Use when user wants to save the current conversation/session summary into their Zettelkasten as a fleeting note. Triggers on "保存会话", "总结到知识库", "记录这次对话", "写入知识库", "save session", "summarize to knowledge base", "log this conversation".
272
+ ---
273
+
274
+ # JFox Session Summary
275
+
276
+ 将当前 Claude Code 会话的总结写入 jfox 知识库作为 fleeting 笔记。
277
+
278
+ ## 前置条件
279
+
280
+ - 知识库已初始化(`jfox init`)
281
+ - 确认目标知识库(通过 `--kb` 或当前默认)
282
+
283
+ ## 工作流程
284
+
285
+ ### Step 1: 生成会话总结
286
+
287
+ 回顾当前会话内容,生成结构化总结:
288
+
289
+ ```
290
+ ## 会话总结
291
+
292
+ ### 主题
293
+ [一句话描述会话主要话题]
294
+
295
+ ### 完成的工作
296
+ - [具体完成的任务 1]
297
+ - [具体完成的任务 2]
298
+ - ...
299
+
300
+ ### 关键决策
301
+ - [决策 1 及其理由]
302
+ - [决策 2 及其理由]
303
+
304
+ ### 待办 / 后续
305
+ - [未完成的事项]
306
+ - [后续步骤]
307
+ ```
308
+
309
+ ### Step 2: 写入知识库
310
+
311
+ ```bash
312
+ jfox add "<markdown-escaped-summary>" \
313
+ --title "Session: <topic>" \
314
+ --type fleeting \
315
+ --tag session \
316
+ --kb <kb-name> \
317
+ --format json
318
+ ```
319
+
320
+ **注意**:
321
+ - 标题格式统一为 `Session: <简短主题>`
322
+ - 类型使用 `fleeting`(会话记录是临时性笔记,后续可提炼为 permanent)
323
+ - 标签统一使用 `session`
324
+ - 内容中的双引号需要转义,或使用 `--content-file` 从临时文件读取
325
+
326
+ ### Step 3: 处理长内容
327
+
328
+ 如果总结超过 500 字或包含特殊字符,优先使用 `--content-file`:
329
+
330
+ ```bash
331
+ # 写入临时文件
332
+ cat > /tmp/session-summary.md << 'EOF'
333
+ <总结内容>
334
+ EOF
335
+
336
+ # 从文件导入
337
+ jfox add --content-file /tmp/session-summary.md \
338
+ --title "Session: <topic>" \
339
+ --type fleeting \
340
+ --tag session \
341
+ --kb <kb-name> \
342
+ --format json
343
+ ```
344
+
345
+ ## 命令参考
346
+
347
+ ```bash
348
+ # 直接添加(短内容)
349
+ jfox add "<summary>" --title "Session: <topic>" --type fleeting --tag session --kb <name>
350
+
351
+ # 从文件添加(长内容或含特殊字符)
352
+ jfox add --content-file <path> --title "Session: <topic>" --type fleeting --tag session --kb <name>
353
+
354
+ # 验证写入
355
+ jfox show <note_id> --format json
356
+ ```
357
+
358
+ ## 错误处理
359
+
360
+ - **"Knowledge base not found"**: 提示用户先运行 `/jfox-common` 创建知识库
361
+ - **内容过长导致 shell 解析失败**: 切换到 `--content-file` 方式
362
+ - **特殊字符转义问题**: 使用单引号包裹内容,或写入临时文件
363
+ ```
364
+
365
+ - [ ] **Step 2: 更新 skills-recommend/README.md 目录结构**
366
+
367
+ 在 `skills-recommend/README.md` 第 9 行的目录结构中添加 `jfox-session-summary`:
368
+
369
+ ```diff
370
+ skills-recommend/
371
+ └── claude-code/ # Claude Code 专用 SKILL.md 格式
372
+ ├── jfox-ingest/ # 数据导入(git log / GitHub PR / Issues)
373
+ ├── jfox-organize/ # 知识库整理与提炼(fleeting → permanent)
374
+ ├── jfox-search/ # 知识库搜索与图谱查询
375
+ + ├── jfox-session-summary/ # 会话总结写入知识库
376
+ └── jfox-common/ # 知识库管理 + 健康检查
377
+ ```
378
+
379
+ 在斜杠命令列表中(第 34 行附近)添加:
380
+
381
+ ```diff
382
+ - `/jfox-organize` — 整理知识库、提炼 permanent 笔记、生成 [[wiki links]]
383
+ - `/jfox-search` — 搜索笔记、图谱查询、链接推荐
384
+ + - `/jfox-session-summary` — 将会话总结写入知识库作为 fleeting 笔记
385
+ ```
386
+
387
+ - [ ] **Step 3: Commit**
388
+
389
+ ```bash
390
+ git add skills-recommend/claude-code/jfox-session-summary/SKILL.md skills-recommend/README.md
391
+ git commit -m "docs(skill): add jfox-session-summary skill for saving session summaries"
392
+ ```
393
+
394
+ ---
395
+
396
+ ### Task 9: 删除旧 skill/ 目录
397
+
398
+ **Files:**
399
+ - Delete: `skill/evals/evals.json`
400
+ - Delete: `skill/knowledge-base-notes/SKILL.md`
401
+ - Delete: `skill/knowledge-base-workspace/SKILL.md`
402
+ - Delete: `skill/` (整个目录)
403
+
404
+ - [ ] **Step 1: 删除 skill/ 目录**
405
+
406
+ ```bash
407
+ git rm -r skill/
408
+ ```
409
+
410
+ - [ ] **Step 2: Commit**
411
+
412
+ ```bash
413
+ git commit -m "chore: remove legacy skill/ directory (replaced by skills-recommend/)"
414
+ ```
415
+
416
+ ---
417
+
418
+ ### Task 10: 最终验证
419
+
420
+ - [ ] **Step 1: 检查 README.md 中 daemon 和 show 的完整性**
421
+
422
+ ```bash
423
+ grep -n "daemon" README.md
424
+ grep -n "jfox show" README.md
425
+ ```
426
+
427
+ 预期:daemon 在架构图(1处)、Module Map(1处)、Command Reference(3条命令)中出现;show 在 Command Reference Notes(1条)中出现。
428
+
429
+ - [ ] **Step 2: 检查 CLAUDE.md 更新**
430
+
431
+ ```bash
432
+ grep -n "~2500" CLAUDE.md
433
+ grep -n "jfox show" CLAUDE.md
434
+ ```
435
+
436
+ - [ ] **Step 3: 检查 skills-recommend 目录结构**
437
+
438
+ ```bash
439
+ ls skills-recommend/claude-code/
440
+ ```
441
+
442
+ 预期:`jfox-common jfox-ingest jfox-organize jfox-search jfox-session-summary`
443
+
444
+ - [ ] **Step 4: 确认旧 skill/ 目录已删除**
445
+
446
+ ```bash
447
+ ls skill/ 2>&1
448
+ ```
449
+
450
+ 预期:`No such file or directory` 或类似错误。
451
+
452
+ - [ ] **Step 5: 最终 commit(如有 lint/格式修正)**
453
+
454
+ ```bash
455
+ git add -A
456
+ git status
457
+ # 如有未提交的修正:
458
+ git commit -m "docs: final cleanup for #147 sync"
459
+ ```
460
+
461
+ ---
462
+
463
+ ## Self-Review
464
+
465
+ **1. Spec coverage:**
466
+
467
+ | Issue #147 要求 | 对应 Task |
468
+ |---|---|
469
+ | README 架构图添加 daemon | Task 1 |
470
+ | README Module Map 添加 daemon/ | Task 1 |
471
+ | README Command Reference 添加 show | Task 2 |
472
+ | README Command Reference 添加 daemon | Task 2 |
473
+ | CLAUDE.md 更新 cli.py 行数 | Task 3 |
474
+ | CLAUDE.md 添加 show 约定 | Task 3 |
475
+ | jfox-common skill 补充 show/daemon | Task 4 |
476
+ | jfox-ingest skill 补充 show | Task 5 |
477
+ | jfox-organize skill 补充 show | Task 6 |
478
+ | jfox-search skill 补充 show/daemon | Task 7 |
479
+ | 新增 jfox-session-summary skill | Task 8 |
480
+ | skills-recommend README 更新目录 | Task 8 |
481
+ | 删除旧 skill/ 目录 | Task 9 |
482
+ | 最终验证 | Task 10 |
483
+
484
+ **2. Placeholder scan:** No TBD/TODO/placeholders found. All steps contain exact code or commands.
485
+
486
+ **3. Type consistency:** No code types to verify — this is a documentation-only plan. File paths and command syntax are consistent across all tasks.
@@ -1,5 +1,5 @@
1
1
  """JFox - Zettelkasten 知识管理工具"""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.3.2"
4
4
  __author__ = "User"
5
5
  __email__ = "user@example.com"
@@ -115,7 +115,8 @@ def start_daemon(host: str = DEFAULT_HOST, port: int = DEFAULT_PORT) -> bool:
115
115
  # Windows: 后台分离进程,不弹窗
116
116
  CREATE_NEW_PROCESS_GROUP = 0x00000200
117
117
  DETACHED_PROCESS = 0x00000008
118
- kwargs["creationflags"] = CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS
118
+ CREATE_NO_WINDOW = 0x08000000
119
+ kwargs["creationflags"] = CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS | CREATE_NO_WINDOW
119
120
  else:
120
121
  kwargs["start_new_session"] = True
121
122
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "jfox-cli"
7
- version = "0.3.0"
7
+ version = "0.3.2"
8
8
  description = "JFox - Zettelkasten 知识管理 CLI 工具"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -34,6 +34,8 @@ dependencies = [
34
34
  "pydantic>=2.0",
35
35
  "rank-bm25>=0.2.2",
36
36
  "jinja2>=3.0",
37
+ "fastapi>=0.110.0",
38
+ "uvicorn[standard]>=0.27.0",
37
39
  ]
38
40
 
39
41
  [project.optional-dependencies]
@@ -48,10 +50,6 @@ dev = [
48
50
  "black>=23.0",
49
51
  "ruff>=0.1.0",
50
52
  ]
51
- daemon = [
52
- "fastapi>=0.110.0",
53
- "uvicorn[standard]>=0.27.0",
54
- ]
55
53
 
56
54
  [project.scripts]
57
55
  jfox = "jfox.cli:main"
@@ -347,7 +347,7 @@ jfox daemon stop # 停止守护进程
347
347
  jfox daemon status # 查看 PID、端口、模型信息
348
348
  ```
349
349
 
350
- 注意:daemon 是可选依赖 `[daemon]`,未安装时自动 fallback 到本地模型加载。
350
+ 注意:daemon 依赖(fastapi、uvicorn)已作为必选依赖安装,`jfox daemon start` 可直接使用。
351
351
 
352
352
  > 搜索、导入、整理等高频操作命令见对应技能文档(jfox-search、jfox-ingest、jfox-organize)。
353
353
 
@@ -243,7 +243,7 @@ jfox add "content" --title "title" --type fleeting --kb name
243
243
  # 查看导入结果
244
244
  jfox show <note_id> --format json --kb name
245
245
 
246
- # 批量导入加速(可选,需安装 [daemon] 依赖)
246
+ # 批量导入加速(可选)
247
247
  jfox daemon start # 启动 embedding 守护进程
248
248
  jfox daemon stop # 完成后停止
249
249
  ```
@@ -163,7 +163,7 @@ jfox daily --json # 查看今天的笔记
163
163
  jfox daily --date 2026-04-01 --json # 查看指定日期的笔记
164
164
  jfox show <id_or_title> --format json # 查看笔记完整内容(整理前预览)
165
165
 
166
- # 批量整理加速(可选,需安装 [daemon] 依赖)
166
+ # 批量整理加速(可选)
167
167
  jfox daemon start # 启动 embedding 守护进程
168
168
  jfox daemon stop # 完成后停止
169
169
  ```
@@ -105,4 +105,4 @@ jfox search "<query>" --kb work --format json
105
105
 
106
106
  - **"Index not found"**: Run `jfox index rebuild` to build the search index.
107
107
  - **Empty results**: Try broader query, switch mode to `hybrid`, or lower `--threshold`.
108
- - **Slow search**: First search loads embedding model (30-60s). Subsequent searches are fast. 可通过 `jfox daemon start`(需安装 `[daemon]` 依赖)启动守护进程避免重复加载。
108
+ - **Slow search**: First search loads embedding model (30-60s). Subsequent searches are fast. 可通过 `jfox daemon start` 启动守护进程避免重复加载。
@@ -867,10 +867,11 @@ wheels = [
867
867
 
868
868
  [[package]]
869
869
  name = "jfox-cli"
870
- version = "0.3.0"
870
+ version = "0.3.2"
871
871
  source = { editable = "." }
872
872
  dependencies = [
873
873
  { name = "chromadb" },
874
+ { name = "fastapi" },
874
875
  { name = "jinja2" },
875
876
  { name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
876
877
  { name = "networkx", version = "3.6.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
@@ -880,14 +881,11 @@ dependencies = [
880
881
  { name = "rich" },
881
882
  { name = "sentence-transformers" },
882
883
  { name = "typer" },
884
+ { name = "uvicorn", extra = ["standard"] },
883
885
  { name = "watchdog" },
884
886
  ]
885
887
 
886
888
  [package.optional-dependencies]
887
- daemon = [
888
- { name = "fastapi" },
889
- { name = "uvicorn", extra = ["standard"] },
890
- ]
891
889
  dev = [
892
890
  { name = "black" },
893
891
  { name = "pytest" },
@@ -901,7 +899,7 @@ dev = [
901
899
  requires-dist = [
902
900
  { name = "black", marker = "extra == 'dev'", specifier = ">=23.0" },
903
901
  { name = "chromadb", specifier = ">=0.5.0" },
904
- { name = "fastapi", marker = "extra == 'daemon'", specifier = ">=0.110.0" },
902
+ { name = "fastapi", specifier = ">=0.110.0" },
905
903
  { name = "jinja2", specifier = ">=3.0" },
906
904
  { name = "networkx", specifier = ">=3.0" },
907
905
  { name = "pydantic", specifier = ">=2.0" },
@@ -915,10 +913,10 @@ requires-dist = [
915
913
  { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.1.0" },
916
914
  { name = "sentence-transformers", specifier = ">=3.0" },
917
915
  { name = "typer", specifier = ">=0.12.0" },
918
- { name = "uvicorn", extras = ["standard"], marker = "extra == 'daemon'", specifier = ">=0.27.0" },
916
+ { name = "uvicorn", extras = ["standard"], specifier = ">=0.27.0" },
919
917
  { name = "watchdog", specifier = ">=3.0" },
920
918
  ]
921
- provides-extras = ["dev", "daemon"]
919
+ provides-extras = ["dev"]
922
920
 
923
921
  [[package]]
924
922
  name = "jinja2"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes