session-notes -> session-memory

This commit is contained in:
bl-ue 2026-02-01 19:57:08 -07:00
parent e12496494e
commit 4268a7e536
4 changed files with 17 additions and 21 deletions

View File

@ -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: 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: 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 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 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 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 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: 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: 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: 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. - [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 ### Data
Misc large strings. The content of various template files embedded in Claude Code.
- [Data: GitHub Actions workflow for @claude mentions](./system-prompts/data-github-actions-workflow-for-claude-mentions.md) (**527** tks) - GitHub Actions workflow template for triggering Claude Code via @claude mentions. - [Data: GitHub Actions workflow for @claude mentions](./system-prompts/data-github-actions-workflow-for-claude-mentions.md) (**527** tks) - GitHub Actions workflow template for triggering Claude Code via @claude mentions.
- [Data: GitHub App installation PR description](./system-prompts/data-github-app-installation-pr-description.md) (**424** tks) - Template for PR description when installing Claude Code GitHub App integration. - [Data: GitHub App installation PR description](./system-prompts/data-github-app-installation-pr-description.md) (**424** tks) - Template for PR description when installing Claude Code GitHub App integration.
--> - [Data: Session memory template](./system-prompts/data-session-memory-template.md) (**292** tks) - Template structure for session memory `summary.md` files.
### System Prompt ### System Prompt
@ -143,7 +141,7 @@ Parts of the main system prompt.
### System Reminders ### 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: /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. - [System Reminder: Agent mention](./system-prompts/system-reminder-agent-mention.md) (**45** tks) - Notification that user wants to invoke an agent.

View File

@ -1,6 +1,6 @@
<!-- <!--
name: 'Agent Prompt: Session notes update instructions' name: 'Agent Prompt: Session memory update instructions'
description: Instructions for updating session notes files during conversations description: Instructions for updating session memory files during conversations
ccVersion: 2.0.58 ccVersion: 2.0.58
variables: variables:
- MAX_SECTION_TOKENS - MAX_SECTION_TOKENS

View File

@ -1,6 +1,6 @@
<!-- <!--
name: 'Agent Prompt: Session notes template' name: 'Data: Session memory template'
description: Template structure for session notes tracking coding work and decisions description: Template structure for session memory `summary.md` files
ccVersion: 2.0.58 ccVersion: 2.0.58
--> -->

View File

@ -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 { join, dirname } from 'path';
import { fileURLToPath } from 'url'; import { fileURLToPath } from 'url';
@ -21,6 +21,9 @@ if (!ANTHROPIC_API_KEY) {
process.exit(1); 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 * Count tokens using Anthropic's token counting API
*/ */
@ -220,7 +223,7 @@ function createMarkdownContent(prompt, reconstructedContent) {
*/ */
function parseMarkdownFile(filepath) { function parseMarkdownFile(filepath) {
try { try {
const content = readFileSync(filepath, 'utf-8'); const content = readFileSync(filepath);
const commentMatch = content.match(/<!--\n([\s\S]*?)\n-->/); const commentMatch = content.match(/<!--\n([\s\S]*?)\n-->/);
if (!commentMatch) return null; if (!commentMatch) return null;
@ -289,7 +292,7 @@ function createReadmeEntry(prompt, filename, tokens, isBold = false) {
function parseReadmeTokenCounts() { function parseReadmeTokenCounts() {
const tokenCounts = new Map(); const tokenCounts = new Map();
try { try {
const readme = readFileSync(README_PATH, 'utf-8'); const readme = readFileSync(README_PATH);
// Match patterns like: (./system-prompts/filename.md) (**123** tks) // Match patterns like: (./system-prompts/filename.md) (**123** tks)
const regex = /\(\.\/system-prompts\/([^)]+\.md)\)\s*\(\*\*(\d+)\*\*\s*tks\)/g; const regex = /\(\.\/system-prompts\/([^)]+\.md)\)\s*\(\*\*(\d+)\*\*\s*tks\)/g;
let match; let match;
@ -307,7 +310,7 @@ function parseReadmeTokenCounts() {
*/ */
async function updateFromJSON(jsonPath) { async function updateFromJSON(jsonPath) {
console.log(`Reading JSON from: ${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(`Version: ${jsonData.version}`);
console.log(`Prompts count: ${jsonData.prompts.length}`); console.log(`Prompts count: ${jsonData.prompts.length}`);
@ -409,7 +412,7 @@ async function updateFromJSON(jsonPath) {
* Update README.md with new prompt information * Update README.md with new prompt information
*/ */
function updateReadme(promptsByFilename, version, releaseDate, versionCount) { function updateReadme(promptsByFilename, version, releaseDate, versionCount) {
let readme = readFileSync(README_PATH, 'utf-8'); let readme = readFileSync(README_PATH);
const lines = readme.split('\n'); const lines = readme.split('\n');
// Update version in header with npm link and date // 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) // Data section (commented out if has entries)
if (categories['Data']['main'].length > 0) { if (categories['Data']['main'].length > 0) {
newLines.push('<!--');
newLines.push('### Data'); newLines.push('### Data');
newLines.push(''); newLines.push('');
newLines.push('Misc large strings.'); newLines.push('The content of various template files embedded in Claude Code.');
newLines.push(''); newLines.push('');
newLines.push(...categories['Data']['main']); newLines.push(...categories['Data']['main']);
newLines.push('-->');
newLines.push(''); newLines.push('');
} }
@ -528,9 +529,6 @@ function updateReadme(promptsByFilename, version, releaseDate, versionCount) {
newLines.push(''); newLines.push('');
newLines.push('Text for large system reminders.'); newLines.push('Text for large system reminders.');
newLines.push(''); 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(...categories['System Reminders']['main']);
newLines.push(''); newLines.push('');