reprompt-cli 0.3.2__tar.gz → 1.0.0__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 (219) hide show
  1. reprompt_cli-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  2. reprompt_cli-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  3. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/.github/workflows/ci.yml +1 -1
  4. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/.github/workflows/publish.yml +8 -0
  5. reprompt_cli-1.0.0/.gitignore +59 -0
  6. reprompt_cli-1.0.0/CHANGELOG.md +294 -0
  7. reprompt_cli-1.0.0/CLAUDE.md +130 -0
  8. reprompt_cli-1.0.0/PKG-INFO +143 -0
  9. reprompt_cli-1.0.0/README.md +98 -0
  10. reprompt_cli-1.0.0/action.yml +100 -0
  11. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/docs/launch-post.md +24 -14
  12. reprompt_cli-1.0.0/docs/roadmap.md +74 -0
  13. reprompt_cli-1.0.0/docs/superpowers/specs/2026-03-11-html-dashboard-design.md +144 -0
  14. reprompt_cli-1.0.0/docs/superpowers/specs/2026-03-11-merge-view-design.md +136 -0
  15. reprompt_cli-1.0.0/docs/superpowers/specs/2026-03-11-prompt-templates-design.md +62 -0
  16. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/pyproject.toml +11 -3
  17. reprompt_cli-1.0.0/scripts/launch/hn_monitor.py +163 -0
  18. reprompt_cli-1.0.0/scripts/launch/reddit_helper.py +193 -0
  19. reprompt_cli-1.0.0/src/reprompt/__init__.py +88 -0
  20. reprompt_cli-1.0.0/src/reprompt/adapters/aider.py +116 -0
  21. reprompt_cli-1.0.0/src/reprompt/adapters/chatgpt.py +103 -0
  22. reprompt_cli-1.0.0/src/reprompt/adapters/claude_chat.py +125 -0
  23. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/adapters/claude_code.py +19 -84
  24. reprompt_cli-1.0.0/src/reprompt/adapters/cline.py +127 -0
  25. reprompt_cli-1.0.0/src/reprompt/adapters/cursor.py +172 -0
  26. reprompt_cli-1.0.0/src/reprompt/adapters/filters.py +179 -0
  27. reprompt_cli-1.0.0/src/reprompt/adapters/gemini.py +76 -0
  28. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/adapters/openclaw.py +85 -1
  29. reprompt_cli-1.0.0/src/reprompt/bridge/__init__.py +1 -0
  30. reprompt_cli-1.0.0/src/reprompt/bridge/handler.py +116 -0
  31. reprompt_cli-1.0.0/src/reprompt/bridge/host.py +39 -0
  32. reprompt_cli-1.0.0/src/reprompt/bridge/manifest.py +70 -0
  33. reprompt_cli-1.0.0/src/reprompt/bridge/protocol.py +38 -0
  34. reprompt_cli-1.0.0/src/reprompt/cli.py +1238 -0
  35. reprompt_cli-1.0.0/src/reprompt/commands/telemetry.py +76 -0
  36. reprompt_cli-1.0.0/src/reprompt/commands/wrapped.py +70 -0
  37. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/config.py +1 -1
  38. reprompt_cli-1.0.0/src/reprompt/core/analyzer.py +761 -0
  39. reprompt_cli-1.0.0/src/reprompt/core/digest.py +61 -0
  40. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/core/effectiveness.py +23 -11
  41. reprompt_cli-1.0.0/src/reprompt/core/extractors.py +510 -0
  42. reprompt_cli-1.0.0/src/reprompt/core/extractors_zh.py +519 -0
  43. reprompt_cli-1.0.0/src/reprompt/core/insights.py +161 -0
  44. reprompt_cli-1.0.0/src/reprompt/core/lang_detect.py +104 -0
  45. reprompt_cli-1.0.0/src/reprompt/core/library.py +407 -0
  46. reprompt_cli-1.0.0/src/reprompt/core/lint.py +112 -0
  47. reprompt_cli-1.0.0/src/reprompt/core/merge_view.py +154 -0
  48. reprompt_cli-1.0.0/src/reprompt/core/persona.py +144 -0
  49. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/core/pipeline.py +73 -14
  50. reprompt_cli-1.0.0/src/reprompt/core/prompt_dna.py +104 -0
  51. reprompt_cli-1.0.0/src/reprompt/core/recommend.py +229 -0
  52. reprompt_cli-1.0.0/src/reprompt/core/scorer.py +230 -0
  53. reprompt_cli-1.0.0/src/reprompt/core/segmenter.py +220 -0
  54. reprompt_cli-1.0.0/src/reprompt/core/style.py +107 -0
  55. reprompt_cli-1.0.0/src/reprompt/core/templates.py +62 -0
  56. reprompt_cli-1.0.0/src/reprompt/core/wrapped.py +70 -0
  57. reprompt_cli-1.0.0/src/reprompt/demo.py +196 -0
  58. reprompt_cli-1.0.0/src/reprompt/output/chartjs.min.js +20 -0
  59. reprompt_cli-1.0.0/src/reprompt/output/html_report.py +571 -0
  60. reprompt_cli-1.0.0/src/reprompt/output/terminal.py +584 -0
  61. reprompt_cli-1.0.0/src/reprompt/output/wrapped_html.py +286 -0
  62. reprompt_cli-1.0.0/src/reprompt/output/wrapped_terminal.py +136 -0
  63. reprompt_cli-1.0.0/src/reprompt/sharing/__init__.py +0 -0
  64. reprompt_cli-1.0.0/src/reprompt/sharing/client.py +57 -0
  65. reprompt_cli-1.0.0/src/reprompt/sharing/clipboard.py +24 -0
  66. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/storage/db.py +409 -3
  67. reprompt_cli-1.0.0/src/reprompt/telemetry/__init__.py +1 -0
  68. reprompt_cli-1.0.0/src/reprompt/telemetry/collector.py +150 -0
  69. reprompt_cli-1.0.0/src/reprompt/telemetry/consent.py +123 -0
  70. reprompt_cli-1.0.0/src/reprompt/telemetry/events.py +152 -0
  71. reprompt_cli-1.0.0/src/reprompt/telemetry/prompt.py +77 -0
  72. reprompt_cli-1.0.0/src/reprompt/telemetry/queue.py +104 -0
  73. reprompt_cli-1.0.0/src/reprompt/telemetry/sender.py +61 -0
  74. reprompt_cli-1.0.0/tests/__init__.py +0 -0
  75. reprompt_cli-1.0.0/tests/fixtures/aider_chat_history.md +56 -0
  76. reprompt_cli-1.0.0/tests/fixtures/chatgpt_conversations.json +105 -0
  77. reprompt_cli-1.0.0/tests/fixtures/claude_chat_export.json +78 -0
  78. reprompt_cli-1.0.0/tests/fixtures/cline_task/api_conversation_history.json +11 -0
  79. reprompt_cli-1.0.0/tests/fixtures/gemini_session.json +61 -0
  80. reprompt_cli-1.0.0/tests/test_adapter_aider.py +110 -0
  81. reprompt_cli-1.0.0/tests/test_adapter_chatgpt.py +121 -0
  82. reprompt_cli-1.0.0/tests/test_adapter_claude.py +360 -0
  83. reprompt_cli-1.0.0/tests/test_adapter_claude_chat.py +140 -0
  84. reprompt_cli-1.0.0/tests/test_adapter_cline.py +100 -0
  85. reprompt_cli-1.0.0/tests/test_adapter_gemini.py +105 -0
  86. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_adapter_openclaw.py +195 -1
  87. reprompt_cli-1.0.0/tests/test_bridge_cli.py +52 -0
  88. reprompt_cli-1.0.0/tests/test_bridge_handler.py +118 -0
  89. reprompt_cli-1.0.0/tests/test_bridge_integration.py +82 -0
  90. reprompt_cli-1.0.0/tests/test_bridge_manifest.py +73 -0
  91. reprompt_cli-1.0.0/tests/test_bridge_protocol.py +63 -0
  92. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_cli.py +2 -2
  93. reprompt_cli-1.0.0/tests/test_cli_library_effectiveness.py +87 -0
  94. reprompt_cli-1.0.0/tests/test_clipboard.py +24 -0
  95. reprompt_cli-1.0.0/tests/test_coverage_boost.py +764 -0
  96. reprompt_cli-1.0.0/tests/test_cursor_adapter.py +160 -0
  97. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_db.py +49 -0
  98. reprompt_cli-1.0.0/tests/test_db_digest.py +84 -0
  99. reprompt_cli-1.0.0/tests/test_db_effectiveness.py +121 -0
  100. reprompt_cli-1.0.0/tests/test_demo.py +47 -0
  101. reprompt_cli-1.0.0/tests/test_digest.py +198 -0
  102. reprompt_cli-1.0.0/tests/test_digest_cli.py +249 -0
  103. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_e2e.py +83 -0
  104. reprompt_cli-1.0.0/tests/test_empty_state.py +104 -0
  105. reprompt_cli-1.0.0/tests/test_extractors.py +243 -0
  106. reprompt_cli-1.0.0/tests/test_extractors_routing.py +78 -0
  107. reprompt_cli-1.0.0/tests/test_extractors_zh.py +429 -0
  108. reprompt_cli-1.0.0/tests/test_extractors_zh_e2e.py +333 -0
  109. reprompt_cli-1.0.0/tests/test_html_report.py +237 -0
  110. reprompt_cli-1.0.0/tests/test_import_cli.py +141 -0
  111. reprompt_cli-1.0.0/tests/test_import_e2e.py +88 -0
  112. reprompt_cli-1.0.0/tests/test_insights.py +98 -0
  113. reprompt_cli-1.0.0/tests/test_insights_cli.py +25 -0
  114. reprompt_cli-1.0.0/tests/test_lang_detect.py +76 -0
  115. reprompt_cli-1.0.0/tests/test_library.py +195 -0
  116. reprompt_cli-1.0.0/tests/test_lint.py +81 -0
  117. reprompt_cli-1.0.0/tests/test_lint_cli.py +95 -0
  118. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_mcp.py +2 -0
  119. reprompt_cli-1.0.0/tests/test_merge_view.py +132 -0
  120. reprompt_cli-1.0.0/tests/test_persona.py +187 -0
  121. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_pipeline.py +92 -1
  122. reprompt_cli-1.0.0/tests/test_prompt_dna.py +92 -0
  123. reprompt_cli-1.0.0/tests/test_public_api.py +33 -0
  124. reprompt_cli-1.0.0/tests/test_recommend.py +212 -0
  125. reprompt_cli-1.0.0/tests/test_schema_version.py +128 -0
  126. reprompt_cli-1.0.0/tests/test_score_cli.py +80 -0
  127. reprompt_cli-1.0.0/tests/test_scorer.py +126 -0
  128. reprompt_cli-1.0.0/tests/test_segmenter.py +87 -0
  129. reprompt_cli-1.0.0/tests/test_share_e2e.py +29 -0
  130. reprompt_cli-1.0.0/tests/test_sharing_client.py +63 -0
  131. reprompt_cli-1.0.0/tests/test_style.py +146 -0
  132. reprompt_cli-1.0.0/tests/test_telemetry_cli.py +89 -0
  133. reprompt_cli-1.0.0/tests/test_telemetry_collector.py +159 -0
  134. reprompt_cli-1.0.0/tests/test_telemetry_consent.py +100 -0
  135. reprompt_cli-1.0.0/tests/test_telemetry_e2e.py +172 -0
  136. reprompt_cli-1.0.0/tests/test_telemetry_events.py +211 -0
  137. reprompt_cli-1.0.0/tests/test_telemetry_prompt.py +48 -0
  138. reprompt_cli-1.0.0/tests/test_telemetry_queue.py +108 -0
  139. reprompt_cli-1.0.0/tests/test_telemetry_sender.py +95 -0
  140. reprompt_cli-1.0.0/tests/test_templates.py +158 -0
  141. reprompt_cli-1.0.0/tests/test_use_cli.py +84 -0
  142. reprompt_cli-1.0.0/tests/test_wrapped.py +304 -0
  143. reprompt_cli-1.0.0/tests/test_wrapped_cli.py +38 -0
  144. reprompt_cli-1.0.0/tests/test_wrapped_e2e.py +94 -0
  145. reprompt_cli-1.0.0/tests/test_wrapped_html.py +155 -0
  146. reprompt_cli-1.0.0/tests/test_wrapped_output.py +97 -0
  147. reprompt_cli-1.0.0/tests/test_wrapped_share.py +88 -0
  148. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/uv.lock +21 -2
  149. reprompt_cli-0.3.2/.gitignore +0 -36
  150. reprompt_cli-0.3.2/CHANGELOG.md +0 -100
  151. reprompt_cli-0.3.2/CLAUDE.md +0 -67
  152. reprompt_cli-0.3.2/PKG-INFO +0 -283
  153. reprompt_cli-0.3.2/README.md +0 -241
  154. reprompt_cli-0.3.2/docs/launch/chinese-communities.md +0 -149
  155. reprompt_cli-0.3.2/docs/launch/demo.gif +0 -0
  156. reprompt_cli-0.3.2/docs/launch/demo.tape +0 -52
  157. reprompt_cli-0.3.2/docs/launch/devto-article.md +0 -129
  158. reprompt_cli-0.3.2/docs/launch/reddit-posts.md +0 -113
  159. reprompt_cli-0.3.2/docs/launch/show-hn.md +0 -45
  160. reprompt_cli-0.3.2/docs/launch/twitter-thread.md +0 -80
  161. reprompt_cli-0.3.2/docs/retention-features-spec.md +0 -1245
  162. reprompt_cli-0.3.2/src/reprompt/__init__.py +0 -5
  163. reprompt_cli-0.3.2/src/reprompt/cli.py +0 -344
  164. reprompt_cli-0.3.2/src/reprompt/core/analyzer.py +0 -106
  165. reprompt_cli-0.3.2/src/reprompt/core/library.py +0 -91
  166. reprompt_cli-0.3.2/src/reprompt/output/terminal.py +0 -149
  167. reprompt_cli-0.3.2/tests/test_adapter_claude.py +0 -203
  168. reprompt_cli-0.3.2/tests/test_library.py +0 -68
  169. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/.editorconfig +0 -0
  170. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  171. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  172. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  173. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/.github/dependabot.yml +0 -0
  174. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/.pre-commit-config.yaml +0 -0
  175. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/CODE_OF_CONDUCT.md +0 -0
  176. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/CONTRIBUTING.md +0 -0
  177. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/LICENSE +0 -0
  178. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/SECURITY.md +0 -0
  179. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/scripts/generate_demo_data.py +0 -0
  180. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/adapters/__init__.py +0 -0
  181. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/adapters/base.py +0 -0
  182. {reprompt_cli-0.3.2/tests → reprompt_cli-1.0.0/src/reprompt/commands}/__init__.py +0 -0
  183. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/core/__init__.py +0 -0
  184. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/core/dedup.py +0 -0
  185. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/core/models.py +0 -0
  186. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/core/session_meta.py +0 -0
  187. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/core/timeutil.py +0 -0
  188. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/core/trends.py +0 -0
  189. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/embeddings/__init__.py +0 -0
  190. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/embeddings/base.py +0 -0
  191. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/embeddings/local_embed.py +0 -0
  192. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/embeddings/ollama.py +0 -0
  193. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/embeddings/openai_embed.py +0 -0
  194. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/embeddings/tfidf.py +0 -0
  195. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/mcp.py +0 -0
  196. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/mcp_main.py +0 -0
  197. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/output/__init__.py +0 -0
  198. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/output/json_out.py +0 -0
  199. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/output/markdown.py +0 -0
  200. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/py.typed +0 -0
  201. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/src/reprompt/storage/__init__.py +0 -0
  202. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/conftest.py +0 -0
  203. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/fixtures/claude_session.jsonl +0 -0
  204. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/fixtures/openclaw_session.jsonl +0 -0
  205. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_analyzer.py +0 -0
  206. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_config.py +0 -0
  207. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_db_trends.py +0 -0
  208. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_dedup.py +0 -0
  209. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_effectiveness.py +0 -0
  210. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_embeddings_local.py +0 -0
  211. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_embeddings_ollama.py +0 -0
  212. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_embeddings_openai.py +0 -0
  213. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_install_hook.py +0 -0
  214. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_markdown.py +0 -0
  215. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_models.py +0 -0
  216. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_output.py +0 -0
  217. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_timeutil.py +0 -0
  218. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_trends.py +0 -0
  219. {reprompt_cli-0.3.2 → reprompt_cli-1.0.0}/tests/test_trends_cli.py +0 -0
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+ - OS: [e.g. iOS]
28
+ - Browser [e.g. chrome, safari]
29
+ - Version [e.g. 22]
30
+
31
+ **Smartphone (please complete the following information):**
32
+ - Device: [e.g. iPhone6]
33
+ - OS: [e.g. iOS8.1]
34
+ - Browser [e.g. stock browser, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Additional context**
38
+ Add any other context about the problem here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
@@ -28,7 +28,7 @@ jobs:
28
28
  - name: Format check
29
29
  run: ruff format --check src/ tests/
30
30
  - name: Test
31
- run: pytest tests/ -v --cov=reprompt --cov-report=xml
31
+ run: pytest tests/ -v --cov=reprompt --cov-report=xml --cov-fail-under=88
32
32
  - name: Upload coverage
33
33
  if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
34
34
  uses: codecov/codecov-action@v5
@@ -15,6 +15,14 @@ jobs:
15
15
  - uses: actions/setup-python@v6
16
16
  with:
17
17
  python-version: "3.12"
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v7
20
+ - name: Install dependencies
21
+ run: uv pip install --system -e ".[dev]"
22
+ - name: Lint
23
+ run: ruff check src/ tests/
24
+ - name: Test
25
+ run: pytest tests/ -v --cov=reprompt --cov-fail-under=88
18
26
  - name: Install build tools
19
27
  run: pip install build
20
28
  - name: Build
@@ -0,0 +1,59 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ *.egg-info/
7
+ *.egg
8
+ dist/
9
+ build/
10
+ .eggs/
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+ ENV/
16
+
17
+ # IDE
18
+ .idea/
19
+ .vscode/
20
+ *.swp
21
+ *.swo
22
+ *~
23
+
24
+ # Testing
25
+ .pytest_cache/
26
+ .coverage
27
+ htmlcov/
28
+ .mypy_cache/
29
+
30
+ # OS
31
+ .DS_Store
32
+ Thumbs.db
33
+
34
+ # Project
35
+ *.db
36
+ .env
37
+
38
+ # Local memory / session context (never commit)
39
+ thoughts/
40
+ .claude/
41
+ .tldr/
42
+ .tldrignore
43
+ .worktrees/
44
+
45
+ # Launch / marketing drafts (not part of the codebase)
46
+ docs/launch/
47
+
48
+ # Brand assets & design tools (local reference only)
49
+ docs/brand-system.html
50
+ docs/logo-proposals.html
51
+ docs/icon-*
52
+ docs/logo-*
53
+
54
+ # Implementation plans (local reference only)
55
+ docs/superpowers/plans/
56
+
57
+ # Generated outputs
58
+ reprompt-report.html
59
+ *-hot-phrases-tf-idf.txt
@@ -0,0 +1,294 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [1.0.0] - 2026-03-16
6
+
7
+ ### Changed
8
+ - **Stability release** — no new features, focused on reliability and trust
9
+ - Empty-state guidance for `report` and `digest` commands
10
+ - Scan shows "Try next" hints for new users
11
+ - Feature extraction errors logged instead of silently swallowed
12
+
13
+ ### Infrastructure
14
+ - DB schema versioning via `PRAGMA user_version` — ordered migrations, no more ad-hoc ALTER TABLE
15
+ - CI enforces ≥90% test coverage; publish workflow runs tests before PyPI upload
16
+ - Removed unused `[science]` optional dependency group
17
+ - CHANGELOG backfill for all versions since v0.7.4
18
+
19
+ ## [0.9.3] - 2026-03-16
20
+
21
+ ### Added
22
+ - `reprompt report --source` and `reprompt search --source` — filter by source adapter
23
+
24
+ ## [0.9.2] - 2026-03-15
25
+
26
+ ### Added
27
+ - **Wrapped reports** — `reprompt wrapped` generates an annual Prompt DNA report (terminal, HTML, shareable)
28
+ - **6 prompt personas** — Architect, Debugger, Explorer, Novelist, Sniper, Teacher (auto-classified)
29
+ - **Telemetry** — opt-in anonymous 26-dimension feature vectors (no prompt text, no PII)
30
+ - **Share** — HMAC-SHA256 signed upload to getreprompt.dev/api/share
31
+ - Open-core plugin system: `entry_points(group="reprompt.plugins")` loaded at startup
32
+
33
+ ### Changed
34
+ - Migrated wrapped, personas, telemetry, share into open-source CLI (from reprompt-pro)
35
+
36
+ ## [0.9.1] - 2026-03-14
37
+
38
+ ### Added
39
+ - **Multi-language PromptDNA** — Chinese feature extraction via jieba (optional `[chinese]` extra)
40
+ - **Native messaging bridge** — Chrome/Firefox extension support (`reprompt install-extension`)
41
+ - **Style fingerprint** — `reprompt style` shows personal prompting patterns
42
+ - **Template variables** — `reprompt use template_name key=value` with `{placeholder}` substitution
43
+ - **Enhanced recommendations** — `reprompt recommend` uses effectiveness data
44
+
45
+ ### Infrastructure
46
+ - Plugin system for open-core architecture (reprompt-pro registers via entry_points)
47
+ - DB aggregation queries for plugin data access
48
+
49
+ ## [0.9.0] - 2026-03-13
50
+
51
+ ### Added
52
+ - **ChatGPT import** — `reprompt import conversations.json` parses OpenAI export format
53
+ - **Claude.ai import** — `reprompt import claude-export.zip` parses Claude web chat exports
54
+ - **`reprompt import` command** — unified import with auto-detection of source format
55
+ - 7 non-coding prompt categories for Chat AI support (brainstorm, summarize, explain, translate, roleplay, creative, casual)
56
+
57
+ ### Changed
58
+ - Tests: 580 → 680+
59
+
60
+ ## [0.8.2] - 2026-03-13
61
+
62
+ ### Added
63
+ - **Digest category deltas** — `reprompt digest` shows per-category % change with arrows
64
+ - **`reprompt digest --history`** — view past digest log entries
65
+
66
+ ## [0.8.1] - 2026-03-12
67
+
68
+ ### Added
69
+ - **HTML dashboard** — `reprompt report --html` generates interactive Chart.js dashboard
70
+ - Digest + cluster data wired into HTML report
71
+
72
+ ## [0.8.0] - 2026-03-12
73
+
74
+ ### Added
75
+ - **Effectiveness columns** — `prompts.effectiveness_score`, `prompt_patterns.effectiveness_avg`
76
+ - **`reprompt library`** shows Eff column with score + star rating
77
+ - **`reprompt digest`** shows avg session quality
78
+ - **OpenClaw `parse_session_meta()`** — session quality scoring for OpenClaw/OpenCode sessions
79
+ - `db.update_prompt_effectiveness()` and `db.compute_pattern_effectiveness()` methods
80
+ - Pipeline: `run_scan()` propagates session scores to prompts; `build_report_data()` recomputes pattern averages
81
+
82
+ ### Infrastructure
83
+ - `_migrate_v08()` adds effectiveness columns via safe ALTER TABLE
84
+
85
+ ### Changed
86
+ - Tests: 480 → 510+
87
+
88
+ ## [0.7.5] - 2026-03-12
89
+
90
+ ### Added
91
+ - Expanded Chinese stop words — 65 function words from stopwords-iso added
92
+
93
+ ## [0.7.4] - 2026-03-12
94
+
95
+ ### Improved
96
+ - **Mixed Chinese/English tokenization** — Hot Phrases now uses a custom analyzer that handles code-switching text natively: Chinese character runs emit bigrams (报错, 修复, 自动化 etc.), ASCII words use standard tokenization. Zero extra dependencies (regex only)
97
+ - **Chinese stop words** (~90 words, HIT + cn_stopwords) — common Chinese particles, pronouns, conjunctions, discourse markers (好的, 是否, 或者, 现在, 项目, 代码 etc.) are now filtered. Eliminates single-char noise like 们/现/个/么 from Hot Phrases
98
+ - **English conversational stop words** (sklearn gap fill) — sklearn's built-in list (Stone 2010, formal text) misses common chat words: `does`, `yeah`, `ok`, `gotcha`, `doesn`, `wouldn`, `really`, `maybe`, `also` etc. These are now filtered
99
+ - **AI tool names as stop words** — `claude`, `cursor`, `aider`, `gemini` are generic for their own users and no longer pollute Hot Phrases
100
+ - **Chinese bigrams only** — single Chinese characters are almost always stop words or partial words (们 only in 我们, 么 only in 什么); removing unigram emission keeps the phrase table semantically meaningful
101
+
102
+ ## [0.7.3] - 2026-03-12
103
+
104
+ ### Improved
105
+ - **Smarter prompt clustering** — K-means now runs on LSA-reduced (TruncatedSVD + L2-normalized) TF-IDF vectors instead of raw sparse vectors; eliminates the single-dominant-cluster problem where 95%+ of prompts collapsed into one bucket
106
+ - **Auto-select optimal K** — cluster count is now determined automatically via silhouette score sweep (K=3..15) rather than a fixed K=5; pass `--clusters N` to `reprompt report` to override
107
+ - **Cleaner Hot Phrases** — shell tool names (`cd`, `uv`, `pytest`, `git`, `bash`, etc.) added to domain stop word list; year-number bigrams (e.g. "2025 2026") filtered from n-gram extraction; n-gram range expanded to (1, 3) to surface meaningful single-word domain signals
108
+ - **TF-IDF quality flags** — added `sublinear_tf=True` and `max_df=0.8` to dampen high-frequency noise and auto-remove corpus-ubiquitous terms
109
+
110
+ ## [0.7.2] - 2026-03-12
111
+
112
+ ### Added
113
+ - **`skill_invocation` prompt category** — skill/workflow invocations (e.g. `superpowers:brainstorming`, `feature-dev:code-architect`) are now classified as their own category instead of polluting `other` or being silently filtered. Shows up in Prompt Categories so you can see what % of your sessions are workflow-driven vs content-driven
114
+ - **`reprompt purge --all`** — wipes the entire database and resets session tracking (useful to remove demo data or start fresh). Follow with `reprompt scan` to reimport
115
+
116
+ ### Fixed
117
+ - Skill invocations previously added to filter list (wrong approach) — they are analytically valuable and now correctly categorized instead of discarded
118
+ - Regex detection covers any `namespace:skill-name` pattern (9+ char namespace) — future-proof, no hardcoded list required
119
+
120
+ ### Changed
121
+ - Tests: 490 → 493
122
+
123
+ ## [0.7.1] - 2026-03-11
124
+
125
+ ### Added
126
+ - **12 prompt categories** (was 8) — new: `document`, `run`, `query`, `generate`, `plan`; reduces the "other" bucket from ~56% to an estimated <15%
127
+ - **Chinese language support** for all categories — bilingual keyword matching (e.g. "整理" → document, "启动" → run, "是否" → query)
128
+ - **Coding domain stop words** for TF-IDF Hot Phrases — ~60 programming-specific terms filtered (generic verbs: write/create/implement; structure nouns: function/class/variable; LeetCode templates: given/input/output). Hot Phrases now surfaces meaningful domain signals instead of generic boilerplate
129
+ - **Subagent session labeling** — Claude Code subagent sessions (stored under `{project}/{uuid}/subagents/`) are now correctly attributed to their parent project with a `[subagent]` tag (e.g. `claudeAutomation [subagent]`), instead of all appearing under a mystery "subagents" project
130
+
131
+ ### Fixed
132
+ - `cluster_prompts()` previously used no stop words; now uses the same coding stop word list as `compute_tfidf_stats()` for consistent clustering quality
133
+ - "write a function…" prompts were falling into `other`; now correctly categorized as `implement`
134
+ - `not working`, `exception`, `fail` now correctly trigger the `debug` category
135
+
136
+ ### Changed
137
+ - Tests: 478 → 489
138
+
139
+ ## [0.7.0] - 2026-03-11
140
+
141
+ ### Added
142
+ - `reprompt digest` — weekly summary comparing current vs previous period: prompt volume, specificity score, avg length, category distribution with direction arrows
143
+ - `reprompt digest --quiet` — one-line summary for use in hooks and cron jobs
144
+ - `reprompt digest --format json` — machine-readable digest output
145
+ - `reprompt digest --period 30d` — configurable comparison window (7d, 14d, 30d)
146
+ - `reprompt install-hook --with-digest` — also registers `reprompt digest --quiet` as a Stop hook so every session ends with a summary
147
+ - `digest_log` DB table — persists digest history for trend tracking
148
+
149
+ ### Changed
150
+ - Tests: 454 → 478
151
+
152
+ ## [0.6.0] - 2026-03-11
153
+
154
+ ### Added
155
+ - **Prompt Science Engine** — research-backed prompt analysis
156
+ - `reprompt score "prompt"` — instant 0-100 quality score with breakdown (specificity, position bias, repetition, perplexity)
157
+ - `reprompt compare "a" "b"` — side-by-side feature comparison of two prompts
158
+ - `reprompt insights` — personal patterns vs research-optimal benchmarks, wired into `reprompt scan`
159
+ - `PromptDNA` dataclass — 30+ features per prompt extracted at scan time
160
+ - Tier 1 feature extractors — regex-based, <1ms per prompt
161
+ - Research-calibrated scorer (Google 2512.14982, Stanford 2307.03172, SPELL EMNLP 2023, Prompt Report 2406.06608)
162
+ - Three-pass prompt segmenter (Prompt Report taxonomy)
163
+ - `prompt_features` DB table for PromptDNA storage
164
+
165
+ ### Changed
166
+ - Tests: 371 → 454
167
+
168
+ ## [0.5.0] - 2026-03-11
169
+
170
+ ### Added
171
+ - `reprompt lint` — prompt quality linter with GitHub Action integration
172
+ - Gemini CLI adapter — parses `~/.gemini/tmp/` session files
173
+ - Cline (VS Code) adapter — parses `globalStorage/saoudrizwan.claude-dev/` task files
174
+ - Comprehensive prompt filters for all AI coding tools (slash commands, system injections, tool outputs)
175
+ - Shared filter module (`adapters/filters.py`) extracted for reuse across all adapters
176
+
177
+ ### Changed
178
+ - Tests: 331 → 371
179
+
180
+ ## [0.4.0] - 2026-03-11
181
+
182
+ ### Added
183
+ - Cursor IDE adapter — parses `.vscdb` files (Composer `cursorDiskKV` + legacy `ItemTable` schemas)
184
+ - Aider adapter — parses `.aider.chat.history.md` chat history files
185
+ - HTML dashboard report — `reprompt report --html` renders interactive Chart.js charts
186
+ - `reprompt merge-view` — clusters near-duplicate prompts and selects canonical versions
187
+ - `reprompt templates` / `reprompt save` — save and reuse prompt templates
188
+ - Auto-report after `reprompt scan` (skip with `--quiet`)
189
+ - `reprompt install-hook` now prompts if not yet configured
190
+
191
+ ### Changed
192
+ - Tests: 256 → 331
193
+
194
+ ## [0.3.2] - 2026-03-11
195
+
196
+ ### Fixed
197
+ - Fix ANSI escape code leak in terminal report (double-render through Rich console)
198
+ - Filter subagent/automation prompts ("You are implementing Task...", "## Task:", etc.)
199
+ - Strip file paths from TF-IDF input to prevent path fragment n-grams
200
+ - Filter noise phrases (username/path tokens) from Hot Phrases results
201
+
202
+ ### Added
203
+ - `reprompt recommend` command — suggests better prompts based on effectiveness, category balance, and specificity
204
+ - `reprompt demo` command — run a full report with built-in sample data, no session history needed
205
+ - Cursor IDE adapter — parses `.vscdb` files from both Composer (cursorDiskKV) and legacy (ItemTable) schemas
206
+ - `reprompt scan` now auto-shows report after scanning (skip with `--quiet`)
207
+ - `reprompt scan` suggests `install-hook` if not yet configured
208
+ - Demo data generator script (`scripts/generate_demo_data.py`) using CodeAlpaca-20K
209
+ - VHS recording script for terminal demo GIF
210
+ - Launch materials (Show HN, Reddit, Twitter, Dev.to, Chinese communities)
211
+
212
+ ## [0.3.1] - 2026-03-11
213
+
214
+ ### Added
215
+ - MCP server (`reprompt mcp-serve`) for Claude Code, Continue.dev, and Zed integration
216
+ - 6 MCP tools: search_prompts, get_prompt_library, get_best_prompts, get_trends, get_status, scan_sessions
217
+ - 2 MCP resources: reprompt://status, reprompt://library
218
+ - `fastmcp` optional dependency (`pip install reprompt-cli[mcp]`)
219
+ - MCP setup guide in README
220
+
221
+ ### Changed
222
+ - Tests: 246 → 256
223
+ - Updated supported tools table (Codex CLI, Aider, Gemini CLI, Continue.dev, Zed)
224
+
225
+ ## [0.3.0] - 2026-03-11
226
+
227
+ ### Added
228
+ - `reprompt trends` — prompt evolution tracking with specificity scoring, delta arrows, insights
229
+ - `reprompt effectiveness` — session quality scoring (clean exit, error ratio, duration heuristics)
230
+ - Session metadata extraction during scan (tool calls, errors, duration, final status)
231
+ - Hot Phrases: TF-IDF now extracts bigram/trigram phrases instead of single words
232
+ - Prompt snapshots table for time-series trend data
233
+ - IDE prefix stripping (`<ide_opened_file>`, `<ide_selection>`) — preserves real user questions
234
+ - Compact/continuation message filtering (blocks session compaction noise)
235
+ - Troubleshooting FAQ in README (Anaconda NumPy conflict)
236
+
237
+ ### Changed
238
+ - "Hot Terms" → "Hot Phrases" in terminal report (n-gram based, stopwords filtered)
239
+ - Tests: 176 → 246
240
+
241
+ ## [0.2.0] - 2026-03-11
242
+
243
+ ### Added
244
+ - `reprompt search <query>` command for keyword search across prompt history
245
+ - Local embedding backend (`pip install reprompt-cli[local]`, sentence-transformers)
246
+ - OpenAI embedding backend (`pip install reprompt-cli[openai]`)
247
+ - TOML config file support (`~/.config/reprompt/config.toml`)
248
+ - K-means clustering output in terminal report
249
+ - TF-IDF hot terms table in terminal report
250
+ - OpenClaw adapter supports new `~/.openclaw/` path (backward compatible)
251
+ - Competitive comparison table in README
252
+
253
+ ### Fixed
254
+ - `install-hook` now registers in Claude Code `settings.json` (was writing unregistered shell script)
255
+ - `ollama_url` config setting now propagates to OllamaEmbedder
256
+ - Pattern IDs are stable across report runs (upsert instead of clear+re-insert)
257
+ - Text truncation in all outputs now shows `...` suffix
258
+ - JSON output uses `print()` instead of Rich `console.print()` to avoid markup corruption
259
+
260
+ ### Changed
261
+ - Tests: 118 → 176
262
+ - OpenClaw adapter checks both `~/.openclaw/` (new) and `~/.opencode/` (legacy)
263
+
264
+ ## [0.1.1] - 2026-03-10
265
+
266
+ ### Fixed
267
+ - Prevent connection leak in all database methods (try/finally)
268
+ - Fix session marking for incremental scan accuracy
269
+ - Fix purge validation for date format parsing
270
+ - Fix pattern dedup to avoid duplicate entries
271
+ - Improve Ollama error messages when server is unreachable
272
+ - Fix JSON output (`--format json`) producing invalid escape sequences
273
+
274
+ ### Added
275
+ - `--version` / `-V` flag to CLI
276
+ - mypy strict mode compliance
277
+
278
+ ## [0.1.0] - 2026-03-10
279
+
280
+ ### Added
281
+
282
+ - Initial release
283
+ - Claude Code session adapter (JSONL format)
284
+ - OpenClaw session adapter
285
+ - Two-layer deduplication (SHA-256 exact + TF-IDF semantic)
286
+ - TF-IDF hot terms analysis
287
+ - K-means prompt clustering
288
+ - Prompt pattern library with auto-categorization
289
+ - Rich terminal reports with tables and bar charts
290
+ - JSON output for CI/pipeline integration
291
+ - Markdown export for prompt library
292
+ - `install-hook` command for Claude Code automation
293
+ - Ollama embedding backend (optional)
294
+ - Zero-config defaults with env var and TOML override
@@ -0,0 +1,130 @@
1
+ # reprompt
2
+
3
+ CLI tool that extracts, deduplicates, and analyzes prompts from AI coding sessions.
4
+
5
+ ## Build & Test
6
+
7
+ ```bash
8
+ uv venv && uv pip install -e ".[dev]"
9
+ uv run pytest tests/ -v # run tests
10
+ uv run pytest tests/ -v --cov=reprompt # with coverage
11
+ uv run ruff check src/ tests/ # lint
12
+ uv run ruff format src/ tests/ # format
13
+ uv run mypy src/reprompt/ # type check (strict)
14
+ uv run python -m build # build wheel
15
+ ```
16
+
17
+ ## Architecture
18
+
19
+ ```
20
+ src/reprompt/
21
+ ├── cli.py # Typer CLI (scan, import, report, search, library, recommend, demo, status, purge, install-hook, install-extension, extension-status, score, compare, insights, digest, style, use) + plugin loading
22
+ ├── config.py # pydantic-settings, env vars (REPROMPT_ prefix) + TOML config
23
+ ├── demo.py # Built-in demo data generator (no network required)
24
+ ├── core/
25
+ │ ├── models.py # Prompt dataclass (auto SHA-256 hash)
26
+ │ ├── dedup.py # Two-layer dedup: exact hash + TF-IDF cosine
27
+ │ ├── analyzer.py # TF-IDF hot terms + K-means clustering
28
+ │ ├── library.py # Pattern extraction + keyword categorization
29
+ │ ├── recommend.py # Prompt recommendations based on history + effectiveness
30
+ │ ├── pipeline.py # Orchestrator: scan → dedup → store → analyze → cluster
31
+ │ ├── prompt_dna.py # PromptDNA dataclass (30+ features per prompt)
32
+ │ ├── extractors.py # Tier 1 feature extraction (regex, <1ms)
33
+ │ ├── scorer.py # Research-calibrated scoring (0-100)
34
+ │ ├── segmenter.py # Three-pass prompt segmentation
35
+ │ ├── insights.py # Personal insights vs research-optimal
36
+ │ ├── digest.py # Two-window comparison for weekly digest
37
+ │ ├── style.py # Personal prompting style fingerprint
38
+ │ ├── lang_detect.py # Language detection (zh/ja/ko/en) via Unicode ranges
39
+ │ ├── extractors_zh.py # Chinese feature extraction (jieba + Chinese regex)
40
+ │ ├── persona.py # 6 prompt personas (Architect/Debugger/Explorer/Novelist/Sniper/Teacher)
41
+ │ └── wrapped.py # WrappedReport dataclass + build_wrapped(db) aggregation
42
+ ├── adapters/
43
+ │ ├── base.py # BaseAdapter ABC
44
+ │ ├── claude_code.py # Claude Code JSONL parser
45
+ │ ├── openclaw.py # OpenClaw JSON parser (supports ~/.openclaw/ + legacy ~/.opencode/)
46
+ │ ├── cursor.py # Cursor IDE .vscdb parser (cursorDiskKV + legacy ItemTable)
47
+ │ ├── aider.py # Aider markdown chat history parser (.aider.chat.history.md)
48
+ │ ├── gemini.py # Gemini CLI JSON session parser (~/.gemini/tmp/)
49
+ │ ├── cline.py # Cline VS Code agent task parser (globalStorage/saoudrizwan.claude-dev/)
50
+ │ ├── chatgpt.py # ChatGPT conversations.json export parser
51
+ │ └── claude_chat.py # Claude.ai web chat export parser (JSON/ZIP)
52
+ ├── embeddings/
53
+ │ ├── base.py # BaseEmbedder ABC
54
+ │ ├── tfidf.py # Default (sklearn, zero config)
55
+ │ ├── ollama.py # Optional: pip install reprompt-cli[ollama]
56
+ │ ├── local_embed.py # Optional: pip install reprompt-cli[local] (sentence-transformers)
57
+ │ └── openai_embed.py # Optional: pip install reprompt-cli[openai]
58
+ ├── bridge/
59
+ │ ├── protocol.py # Native Messaging stdio protocol (4-byte length-prefixed JSON)
60
+ │ ├── handler.py # Message handler (ping, sync_prompts, get_status)
61
+ │ ├── host.py # Entry point launched by Chrome/Firefox as subprocess
62
+ │ └── manifest.py # Manifest generator for Chrome/Firefox/Chromium
63
+ ├── commands/
64
+ │ ├── wrapped.py # `reprompt wrapped` CLI command (--json, --html, --share)
65
+ │ └── telemetry.py # `reprompt telemetry on|off|status` subcommands
66
+ ├── telemetry/
67
+ │ ├── consent.py # TelemetryConsent enum, install_id, TOML persistence
68
+ │ ├── events.py # Pydantic TelemetryEvent model, bucketing helpers
69
+ │ ├── queue.py # SQLite telemetry_queue CRUD with 30-day TTL
70
+ │ ├── sender.py # HTTP batch sender (urllib, 2s timeout, fire-and-forget)
71
+ │ ├── collector.py # Orchestrator: consent → event → queue → sender
72
+ │ └── prompt.py # First-run consent prompt (Rich)
73
+ ├── sharing/
74
+ │ ├── client.py # HMAC-SHA256 signed upload to getreprompt.dev/api/share
75
+ │ └── clipboard.py # Cross-platform clipboard copy (pbcopy/xclip/xsel)
76
+ ├── storage/
77
+ │ └── db.py # SQLite: prompts, processed_sessions, prompt_patterns, term_stats
78
+ └── output/
79
+ ├── terminal.py # Rich tables + bar charts + hot terms + clusters
80
+ ├── json_out.py # JSON for pipelines
81
+ ├── markdown.py # Markdown export
82
+ ├── wrapped_terminal.py # Rich Prompt Wrapped report rendering
83
+ └── wrapped_html.py # Self-contained HTML share card (dark theme)
84
+ ```
85
+
86
+ ## Data Flow
87
+
88
+ ```
89
+ Session files → Adapter.parse() → list[Prompt]
90
+ → DedupEngine: SHA-256 exact → TF-IDF cosine similarity
91
+ → SQLite: insert unique prompts, mark dupes
92
+ → Analyzer: TF-IDF hot terms + K-means clusters
93
+ → Library: extract high-frequency patterns, auto-categorize
94
+ → Output: terminal / JSON / Markdown
95
+ ```
96
+
97
+ ## Open-Core Architecture (Three Repos)
98
+
99
+ ```
100
+ reprompt (public) ← THIS REPO: open-source CLI core, PyPI: reprompt-cli
101
+ reprompt-pro (private) ← Commercial plugin: persona, wrapped, telemetry
102
+ reprompt-extension (private) ← Browser extension: Chrome/Firefox prompt capture
103
+ ```
104
+
105
+ - Plugin system: `cli.py` loads `entry_points(group="reprompt.plugins")` at startup
106
+ - reprompt-pro registers via `[project.entry-points."reprompt.plugins"]` in its pyproject.toml
107
+ - To enable pro features: `cd ~/projects/reprompt && uv pip install -e ../reprompt-pro`
108
+ - Extension connects via Native Messaging bridge (`bridge/` module)
109
+ - **Rule:** Commercial code never enters this repo. Pro features go to reprompt-pro.
110
+
111
+ ## Key Conventions
112
+
113
+ - Package name: `reprompt-cli` (PyPI), CLI command: `reprompt`
114
+ - Python >=3.10, type hints required, mypy strict
115
+ - ruff for lint + format (line-length=100)
116
+ - All db methods use try/finally for conn.close()
117
+ - Pattern upsert (not clear+re-insert) for stable IDs
118
+ - Prompts starting with `<` are filtered (system-injected XML)
119
+ - Config: env vars (REPROMPT_ prefix) > TOML (~/.config/reprompt/config.toml) > defaults
120
+ - Tests: pytest, 923 tests, 95% coverage target
121
+
122
+ ## Prompt Science Engine
123
+
124
+ Research-backed prompt analysis (added v0.6.0):
125
+ - `reprompt score "prompt"` — instant 0-100 scoring with breakdown
126
+ - `reprompt compare "a" "b"` — side-by-side feature comparison
127
+ - `reprompt insights` — personal patterns vs research-optimal
128
+
129
+ Papers: Google 2512.14982 (repetition), Stanford 2307.03172 (position),
130
+ SPELL EMNLP 2023 (perplexity), Prompt Report 2406.06608 (taxonomy).