From 4268a7e53679cea955da11ceea0f90d2a9aa54ec Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Sun, 1 Feb 2026 19:57:08 -0700 Subject: [PATCH] session-notes -> session-memory --- README.md | 10 ++++------ ...mpt-session-memory-update-instructions.md} | 4 ++-- ...ate.md => data-session-memory-template.md} | 4 ++-- tools/updatePrompts.js | 20 +++++++++---------- 4 files changed, 17 insertions(+), 21 deletions(-) rename system-prompts/{agent-prompt-session-notes-update-instructions.md => agent-prompt-session-memory-update-instructions.md} (96%) rename system-prompts/{agent-prompt-session-notes-template.md => data-session-memory-template.md} (90%) diff --git a/README.md b/README.md index e3780e5..9b74a43 100644 --- a/README.md +++ b/README.md @@ -103,21 +103,19 @@ Sub-agents and utilities. - [Agent Prompt: Prompt Suggestion Generator v2](./system-prompts/agent-prompt-prompt-suggestion-generator-v2.md) (**296** tks) - V2 instructions for generating prompt suggestions for Claude Code. - [Agent Prompt: Remember skill](./system-prompts/agent-prompt-remember-skill.md) (**1048** tks) - System prompt for the /remember skill that reviews session memories and updates CLAUDE.local.md with recurring patterns and learnings. - [Agent Prompt: Session Search Assistant](./system-prompts/agent-prompt-session-search-assistant.md) (**439** tks) - Agent prompt for the session search assistant that finds relevant sessions based on user queries and metadata. -- [Agent Prompt: Session notes template](./system-prompts/agent-prompt-session-notes-template.md) (**292** tks) - Template structure for session notes tracking coding work and decisions. -- [Agent Prompt: Session notes update instructions](./system-prompts/agent-prompt-session-notes-update-instructions.md) (**756** tks) - Instructions for updating session notes files during conversations. +- [Agent Prompt: Session memory update instructions](./system-prompts/agent-prompt-session-memory-update-instructions.md) (**756** tks) - Instructions for updating session memory files during conversations. - [Agent Prompt: Session title and branch generation](./system-prompts/agent-prompt-session-title-and-branch-generation.md) (**307** tks) - Agent for generating succinct session titles and git branch names. - [Agent Prompt: Update Magic Docs](./system-prompts/agent-prompt-update-magic-docs.md) (**718** tks) - Prompt for the magic-docs agent.. - [Agent Prompt: User sentiment analysis](./system-prompts/agent-prompt-user-sentiment-analysis.md) (**205** tks) - System prompt for analyzing user frustration and PR creation requests. - [Agent Prompt: WebFetch summarizer](./system-prompts/agent-prompt-webfetch-summarizer.md) (**185** tks) - Prompt for agent that summarizes verbose output from WebFetch for the main model. - +- [Data: Session memory template](./system-prompts/data-session-memory-template.md) (**292** tks) - Template structure for session memory `summary.md` files. ### System Prompt @@ -143,7 +141,7 @@ Parts of the main system prompt. ### System Reminders -All Claude Code system reminders. +Text for large system reminders. - [System Reminder: /btw side question](./system-prompts/system-reminder-btw-side-question.md) (**172** tks) - System reminder for /btw slash command side questions without tools. - [System Reminder: Agent mention](./system-prompts/system-reminder-agent-mention.md) (**45** tks) - Notification that user wants to invoke an agent. diff --git a/system-prompts/agent-prompt-session-notes-update-instructions.md b/system-prompts/agent-prompt-session-memory-update-instructions.md similarity index 96% rename from system-prompts/agent-prompt-session-notes-update-instructions.md rename to system-prompts/agent-prompt-session-memory-update-instructions.md index d747fe5..9f3e2b1 100644 --- a/system-prompts/agent-prompt-session-notes-update-instructions.md +++ b/system-prompts/agent-prompt-session-memory-update-instructions.md @@ -1,6 +1,6 @@ diff --git a/tools/updatePrompts.js b/tools/updatePrompts.js index 6bc373d..1675f09 100644 --- a/tools/updatePrompts.js +++ b/tools/updatePrompts.js @@ -1,4 +1,4 @@ -import { readFileSync, writeFileSync, readdirSync, unlinkSync, mkdirSync, existsSync } from 'fs'; +import { readFileSync as readFileSyncOrig, writeFileSync as writeFileSyncOrig, readdirSync, unlinkSync, mkdirSync, existsSync } from 'fs'; import { join, dirname } from 'path'; import { fileURLToPath } from 'url'; @@ -21,6 +21,9 @@ if (!ANTHROPIC_API_KEY) { process.exit(1); } +const readFileSync = (file) => readFileSyncOrig(file, 'utf-8').replace(/\r\n/g, "\n"); +const writeFileSync = (file, content) => writeFileSyncOrig(file, content.replace(/\n/g, "\r\n")); + /** * Count tokens using Anthropic's token counting API */ @@ -220,7 +223,7 @@ function createMarkdownContent(prompt, reconstructedContent) { */ function parseMarkdownFile(filepath) { try { - const content = readFileSync(filepath, 'utf-8'); + const content = readFileSync(filepath); const commentMatch = content.match(//); if (!commentMatch) return null; @@ -289,7 +292,7 @@ function createReadmeEntry(prompt, filename, tokens, isBold = false) { function parseReadmeTokenCounts() { const tokenCounts = new Map(); try { - const readme = readFileSync(README_PATH, 'utf-8'); + const readme = readFileSync(README_PATH); // Match patterns like: (./system-prompts/filename.md) (**123** tks) const regex = /\(\.\/system-prompts\/([^)]+\.md)\)\s*\(\*\*(\d+)\*\*\s*tks\)/g; let match; @@ -307,7 +310,7 @@ function parseReadmeTokenCounts() { */ async function updateFromJSON(jsonPath) { console.log(`Reading JSON from: ${jsonPath}`); - const jsonData = JSON.parse(readFileSync(jsonPath, 'utf-8')); + const jsonData = JSON.parse(readFileSync(jsonPath)); console.log(`Version: ${jsonData.version}`); console.log(`Prompts count: ${jsonData.prompts.length}`); @@ -409,7 +412,7 @@ async function updateFromJSON(jsonPath) { * Update README.md with new prompt information */ function updateReadme(promptsByFilename, version, releaseDate, versionCount) { - let readme = readFileSync(README_PATH, 'utf-8'); + let readme = readFileSync(README_PATH); const lines = readme.split('\n'); // Update version in header with npm link and date @@ -505,13 +508,11 @@ function updateReadme(promptsByFilename, version, releaseDate, versionCount) { // Data section (commented out if has entries) if (categories['Data']['main'].length > 0) { - newLines.push(''); newLines.push(''); } @@ -528,9 +529,6 @@ function updateReadme(promptsByFilename, version, releaseDate, versionCount) { newLines.push(''); newLines.push('Text for large system reminders.'); newLines.push(''); - newLines.push('> [!NOTE]'); - newLines.push('> Note that we\'re planning to add a **system reminder creator/editor** to [tweakcc](https://github.com/Piebald-AI/tweakcc); :+1: [this issue](https://github.com/Piebald-AI/tweakcc/issues/113) if you\'re interested in that idea.'); - newLines.push(''); newLines.push(...categories['System Reminders']['main']); newLines.push('');