cctx-cli 0.1.0__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 (159) hide show
  1. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/.github/workflows/publish.yml +15 -0
  2. cctx_cli-1.0.0/.github/workflows/release.yml +37 -0
  3. cctx_cli-1.0.0/CHANGELOG.md +73 -0
  4. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/CLAUDE.md +21 -17
  5. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/PKG-INFO +59 -2
  6. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/PRODUCT.md +29 -40
  7. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/README.md +58 -1
  8. cctx_cli-1.0.0/action.yml +39 -0
  9. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/__init__.py +1 -1
  10. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/cli.py +200 -17
  11. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/diagnostician/__init__.py +9 -1
  12. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/diagnostician/aggregate.py +5 -6
  13. cctx_cli-1.0.0/cctx/diagnostician/patterns/dead_end.py +144 -0
  14. cctx_cli-1.0.0/cctx/diagnostician/patterns/tool_thrash.py +120 -0
  15. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/harvest.py +128 -3
  16. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/models.py +13 -2
  17. cctx_cli-1.0.0/cctx/renderers/github.py +86 -0
  18. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/renderers/templates/autopsy.html.j2 +3 -2
  19. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/renderers/terminal.py +42 -10
  20. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/renderers/trace_tui.py +10 -5
  21. cctx_cli-1.0.0/cctx/watcher.py +153 -0
  22. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/pyproject.toml +12 -1
  23. cctx_cli-1.0.0/tests/diagnostician/test_dead_end.py +155 -0
  24. cctx_cli-1.0.0/tests/diagnostician/test_tool_thrash.py +114 -0
  25. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/renderers/test_terminal_renderer_full.py +1 -2
  26. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_aggregate.py +14 -7
  27. cctx_cli-1.0.0/tests/test_cli.py +311 -0
  28. cctx_cli-1.0.0/tests/test_github_summary.py +175 -0
  29. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_harvest.py +45 -2
  30. cctx_cli-1.0.0/tests/test_harvest_check.py +139 -0
  31. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_models.py +1 -3
  32. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_terminal_renderer.py +6 -1
  33. cctx_cli-1.0.0/tests/test_watcher.py +188 -0
  34. cctx_cli-0.1.0/tests/test_cli.py +0 -102
  35. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/.github/workflows/ci.yml +0 -0
  36. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/.gitignore +0 -0
  37. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/DESIGN.md +0 -0
  38. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/diagnostician/inflection.py +0 -0
  39. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/diagnostician/patterns/__init__.py +0 -0
  40. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/diagnostician/patterns/retry_loop.py +0 -0
  41. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/diagnostician/patterns/scope_creep.py +0 -0
  42. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/diagnostician/patterns/stale_context.py +0 -0
  43. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/discovery.py +0 -0
  44. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/exporters/__init__.py +0 -0
  45. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/exporters/csv.py +0 -0
  46. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/exporters/jsonl.py +0 -0
  47. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/parsers/__init__.py +0 -0
  48. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/parsers/claude_code.py +0 -0
  49. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/pricing.py +0 -0
  50. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/recommender/__init__.py +0 -0
  51. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/recommender/claude_md.py +0 -0
  52. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/recommender/evidence.py +0 -0
  53. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/renderers/__init__.py +0 -0
  54. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/renderers/report.py +0 -0
  55. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx/tokenizer.py +0 -0
  56. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/cctx-project-brief.md +0 -0
  57. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/demo.gif +0 -0
  58. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/demo.tape +0 -0
  59. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/health-reviews/2026-05-15-deep-review-summary.md +0 -0
  60. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/health-reviews/2026-05-15-health-review.md +0 -0
  61. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/product-reviews/2026-05-15-product-review.md +0 -0
  62. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/superpowers/plans/2026-05-12-claude-code-parser.md +0 -0
  63. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/superpowers/plans/2026-05-14-autopsy-v0.md +0 -0
  64. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/superpowers/plans/2026-05-16-readme-pypi-release.md +0 -0
  65. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/superpowers/specs/2026-05-12-claude-code-parser-design.md +0 -0
  66. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/superpowers/specs/2026-05-14-autopsy-design.md +0 -0
  67. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/superpowers/specs/2026-05-14-harvest-design.md +0 -0
  68. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/superpowers/specs/2026-05-14-trace-tui-design.md +0 -0
  69. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/docs/superpowers/specs/2026-05-16-readme-pypi-release-design.md +0 -0
  70. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/__init__.py +0 -0
  71. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/conftest.py +0 -0
  72. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/diagnostician/__init__.py +0 -0
  73. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/diagnostician/conftest.py +0 -0
  74. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/diagnostician/test_inflection.py +0 -0
  75. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/diagnostician/test_orchestrator.py +0 -0
  76. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/diagnostician/test_retry_loop.py +0 -0
  77. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/diagnostician/test_scope_creep.py +0 -0
  78. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/diagnostician/test_stale_context.py +0 -0
  79. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/exporters/__init__.py +0 -0
  80. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/exporters/test_csv.py +0 -0
  81. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/exporters/test_jsonl.py +0 -0
  82. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/README.md +0 -0
  83. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/short-clean/short-clean.jsonl +0 -0
  84. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a0b4c2cf1dde0ca56.meta.json +0 -0
  85. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a116ae34b1b09c332.meta.json +0 -0
  86. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a1c4c417b35658c9e.meta.json +0 -0
  87. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a1e41a901de38f1b5.meta.json +0 -0
  88. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a338f8d0c74612a24.meta.json +0 -0
  89. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a34f6f3c0e7094186.meta.json +0 -0
  90. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a5a5a0cff4d13308b.meta.json +0 -0
  91. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a6b0a3da6a0484db5.meta.json +0 -0
  92. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a7f73f1790b02cde5.meta.json +0 -0
  93. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a7f7c17c38a9d8788.meta.json +0 -0
  94. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a853259e2cd7bbe8a.meta.json +0 -0
  95. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-a8d9aedb0d0c6e12d.meta.json +0 -0
  96. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-aa778bc1d59e4a441.meta.json +0 -0
  97. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-aba869dedee4a12ba.meta.json +0 -0
  98. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-ada2746d9774b94db.meta.json +0 -0
  99. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-aea0132068c64d2dd.meta.json +0 -0
  100. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-aea215eff50874d5f.meta.json +0 -0
  101. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments/subagents/agent-afee21f2b3852a4a0.meta.json +0 -0
  102. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-attachments/with-attachments.jsonl +0 -0
  103. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a051d9c9a6b2f5cc3.jsonl +0 -0
  104. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a051d9c9a6b2f5cc3.meta.json +0 -0
  105. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a171f16f4e65cfe75.jsonl +0 -0
  106. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a171f16f4e65cfe75.meta.json +0 -0
  107. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a1b77fea2c0a2269b.jsonl +0 -0
  108. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a1b77fea2c0a2269b.meta.json +0 -0
  109. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a20da4c01a54acca8.jsonl +0 -0
  110. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a20da4c01a54acca8.meta.json +0 -0
  111. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a3c82739b1383fb14.jsonl +0 -0
  112. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a3c82739b1383fb14.meta.json +0 -0
  113. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a49e8539611c5fe12.jsonl +0 -0
  114. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a49e8539611c5fe12.meta.json +0 -0
  115. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a7bb58f3fff2b3e8d.jsonl +0 -0
  116. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a7bb58f3fff2b3e8d.meta.json +0 -0
  117. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a92b48c0331195aac.jsonl +0 -0
  118. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-a92b48c0331195aac.meta.json +0 -0
  119. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-ab96c4264099694a9.jsonl +0 -0
  120. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-ab96c4264099694a9.meta.json +0 -0
  121. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-acb2895c5e34ffec0.jsonl +0 -0
  122. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-acb2895c5e34ffec0.meta.json +0 -0
  123. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-adb2302769938fb3f.jsonl +0 -0
  124. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-adb2302769938fb3f.meta.json +0 -0
  125. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-ae585eca15cb93b9c.jsonl +0 -0
  126. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-ae585eca15cb93b9c.meta.json +0 -0
  127. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-aec9c917feb903d67.jsonl +0 -0
  128. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction/subagents/agent-aec9c917feb903d67.meta.json +0 -0
  129. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-compaction/with-compaction.jsonl +0 -0
  130. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents/subagents/agent-a1a3a21aeb76bb0a9.jsonl +0 -0
  131. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents/subagents/agent-a1a3a21aeb76bb0a9.meta.json +0 -0
  132. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents/subagents/agent-aaa1d6ecc05a78442.jsonl +0 -0
  133. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents/subagents/agent-aaa1d6ecc05a78442.meta.json +0 -0
  134. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents/subagents/agent-af3c545ccd30036d2.jsonl +0 -0
  135. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents/subagents/agent-af3c545ccd30036d2.meta.json +0 -0
  136. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents/tool-results/btwp2bzro.txt +0 -0
  137. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents/tool-results/byqjbgy4b.txt +0 -0
  138. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-subagents/with-subagents.jsonl +0 -0
  139. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-tool-results/with-tool-results/tool-results/bosbkda0h.txt +0 -0
  140. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/claude_code/with-tool-results/with-tool-results.jsonl +0 -0
  141. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/scrub.py +0 -0
  142. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/synthetic/bookkeeping_only.jsonl +0 -0
  143. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/synthetic/malformed_middle.jsonl +0 -0
  144. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/synthetic/truncated_final_line.jsonl +0 -0
  145. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/synthetic/unknown_attachment_shape.jsonl +0 -0
  146. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/fixtures/synthetic/unknown_type.jsonl +0 -0
  147. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/parsers/__init__.py +0 -0
  148. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/parsers/test_claude_code.py +0 -0
  149. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/parsers/test_claude_code_integration.py +0 -0
  150. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/recommender/__init__.py +0 -0
  151. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/recommender/test_claude_md.py +0 -0
  152. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/recommender/test_evidence.py +0 -0
  153. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/renderers/__init__.py +0 -0
  154. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/renderers/test_report.py +0 -0
  155. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_cli_export.py +0 -0
  156. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_discovery.py +0 -0
  157. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_smoke.py +0 -0
  158. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_tokenizer.py +0 -0
  159. {cctx_cli-0.1.0 → cctx_cli-1.0.0}/tests/test_trace_tui.py +0 -0
@@ -46,3 +46,18 @@ jobs:
46
46
 
47
47
  - name: Publish
48
48
  uses: pypa/gh-action-pypi-publish@release/v1
49
+
50
+ tag-action:
51
+ name: Tag floating action version
52
+ needs: [publish]
53
+ runs-on: ubuntu-latest
54
+ permissions:
55
+ contents: write
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+
59
+ - name: Push floating major tag
60
+ run: |
61
+ MAJOR=$(echo "${{ github.event.release.tag_name }}" | cut -d. -f1)
62
+ git tag -f "$MAJOR"
63
+ git push origin "$MAJOR" --force
@@ -0,0 +1,37 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ release:
10
+ name: Semantic release
11
+ runs-on: ubuntu-latest
12
+ concurrency: release
13
+ permissions:
14
+ contents: write
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
20
+ token: ${{ secrets.RELEASE_TOKEN }}
21
+
22
+ - uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.12"
25
+
26
+ - name: Install python-semantic-release
27
+ run: pip install python-semantic-release
28
+
29
+ - name: Compute version and push
30
+ run: semantic-release version
31
+ env:
32
+ GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
33
+
34
+ - name: Publish GitHub release
35
+ run: semantic-release publish
36
+ env:
37
+ GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
@@ -0,0 +1,73 @@
1
+ # CHANGELOG
2
+
3
+ <!-- version list -->
4
+
5
+ ## v1.0.0 (2026-05-17)
6
+
7
+ ### Continuous Integration
8
+
9
+ - Add python-semantic-release for fully automated CD
10
+ ([`9844921`](https://github.com/jacquardlabs/cctx/commit/98449213e5b3bd597c47d54e4d5043e245adafe4))
11
+
12
+ - Add workflow_dispatch to release.yml for manual trigger
13
+ ([`08ac9f8`](https://github.com/jacquardlabs/cctx/commit/08ac9f80eb6ceee7b57155852febc4274cbaf3b0))
14
+
15
+
16
+ ## v0.2.0 (2026-05-16)
17
+
18
+ ### Bug Fixes
19
+
20
+ - Ruff lint — B904, E402, E501, F841 across cli, tests, and renderers
21
+ ([`fa7105f`](https://github.com/jacquardlabs/cctx/commit/fa7105fef340d89136f1996b86824e30d080a730))
22
+
23
+ - Trace TUI token sum within line-length limit
24
+ ([`5b7416c`](https://github.com/jacquardlabs/cctx/commit/5b7416c5b92790cfe66f1e53f20891ecaf6e03b0))
25
+
26
+ ### Chores
27
+
28
+ - Bump version to 0.2.0, update PRODUCT.md and CLAUDE.md
29
+ ([`828ed49`](https://github.com/jacquardlabs/cctx/commit/828ed4997df9f4a264669bc38f4b10588a151f1c))
30
+
31
+ ### Documentation
32
+
33
+ - Add CI usage section clarifying harvest is local-only
34
+ ([`c526408`](https://github.com/jacquardlabs/cctx/commit/c526408a35749858e1c0b0b6ba42aea95bb8f621))
35
+
36
+ ### Features
37
+
38
+ - **#64,#63**: Tool-thrash and dead-end exploration classifiers
39
+ ([`14f8f45`](https://github.com/jacquardlabs/cctx/commit/14f8f45f9d3f4ef2fefac374d3e4cea36185c60d))
40
+
41
+ - **#65**: Harvest v2 — route patches to any .md target (.claude/rules/, .claude/skills/)
42
+ ([`06ef9b7`](https://github.com/jacquardlabs/cctx/commit/06ef9b7a8ae9abacea54c2c826efc3fb6e6e80be))
43
+
44
+ - **#66**: Cctx harvest --check audits CLAUDE.md for dead refs and empty sections
45
+ ([`a3be1d0`](https://github.com/jacquardlabs/cctx/commit/a3be1d0923d387b6830b10c7c2c5acf34a3b8917))
46
+
47
+ - **#67**: Interactive aggregate drill-down; --check docs in README
48
+ ([`3db5429`](https://github.com/jacquardlabs/cctx/commit/3db5429dede40777b23d83e32a4b15a8c0e82a16))
49
+
50
+ - **#68**: --since accepts 7d, 2w, YYYY-MM-DD, and date ranges
51
+ ([`434d7c4`](https://github.com/jacquardlabs/cctx/commit/434d7c448406e0a5465380ed395e1fadaa1c0db1))
52
+
53
+ - **#69**: Annotate costs as estimates (~85–95%) in terminal and HTML output
54
+ ([`5a49889`](https://github.com/jacquardlabs/cctx/commit/5a49889bd43555d30a58c2b78eddf6acbb0d8e97))
55
+
56
+ - **#70**: Cctx watch — live waste signals during an active session
57
+ ([`f533a13`](https://github.com/jacquardlabs/cctx/commit/f533a13e1f087da00457ce7b8215934f20c403a2))
58
+
59
+ - **#72**: Cctx autopsy --github-summary writes findings to GitHub Actions job summary
60
+ ([`df91256`](https://github.com/jacquardlabs/cctx/commit/df91256b58b75a9bbe9594a000b00dee2ac2fbc5))
61
+
62
+ - **#73**: Cctx GitHub Action (composite) + --fail-on-findings flag
63
+ ([`9229584`](https://github.com/jacquardlabs/cctx/commit/9229584ea192ce1b1ee6718721d981cba0ca13e0))
64
+
65
+ ### Refactoring
66
+
67
+ - Consolidate KIND_LABEL, fix private import, clean up watcher tests
68
+ ([`31ad4d7`](https://github.com/jacquardlabs/cctx/commit/31ad4d75885eed9c8238c4eb1c08bd5d1ba51a15))
69
+
70
+
71
+ ## v0.1.0 (2026-05-16)
72
+
73
+ - Initial Release
@@ -27,8 +27,8 @@ Parser ← dependency-free; takes a path, returns SessionTrace
27
27
  Tokenizer ← only place that imports anthropic; offline-mode safe for CI
28
28
 
29
29
  Diagnostician ← per-turn investigation: inflection detection + pattern
30
- classifiers (retry loop, scope creep, stale context).
31
- Produces a Diagnosis.
30
+ classifiers (retry loop, scope creep, stale context,
31
+ tool thrash, dead end). Produces a Diagnosis.
32
32
 
33
33
  Recommender ← turns Findings into Patches: copy-pasteable CLAUDE.md /
34
34
  rule / skill diffs, evidence-backed when cross-session.
@@ -43,30 +43,34 @@ Exporters ← jsonl, csv.
43
43
 
44
44
  ```
45
45
  cctx/
46
- ├── cli.py # click + rich-click; routes to autopsy / trace / export
46
+ ├── cli.py # click + rich-click; routes all subcommands
47
47
  ├── parsers/
48
48
  │ └── claude_code.py # SHIPPED. Parse ~/.claude JSONL logs.
49
- │ # Spec: docs/superpowers/specs/2026-05-12-claude-code-parser-design.md
50
49
  ├── tokenizer.py # SHIPPED. anthropic.count_tokens wrapper; CCTX_OFFLINE heuristic.
51
50
  ├── models.py # SHIPPED. Turn, ToolUse, ToolResult, Usage, Attachment,
52
- │ # RawToolResultFile, SessionTrace + group_into_exchanges().
53
- │ # M2 extends with Finding, Patch, Diagnosis.
51
+ │ # RawToolResultFile, SessionTrace, Finding, Patch, Diagnosis,
52
+ │ # KIND_LABEL, AggregateReport.
54
53
  ├── diagnostician/
55
54
  │ ├── __init__.py # public: run(trace) -> Diagnosis
56
55
  │ ├── inflection.py # detect the turn where the session diverged
57
56
  │ ├── patterns/
58
57
  │ │ ├── retry_loop.py
59
58
  │ │ ├── scope_creep.py
60
- │ │ └── stale_context.py
59
+ │ │ ├── stale_context.py
60
+ │ │ ├── tool_thrash.py
61
+ │ │ └── dead_end.py
61
62
  │ └── aggregate.py # cross-session pattern aggregator (--since mode)
62
63
  ├── recommender/
63
64
  │ ├── claude_md.py # Finding -> Patch (CLAUDE.md diff proposals)
64
65
  │ └── evidence.py # session-count + dollar evidence accumulation
65
- ├── harvest.py # SHIPPED. apply_patch, preview_patches, apply_patches —
66
- │ # append-only, idempotent CLAUDE.md patching with
67
- │ # fingerprint-based deduplication.
66
+ ├── harvest.py # SHIPPED. apply_patch, preview_patches, apply_patches, check_claude_md
67
+ │ # append-only, idempotent patching with fingerprint-based deduplication.
68
+ │ # v2: patches route to any .md target (rules/, skills/).
69
+ ├── discovery.py # SHIPPED. list_projects(), latest_session() — navigate ~/.claude/projects/
70
+ ├── watcher.py # SHIPPED. cctx watch — poll active session, surface findings live.
68
71
  ├── renderers/
69
- │ ├── terminal.py # rich rendering of a Diagnosis
72
+ │ ├── terminal.py # rich rendering of Diagnosis, AggregateReport, projects, sessions
73
+ │ ├── github.py # GitHub Actions job summary renderer (--github-summary)
70
74
  │ ├── report.py # Jinja2 HTML report (cctx autopsy --html)
71
75
  │ └── trace_tui.py # textual TUI with autopsy findings overlaid
72
76
  └── exporters/
@@ -102,16 +106,16 @@ These came out of the brief, the parser brainstorming session, and the autopsy p
102
106
 
103
107
  1. **M0 — Project setup.** SHIPPED. (#1)
104
108
  2. **M1 — Foundation.** SHIPPED — parser, tokenizer, models, fixtures, CI. (#2–#6, plus PR #38)
105
- 3. **M2 — Autopsy v0.** SHIPPED — single-session diagnosis + cross-session pattern detection. The wedge product. (#9, #10, #40–#49)
109
+ 3. **M2 — Autopsy v0.** SHIPPED — single-session diagnosis + cross-session pattern detection. (#9, #10, #40–#49)
106
110
  4. **M3 — Trace TUI** with autopsy overlay. SHIPPED. (PR #57)
107
111
  5. **M4 — Export.** SHIPPED — jsonl + csv exporters (html moved to autopsy --html; json deferred). (PR #54)
108
- 6. **M5 — Harvest v1.** SHIPPED — CLAUDE.md target only in v0; promote autopsy findings to durable CLAUDE.md diffs. (PR #56)
109
- 7. **M6 — Release v0.1.0.** Release prep underway — README, PRODUCT.md, DESIGN.md, version bump, PyPI publish. (#31, #32)
112
+ 6. **M5 — Harvest v1.** SHIPPED — CLAUDE.md target only; promote autopsy findings to durable CLAUDE.md diffs. (PR #56)
113
+ 7. **M6 — Release v0.1.0.** SHIPPED — README, version bump, PyPI publish, GitHub Action (composite), session discovery (`cctx ls`). (#31, #32, #62, #73)
114
+ 8. **M7 — v0.2.0.** SHIPPED — `cctx watch` live mode, `--github-summary`, `--fail-on-findings`, harvest v2 multi-target, `harvest --check`, tool-thrash + dead-end classifiers, `--since` string formats, interactive aggregate drill-down.
110
115
 
111
116
  Future, not yet milestoned:
112
- - **Memory hygiene** (`cctx harvest --check`) audit existing CLAUDE.md and memory files for staleness / contradictions / dead skills.
113
- - **Live mode** (`cctx watch`) — filesystem watcher on `~/.claude/projects` to surface waste signals during a session.
114
- - **Cross-agent layer** — emit the same captured knowledge as `.cursorrules`, `AGENTS.md`, `.windsurfrules`, GitHub Copilot instructions.
117
+ - **Cross-agent layer** emit findings as `.cursorrules`, `AGENTS.md`, `.windsurfrules`, GitHub Copilot instructions.
118
+ - **`--format json` on `export`** deferred; no milestone.
115
119
 
116
120
  ## Design docs
117
121
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cctx-cli
3
- Version: 0.1.0
3
+ Version: 1.0.0
4
4
  Summary: Diagnose Claude Code sessions — find what went wrong, what it cost, and what to add to CLAUDE.md
5
5
  Author: Jacquard Labs
6
6
  License-Expression: MIT
@@ -48,9 +48,10 @@ pip install cctx-cli
48
48
  ```bash
49
49
  cctx ls # find your sessions
50
50
  cctx autopsy --latest # diagnose the most recent one
51
+ cctx watch # live signals during an active session
51
52
  ```
52
53
 
53
- cctx is a forensic tool. You reach for it after a session — when something felt off, when the cost was higher than expected, or on a weekly review pass. It reads the JSONL logs Claude Code writes to `~/.claude/projects/` and produces findings with attributed cost and copy-pasteable `CLAUDE.md` patches.
54
+ cctx is primarily a forensic tool. You reach for it after a session — when something felt off, when the cost was higher than expected, or on a weekly review pass. `cctx watch` runs during a session and surfaces patterns as they happen. It reads the JSONL logs Claude Code writes to `~/.claude/projects/` and produces findings with attributed cost and copy-pasteable `CLAUDE.md` patches.
54
55
 
55
56
  ## Commands
56
57
 
@@ -97,6 +98,13 @@ cctx harvest ~/Projects/myapp --since 7
97
98
 
98
99
  Turns autopsy findings into copy-pasteable `CLAUDE.md` additions. Patches are idempotent — running harvest twice on the same session won't duplicate entries. Use `--target-dir DIR` to specify which directory's `CLAUDE.md` to patch (default: current working directory).
99
100
 
101
+ ```bash
102
+ # Audit existing CLAUDE.md for dead file references and empty sections
103
+ cctx harvest . --check
104
+ ```
105
+
106
+ `--check` reads the target `CLAUDE.md` without writing anything. Exits 1 if issues are found (dead file references, dead skill references, empty sections), 0 if clean. Useful as a CI step when `CLAUDE.md` is committed to the repo.
107
+
100
108
  ### `cctx export` — export session data
101
109
 
102
110
  ```bash
@@ -112,6 +120,15 @@ cctx export ~/.claude/projects/-Users-you-Projects-myapp/abc123.jsonl --format j
112
120
 
113
121
  Dumps session analysis as JSONL (one object per session) or CSV (one row per turn) for use in external tools.
114
122
 
123
+ ### `cctx watch` — live waste signals
124
+
125
+ ```bash
126
+ cctx watch # watch the active session in cwd's project
127
+ cctx watch ~/Projects/myapp # watch a specific project
128
+ ```
129
+
130
+ Tails the active session as it progresses and prints a single-line alert each time a new waste pattern is detected. Exits after 30s of session inactivity or Ctrl+C.
131
+
115
132
  ### `cctx trace` — interactive TUI
116
133
 
117
134
  ```bash
@@ -154,6 +171,46 @@ Claude Code writes logs to `~/.claude/projects/<encoded-path>/<session-id>.jsonl
154
171
 
155
172
  `cctx ls` handles discovery automatically — you don't need to navigate the encoded directory structure by hand.
156
173
 
174
+ ## Using cctx in CI
175
+
176
+ cctx is primarily a local forensic tool — it reads session logs from `~/.claude/projects/` on your machine. Those logs are personal conversation history and should not be committed to git or uploaded as build artifacts.
177
+
178
+ **The one case where cctx belongs in CI:** when Claude Code itself runs inside a GitHub Actions job (agentic PR workflows, automated coding steps). In that case the JSONL logs are written on the runner during the job and cctx can analyse them as a post-step.
179
+
180
+ ### GitHub Action (recommended)
181
+
182
+ ```yaml
183
+ - uses: anthropics/claude-code-action@v1
184
+ with:
185
+ # ... your agentic workflow config
186
+
187
+ - uses: jacquardlabs/cctx@v0
188
+ with:
189
+ fail_on_findings: false # set true to gate the job on waste findings
190
+ github_summary: true # write findings to the job summary UI
191
+ ```
192
+
193
+ The action auto-discovers the most recent Claude Code session written on the runner. It does not accept arbitrary file paths — that pattern would require committing session logs to the repo, which you should not do.
194
+
195
+ ### Manual step
196
+
197
+ ```yaml
198
+ - uses: anthropics/claude-code-action@v1
199
+ with:
200
+ # ... your agentic workflow config
201
+
202
+ - name: Analyse session
203
+ run: pipx run cctx-cli autopsy --latest . --github-summary
204
+ ```
205
+
206
+ `--github-summary` appends a markdown findings report to the GitHub Actions job summary UI. Add `--fail-on-findings` to exit 1 when waste patterns are detected.
207
+
208
+ Commands that make sense as CI steps:
209
+ - `cctx autopsy` — diagnose the session that just ran
210
+ - `cctx export` — archive structured findings as a build artifact
211
+
212
+ `cctx harvest` requires session logs AND writes to `CLAUDE.md` — neither step maps cleanly to CI. Run it locally after a session.
213
+
157
214
  ## License
158
215
 
159
216
  MIT
@@ -45,65 +45,54 @@ Pattern classifiers are heuristics, not LLM calls. The same session file produce
45
45
  **6. Small surface, deep on each command.**
46
46
  Four commands. No command is shallow. Users should be able to learn the product in an afternoon and trust what it tells them.
47
47
 
48
- ## Feature map (v0.1.0)
48
+ ## Feature map (v0.2.0)
49
49
 
50
50
  ### Shipped
51
51
 
52
- | Feature | Command | Status |
52
+ | Feature | Command | Notes |
53
53
  |---|---|---|
54
- | Single-session diagnosis | `cctx autopsy <session>` | Shipped (M2) |
55
- | Cross-session pattern detection | `cctx autopsy <project> --since N` | Shipped (M2) |
56
- | HTML report | `cctx autopsy <session> --html FILE` | Shipped (M2/PR#59) |
57
- | Session trace TUI | `cctx trace <session>` | Shipped (M3) |
58
- | JSONL export | `cctx export <session> --format jsonl` | Shipped (M4) |
59
- | CSV export | `cctx export <session> --format csv` | Shipped (M4) |
60
- | Harvest (CLAUDE.md patcher) | `cctx harvest <session>` | Shipped (M5) |
61
- | Cross-session harvest | `cctx harvest <project> --since N` | Shipped (M5) |
62
-
63
- ### Pattern classifiers (v0.1.0)
54
+ | Single-session diagnosis | `cctx autopsy <session>` | M2 |
55
+ | Cross-session pattern detection | `cctx autopsy <project> --since N` | M2 |
56
+ | `--since` string formats | `--since 7d`, `2w`, `2026-05-01`, date ranges | M6+ |
57
+ | Interactive aggregate drill-down | select pattern → per-session detail | M6+ |
58
+ | HTML report | `cctx autopsy <session> --html FILE` | M2 |
59
+ | GitHub Actions job summary | `cctx autopsy --github-summary` | M6+ |
60
+ | CI fail gate | `cctx autopsy --fail-on-findings` | M6+ |
61
+ | GitHub Action (composite) | `jacquardlabs/cctx@v1` in workflow | M6+ |
62
+ | Session trace TUI | `cctx trace <session>` | M3 |
63
+ | JSONL export | `cctx export <session> --format jsonl` | M4 |
64
+ | CSV export | `cctx export <session> --format csv` | M4 |
65
+ | Harvest (CLAUDE.md patcher) | `cctx harvest <session>` | M5 |
66
+ | Harvest v2 (multi-target) | patches to `.claude/rules/`, `.claude/skills/` | M6+ |
67
+ | Harvest --check | `cctx harvest <dir> --check` — audit for dead refs | M6+ |
68
+ | Cross-session harvest | `cctx harvest <project> --since N` | M5 |
69
+ | Session discovery | `cctx ls` / `cctx autopsy --latest` | M6+ |
70
+ | Live waste signals | `cctx watch <project>` | M6+ |
71
+
72
+ ### Pattern classifiers (v0.2.0)
64
73
 
65
74
  | Pattern | Status |
66
75
  |---|---|
67
76
  | Retry loop | Shipped |
68
77
  | Scope creep | Shipped |
69
78
  | Stale context | Shipped |
70
- | Dead-end exploration | Not shipped in v0 |
71
- | Tool thrashing | Not shipped in v0 |
72
-
73
- ### NOT in v0.1.0
74
-
75
- - `--format json` and `--format html` on `export` (html moved to `autopsy --html`; json not scheduled)
76
- - `--since` string formats (`7d`, `2w`, date ranges, `--until`, `--top N`) — accepts integer days only
77
- - Patch targets other than `CLAUDE.md` (rules, skills, ADR — v1+)
78
- - Interactive aggregate drill-down ("press N to inspect pattern") — read-only in v0
79
- - `cctx ls` / session discovery helper
80
- - Dead-end and tool-thrash classifiers
79
+ | Dead-end exploration | Shipped (v0.2.0) |
80
+ | Tool thrashing | Shipped (v0.2.0) |
81
81
 
82
82
  ## What we are NOT building
83
83
 
84
84
  - A SaaS or cloud product
85
85
  - An agent (cctx reads logs; it does not call the Anthropic API except optionally for token counting)
86
- - A real-time watcher (v2+ roadmap item)
87
- - Multi-provider support (v3+ roadmap item)
86
+ - Multi-provider support (Claude Code only in v0/v1)
88
87
  - A fork-and-replay debugger
89
88
  - A general eval or testing framework
90
89
 
91
- ## Known problems (as of 2026-05-15)
92
-
93
- **Release blockers for v0.1.0 (M6):**
94
-
95
- 1. **No README.md.** `pyproject.toml` uses `cctx-project-brief.md` as the readme. The brief contains architecture diagrams and an internal "First session prompt" that should not be on PyPI. A user-facing README.md is required before publish.
96
-
97
- 2. **`pyproject.toml` description is inaccurate.** Current: "Profile, debug, and optimize Claude Code and Agent SDK sessions." Accurate: "Diagnose Claude Code sessions — find what went wrong, what it cost, and what to add to CLAUDE.md."
98
-
99
- 3. **Version is `0.0.1`.** M6 requires bumping to `0.1.0`.
100
-
101
- 4. **Brief example outputs show unshipped features.** The `cctx-project-brief.md` (which currently IS the readme) shows 5 pattern classifiers, 4 export formats, string `--since` arguments, a `Verdict` headline, and interactive aggregate output. None of these are accurate for the shipped CLI. Before PyPI publish, either ship them or update the brief.
90
+ ## Known problems (as of 2026-05-16)
102
91
 
103
- **Active gaps (non-blocking for v0.1.0 but worth tracking):**
92
+ **Active gaps (non-blocking for v0.2.0 but worth tracking):**
104
93
 
105
- 5. **Cost approximation honesty not surfaced in output.** The terminal renderer shows `$X.XX` total cost with no confidence annotation. The brief says "The system internals slice is honest; don't pretend to be exact" — this is a principle not yet expressed to users in output.
94
+ 1. **`cctx watch` polling is simple.** Polls every 1s and re-runs classifiers on any file growth. Does not debounce or use `fsevents`/`inotify`. Fine for v0 but will chatter on active sessions.
106
95
 
107
- 6. **No session discovery helper.** Users must manually navigate URL-encoded project directories in `~/.claude/projects/` to find session files. First-run friction.
96
+ 2. **`--format json` on `export` not shipped.** `--html` moved to `autopsy --html`; `json` format on the `export` subcommand is still deferred.
108
97
 
109
- 7. **Aggregate output is read-only.** The brief's example shows an interactive aggregate view. Shipped aggregate is a static table. The interactive drill-down is a meaningful UX gap that the brief implicitly promises.
98
+ 3. **Cross-agent layer not started.** Emitting findings as `.cursorrules`, `AGENTS.md`, `.windsurfrules`, or GitHub Copilot instructions is a roadmap item with no milestone yet.
@@ -28,9 +28,10 @@ pip install cctx-cli
28
28
  ```bash
29
29
  cctx ls # find your sessions
30
30
  cctx autopsy --latest # diagnose the most recent one
31
+ cctx watch # live signals during an active session
31
32
  ```
32
33
 
33
- cctx is a forensic tool. You reach for it after a session — when something felt off, when the cost was higher than expected, or on a weekly review pass. It reads the JSONL logs Claude Code writes to `~/.claude/projects/` and produces findings with attributed cost and copy-pasteable `CLAUDE.md` patches.
34
+ cctx is primarily a forensic tool. You reach for it after a session — when something felt off, when the cost was higher than expected, or on a weekly review pass. `cctx watch` runs during a session and surfaces patterns as they happen. It reads the JSONL logs Claude Code writes to `~/.claude/projects/` and produces findings with attributed cost and copy-pasteable `CLAUDE.md` patches.
34
35
 
35
36
  ## Commands
36
37
 
@@ -77,6 +78,13 @@ cctx harvest ~/Projects/myapp --since 7
77
78
 
78
79
  Turns autopsy findings into copy-pasteable `CLAUDE.md` additions. Patches are idempotent — running harvest twice on the same session won't duplicate entries. Use `--target-dir DIR` to specify which directory's `CLAUDE.md` to patch (default: current working directory).
79
80
 
81
+ ```bash
82
+ # Audit existing CLAUDE.md for dead file references and empty sections
83
+ cctx harvest . --check
84
+ ```
85
+
86
+ `--check` reads the target `CLAUDE.md` without writing anything. Exits 1 if issues are found (dead file references, dead skill references, empty sections), 0 if clean. Useful as a CI step when `CLAUDE.md` is committed to the repo.
87
+
80
88
  ### `cctx export` — export session data
81
89
 
82
90
  ```bash
@@ -92,6 +100,15 @@ cctx export ~/.claude/projects/-Users-you-Projects-myapp/abc123.jsonl --format j
92
100
 
93
101
  Dumps session analysis as JSONL (one object per session) or CSV (one row per turn) for use in external tools.
94
102
 
103
+ ### `cctx watch` — live waste signals
104
+
105
+ ```bash
106
+ cctx watch # watch the active session in cwd's project
107
+ cctx watch ~/Projects/myapp # watch a specific project
108
+ ```
109
+
110
+ Tails the active session as it progresses and prints a single-line alert each time a new waste pattern is detected. Exits after 30s of session inactivity or Ctrl+C.
111
+
95
112
  ### `cctx trace` — interactive TUI
96
113
 
97
114
  ```bash
@@ -134,6 +151,46 @@ Claude Code writes logs to `~/.claude/projects/<encoded-path>/<session-id>.jsonl
134
151
 
135
152
  `cctx ls` handles discovery automatically — you don't need to navigate the encoded directory structure by hand.
136
153
 
154
+ ## Using cctx in CI
155
+
156
+ cctx is primarily a local forensic tool — it reads session logs from `~/.claude/projects/` on your machine. Those logs are personal conversation history and should not be committed to git or uploaded as build artifacts.
157
+
158
+ **The one case where cctx belongs in CI:** when Claude Code itself runs inside a GitHub Actions job (agentic PR workflows, automated coding steps). In that case the JSONL logs are written on the runner during the job and cctx can analyse them as a post-step.
159
+
160
+ ### GitHub Action (recommended)
161
+
162
+ ```yaml
163
+ - uses: anthropics/claude-code-action@v1
164
+ with:
165
+ # ... your agentic workflow config
166
+
167
+ - uses: jacquardlabs/cctx@v0
168
+ with:
169
+ fail_on_findings: false # set true to gate the job on waste findings
170
+ github_summary: true # write findings to the job summary UI
171
+ ```
172
+
173
+ The action auto-discovers the most recent Claude Code session written on the runner. It does not accept arbitrary file paths — that pattern would require committing session logs to the repo, which you should not do.
174
+
175
+ ### Manual step
176
+
177
+ ```yaml
178
+ - uses: anthropics/claude-code-action@v1
179
+ with:
180
+ # ... your agentic workflow config
181
+
182
+ - name: Analyse session
183
+ run: pipx run cctx-cli autopsy --latest . --github-summary
184
+ ```
185
+
186
+ `--github-summary` appends a markdown findings report to the GitHub Actions job summary UI. Add `--fail-on-findings` to exit 1 when waste patterns are detected.
187
+
188
+ Commands that make sense as CI steps:
189
+ - `cctx autopsy` — diagnose the session that just ran
190
+ - `cctx export` — archive structured findings as a build artifact
191
+
192
+ `cctx harvest` requires session logs AND writes to `CLAUDE.md` — neither step maps cleanly to CI. Run it locally after a session.
193
+
137
194
  ## License
138
195
 
139
196
  MIT
@@ -0,0 +1,39 @@
1
+ name: 'cctx'
2
+ description: 'Analyse Claude Code sessions for waste patterns, cost attribution, and CLAUDE.md recommendations'
3
+ author: 'Jacquard Labs'
4
+
5
+ branding:
6
+ icon: 'activity'
7
+ color: 'blue'
8
+
9
+ inputs:
10
+ fail_on_findings:
11
+ description: 'Exit 1 if the session has waste findings'
12
+ required: false
13
+ default: 'false'
14
+ github_summary:
15
+ description: 'Write findings to the GitHub Actions job summary'
16
+ required: false
17
+ default: 'true'
18
+
19
+ runs:
20
+ using: 'composite'
21
+ steps:
22
+ - name: Install cctx
23
+ shell: bash
24
+ run: pipx install cctx-cli
25
+
26
+ - name: Analyse session
27
+ shell: bash
28
+ env:
29
+ FAIL_ON_FINDINGS: ${{ inputs.fail_on_findings }}
30
+ GITHUB_SUMMARY: ${{ inputs.github_summary }}
31
+ run: |
32
+ ARGS="autopsy --latest ."
33
+ if [ "$GITHUB_SUMMARY" = "true" ]; then
34
+ ARGS="$ARGS --github-summary"
35
+ fi
36
+ if [ "$FAIL_ON_FINDINGS" = "true" ]; then
37
+ ARGS="$ARGS --fail-on-findings"
38
+ fi
39
+ cctx $ARGS
@@ -1,3 +1,3 @@
1
1
  """cctx: profile, debug, and optimize Claude Code and Agent SDK sessions."""
2
2
 
3
- __version__ = "0.1.0"
3
+ __version__ = "1.0.0"