rebuild-installer

A rule requiring the installer to be rebuilt after changing source files that are included in the shipped runtime or installation package. The rebuild updates packaged artifacts and creates versioned downloads.

In plain words
What is it for?
Use it after changing installer scripts, runtime files, dependencies, extension files, or anything under the installation payload.
Why use it?
It prevents the installer and downloadable packages from becoming out of sync with the source code.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/ussdeveloper/memory-star/rebuild-installer
Clone the repo
git clone --depth 1 https://github.com/ussdeveloper/memory-star

Made for: Cursor.

Per session 517 This file is loaded in full into every session.
When invoked 517 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00517 $0.00517
Opus 5 $0.00259 $0.00259
Sonnet 5 $0.00103 $0.00103
Haiku 4.5 $0.00052 $0.00052

Measured today against content hash 3684d311d016, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rebuild-installer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/rebuild-installer.mdc · 51 lines

What it actually says

Rebuild the installer after changes

When you change any file that is part of what the installer ships or installs, you MUST rebuild the installer afterwards so the EXE/zip stay in sync with source.

Trigger files

Rebuild if you edit any of these (or their copies under dist/):

  • dist/MemoryStar-Setup.ps1, dist/MemoryStar-Setup.bat, dist/setup_launcher.py
  • server.py, database.py, config.py, quantum_storage.py, ui.html, requirements.txt
  • anything under dist/install/ or extension/

How to rebuild

powershell -ExecutionPolicy Bypass -File "<repo>\dist\build.ps1"

This re-syncs the dist/memorystar payload, repackages the VSIX, and rebuilds the installer. build.ps1 reads $script:InstallerVersion from MemoryStar-Setup.ps1 and names artifacts accordingly.

Artifact naming (always versioned)

Every build MUST produce version-stamped artifacts so downloads are self-identifying:

  • MemoryStar-Setup-v<version>.exe (canonical installer — always written)
  • MemoryStar-Windows-v<version>.zip (canonical package — always written)
  • MemoryStar-Setup.exe / MemoryStar-Windows.zip are unversioned aliases, refreshed best-effort (skipped with a warning if locked by a running process).

When pointing the user to the installer, refer them to the versioned file (MemoryStar-Setup-v<version>.exe), not the alias.

Rules

  • Bump $script:InstallerVersion in MemoryStar-Setup.ps1 AND update the header comment # ... vX.Y.Z, then add a CHANGELOG.md entry when behavior changes.
  • Keep MemoryStar-Setup.ps1 ASCII-only (non-ASCII breaks PowerShell on some Windows locales; build.ps1 fails fast on this) and syntactically valid (build.ps1 runs an AST parse check before building).
  • After building, confirm the versioned EXE timestamp/size so the rebuild actually succeeded.
  • Don't tell the user the installer is "built" unless build.ps1 finished successfully.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 51 lines · 517 tokens per session scan A 3684d311d016

Subscribe to this mod's changes

rebuild-installer is a cursor rule published in the GitHub repository ussdeveloper/memory-star (0 stars, last pushed 2mo ago), licensed MIT. It adds 517 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.