diff --git a/src/scripts/memlog.py b/src/scripts/memlog.py index 709870b32..e7f1f245e 100644 --- a/src/scripts/memlog.py +++ b/src/scripts/memlog.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # /// script -# requires-python = ">=3.10" +# requires-python = ">=3.8" # /// """memlog — an append-only memory log: LLM-optimal working memory for a skill. @@ -66,6 +66,8 @@ Commands: Addressing: `--workspace` is the run folder, and the memlog is always {workspace}/.memlog.md. `--path` points straight at the memlog file instead, for callers that already hold the path. """ +from __future__ import annotations # keep type-hint syntax lazy so the script runs on 3.8+ + import argparse import json import os diff --git a/tools/installer/core/installer.js b/tools/installer/core/installer.js index 9347e1f0b..85d47c26e 100644 --- a/tools/installer/core/installer.js +++ b/tools/installer/core/installer.js @@ -630,6 +630,7 @@ class Installer { /** * Sync src/scripts/* → _bmad/scripts/ so shared Python scripts * (e.g. resolve_customization.py) are available at install time. + * Excludes dev-only tests and Python caches so they don't ship to users. * Wipes the destination first so files removed or renamed in source * don't linger and get recorded as installed. Also seeds * _bmad/custom/.gitignore on fresh installs so *.user.toml overrides @@ -643,7 +644,12 @@ class Installer { await fs.remove(paths.scriptsDir); await fs.ensureDir(paths.scriptsDir); - await fs.copy(srcScriptsDir, paths.scriptsDir, { overwrite: true }); + // Ship only the runtime scripts — dev-only tests and Python caches must not land in user projects. + const isInstallable = (srcPath) => { + const base = path.basename(srcPath); + return base !== 'tests' && base !== '__pycache__' && base !== '.pytest_cache' && !base.endsWith('.pyc'); + }; + await fs.copy(srcScriptsDir, paths.scriptsDir, { overwrite: true, filter: isInstallable }); await this._trackFilesRecursive(paths.scriptsDir); const customGitignore = path.join(paths.customDir, '.gitignore');