reprompt-cli 1.5.0__tar.gz → 1.6.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 (259) hide show
  1. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/CHANGELOG.md +15 -0
  2. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/CLAUDE.md +10 -6
  3. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/PKG-INFO +17 -3
  4. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/README.md +16 -2
  5. reprompt_cli-1.6.0/docs/superpowers/specs/2026-03-28-v1.6-agent-intelligence-design.md +479 -0
  6. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/pyproject.toml +1 -1
  7. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/claude_code.py +10 -0
  8. reprompt_cli-1.6.0/src/reprompt/adapters/codex.py +239 -0
  9. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/bridge/manifest.py +2 -0
  10. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/cli.py +234 -70
  11. reprompt_cli-1.6.0/src/reprompt/core/agent.py +319 -0
  12. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/conversation.py +2 -0
  13. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/pipeline.py +3 -0
  14. reprompt_cli-1.6.0/src/reprompt/core/privacy_scan.py +176 -0
  15. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/suggestions.py +4 -2
  16. reprompt_cli-1.6.0/src/reprompt/output/agent_terminal.py +143 -0
  17. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/terminal.py +47 -0
  18. reprompt_cli-1.6.0/tests/test_agent.py +383 -0
  19. reprompt_cli-1.6.0/tests/test_agent_cli.py +178 -0
  20. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_bridge_cli.py +13 -4
  21. reprompt_cli-1.6.0/tests/test_bridge_e2e.py +343 -0
  22. reprompt_cli-1.6.0/tests/test_codex_adapter.py +319 -0
  23. reprompt_cli-1.6.0/tests/test_copy_flag.py +133 -0
  24. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_parse_conversation_claude.py +78 -0
  25. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_pipeline.py +1 -1
  26. reprompt_cli-1.6.0/tests/test_privacy_scan.py +195 -0
  27. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_suggestions.py +9 -2
  28. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.editorconfig +0 -0
  29. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  30. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  31. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  32. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  33. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  34. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.github/dependabot.yml +0 -0
  35. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.github/workflows/ci.yml +0 -0
  36. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.github/workflows/publish.yml +0 -0
  37. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.gitignore +0 -0
  38. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.pre-commit-config.yaml +0 -0
  39. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/.testmondata +0 -0
  40. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/CODE_OF_CONDUCT.md +0 -0
  41. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/CONTRIBUTING.md +0 -0
  42. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/LICENSE +0 -0
  43. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/SECURITY.md +0 -0
  44. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/action.yml +0 -0
  45. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/launch-post.md +0 -0
  46. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/roadmap.md +0 -0
  47. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/superpowers/specs/2026-03-11-html-dashboard-design.md +0 -0
  48. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/superpowers/specs/2026-03-11-merge-view-design.md +0 -0
  49. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/superpowers/specs/2026-03-11-prompt-templates-design.md +0 -0
  50. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/superpowers/specs/2026-03-22-prompt-compress-design.md +0 -0
  51. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/superpowers/specs/2026-03-23-distill-design.md +0 -0
  52. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/superpowers/specs/2026-03-23-v131-suggestions-source-design.md +0 -0
  53. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/superpowers/specs/2026-03-24-v14-context-recovery-design.md +0 -0
  54. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/docs/superpowers/specs/2026-03-24-v141-polish-design.md +0 -0
  55. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/module.yaml +0 -0
  56. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/scripts/generate_demo_data.py +0 -0
  57. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/scripts/launch/hn_monitor.py +0 -0
  58. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/scripts/launch/reddit_helper.py +0 -0
  59. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/__init__.py +0 -0
  60. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/__init__.py +0 -0
  61. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/aider.py +0 -0
  62. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/base.py +0 -0
  63. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/chatgpt.py +0 -0
  64. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/claude_chat.py +0 -0
  65. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/cline.py +0 -0
  66. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/cursor.py +0 -0
  67. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/filters.py +0 -0
  68. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/gemini.py +0 -0
  69. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/adapters/openclaw.py +0 -0
  70. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/bridge/__init__.py +0 -0
  71. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/bridge/handler.py +0 -0
  72. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/bridge/host.py +0 -0
  73. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/bridge/protocol.py +0 -0
  74. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/commands/__init__.py +0 -0
  75. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/commands/telemetry.py +0 -0
  76. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/commands/wrapped.py +0 -0
  77. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/config.py +0 -0
  78. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/__init__.py +0 -0
  79. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/analyzer.py +0 -0
  80. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/compress.py +0 -0
  81. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/dashboard.py +0 -0
  82. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/dedup.py +0 -0
  83. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/digest.py +0 -0
  84. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/distill.py +0 -0
  85. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/effectiveness.py +0 -0
  86. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/extractors.py +0 -0
  87. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/extractors_zh.py +0 -0
  88. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/insights.py +0 -0
  89. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/lang_detect.py +0 -0
  90. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/library.py +0 -0
  91. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/lint.py +0 -0
  92. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/merge_view.py +0 -0
  93. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/models.py +0 -0
  94. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/persona.py +0 -0
  95. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/privacy.py +0 -0
  96. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/prompt_dna.py +0 -0
  97. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/recommend.py +0 -0
  98. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/scorer.py +0 -0
  99. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/segmenter.py +0 -0
  100. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/session_meta.py +0 -0
  101. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/session_type.py +0 -0
  102. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/style.py +0 -0
  103. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/templates.py +0 -0
  104. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/timeutil.py +0 -0
  105. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/trends.py +0 -0
  106. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/core/wrapped.py +0 -0
  107. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/demo.py +0 -0
  108. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/embeddings/__init__.py +0 -0
  109. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/embeddings/base.py +0 -0
  110. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/embeddings/local_embed.py +0 -0
  111. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/embeddings/ollama.py +0 -0
  112. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/embeddings/openai_embed.py +0 -0
  113. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/embeddings/tfidf.py +0 -0
  114. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/mcp.py +0 -0
  115. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/mcp_main.py +0 -0
  116. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/__init__.py +0 -0
  117. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/chartjs.min.js +0 -0
  118. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/compress_terminal.py +0 -0
  119. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/dashboard_terminal.py +0 -0
  120. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/distill_terminal.py +0 -0
  121. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/export.py +0 -0
  122. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/html_report.py +0 -0
  123. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/json_out.py +0 -0
  124. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/markdown.py +0 -0
  125. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/wrapped_html.py +0 -0
  126. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/output/wrapped_terminal.py +0 -0
  127. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/py.typed +0 -0
  128. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/sharing/__init__.py +0 -0
  129. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/sharing/client.py +0 -0
  130. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/sharing/clipboard.py +0 -0
  131. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/storage/__init__.py +0 -0
  132. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/storage/db.py +0 -0
  133. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/telemetry/__init__.py +0 -0
  134. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/telemetry/collector.py +0 -0
  135. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/telemetry/consent.py +0 -0
  136. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/telemetry/events.py +0 -0
  137. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/telemetry/prompt.py +0 -0
  138. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/telemetry/queue.py +0 -0
  139. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/src/reprompt/telemetry/sender.py +0 -0
  140. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/__init__.py +0 -0
  141. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/conftest.py +0 -0
  142. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/aider_chat_history.md +0 -0
  143. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/chatgpt_conversations.json +0 -0
  144. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/claude_chat_export.json +0 -0
  145. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/claude_session.jsonl +0 -0
  146. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/cline_task/api_conversation_history.json +0 -0
  147. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/export/default_export.md +0 -0
  148. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/export/full_export.md +0 -0
  149. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/gemini_session.json +0 -0
  150. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/fixtures/openclaw_session.jsonl +0 -0
  151. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_adapter_aider.py +0 -0
  152. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_adapter_chatgpt.py +0 -0
  153. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_adapter_claude.py +0 -0
  154. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_adapter_claude_chat.py +0 -0
  155. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_adapter_cline.py +0 -0
  156. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_adapter_gemini.py +0 -0
  157. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_adapter_openclaw.py +0 -0
  158. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_analyzer.py +0 -0
  159. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_bridge_handler.py +0 -0
  160. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_bridge_integration.py +0 -0
  161. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_bridge_manifest.py +0 -0
  162. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_bridge_protocol.py +0 -0
  163. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_cli.py +0 -0
  164. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_cli_deprecations.py +0 -0
  165. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_cli_library_effectiveness.py +0 -0
  166. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_clipboard.py +0 -0
  167. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_compare_best_worst.py +0 -0
  168. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_compress.py +0 -0
  169. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_compress_cli.py +0 -0
  170. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_compress_dna.py +0 -0
  171. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_compress_html.py +0 -0
  172. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_compress_insights.py +0 -0
  173. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_config.py +0 -0
  174. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_conversation.py +0 -0
  175. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_coverage_boost.py +0 -0
  176. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_cursor_adapter.py +0 -0
  177. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_dashboard.py +0 -0
  178. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_db.py +0 -0
  179. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_db_digest.py +0 -0
  180. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_db_effectiveness.py +0 -0
  181. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_db_trends.py +0 -0
  182. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_dedup.py +0 -0
  183. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_demo.py +0 -0
  184. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_deprecated_commands.py +0 -0
  185. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_digest.py +0 -0
  186. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_digest_cli.py +0 -0
  187. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_distill.py +0 -0
  188. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_distill_cli.py +0 -0
  189. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_distill_weights.py +0 -0
  190. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_e2e.py +0 -0
  191. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_effectiveness.py +0 -0
  192. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_embeddings_local.py +0 -0
  193. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_embeddings_ollama.py +0 -0
  194. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_embeddings_openai.py +0 -0
  195. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_empty_state.py +0 -0
  196. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_export.py +0 -0
  197. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_export_cli.py +0 -0
  198. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_export_snapshot.py +0 -0
  199. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_extractors.py +0 -0
  200. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_extractors_routing.py +0 -0
  201. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_extractors_zh.py +0 -0
  202. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_extractors_zh_e2e.py +0 -0
  203. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_html_report.py +0 -0
  204. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_import_cli.py +0 -0
  205. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_import_e2e.py +0 -0
  206. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_insights.py +0 -0
  207. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_insights_cli.py +0 -0
  208. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_insights_expanded.py +0 -0
  209. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_install_hook.py +0 -0
  210. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_lang_detect.py +0 -0
  211. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_library.py +0 -0
  212. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_lint.py +0 -0
  213. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_lint_cli.py +0 -0
  214. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_markdown.py +0 -0
  215. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_mcp.py +0 -0
  216. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_merge_view.py +0 -0
  217. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_models.py +0 -0
  218. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_output.py +0 -0
  219. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_parse_conversation_base.py +0 -0
  220. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_parse_conversation_chatgpt.py +0 -0
  221. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_persona.py +0 -0
  222. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_privacy.py +0 -0
  223. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_privacy_cli.py +0 -0
  224. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_privacy_e2e.py +0 -0
  225. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_privacy_output.py +0 -0
  226. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_prompt_dna.py +0 -0
  227. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_public_api.py +0 -0
  228. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_recommend.py +0 -0
  229. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_schema_version.py +0 -0
  230. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_score_cli.py +0 -0
  231. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_scorer.py +0 -0
  232. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_segmenter.py +0 -0
  233. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_session_type.py +0 -0
  234. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_share_e2e.py +0 -0
  235. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_sharing_client.py +0 -0
  236. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_source_filter.py +0 -0
  237. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_style.py +0 -0
  238. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_style_trends.py +0 -0
  239. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_telemetry_cli.py +0 -0
  240. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_telemetry_collector.py +0 -0
  241. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_telemetry_consent.py +0 -0
  242. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_telemetry_e2e.py +0 -0
  243. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_telemetry_events.py +0 -0
  244. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_telemetry_prompt.py +0 -0
  245. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_telemetry_queue.py +0 -0
  246. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_telemetry_sender.py +0 -0
  247. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_template_cli.py +0 -0
  248. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_templates.py +0 -0
  249. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_timeutil.py +0 -0
  250. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_trends.py +0 -0
  251. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_trends_cli.py +0 -0
  252. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_use_cli.py +0 -0
  253. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_wrapped.py +0 -0
  254. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_wrapped_cli.py +0 -0
  255. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_wrapped_e2e.py +0 -0
  256. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_wrapped_html.py +0 -0
  257. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_wrapped_output.py +0 -0
  258. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/tests/test_wrapped_share.py +0 -0
  259. {reprompt_cli-1.5.0 → reprompt_cli-1.6.0}/uv.lock +0 -0
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.6.0] - 2026-03-28
6
+
7
+ ### Added
8
+ - **Agent workflow analysis** — `reprompt agent` detects error loops, tool call patterns, and session efficiency from existing session files. Zero config, zero instrumentation.
9
+ - **Codex CLI adapter** — full support for OpenAI Codex CLI sessions (`~/.codex/sessions/`), including user/assistant turns, tool calls (shell + function), error detection with exit codes, and file path tracking. 9th adapter.
10
+ - **Sensitive content detection** — `reprompt privacy --deep` scans stored prompts for API keys, JWT tokens, emails, IP addresses, passwords, env secrets, and home paths. All regex-based, zero network.
11
+ - **Chrome Web Store extension** — `install-extension` now defaults to the published extension ID; `extension-status` shows the Chrome Web Store install link.
12
+ - **Extension E2E tests** — 8 tests covering the full extension -> Native Messaging -> DB -> CLI pipeline across 3 sources.
13
+
14
+ ### Changed
15
+ - **ConversationTurn model** — added `tool_names` and `error_text` fields for richer agent analysis (backward-compatible defaults)
16
+ - **Claude Code adapter** — now extracts individual tool names (Read, Edit, Bash, etc.) from tool_use blocks, not just counts
17
+ - **Suggestions** — `distill` now suggests `reprompt agent`; `agent` suggests `--loops-only` and `privacy --deep`
18
+ - Tests: 1397 -> 1490+
19
+
5
20
  ## [1.5.0] - 2026-03-25
6
21
 
7
22
  ### Added
@@ -18,7 +18,7 @@ uv run python -m build # build wheel
18
18
 
19
19
  ```
20
20
  src/reprompt/
21
- ├── cli.py # Typer CLI (scan, import, report, search, demo, status, purge, install-hook, install-extension, extension-status, score, compare, insights, digest, style, template [save|list|use], privacy, compress, distill, lint, wrapped, telemetry, mcp-serve) + bare `reprompt` dashboard + plugin loading
21
+ ├── cli.py # Typer CLI (scan, import, report, search, demo, status, purge, install-hook, install-extension, extension-status, score, compare, insights, digest, style, template [save|list|use], privacy, compress, distill, agent, lint, wrapped, telemetry, mcp-serve) + bare `reprompt` dashboard + plugin loading
22
22
  ├── config.py # pydantic-settings, env vars (REPROMPT_ prefix) + TOML config
23
23
  ├── demo.py # Built-in demo data generator (no network required)
24
24
  ├── core/
@@ -40,13 +40,16 @@ src/reprompt/
40
40
  │ ├── persona.py # 6 prompt personas (Architect/Debugger/Explorer/Novelist/Sniper/Teacher)
41
41
  │ ├── wrapped.py # WrappedReport dataclass + build_wrapped(db) aggregation
42
42
  │ ├── privacy.py # Privacy metadata registry + exposure summary per adapter
43
+ │ ├── privacy_scan.py # Sensitive content detection (API keys, tokens, PII) via regex
43
44
  │ ├── compress.py # 4-layer prompt compression (char norm + phrase simplify + filler delete + structure cleanup)
44
- │ ├── suggestions.py # Command journey suggestions ("→ Try:" hints for 5 core commands)
45
+ │ ├── suggestions.py # Command journey suggestions ("→ Try:" hints for 7 core commands)
45
46
  │ ├── conversation.py # ConversationTurn, Conversation, DistillResult dataclasses
46
- └── distill.py # 6-signal importance scoring + filtering + summary generation
47
+ ├── distill.py # 6-signal importance scoring + filtering + summary generation
48
+ │ └── agent.py # Agent workflow analysis: error loop detection, tool distribution, efficiency
47
49
  ├── adapters/
48
50
  │ ├── base.py # BaseAdapter ABC + parse_conversation() default
49
- │ ├── claude_code.py # Claude Code JSONL parser
51
+ │ ├── claude_code.py # Claude Code JSONL parser (full conversation + tool names)
52
+ │ ├── codex.py # Codex CLI JSONL rollout parser (full conversation + shell/function calls)
50
53
  │ ├── openclaw.py # OpenClaw JSON parser (supports ~/.openclaw/ + legacy ~/.opencode/)
51
54
  │ ├── cursor.py # Cursor IDE .vscdb parser (cursorDiskKV + legacy ItemTable)
52
55
  │ ├── aider.py # Aider markdown chat history parser (.aider.chat.history.md)
@@ -87,7 +90,8 @@ src/reprompt/
87
90
  ├── wrapped_terminal.py # Rich Prompt Wrapped report rendering
88
91
  ├── wrapped_html.py # Self-contained HTML share card (dark theme)
89
92
  ├── compress_terminal.py # Rich output for compress command
90
- └── distill_terminal.py # Rich output for distill command
93
+ ├── distill_terminal.py # Rich output for distill command
94
+ └── agent_terminal.py # Rich output for agent workflow report
91
95
  ```
92
96
 
93
97
  ## Data Flow
@@ -124,7 +128,7 @@ reprompt-extension (private) ← Browser extension: Chrome/Firefox prompt capt
124
128
  - Pattern upsert (not clear+re-insert) for stable IDs
125
129
  - Prompts starting with `<` are filtered (system-injected XML)
126
130
  - Config: env vars (REPROMPT_ prefix) > TOML (~/.config/reprompt/config.toml) > defaults
127
- - Tests: pytest, 1397 tests, 95% coverage target
131
+ - Tests: pytest, 1490+ tests, 95% coverage target
128
132
 
129
133
  ## Prompt Science Engine
130
134
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reprompt-cli
3
- Version: 1.5.0
3
+ Version: 1.6.0
4
4
  Summary: Discover, analyze, and optimize your prompts from AI coding sessions
5
5
  Project-URL: Homepage, https://github.com/reprompt-dev/reprompt
6
6
  Project-URL: Repository, https://github.com/reprompt-dev/reprompt
@@ -50,7 +50,7 @@ Description-Content-Type: text/markdown
50
50
  [![PyPI version](https://img.shields.io/pypi/v/reprompt-cli)](https://pypi.org/project/reprompt-cli/)
51
51
  [![Python 3.10+](https://img.shields.io/pypi/pyversions/reprompt-cli)](https://pypi.org/project/reprompt-cli/)
52
52
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
53
- [![Tests](https://img.shields.io/badge/tests-1397-brightgreen)](https://github.com/reprompt-dev/reprompt)
53
+ [![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](https://github.com/reprompt-dev/reprompt/actions)
54
54
  [![Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen)](https://github.com/reprompt-dev/reprompt)
55
55
 
56
56
  ---
@@ -88,11 +88,12 @@ $ reprompt compress "请帮我看一下这个代码,就是那个 login 的那
88
88
  | Command | Description |
89
89
  |---------|-------------|
90
90
  | `reprompt` | Instant dashboard -- prompts, sessions, avg score, top categories |
91
- | `reprompt scan` | Auto-discover prompts from 8 AI tools |
91
+ | `reprompt scan` | Auto-discover prompts from 9 AI tools |
92
92
  | `reprompt score "prompt"` | Research-backed 0-100 scoring with 30+ features |
93
93
  | `reprompt compare "a" "b"` | Side-by-side prompt analysis (or `--best-worst` for auto-selection) |
94
94
  | `reprompt insights` | Personal patterns vs research-optimal benchmarks |
95
95
  | `reprompt style` | Prompting fingerprint with `--trends` for evolution tracking |
96
+ | `reprompt agent` | Agent workflow analysis -- error loops, tool patterns, session efficiency |
96
97
 
97
98
  ### Optimize
98
99
 
@@ -108,6 +109,7 @@ $ reprompt compress "请帮我看一下这个代码,就是那个 login 的那
108
109
  | Command | Description |
109
110
  |---------|-------------|
110
111
  | `reprompt privacy` | See what data you sent where -- file paths, errors, PII exposure |
112
+ | `reprompt privacy --deep` | Scan for sensitive content: API keys, tokens, passwords, PII |
111
113
  | `reprompt report` | Full analytics: hot phrases, clusters, patterns (`--html` for dashboard) |
112
114
  | `reprompt digest` | Weekly summary comparing current vs previous period |
113
115
  | `reprompt wrapped` | Prompt DNA report -- persona, scores, shareable card |
@@ -145,6 +147,7 @@ Session type (debugging, feature-dev, exploration, refactoring) is auto-detected
145
147
  | Tool | Format | Auto-discovered by `scan` |
146
148
  |------|--------|--------------------------|
147
149
  | Claude Code | JSONL | Yes |
150
+ | Codex CLI | JSONL | Yes |
148
151
  | Cursor | .vscdb | Yes |
149
152
  | Aider | Markdown | Yes |
150
153
  | Gemini CLI | JSON | Yes |
@@ -176,6 +179,16 @@ reprompt distill --last 1 # distill your most recent conversation
176
179
  reprompt install-hook # adds post-session hook to Claude Code
177
180
  ```
178
181
 
182
+ ### Browser extension
183
+
184
+ Capture prompts from ChatGPT, Claude.ai, and Gemini directly in your browser:
185
+
186
+ 1. **Install the extension** from [Chrome Web Store](https://chromewebstore.google.com/detail/reprompt/ojdccpagaanchmkninlbgbgemdcjckhn)
187
+ 2. **Connect to the CLI:** `reprompt install-extension`
188
+ 3. **Verify:** `reprompt extension-status`
189
+
190
+ Captured prompts sync locally via Native Messaging -- nothing leaves your machine.
191
+
179
192
  ## Privacy
180
193
 
181
194
  - All analysis runs locally. No prompts leave your machine.
@@ -188,6 +201,7 @@ reprompt install-hook # adds post-session hook to Claude Code
188
201
  ## Links
189
202
 
190
203
  - **Website:** [getreprompt.dev](https://getreprompt.dev)
204
+ - **Chrome Extension:** [Chrome Web Store](https://chromewebstore.google.com/detail/reprompt/ojdccpagaanchmkninlbgbgemdcjckhn)
191
205
  - **PyPI:** [reprompt-cli](https://pypi.org/project/reprompt-cli/)
192
206
  - **Changelog:** [CHANGELOG.md](CHANGELOG.md)
193
207
  - **Privacy:** [getreprompt.dev/privacy](https://getreprompt.dev/privacy)
@@ -5,7 +5,7 @@
5
5
  [![PyPI version](https://img.shields.io/pypi/v/reprompt-cli)](https://pypi.org/project/reprompt-cli/)
6
6
  [![Python 3.10+](https://img.shields.io/pypi/pyversions/reprompt-cli)](https://pypi.org/project/reprompt-cli/)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![Tests](https://img.shields.io/badge/tests-1397-brightgreen)](https://github.com/reprompt-dev/reprompt)
8
+ [![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](https://github.com/reprompt-dev/reprompt/actions)
9
9
  [![Coverage](https://img.shields.io/badge/coverage-95%25-brightgreen)](https://github.com/reprompt-dev/reprompt)
10
10
 
11
11
  ---
@@ -43,11 +43,12 @@ $ reprompt compress "请帮我看一下这个代码,就是那个 login 的那
43
43
  | Command | Description |
44
44
  |---------|-------------|
45
45
  | `reprompt` | Instant dashboard -- prompts, sessions, avg score, top categories |
46
- | `reprompt scan` | Auto-discover prompts from 8 AI tools |
46
+ | `reprompt scan` | Auto-discover prompts from 9 AI tools |
47
47
  | `reprompt score "prompt"` | Research-backed 0-100 scoring with 30+ features |
48
48
  | `reprompt compare "a" "b"` | Side-by-side prompt analysis (or `--best-worst` for auto-selection) |
49
49
  | `reprompt insights` | Personal patterns vs research-optimal benchmarks |
50
50
  | `reprompt style` | Prompting fingerprint with `--trends` for evolution tracking |
51
+ | `reprompt agent` | Agent workflow analysis -- error loops, tool patterns, session efficiency |
51
52
 
52
53
  ### Optimize
53
54
 
@@ -63,6 +64,7 @@ $ reprompt compress "请帮我看一下这个代码,就是那个 login 的那
63
64
  | Command | Description |
64
65
  |---------|-------------|
65
66
  | `reprompt privacy` | See what data you sent where -- file paths, errors, PII exposure |
67
+ | `reprompt privacy --deep` | Scan for sensitive content: API keys, tokens, passwords, PII |
66
68
  | `reprompt report` | Full analytics: hot phrases, clusters, patterns (`--html` for dashboard) |
67
69
  | `reprompt digest` | Weekly summary comparing current vs previous period |
68
70
  | `reprompt wrapped` | Prompt DNA report -- persona, scores, shareable card |
@@ -100,6 +102,7 @@ Session type (debugging, feature-dev, exploration, refactoring) is auto-detected
100
102
  | Tool | Format | Auto-discovered by `scan` |
101
103
  |------|--------|--------------------------|
102
104
  | Claude Code | JSONL | Yes |
105
+ | Codex CLI | JSONL | Yes |
103
106
  | Cursor | .vscdb | Yes |
104
107
  | Aider | Markdown | Yes |
105
108
  | Gemini CLI | JSON | Yes |
@@ -131,6 +134,16 @@ reprompt distill --last 1 # distill your most recent conversation
131
134
  reprompt install-hook # adds post-session hook to Claude Code
132
135
  ```
133
136
 
137
+ ### Browser extension
138
+
139
+ Capture prompts from ChatGPT, Claude.ai, and Gemini directly in your browser:
140
+
141
+ 1. **Install the extension** from [Chrome Web Store](https://chromewebstore.google.com/detail/reprompt/ojdccpagaanchmkninlbgbgemdcjckhn)
142
+ 2. **Connect to the CLI:** `reprompt install-extension`
143
+ 3. **Verify:** `reprompt extension-status`
144
+
145
+ Captured prompts sync locally via Native Messaging -- nothing leaves your machine.
146
+
134
147
  ## Privacy
135
148
 
136
149
  - All analysis runs locally. No prompts leave your machine.
@@ -143,6 +156,7 @@ reprompt install-hook # adds post-session hook to Claude Code
143
156
  ## Links
144
157
 
145
158
  - **Website:** [getreprompt.dev](https://getreprompt.dev)
159
+ - **Chrome Extension:** [Chrome Web Store](https://chromewebstore.google.com/detail/reprompt/ojdccpagaanchmkninlbgbgemdcjckhn)
146
160
  - **PyPI:** [reprompt-cli](https://pypi.org/project/reprompt-cli/)
147
161
  - **Changelog:** [CHANGELOG.md](CHANGELOG.md)
148
162
  - **Privacy:** [getreprompt.dev/privacy](https://getreprompt.dev/privacy)
@@ -0,0 +1,479 @@
1
+ # v1.6 Agent Intelligence — Design Spec
2
+
3
+ ## Goal
4
+
5
+ Add retrospective agent workflow analysis to reprompt. Detect error loops, tool call patterns, and session efficiency from existing session files — zero config, zero instrumentation, zero network.
6
+
7
+ **What we are NOT building:** An observability platform. We don't instrument code, don't intercept API calls, don't require setup before a session runs. We analyze what already exists on disk.
8
+
9
+ ## Problem Statement
10
+
11
+ AI coding agents (Claude Code, Codex, Gemini CLI) generate rich session logs locally. Users have no way to answer:
12
+
13
+ - "How much of that 45-minute session was wasted on error loops?"
14
+ - "Which tools am I triggering most — am I using the agent efficiently?"
15
+ - "Was that session actually productive, or did it just feel busy?"
16
+
17
+ **Every existing tool (Langfuse, LangSmith, AgentOps) requires SDK instrumentation before the session runs.** No tool does post-hoc analysis of existing local session files. This is our unique angle.
18
+
19
+ **User stories:**
20
+ - "Show me an agent health report for my last 5 coding sessions."
21
+ - "Did my Claude Code session get stuck in error loops? Where?"
22
+ - "Compare my debugging sessions to my feature-dev sessions — which are more efficient?"
23
+
24
+ ## Principle Revision
25
+
26
+ Current: "Input not output — analyze human inputs, not LLM outputs"
27
+
28
+ **Revised:** "Human-centric analysis — analyze the human-AI interaction, not LLM output quality"
29
+
30
+ Rationale: Agent workflow analysis evaluates *interaction quality* (error loops, tool patterns, session flow), not *output quality* (hallucination, correctness). This is distinct from what Promptfoo/Braintrust do (eval LLM outputs). We stay on the "analyze the developer's experience" side.
31
+
32
+ ## Scope
33
+
34
+ ### In scope (v1.6)
35
+
36
+ | Item | Rationale |
37
+ |------|-----------|
38
+ | `reprompt agent` command | Core deliverable — agent session health report |
39
+ | Claude Code adapter: extract tool names | Unblock agent analysis for existing users |
40
+ | Codex CLI adapter (new) | Richest data format, fastest-growing agent CLI |
41
+ | Error loop detection (rule-based) | High user value, unique angle |
42
+ | Tool call distribution analysis | Basic but useful |
43
+ | Session efficiency scoring | Builds on existing effectiveness module |
44
+ | `reprompt privacy --deep` | Small scope, high narrative value |
45
+
46
+ ### Out of scope (v1.7+)
47
+
48
+ | Item | Why deferred |
49
+ |------|-------------|
50
+ | Context window utilization % | Claude Code token data unreliable (75% zeros); Codex has it but we ship Claude Code first |
51
+ | Cross-adapter agent comparison | Only 2 adapters have full data; wait for more |
52
+ | `.reprompt.yml` configurable lint | Independent feature, separate release |
53
+ | Cross-prompt repetition metric | Depends on agent analysis infra, do after |
54
+ | Gemini CLI / Cline agent analysis | Need real session files to verify data availability |
55
+
56
+ ## Architecture
57
+
58
+ ```
59
+ Session file (JSONL/JSON)
60
+ → Adapter.parse_conversation() # returns list[ConversationTurn]
61
+ → now includes tool_names per turn
62
+ → AgentAnalyzer.analyze(turns) # NEW: core/agent.py
63
+ → error_loops: list[ErrorLoop]
64
+ → tool_distribution: dict[str, int]
65
+ → efficiency: AgentEfficiency
66
+ → AgentReport (dataclass)
67
+ → Output: terminal / JSON
68
+ ```
69
+
70
+ ### New modules
71
+
72
+ ```
73
+ src/reprompt/
74
+ core/
75
+ agent.py # AgentAnalyzer: error loop detection, tool distribution, efficiency
76
+ adapters/
77
+ codex.py # NEW: Codex CLI adapter with full conversation parsing
78
+ output/
79
+ agent_terminal.py # Rich terminal rendering for agent report
80
+ ```
81
+
82
+ ### Modified modules
83
+
84
+ ```
85
+ core/
86
+ conversation.py # ConversationTurn: add tool_names, error_text fields
87
+ adapters/
88
+ claude_code.py # Extract tool names from tool_use blocks
89
+ cli.py # Add `reprompt agent` command
90
+ ```
91
+
92
+ ## Data Model Changes
93
+
94
+ ### ConversationTurn (extend, backward-compatible)
95
+
96
+ ```python
97
+ @dataclass
98
+ class ConversationTurn:
99
+ role: str
100
+ text: str
101
+ timestamp: str
102
+ turn_index: int
103
+
104
+ # Existing (unchanged)
105
+ tool_calls: int = 0
106
+ has_error: bool = False
107
+ tool_use_paths: list[str] = field(default_factory=list)
108
+
109
+ # NEW for v1.6
110
+ tool_names: list[str] = field(default_factory=list) # ["Read", "Edit", "Bash"]
111
+ error_text: str = "" # Actual error message for fingerprinting
112
+
113
+ # Existing enrichment (unchanged)
114
+ score: float | None = None
115
+ is_duplicate: bool = False
116
+ importance: float = 0.0
117
+ signal_scores: dict[str, float] = field(default_factory=dict)
118
+ ```
119
+
120
+ All new fields default to empty — zero risk of breaking existing code.
121
+
122
+ ### AgentReport (new dataclass)
123
+
124
+ ```python
125
+ @dataclass
126
+ class ErrorLoop:
127
+ """A detected error loop in the conversation."""
128
+ start_turn: int # Turn index where loop starts
129
+ end_turn: int # Turn index where loop ends (or session end)
130
+ loop_count: int # Number of repetitions
131
+ fingerprint: str # What repeated (e.g. "Bash(pytest):error")
132
+ tool_name: str # Primary tool involved
133
+ description: str # Human-readable: "Bash(pytest tests/) failed 4 times"
134
+
135
+ @dataclass
136
+ class AgentEfficiency:
137
+ """Session-level efficiency metrics."""
138
+ total_turns: int
139
+ user_turns: int
140
+ tool_calls: int
141
+ errors: int
142
+ error_loops: int
143
+ turns_in_loops: int # Turns wasted in error loops
144
+ productive_ratio: float # (total - turns_in_loops) / total
145
+ tools_per_user_turn: float # tool_calls / user_turns
146
+ error_recovery_rate: float # loops_resolved / total_loops
147
+ duration_seconds: int
148
+ session_type: str | None # From existing session_type.py
149
+
150
+ @dataclass
151
+ class AgentReport:
152
+ """Full agent analysis for one session."""
153
+ session_id: str
154
+ source: str
155
+ project: str | None
156
+ efficiency: AgentEfficiency
157
+ tool_distribution: dict[str, int] # {"Read": 45, "Edit": 23, ...}
158
+ error_loops: list[ErrorLoop]
159
+ top_files: list[str] # Most-touched files (from tool_use_paths)
160
+ ```
161
+
162
+ ## Error Loop Detection Algorithm
163
+
164
+ ### Fingerprinting (rule-based, zero LLM)
165
+
166
+ ```
167
+ For each assistant turn with tool calls:
168
+ fingerprint = hash(tool_name, target_file_or_command, has_error)
169
+
170
+ Scan fingerprint sequence for consecutive repeats:
171
+ [A, B, A, B, A, B] → loop of (A,B) x3
172
+ [A, A, A, A] → loop of (A) x4
173
+
174
+ Minimum loop length: 3 repetitions of the same fingerprint OR 2 repetitions of a 2-step pattern.
175
+ ```
176
+
177
+ ### Fingerprint construction
178
+
179
+ | Adapter | Fingerprint components |
180
+ |---------|----------------------|
181
+ | Claude Code | `tool_name` + first `tool_use_path` (or first 50 chars of input) + `has_error` |
182
+ | Codex CLI | `tool_type` + `command[0]` (or `function_name`) + `exit_code != 0` |
183
+
184
+ ### Example
185
+
186
+ ```
187
+ Turn 10: Bash(pytest tests/test_auth.py) → exit 1
188
+ Turn 11: Edit(src/auth.py)
189
+ Turn 12: Bash(pytest tests/test_auth.py) → exit 1
190
+ Turn 13: Edit(src/auth.py)
191
+ Turn 14: Bash(pytest tests/test_auth.py) → exit 1
192
+
193
+ → ErrorLoop(start=10, end=14, count=3, fingerprint="Bash:pytest:fail→Edit:auth.py",
194
+ description="Bash(pytest tests/test_auth.py) → Edit(src/auth.py) loop x3")
195
+ ```
196
+
197
+ ## Codex CLI Adapter
198
+
199
+ ### Session discovery
200
+
201
+ ```python
202
+ class CodexAdapter(BaseAdapter):
203
+ name = "codex"
204
+ default_session_path = "~/.codex"
205
+
206
+ def discover_sessions(self) -> list[Path]:
207
+ """Find rollout-*.jsonl under ~/.codex/sessions/."""
208
+ sessions_dir = self._home / "sessions"
209
+ return sorted(sessions_dir.rglob("rollout-*.jsonl"))
210
+ ```
211
+
212
+ ### JSONL line types to parse
213
+
214
+ | Line type | payload.type | What we extract |
215
+ |-----------|-------------|-----------------|
216
+ | `event_msg` | `user_message` | User turn: `message` text |
217
+ | `event_msg` | `agent_message` | Assistant turn: `message` text |
218
+ | `response_item` | `local_shell_call` | Tool call: command, status |
219
+ | `response_item` | `function_call` | Tool call: name, arguments |
220
+ | `event_msg` | `exec_command_end` | Tool result: exit_code, output, duration |
221
+ | `event_msg` | `error` | Error: message text |
222
+ | `event_msg` | `token_count` | Token usage (accurate, unlike Claude Code) |
223
+ | `session_meta` | — | Session ID, cwd, git info, model |
224
+
225
+ ### parse_conversation() strategy
226
+
227
+ Codex interleaves events differently from Claude Code. Key difference:
228
+
229
+ - Claude Code: one JSONL line = one complete turn (user or assistant with all tool_use blocks)
230
+ - Codex: one JSONL line = one event. An assistant "turn" is: `agent_message` + N x `response_item` + N x `exec_command_end`, terminated by next `user_message` or EOF.
231
+
232
+ Strategy: accumulate events into turns. When we see a `user_message`, flush the accumulated assistant turn and start a new user turn.
233
+
234
+ ### Token data (Codex-only bonus, deferred display)
235
+
236
+ Codex provides accurate `total_token_usage` with `model_context_window`. We parse and store it in the adapter but only display it in v1.7 when we add context utilization analysis. This avoids showing token data for Codex but not Claude Code, which would confuse users.
237
+
238
+ ## CLI Command
239
+
240
+ ```
241
+ reprompt agent [OPTIONS]
242
+
243
+ Options:
244
+ --last N Analyze N most recent sessions (default: 5)
245
+ --source TEXT Filter by adapter (claude-code, codex)
246
+ --json JSON output
247
+ --copy Copy to clipboard
248
+ --loops-only Show only error loops (skip distribution/efficiency)
249
+ ```
250
+
251
+ ### Terminal output (Rich)
252
+
253
+ ```
254
+ ╭─ Agent Report ─────────────────────────────────────────────╮
255
+ │ Sessions: 5 │ Source: claude-code │ Period: 3 days │
256
+ ╰────────────────────────────────────────────────────────────╯
257
+
258
+ Efficiency
259
+ ──────────
260
+ Avg turns: 28 │ Avg duration: 18min │ Productive: 82%
261
+ Tool calls: 847 │ Errors: 23 │ Error loops: 3
262
+
263
+ Tool Distribution
264
+ ─────────────────
265
+ Read ████████████████████ 312 (37%)
266
+ Edit ████████████ 198 (23%)
267
+ Bash ██████████ 156 (18%)
268
+ Grep ██████ 94 (11%)
269
+ Write █████ 87 (10%)
270
+
271
+ Error Loops
272
+ ───────────
273
+ 1. session-abc (14:32, debugging)
274
+ Bash(pytest tests/test_auth.py) → Edit(src/auth.py) loop x4
275
+ 12 turns wasted, resolved after changing approach
276
+
277
+ 2. session-def (09:15, implementation)
278
+ Grep(nonexistent_func) → Read loop x3
279
+ 6 turns wasted, unresolved (session ended)
280
+
281
+ Session Breakdown
282
+ ─────────────────
283
+ ★★★★★ session-789 8 turns 0 errors 12min feature-dev
284
+ ★★★★☆ session-ghi 22 turns 2 errors 20min implementation
285
+ ★★★☆☆ session-jkl 35 turns 5 errors 30min debugging
286
+ ★★☆☆☆ session-abc 42 turns 8 errors 45min debugging
287
+ ★☆☆☆☆ session-def 18 turns 12 errors 15min debugging
288
+ ```
289
+
290
+ ### JSON output structure
291
+
292
+ ```json
293
+ {
294
+ "sessions_analyzed": 5,
295
+ "period": {"start": "2026-03-25", "end": "2026-03-28"},
296
+ "aggregate": {
297
+ "total_turns": 125,
298
+ "total_tool_calls": 847,
299
+ "total_errors": 23,
300
+ "error_loops": 3,
301
+ "productive_ratio": 0.82,
302
+ "avg_turns_per_session": 25,
303
+ "avg_duration_seconds": 1080
304
+ },
305
+ "tool_distribution": {"Read": 312, "Edit": 198, "Bash": 156, "Grep": 94, "Write": 87},
306
+ "error_loops": [
307
+ {
308
+ "session_id": "abc",
309
+ "start_turn": 10,
310
+ "end_turn": 22,
311
+ "loop_count": 4,
312
+ "fingerprint": "Bash:pytest:fail→Edit:auth.py",
313
+ "tool_name": "Bash",
314
+ "description": "Bash(pytest tests/test_auth.py) → Edit(src/auth.py) loop x4"
315
+ }
316
+ ],
317
+ "sessions": [
318
+ {
319
+ "session_id": "789",
320
+ "source": "claude-code",
321
+ "efficiency": { "...": "..." },
322
+ "tool_distribution": {},
323
+ "error_loops": []
324
+ }
325
+ ]
326
+ }
327
+ ```
328
+
329
+ ## Privacy --deep (Sensitive Content Detection)
330
+
331
+ Extend existing `reprompt privacy` with `--deep` flag:
332
+
333
+ ```bash
334
+ reprompt privacy --deep # scan stored prompts for sensitive content
335
+ reprompt privacy --deep --json # structured output
336
+ ```
337
+
338
+ ### Detection patterns (regex, zero LLM)
339
+
340
+ | Category | Pattern | Example |
341
+ |----------|---------|---------|
342
+ | API keys | `(sk-[a-zA-Z0-9]{20,})`, `(AKIA[0-9A-Z]{16})`, `(ghp_[a-zA-Z0-9]{36})` | `sk-proj-abc...`, `AKIAIOSFODNN7EXAMPLE`, `ghp_xxxx` |
343
+ | Tokens | `(eyJ[a-zA-Z0-9_-]{20,}\.[a-zA-Z0-9_-]+)` | JWT tokens |
344
+ | Emails | Standard email regex | `user@company.com` |
345
+ | IP addresses | IPv4 pattern (exclude 127.0.0.1, 0.0.0.0) | `192.168.1.100` |
346
+ | Passwords | `password\s*[=:]\s*["']?\S+` | `password = "secret123"` |
347
+ | Env secrets | `(DATABASE_URL\|SECRET_KEY\|API_KEY\|TOKEN)\s*=\s*\S+` | `DATABASE_URL=postgres://...` |
348
+ | Home paths | `/Users/\w+/`, `/home/\w+/` | Leaks username |
349
+
350
+ ### Output
351
+
352
+ ```
353
+ Sensitive Content Scan (847 prompts analyzed)
354
+ ─────────────────────────────────────────────
355
+ API keys: 2 found (chatgpt, claude-code)
356
+ JWT tokens: 1 found (claude-code)
357
+ Home paths: 34 found (claude-code, cursor)
358
+ Emails: 0
359
+ IP addresses: 3 found (claude-code)
360
+
361
+ Highest risk: session abc123 — contains AWS access key (AKIA...)
362
+ Run `reprompt privacy --deep --json` for full details.
363
+ ```
364
+
365
+ ## Implementation Phases
366
+
367
+ ### Phase 1: Data Model + Claude Code Adapter (Day 1)
368
+
369
+ **Files:** `core/conversation.py`, `adapters/claude_code.py`
370
+
371
+ 1. Add `tool_names: list[str]` and `error_text: str` to ConversationTurn
372
+ 2. In ClaudeCodeAdapter.parse_conversation(), extract `block.get("name")` into `tool_names`
373
+ 3. Extract error text (not just boolean) into `error_text`
374
+
375
+ **Tests:** Existing 1397 tests must pass (backward compat) + 5 new tests for tool name extraction
376
+
377
+ **Gate:** `uv run pytest tests/ -v` all green before proceeding
378
+
379
+ ### Phase 2: Agent Analysis Engine (Day 1-2)
380
+
381
+ **Files:** `core/agent.py` (new)
382
+
383
+ 1. `detect_error_loops(turns) -> list[ErrorLoop]` — fingerprint algorithm
384
+ 2. `compute_tool_distribution(turns) -> dict[str, int]`
385
+ 3. `compute_efficiency(turns, duration, session_type) -> AgentEfficiency`
386
+ 4. `analyze_session(conversation) -> AgentReport`
387
+ 5. `analyze_sessions(conversations) -> AggregateAgentReport` — multi-session rollup
388
+
389
+ **Tests:** 20+ unit tests covering:
390
+ - Loop detection: no loops, single loop, nested loops, 2-step patterns
391
+ - Edge cases: empty session, user-only session, single-turn session
392
+ - Tool distribution: multiple tools, single tool, no tools
393
+ - Efficiency: zero errors, all errors, mixed
394
+
395
+ **Gate:** All Phase 2 tests pass before proceeding
396
+
397
+ ### Phase 3: CLI Command + Terminal Output (Day 2)
398
+
399
+ **Files:** `cli.py`, `output/agent_terminal.py` (new)
400
+
401
+ 1. `reprompt agent` command with --last, --source, --json, --copy, --loops-only
402
+ 2. Rich terminal rendering: efficiency summary, bar chart, error loop list, session breakdown
403
+ 3. Suggestion: "-> Try: reprompt agent --loops-only" after distill
404
+
405
+ **Tests:** 8+ CLI tests (exit codes, json output, empty state, source filter)
406
+
407
+ **Gate:** CLI tests + manual smoke test
408
+
409
+ ### Phase 4: Codex CLI Adapter (Day 2-3)
410
+
411
+ **Files:** `adapters/codex.py` (new)
412
+
413
+ 1. `CodexAdapter(BaseAdapter)` with discover_sessions, parse_session, parse_conversation
414
+ 2. Session discovery: `~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl`
415
+ 3. Full conversation parsing: user messages, agent messages, tool calls, errors
416
+ 4. parse_session_meta() with accurate token data (stored but not displayed yet)
417
+ 5. Register in scan discovery + CLI adapter list
418
+
419
+ **Tests:** 15+ tests with fixture JSONL files covering:
420
+ - Session discovery
421
+ - User/assistant turn parsing
422
+ - Tool call extraction (shell + function_call)
423
+ - Error event handling
424
+ - Token data parsing
425
+ - Edge cases: empty session, malformed lines
426
+
427
+ **Gate:** All adapter tests pass + `reprompt scan` discovers Codex sessions
428
+
429
+ ### Phase 5: Privacy --deep (Day 3)
430
+
431
+ **Files:** `core/privacy_scan.py` (new), `cli.py` (extend privacy command)
432
+
433
+ 1. Regex-based sensitive content scanner
434
+ 2. `--deep` flag on existing privacy command
435
+ 3. Per-prompt scanning with category + source attribution
436
+
437
+ **Tests:** 12+ tests covering each pattern category + false positive avoidance
438
+
439
+ **Gate:** Tests pass + manual check against real DB
440
+
441
+ ### Phase 6: Integration + Polish (Day 3-4)
442
+
443
+ 1. CHANGELOG entry for v1.6.0
444
+ 2. README update: Agent Intelligence section
445
+ 3. `reprompt` dashboard: show agent health summary if agent data available
446
+ 4. Suggestion wiring: distill -> agent, agent -> privacy --deep
447
+ 5. Full test suite run (target: 1500+ tests)
448
+
449
+ **Gate:** `uv run pytest tests/ -v` all green, `ruff check`, `ruff format --check`, CI green
450
+
451
+ ## Test Plan
452
+
453
+ | Phase | New tests | Cumulative |
454
+ |-------|-----------|------------|
455
+ | Phase 1 | 5 (conversation model + adapter) | 1402 |
456
+ | Phase 2 | 20 (agent analysis engine) | 1422 |
457
+ | Phase 3 | 8 (CLI + output) | 1430 |
458
+ | Phase 4 | 15 (Codex adapter) | 1445 |
459
+ | Phase 5 | 12 (privacy scan) | 1457 |
460
+ | Phase 6 | 8 (integration + E2E) | 1465 |
461
+ | **Total** | **68 new tests** | **~1465** |
462
+
463
+ ## Risk Mitigations
464
+
465
+ | Risk | Mitigation |
466
+ |------|-----------|
467
+ | Error loop false positives | Conservative threshold (3+ repeats). Show fingerprint so user can judge. |
468
+ | Codex format changes | Pin to documented event types. Graceful skip for unknown types. |
469
+ | Only 2 adapters have full data | Command output clearly states "Full analysis: claude-code, codex. Basic: others." |
470
+ | Scope creep toward observability | Hard boundary: we read files, we don't instrument code. No SDK, no server. |
471
+ | Breaking existing distill/score | All ConversationTurn changes are additive (new fields with defaults). |
472
+
473
+ ## Success Criteria
474
+
475
+ 1. `reprompt agent` works on real Claude Code sessions with zero config
476
+ 2. Error loops detected in >=1 real session (validate with author's own sessions)
477
+ 3. Codex adapter discovers and parses real Codex sessions
478
+ 4. All tests pass, CI green, no regressions in existing commands
479
+ 5. `reprompt privacy --deep` finds at least home paths in real data