Skip to content

Conversation

@QiJi3
Copy link

@QiJi3 QiJi3 commented Oct 27, 2025

SpecStory Addon: Custom Path and Project Backup

Purpose

Add an optional backup layer for SpecStory: keep the original .specstory/history/ behavior, and in parallel back up conversations to a custom disk path. When project mode is enabled, backups are organized by project. Optionally, after verifying backups, the addon can delete the local .specstory directory on exit (controlled by specstory.customPath.cleanupOnExit).

What’s Included

  • getspecstory/addon/feature.md (in-repo reference)
  • getspecstory/addon/custom-path-injector.js
  • getspecstory/addon/path-override.js
  • getspecstory/addon/project-backup.js

These files are added as an addon. They do not replace or overwrite existing extension files.

Settings

All keys are under the "SpecStory" settings group.

  1. specstory.customPath.enabled (boolean, default: false)
    • Turn on the addon backup.
  2. specstory.customPath.projectMode (boolean, default: true)
    • When on: keep a unified history/ and a per-project folder.
    • When off: copy all files into one directory (legacy flat mode).
  3. specstory.customPath.location (string, default: D:/SpecStory)
    • Destination folder for backups.
    • The folder will be created if missing.
  4. specstory.customPath.cleanupOnExit (boolean, default: false)
    • On window close: compare and back up any missing/different files, then delete the local .specstory directory. Off by default.

How It Works (short)

  • The extension saves to .specstory/history/ as before.
  • The addon watches history directories and copies .md files to your custom path.
  • Project mode:
    • Unified: D:/SpecStory/history/filename.md
    • Per project: D:/SpecStory/<ProjectName>/filename.md
    • Auto-generate INDEX.md in both places when files exist.

Setup

  1. Open settings and search "SpecStory Custom".
  2. Enable: Custom Path: Enabled.
  3. Set: Custom Path: Location (e.g., D:/SpecStory).
  4. (Recommended) Enable: Custom Path: Project Mode.
  5. Reload Window.

Verify

  • Create a new AI conversation so .specstory/history/ gets a new .md.
  • Check your custom path:
    • D:/SpecStory/history/ has the new file
    • D:/SpecStory/<ProjectName>/ has the same file
  • Open DevTools (F12) → Console. Look for:
    • [SpecStory Backup] Configuration check: ...
    • [Project Backup] ✓ Saved to history: ...
    • [Project Backup] ✓ Saved to project: ...

Notes

  • Original saving behavior is unchanged; this is an additional backup.
  • Project name is derived from the workspace folder name.
  • Only .md files are processed.

Remove / Rollback

  • To disable: set specstory.customPath.enabled = false and reload window.
  • To remove addon from a local installation, delete the addon/ folder from the installed extension directory and restore the original dist/extension.js if you injected startup code.

Change Summary

  • Added addon/ with three scripts and a brief feature note.
  • Added four settings keys (see above). Defaults are safe for existing users.

Version

  • Target extension: v0.23.0
  • Addon status: ready to test in Cursor/VS Code.

@QiJi3
Copy link
Author

QiJi3 commented Oct 27, 2025

图片 This has only been tested in Cursor so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant