- Added "Clean Repo Standard" to `AGENTS.md` and `CLAUDE.md`, explicitly forbidding root-level logs/artifacts.
- Moved clutter files (`test_output_full.txt`, `benchmark-after.txt`, `dashboard.log`, etc.) to `test_logs/`, `task-logs/`, and `reports/performance/`.
- Moved `INITIAL_BASELINE.md` and other baseline files to `reports/performance/`.
- Updated `src/prompts/daily/perf-agent.md` and `src/prompts/daily/const-refactor-agent.md` to reference the new location of `INITIAL_BASELINE.md`.
- Updated `.gitignore` to ignore logs and temporary artifacts in the new directories.
- Moved `DIAGNOSIS.md` to `reports/performance/`.
- Moved `perf/` data files to `reports/performance/`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Created `reports/` directory with subdirectories for each category (audit, performance, security, etc.).
- Moved existing reports to the new `reports/` structure.
- Updated `AGENTS.md` to define the "Report Location Standard".
- Updated all agent prompts in `src/prompts/` to:
- Output reports to the new locations.
- Fix incorrect script paths (replaced `torch/scripts/` with `scripts/`).
- Updated `load-test-agent.md` to produce a Markdown summary report.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Created `AGENTS.md` and `CLAUDE.md` to define test integrity rules and behavior-based validation.
- Updated `TORCH.md` to include "Scenario-First Tests & Test Integrity" and the "Test Integrity & Scenario Spec Agent" role.
- Updated `src/prompts/daily/test-audit-agent.md` to adopt the new "Enforcer" role, prioritizing test fidelity over CI green state.
- Preserved existing scheduler contract headers in the agent prompt.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Added JSDoc to exported functions and classes in src/lock-ops.mjs
- Added inline comments to complex logic areas
- Created docs/lock-ops-overview.md
- Created task log for daily docs-code-investigator agent
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `package.json` to include `TORCH.md` and `scripts/memory/` in distribution.
- Update `README.md` to reference `TORCH.md` correctly.
- Update `src/ops.mjs` to robustly handle memory policy paths in `torch-config.json` generation.
- Update `.gitignore` to exclude `.scheduler-memory/`.
- Update `torch-config.example.json` to include memory policy with standard defaults.
Co-authored-by: PR0M3TH3AN <[email protected]>
Optimizes `saveMemoryStore` in `src/services/memory/index.js` to use `fs.promises.writeFile` instead of synchronous `fs.writeFileSync`.
Implements a coalescing mechanism to handle concurrent save requests efficiently, preventing race conditions and reducing I/O operations by batching pending updates into a single write.
Reduces event loop blocking from ~420ms (sync) to ~3ms (async) for large write operations in benchmarks.
Updates all `memoryRepository` methods to await the async save operation.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Implement caching for `rankRelays` to avoid redundant sorting and computations.
- Cache is invalidated on new outcomes or when quarantine status changes.
- Add `_metricsVersion` to track metrics updates.
- Benchmarks show ~3x performance improvement (0.06ms -> 0.02ms per call for 100 relays).
- Add unit tests for caching behavior and invalidation.
- Add `perf/benchmark-lock-ops.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Use Promise.all to execute memory lifecycle actions concurrently.
- Maintain intra-item dependency order (merged_into before action).
- Update tests to support non-deterministic execution order of independent items.
- Benchmark shows ~65x improvement for 100 items with 10ms latency.
Co-authored-by: PR0M3TH3AN <[email protected]>
Avoids redundant string concatenation and lowercasing in the inner loop of `buildSimilarityIndex`.
Pre-computes query terms and regexes once per query.
Uses RegExp.test for case-insensitive matching without allocation.
Benchmark shows ~2x speedup (99ms vs 191ms for 10k memories).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Replaced brittle regex-based sanitization with `path.resolve` relative to `packageRoot`.
- Added `test/dashboard-path-traversal-fix.test.mjs` to verify robust protection against traversal attacks.
- Verified that legitimate access to allowed paths is maintained.
- Verified that access to restricted files (like package.json) is blocked.
- Updated path handling to correctly handle absolute paths and URL-encoded characters.
This change addresses a potential security vulnerability where the previous sanitization logic could be bypassed in certain environments or with specific edge cases. By using standard path resolution and explicitly checking against a canonical root, the implementation is more secure and maintainable.
Co-authored-by: PR0M3TH3AN <[email protected]>
Refactored `src/cmd-list.mjs` to use a `Set` for roster lookups, reducing complexity from O(M*N) to O(M+N).
Added dependency injection to `cmdList` to enable unit testing.
Added `test/cmd-list.test.mjs` to verify functionality.
Co-authored-by: PR0M3TH3AN <[email protected]>
Sorts memories by created_at and uses an early exit condition in the inner loop to avoid checking all pairs. This reduces complexity from O(N^2) to roughly O(N * k) where k is the number of items within the duplicate window.
Measured improvement for 30k items: ~2.1s -> ~0.25s (8x speedup).
Co-authored-by: PR0M3TH3AN <[email protected]>
Restrict the /torch-config.json endpoint to only return fields required by the dashboard frontend (dashboard config excluding auth, and nostrLock namespace/relays). This prevents exposure of sensitive internal configuration such as rosters, scheduler settings, and full relay lists.
- Modify src/dashboard.mjs to sanitize config using an allowlist approach.
- Add test/dashboard-config-exposure.test.mjs to verify sensitive fields are stripped.
Co-authored-by: PR0M3TH3AN <[email protected]>
Adds standard HTTP security headers (CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy) to all dashboard responses to mitigate XSS, clickjacking, and MIME sniffing attacks.
Includes verification tests in test/dashboard-security.test.mjs.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Refactor `src/roster.mjs` to support dependency injection for `fs` and `loadTorchConfig`.
- Add `test/roster.test.mjs` to test roster loading scenarios including file precedence, caching, fallback, and configuration overrides.
- Export `_resetRosterCache` in `src/roster.mjs` for testing purposes.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Added `validateInstallDir` function to `src/ops.mjs` to enforce strict allowlist for directory names (alphanumeric, hyphens, underscores, slashes, periods).
- Integrated validation into `resolveConfiguration` to sanitize both interactive and mock inputs.
- Added comprehensive unit tests in `test/install_dir_validation.test.mjs`.
This fixes a vulnerability where malicious directory names could inject shell commands into `package.json` scripts during initialization.
Co-authored-by: PR0M3TH3AN <[email protected]>
Moved the `ensureDir` utility function from `src/ops.mjs` to `src/utils.mjs` to promote code reuse and centralization.
Updated `src/ops.mjs` and `src/services/memory/index.js` to use the shared utility.
Added unit tests for `ensureDir` in `test/utils.test.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
Verified by:
- Searching the codebase to confirm no imports.
- Running the tests to ensure no regressions.
- Running the build to ensure the process is unaffected.
Co-authored-by: PR0M3TH3AN <[email protected]>
Add comprehensive unit tests for `todayDateStr` and `nowUnix` in `src/utils.mjs`.
These tests use `node:test`'s mock timers to ensure deterministic execution, verifying
that the date formatting and timestamp generation behave as expected.
- `todayDateStr`: verified correct YYYY-MM-DD format
- `nowUnix`: verified correct integer timestamp generation
Co-authored-by: PR0M3TH3AN <[email protected]>
- Remove `src/cmd-check.mjs` as it is not used in the codebase and contains outdated logic.
- Remove `test/cmd-check.test.mjs` as it tests the deleted file.
- Verify that `cmdCheck` in `src/lib.mjs` is covered by `test/lib.test.mjs`.
This improves code health by removing unused and duplicate code.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Executed design-system-audit-agent on daily cadence
- Generated design system audit report (memory-update.md)
- Created run artifacts in src/context, src/todo, src/decisions, src/test_logs
- Published lock completion and final task log
Co-authored-by: PR0M3TH3AN <[email protected]>
- Created `CONTRIBUTING.md` with development instructions.
- Updated `README.md` to include a Development section.
- Added daily scheduler run artifacts.
- Completed scheduler cycle for `docs-agent`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Ran design-system-audit-agent.
- Audited landing/index.html for inline styles and design system violations.
- Applied safe auto-fixes to landing/index.html (margins, colors, text alignment).
- Generated audit report in task-logs/daily/.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Executed daily scheduler cycle.
- Selected `decompose-agent` (next in roster).
- Decomposed `scripts/agent/run-scheduler-cycle.mjs` (1127 lines) into `scripts/agent/scheduler-utils.mjs` (195 lines) and `scripts/agent/scheduler-lock.mjs` (173 lines).
- Resulting main file size: 788 lines (339 lines reduction).
- Fixed lint warnings.
- Updated `test/scheduler-preflight-lock.e2e.test.mjs`, `test/run-scheduler-cycle-memory-policy.test.mjs`, `test/scheduler-lock-failure-schema.contract.test.mjs` to copy new modules into test fixtures.
- Updated `test/scheduler-ratchet.test.mjs` to verify moved functions in `scheduler-lock.mjs`.
- Note: `scripts/check-file-size.mjs` was not updated as it lacks the baseline feature referenced in the prompt.
- Created artifacts: `src/context/CONTEXT_...`, `src/decisions/DECISIONS_...`, `src/test_logs/TEST_LOG_...`, `src/todo/TODO_...`.
- Created scheduler log: `task-logs/daily/2026-02-17T22-29-00Z__decompose-agent__completed.md`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Audited `/content` directory: Not found.
- Updated `KNOWN_ISSUES.md`.
- Fixed a bug in `src/lock-ops.mjs` where `deps` was undefined in `LockPublisher`.
- Created run artifacts and task logs.
Co-authored-by: PR0M3TH3AN <[email protected]>
`frontend-console-debug-agent` run:
- Fixed a 403 Forbidden error in `src/dashboard.mjs` preventing `src/constants.mjs` from loading by adding it to the `allowedPaths` whitelist.
- Refactored `src/lock-ops.mjs` to fix a critical syntax error in `LockPublisher` class.
- Fixed a typo in `src/cmd-check.mjs` (`queryLocksFn` -> `queryLocks`).
- Added `@playwright/test` for frontend debugging.
- Added `scripts/agent/debug_frontend.mjs` for reproduction.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Extracted hardcoded retry/health constants from `src/lock-ops.mjs` to `src/constants.mjs`.
- Refactored `src/lock-ops.mjs` to use `LockPublisher` class pattern and shared constants.
- Fixed `SyntaxError` in `src/lock-ops.mjs` (function inside function).
- Fixed `ReferenceError` in `src/cmd-check.mjs` (`queryLocksFn` -> `queryLocks`).
- Verified with unit tests (`test:unit:lock-backend`) and linting.
- Completed daily scheduler cycle for `const-refactor-agent`.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replaces synchronous `fs.readFileSync` with `fs.promises.readFile` in `loadTorchConfig` to prevent event loop blocking.
Updates all dependent configuration getters and consumers to use async/await.
Includes benchmark proving non-blocking behavior.
Fixes dashboard tests to properly await server listening.
Co-authored-by: PR0M3TH3AN <[email protected]>
Prevent sensitive environment variables from leaking into child processes spawned by the scheduler. Introduce `getSafeEnv` whitelist and default `runCommand` to use it. Explicitly allow system, node, CI, and application-specific (NOSTR_, TORCH_, SCHEDULER_, AGENT_) variables. Removed `inheritProcessEnv: true` from user commands to enforce this security policy. Added `Path` support for Windows.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Added `test/memory-run-prune-cycle.test.mjs` to test `runPruneCycle` logic.
- Covered active pruning, dry-run, off mode, telemetry/metrics, and scheduling.
- Utilized environment isolation (temp dir) to prevent side effects on `.scheduler-memory/memory-store.json`.
- Addressed testing gap for `runPruneCycle` in `src/services/memory/index.js`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Replaces module-level mutable state (`metricsByRelay`, `lastSnapshotAt`) with `RelayHealthManager` class.
- Moves state-dependent functions (`ensureRelayMetrics`, `rankRelaysByHealth`, etc.) to class methods.
- Updates `queryLocks` and `publishLock` to support dependency injection for `healthManager`.
- Maintains backward compatibility via `defaultHealthManager` singleton.
- Adds `test/relay-health-manager.test.mjs` to verify state isolation and functionality.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replaced `Math.random` with a cryptographically secure random number generator using `node:crypto.randomInt` in `src/lock-ops.mjs` to prevent potential timing attacks or predictability in backoff delays.
Added `test/secure-random.test.mjs` to verify the secure random generator.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added unit tests for triggerPruneDryRun in src/services/memory/index.js.
Tests cover database-backed pruning and in-memory fallback pruning using mocked repositories.
Also included validation of output structure.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Extracted complex retry logic from `publishLock` into `LockPublisher` class.
- Decomposed `publishLock` into `executePublishCycle`, `attemptPhase`, `analyzeFailures`, `determineFailureCategory`, and logging helpers.
- Preserved existing functionality and behavior including telemetry, health management, and error handling.
- Verified with existing tests.
Co-authored-by: PR0M3TH3AN <[email protected]>
Refactor `cmdCheck` in `src/cmd-check.mjs` to support dependency injection for better testability.
Add `test/cmd-check.test.mjs` with comprehensive unit tests for `cmdCheck`, covering happy paths and edge cases.
Verify tests pass with `node --test test/cmd-check.test.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modified `getRelevantMemories` in `src/services/memory/index.js` to accept optional `ranker` and `cache` parameters for dependency injection.
- Added `test/memory-index.test.mjs` with comprehensive unit tests for `getRelevantMemories` using `node:test` mocks.
- Verified that existing behavior is preserved via default parameters.
Co-authored-by: PR0M3TH3AN <[email protected]>
Add a unit test for `getCompletedAgents` in `src/lock-utils.mjs` to verify that:
1. It correctly identifies completed agents.
2. It handles `ENOENT` gracefully (silent).
3. It logs an error for non-`ENOENT` errors (e.g. permission denied).
The `getCompletedAgents` function already supported dependency injection via a `deps` object, which is utilized in this test to mock `fs.readdir` and other dependencies.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added `test/memory-ingest.test.mjs` to cover `ingestEvents` functionality.
Tests cover:
- Happy path ingestion with mocked repository and telemetry.
- Feature flag handling (skipping ingestion when disabled).
- Cache invalidation after ingestion.
- Deduplication logic.
- Error propagation from repository.
This improves test coverage for the memory service and ensures reliability of the ingestion process.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added comprehensive unit tests for `ingestEvents` in `src/services/memory/index.js`.
Tests cover:
- Happy path ingestion with mocked repository and telemetry.
- Feature flag skipping behavior.
- Cache clearing side effects.
- Deduplication logic.
- Error handling.
This improves test coverage and reliability for the memory service.
Co-authored-by: PR0M3TH3AN <[email protected]>
Optimizes the `getLatestFile` function in `scripts/agent/run-scheduler-cycle.mjs` by parallelizing the reading and parsing of log files using `Promise.all`. This replaces the sequential `for...of` loop which caused I/O bottlenecks when processing large numbers of log files.
Measured improvement: ~56% faster (530ms -> 207ms) for 1000 log files.
Also removed a tracked `test_output.log` file that shouldn't be in the repository.
Co-authored-by: PR0M3TH3AN <[email protected]>
Moved the large usage help text from `src/lib.mjs` to `src/constants.mjs` to improve readability and maintainability of the library file.
- Added `USAGE_TEXT` to `src/constants.mjs`.
- Updated `src/lib.mjs` to import and use `USAGE_TEXT`.
- Removed unused `DEFAULT_DASHBOARD_PORT` import from `src/lib.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
Add a test case to `test/memory-formatter.test.mjs` to ensure that `renderPromptWithMemoryContext` handles circular references in `agentContext` by falling back to `String(agentContext)` instead of throwing a `JSON.stringify` error.
This addresses a missing edge case in JSON serialization testing.
Co-authored-by: PR0M3TH3AN <[email protected]>
Adds focused unit tests for `unpinMemory` in `test/memory-pinning.test.mjs` to ensure it correctly updates the repository and clears the cache. Covers both happy path and non-existent ID scenarios.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added comprehensive unit tests for `summarizeHistory` in `src/relay-health.mjs`.
- Covers success rate calculation, window filtering, and all-down duration logic.
- Includes edge cases for empty history and malformed entries.
- Improves test coverage for relay health monitoring logic.
Co-authored-by: PR0M3TH3AN <[email protected]>
Introduced a `resolveIntegerConfig` helper function to handle environment variable checking, parsing, validation, and configuration fallback for integer settings. Updated `getQueryTimeoutMs`, `getPublishTimeoutMs`, `getMinSuccessfulRelayPublishes`, and `getMinActiveRelayPool` to use this helper. This improves code maintainability and consistency.
Co-authored-by: PR0M3TH3AN <[email protected]>
Adds a test case to `test/memory-formatter.test.mjs` to verify that `renderPromptWithMemoryContext` gracefully handles circular references in `agentContext` by falling back to string representation instead of throwing a JSON serialization error. This ensures the edge case at `src/services/memory/formatter.js:125` is covered.
Co-authored-by: PR0M3TH3AN <[email protected]>
Optimize the `verifyMemoryStep` function in `scripts/agent/run-scheduler-cycle.mjs` to check for artifact existence in parallel using `Promise.all` instead of a sequential loop.
Benchmarks indicate a ~10x performance improvement (from ~500ms to ~50ms) when checking for 10 artifacts where none or the last one exists, with no regression in the best-case scenario.
Verified with `test/run-scheduler-cycle-memory-policy.test.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Introduced `parseStringList` helper to handle parsing of string arrays from config.
- Replaced `parseRelayList` and `parseRoster` with `parseStringList`.
- Replaced inline parsing of `relays` and `dashboard.relays` with `parseStringList`.
- Unified behavior: empty lists in config now consistently return `null` instead of `[]`.
- Added unit test verifying consistent `null` return for empty lists.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added unit tests to `test/memory-pinning.test.mjs` to cover the `unpinMemory` function.
Tests verify:
- Successful unpinning and cache clearing.
- Handling of non-existent IDs (returns null) and cache clearing.
Co-authored-by: PR0M3TH3AN <[email protected]>
The dashboard previously served the raw `torch-config.json` file, potentially exposing sensitive information like authentication credentials.
This commit modifies the `/torch-config.json` endpoint to:
1. Parse the configuration file.
2. Sanitize the output by removing the `dashboard.auth` field and any unknown fields (using `parseTorchConfig`).
3. Support `TORCH_CONFIG_PATH` environment variable for configuration file location, improving testability and consistency with other components.
Verified with new test `test/dashboard-config-security.test.mjs` and existing auth tests.
Co-authored-by: PR0M3TH3AN <[email protected]>
This patch addresses a security vulnerability where the dashboard server could serve any file from the package root.
Changes:
- Implemented an allowlist in `src/dashboard.mjs` to restrict file access to:
- `dashboard/`
- `assets/`
- `src/docs/`
- `torch-config.json`
- Added `test/dashboard-security.test.mjs` to verify the fix and prevent regressions.
The fix ensures that sensitive files like `package.json` or source code cannot be accessed via the dashboard server.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `markMemoryMerged` to accept `options.repository` for better testability.
- Add unit tests in `test/memory-admin.test.mjs` to verify:
- Delegation to repository.
- Cache clearing side effect.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replaced `console.log` with `util.debuglog('torch-memory')` in `src/services/memory/index.js` to prevent stdout pollution. Telemetry and metrics are now logged to stderr only when `NODE_DEBUG=torch-memory` is set, improving library behavior and observability control.
Added regression test `test/memory-telemetry.test.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Add `test/memory-pinning.test.mjs` to test `pinMemory` happy path and edge cases.
- Update `getRelevantMemories` in `src/services/memory/index.js` to use `repository.listMemories` when available, enabling isolated unit testing.
- Verified all memory tests pass.
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit addresses the missing authentication vulnerability in the
dashboard server.
Changes:
- Added Basic Authentication support via TORCH_DASHBOARD_AUTH env var
or dashboard.auth config field.
- Defaulted dashboard host binding to 127.0.0.1 for better security.
- Added --host CLI argument to allow overriding the bind address.
- Used crypto.timingSafeEqual for secure credential comparison.
- Fixed a potential crash when parsing malformed Authorization headers.
- Added comprehensive unit tests for dashboard authentication.
- Updated documentation in README.md and torch-config.example.json.
Co-authored-by: PR0M3TH3AN <[email protected]>
Replace inefficient `[...events].reverse().find()` with `events.findLast()`.
This avoids a shallow copy of the array and an in-place reverse,
improving performance from O(N) space/time to O(1) space and O(N) time
(where N is the number of events searched).
In benchmarks with 100,000 events:
- Element near the end: 99.9% improvement (~0.8ms vs ~950ms)
- Element at the beginning: ~42% improvement (~145ms vs ~250ms)
Node.js v18.6.0+ is required for `findLast`, which is supported in the
current environment (v22.22.0).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Added `test/memory-formatter.test.mjs` with comprehensive unit tests for:
- `estimateTokenCount`
- `formatMemoryBlock`
- `formatMemoriesForPrompt`
- `renderPromptWithMemoryContext`
- Verified all tests pass and no regressions in related tests.
- Addressed testing gap in `src/services/memory/formatter.js`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Extracted `syncAppDirectories` and `syncAppFiles` helper functions.
- Updated `cmdInit` and `cmdUpdate` to use the new helpers.
- Improved `cmdInit` to throw an Error instead of warning when the target directory is not empty and not forced.
- Fixed hanging tests in `test/ops.test.mjs` by providing `MOCK_CONFIG`.
- Updated tests to verify strict directory check in `cmdInit`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updated `src/prompts/daily/test-audit-agent.md` to instruct the agent to run only unit tests during flakiness detection.
- Explicitly excluded composite scripts (e.g. `npm test` with lint/build) and slow integration/E2E tests from the repeated test loop.
- This prevents timeouts caused by running the full test suite (including network-dependent tests) multiple times.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modified `scripts/agent/run-scheduler-cycle.mjs` to generate a unique `memory-updates/<timestamp>__<agent>.md` path and pass it via `SCHEDULER_MEMORY_FILE` env var.
- Updated `scripts/memory/store.mjs` to prioritize `SCHEDULER_MEMORY_FILE` for ingestion.
- Updated `src/prompts/scheduler-flow.md` to instruct agents to write to the unique memory file.
- Updated `src/prompts/daily/torch-garbage-collection-agent.md` to include `memory-updates/*.md` in the cleanup scope.
- Moved existing `memory-update.md` to `memory-updates/legacy-memory-update-<timestamp>.md` to clear the root.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Modified build.mjs to run npm pack and move tarball to dist/
- Updated landing/index.html with download link and instructions
- Updated TORCH.md with Offline & Air-Gapped Installation guide
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updated `build.mjs` to correctly source `TORCH.md` and `docs/` from the project root instead of the non-existent `src/docs/`.
- Ensured `TORCH.md` is copied to `dist/src/docs/TORCH.md` as expected by the dashboard's fetch logic.
- Added `test/build_verification.test.mjs` to prevent regressions by verifying the presence of critical build artifacts (`TORCH.md`, assets, dashboard).
- Verified dashboard functionality (logos, settings modal) using a temporary Playwright script.
Co-authored-by: PR0M3TH3AN <[email protected]>
Added a settings modal to the dashboard (index.html) to allow configuration of hashtag, namespace, and relays via URL query parameters and localStorage. This enables the dashboard to be hosted as a static site and used by any project.
Also added `docs/architecture/distribution-plan.md` outlining the strategy for NPM, Binary, and Hosted Dashboard distribution.
Co-authored-by: PR0M3TH3AN <[email protected]>
Removes the "Autonomous Improvement Cycle" section, including the HTML block, Mermaid.js script import, and associated CSS styles, to simplify the landing page.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Merged AGENTS.md, CLAUDE.md, and src/docs/TORCH.md into a single TORCH.md in the root.
- Updated src/ops.mjs to copy TORCH.md during init/update and correctly transform path references.
- Updated src/prompts/META_PROMPTS.md and src/prompts/scheduler-flow.md to reference TORCH.md.
- Deleted obsolete AGENTS.md, CLAUDE.md, and src/docs/TORCH.md.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updated PROTOCOL_INVENTORY.md with NIP-40, NIP-78, and Kind 27235 details.
- Created protocol-report-2026-02-17.md.
- Verified system health with unit tests.
- Completed scheduler cycle (lock, memory, log).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Replaced fragile inline Node.js scripts in `torch-config.json` with dedicated modules: `scripts/memory/retrieve.mjs` and `scripts/memory/store.mjs`.
- Updated `src/ops.mjs` initialization logic to dynamically configure `scheduler.memoryPolicyByCadence` with correct paths based on the installation directory.
- Added default memory policy configuration to `torch-config.example.json` to guide users.
- Injected `torch:memory:list` and `torch:memory:inspect` convenience scripts into the host `package.json` during `init`.
- Removed legacy shell scripts (`run-memory-retrieval.sh`, `run-memory-store.sh`).
- Verified memory scripts function correctly and pass linting.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `scripts/agent/run-scheduler-cycle.mjs` to allow prompt files to start with a blockquote (`>`) in addition to a markdown header (`#`), unblocking agents with shared contract headers.
- Fix default validation command from `['npm', 'run', 'lint']` to `['npm run lint']` to prevent `npm` usage errors.
- Include daily task logs demonstrating successful scheduler cycle execution (skipping failed locks and completing `load-test-agent`).
Co-authored-by: PR0M3TH3AN <[email protected]>