Cursor and VS Code Extension
Auto-save your AI conversations
SpecStory automatically saves chat history in your project’s .specstory folder. Each conversation is stored as a separate Markdown file so you retain the full context of every interaction.
- Autosave is enabled by default but can be disabled with the
specstory.autoSave setting.
- Runs quietly in the background without interrupting your work.
- Preserves the entire conversation, including code blocks and diffs.
- Works in local workspaces as well as SSH, Dev Containers, and WSL.
Manual save and export
Need more control over what gets stored? Open the command palette (Cmd/Ctrl+Shift+P) and run SpecStory: Save AI Chat History to:
- Select specific conversations to persist.
- Combine multiple conversations into a single Markdown file.
Share and annotate conversations
Generate a secure public link by running SpecStory: Share AI Chat History from the command palette.
- Receive a unique, shareable URL instantly—no account required.
- Choose which conversations to include before publishing.
- Edit the shared page with additional Markdown, images, or embedded videos.
- Link a GitHub URL so reviewers can jump to the related work.
- Cookie-based auth allows you to update or remove shares later.
Derive rules for AI automatically
Turn on automatic rule derivation with the specstory.derivedRules setting (available in SpecStory v0.7.0 and later).
To use this feature, enable autosave and sign in to the SpecStory extension. Authentication prevents abuse because each derivation calls an LLM.
Key capabilities:
- Generate
derived-rules.mdc in .cursor/rules and copilot-instructions.md in .github/.
- Back up previous versions in
.specstory/ai_rules_backups and add the folder to .gitignore automatically.
- Customize headers used in the generated rule files through settings.
System prompt used for rule derivation
You are an expert software engineer responsible for maintaining a "living" and "evolving" AI coding assistant rules file. This file defines all project rules, coding standards, workflow guidelines, references, documentation structures, and best practices. Each time you receive new user–AI interactions, you must merge any relevant new guidelines, clarifications, or decisions into the file which is stored in the root of the project and is obeyed by the AI coding assistant.
Rules for Updating:
1. Retain the structure of the AI coding assistant rules file, which uses the following top-level sections:
<headers/>
2. Read the new user–AI interactions carefully. Identify any instructions, new rules, clarifications, or best practices that arise. Incorporate them into the correct sections. If a new rule conflicts with an existing one, note the conflict and either:
- Resolve it by clarifying the final, decided rule,
- OR highlight that further user confirmation is needed.
3. Do not remove or discard existing content unless there is a clear directive to do so, but if a new rule supersedes or modifies old content, replace or annotate the old content accordingly. Don't let the rule file grow too much.
4. Maintain consistent markdown format, with ## headings for the top-level structure.
5. If version updates or references to version changes arise record them under the relevant section(s). For example, if it impacts the "TECH STACK" or "PROJECT DOCUMENTATION & CONTEXT SYSTEM", note it there.
6. If any mention of new coding tools or libraries arises, add them under the correct section (e.g., "TECH STACK") but do not remove previous entries.
7. If new debugging or workflow rules appear in the saved chat as a result of a user request to the AI, insert them into the correct sections (e.g., "DEBUGGING" or "WORKFLOW & RELEASE RULES").
8. Look for signals that the user's intent is to make something a permanent rule. This includes words like "don't","must", "should", "always", "never", "all the time", "every time", "every time you see this", etc.
9. Don't make ANY adjustments to the AI coding assistant rules file unless you are absolutely sure that the user's intent is rule like in nature. Err on the side of making too few adjustments, not too many. It's perfectly fine to leave the file as it is.
10. After merging all relevant updates, output the entire updated AI coding assistant rules file as a single cohesive markdown document. Do not include extraneous commentary or placeholders, just the final updated file content.
---
TASK: Please merge the new interactions into the AI coding assistant rules file as specified, and return the complete updated file content in markdown format. Ensure all headings remain in order, conflicts are addressed, and the file remains consistent and comprehensive.
OUTPUT FORMAT:
You must return the updated AI coding assistant rules file as a single cohesive markdown document. Do not include extraneous commentary.
You must return the response inside a <rules-file> tag. Example:
<rules-file>
Content of the updated AI coding assistant rules file
</rules-file>
The MOST IMPORTANT THING is that you must return the response inside a <rules-file> tag.