Adds a detailed architectural opinion/RFC in `docs/TORCH_EVOLUTION_CONCEPT.md` outlining the transition from a linear scheduler to a node-based workflow orchestrator. This document includes recommendations for UI (React Flow), integrations (OpenClaw, ClaudeCode CLI), and a phased roadmap.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updates `test/run-scheduler-cycle-memory-policy.test.mjs` to copy `src/utils.mjs`, `src/torch-config.mjs`, `src/constants.mjs`, `src/relay-health.mjs`, and `src/lock-ops.mjs` to the temporary test environment.
- Symlinks `node_modules` into the test environment to resolve external dependencies (e.g., `nostr-tools`).
- Resolves `ERR_MODULE_NOT_FOUND` errors during CI.
- Includes Protocol Research Agent daily run artifacts (Protocol Inventory update and Report).
Co-authored-by: PR0M3TH3AN <[email protected]>
Executed style-agent for daily cadence.
Ran npm run lint (and --fix), npm run build, and npm test.
Verified no style issues were auto-fixable.
Created completion log.
Co-authored-by: PR0M3TH3AN <[email protected]>
Explicitly defaults `AGENT_PLATFORM` to `'codex'` in the test environment for `run-scheduler-cycle-memory-policy.test.mjs`. This resolves assertion failures where tests expected platform metadata (e.g., `platform: 'codex'`) but received `'unknown'` in CI environments where the variable is unset.
Co-authored-by: PR0M3TH3AN <[email protected]>
The Claude Code remote sandbox strips `Upgrade: websocket` at the proxy
L7 layer, making all outbound WebSocket connections (including Nostr
relays used by torch-lock) unreachable. A local relay workaround was
investigated but rejected because it breaks cross-agent lock visibility
with Jules, which uses the public relay set.
Workaround: run all scheduler/lock operations exclusively from Jules
or any environment with unrestricted outbound WebSocket access.
Refs: anthropics/claude-code #490, #2059, #17333https://claude.ai/code/session_019g8yqKQMiq9u41n3GxUpFH
- Explicitly sets `AGENT_PLATFORM: 'codex'` in `test/run-scheduler-cycle-memory-policy.test.mjs` for tests that assert platform-specific output.
- Resolves CI failures where `detectPlatform` was falling back to `'unknown'` or the host environment's platform, causing assertion mismatches.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Addresses `ERR_MODULE_NOT_FOUND` in `test/run-scheduler-cycle-memory-policy.test.mjs` caused by missing dependency in the temporary test environment.
- Ensures `src/utils.mjs` is available for `scripts/agent/run-scheduler-cycle.mjs` during test execution.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Update `.prompts-grid` to use `minmax(280px, 1fr)` instead of `400px` to fit mobile screens.
- Add media query to reduce `.meta-prompts` padding on small screens.
- Add `word-break: break-all` and `overflow-wrap: break-word` to `#promptModal` code blocks to prevent horizontal overflow.
Co-authored-by: PR0M3TH3AN <[email protected]>
Lock backend error: all Nostr relays returned permanent_validation_error
(no WebSocket connectivity). perf-optimization-agent was selected as next
agent after perf-deepdive-agent (round-robin index 7). Prompt not executed;
lock:complete not published per scheduler strict_lock policy.
https://claude.ai/code/session_019g8yqKQMiq9u41n3GxUpFH
Resolves `ERR_MODULE_NOT_FOUND` in `run-scheduler-cycle-memory-policy.test.mjs` by explicitly copying `src/utils.mjs` to the temporary test directory structure, satisfying the import dependency of `scripts/agent/run-scheduler-cycle.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Execute `perf-agent` as part of the daily schedule.
- Generate performance reports `reports/performance/hits-2026-02-19.json` and `reports/performance/daily-perf-report-2026-02-19.md`.
- Create required run artifacts in `src/context/`, `src/todo/`, `src/decisions/`, and `src/test_logs/` with strict metadata.
- Validate run artifacts and linting.
- Publish task completion via `torch-lock`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updated `test/scheduler-preflight-lock.e2e.test.mjs` to expect `detectPlatform() || 'unknown'` instead of hardcoding `'codex'`.
- This ensures the test passes in CI environments where `detectPlatform()` returns `null`, causing the script to default to `'unknown'`, as well as in local environments where it detects a platform like `'jules'`. This aligns with the updated default logic in `run-scheduler-cycle.mjs`.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updated `test/scheduler-preflight-lock.e2e.test.mjs` to expect `detectPlatform() || 'codex'` instead of hardcoding `'codex'`.
- This ensures the test passes when running in environments where the platform is correctly detected (e.g., 'jules'), aligning with the changes made in the previous commit.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Updated `src/utils.mjs` to detect 'claude' platform via `CLAUDE_API_KEY`, `ANTHROPIC_API_KEY`, or `CLAUDE_SESSION_ID`.
- Updated `scripts/agent/scheduler-utils.mjs` `getSafeEnv` to preserve `JULES_`, `CODEX_`, `CLAUDE_`, `ANTHROPIC_`, and `GOOSE_` environment variables when spawning child processes.
- Updated `scripts/agent/run-scheduler-cycle.mjs` to use `detectPlatform()` as a fallback for `AGENT_PLATFORM` instead of hardcoding `'codex'`, ensuring the correct platform is used for lock creation.
- Added unit tests for `detectPlatform` in `test/utils.test.mjs`.
- Fixed `test/scheduler-lock-failure-schema.contract.test.mjs` to include `src/utils.mjs` in the temporary test environment, resolving `ERR_MODULE_NOT_FOUND`.
This resolves the issue where lock cards displayed "Unknown" or incorrect platforms and fixes the resulting CI failure.
Co-authored-by: PR0M3TH3AN <[email protected]>
The `files` array in package.json was missing 7 source modules and the
entire `src/services/` directory tree that `src/lib.mjs` imports at
runtime. Installing TORCH via `npm install` would crash immediately with
ERR_MODULE_NOT_FOUND on any CLI command.
Missing files added: cli-parser.mjs, errors.mjs, utils.mjs, lock-utils.mjs,
cmd-proposal.mjs, cmd-rollback.mjs, src/services/ (memory + governance),
and migrations/ for DB schema setup.
Also adds: engines (node >=22), license (MIT), repository, keywords,
exports map, LICENSE file — so the landing page install flow
(`npm install ... && npx torch-lock init`) works out of the box.
https://claude.ai/code/session_01CJFvLoy2BA8n9qk3z5BQQA
- Updated `src/utils.mjs` to detect 'claude' platform via `CLAUDE_API_KEY`, `ANTHROPIC_API_KEY`, or `CLAUDE_SESSION_ID`.
- Updated `scripts/agent/scheduler-utils.mjs` `getSafeEnv` to preserve `JULES_`, `CODEX_`, `CLAUDE_`, `ANTHROPIC_`, and `GOOSE_` environment variables when spawning child processes.
- Updated `scripts/agent/run-scheduler-cycle.mjs` to use `detectPlatform()` as a fallback for `AGENT_PLATFORM` instead of hardcoding `'codex'`, ensuring the correct platform is used for lock creation.
- Added unit tests for `detectPlatform` in `test/utils.test.mjs`.
This resolves the issue where lock cards displayed "Unknown" or incorrect platforms.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Added `.github/workflows/ci.yml` to run build, lint, and test on PRs/push to main.
- Updated `.github/workflows/ci-resilience-nightly.yml` to use Node.js 22.
- Fixed lint errors in `src/services/governance/index.js` (no-empty, preserve-caught-error).
- Added `governance-agent` to daily roster and scheduler prompt to fix `npm test` scheduler validation failure.
Co-authored-by: PR0M3TH3AN <[email protected]>