claude-dev-env 1.38.1 → 1.40.0

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 (282) hide show
  1. package/CLAUDE.md +10 -36
  2. package/_shared/pr-loop/audit-reply-template.md +147 -0
  3. package/_shared/pr-loop/fix-protocol.md +25 -4
  4. package/_shared/pr-loop/gh-payloads.md +37 -50
  5. package/_shared/pr-loop/scripts/code_rules_gate.py +0 -60
  6. package/_shared/pr-loop/scripts/config/post_audit_thread_constants.py +199 -0
  7. package/_shared/pr-loop/scripts/config/reviews_disabled_constants.py +8 -0
  8. package/_shared/pr-loop/scripts/post_audit_thread.py +1242 -0
  9. package/_shared/pr-loop/scripts/preflight.py +129 -2
  10. package/_shared/pr-loop/scripts/reviews_disabled.py +59 -0
  11. package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +0 -19
  12. package/_shared/pr-loop/scripts/tests/test_post_audit_thread.py +1116 -0
  13. package/_shared/pr-loop/scripts/tests/test_post_audit_thread_constants.py +127 -0
  14. package/_shared/pr-loop/scripts/tests/test_preflight.py +41 -0
  15. package/_shared/pr-loop/scripts/tests/test_reviews_disabled.py +36 -0
  16. package/_shared/pr-loop/state-schema.md +1 -1
  17. package/agents/clean-coder.md +2 -2
  18. package/agents/pr-description-writer.md +150 -52
  19. package/bin/install.mjs +6 -7
  20. package/bin/install.test.mjs +8 -0
  21. package/commands/doc-gist.md +16 -0
  22. package/commands/plan.md +0 -2
  23. package/commands/review-plan.md +1 -1
  24. package/docs/CODE_RULES.md +122 -2
  25. package/docs/PR_DESCRIPTION_GUIDE.md +127 -64
  26. package/hooks/blocking/bot_mention_comment_blocker.py +75 -0
  27. package/hooks/blocking/code_rules_enforcer.py +1143 -129
  28. package/hooks/blocking/convergence_gate_blocker.py +130 -0
  29. package/hooks/blocking/destructive_command_blocker.py +74 -0
  30. package/hooks/blocking/gh_body_arg_blocker.py +30 -0
  31. package/hooks/blocking/md_to_html_blocker.py +119 -0
  32. package/hooks/blocking/pr_description_enforcer.py +57 -22
  33. package/hooks/blocking/test_bot_mention_comment_blocker.py +131 -0
  34. package/hooks/blocking/test_code_rules_enforcer.py +21 -0
  35. package/hooks/blocking/test_code_rules_enforcer_any_exempt_files.py +70 -0
  36. package/hooks/blocking/test_code_rules_enforcer_any_imports_and_cast.py +92 -0
  37. package/hooks/blocking/test_code_rules_enforcer_banned_import_alias.py +143 -0
  38. package/hooks/blocking/test_code_rules_enforcer_banned_prefixes.py +152 -0
  39. package/hooks/blocking/test_code_rules_enforcer_bare_except.py +120 -0
  40. package/hooks/blocking/test_code_rules_enforcer_boundary_types.py +175 -0
  41. package/hooks/blocking/test_code_rules_enforcer_cap_meta.py +0 -1
  42. package/hooks/blocking/test_code_rules_enforcer_collection_prefix.py +50 -0
  43. package/hooks/blocking/test_code_rules_enforcer_docstring_format.py +255 -0
  44. package/hooks/blocking/test_code_rules_enforcer_inline_tuple_string_magic.py +130 -0
  45. package/hooks/blocking/test_code_rules_enforcer_stub_implementations.py +141 -0
  46. package/hooks/blocking/test_code_rules_enforcer_test_branching.py +143 -0
  47. package/hooks/blocking/test_code_rules_enforcer_thin_wrapper_files.py +169 -0
  48. package/hooks/blocking/test_code_rules_enforcer_todo_markers.py +99 -0
  49. package/hooks/blocking/test_code_rules_enforcer_typed_dict_pairs.py +141 -0
  50. package/hooks/blocking/test_convergence_gate_blocker.py +63 -0
  51. package/hooks/blocking/test_destructive_command_blocker.py +146 -0
  52. package/hooks/blocking/test_destructive_command_blocker_no_verify.py +102 -0
  53. package/hooks/blocking/test_gh_body_arg_blocker.py +45 -0
  54. package/hooks/blocking/test_md_to_html_blocker.py +317 -0
  55. package/hooks/blocking/test_pr_description_enforcer.py +69 -8
  56. package/hooks/config/any_type_config.py +7 -0
  57. package/hooks/config/banned_identifiers_constants.py +11 -0
  58. package/hooks/config/blocking_check_limits.py +38 -0
  59. package/hooks/config/bot_mention_comment_blocker_constants.py +20 -0
  60. package/hooks/config/code_rules_enforcer_constants.py +53 -0
  61. package/hooks/config/convergence_branch_constants.py +9 -0
  62. package/hooks/config/doc_gist_auto_publish_constants.py +18 -0
  63. package/hooks/config/html_companion_constants.py +20 -0
  64. package/hooks/config/inline_tuple_string_magic_constants.py +22 -0
  65. package/hooks/config/pr_description_enforcer_constants.py +14 -0
  66. package/hooks/config/test_banned_identifiers_constants.py +17 -0
  67. package/hooks/hooks.json +28 -20
  68. package/hooks/pyproject.toml +69 -0
  69. package/hooks/validators/mypy_integration.py +47 -1
  70. package/hooks/validators/run_all_validators.py +3 -3
  71. package/hooks/validators/test_mypy_integration.py +50 -1
  72. package/hooks/workflow/doc_gist_auto_publish.py +144 -0
  73. package/hooks/workflow/md_to_html_companion.py +365 -0
  74. package/hooks/workflow/test_doc_gist_auto_publish.py +117 -0
  75. package/hooks/workflow/test_md_to_html_companion.py +452 -0
  76. package/package.json +1 -1
  77. package/rules/gh-body-file.md +2 -0
  78. package/scripts/Install-SweepEmptyDirs.ps1 +111 -0
  79. package/scripts/check.ps1 +106 -0
  80. package/scripts/config/timing.py +11 -0
  81. package/scripts/sweep_empty_dirs.py +138 -0
  82. package/scripts/sync_to_cursor/rules.py +1 -1
  83. package/scripts/test_sweep_empty_dirs.py +183 -0
  84. package/skills/_shared/pr-loop/prompts/pr-consistency-audit.xml +323 -0
  85. package/skills/_shared/pr-loop/scripts/_cli_utils.py +22 -0
  86. package/skills/_shared/pr-loop/scripts/_path_resolver.py +165 -0
  87. package/skills/_shared/pr-loop/scripts/_xml_utils.py +20 -0
  88. package/skills/_shared/pr-loop/scripts/build_audit_prompt.py +182 -0
  89. package/skills/_shared/pr-loop/scripts/build_fix_prompt.py +185 -0
  90. package/skills/_shared/pr-loop/scripts/config/__init__.py +0 -0
  91. package/skills/_shared/pr-loop/scripts/config/path_resolver_constants.py +78 -0
  92. package/skills/_shared/pr-loop/scripts/init_loop_state.py +135 -0
  93. package/skills/_shared/pr-loop/scripts/teardown_worktrees.py +175 -0
  94. package/skills/_shared/pr-loop/scripts/write_audit_outcomes.py +182 -0
  95. package/skills/_shared/pr-loop/scripts/write_fix_outcomes.py +206 -0
  96. package/skills/bugteam/CONSTRAINTS.md +21 -22
  97. package/skills/bugteam/EXAMPLES.md +3 -3
  98. package/skills/bugteam/PROMPTS.md +227 -67
  99. package/skills/bugteam/SKILL.md +132 -455
  100. package/skills/bugteam/reference/README.md +1 -1
  101. package/skills/bugteam/reference/audit-and-teammates.md +112 -39
  102. package/skills/bugteam/reference/audit-contract.md +4 -22
  103. package/skills/bugteam/reference/copilot-gap-analysis.md +8 -5
  104. package/skills/bugteam/reference/design-rationale.md +2 -2
  105. package/skills/bugteam/reference/github-pr-reviews.md +50 -57
  106. package/skills/bugteam/reference/obstacles/audit-assign-ids.md +13 -0
  107. package/skills/bugteam/reference/obstacles/audit-capture-excerpts.md +13 -0
  108. package/skills/bugteam/reference/obstacles/audit-walk-categories.md +13 -0
  109. package/skills/bugteam/reference/obstacles/audit-write-xml.md +13 -0
  110. package/skills/bugteam/reference/obstacles/fix-append-summary.md +13 -0
  111. package/skills/bugteam/reference/obstacles/fix-apply-fixes.md +13 -0
  112. package/skills/bugteam/reference/obstacles/fix-git-add-commit.md +13 -0
  113. package/skills/bugteam/reference/obstacles/fix-git-push.md +13 -0
  114. package/skills/bugteam/reference/obstacles/fix-post-reply.md +13 -0
  115. package/skills/bugteam/reference/obstacles/fix-publish-summary.md +13 -0
  116. package/skills/bugteam/reference/obstacles/fix-py-compile.md +13 -0
  117. package/skills/bugteam/reference/obstacles/fix-read-files.md +13 -0
  118. package/skills/bugteam/reference/obstacles/fix-resolve-thread.md +13 -0
  119. package/skills/bugteam/reference/obstacles/fix-test-suite.md +13 -0
  120. package/skills/bugteam/reference/obstacles/fix-violation-count.md +13 -0
  121. package/skills/bugteam/reference/obstacles/fix-write-xml.md +13 -0
  122. package/skills/bugteam/reference/team-setup.md +111 -9
  123. package/skills/bugteam/reference/teardown-publish-permissions.md +39 -8
  124. package/skills/bugteam/scripts/README.md +60 -0
  125. package/skills/bugteam/scripts/_claude_permissions_common.py +358 -0
  126. package/skills/bugteam/scripts/bugteam_code_rules_gate.py +976 -0
  127. package/skills/bugteam/scripts/bugteam_fix_hookspath.py +375 -0
  128. package/skills/bugteam/scripts/bugteam_preflight.py +328 -0
  129. package/skills/bugteam/scripts/config/bugteam_code_rules_gate_constants.py +25 -0
  130. package/skills/bugteam/scripts/config/bugteam_fix_hookspath_constants.py +26 -0
  131. package/skills/bugteam/scripts/config/bugteam_preflight_constants.py +35 -0
  132. package/skills/bugteam/scripts/config/claude_permissions_common_constants.py +20 -0
  133. package/skills/bugteam/scripts/config/probe_code_rules_enforcer_check_constants.py +12 -0
  134. package/skills/bugteam/scripts/config/windows_safe_rmtree_constants.py +7 -0
  135. package/skills/bugteam/scripts/grant_project_claude_permissions.py +175 -0
  136. package/skills/bugteam/scripts/probe_code_rules_enforcer_check.py +107 -0
  137. package/skills/bugteam/scripts/revoke_project_claude_permissions.py +220 -0
  138. package/skills/bugteam/scripts/test__claude_permissions_common.py +112 -0
  139. package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +400 -0
  140. package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +384 -0
  141. package/skills/bugteam/scripts/test_bugteam_preflight.py +309 -0
  142. package/skills/bugteam/scripts/test_claude_permissions_common.py +195 -0
  143. package/skills/bugteam/scripts/test_grant_project_claude_permissions.py +55 -0
  144. package/skills/bugteam/scripts/test_probe_code_rules_enforcer_check.py +76 -0
  145. package/skills/bugteam/scripts/test_revoke_project_claude_permissions.py +55 -0
  146. package/skills/bugteam/scripts/test_windows_safe_rmtree.py +108 -0
  147. package/skills/bugteam/scripts/windows_safe_rmtree.py +100 -0
  148. package/skills/bugteam/test_skill_additions.py +1 -11
  149. package/skills/code/SKILL.md +176 -0
  150. package/skills/copilot-review/SKILL.md +16 -0
  151. package/skills/doc-gist/SKILL.md +99 -0
  152. package/skills/doc-gist/references/examples/01-exploration-code-approaches.html +453 -0
  153. package/skills/doc-gist/references/examples/02-exploration-visual-designs.html +515 -0
  154. package/skills/doc-gist/references/examples/03-code-review-pr.html +638 -0
  155. package/skills/doc-gist/references/examples/04-code-understanding.html +491 -0
  156. package/skills/doc-gist/references/examples/05-design-system.html +629 -0
  157. package/skills/doc-gist/references/examples/06-component-variants.html +605 -0
  158. package/skills/doc-gist/references/examples/07-prototype-animation.html +455 -0
  159. package/skills/doc-gist/references/examples/08-prototype-interaction.html +396 -0
  160. package/skills/doc-gist/references/examples/09-slide-deck.html +592 -0
  161. package/skills/doc-gist/references/examples/10-svg-illustrations.html +492 -0
  162. package/skills/doc-gist/references/examples/11-status-report.html +528 -0
  163. package/skills/doc-gist/references/examples/12-incident-report.html +596 -0
  164. package/skills/doc-gist/references/examples/13-flowchart-diagram.html +395 -0
  165. package/skills/doc-gist/references/examples/14-research-feature-explainer.html +381 -0
  166. package/skills/doc-gist/references/examples/15-research-concept-explainer.html +368 -0
  167. package/skills/doc-gist/references/examples/16-implementation-plan.html +702 -0
  168. package/skills/doc-gist/references/examples/17-pr-writeup.html +595 -0
  169. package/skills/doc-gist/references/examples/18-editor-triage-board.html +573 -0
  170. package/skills/doc-gist/references/examples/19-editor-feature-flags.html +663 -0
  171. package/skills/doc-gist/references/examples/20-editor-prompt-tuner.html +722 -0
  172. package/skills/doc-gist/references/examples/README.md +5 -0
  173. package/skills/doc-gist/scripts/config/__init__.py +0 -0
  174. package/skills/doc-gist/scripts/config/gist_upload_constants.py +16 -0
  175. package/skills/doc-gist/scripts/gist_upload.py +177 -0
  176. package/skills/doc-gist/scripts/test_gist_upload.py +51 -0
  177. package/skills/findbugs/SKILL.md +96 -2
  178. package/skills/monitor-open-prs/SKILL.md +14 -32
  179. package/skills/monitor-open-prs/test_skill_contract.py +0 -11
  180. package/skills/pr-consistency-audit/SKILL.md +112 -0
  181. package/skills/pr-consistency-audit/reference/detection-rules.md +96 -0
  182. package/skills/pr-consistency-audit/reference/illustrations.md +78 -0
  183. package/skills/pr-converge/SKILL.md +229 -23
  184. package/skills/pr-converge/config/__init__.py +0 -0
  185. package/skills/pr-converge/config/constants.py +63 -0
  186. package/skills/pr-converge/reference/convergence-gates.md +138 -44
  187. package/skills/pr-converge/reference/examples.md +43 -11
  188. package/skills/pr-converge/reference/fix-protocol.md +6 -5
  189. package/skills/pr-converge/reference/ground-rules.md +5 -3
  190. package/skills/pr-converge/reference/multi-pr-orchestration.md +44 -19
  191. package/skills/pr-converge/reference/obstacles/fix-post-replies.md +13 -0
  192. package/skills/pr-converge/reference/obstacles/fix-publish-summary.md +13 -0
  193. package/skills/pr-converge/reference/obstacles/fix-push.md +13 -0
  194. package/skills/pr-converge/reference/obstacles/fix-read-filelines.md +13 -0
  195. package/skills/pr-converge/reference/obstacles/fix-reset-state.md +13 -0
  196. package/skills/pr-converge/reference/obstacles/fix-resolve-threads.md +13 -0
  197. package/skills/pr-converge/reference/obstacles/fix-spawn-clean-coder.md +13 -0
  198. package/skills/pr-converge/reference/obstacles/fix-stage-commit.md +13 -0
  199. package/skills/pr-converge/reference/obstacles/fix-trigger-bugbot.md +13 -0
  200. package/skills/pr-converge/reference/obstacles/fix-write-test.md +13 -0
  201. package/skills/pr-converge/reference/per-tick.md +107 -31
  202. package/skills/pr-converge/reference/state-schema.md +22 -1
  203. package/skills/pr-converge/reference/stop-conditions.md +9 -7
  204. package/skills/pr-converge/scripts/README.md +34 -46
  205. package/skills/pr-converge/scripts/check_bugbot_ci.py +279 -0
  206. package/skills/pr-converge/scripts/check_convergence.py +497 -0
  207. package/skills/pr-converge/scripts/check_pending_reviews.py +154 -0
  208. package/skills/pr-converge/scripts/config/pr_converge_constants.py +118 -0
  209. package/skills/pr-converge/scripts/fetch_copilot_reviews.py +134 -0
  210. package/skills/pr-converge/scripts/post_fix_reply.py +168 -0
  211. package/skills/pr-converge/scripts/test_check_bugbot_ci.py +312 -0
  212. package/skills/pr-converge/workflows/schedule-wakeup-loop.md +5 -12
  213. package/skills/qbug/SKILL.md +157 -27
  214. package/skills/session-log/SKILL.md +216 -114
  215. package/skills/session-tidy/SKILL.md +1 -1
  216. package/skills/skill-builder/SKILL.md +138 -56
  217. package/skills/skill-builder/references/delegation-map.md +72 -113
  218. package/skills/skill-builder/references/progressive-disclosure.md +122 -0
  219. package/skills/skill-builder/references/self-audit-checklist.md +92 -0
  220. package/skills/skill-builder/references/skill-types.md +228 -0
  221. package/skills/skill-builder/references/thariq-x-post-skills.json +33 -0
  222. package/skills/skill-builder/templates/gap-analysis.md +15 -8
  223. package/skills/skill-builder/workflows/improve-skill.md +86 -57
  224. package/skills/skill-builder/workflows/new-skill.md +80 -168
  225. package/skills/skill-builder/workflows/polish-skill.md +78 -54
  226. package/skills/structure-prompt/SKILL.md +50 -0
  227. package/skills/structure-prompt/reference/adversarial-tuning.md +62 -0
  228. package/skills/structure-prompt/reference/block-classification.md +27 -0
  229. package/skills/structure-prompt/reference/canonical-case.md +48 -0
  230. package/skills/structure-prompt/reference/citation-depth.md +70 -0
  231. package/skills/structure-prompt/reference/cleanup.md +33 -0
  232. package/skills/structure-prompt/reference/constraints.md +33 -0
  233. package/skills/structure-prompt/reference/directives.md +37 -0
  234. package/skills/structure-prompt/reference/examples.md +72 -0
  235. package/skills/structure-prompt/reference/instantiation.md +51 -0
  236. package/skills/structure-prompt/reference/output-contract.md +72 -0
  237. package/skills/structure-prompt/reference/per-category.md +23 -0
  238. package/skills/structure-prompt/reference/persona.md +38 -0
  239. package/skills/structure-prompt/reference/research.md +33 -0
  240. package/skills/structure-prompt/reference/structure.md +28 -0
  241. package/agents/code-standards-agent.md +0 -93
  242. package/agents/groq-coder.md +0 -113
  243. package/agents/plan-executor.md +0 -226
  244. package/agents/project-docs-analyzer.md +0 -53
  245. package/agents/project-structure-organizer-agent.md +0 -72
  246. package/agents/skill-to-agent-converter.md +0 -370
  247. package/agents/skill-writer-agent.md +0 -470
  248. package/agents/user-docs-writer.md +0 -67
  249. package/agents/workflow-visual-documenter.md +0 -82
  250. package/commands/readability-review.md +0 -20
  251. package/hooks/mypy.ini +0 -2
  252. package/hooks/notification/attention_needed_notify.py +0 -71
  253. package/hooks/notification/claude_notification_handler.py +0 -67
  254. package/hooks/notification/notification_utils.py +0 -267
  255. package/hooks/notification/subagent_complete_notify.py +0 -381
  256. package/hooks/notification/test_attention_needed_notify.py +0 -47
  257. package/hooks/notification/test_claude_notification_handler.py +0 -54
  258. package/hooks/notification/test_notification_utils.py +0 -91
  259. package/hooks/notification/test_subagent_complete_notify.py +0 -79
  260. package/scripts/config/groq_bugteam_config.py +0 -230
  261. package/scripts/config/test_groq_bugteam_config.py +0 -83
  262. package/scripts/config/test_spec_implementer_prompt.py +0 -32
  263. package/scripts/groq_bugteam.README.md +0 -131
  264. package/scripts/groq_bugteam.py +0 -647
  265. package/scripts/groq_bugteam_dotenv.py +0 -40
  266. package/scripts/groq_bugteam_spec.py +0 -226
  267. package/scripts/test_groq_bugteam.py +0 -529
  268. package/scripts/test_groq_bugteam_apply_fix_from_spec.py +0 -426
  269. package/scripts/test_groq_bugteam_dotenv.py +0 -66
  270. package/scripts/test_groq_bugteam_spec.py +0 -338
  271. package/skills/bugteam/SKILL_EVALS.md +0 -309
  272. package/skills/dream/SKILL.md +0 -118
  273. package/skills/ingest/SKILL.md +0 -40
  274. package/skills/npm-creator/SKILL.md +0 -187
  275. package/skills/readability-review/SKILL.md +0 -127
  276. package/skills/resume-review/SKILL.md +0 -261
  277. package/skills/rule-audit/SKILL.md +0 -307
  278. package/skills/rule-creator/SKILL.md +0 -150
  279. package/skills/searching-obsidian-vault/SKILL.md +0 -131
  280. package/skills/skill-writer/REFERENCE.md +0 -284
  281. package/skills/skill-writer/SKILL.md +0 -222
  282. package/skills/tdd-team/SKILL.md +0 -128
@@ -1,17 +1,28 @@
1
1
  ---
2
2
  name: session-log
3
- description: Log a session report to the Obsidian vault, track vault context usage, extract unrecorded decisions, tidy the project's session folder, and output a /rename command. Use when the user says /session-log, journal this session, log this work, session report, or any variation of "summarize/log/record this session". Also triggers on "save session", "capture session", or "document what we did".
3
+ description: >-
4
+ Log a session report as a styled HTML file in the vault, track vault context usage, extract unrecorded decisions, tidy the project's session folder, publish via /doc-gist as a shareable webpage, and output a /rename command. Use when the user says /session-log, journal this session, log this work, session report, or any variation of "summarize/log/record this session". Also triggers on "save session", "capture session", or "document what we did".
4
5
  ---
5
6
 
6
7
  # Session Log
7
8
 
8
9
  ## Overview
9
10
 
10
- Write a structured session report, then run vault context tracking, decision extraction, and session tidying.
11
+ Write a structured session report as HTML, then run vault context tracking, decision extraction, session tidying, publish via /doc-gist, and finalize with a /rename clipboard hand-off.
11
12
 
12
13
  **Announce at start:** "I'm logging this session."
13
14
 
14
- This skill runs as a 5-step workflow. Every step runs automatically -- no user prompts between steps except where noted.
15
+ This skill runs as a 6-step workflow. Every step runs automatically -- no user prompts between steps except where noted.
16
+
17
+ ## Gotchas
18
+
19
+ - **HTML output, not Markdown.** The repo's `md_to_html_blocker` PreToolUse hook rejects Write/Edit on `.md` files outside `.claude/` directories. Headless vault paths (e.g., `$OBSIDIAN_VAULT_PATH`) resolve outside `.claude/`, so session reports use HTML. (The local vault at `~/.claude/vault/` is exempt, but HTML is the uniform format regardless of backend.)
20
+ - **Avoid historical and comparative language.** The `state_description_blocker` hook enforces this for markdown and code files. While the hook does not scan `.html`, the same present-tense, current-state style applies to session reports. The trigger pattern set lives in `~/.claude/rules/no-historical-clutter.md`.
21
+ - **doc-gist uses `--description` for gist title text.** `gist_upload.py` uploads HTML verbatim with no content parsing. Pass `--description "Session [N] — [Title]"` to set the gist description.
22
+ - **doc-gist preview URL takes a few seconds.** The htmlpreview.github.io renderer fetches the raw gist on first hit. Quote both URLs and tell the user to refresh once if the page is blank.
23
+ - **gh must be authenticated.** Running gist_upload.py with `gh` unauthenticated prints the auth prompt and exits non-zero. Surface that message to the user; the local HTML file in the vault is still the canonical artifact, so Step 6 still runs.
24
+ - **Obsidian frontmatter index is sacrificed.** Obsidian's native YAML-frontmatter parser reads only `.md` files. HTML files do not appear in the Obsidian UI's frontmatter index. Search by content still works; search by `type: session-report` does not.
25
+ - **Existing files require the Edit tool.** The `write_existing_file_blocker` hook rejects the Write tool on existing paths. Use Write only when creating a fresh session report; use Edit for Step 2's append and Step 4's auto-fixes.
15
26
 
16
27
  ## Backend Detection (run before Step 1)
17
28
 
@@ -19,83 +30,90 @@ Determine which storage backend is available. Try in this order and use the firs
19
30
 
20
31
  1. **Headless vault** -- run `ob --version` via Bash to verify the obsidian-headless CLI is installed. Then check `OBSIDIAN_VAULT_PATH` environment variable or `~/.claude/vault/` for a vault directory. If the CLI exists and a vault directory resolves, optionally run `ob sync-status --path <vault-path>` to verify sync is active. Set `backend = "headless"`.
21
32
 
22
- 2. **Obsidian MCP** -- call `mcp__obsidian__list_directory` with `path="sessions"`. If it succeeds, use Obsidian MCP for all operations. Set `backend = "obsidian"`.
23
-
24
- 3. **Local vault** -- if neither headless nor MCP is available, use `~/.claude/vault/` as a local vault directory. Create it via `mkdir -p ~/.claude/vault/sessions` if it does not exist. Set `backend = "local"`. This provides a working vault structure that can be upgraded to headless sync later.
33
+ 2. **Local vault** -- fall back to `~/.claude/vault/` as a local vault directory. Create it via `mkdir -p ~/.claude/vault/sessions` if it does not exist. Set `backend = "local"`. This provides a working vault structure that can be upgraded to headless sync later.
25
34
 
26
35
  **Backend capabilities:**
27
36
 
28
- | Capability | headless | obsidian | local |
29
- |---|---|---|---|
30
- | Write session reports | Write tool | `mcp__obsidian__write_note` | Write tool |
31
- | Search prior sessions | Bash `ls` + Grep | `mcp__obsidian__search_notes` | Bash `ls` + Grep |
32
- | Session number detection | parse filenames | frontmatter search | parse filenames |
33
- | Frontmatter | YAML `---` fences | handled by MCP | YAML `---` fences |
34
- | Step 2 (vault context tracking) | skip | runs | skip |
35
- | Step 4 (session tidy) | skip | runs | skip |
36
- | Sync | Obsidian Sync | Obsidian Sync | none (local only) |
37
-
38
- **Session number detection (headless and local):**
37
+ | Capability | headless | local |
38
+ |---|---|---|
39
+ | Write session reports | Write tool to `.html` path | Write tool to `.html` path |
40
+ | Search prior sessions | Bash `ls` + Grep | Bash `ls` + Grep |
41
+ | Session number detection | parse filenames | parse filenames |
42
+ | Frontmatter | YAML inside HTML comment | YAML inside HTML comment |
43
+ | Sync | Obsidian Sync | none (local only) |
44
+
45
+ **Session number detection:**
39
46
  - List files in the project directory via Bash `ls`
40
- - Parse filenames matching `[N]. *.md`
47
+ - Parse filenames matching `[N]. *.html` or `[N]. *.md` to preserve sequence across the format migration
41
48
  - Highest N + 1. If directory does not exist, create it and start at 1
42
49
 
43
50
  **Output paths:**
44
- - headless: `$OBSIDIAN_VAULT_PATH/sessions/[Project]/[N]. [Title].md` or `~/.claude/vault/sessions/[Project]/[N]. [Title].md`
45
- - obsidian: `sessions/[Project]/[N]. [Title].md` (vault-relative)
46
- - local: `~/.claude/vault/sessions/[Project]/[N]. [Title].md`
51
+ - headless: `$OBSIDIAN_VAULT_PATH/sessions/[Project]/[N]. [Title].html` (falls back to `~/.claude/vault/` when the env var is unset)
52
+ - local: `~/.claude/vault/sessions/[Project]/[N]. [Title].html`
47
53
 
48
- Announce the backend: "Using headless vault at [path].", "Using Obsidian vault.", or "Using local vault at ~/.claude/vault/. Run `/obsidian-check` for upgrade options."
54
+ Announce the backend: "Using headless vault at [path]." or "Using local vault at ~/.claude/vault/. Run `/obsidian-check` for upgrade options."
49
55
 
50
56
  ---
51
57
 
52
- ## Step 1: Write Session Report
58
+ ## Step 1: Write Session Report (HTML)
53
59
 
54
60
  1. Review the conversation to identify: key outcomes, blockers, decisions, and next steps.
55
61
 
56
62
  2. Determine session metadata:
57
63
  - **Project name:** infer from conversation context
58
- - **Session number:** search existing vault notes to find the latest session number for this project, then increment. Use `mcp__obsidian__search_notes` with `searchFrontmatter: true` and the project name. If no prior sessions exist, start at 1.
64
+ - **Session number:** list the project's vault folder via Bash `ls`, parse `[N]. *.html` and `[N]. *.md` filenames, take highest+1. If no prior sessions, start at 1.
59
65
  - **Date:** today's date
60
66
  - **Title:** a 2-5 word summary of the session's primary outcome or focus area. Pick the single most important thing that happened. Examples: "Amazon Auth Migration", "Source Loading Fix", "Vault Reorganization". Avoid generic titles like "Bug Fixes" or "Various Updates".
61
67
 
62
- 3. **Write to vault** via `mcp__obsidian__write_note`:
63
- - **Path:** `sessions/[Project]/[N]. [Title].md`
64
- - **Frontmatter:** `{"type": "session-report", "project": "[name]", "session": [N], "date": "[YYYY-MM-DD]", "status": "completed"|"in-progress"|"blocked", "blocked": true|false, "tags": ["session", "[project-tag]"]}`
65
- - **Content:** Markdown formatted (see Vault Format below)
66
-
67
- 4. **Backend-specific write:**
68
- - **headless:** Write tool to the headless vault path. Include frontmatter as YAML `---` fences at the top of the file. Create the project directory via `mkdir -p` if it does not exist.
69
- - **obsidian:** `mcp__obsidian__write_note` with path and frontmatter object
70
- - **local:** Write tool to `~/.claude/vault/sessions/[Project]/[N]. [Title].md`. Include frontmatter as YAML `---` fences. Create the project directory via `mkdir -p` if it does not exist.
71
- - **If the write fails:** output the content in the conversation so the user can copy it manually. Skip Steps 2-4 and go directly to Step 5.
72
-
73
- ### Vault Format -- Markdown Session Report
74
-
75
- The vault note uses markdown (not HTML).
76
-
77
- ```markdown
78
- ## Session [N] Report -- [Month Day, Year]
79
-
80
- ### [emoji] [Section Title]
81
-
82
- [1-3 sentence explanation of what happened and why it matters]
83
-
84
- - **[Label]:** [detail]
85
-
86
- **Fix:** [what was done]
87
-
88
- ### [emoji] [Section with tabular data]
89
-
90
- [Context sentence]
91
-
92
- | # | Item | Status |
93
- |---|------|--------|
94
- | 1 | ... | ... |
95
-
96
- ### [emoji] Notes
97
-
98
- - **[Topic]:** [detail]
68
+ 3. **Write to the vault path** via the Write tool. Create the project directory via `mkdir -p` if it does not exist. If the write fails, output the content in the conversation so the user can copy it manually. Skip Steps 2-5 and go directly to Step 6.
69
+
70
+ ### Vault Format -- HTML Session Report
71
+
72
+ The vault note is a self-contained HTML file. Frontmatter lives inside an HTML comment so it is human-readable but does not affect rendering. Styling is minimal so doc-gist's template wraps the body cleanly in Step 5.
73
+
74
+ ```html
75
+ <!DOCTYPE html>
76
+ <html lang="en">
77
+ <head>
78
+ <meta charset="utf-8">
79
+ <title>Session [N] [Title]</title>
80
+ </head>
81
+ <body>
82
+ <!--
83
+ type: session-report
84
+ project: [name]
85
+ session: [N]
86
+ date: [YYYY-MM-DD]
87
+ status: completed|in-progress|blocked
88
+ blocked: true|false
89
+ tags: [session, [project-tag]]
90
+ -->
91
+
92
+ <h1>Session [N] Report — [Month Day, Year]</h1>
93
+
94
+ <h2>[emoji] [Section Title]</h2>
95
+ <p>[1-3 sentence explanation of what happened and why it matters]</p>
96
+ <ul>
97
+ <li><strong>[Label]:</strong> [detail]</li>
98
+ </ul>
99
+ <p><strong>Fix:</strong> [what was done]</p>
100
+
101
+ <h2>[emoji] [Section with tabular data]</h2>
102
+ <p>[Context sentence]</p>
103
+ <table>
104
+ <thead><tr><th>#</th><th>Item</th><th>Status</th></tr></thead>
105
+ <tbody>
106
+ <tr><td>1</td><td>...</td><td>...</td></tr>
107
+ </tbody>
108
+ </table>
109
+
110
+ <h2>[emoji] Notes</h2>
111
+ <ul>
112
+ <li><strong>[Topic]:</strong> [detail]</li>
113
+ </ul>
114
+
115
+ </body>
116
+ </html>
99
117
  ```
100
118
 
101
119
  ### Emoji Status Indicators
@@ -110,41 +128,62 @@ The vault note uses markdown (not HTML).
110
128
 
111
129
  ### Formatting Rules
112
130
 
113
- - **Section headers** (`###`) get one emoji + descriptive title
114
- - **Explanatory paragraphs** under each header -- not just bullets. Explain what happened and why.
115
- - **Bold inline labels** for key facts: `**Fix:**`, `**Account:**`, etc.
116
- - **Tables** for anything with 3+ rows of structured data (queued items, test results, file lists)
117
- - **Bullets** for lists of 2+ related items
118
- - **Links** where useful: file paths, URLs, PR links as markdown links
131
+ - **Section headers** (`<h2>`) get one emoji + descriptive title
132
+ - **Explanatory paragraphs** (`<p>`) under each header -- not just bullets. Explain what happened and why.
133
+ - **Bold inline labels** for key facts: `<strong>Fix:</strong>`, `<strong>Account:</strong>`, etc.
134
+ - **Tables** (`<table>`) for anything with 3+ rows of structured data (queued items, test results, file lists)
135
+ - **Bullets** (`<ul><li>`) for lists of 2+ related items
136
+ - **Links** (`<a href="...">`) where useful: file paths, URLs, PR links
137
+ - **No inline `style=` attributes and no `<style>` block.** Doc-gist wraps the body in its own template; inner styles fight the wrapper.
119
138
 
120
139
  ### What NOT to include
121
140
 
122
141
  - Play-by-play of debugging steps or failed approaches
123
142
  - Process narration ("First I tried X, then Y")
124
143
  - Redundant sections -- if nothing was blocked, skip the blocked section
144
+ - Historical or comparative language — see `~/.claude/rules/no-historical-clutter.md` for the trigger pattern set. The `state_description_blocker` hook rejects writes containing these patterns in markdown/code; the same rule applies to session report HTML.
125
145
 
126
146
  ### Example
127
147
 
128
- ```markdown
129
- ## Session 6 Report -- March 27, 2026
130
-
131
- ### ✅ Developer Docs Sources Fixed
132
-
133
- Both Developer Docs notebooks that had been broken since Session 5 are now fully loaded with working sources:
134
-
135
- - **Notebook #28 -- Building with Claude & Tools:** 52 sources loaded (all green)
136
- - **Notebook #29 -- Agent SDK & Testing:** 49 sources loaded (all green)
137
-
138
- **Fix:** Swapped `platform.claude.com/docs/en/X.md` URLs to `docs.anthropic.com/en/docs/X` (drop .md, swap domain). Tested one URL first, then bulk-loaded.
139
-
140
- ### 🚫 Audio Generation Blocked
141
-
142
- All 10 Audio Overviews (8 System Card + 2 Developer Docs) are ready to generate but hit the daily limit wall. The 19 overviews from Session 5 (15 Academy + 4 Opus) are still within the rolling 24-hour window.
143
-
144
- ### ⚠️ Session 7 Notes
145
-
146
- - **Account:** Notebooks live under secondary@example.com (authuser=1), NOT the default primary@example.com.
147
- - **Audio budget:** Once the 24h window resets, all 10 overviews fit within the 20/day Pro limit.
148
+ ```html
149
+ <!DOCTYPE html>
150
+ <html lang="en">
151
+ <head>
152
+ <meta charset="utf-8">
153
+ <title>Session 6 Developer Docs Sources Fixed</title>
154
+ </head>
155
+ <body>
156
+ <!--
157
+ type: session-report
158
+ project: claude-academy
159
+ session: 6
160
+ date: 2026-03-27
161
+ status: completed
162
+ blocked: false
163
+ tags: [session, claude-academy]
164
+ -->
165
+
166
+ <h1>Session 6 Report March 27, 2026</h1>
167
+
168
+ <h2>✅ Developer Docs Sources Fixed</h2>
169
+ <p>Both Developer Docs notebooks load fully with working sources:</p>
170
+ <ul>
171
+ <li><strong>Notebook #28 — Building with Claude &amp; Tools:</strong> 52 sources loaded (all green)</li>
172
+ <li><strong>Notebook #29 — Agent SDK &amp; Testing:</strong> 49 sources loaded (all green)</li>
173
+ </ul>
174
+ <p><strong>Fix:</strong> Use <code>docs.anthropic.com/en/docs/X</code> URLs (drop the .md extension, swap domain). Tested one URL first, then bulk-loaded.</p>
175
+
176
+ <h2>🚫 Audio Generation Blocked</h2>
177
+ <p>All 10 Audio Overviews are ready to generate but hit the daily limit wall.</p>
178
+
179
+ <h2>⚠️ Session 7 Notes</h2>
180
+ <ul>
181
+ <li><strong>Account:</strong> Notebooks live under secondary@example.com (authuser=1), NOT the default primary@example.com.</li>
182
+ <li><strong>Audio budget:</strong> Once the 24h window resets, all 10 overviews fit within the 20/day Pro limit.</li>
183
+ </ul>
184
+
185
+ </body>
186
+ </html>
148
187
  ```
149
188
 
150
189
  ---
@@ -158,24 +197,19 @@ This step runs automatically after Step 1 completes.
158
197
  - `mcp__obsidian__read_note`
159
198
  - `mcp__obsidian__read_multiple_notes`
160
199
 
161
- If any were used, set `vault_context_retrieved: true`. Otherwise `false`.
162
- If true, also note which vault notes were read (list the paths).
163
-
164
- 2. **Update frontmatter.** Use `mcp__obsidian__update_frontmatter` to add the tracking field:
165
- ```
166
- mcp__obsidian__update_frontmatter(
167
- path="[session note path from Step 1]",
168
- frontmatter={"vault_context_retrieved": true|false},
169
- merge=true
170
- )
171
- ```
172
- If `update_frontmatter` fails, fall back to: read the note with `mcp__obsidian__read_note`, add the field to frontmatter manually, rewrite with `mcp__obsidian__write_note`.
200
+ Track whether vault context was used and which notes were read (if any). This determines the Notes line appended in step 2.
173
201
 
174
- 3. **Append tracking line.** Use `mcp__obsidian__patch_note` to append a vault context line to the Notes section (or end of the note if no Notes section exists):
175
- - If retrieved: `- **Vault context:** Retrieved ([list of note paths])`
176
- - If not retrieved: `- **Vault context:** Not retrieved`
202
+ 2. **Append a tracking line to the Notes section** via the Edit tool. Target the closing `</ul>` of the last `<h2>...Notes</h2>` block:
203
+ - If retrieved: `<li><strong>Vault context:</strong> Retrieved ([list of note paths])</li>`
204
+ - If not retrieved: `<li><strong>Vault context:</strong> Not retrieved</li>`
177
205
 
178
- If `patch_note` fails, fall back to read-modify-write via `read_note` + `write_note`.
206
+ If no Notes section exists, append a fresh one before `</body>`:
207
+ ```html
208
+ <h2>⚠️ Notes</h2>
209
+ <ul>
210
+ <li><strong>Vault context:</strong> Not retrieved</li>
211
+ </ul>
212
+ ```
179
213
 
180
214
  ---
181
215
 
@@ -193,18 +227,18 @@ Only write decision notes the user confirms. If no unrecorded decisions are foun
193
227
 
194
228
  ## Step 4: Session Tidy (Project Scope)
195
229
 
196
- This step runs automatically after Step 3 completes. It runs a scoped version of `/session-tidy` -- only for the current project's session folder, not the entire vault.
230
+ This step runs automatically after Step 3 completes. Scope: the current project's session folder only.
197
231
 
198
- 1. **List files** in `sessions/[Project]/` via `mcp__obsidian__list_directory`.
232
+ 1. **List files** in the project's vault session folder via Bash `ls`.
199
233
 
200
- 2. **Quick audit** each file for:
201
- - **Naming convention:** must match `[N]. [Title].md`
202
- - **Frontmatter completeness:** all required fields present (`type`, `project`, `session`, `date`, `status`, `blocked`, `tags`)
203
- - **Status coherence:** `status: "completed"` with `blocked: true` is contradictory. `status: "in-progress"` or `status: "blocked"` on sessions older than 7 days is stale.
234
+ 2. **Quick audit** each `.html` file for:
235
+ - **Naming convention:** must match `[N]. [Title].html`
236
+ - **Frontmatter completeness:** HTML comment block at top contains `type`, `project`, `session`, `date`, `status`, `blocked`, `tags`
237
+ - **Status coherence:** `status: completed` with `blocked: true` is contradictory. `status: in-progress` or `status: blocked` on sessions older than 7 days is stale.
204
238
 
205
- 3. **Auto-fix minor issues silently:**
239
+ 3. **Auto-fix minor issues silently** via Edit tool:
206
240
  - Missing frontmatter fields that can be inferred (e.g., `blocked: false` when status is `completed`)
207
- - Type field set to wrong value (correct to `session-report`)
241
+ - `type` field set to a wrong value (correct to `session-report`)
208
242
 
209
243
  4. **Report issues that need user input:**
210
244
  - Files with wrong naming convention (propose new name)
@@ -213,14 +247,62 @@ This step runs automatically after Step 3 completes. It runs a scoped version of
213
247
 
214
248
  If no issues are found, skip silently. Do not report "all clean."
215
249
 
216
- 5. **Rollup check:** if the project has 5+ sessions and no `Summary.md`, mention it:
250
+ 5. **Rollup check:** if the project has 5+ sessions and no `Summary.html` or `Summary.md`, mention it:
217
251
  > "This project has [N] sessions and no summary. Run `/session-tidy` for a full rollup."
218
252
 
219
253
  ---
220
254
 
221
- ## Step 5: Finalize
255
+ ## Step 5: Publish via /doc-gist
256
+
257
+ This step runs automatically after Step 4 completes.
258
+
259
+ ### 5a. Run gist_upload.py
260
+
261
+ Hand the freshly-written HTML file to `/doc-gist` via its gist_upload.py script. Use the PowerShell tool so quoting handles spaces in the vault path:
262
+
263
+ ```powershell
264
+ python "$HOME/.claude/skills/doc-gist/scripts/gist_upload.py" `
265
+ --input "<absolute path to the .html file>" `
266
+ --description "Session [N] — [Title] · session-log · [Project]"
267
+ ```
268
+
269
+ Replace the bracketed values from Step 1's metadata. The script writes a temp copy, uploads as a secret gist, and prints two URLs to stderr — capture both:
270
+
271
+ - **Preview:** `https://htmlpreview.github.io/?https://gist.githubusercontent.com/...`
272
+ - **Gist:** `https://gist.github.com/...`
273
+
274
+ Quote both URLs back to the user as clickable links.
275
+
276
+ **If gh is not authenticated**, gist_upload.py exits non-zero with the `gh auth login` prompt. Surface that message to the user, skip 5b, and continue with Step 6 — the vault HTML is the canonical artifact. The publish step is a hand-off, not a gate.
277
+
278
+ **If the browser should not open automatically**, append `--no-open`. The gist still publishes; only the auto-open is suppressed.
279
+
280
+ ### 5b. Inject the gist URL back into the session log
281
+
282
+ After 5a succeeds, edit the vault HTML to embed the Preview URL inside the Notes section so future readers of the local file can jump to the published gist. Use the Edit tool with the absolute path from Step 1.
283
+
284
+ Target: the closing `</ul>` of the last `<h2>...Notes</h2>` block. Insert this line directly before it:
285
+
286
+ ```html
287
+ <li><strong>Published as:</strong> <a href="<preview URL from 5a>">gist preview</a></li>
288
+ ```
289
+
290
+ If the file has no Notes section, append a fresh one before `</body>`:
291
+
292
+ ```html
293
+ <h2>⚠️ Notes</h2>
294
+ <ul>
295
+ <li><strong>Published as:</strong> <a href="<preview URL from 5a>">gist preview</a></li>
296
+ </ul>
297
+ ```
298
+
299
+ The vault HTML now contains the gist URL inline. Subsequent re-publishes will overwrite the entry only if step 5b is rerun with the new URL — the safe path is to leave the first entry as-is unless the user explicitly asks for a re-publish.
300
+
301
+ ---
302
+
303
+ ## Step 6: Finalize
222
304
 
223
- Copy a `/rename` command to the user's clipboard using `echo -n "/rename [Project] - [Primary Outcome]" | clip.exe`, then tell the user:
305
+ Copy a `/rename` command to the user's clipboard via Bash: `echo -n "/rename [Project] - [Primary Outcome]" | clip.exe`. Then tell the user:
224
306
 
225
307
  > "Copied `/rename [Project] - [Primary Outcome]` to your clipboard. Paste it to rename this session."
226
308
 
@@ -235,3 +317,23 @@ The primary outcome comes from the session title determined in Step 1.
235
317
  - If the session was exploratory with no concrete outcome, use 🔧 or 📋 sections to describe what was investigated and what's next
236
318
  - Keep it scannable: a reader should grasp the session in 15 seconds from headers alone
237
319
  - Tables are powerful -- use them whenever you have structured data (queued work, test results, file inventories)
320
+ - Skip inline styling. Doc-gist's template provides the visual rhythm; semantic HTML (h1/h2/p/ul/table) carries the structure.
321
+
322
+ ## Run-and-report checklist
323
+
324
+ Copy and check off:
325
+
326
+ - [ ] Backend detected and announced
327
+ - [ ] Session number resolved from `[N]. *.html` files
328
+ - [ ] HTML written to vault path (Write tool, fresh path)
329
+ - [ ] Vault context line appended to Notes section (Edit tool)
330
+ - [ ] Decision extraction surfaced any unrecorded items
331
+ - [ ] Session tidy reported anomalies or stayed silent
332
+ - [ ] doc-gist publish script invoked with `--input` and `--description`
333
+ - [ ] Preview URL and Gist URL quoted to the user
334
+ - [ ] Preview URL injected back into the vault HTML's Notes section
335
+ - [ ] /rename command copied to clipboard via `clip.exe`
336
+
337
+ ## Folder map
338
+
339
+ - `SKILL.md` — this hub. Single-file skill; no companions.
@@ -68,7 +68,7 @@ List project subdirectories in `sessions/` via `mcp__obsidian__list_directory`.
68
68
 
69
69
  1. **Naming convention?** Must match `[N]. [Title].md` where N is the session number and Title is a 2-5 word outcome summary. Flag bracket prefixes, date-only names, parenthetical suffixes, or legacy `Session [N].md` patterns missing a title.
70
70
  2. **Frontmatter complete?** All required fields present: `type`, `project`, `session`, `date`, `status`, `blocked`, `tags`.
71
- 3. **Type correct?** Must be `session-report`. Flag other types like `rule-audit`.
71
+ 3. **Type correct?** Must be `session-report`. Flag other types.
72
72
  4. **Status coherent?** `status: "completed"` with `blocked: true` is contradictory. `status: "in-progress"` or `status: "blocked"` on sessions older than 7 days is likely stale.
73
73
  5. **Orphaned next-steps?** Scan content for sections containing "Next", "Queued", "Session N+1", "TODO", or clipboard emoji sections. Cross-reference against subsequent sessions for the same project to determine if the items were addressed.
74
74
  6. **Categorized?** Files sitting directly in `sessions/` (not in a project subfolder) are uncategorized. Infer the project name from the filename pattern (e.g., `BudgetBridge Session 3.md` belongs in `sessions/BudgetBridge/`) or from the frontmatter `project` field. Flag for move into the correct subfolder.