@thebassclef/lite 0.1.2 → 1.0.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 (293) hide show
  1. package/dist/cli.cjs +238 -127
  2. package/dist/cli.js +240 -129
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.bassclef-source.json +10 -0
  7. package/dist/lite/.claude/settings.json +212 -0
  8. package/dist/lite/CLAUDE.md +41 -0
  9. package/dist/lite/gitignore +58 -0
  10. package/dist/lite/standards/bassclef-wiring-manifest.json +497 -0
  11. package/dist/lite/whereami.md +24 -0
  12. package/package.json +8 -2
  13. package/substrate/.bassclef/lite-manifest.json +0 -2701
  14. package/substrate/.claude/agents/architect.md +0 -70
  15. package/substrate/.claude/agents/builder.md +0 -114
  16. package/substrate/.claude/agents/designer.md +0 -156
  17. package/substrate/.claude/agents/reviewer.md +0 -88
  18. package/substrate/.claude/hooks/artifact-ingestion-gate.sh +0 -357
  19. package/substrate/.claude/hooks/assert-verify-steering.sh +0 -77
  20. package/substrate/.claude/hooks/bassclef-source-config-validate.sh +0 -215
  21. package/substrate/.claude/hooks/bassclef-sync.sh +0 -634
  22. package/substrate/.claude/hooks/compound-noun-scrub.sh +0 -292
  23. package/substrate/.claude/hooks/kiss-expansion-inject.sh +0 -69
  24. package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
  25. package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +0 -492
  26. package/substrate/.claude/hooks/plain-english-steering.sh +0 -156
  27. package/substrate/.claude/hooks/post-skill-friction-check.sh +0 -177
  28. package/substrate/.claude/hooks/post-skill-telemetry.sh +0 -62
  29. package/substrate/.claude/hooks/pre-build-gate.sh +0 -511
  30. package/substrate/.claude/hooks/pre-commit-gate.sh +0 -451
  31. package/substrate/.claude/hooks/session-end.sh +0 -433
  32. package/substrate/.claude/hooks/session-reflection.sh +0 -303
  33. package/substrate/.claude/hooks/skill-body-grade-gate.sh +0 -219
  34. package/substrate/.claude/hooks/skill-body-intent-drift.sh +0 -107
  35. package/substrate/.claude/hooks/skill-step-list-check.sh +0 -171
  36. package/substrate/.claude/hooks/state-validate.sh +0 -271
  37. package/substrate/.claude/hooks/substrate-clarity-gate.sh +0 -1110
  38. package/substrate/.claude/hooks/temperance-gate.sh +0 -147
  39. package/substrate/.claude/hooks/testing-tier-enforce.sh +0 -233
  40. package/substrate/.claude/hooks/turn-prose-grade-measure.sh +0 -219
  41. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +0 -463
  42. package/substrate/.claude/hooks/vocabulary-migration-check.sh +0 -171
  43. package/substrate/.claude/hooks/whereami-utc-gate.sh +0 -142
  44. package/substrate/.claude/luminaries/alan-cooper.md +0 -170
  45. package/substrate/.claude/luminaries/alistair-cockburn.md +0 -140
  46. package/substrate/.claude/luminaries/amazon-pr-faq.md +0 -34
  47. package/substrate/.claude/luminaries/ash-maurya.md +0 -121
  48. package/substrate/.claude/luminaries/bill-buxton.md +0 -210
  49. package/substrate/.claude/luminaries/charles-sanders-peirce.md +0 -150
  50. package/substrate/.claude/luminaries/david-ogilvy.md +0 -192
  51. package/substrate/.claude/luminaries/don-norman.md +0 -173
  52. package/substrate/.claude/luminaries/edward-tufte.md +0 -179
  53. package/substrate/.claude/luminaries/eric-evans.md +0 -160
  54. package/substrate/.claude/luminaries/frederick-brooks.md +0 -50
  55. package/substrate/.claude/luminaries/gang-of-four.md +0 -157
  56. package/substrate/.claude/luminaries/glenford-myers.md +0 -230
  57. package/substrate/.claude/luminaries/hunt-thomas.md +0 -115
  58. package/substrate/.claude/luminaries/hyrum-wright.md +0 -94
  59. package/substrate/.claude/luminaries/jason-fried-dhh.md +0 -46
  60. package/substrate/.claude/luminaries/jesse-james-garrett.md +0 -154
  61. package/substrate/.claude/luminaries/john-ousterhout.md +0 -94
  62. package/substrate/.claude/luminaries/karl-popper.md +0 -132
  63. package/substrate/.claude/luminaries/kent-beck.md +0 -168
  64. package/substrate/.claude/luminaries/linus-torvalds.md +0 -218
  65. package/substrate/.claude/luminaries/martin-fowler.md +0 -164
  66. package/substrate/.claude/luminaries/michael-feathers.md +0 -125
  67. package/substrate/.claude/luminaries/michael-nygard.md +0 -118
  68. package/substrate/.claude/luminaries/robert-c-martin.md +0 -164
  69. package/substrate/.claude/luminaries/saltzer-schroeder.md +0 -194
  70. package/substrate/.claude/luminaries/sophia-prater.md +0 -193
  71. package/substrate/.claude/luminaries/stephen-toulmin.md +0 -131
  72. package/substrate/.claude/luminaries/tony-hoare.md +0 -170
  73. package/substrate/.claude/luminaries/vaughn-vernon.md +0 -50
  74. package/substrate/.claude/luminaries/w-edwards-deming.md +0 -158
  75. package/substrate/.claude/rules/accessor-library-discipline.md +0 -138
  76. package/substrate/.claude/rules/adr-discipline.md +0 -120
  77. package/substrate/.claude/rules/api-conventions.md +0 -125
  78. package/substrate/.claude/rules/artifact-ingestion.md +0 -179
  79. package/substrate/.claude/rules/assert-only-after-verify.md +0 -137
  80. package/substrate/.claude/rules/blocked-items.md +0 -146
  81. package/substrate/.claude/rules/bootstrap-pair-discipline.md +0 -141
  82. package/substrate/.claude/rules/branching.md +0 -28
  83. package/substrate/.claude/rules/cold-adopter-harness-discipline.md +0 -129
  84. package/substrate/.claude/rules/commit-conventions.md +0 -22
  85. package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +0 -188
  86. package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +0 -188
  87. package/substrate/.claude/rules/context-engineering.md +0 -202
  88. package/substrate/.claude/rules/context-management.md +0 -85
  89. package/substrate/.claude/rules/defensive-bash.md +0 -68
  90. package/substrate/.claude/rules/deferred-actions.md +0 -233
  91. package/substrate/.claude/rules/destructive-operations.md +0 -69
  92. package/substrate/.claude/rules/diagnosis.md +0 -38
  93. package/substrate/.claude/rules/github-issue-flash-tweet.md +0 -156
  94. package/substrate/.claude/rules/guardrails.md +0 -73
  95. package/substrate/.claude/rules/hook-wire-on-author.md +0 -103
  96. package/substrate/.claude/rules/identifier-leak-prevention.md +0 -104
  97. package/substrate/.claude/rules/iteration-bet-brief-completeness.md +0 -54
  98. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +0 -98
  99. package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +0 -89
  100. package/substrate/.claude/rules/loop-discipline.md +0 -81
  101. package/substrate/.claude/rules/manual-prod-approval.md +0 -100
  102. package/substrate/.claude/rules/marker-enrichment-discipline.md +0 -99
  103. package/substrate/.claude/rules/mobile-ephemeral-session.md +0 -109
  104. package/substrate/.claude/rules/new-dependency-check.md +0 -51
  105. package/substrate/.claude/rules/oo-ad-entry-point.md +0 -117
  106. package/substrate/.claude/rules/operator-facing-prose.md +0 -196
  107. package/substrate/.claude/rules/option-label-discipline.md +0 -108
  108. package/substrate/.claude/rules/pattern-annotation.md +0 -100
  109. package/substrate/.claude/rules/plain-english-discipline.md +0 -156
  110. package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +0 -211
  111. package/substrate/.claude/rules/pr-body-shape.md +0 -317
  112. package/substrate/.claude/rules/pr-strategy.md +0 -167
  113. package/substrate/.claude/rules/pr-title-shape.md +0 -161
  114. package/substrate/.claude/rules/prototype-workflow.md +0 -65
  115. package/substrate/.claude/rules/reserved-skill-names.md +0 -123
  116. package/substrate/.claude/rules/schema-management.md +0 -49
  117. package/substrate/.claude/rules/sdlc-gates.md +0 -149
  118. package/substrate/.claude/rules/security.md +0 -37
  119. package/substrate/.claude/rules/session-artifacts.md +0 -236
  120. package/substrate/.claude/rules/skill-composition-declarations.md +0 -124
  121. package/substrate/.claude/rules/skill-description-clarity.md +0 -247
  122. package/substrate/.claude/rules/skill-procedure-step-list.md +0 -137
  123. package/substrate/.claude/rules/state-schema-validation.md +0 -162
  124. package/substrate/.claude/rules/stuck-signal-diagnostic.md +0 -140
  125. package/substrate/.claude/rules/substrate-config-schema.md +0 -98
  126. package/substrate/.claude/rules/test-list-discipline.md +0 -175
  127. package/substrate/.claude/rules/test-sufficiency.md +0 -210
  128. package/substrate/.claude/rules/testing-tier-config.md +0 -145
  129. package/substrate/.claude/rules/testing.md +0 -38
  130. package/substrate/.claude/rules/turn-estimate-grounding.md +0 -134
  131. package/substrate/.claude/rules/visual-hierarchy.md +0 -437
  132. package/substrate/.claude/rules/we-dont-break-adopters.md +0 -126
  133. package/substrate/.claude/rules/whereami-load-bearing.md +0 -202
  134. package/substrate/.claude/rules/writing-craft-discipline.md +0 -92
  135. package/substrate/.claude/rules/wu-sequencing-compounds.md +0 -145
  136. package/substrate/.claude/skills/build/SKILL.md +0 -640
  137. package/substrate/.claude/skills/chronicle/SKILL.md +0 -55
  138. package/substrate/.claude/skills/clean-artifacts/SKILL.md +0 -249
  139. package/substrate/.claude/skills/decompose/SKILL.md +0 -280
  140. package/substrate/.claude/skills/diagnose/SKILL.md +0 -297
  141. package/substrate/.claude/skills/feynman/SKILL.md +0 -90
  142. package/substrate/.claude/skills/howdoi/SKILL.md +0 -105
  143. package/substrate/.claude/skills/ia-model/SKILL.md +0 -108
  144. package/substrate/.claude/skills/interaction-design/SKILL.md +0 -112
  145. package/substrate/.claude/skills/interpret-input/SKILL.md +0 -180
  146. package/substrate/.claude/skills/journal/SKILL.md +0 -209
  147. package/substrate/.claude/skills/kiss/SKILL.md +0 -449
  148. package/substrate/.claude/skills/launch/SKILL.md +0 -915
  149. package/substrate/.claude/skills/lean-canvas/SKILL.md +0 -332
  150. package/substrate/.claude/skills/longrun/SKILL.md +0 -463
  151. package/substrate/.claude/skills/luminary/SKILL.md +0 -481
  152. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +0 -177
  153. package/substrate/.claude/skills/onboard-repo/SKILL.md +0 -1624
  154. package/substrate/.claude/skills/pattern-review/SKILL.md +0 -99
  155. package/substrate/.claude/skills/personas/SKILL.md +0 -207
  156. package/substrate/.claude/skills/promote/SKILL.md +0 -283
  157. package/substrate/.claude/skills/requirement/SKILL.md +0 -98
  158. package/substrate/.claude/skills/retro/SKILL.md +0 -117
  159. package/substrate/.claude/skills/riff/SKILL.md +0 -114
  160. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +0 -163
  161. package/substrate/.claude/skills/session-end/SKILL.md +0 -309
  162. package/substrate/.claude/skills/session-log/SKILL.md +0 -299
  163. package/substrate/.claude/skills/skills/SKILL.md +0 -228
  164. package/substrate/.claude/skills/spec/SKILL.md +0 -105
  165. package/substrate/.claude/skills/sprint/SKILL.md +0 -392
  166. package/substrate/.claude/skills/stage/SKILL.md +0 -384
  167. package/substrate/.claude/skills/state-a-problem/SKILL.md +0 -185
  168. package/substrate/.claude/skills/temperance/SKILL.md +0 -108
  169. package/substrate/.claude/skills/use-case/SKILL.md +0 -417
  170. package/substrate/.claude/skills/user-stories/SKILL.md +0 -268
  171. package/substrate/.claude/skills/value-prop/SKILL.md +0 -251
  172. package/substrate/.claude/skills/verify/SKILL.md +0 -160
  173. package/substrate/.claude/skills/visual-review/SKILL.md +0 -503
  174. package/substrate/.claude/skills/whats-the-plan/SKILL.md +0 -202
  175. package/substrate/.claude/skills/whereami/SKILL.md +0 -307
  176. package/substrate/AGENTS.md +0 -79
  177. package/substrate/CLAUDE-lite.md +0 -85
  178. package/substrate/CODE_OF_CONDUCT.md +0 -28
  179. package/substrate/CONTRIBUTING.md +0 -177
  180. package/substrate/README.md +0 -173
  181. package/substrate/SECURITY.md +0 -19
  182. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +0 -79
  183. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +0 -139
  184. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +0 -192
  185. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +0 -145
  186. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +0 -155
  187. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +0 -162
  188. package/substrate/lib/clean-artifacts-sweep.sh +0 -112
  189. package/substrate/lib/code-comment-discipline.sh +0 -144
  190. package/substrate/lib/composer-preflight.sh +0 -459
  191. package/substrate/lib/hook-inject.sh +0 -255
  192. package/substrate/lib/luminary-pick.sh +0 -96
  193. package/substrate/lib/output-discipline.sh +0 -143
  194. package/substrate/lib/prose-scan-boundary.sh +0 -171
  195. package/substrate/lib/rewrite-check.sh +0 -214
  196. package/substrate/lib/state.sh +0 -1372
  197. package/substrate/lib/telemetry.sh +0 -205
  198. package/substrate/lib/tier-check.sh +0 -187
  199. package/substrate/lib/tier-dependency-audit.sh +0 -1088
  200. package/substrate/presence/install/bassclef-hook-connect.sh +0 -178
  201. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +0 -841
  202. package/substrate/presence/install/bassclef-sync.template.sh +0 -2076
  203. package/substrate/presence/install/schedule-auto-save.cron.sh +0 -88
  204. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +0 -122
  205. package/substrate/scripts/aggregate-telemetry.sh +0 -217
  206. package/substrate/scripts/analyze-tier-dependencies.sh +0 -239
  207. package/substrate/scripts/generate-lite-manifest.sh +0 -505
  208. package/substrate/scripts/generate-tier-manifest.sh +0 -28
  209. package/substrate/scripts/intent-drift-check.sh +0 -456
  210. package/substrate/scripts/lite-manifest-drift-check.sh +0 -146
  211. package/substrate/scripts/render-lite-manifest-doc.sh +0 -150
  212. package/substrate/standards/adr-template.md +0 -86
  213. package/substrate/standards/api-conventions/nextjs.md +0 -84
  214. package/substrate/standards/artifact-composition.md +0 -209
  215. package/substrate/standards/bash-hook-safety.md +0 -246
  216. package/substrate/standards/bassclef-configs-schema.md +0 -232
  217. package/substrate/standards/bassclef-evolution.md +0 -143
  218. package/substrate/standards/bassclef-internal-jargon.md +0 -244
  219. package/substrate/standards/bassclef-managed-sentinel.md +0 -96
  220. package/substrate/standards/bassclef-source-config.md +0 -228
  221. package/substrate/standards/branch-stacking.md +0 -408
  222. package/substrate/standards/code-safety-principles.md +0 -176
  223. package/substrate/standards/composer-prerequisites.md +0 -155
  224. package/substrate/standards/deferred-actions-schema.md +0 -204
  225. package/substrate/standards/dependency-discipline/cargo.md +0 -39
  226. package/substrate/standards/dependency-discipline/gem.md +0 -43
  227. package/substrate/standards/dependency-discipline/go-mod.md +0 -41
  228. package/substrate/standards/dependency-discipline/npm.md +0 -42
  229. package/substrate/standards/dependency-discipline/pip.md +0 -42
  230. package/substrate/standards/deployment-topology/ec2-tailscale.md +0 -225
  231. package/substrate/standards/deployment-topology.md +0 -69
  232. package/substrate/standards/docs-sync-allowlist.md +0 -76
  233. package/substrate/standards/domain-and-dns.md +0 -145
  234. package/substrate/standards/frontend-stack.md +0 -67
  235. package/substrate/standards/frontmatter-schema.md +0 -154
  236. package/substrate/standards/graceful-exit.md +0 -227
  237. package/substrate/standards/hook-idempotency.md +0 -102
  238. package/substrate/standards/hook-injection-discipline.md +0 -202
  239. package/substrate/standards/hook-install-class.md +0 -215
  240. package/substrate/standards/input-handler-interface.md +0 -152
  241. package/substrate/standards/lite-manifest-schema-changes.md +0 -135
  242. package/substrate/standards/luminary-matching.md +0 -105
  243. package/substrate/standards/luminary-problem-patterns.md +0 -481
  244. package/substrate/standards/migration-discipline/active-record.md +0 -50
  245. package/substrate/standards/migration-discipline/alembic.md +0 -43
  246. package/substrate/standards/migration-discipline/gorm.md +0 -50
  247. package/substrate/standards/migration-discipline/prisma.md +0 -53
  248. package/substrate/standards/migration-discipline/sqlalchemy.md +0 -51
  249. package/substrate/standards/mobile-ephemeral-session.md +0 -167
  250. package/substrate/standards/model-routing-discipline.md +0 -160
  251. package/substrate/standards/ogilvy-writing-rules.md +0 -225
  252. package/substrate/standards/opener-discipline.md +0 -96
  253. package/substrate/standards/operator-facing-prose-discipline.md +0 -201
  254. package/substrate/standards/persona-schema.md +0 -229
  255. package/substrate/standards/pluggable-luminaries.md +0 -323
  256. package/substrate/standards/pr-body-discipline.md +0 -115
  257. package/substrate/standards/preview-state-schema.md +0 -189
  258. package/substrate/standards/project-directory-layout.md +0 -276
  259. package/substrate/standards/release-tagging.md +0 -137
  260. package/substrate/standards/reserved-skill-names.md +0 -120
  261. package/substrate/standards/scannable-multi-option-output.md +0 -261
  262. package/substrate/standards/sdlc-compliance.md +0 -286
  263. package/substrate/standards/sdlc-gates/typescript.md +0 -57
  264. package/substrate/standards/secrets-lifecycle.md +0 -210
  265. package/substrate/standards/security-scanner-adapter.md +0 -145
  266. package/substrate/standards/session-board.md +0 -256
  267. package/substrate/standards/skill-output-discipline.md +0 -90
  268. package/substrate/standards/state-spine-contract.md +0 -255
  269. package/substrate/standards/state-spine.md +0 -511
  270. package/substrate/standards/steering-hints/kiss-words.md +0 -11
  271. package/substrate/standards/substrate-config-schema.md +0 -267
  272. package/substrate/standards/tech-stack-config.md +0 -109
  273. package/substrate/standards/tier-dependency-analysis.md +0 -167
  274. package/substrate/standards/tier-runtime-deps/lite.md +0 -57
  275. package/substrate/standards/tier-tag-schema.md +0 -155
  276. package/substrate/standards/two-layer-config.md +0 -99
  277. package/substrate/standards/use-case-format.md +0 -292
  278. package/substrate/standards/user-story-invest.md +0 -268
  279. package/substrate/standards/velocity-and-appetite.md +0 -229
  280. package/substrate/standards/voice-input-pattern.md +0 -119
  281. package/substrate/standards/whereami-schema.md +0 -301
  282. package/substrate/standards/worktree-management.md +0 -211
  283. package/substrate/standards/writing-guide.md +0 -213
  284. package/substrate/templates/chronicle-template.md +0 -75
  285. package/substrate/templates/deferred-action-template.md +0 -45
  286. package/substrate/templates/memory-proposal-template.md +0 -77
  287. package/substrate/templates/persona-template.md +0 -200
  288. package/substrate/templates/pr-faq.md +0 -45
  289. package/substrate/templates/secret-rotation-template.md +0 -162
  290. package/substrate/templates/spec-template.md +0 -131
  291. package/substrate/templates/use-case-template.md +0 -194
  292. package/substrate/templates/user-story-template.md +0 -107
  293. package/substrate/templates/whereami-template.md +0 -101
@@ -1,309 +0,0 @@
1
- ---
2
- name: session-end
3
- description: "Close the session cleanly. Writes the session log, pushes artifacts, updates whereami. Run when the Stop hook fails or when you want to end deliberately. Three tiers of obligation: MUST, SHOULD, MAY."
4
- problem: "Sessions end without writing state. Next session starts cold. Session logs missing."
5
- value: "Three tiers of close. Must-tier always runs local. Should-tier pushes if network is up."
6
- inputs: [Optional — run explicitly or fires from Stop hook]
7
- outputs: [Session log entry, Whereami updated, Push and tag when scoped, Journal draft when notable]
8
- tier: lite
9
- user_invocable: true
10
- disable_model_invocation: false
11
- modes: [default]
12
- composes_with: [chronicle, whereami, kiss, journal, retro, clean-artifacts, promote, roadmap-reconcile]
13
- ---
14
-
15
- # /session-end
16
-
17
- ## What you get
18
-
19
- A clean session close with three tiers of obligation.
20
-
21
- `/session-end` saves state. It writes the session log. It updates whereami. It reconciles the roadmap. It pushes artifacts.
22
-
23
- The MUST tier always runs. No network needed. Your session log lands even when the session is dying. SHOULD and MAY tiers depend on network. They fail gracefully.
24
-
25
- The Stop hook calls `/session-end` on its own. You also run it directly when the hook fails or when you want to end deliberately.
26
-
27
- ## When to use it
28
-
29
- - The Stop hook failed or timed out.
30
- - You are ending a session by hand before Stop fires.
31
- - You want artifacts written before a long pause.
32
- - You are in a cloud or mobile session where hooks may not fire.
33
-
34
- The MUST tier is the safety net. Even when session context is exhausted, `/session-end` writes the session log locally before it stops.
35
-
36
- ## When NOT to use
37
-
38
- Do not run `/session-end` mid-session. It writes closing artifacts. Do not use it for the retrospective. That is `/retro`. Do not use it to reconcile the roadmap alone. That is `/roadmap-reconcile`. Do not use it for adopter-facing entries. That is `/journal`.
39
-
40
- ## Tier gate (bassclef#740 Task 1.3; amended 2026-08-25)
41
-
42
- Steps 5, 11, 12 below dispatch skills at `tier: standard`. Step 15 now sources `lib/clean-artifacts-sweep.sh` inline for every tier — the lib is `tier: lite` and ships to every adopter. Resolve the adopter tier through `lib/tier-check.sh`:
43
-
44
- ```bash
45
- source lib/tier-check.sh
46
- tier=$(resolve_adopter_tier)
47
- ```
48
-
49
- Lite adopters skip Steps 5, 11, 12. Print "requires bassclef standard. Skipping." Continue. Steps to skip — `/roadmap-reconcile` (Step 5; lives at standard tier; lite adopters carry no `strategy/canvases/` or `docs/roadmaps/`), `/journal` (Step 11; standard tier), `/visual-review` + `/synthetic-user` (Step 12; standard tier). Step 15 runs for every tier via the shared lib. Standalone `/clean-artifacts` skill stays live for standard adopters. Per canvas Q6 Option E.
50
-
51
- ## FAQ
52
-
53
- ### What are the three tiers?
54
-
55
- - **MUST** — local. No network. Always possible. Save state. Capture timing. Write session log. Update whereami. Reconcile roadmap. Update memory. Remove session lock. Sweep for skipped obligations. When the session can execute any code at all, these should work.
56
- - **SHOULD** — network needed. May fail. Auto-tag on goal close. Git push. Journal draft plus corpus push. Readiness sweep for UI changes. Fail gracefully. Do not kill the MUST tier.
57
- - **MAY** — conditional. Environment-dependent. Danger-mode summary. Release notes. Clean workflow exhaust. Skip without guilt when the environment does not support them.
58
-
59
- ### What does the MUST tier do, in order?
60
-
61
- 1. **Explicit save-state.** Run `bash .claude/hooks/save-state.sh`. It commits uncommitted changes. It pushes. It writes `.claude/LAST_SAVE` with timestamp and machine. It removes `.claude/SESSION_LOCK`. The next session-start hook reads `.claude/LAST_SAVE` to surface open threads as BLOCKED badges. When save-state is missing, fall back to `git commit -m "chore: session-end checkpoint" && git push && rm -f .claude/SESSION_LOCK`. Surface the missing-hook gap.
62
- 2. **Capture session timing.** The session-end hook computes started_at, ended_at, and duration_minutes. Use those exact values. Do not estimate. When the hook output is missing, fall back to reading `/tmp/claude-session-timing-*` for started_at. Use `date +"%Y-%m-%dT%H:%M:%S%z"` for ended_at.
63
- 3. **Session log entry.** Start from `templates/chronicle-template.md`. Fill in frontmatter. Fill in body sections — Entry State, Work Done, Decisions, Open Threads, Key Files Changed. Populate the Gate Evidence table using the bash snippet in the template. The pre-commit hook BLOCKS commits missing this section per bassclef#298. Write to `chronicle/` (bassclef) or `docs/chronicle/` (app repos) per the project-directory-layout standard.
64
- 4. **Update `docs/whereami.md`.** Set `last_updated` to current UTC ISO-8601 timestamp. Set `session` to the session log filename just written. Draft an `operator_recap` in three sentences max at grade 10 plain English. Update any field that changed.
65
- 5. **Roadmap reconcile.** Fire `/roadmap-reconcile --apply`. The skill is idempotent. It runs `--dry-run` first internally. When the diff is empty, skip the write. When the diff is non-empty, apply edits to bring roadmap in line with whereami plus session log plus merged PRs. This closes the drift class named at bassclef#776. Failure surfaces a one-line note in the session log's open-threads section and continues.
66
- 6. **Memory update.** Save anything learned this session that future sessions need — preferences discovered, project context that changed, feedback received.
67
- 7. **Remove session lock.** `rm -f .claude/SESSION_LOCK`. Usually handled by save-state.sh.
68
- 8. **Sweep for skipped obligations.** For every MUST or SHOULD step skipped without explicit deferral, write a deferred-action entry so the next session picks it up. Silence is not deferral per `.claude/rules/session-artifacts.md`.
69
- 8a. **Move resolved rescue entries.** When steps 1-7 all pass, move every rescue file under `docs/deferred-actions/*-session-rescue.md` to the `completed/` subdir. The `session-end.sh` hook does this on the same Stop event via `lib/session-rescue.sh`. This step names the discipline in the skill body. Idempotent. See goal 2026-07-31e and `.claude/rules/bootstrap-pair-discipline.md`.
70
-
71
- ### What does the SHOULD tier do?
72
-
73
- 9. **Auto-tag on goal close.** When a goal closed this session, bump the patch version tag (e.g., v0.6.0 → v0.7.0). Minor bump when scope was large (5+ issues). Major is manual only. `git tag -a vX.Y.Z -m "[goal name]"` and `git push --tags`. Skip when no goal closed.
74
- 10. **Git push.** `git push || echo "WARNING: push failed — run manually"`.
75
- 11. **Journal draft plus corpus push.** Ask — "Did this session produce a notable decision, trade-off, or insight worth sharing?" When yes, check for gaps. Backfill first when needed. Write to the journal draft path. Push to the journal Google Doc and to the brand-team corpus doc.
76
- 12. **Readiness sweep.** When the session made commits modifying UI surfaces, run `/visual-review` on each changed surface. Both viewports — desktop and mobile. Also run `/synthetic-user` Tier 3 on the primary user journey. Findings roll into the session log's Open Threads section.
77
-
78
- ### What does the MAY tier do?
79
-
80
- 13. **Danger-mode summary.** When the session used auto-complete, write to `docs/danger-mode-summaries/YYYY-MM-DD.md`. What was done on its own. What decisions were made without human confirmation. Any risks introduced.
81
- 14. **Release notes.** When user-visible changes deployed, write to `docs/release-notes/YYYY-MM-DD.md`. Plain language for the least technical stakeholder.
82
- 15. **Clean workflow exhaust.** Source `lib/clean-artifacts-sweep.sh`. Call `clean_artifacts_sweep --delete`. The lib sweeps three classes. Stale verify markers. Old Playwright screenshots. Expired SDLC traces. The safety list holds four exclusions. Current branch marker. Current session timing. Files under `.claude/` (CHECKPOINT + SESSION_LOCK + LAST_SAVE). Any git-tracked file. Every tier runs this step now. Lite gains cleanup that used to skip. Standalone `/clean-artifacts` skill stays live for standard adopters.
83
-
84
- ### What is the checkpoint integration?
85
-
86
- When `.claude/CHECKPOINT.md` exists at session end:
87
-
88
- 1. Read it. Understand what was in progress. Understand what exit condition fired.
89
- 2. Include the checkpoint state in the session log entry. What was done. What was left.
90
- 3. After the session log lands and commits, delete the checkpoint. `rm .claude/CHECKPOINT.md`. The session log is now the permanent record.
91
- 4. When the checkpoint shows uncommitted in-progress work, surface it. "Uncommitted work found — [description]. Review before next session."
92
-
93
- See `standards/graceful-exit.md` for the checkpoint format and recovery protocol.
94
-
95
- ### What are the timeout budgets?
96
-
97
- - Minimum Stop hook timeout — **30 seconds** per `standards/hook-idempotency.md`.
98
- - MUST tier target — complete in under 10 seconds.
99
- - SHOULD tier target — complete in under 15 seconds.
100
- - MAY tier target — best-effort in remaining time.
101
-
102
- When the total exceeds 30 seconds, the MUST tier is already done. Timeout only loses SHOULD and MAY artifacts. Those recover next session.
103
-
104
- ## Details below the fold
105
-
106
- ### Execution order
107
-
108
- ```
109
- MUST tier (always runs, no network needed):
110
- 1. Explicit save-state (bash .claude/hooks/save-state.sh)
111
- 2. Capture session timing (started_at, ended_at, duration, turns, closes)
112
- 3. Session log entry (with timing frontmatter + gate evidence table)
113
- 4. Update docs/whereami.md (last_updated + session + operator_recap + changed fields)
114
- 5. Roadmap reconcile (/roadmap-reconcile --apply, idempotent)
115
- 6. Memory update
116
- 7. Remove session lock (handled by save-state.sh)
117
- 8. Sweep for skipped obligations
118
- ── if any MUST step fails: log error, continue to next MUST step ──
119
-
120
- SHOULD tier (network needed, graceful failure):
121
- 9. Auto-tag on goal close (bump patch, push tag)
122
- 10. Git push (handled by save-state.sh; retry if needed)
123
- 11. Journal draft + corpus push (if notable)
124
- 12. Readiness sweep — /visual-review + /synthetic-user Tier 3 (if UI touched)
125
- ── if any SHOULD step fails: warn, continue ──
126
-
127
- MAY tier (conditional):
128
- 13. Danger-mode summary (if applicable)
129
- 14. Release notes (if deployed)
130
- 15. Clean workflow exhaust (source lib/clean-artifacts-sweep.sh; runs for every tier)
131
- ── if any MAY step fails: skip silently ──
132
- ```
133
-
134
- ### Hook integration
135
-
136
- The Stop hook calls this skill as its primary action:
137
-
138
- ```bash
139
- #!/bin/bash
140
- # .claude/hooks/session-end.sh
141
- # Minimum timeout: 30 seconds per standards/hook-idempotency.md
142
-
143
- # Phase 1: Local artifacts (MUST tier — always runs)
144
- # If the skill fails to load, at minimum do:
145
- # git add -A && git commit -m "chore: auto-save" || true
146
- # rm -f .claude/SESSION_LOCK
147
-
148
- # Phase 2: The skill handles SHOULD and MAY tiers
149
- # These can timeout without losing MUST tier artifacts
150
- ```
151
-
152
- When the Stop hook times out before completing, the MUST tier artifacts (commit, session log, lock cleanup) should already be written. They execute first. They have no network dependency.
153
-
154
- ### Self-check step — before writing the session log
155
-
156
- Before writing the session log body, I:
157
-
158
- 1. Touch `state/markers/turn-prose-surface/longrun_closeout.marker` when this closes a `/longrun` session.
159
- 2. Read the draft `operator_recap` against `standards/bassclef-internal-jargon.md` BLOCK terms.
160
- 3. Rewrite any BLOCK matches in plain English.
161
- 4. Write the session log entry.
162
-
163
- The Stop hook `.claude/hooks/turn-prose-kiss-check.sh` catches misses.
164
-
165
- ### Rules
166
-
167
- - MUST tier steps never depend on network.
168
- - MUST tier steps never depend on external services (Google Docs and similar).
169
- - Each tier runs on its own. A failure in SHOULD does not skip MAY.
170
- - Log all failures visibly. Do not swallow errors with `2>/dev/null || true`.
171
- - When invoked by hand, report what was completed and what was skipped.
172
- - The Gate Evidence table in the session log is required, not optional per bassclef#298.
173
-
174
- ### Common failure modes and recovery
175
-
176
- - **Hook timeout.** MUST tier already ran. SHOULD and MAY artifacts recover on the next session's start-of-session sweep.
177
- - **Push failed.** MUST tier stored artifacts locally. Next session's save-state retries. `.claude/LAST_SAVE` timestamp signals to the next session that the push is owed.
178
- - **Session log missing gate evidence.** Pre-commit hook BLOCKS the commit per bassclef#298. Auto-populate via the bash snippet in `templates/chronicle-template.md`.
179
- - **Journal push failed.** SHOULD tier logs the failure. Draft persists for a manual push next session.
180
- - **Roadmap reconcile errored.** Note in the session log's open-threads section and continue. Do not block session close on infrastructure failure.
181
-
182
- ### What /session-end does NOT do
183
-
184
- - `/session-end` never dispatches new work. It closes what happened.
185
- - `/session-end` never modifies git history. It appends artifacts.
186
- - `/session-end` never runs long-form tasks in the MUST tier. Network work belongs in SHOULD or MAY.
187
- - `/session-end` never skips the Gate Evidence table. Silence is not deferral.
188
- - `/session-end` never fabricates timing. Missing hook output falls back to explicit sources. Estimates are marked as such.
189
-
190
- ### When /session-end is different from /longrun closeout
191
-
192
- `/longrun closeout` composes `/session-end`. The `/longrun` mode adds a retrospective. It adds a `/promote` audit. It adds insight extraction on top of what `/session-end` does. When you ran a long session, invoke `/longrun closeout`. When you ran a short session, invoke `/session-end` directly. Both write the session log. Both update whereami.
193
-
194
- ### Grace window on old vocabulary
195
-
196
- Old vocabulary — `bet`, `appetite`, `step`, `chronicle` — still works through 2026-10-31 per ADR-031 and the we-dont-break-adopters rule. Existing skill names like `/chronicle` still resolve alongside new names like `/session-log` during the same window. Templates and hooks accept both terms.
197
-
198
- ## Examples
199
-
200
- <!-- FKGL-EXEMPT: sample close output -->
201
-
202
- **MUST tier output (local-only, always runs):**
203
-
204
- ```
205
- === /session-end MUST ===
206
- - Session log written: chronicle/2026-07-19k-shape-e-foundation.md
207
- - Whereami updated: docs/whereami.md
208
- - Deferred actions swept: 0 pending
209
- - Local commit: 6d0ee38e
210
- ```
211
-
212
- **SHOULD tier (network; graceful failure):**
213
-
214
- ```
215
- === /session-end SHOULD ===
216
- - git push origin feature/2026-07-19k-*: OK
217
- - Journal draft pushed to Google Doc: OK
218
- - Wiki refresh: skipped (no material surface change)
219
- ```
220
-
221
- <!-- /FKGL-EXEMPT -->
222
-
223
- ## Anti-patterns and INSTEAD
224
-
225
- | Anti-pattern | INSTEAD |
226
- |---|---|
227
- | Run `/session-end` mid-session | Wait for the natural close; timing needs both start + end |
228
- | Skip the MUST tier because network is down | The MUST tier is local-only; it runs regardless |
229
- | Skip the Gate Evidence table in the log | Copy the template + fill counts from marker files |
230
- | Silence a MUST tier failure and end anyway | Fix the failure or write a deferred action |
231
- | Fold retrospective + journal into the log | `/retro` and `/journal` are separate artifacts |
232
-
233
- ## Composes with
234
-
235
- - `/session-log` — writes the session log at MUST tier.
236
- - `/whereami` — read as input; updated as MUST tier output.
237
- - `/retro` — reflection at close.
238
- - `/journal` — writes for external readers at SHOULD tier.
239
- - `/kiss` — applied to prose before write.
240
- - `/promote` — audit backstop for missed patterns.
241
- - `/roadmap-reconcile` — reconciles drift at SHOULD tier.
242
-
243
- ## Distinct from
244
-
245
- - `/longrun closeout` — runs the whole autonomous session close. `/session-end` writes artifacts.
246
- - `/retro` — reflects on what worked. `/session-end` writes state artifacts.
247
- - `/journal` — writes for external readers. `/session-end` writes the operator record.
248
- - `/clean-artifacts` — sweeps workflow exhaust. `/session-end` writes fresh artifacts.
249
-
250
- ## Rules
251
-
252
- - Do not run `/session-end` mid-session. INSTEAD, wait for the natural close.
253
- - Do not skip the MUST tier. INSTEAD, write local artifacts even when network is down.
254
- - Do not fold retrospective into the session log. INSTEAD, run `/retro` separately.
255
- - Always write the session log before pushing to remote.
256
- - Always update whereami as part of MUST tier output.
257
-
258
- ## Test cases
259
-
260
- <!-- FKGL-EXEMPT: structured test spec -->
261
- | ID | Prompt | Expected behavior |
262
- |---|---|---|
263
- | T1 | `/session-end` at natural session close | MUST tier writes log + whereami; SHOULD tier pushes if network up |
264
- | T2 | `/session-end` with no network | MUST tier lands; SHOULD tier gracefully degrades |
265
- | T3 | Stop hook fails; agent invokes `/session-end` | Same artifacts write as if Stop hook fired |
266
- | T4 | `/session-end` when session-log already exists for today | New file gets letter suffix |
267
- | T5 | `/session-end` when deferred actions surface | Sweep into `docs/deferred-actions/` and cite in log |
268
- <!-- /FKGL-EXEMPT -->
269
-
270
- ## Sources read
271
-
272
- <!-- FKGL-EXEMPT: reference list -->
273
- - ADR-040 planning-skill vocabulary and lite profile
274
- - `.claude/rules/plain-english-discipline.md`
275
- - `.claude/rules/we-dont-break-adopters.md`
276
- - `.claude/rules/whereami-load-bearing.md`
277
- - `.claude/rules/session-artifacts.md`
278
- - `standards/sdlc-compliance.md` — Gate Evidence discipline (bassclef#298)
279
- - `standards/project-directory-layout.md`
280
- - `standards/graceful-exit.md`
281
- - `standards/hook-idempotency.md`
282
- - `templates/chronicle-template.md`
283
- - `templates/deferred-action-template.md`
284
- - `.claude/skills/roadmap-reconcile/SKILL.md`
285
- - `.claude/skills/chronicle/SKILL.md`
286
- - `standards/bassclef-internal-jargon.md`
287
- - bassclef-upstream#298 — Gate Evidence table required
288
- - bassclef-upstream#599 — explicit save-state
289
- - bassclef-upstream#776 — roadmap-reconcile drift class
290
- - bassclef-upstream#143 — whereami-load-bearing update discipline
291
- - bassclef-upstream#226 WS-3 — sweep skipped obligations into deferred actions
292
- - bassclef-upstream#574 — readiness sweep for UI touches
293
- - bassclef-upstream#907 — /kiss wordlist source of truth
294
- - `.claude/skills/journal/SKILL.md` — journal draft plus corpus push
295
- - `.claude/skills/clean-artifacts/SKILL.md` — sweep workflow exhaust
296
- - `.claude/skills/visual-review/SKILL.md` — UI surface review
297
- - `.claude/skills/synthetic-user/SKILL.md` — persona-aware journeys
298
- - `.claude/skills/retro/SKILL.md` — retrospective composition
299
- - `.claude/skills/promote/SKILL.md` — audit backstop
300
- - `.claude/skills/longrun/SKILL.md` — closeout composes /session-end
301
- <!-- /FKGL-EXEMPT -->
302
-
303
- ## Why this skill exists
304
-
305
- Sessions that end without clean artifacts leak state. The next session starts cold. Session logs go missing. Whereami goes stale. Journal drafts pile up unpushed. The MUST tier of `/session-end` writes local artifacts even when the network is down or context is exhausted. The SHOULD tier pushes when network is available. Without `/session-end`, the operator faces an archaeology task at every next session start.
306
-
307
- ## Output discipline
308
-
309
- Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
@@ -1,299 +0,0 @@
1
- ---
2
- name: session-log
3
- description: "Write the session's log entry \u2014 what shipped, what was decided, what's still open. Reads the day's commits and conversation. Outputs a markdown entry with gates fired, sources read, and discoveries surfaced. Renamed from /chronicle."
4
- problem: "Session logs get lost between mid-session interrupts and Stop hook races. Next session has no memory."
5
- value: "One log entry that names what shipped and what was decided and what's still open."
6
- inputs: [Optional Gate Evidence auto-populate flag]
7
- outputs: [Session log entry at chronicle/*, Gate Evidence table populated]
8
- tier: lite
9
- user_invocable: true
10
- disable_model_invocation: false
11
- modes: [default]
12
- composes_with: [kiss, promote, retro]
13
- ---
14
-
15
- # /session-log
16
-
17
- ## What you get
18
-
19
- A timestamped markdown record of what happened this session. `/session-log` reads the day's commits, walks the conversation, and outputs a session log entry with frontmatter (timing, closes) plus body sections (Entry State, Work Done, Decisions, Open Threads, Key Files Changed). The Gate Evidence table lands with authoritative counts from marker files. The next session reads Open Threads first. `/session-log` was called `/chronicle` before 2026-07-17; both names work through 2026-10-31.
20
-
21
- ## When to use it
22
-
23
- Run `/session-log` at session end before close. `/session-end` calls it as part of the MUST tier. If you want to write the log alone (rare — usually it composes with a longer close), invoke `/session-log` directly.
24
-
25
- ## When NOT to use
26
-
27
- Do not run `/session-log` mid-session. Wait for session end. Do not run it for a session with zero substantive work. Skip the entry that day. Do not run it to write a retrospective. That is `/retro`. Do not run it to update `docs/whereami.md`. That is `/session-end`.
28
-
29
- ## Tier gate (bassclef#740 Task 1.5)
30
-
31
- `/session-log` runs at `tier: lite`. It writes files locally. It calls no standard-tier skills. Lite adopters run it as documented. The body names `/retro` in "When NOT to use" — `/retro` ships at `tier: standard`. Lite adopters skip `/retro`. `/retro` requires bassclef standard. Write a two-line note in Open Threads instead. Resolve tier via `lib/tier-check.sh`. Per canvas Q6 Option E.
32
-
33
- ## FAQ
34
-
35
- ### What was this skill called before?
36
-
37
- `/chronicle`. Renamed to `/session-log` per ADR-040 Decision 1 (vocabulary rename). Both names work through 2026-10-31 per `.claude/rules/we-dont-break-adopters.md`. After the grace window ends, only `/session-log` resolves.
38
-
39
- The artifact directory names stay as `chronicle/` (bassclef) and `docs/chronicle/` (app repos) during the same window. Renaming the directories is a separate migration; the SKILL name change happens first.
40
-
41
- ### What sections does the log entry have?
42
-
43
- Frontmatter:
44
-
45
- - `started_at`, `ended_at`, `duration_minutes` — deterministic timing from the session-end hook
46
- - `turns` — approximate conversation turns
47
- - `closes` — issues resolved this session (e.g., `["#123", "#456"]`)
48
-
49
- Body sections:
50
-
51
- - **Entry State** — where the project was at session start
52
- - **Work Done** — what shipped in one to three paragraphs
53
- - **Decisions** — non-obvious choices, why, alternatives considered
54
- - **Open Threads** — what remains, in priority order; the next session reads this first
55
- - **Key Files Changed** — path list with a one-line description each
56
- - **Gate Evidence** — table showing which gates fired this session per branch
57
- - **Promotable Patterns** — novel patterns that would help in a different repo
58
-
59
- The template at `templates/chronicle-template.md` carries the exact shape. Copy it and fill in the fields; do not invent ad-hoc structures. Ad-hoc structures silently drop the Gate Evidence table per bassclef#298.
60
-
61
- ### Why is the Gate Evidence table required?
62
-
63
- The pre-commit hook BLOCKS commits missing `## Gate Evidence` per bassclef#298. The section is the authoritative record for the 5-session rolling gate-compliance counter that fires at session start. Skipping it produces "verify-compliance 0% / temperance-compliance 0%" BLOCKED items at the next session's start.
64
-
65
- Auto-populate via the bash snippet in `templates/chronicle-template.md`. Use `state_marker_count <category> <since-days>` from `lib/state.sh` for spine v0 repos; falls back to `[ -f state/markers/<gate>/<branch-slug>.marker ]` on pre-spine repos.
66
-
67
- ### Where does the log entry write?
68
-
69
- - Bassclef repos: `chronicle/{YYYY-MM-DD}-{slug}.md`
70
- - App repos: `docs/chronicle/{YYYY-MM-DD}-{slug}.md`
71
-
72
- Per `standards/project-directory-layout.md`. If an entry already exists for today, append a letter suffix: `{date}b-{slug}.md`.
73
-
74
- The directory name stays as `chronicle/` during the grace window. A separate migration renames the directory to `session-log/` after the SKILL rename settles.
75
-
76
- ### What plain-English discipline applies?
77
-
78
- Before writing, pass narrative content through `/kiss words`. The session log is operator-narrative — voice trumps strict rule, but bassclef-internal jargon (per `standards/bassclef-internal-jargon.md`) still gets substituted. The substrate-clarity-gate hook emits ADVISORY notices for jargon, long sentences, and passive voice. Treat the advisory as a checklist before commit.
79
-
80
- Standard tech vocab stays (API, hook, schema, ORM). Only bassclef-internal terms get replaced.
81
-
82
- ### What are Promotable Patterns and when do I add them?
83
-
84
- Before finalizing the entry, ask: "Did this session produce a novel diagnostic approach, workaround, or workflow improvement that would help in a *different* repo?" If yes, add a `## Promotable Patterns` section:
85
-
86
- ```markdown
87
- ## Promotable Patterns
88
-
89
- - **Pattern name** — one-sentence description → /promote candidate
90
- ```
91
-
92
- Then run `/promote` before session-end closes. This catches pattern-level discoveries that the pre-commit hook (file-level only) misses.
93
-
94
- ## Details below the fold
95
-
96
- ### Procedure
97
-
98
- **Step 1** — List recent session logs via accessor to understand sequence and format:
99
-
100
- ```bash
101
- bash scripts/state.sh get reference chronicle <id>
102
- # or via lib:
103
- source lib/state.sh && state_chronicle_list --recent 3
104
- ```
105
-
106
- Body content of past entries is operator-readable per `.claude/rules/accessor-library-discipline.md`. Read with `cat chronicle/<id>.md` after listing.
107
-
108
- **Step 2** — Run `git log --oneline` to see what committed this session.
109
-
110
- **Step 3** — Determine today's date and pick a descriptive slug for the session's work.
111
-
112
- **Step 4** — Capture timing data via deterministic measurement:
113
-
114
- - Run `bash scripts/longrun-telemetry.sh <session-id>` for the harness session ID. Populates `peak_input_tokens`, `compaction_count`, `total_turns` from the authoritative JSONL log.
115
- - When the harness session ID is not accessible (rare edge case), fall back to reading `state/markers/session-timing/` for the hook-recorded timestamp; use that as `started_at`, compute `ended_at` from `git log --format=%aI` on last session commit. Flag `appetite_actuals.estimate_method: fallback` in frontmatter so the next reader sees the data is estimated.
116
- - `turns` — approximate conversation turns.
117
- - `closes` — list any issues resolved this session.
118
-
119
- **Step 5** — Summarize accomplishments, decisions, and open threads.
120
-
121
- **Step 6** — Fill in the Gate Evidence table. Use `state_marker_count` for verified firings; falls back to direct marker file checks for pre-spine repos:
122
-
123
- ```bash
124
- source lib/state.sh 2>/dev/null
125
- BRANCH_SLUG=$(git branch --show-current | tr '/' '-')
126
-
127
- if command -v state_marker_count >/dev/null; then
128
- [ "$(state_marker_count temperance 7)" -gt 0 ] && echo "temperance: yes"
129
- [ "$(state_marker_count diagnose 7)" -gt 0 ] && echo "diagnose: yes"
130
- [ "$(state_marker_count verify 7)" -gt 0 ] && echo "verify: yes"
131
- else
132
- [ -f "state/markers/temperance/${BRANCH_SLUG}.marker" ] && echo "temperance: yes"
133
- [ -f "state/markers/diagnose/${BRANCH_SLUG}.marker" ] && echo "diagnose: yes"
134
- [ -f "state/markers/verify/${BRANCH_SLUG}.marker" ] && echo "verify: yes"
135
- fi
136
- ```
137
-
138
- Marker absent (count 0) means the gate did NOT fire this session for that branch.
139
-
140
- **Step 7** — Validate before commit:
141
-
142
- ```bash
143
- CHRONICLE=chronicle/{YYYY-MM-DD}-{slug}.md # or docs/chronicle/...
144
- grep -qiE "^## Gate (E|e)vidence" "$CHRONICLE" || echo "MISSING — fix before commit"
145
- ```
146
-
147
- The pre-commit hook performs the same check mechanically; this is the agent-side equivalent so failures surface at write time.
148
-
149
- ### Self-check step — before writing the log entry
150
-
151
- Before writing the log body, I:
152
-
153
- 1. Read the draft against `standards/bassclef-internal-jargon.md` BLOCK terms.
154
- 2. Rewrite any BLOCK matches in plain English per `/kiss words`.
155
- 3. Verify the Gate Evidence table is populated.
156
- 4. Write the file and commit.
157
-
158
- The pre-commit hook catches missing Gate Evidence. The substrate-clarity-gate hook emits ADVISORY on jargon leaks.
159
-
160
- ### Rules
161
-
162
- - Open Threads is the most important section. The next session reads it first.
163
- - Be factual, not promotional. Record what happened; do not editorialize.
164
- - Tags should be specific enough to filter by later.
165
- - Every entry MUST include a Gate Evidence table. Silence is not deferral per `.claude/rules/session-artifacts.md`.
166
- - Use `templates/chronicle-template.md` as-is. Do not invent ad-hoc section structures.
167
-
168
- ### Common failure modes
169
-
170
- - **Gate Evidence missing.** Pre-commit hook BLOCKS. Auto-populate via template snippet.
171
- - **Timing missing.** Fall back to `state/markers/session-timing/` timestamp plus git log tail. Flag `estimate_method: fallback` in frontmatter.
172
- - **Two entries same day.** Append letter suffix: `{date}b-{slug}.md`.
173
- - **Ad-hoc structure.** Rejected. Copy the template.
174
- - **Bassclef jargon in narrative.** Substrate-clarity-gate emits ADVISORY. Rewrite before commit.
175
-
176
- ### What /session-log does NOT do — INSTEAD guidance
177
-
178
- - Does not open issues or PRs.
179
- INSTEAD: use `/promote` for that; run it before `/session-end` closes.
180
- - Does not modify the roadmap.
181
- INSTEAD: `/roadmap-reconcile` runs at the MUST tier of `/session-end` and handles roadmap edits.
182
- - Does not run long network work.
183
- INSTEAD: write local files and validate them here; SHOULD-tier network work belongs in `/session-end`.
184
- - Does not invent timing when hook output is missing.
185
- INSTEAD: use the explicit fallback sources (`state/markers/session-timing/`, `git log --format=%aI`) and mark the frontmatter `estimate_method: fallback`.
186
- - Does not edit prior entries.
187
- INSTEAD: write a new entry; corrections go in the next session's Decisions section.
188
-
189
- ### When to write more than one entry per day
190
-
191
- If a single date carries two distinct work sessions (morning + evening, or goal A + goal B on the same day), write two files: `{date}-{first-slug}.md` and `{date}b-{second-slug}.md`. The letter suffix disambiguates. The `/session-end` skill picks the next available letter automatically.
192
-
193
- ### Grace window on old vocabulary and skill name
194
-
195
- Old vocabulary (bet → goal, step → step, chronicle → session log) still works through 2026-10-31 per ADR-031 and `.claude/rules/we-dont-break-adopters.md`. The old skill name `/chronicle` still resolves alongside `/session-log` during the same window. The rename registers in `standards/file-renames.json` per the bassclef file-rename discipline (standard tier).
196
-
197
- Artifact directory names (`chronicle/`, `docs/chronicle/`) stay during this grace window. A separate migration handles the directory rename after the SKILL rename settles.
198
-
199
- ## Examples
200
-
201
- <!-- FKGL-EXEMPT: sample entry -->
202
-
203
- **Frontmatter of a shipped entry:**
204
-
205
- ```yaml
206
- ---
207
- started_at: 2026-07-19T18:00:00+0100
208
- ended_at: 2026-07-19T22:15:00+0100
209
- duration_minutes: 255
210
- turns: 340
211
- closes: ["#800", "#799"]
212
- ---
213
- ```
214
-
215
- **Body section shape:**
216
-
217
- ```markdown
218
- ## Entry State
219
- Construction phase. Goal 19j closed. Wave 1 refactor not started.
220
-
221
- ## Work Done
222
- Shipped 4 PRs across foundation cures + first Wave 1 skill refactor...
223
-
224
- ## Gate Evidence
225
- | Gate | Fired | Marker path |
226
- |---|---|---|
227
- | Temperance | 3 | state/markers/temperance/... |
228
- ```
229
-
230
- <!-- /FKGL-EXEMPT -->
231
-
232
- ## Anti-patterns and INSTEAD
233
-
234
- | Anti-pattern | INSTEAD |
235
- |---|---|
236
- | Skip the Gate Evidence table | Copy the template and fill counts from marker files |
237
- | Invent ad-hoc section names | Use the 7 body sections named in FAQ Q2 |
238
- | Write the entry mid-session | Wait for session end; the timing block needs start + end |
239
- | Rebuild timing from memory | Read `scripts/longrun-telemetry.sh` output at session end |
240
- | Fold the retrospective into the log | Retrospectives live in `/retro`; the log is a record |
241
-
242
- ## Composes with
243
-
244
- - `/session-end` — calls `/session-log` as part of the MUST tier.
245
- - `/kiss` — applied to prose before write.
246
- - `/promote` — reads Promotable Patterns for candidate tickets.
247
- - `/retro` — sits alongside the log at session end.
248
-
249
- ## Distinct from
250
-
251
- - `/session-end` — runs the whole close. `/session-log` writes one file.
252
- - `/retro` — reflects on what worked. `/session-log` records what shipped.
253
- - `/journal` — writes for an outside reader. `/session-log` writes for the operator.
254
- - `/chronicle` — old alias during the grace window through 2026-10-31.
255
-
256
- ## Rules
257
-
258
- - Do not skip the Gate Evidence table. INSTEAD, copy the template + fill counts from markers.
259
- - Do not invent section names. INSTEAD, use the 7 body sections in FAQ Q2.
260
- - Do not write mid-session. INSTEAD, wait for session end.
261
- - Always cite marker paths in Gate Evidence rows.
262
- - Always run the plain-English self-check before write.
263
-
264
- ## Test cases
265
-
266
- <!-- FKGL-EXEMPT: structured test spec -->
267
- | ID | Prompt | Expected behavior |
268
- |---|---|---|
269
- | T1 | `/session-log` at session end after 3 PRs shipped | Entry lands with all 7 body sections + Gate Evidence + closes list |
270
- | T2 | `/session-log` when zero commits this session | Skip entry OR write minimal "no substantive work" note |
271
- | T3 | `/session-log` when a second entry lands same date | File uses letter suffix (2026-07-19b-...) |
272
- | T4 | `/session-log` when a Promotable Pattern surfaces | Pattern lands in section with slug + one line |
273
- | T5 | Old skill name `/chronicle` invoked | Resolves to `/session-log` during grace window |
274
- <!-- /FKGL-EXEMPT -->
275
-
276
- ## Sources read
277
-
278
- <!-- FKGL-EXEMPT: reference list -->
279
- - ADR-040 planning-skill vocabulary and lite profile
280
- - `.claude/rules/plain-english-discipline.md`
281
- - `.claude/rules/we-dont-break-adopters.md`
282
- - file-rename-discipline (standard tier)
283
- - `.claude/rules/session-artifacts.md`
284
- - `.claude/rules/accessor-library-discipline.md`
285
- - `standards/sdlc-compliance.md` — Gate Evidence discipline
286
- - `standards/project-directory-layout.md` — session log path per repo type
287
- - `standards/bassclef-internal-jargon.md` — self-check wordlist
288
- - `standards/file-renames.json` — rename registered here
289
- - `templates/chronicle-template.md` — authoritative shape (path stays during grace window)
290
- - `scripts/longrun-telemetry.sh` — deterministic timing measurement
291
- - `lib/state.sh` — accessor library for `state_marker_count` and related accessors
292
- - bassclef-upstream#298 — Gate Evidence table required
293
- - bassclef-upstream#559 — plain-English discipline
294
- - bassclef-upstream#907 — /kiss wordlist single source of truth
295
- <!-- /FKGL-EXEMPT -->
296
-
297
- ## Why this skill exists
298
-
299
- Session end without a written log means the next session starts cold. Operators returning after a break rebuild state from git log + open issues. That rebuild costs 20-40 turns. It often drifts into the wrong active goal. `/session-log` writes one file per session. The next session reads Open Threads first. Then Work Done. Then decides. Without `/session-log`, session-end obligations collapse. The whereami rule loses its input source.