@thebassclef/lite 1.0.4 → 1.1.1
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.
- package/dist/cli.cjs +298 -55
- package/dist/cli.js +298 -55
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.claude/agents/architect.md +70 -0
- package/dist/lite/.claude/agents/builder.md +114 -0
- package/dist/lite/.claude/agents/designer.md +156 -0
- package/dist/lite/.claude/agents/reviewer.md +88 -0
- package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
- package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
- package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
- package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
- package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
- package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
- package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
- package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
- package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
- package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
- package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
- package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
- package/dist/lite/.claude/luminaries/don-norman.md +173 -0
- package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
- package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
- package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
- package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
- package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
- package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
- package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
- package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
- package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
- package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
- package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
- package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
- package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
- package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
- package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
- package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
- package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
- package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
- package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
- package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
- package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
- package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
- package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
- package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
- package/dist/lite/.claude/rules/adr-discipline.md +96 -0
- package/dist/lite/.claude/rules/api-conventions.md +115 -0
- package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
- package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
- package/dist/lite/.claude/rules/blocked-items.md +139 -0
- package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
- package/dist/lite/.claude/rules/branching.md +28 -0
- package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
- package/dist/lite/.claude/rules/commit-conventions.md +22 -0
- package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/context-engineering.md +155 -0
- package/dist/lite/.claude/rules/context-management.md +85 -0
- package/dist/lite/.claude/rules/defensive-bash.md +52 -0
- package/dist/lite/.claude/rules/deferred-actions.md +233 -0
- package/dist/lite/.claude/rules/destructive-operations.md +69 -0
- package/dist/lite/.claude/rules/diagnosis.md +38 -0
- package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
- package/dist/lite/.claude/rules/guardrails.md +73 -0
- package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
- package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
- package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
- package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
- package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
- package/dist/lite/.claude/rules/loop-discipline.md +71 -0
- package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
- package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
- package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
- package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
- package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
- package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
- package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
- package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
- package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
- package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
- package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
- package/dist/lite/.claude/rules/pr-strategy.md +142 -0
- package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
- package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
- package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
- package/dist/lite/.claude/rules/schema-management.md +42 -0
- package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
- package/dist/lite/.claude/rules/security.md +37 -0
- package/dist/lite/.claude/rules/session-artifacts.md +236 -0
- package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
- package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
- package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
- package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
- package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
- package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
- package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
- package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
- package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
- package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
- package/dist/lite/.claude/rules/testing.md +38 -0
- package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
- package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
- package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
- package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
- package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
- package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
- package/dist/lite/.claude/skills/build/SKILL.md +640 -0
- package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
- package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
- package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
- package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
- package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
- package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
- package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
- package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
- package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
- package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
- package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
- package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
- package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
- package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
- package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
- package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
- package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
- package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
- package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
- package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
- package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
- package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
- package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
- package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
- package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
- package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
- package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
- package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
- package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
- package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
- package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
- package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
- package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
- package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
- package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
- package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
- package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
- package/dist/lite/AGENTS.md +79 -0
- package/dist/lite/CLAUDE-lite.md +85 -0
- package/dist/lite/CODE_OF_CONDUCT.md +28 -0
- package/dist/lite/CONTRIBUTING.md +177 -0
- package/dist/lite/README.md +173 -0
- package/dist/lite/SECURITY.md +19 -0
- package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
- package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
- package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
- package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
- package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
- package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
- package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
- package/dist/lite/lib/code-comment-discipline.sh +144 -0
- package/dist/lite/lib/composer-preflight.sh +459 -0
- package/dist/lite/lib/deferred-actions.sh +146 -0
- package/dist/lite/lib/hook-header-parser.sh +61 -0
- package/dist/lite/lib/hook-heartbeat.sh +152 -0
- package/dist/lite/lib/hook-inject.sh +255 -0
- package/dist/lite/lib/hook-installer.sh +195 -0
- package/dist/lite/lib/luminary-pick.sh +96 -0
- package/dist/lite/lib/output-discipline.sh +143 -0
- package/dist/lite/lib/prose-scan-boundary.sh +171 -0
- package/dist/lite/lib/rewrite-check.sh +214 -0
- package/dist/lite/lib/session-rescue.sh +151 -0
- package/dist/lite/lib/source-graph-walker.sh +277 -0
- package/dist/lite/lib/state.sh +1372 -0
- package/dist/lite/lib/telemetry.sh +205 -0
- package/dist/lite/lib/tier-check.sh +187 -0
- package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
- package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
- package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
- package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
- package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
- package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
- package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
- package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
- package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
- package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
- package/dist/lite/scripts/intent-drift-check.sh +456 -0
- package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
- package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
- package/dist/lite/standards/adr-template.md +86 -0
- package/dist/lite/standards/api-conventions/nextjs.md +84 -0
- package/dist/lite/standards/artifact-composition.md +209 -0
- package/dist/lite/standards/bash-hook-safety.md +246 -0
- package/dist/lite/standards/bassclef-configs-schema.md +232 -0
- package/dist/lite/standards/bassclef-evolution.md +143 -0
- package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
- package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
- package/dist/lite/standards/bassclef-source-config.md +228 -0
- package/dist/lite/standards/branch-stacking.md +408 -0
- package/dist/lite/standards/code-safety-principles.md +176 -0
- package/dist/lite/standards/composer-prerequisites.md +155 -0
- package/dist/lite/standards/deferred-actions-schema.md +204 -0
- package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
- package/dist/lite/standards/dependency-discipline/gem.md +43 -0
- package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
- package/dist/lite/standards/dependency-discipline/npm.md +42 -0
- package/dist/lite/standards/dependency-discipline/pip.md +42 -0
- package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/dist/lite/standards/deployment-topology.md +69 -0
- package/dist/lite/standards/docs-sync-allowlist.md +76 -0
- package/dist/lite/standards/domain-and-dns.md +145 -0
- package/dist/lite/standards/frontend-stack.md +67 -0
- package/dist/lite/standards/frontmatter-schema.md +154 -0
- package/dist/lite/standards/graceful-exit.md +227 -0
- package/dist/lite/standards/hook-idempotency.md +102 -0
- package/dist/lite/standards/hook-injection-discipline.md +202 -0
- package/dist/lite/standards/hook-install-class.md +215 -0
- package/dist/lite/standards/input-handler-interface.md +152 -0
- package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
- package/dist/lite/standards/lite-manifest.json +2797 -0
- package/dist/lite/standards/luminary-matching.md +105 -0
- package/dist/lite/standards/luminary-problem-patterns.md +481 -0
- package/dist/lite/standards/migration-discipline/active-record.md +50 -0
- package/dist/lite/standards/migration-discipline/alembic.md +43 -0
- package/dist/lite/standards/migration-discipline/gorm.md +50 -0
- package/dist/lite/standards/migration-discipline/prisma.md +53 -0
- package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
- package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
- package/dist/lite/standards/model-routing-discipline.md +160 -0
- package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
- package/dist/lite/standards/opener-discipline.md +96 -0
- package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
- package/dist/lite/standards/persona-schema.md +229 -0
- package/dist/lite/standards/pluggable-luminaries.md +323 -0
- package/dist/lite/standards/pr-body-discipline.md +115 -0
- package/dist/lite/standards/preview-state-schema.md +189 -0
- package/dist/lite/standards/project-directory-layout.md +276 -0
- package/dist/lite/standards/release-tagging.md +137 -0
- package/dist/lite/standards/reserved-skill-names.md +120 -0
- package/dist/lite/standards/scannable-multi-option-output.md +265 -0
- package/dist/lite/standards/sdlc-compliance.md +286 -0
- package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
- package/dist/lite/standards/secrets-lifecycle.md +210 -0
- package/dist/lite/standards/security-scanner-adapter.md +145 -0
- package/dist/lite/standards/session-board.md +256 -0
- package/dist/lite/standards/skill-output-discipline.md +121 -0
- package/dist/lite/standards/state-spine-contract.md +255 -0
- package/dist/lite/standards/state-spine.md +511 -0
- package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
- package/dist/lite/standards/substrate-config-schema.md +267 -0
- package/dist/lite/standards/tech-stack-config.md +109 -0
- package/dist/lite/standards/tier-dependency-analysis.md +167 -0
- package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
- package/dist/lite/standards/tier-tag-schema.md +155 -0
- package/dist/lite/standards/two-layer-config.md +99 -0
- package/dist/lite/standards/use-case-format.md +292 -0
- package/dist/lite/standards/user-story-invest.md +268 -0
- package/dist/lite/standards/velocity-and-appetite.md +229 -0
- package/dist/lite/standards/voice-input-pattern.md +119 -0
- package/dist/lite/standards/whereami-schema.md +301 -0
- package/dist/lite/standards/worktree-management.md +211 -0
- package/dist/lite/standards/writing-guide.md +213 -0
- package/dist/lite/templates/chronicle-template.md +75 -0
- package/dist/lite/templates/deferred-action-template.md +45 -0
- package/dist/lite/templates/memory-proposal-template.md +77 -0
- package/dist/lite/templates/persona-template.md +200 -0
- package/dist/lite/templates/pr-faq.md +45 -0
- package/dist/lite/templates/secret-rotation-template.md +162 -0
- package/dist/lite/templates/spec-template.md +131 -0
- package/dist/lite/templates/use-case-template.md +194 -0
- package/dist/lite/templates/user-story-template.md +107 -0
- package/dist/lite/templates/whereami-template.md +101 -0
- package/package.json +12 -5
|
@@ -0,0 +1,309 @@
|
|
|
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.
|
|
@@ -0,0 +1,299 @@
|
|
|
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.
|