diff --git a/README.md b/README.md index 9ea35fb..a7735c9 100644 --- a/README.md +++ b/README.md @@ -193,6 +193,7 @@ Parts of the main system prompt. - [System Prompt: Learning mode](./system-prompts/system-prompt-learning-mode.md) (**1042** tks) - Main system prompt for learning mode with human collaboration instructions. - [System Prompt: MCP Tool Result Truncation](./system-prompts/system-prompt-mcp-tool-result-truncation.md) (**164** tks) - Guidelines for handling long outputs from MCP tools, including when to use direct file queries vs subagents for analysis. - [System Prompt: Memory description of user details](./system-prompts/system-prompt-memory-description-of-user-details.md) (**122** tks) - Describes the purpose and guidelines for per-user memory files that accumulate details about the user's role, goals, knowledge, and preferences across sessions. +- [System Prompt: Memory description of user feedback (with explicit save)](./system-prompts/system-prompt-memory-description-of-user-feedback-with-explicit-save.md) (**146** tks) - Describes the feedback memory type that captures user guidance on work approaches, emphasizing recording both successes and failures and explicitly instructing to save a new memory noting contradictions with team feedback. - [System Prompt: Memory description of user feedback](./system-prompts/system-prompt-memory-description-of-user-feedback.md) (**139** tks) - Describes the user feedback memory type that stores guidance about work approaches, emphasizing recording both successes and failures and checking for contradictions with team memories. - [System Prompt: Memory staleness verification](./system-prompts/system-prompt-memory-staleness-verification.md) (**112** tks) - Instructs the agent to verify memory records against current file/resource state and delete stale memories that conflict with observed reality. - [System Prompt: Minimal mode](./system-prompts/system-prompt-minimal-mode.md) (**164** tks) - Describes the behavior and constraints of minimal mode, which skips hooks, LSP, plugins, auto-memory, and other features while requiring explicit context via CLI flags. @@ -208,6 +209,7 @@ Parts of the main system prompt. - [System Prompt: Scratchpad directory](./system-prompts/system-prompt-scratchpad-directory.md) (**170** tks) - Instructions for using a dedicated scratchpad directory for temporary files. - [System Prompt: Skillify Current Session](./system-prompts/system-prompt-skillify-current-session.md) (**1882** tks) - System prompt for converting the current session in to a skill. - [System Prompt: Subagent delegation examples](./system-prompts/system-prompt-subagent-delegation-examples.md) (**606** tks) - Provides example interactions showing how a coordinator agent should delegate tasks to subagents, handle waiting states, and report results. +- [System Prompt: Subagent prompt-writing examples](./system-prompts/system-prompt-subagent-prompt-writing-examples.md) (**439** tks) - Provides example usage patterns demonstrating how to write self-contained, well-structured prompts when delegating tasks to subagents. - [System Prompt: Teammate Communication](./system-prompts/system-prompt-teammate-communication.md) (**130** tks) - System prompt for teammate communication in swarm. - [System Prompt: Tone and style (code references)](./system-prompts/system-prompt-tone-and-style-code-references.md) (**39** tks) - Instruction to include file_path:line_number when referencing code. - [System Prompt: Tone and style (concise output — short)](./system-prompts/system-prompt-tone-and-style-concise-output-short.md) (**16** tks) - Instruction for short and concise responses. diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..0b70401 --- /dev/null +++ b/changelog.md @@ -0,0 +1,15 @@ +- **NEW:** Agent Prompt: Dream memory pruning — Added a subagent prompt for performing memory pruning passes by deleting stale or invalidated memory files and collapsing duplicates. +- **NEW:** Agent Prompt: Memory synthesis — Added a subagent that reads persistent memory files and returns a JSON synthesis of only the information relevant to each query, with cited filenames. +- **NEW:** Agent Prompt: Onboarding guide generator — Added a subagent that co-authors a team onboarding guide (ONBOARDING.md) by analyzing the creator's usage data, classifying session types, and iterating on the draft collaboratively. +- **NEW:** Agent Prompt: Session search — Added a lightweight subagent prompt for searching past conversation sessions by scanning .jsonl transcript files and returning matching session IDs. +- **NEW:** System Prompt: Memory description of user details — Added a description for per-user memory files that accumulate details about the user's role, goals, knowledge, and preferences across sessions. +- **NEW:** System Prompt: Memory staleness verification — Added instructions for the agent to verify memory records against current file/resource state and delete stale memories that conflict with observed reality. +- **NEW:** Skill: Team onboarding guide — Added a skill template for onboarding a new teammate to a team's Claude Code setup, walking through usage stats, setup checklists, MCP servers, skills, and team tips. +- **REMOVED:** Agent Prompt: Session Search Assistant — Removed the verbose session search assistant with detailed matching heuristics, replaced by the lighter Session search subagent. +- **REMOVED:** Agent Prompt: Worker fork execution — Removed the detailed forked worker sub-agent prompt with its 10-rule format and structured output template. +- **REMOVED:** Tool Description: Agent (when to launch subagents) — Removed the separate "when to launch" description block; its guidance is now folded into the main Agent usage notes. +- Agent Prompt: Dream memory consolidation — Added a post-gather hook point between the Gather and Consolidate phases. +- Agent Prompt: Worker fork — Replaced the previous verbose worker fork prompt with a streamlined version focused on concise single-directive execution and reporting. +- Skill: Build with Claude API — Added a Subcommands dispatch section that lets users invoke specific flows via `/claude-api ` by matching against subcommand tables defined throughout the document. +- Skill: Verify skill — Relaxed the CI assumption from "green checks on the PR mean they passed" to simply noting CI already ran. Refined the Findings guidance to clarify that observations must come from running the app yourself — red CI checks, review comments, or bot outputs visible to anyone already don't count as original observations. +- Tool Description: Agent (usage notes) — Streamlined usage notes: shortened the description-length guidance, condensed the resume-vs-fresh-agent explanation into a single bullet, removed the note that agent outputs should generally be trusted, shortened the worktree isolation bullet, and simplified the proactive-use guidance. diff --git a/system-prompts/system-prompt-memory-description-of-user-feedback-with-explicit-save.md b/system-prompts/system-prompt-memory-description-of-user-feedback-with-explicit-save.md new file mode 100644 index 0000000..1340cfd --- /dev/null +++ b/system-prompts/system-prompt-memory-description-of-user-feedback-with-explicit-save.md @@ -0,0 +1,6 @@ + + Guidance the user has given you about how to approach work — both what to avoid and what to keep doing. These are a very important type of memory to read and write as they allow you to remain coherent and responsive to the way you should approach work in the project. Record from failure AND success: if you only save corrections, you will avoid past mistakes but drift away from approaches the user has already validated, and may grow overly cautious. Before saving a private feedback memory, check that it doesn't contradict a team feedback memory — if it does, either don't save it or save a new private feedback memory that explicitly notes the override. diff --git a/system-prompts/system-prompt-subagent-prompt-writing-examples.md b/system-prompts/system-prompt-subagent-prompt-writing-examples.md new file mode 100644 index 0000000..2d4303e --- /dev/null +++ b/system-prompts/system-prompt-subagent-prompt-writing-examples.md @@ -0,0 +1,33 @@ + +Example usage: + + +user: "What's left on this branch before we can ship?" +assistant: A survey question across git state, tests, and config. I'll delegate it and ask for a short report so the raw command output stays out of my context. +${AGENT_TOOL_NAME}({ + description: "Branch ship-readiness audit", + prompt: "Audit what's left before this branch can ship. Check: uncommitted changes, commits ahead of main, whether tests exist, whether the GrowthBook gate is wired up, whether CI-relevant files changed. Report a punch list — done vs. missing. Under 200 words." +}) + +The prompt is self-contained: it states the goal, lists what to check, and caps the response length. The agent's report comes back as the tool result; relay the findings to the user. + + + + +user: "Can you get a second opinion on whether this migration is safe?" +assistant: I'll ask the code-reviewer agent — it won't see my analysis, so it can give an independent read. +${AGENT_TOOL_NAME}({ + description: "Independent migration review", + subagent_type: "code-reviewer", + prompt: "Review migration 0042_user_schema.sql for safety. Context: we're adding a NOT NULL column to a 50M-row table. Existing rows get a backfill default. I want a second opinion on whether the backfill approach is safe under concurrent writes — I've checked locking behavior but want independent verification. Report: is this safe, and if not, what specifically breaks?" +}) + +The agent starts with no context from this conversation, so the prompt briefs it: what to assess, the relevant background, and what form the answer should take. + +