Added features/diagnostic.mjs to help users verify their local TORCH environment.
Includes checks for Node.js version, dependencies, configuration, and connectivity.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updated `.hero h1` with a multi-stop animated gradient background.
- Added `@keyframes textShine` for the text gradient animation.
- Enhanced the background SVG with a `heroGlow` radial gradient and a large animated circle to provide a subtle ambient glow behind the hero section.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Added `scheduler:daily` and `scheduler:weekly` usage examples to README.md and TORCH.md.
- Added `lock:complete` and `lock:check:daily` usage examples to README.md and TORCH.md.
- Updated TODO list to reflect completion of documentation alignment.
- Verified script presence and syntax.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Implemented LexicalIndex class in src/services/memory/retriever.js.
- Added WeakMap caching for indices based on memory array references.
- Improved memory array stability in src/services/memory/index.js using a storeVersion counter.
- Achieved ~2x speedup for 10k memories and ~9x speedup for 100k memories in benchmarks.
- Maintains compatibility with existing textMatchSimilarity scoring.
Co-authored-by: PR0M3TH3AN <[email protected]>
Extracted duplicated target path resolution and allowlist validation logic
into a shared `resolveAndValidateTarget` helper function in
`src/services/governance/index.js`.
Updated `createProposal`, `validateProposal`, `applyProposal`, and
`rollbackPrompt` to use the new helper, ensuring consistent validation
and path handling across the service.
Added `test/governance-health.test.mjs` to verify validation logic.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Added `test/errors.test.mjs` with comprehensive tests for the `ExitError` class.
- Updated `src/errors.mjs` to set `this.name = 'ExitError'` in the constructor for better error reporting.
- Verified that all new tests pass and no regressions were introduced to the existing test suite.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replaced `execSync` with `execFileSync` in `src/services/governance/index.js` to avoid shell interpretation of variable-derived inputs (such as agent IDs and file targets). This mitigates command injection risks in `createProposal`, `applyProposal`, and `rollbackPrompt`.
- Used `execFileSync` for all git operations.
- Updated logic to correctly handle `git diff` exit code 1.
- Removed unused `execSync` import.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updates `cmdInit` to output the Nostr hashtag, namespace, and a direct dashboard URL upon completion.
- Refactors `createDashboardLinkFile` to return the generated URL for console output.
- Ensures the initialization process provides clear next steps for both human users and agents.
Co-authored-by: PR0M3TH3AN <[email protected]>
- README.md: add "Prompt Governance & Versioning CLI" and "State Backup
CLI" sections under Usage with full command examples and link to
docs/prompt-versioning.md
- TORCH.md: add "Prompt Versioning & State Backup" section with
proposal→apply→rollback cycle, backup command reference, and link to
docs/prompt-versioning.md
https://claude.ai/code/session_01Ndq2D72Kp77BYo4owD63uY
- Added `npm run scheduler:daily` to docs
- Added `npm run scheduler:weekly` to docs
- Added `npm run lock:complete` to docs
- Generated task log and artifacts for docs-alignment-agent run
Co-authored-by: PR0M3TH3AN <[email protected]>
.torch/ is created at runtime by torch-lock backup and proposal apply.
It holds prompt version archives and state snapshots — operational data
that should not be tracked in source control.
https://claude.ai/code/session_01Ndq2D72Kp77BYo4owD63uY
- governance/index.js: archive filenames now include ISO timestamp for
deterministic sorting (<base>_<ts>_<hash>.md); write .meta.json sidecar
on every archive with proposalId, author, reason, and archivedAt
- governance/index.js: add listPromptVersions(target) — returns archived
versions for a prompt sorted newest-first with sidecar metadata surfaced
- cmd-rollback.mjs: add --list flag to list available versions without
restoring (delegates to listPromptVersions)
- cli-parser.mjs: add --list and --output flags
- lib.mjs: pass list flag to cmdRollback; add backup command dispatch
- cmd-backup.mjs: new torch-lock backup command — snapshots
.scheduler-memory/memory-store.json and scheduler run state to
.torch/backups/<timestamp>/; supports --output override and --list
- docs/prompt-versioning.md: comprehensive guide to the full
proposal → apply → list-versions → rollback workflow, state backup
and restore procedure, and storage location reference
- test/governance.test.mjs: 7 scenario-based tests (SCN-proposal-create,
SCN-proposal-list, SCN-proposal-reject, SCN-archive-naming,
SCN-version-list, SCN-rollback-latest, SCN-rollback-hash)
https://claude.ai/code/session_01Ndq2D72Kp77BYo4owD63uY
Users who installed TORCH via `npm install <tarball> && npx torch-lock init`
had no built-in way to cleanly remove it. This adds a `remove` command that
detects and removes all TORCH artifacts: the torch/ directory, config files,
runtime directories (.torch/, .scheduler-memory/, task-logs/), governance
proposals, host package.json scripts, and the npm package itself.
- Add cmdRemove() in src/ops.mjs with detection, preview, confirmation, and cleanup
- Wire up `remove` command in CLI dispatcher (src/lib.mjs)
- Add TORCH_HOST_SCRIPTS constant in constants.mjs for shared script key list
- Add docs/removal.md with full manual removal instructions
- Add removal section to README.md
- Add 7 scenario tests in test/ops-remove.test.mjs
https://claude.ai/code/session_011Snrxu3iZGLtJ9pnFSajpM
- Extracted `RelayHealthManager` to `src/relay-health-manager.mjs`
- Extracted `LockPublisher` to `src/lock-publisher.mjs`
- Moved shared utilities to `src/lock-utils.mjs`
- Updated `src/lock-ops.mjs` to import dependencies and re-export public API
- Reduced `src/lock-ops.mjs` from 880 to 152 lines
- Verified with tests (295 passed) and linting
Co-authored-by: PR0M3TH3AN <[email protected]>