Commit Graph
697 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN fdfd0b9348 feat(scheduler): execute daily todo-triage-agent run
- Install dependencies via `npm ci`
- Run preflight lock check
- Select `todo-triage-agent` (skipping locked agents)
- Execute `todo-triage-agent` prompt:
  - Scan codebase for TODOs (none found)
  - Generate required artifacts in `src/context`, `src/todo`, `src/decisions`, `src/test_logs`
- Verify run artifacts
- Publish lock completion
- Create final task log

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-19 18:15:59 +00:00
thePR0M3TH3AN dcbc07ba42 Merge pull request #317 from PR0M3TH3AN/agents/daily/protocol-research-agent-run-9833362316977900264
Run protocol-research-agent (Daily)
2026-02-19 08:38:55 -05:00
thePR0M3TH3AN fa59d658d6 Merge branch 'main' into agents/daily/protocol-research-agent-run-9833362316977900264 2026-02-19 08:38:47 -05:00
google-labs-jules[bot]andPR0M3TH3AN cc9a3fe69e Fix CI failure: copy missing deps & symlink node_modules in memory policy test
- 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]>
2026-02-19 13:29:58 +00:00
thePR0M3TH3AN a80e6c499d Merge pull request #322 from PR0M3TH3AN/agents/weekly/pr-review-agent-run-16938229244744827656
Weekly Scheduler Run: pr-review-agent
2026-02-19 08:11:06 -05:00
google-labs-jules[bot]andPR0M3TH3AN 09268c2d4c chore(scheduler): run weekly pr-review-agent cycle
- Executed weekly scheduler cycle for pr-review-agent.
- Generated task log for simulated run failure (due to missing artifacts in simulation).
- Ensured log filename is cross-platform compatible.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-19 05:09:57 +00:00
thePR0M3TH3AN 76234bf90c Merge pull request #321 from PR0M3TH3AN/agents/daily/style-agent-7949368479327247551
chore(ai): run style-agent daily task
2026-02-18 21:46:52 -05:00
thePR0M3TH3AN 19f73142cf Merge pull request #316 from PR0M3TH3AN/agents/daily/perf-agent-run-16751979136899284510
Execute daily perf-agent run
2026-02-18 21:46:35 -05:00
google-labs-jules[bot]andPR0M3TH3AN a4766fe745 chore(ai): run style-agent daily task
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]>
2026-02-19 02:28:27 +00:00
google-labs-jules[bot]andPR0M3TH3AN 69b605efcd fix(test): set AGENT_PLATFORM=codex in scheduler memory policy tests
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]>
2026-02-19 02:19:42 +00:00
thePR0M3TH3AN e5ec4c21c7 Merge pull request #318 from PR0M3TH3AN/mobile-landing-fix-10979624231884595343
fix(landing): improve mobile responsiveness
2026-02-18 21:16:34 -05:00
thePR0M3TH3AN acdb240ea2 Merge pull request #320 from PR0M3TH3AN/claude/setup-agent-scheduler-Yh4Zz
Document Claude Code WebSocket blocking issue and scheduler constraints
2026-02-18 21:14:11 -05:00
Claude 29fa9bd87a docs(known-issues): document Claude Code WebSocket proxy block
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, #17333

https://claude.ai/code/session_019g8yqKQMiq9u41n3GxUpFH
2026-02-19 01:40:45 +00:00
google-labs-jules[bot]andPR0M3TH3AN bf41f181ee fix(test): inject AGENT_PLATFORM=codex in scheduler cycle tests
- 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]>
2026-02-19 01:09:14 +00:00
google-labs-jules[bot]andPR0M3TH3AN e4fecf631b fix(test): copy src/utils.mjs to temp dir in scheduler cycle test
- 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]>
2026-02-19 01:04:59 +00:00
google-labs-jules[bot]andPR0M3TH3AN 031f042ee0 fix(landing): improve mobile responsiveness for modal and meta prompts
- 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]>
2026-02-19 01:00:20 +00:00
Claude a18481151c scheduler(weekly): record failed lock acquisition for perf-optimization-agent
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
2026-02-19 00:59:32 +00:00
google-labs-jules[bot]andPR0M3TH3AN afefda9281 fix(test): copy src/utils.mjs to temp env in scheduler tests
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]>
2026-02-19 00:58:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN 58000b69ad Run protocol-research-agent (Daily)
- Executed protocol-research-agent prompt
- Verified PROTOCOL_INVENTORY.md
- Created src/context/CONTEXT_2026-02-19.md
- Created reports/protocol/protocol-report-2026-02-19.md
- Created task-logs/daily/2026-02-19T00-42-38Z__protocol-research-agent__completed.md

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-19 00:45:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN b6af6f49bf feat(scheduler): execute daily perf-agent run
- 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]>
2026-02-19 00:29:33 +00:00
thePR0M3TH3AN f795bd5ae6 Merge pull request #315 from PR0M3TH3AN/agents/daily/onboarding-audit-agent-11360221078717616389
chore(scheduler): Execute onboarding-audit-agent
2026-02-18 19:13:03 -05:00
thePR0M3TH3AN d6ae271af2 Merge pull request #314 from PR0M3TH3AN/agents/daily/log-fixer-agent-run-2026-02-18-18400288346421849588
Daily Run: log-fixer-agent
2026-02-18 19:12:27 -05:00
thePR0M3TH3AN 2eb6103eab Merge pull request #312 from PR0M3TH3AN/fix-platform-detection-unknown-763535823094544277
Fix "Unknown" platform on Nostr task cards
2026-02-18 19:12:11 -05:00
google-labs-jules[bot]andPR0M3TH3AN d6a1e22f56 chore(scheduler): Execute onboarding-audit-agent
- Executed onboarding-audit-agent daily task.
- Validated onboarding from a clean checkout (npm install, build, test, lint).
- Updated package-lock.json with missing metadata (license, engines).
- Created audit report in reports/audit/.
- Created required context/todo/decision artifacts in src/.
- Completed scheduler lock cycle.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 23:23:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN ac87628317 chore(scheduler): execute daily log-fixer-agent run
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 22:31:57 +00:00
google-labs-jules[bot]andPR0M3TH3AN 23bb42a20c Fix: Update e2e test to allow 'unknown' platform
- 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]>
2026-02-18 21:55:00 +00:00
google-labs-jules[bot]andPR0M3TH3AN f003970195 Fix: Update e2e test to match detected platform
- 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]>
2026-02-18 21:51:11 +00:00
thePR0M3TH3AN 1bb4c13e7e update 2026-02-18 16:50:21 -05:00
thePR0M3TH3AN a5cca81c30 Merge pull request #313 from PR0M3TH3AN/claude/improve-torch-packaging-lOqRg
Improve package.json metadata and add MIT license
2026-02-18 16:48:57 -05:00
google-labs-jules[bot]andPR0M3TH3AN c1a4499499 Fix: Correctly detect agent platform and fix test fixture
- 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]>
2026-02-18 21:46:40 +00:00
Claude 9f12370169 fix: include all runtime source files in npm package and add missing metadata
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
2026-02-18 21:46:08 +00:00
google-labs-jules[bot]andPR0M3TH3AN ae2e382bfd Fix: Correctly detect agent platform for locks
- 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]>
2026-02-18 21:42:56 +00:00
thePR0M3TH3AN a5c8912487 update 2026-02-18 16:26:18 -05:00
thePR0M3TH3AN e413eab724 Merge pull request #311 from PR0M3TH3AN/ci-setup-and-fixes-10894038276523678908
feat: Setup Standard CI Workflow & Fix Pre-existing Failures
2026-02-18 16:25:19 -05:00
google-labs-jules[bot]andPR0M3TH3AN dd9e5b7921 feat: add standard CI workflow and fix lint/test failures
- 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]>
2026-02-18 21:24:43 +00:00
thePR0M3TH3AN 49e06a6b55 Merge pull request #309 from PR0M3TH3AN/daily/load-test-agent-9115862611820365261
Implement load-test-agent harness
2026-02-18 16:10:29 -05:00
thePR0M3TH3AN ef4153ac04 Merge pull request #310 from PR0M3TH3AN/feat/governance-system-10850569312324536853
Governance System for Prompt Evolution
2026-02-18 16:10:02 -05:00
google-labs-jules[bot]andPR0M3TH3AN 64b6f43df1 feat: add governance system for prompt evolution
Implement a comprehensive governance system to manage agent prompt changes safely.

Key features:
- **Proposal Workflow:** Prompt changes are now "proposals" stored in `src/proposals/` with metadata and diffs.
- **Governance Agent:** A new `governance-agent` reviews and applies proposals using `scripts/governance/process-proposals.mjs`.
- **Validation:** Strict validation ensures changes are limited to allowed directories (`src/prompts/daily|weekly`) and preserve required headers.
- **Lock Enhancements:** Lock events now include `promptHash`, `promptPath`, and `gitCommit` for full auditability.
- **Rollback:** New `torch-lock rollback` command restores prompts from local history (`.torch/prompt-history/`) or git.
- **CLI:** Added `proposal` (create, list, show, apply, reject) and `rollback` commands.

This establishes a "Stage -> Evaluate -> Apply" gate for prompt evolution, preventing silent drift and ensuring constitutional stability.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 21:09:39 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1dfabdcd66 feat: implement load-test-agent harness and report
- Create scripts/agent/load-test.mjs with nostr-tools and ws.
- Generate load test report in reports/load-test/.
- Verify with dry run.
- Scheduler cycle completion log for load-test-agent.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 21:09:27 +00:00
thePR0M3TH3AN 470093d9ad Merge pull request #308 from PR0M3TH3AN/fix/repo-structure-cleanup-5809779313529911493
Cleanup repo structure and consolidate tests
2026-02-18 15:50:12 -05:00
google-labs-jules[bot]andPR0M3TH3AN 12625bc41b Cleanup repo structure and consolidate tests
- Consolidated `tests/` into `test/`
- Moved `test-audit/` scripts to `scripts/test-audit/`
- Updated audit scripts to support configurable output directory
- Removed root clutter (`test_output.txt`)
- Updated documentation and agent prompts

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 20:49:19 +00:00
thePR0M3TH3AN bec0b2ba0d update 2026-02-18 15:25:38 -05:00
thePR0M3TH3AN 9ef264a123 Merge pull request #307 from PR0M3TH3AN/landing-agent-categories-9165735125889184858
Categorize Functional Agents on Landing Page
2026-02-18 15:11:35 -05:00
thePR0M3TH3AN 24d614d2de Merge pull request #305 from PR0M3TH3AN/agents/daily/known-issues-agent-2026-02-18-13101749504477936442
Run known-issues-agent: Fix content-audit path and update known issues
2026-02-18 15:07:57 -05:00
google-labs-jules[bot]andPR0M3TH3AN 8bf1ca13f7 feat(landing): categorize agents by function
This change updates the landing page (`landing/index.html`) to group functional agents into "TORCH Maintenance & Agent Evolution" and "Repo Development" categories, instead of the default "Daily" and "Weekly" schedule-based grouping.

- Introduced `AGENT_CATEGORIES` mapping in `landing/index.html`.
- Updated `fetchAgents` to flatten the roster and group by functional category.
- Preserved the "Daily"/"Weekly" badge on agent cards.
- Verified changes with a Playwright script checking for the presence of new category headers.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 20:03:38 +00:00
thePR0M3TH3AN 8638cb1961 Merge pull request #306 from PR0M3TH3AN/agents/weekly/perf-deepdive-agent-17352164718786000343
perf: optimize rankRelays for subset queries
2026-02-18 14:58:20 -05:00
google-labs-jules[bot]andPR0M3TH3AN 6614535361 perf: optimize rankRelays for subset queries
- Optimized `RelayHealthManager.rankRelays` to use O(M log M) lookup for small subsets instead of O(N) filter.
- Added `byRelay` Map to `_sortedCache` for O(1) access.
- Fixed `NaN` bug in `buildRelayHealthConfig` when `minActiveRelayPool` is undefined.
- Updated `perf/benchmark-lock-ops.mjs` to measure subset performance.
- Added performance report `reports/performance/weekly-perf-report-2026-02-18.md`.
- Achieved ~6.8x speedup in benchmark.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:54:47 +00:00
google-labs-jules[bot]andPR0M3TH3AN 3cf6f2e3b2 feat(known-issues-agent): resolve content-audit-agent target directory and update triage report
- Fixed `content-audit-agent` target directory by updating `src/prompts/daily/content-audit-agent.md` to reference `docs/` instead of `/content`.
- Verified `npm test` prompt contract violations are resolved.
- Updated `KNOWN_ISSUES.md` with resolved status and verification dates.
- Generated `reports/known-issues/known-issues-report-2026-02-18.md` with triage summary.
- Ensured memory retrieval and storage workflows were executed.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:52:48 +00:00
thePR0M3TH3AN 9875a6911d Merge pull request #304 from PR0M3TH3AN/landing-roster-fix-14816716682107673373
Fix landing page missing roster and prompts
2026-02-18 14:51:04 -05:00
google-labs-jules[bot]andPR0M3TH3AN bbbe9980d7 fix(build): ensure agent roster and prompts are included in dist
The landing page (`landing/index.html`) relies on fetching `roster.json` and agent markdown files from `src/prompts/`. Previously, the build process did not copy these files to the `dist/` directory, causing 404 errors on the hosted landing page.

This change:
- Modifies `build.mjs` to recursively copy `src/prompts/` to `dist/src/prompts/`.
- Updates `build.mjs` to replace `../src/prompts/` paths in `landing/index.html` with `src/prompts/` during the build, ensuring correct path resolution when served from `dist/`.
- Removes the individual `META_PROMPTS.md` copy step as it is now covered by the directory copy.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:49:38 +00:00