Session close — close without memorising everything
Where to run
Every cadence / raf command works on the git repository of the current directory. When the
session runs from a parent folder that holds several projects (not itself a repository), run
cadence session close --all there (--depth 2 for projects one folder deeper): one "## project"
section per sub-folder that contains .cadence/raf.yaml or docs/plan/raf.yaml, or a cadence.yaml with a plan: key.
Other commands (raf …, cadence deliver) still run inside the project concerned: cd <project> && cadence ….
With no project named, run cadence session close --all from the parent folder, or cadence session close in each project touched during the session
(git log --since or git status tell which), and close each one.
Steps
- Run
cadence session close(the window runs from the lastsession start, even when the close is re-run, and is named in the "Commits de la période" title; over several days:--since "2 days ago"). Exit code 1 means not closed: something below is still open. - Plan hygiene, lot by lot:
- a
doinglot with no commit in the period →raf done <id>if its tests are green, otherwiseraf note <id> "where it stands, what blocks"; - a commit without a lot that belongs to one →
raf note <id> "commits: <sha> …"; nothing if it is genuinely outside the plan (docs, chores); - a plan commit reported because it also touches a file generated from the plan (a published
plan) → propose to declare that file under
plan.filesincadence.yaml; the files of a commit decide whether it is plan upkeep, never its subject; - a finished lot marked
visiblewithout a news entry →cadence news new <id>, written for the user, with a screenshot; - a lot that
raf donerefuses, or that the check reports as finished, for lack of a review — code review of a lot with commits, or one older than the lot's latest commit (raf review enable), UX review of a visible lot (raf ux enable) → have thecode-reviewer/ux-revieweragent review it, then record its verdict withraf review <id> "…"/raf ux <id> "…"; never write a verdict nobody gave; - a run of
cadence runstill open (cadence run --liste, since 2.0.0): one inattente→ its question goes in the notes for next time; one handed back →raf note <lot> "cadence run <id> : <état>, worktree ../.cadence-run/…", never deleted without the human; - rerun until the check part is clean.
- a
- Stale working files (report section "Nettoyage proposé", from
session.cleanincadence.yaml): list them to the human — shared tmp folder, screenshots no one refers to, throwaway scripts, folders left by tests — and delete them only after the human agrees, with explicit paths (never a wildcardrm, never a filegittracks). The agreement can be old by then: right before deleting, re-runcadence session close(or the scan) and delete only the entries that are still proposed, never one the human named from memory. Delete a proposed symbolic link as a link (rm path, no trailing/, neverrm -rthrough it). Before proposing a screenshot, check nothing still refers to it (plan, news, docs). Anything kept: leave it, it will be listed again next close. No section: nothing to do; a project with nosession.cleancan propose adding it. An entry is proposed only if it could be measured entirely. Age: a folder's age is that of the most recent entry it contains, an entry's age counting from the later of its modification and status-change times. The report never proposes: a git repository, a folder that contains one at any depth, and anything under a.gitfolder; a git directory without a.gitentry (bare repository, mirror,--separate-git-dir, worktree admin folder — recognised byHEADwithobjectsandrefs, or withcommondir), anything inside it or a folder that contains one; anythinggittracks, in any repository that has a.gitentry above it (one limit: a bare repository driven with an external work tree,git --git-dir=~/.dotfiles --work-tree=~, leaves no.gitbeside its files — their tracked files can be proposed, so check a proposed entry is not one); a name starting with.unless the pattern itself starts that name with.; anything behind a symbolic link a*matched (the link itself may be proposed: remove the link, neverrm -rthrough it — a segment written in full before the first*does follow its link); the repository itself or a folder that contains it; anything that could not be read entirely — those are listed apart as "illisible(s)": tell the human, never delete those, and never widen the list by hand to entries the report did not propose. - Memory, filtered (only if you keep a persistent memory): write down what the repository does
NOT already say — a trap and its cause, a decision or correction from the human, a collaboration
rule. Test: "do
git logor the docs already say it?" → then no memory. When the report has a section "Mémoire" (theMEMORY.mdindex of this folder weighs more thanmemory.indexMaxBytesofcadence.yaml, 12000 bytes by default), propose to group the dated entries it counts under one line that points to a secondary index (a memory file holding them): the index is loaded at every turn, so its weight is paid by every session. Move the entries only after the human agrees, then runcadence session closeagain — the section is gone or the size has dropped. Without the agreement nothing moves and the warning comes back at the next close. The command never writes the memory. - Skills and agents, on threshold, PROPOSED: a skill when the same chain of commands was done by
hand at least twice today; an agent update when an agent got something wrong or its domain moved.
List them with the benefit; the human decides. Never create them here.
When the report has a "Faits propres au projet" section (
session.closeincadence.yaml), treat what it flags as part of this hygiene; with a read-only plan, use the project's own tool wherever these steps sayraf. - Clean state: everything committed and pushed, no delivery running. If the command still exits 1, say what remains and do NOT say the session is closed.
- Three lines for next time: if the report opens with
⚠ N lots done depuis le dernier tag v<x.y.z>(lots in service, not published), that goes FIRST, with thecadence releasecommand it names; thencadence session next "…" "…" "…"— the nextsession-startshows them. The command prints the lines as recorded: report them from that output, do not runsession startagain. If the report has a "Notes de la dernière clôture à réécrire" section, those notes quote a lot already finished (⚠ note périmée): propose their rewrite in the lines below, never carry them over as they are. The lines replace the previous notes. Without a line the command refuses and keeps them; erase them on purpose withcadence session next --clear, only when nothing is left to say.
Do not
- Write a recap of the day into memory: the plan,
raf nowandgit logare the record. - Close, drop or re-scope a lot the human has not agreed to.