Skip to content

Commit 2fed710

Browse files
fix(setup): keep session-close steps as a contiguous numbered list
Move mem_session_end next to mem_session_summary so markdown no longer renders step 2 as an orphan after the summary template block. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a568354 commit 2fed710

4 files changed

Lines changed: 16 additions & 8 deletions

File tree

internal/setup/plugins/opencode/engram.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ Also search memory PROACTIVELY when:
8989
### SESSION CLOSE PROTOCOL (mandatory)
9090
9191
Before ending a session or saying "done" / "that's it", you MUST:
92-
1. Call \`mem_session_summary\` with this structure:
92+
1. Call \`mem_session_summary\` with the structure below.
93+
2. Call \`mem_session_end\` with the active session id and an optional summary of work completed.
94+
95+
\`mem_session_summary\` structure:
9396
9497
## Goal
9598
[What we were working on this session]
@@ -110,7 +113,6 @@ Before ending a session or saying "done" / "that's it", you MUST:
110113
- path/to/file — [what it does or what changed]
111114
112115
This is NOT optional. If you skip this, the next session starts blind.
113-
2. Call \`mem_session_end\` with the active session id and an optional summary of work completed.
114116
115117
### AFTER COMPACTION
116118

internal/setup/setup.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ Also search memory PROACTIVELY when:
176176
### SESSION CLOSE PROTOCOL (mandatory)
177177
178178
Before ending a session or saying "done" / "listo" / "that's it", you MUST:
179-
1. Call mem_session_summary with this structure:
179+
1. Call mem_session_summary with the structure below.
180+
2. Call mem_session_end with the active session id and an optional summary of work completed.
181+
182+
mem_session_summary structure:
180183
181184
## Goal
182185
[What we were working on this session]
@@ -197,7 +200,6 @@ Before ending a session or saying "done" / "listo" / "that's it", you MUST:
197200
- path/to/file — [what it does or what changed]
198201
199202
This is NOT optional. If you skip this, the next session starts blind.
200-
2. Call mem_session_end with the active session id and an optional summary of work completed.
201203
202204
### PASSIVE CAPTURE — automatic learning extraction
203205

plugin/codex/skills/memory/SKILL.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ Also search memory PROACTIVELY when:
9090
## SESSION CLOSE PROTOCOL (mandatory)
9191

9292
Before ending a session or saying "done" / "that's it", you MUST:
93-
1. Call `mem_session_summary` with this structure:
93+
1. Call `mem_session_summary` with the structure below.
94+
2. Call `mem_session_end` with the active session id and an optional summary of work completed.
95+
96+
`mem_session_summary` structure:
9497

9598
## Goal
9699
[What we were working on this session]
@@ -111,7 +114,6 @@ Before ending a session or saying "done" / "that's it", you MUST:
111114
- path/to/file — [what it does or what changed]
112115

113116
This is NOT optional. If you skip this, the next session starts blind.
114-
2. Call `mem_session_end` with the active session id and an optional summary of work completed.
115117

116118
## AFTER COMPACTION
117119

plugin/opencode/engram.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ Also search memory PROACTIVELY when:
8989
### SESSION CLOSE PROTOCOL (mandatory)
9090
9191
Before ending a session or saying "done" / "that's it", you MUST:
92-
1. Call \`mem_session_summary\` with this structure:
92+
1. Call \`mem_session_summary\` with the structure below.
93+
2. Call \`mem_session_end\` with the active session id and an optional summary of work completed.
94+
95+
\`mem_session_summary\` structure:
9396
9497
## Goal
9598
[What we were working on this session]
@@ -110,7 +113,6 @@ Before ending a session or saying "done" / "that's it", you MUST:
110113
- path/to/file — [what it does or what changed]
111114
112115
This is NOT optional. If you skip this, the next session starts blind.
113-
2. Call \`mem_session_end\` with the active session id and an optional summary of work completed.
114116
115117
### AFTER COMPACTION
116118

0 commit comments

Comments
 (0)