Skip to content

Commit a1fbe48

Browse files
committed
[skills] Fix REVIEW-MEDIUM-2: drop dead buildSessionSummary + docs promise
Why: buildSessionSummary was computed but never POSTed, and README and SKILL.md both promised a separately-captured summary thought that the code never delivered — a documentation lie. Delete the dead function, its call site, and the corresponding bullet points from both docs. Implementing a second POST was rejected: one POST per session is the simpler, correct shape and downstream thought extraction already produces its own summarization.
1 parent bc6330e commit a1fbe48

3 files changed

Lines changed: 3 additions & 24 deletions

File tree

skills/auto-capture-claude-code/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ The adapter installs as a Claude Code `Stop` hook. When a session ends:
1515
1. The hook script reads the session transcript
1616
2. Short sessions (< 3 user turns), agent-only sessions, and restricted content are skipped
1717
3. The formatted transcript is POSTed to the Open Brain ingest endpoint for thought extraction
18-
4. A session summary is captured as a journal entry
19-
5. Failed captures are saved to a retry queue and retried on subsequent session ends
18+
4. Failed captures are saved to a retry queue and retried on subsequent session ends
2019

2120
## Prerequisites
2221

skills/auto-capture-claude-code/SKILL.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ Together they ensure no valuable session falls through the cracks.
4545
short or agent-only sessions, and formats the content.
4646
3. The formatted transcript is POSTed to the Open Brain REST ingest endpoint
4747
(or smart-ingest edge function) for automatic thought extraction.
48-
4. A session summary thought is captured separately as a journal entry.
49-
5. Failed captures are saved to a local retry queue and retried on subsequent
48+
4. Failed captures are saved to a local retry queue and retried on subsequent
5049
session ends.
5150

5251
## Skip Heuristics
@@ -124,7 +123,6 @@ When working correctly:
124123

125124
- Every meaningful Claude Code session (3+ user turns, non-agent, non-restricted)
126125
is automatically ingested into Open Brain for thought extraction.
127-
- A session summary journal entry is captured alongside the full transcript.
128126
- Failed captures are queued locally and retried on subsequent session ends.
129127
- Short, agent, and restricted sessions are silently skipped.
130128
- All outcomes are logged to `logs/ambient-capture.log` for debugging.

skills/auto-capture-claude-code/session-end-capture.mjs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -163,23 +163,6 @@ function formatTranscript(parsed, projectName) {
163163
return `${header}\n\n<thought_content>\n${body}\n</thought_content>`;
164164
}
165165

166-
function buildSessionSummary(parsed, projectName) {
167-
const topics = new Set();
168-
for (const t of parsed.turns) {
169-
if (t.role === "human") {
170-
// Extract potential topic keywords from user messages
171-
const words = t.content.toLowerCase().split(/\s+/).filter(w => w.length > 4);
172-
for (const w of words.slice(0, 5)) topics.add(w);
173-
}
174-
}
175-
176-
return [
177-
`Claude Code session on ${projectName}`,
178-
`(${parsed.gitBranch || "unknown branch"}, ${parsed.userTurns} turns).`,
179-
parsed.createdAt ? `Started: ${parsed.createdAt}.` : "",
180-
].filter(Boolean).join(" ");
181-
}
182-
183166
// ── Import key (idempotency) ────────────────────────────────────────────────
184167

185168
function buildImportKey(sessionId, formattedText) {
@@ -335,9 +318,8 @@ async function main() {
335318
process.exit(0);
336319
}
337320

338-
// 6. Format transcript and build summary
321+
// 6. Format transcript and compute idempotency key
339322
const formattedText = formatTranscript(parsed, projectName);
340-
const sessionSummary = buildSessionSummary(parsed, projectName);
341323
const importKey = buildImportKey(parsed.sessionId, formattedText);
342324

343325
// 7. Load env and POST to ingest endpoint

0 commit comments

Comments
 (0)