v1.3.1
Hardening release: every finding from a full project audit, fixed. No new features, no output changes for normal projects (all 294 snapshots byte-identical).
Behavior change worth knowing
Existing files are never overwritten without --force. Previously, --tool agents (and cursor, copilot, windsurf, etc.) silently replaced an existing hand-written file, and --tool all bypassed the .claude/ protection entirely. Now every target skips files that already exist and lists them with a --force hint. --update remains the edit-preserving path for .claude/.
Fixed
Data loss
--updateno longer deletes user-authored skills/agents that follow the standardskills/<name>/SKILL.md/agents/<name>.mdlayout — removal is restricted to paths ContextEngine itself can generate--tool allno longer clobbers an edited.claude/CLAUDE.mdor skill files--updatenow preserves preamble edits, handles CRLF files, ignores##lines inside code fences, and never duplicates the footer
Security
- Strings read from the scanned repo (package name, script bodies, dependency versions) are sanitized before being embedded in AGENTS.md-family output — a malicious repo can no longer inject instructions into generated agent files
- File reads capped at 5 MB; tsconfig
extendsresolution bounded to the project root - CI workflow runs with least-privilege token permissions
Detection correctness
- tsconfig files with trailing commas now parse (strict-mode detection no longer silently fails)
extendsmerging fixed for array extends and diamond chains — a parent that doesn't mentionstrictcan no longer wipe it--no-agentsactually skips all agents (the code-reviewer agent was always emitted)workspace:*,latest,file:version specifiers render cleanly instead of leaking into the Stack section- Malformed
package.jsonnow produces a visible warning instead of a silent empty detection
CLI
- Strict argument parsing: typo'd flags (
--updat) and missing values (-dwith no path) exit with a clean error instead of being silently ignored or stack-tracing - Importing the package as a module no longer executes the CLI (
mainremoved)
Tests
- New unit suite covering
--updatesafety, overwrite guards, injection hardening, tsconfig edge cases, and the CLI layer (tests/unit.mjs, runs innpm testand before every publish) - Snapshot runner now fails on missing snapshots instead of silently passing
Full changelog: v1.3.0...v1.3.1