Commit Graph
678 Commits
Author SHA1 Message Date
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
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
thePR0M3TH3AN d290bf684d Merge branch 'main' of https://github.com/PR0M3TH3AN/TORCH 2026-02-18 14:35:25 -05:00
thePR0M3TH3AN 28d6bc16fa update 2026-02-18 14:35:19 -05:00
thePR0M3TH3AN 6e26452dbb Merge pull request #303 from PR0M3TH3AN/test-integrity-audit-241146943857584817
Test Integrity Enforcement & Dashboard Security Fix
2026-02-18 14:34:10 -05:00
google-labs-jules[bot]andPR0M3TH3AN 9d0d7d274e chore: test integrity enforcement and dashboard security fix
- Refactored `test/memory-scheduler.test.mjs` to use `mock.timers` for deterministic execution, replacing flaky `wait` logic.
- Strengthened `test/lock-ops.test.mjs` with edge case tests for `parseLockEvent` handling invalid JSON and missing fields.
- Fixed a security vulnerability in `src/dashboard.mjs` where sensitive configuration (e.g., rosters, auth) was exposed in `/torch-config.json`.
- Updated `src/prompts/daily/test-audit-agent.md` to comply with the canonical prompt contract.
- Added `reports/test-audit/test-integrity-note-2025-02-14.yaml` detailing test changes and anti-cheat measures.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:33:29 +00:00
thePR0M3TH3AN 9615f34501 Merge pull request #302 from PR0M3TH3AN/jules-6936658898732632014-f312cadc
Add icons to Functional Agents on landing page
2026-02-18 14:31:53 -05:00
google-labs-jules[bot]andPR0M3TH3AN 79b9497270 feat: Add icons to Functional Agents on landing page
- Added AGENT_ICONS map in JS.
- Updated agent card rendering to include emoji icons.
- Added CSS for icon alignment.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:30:45 +00:00
thePR0M3TH3AN 62731f77fd Merge pull request #301 from PR0M3TH3AN/chore/clean-repo-standard-12872616590007917715
chore: Enforce Clean Repo Standard and organize artifacts
2026-02-18 14:28:33 -05:00
google-labs-jules[bot]andPR0M3TH3AN 326608ce7e chore: Enforce Clean Repo Standard and organize artifacts
- 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]>
2026-02-18 19:28:03 +00:00
thePR0M3TH3AN 984c35a039 Merge pull request #300 from PR0M3TH3AN/ai/innerhtml-fix/landing-index-5498721095203875822
[security] replace innerHTML usages in landing/index.html — convert to safe DOM APIs
2026-02-18 14:18:20 -05:00
google-labs-jules[bot]andPR0M3TH3AN b29f257b98 [security] replace innerHTML usages in landing/index.html — convert to safe DOM APIs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:17:12 +00:00
thePR0M3TH3AN 39a900a710 Merge pull request #299 from PR0M3TH3AN/landing-agent-showcase-6257913996332399187
feat: Add agent showcase to landing page
2026-02-18 14:09:40 -05:00
google-labs-jules[bot]andPR0M3TH3AN 0d13b28f53 Add agent showcase section to landing page
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 19:08:49 +00:00
thePR0M3TH3AN 4397529276 Merge pull request #298 from PR0M3TH3AN/chore/report-structure-update-9256819330559715470
Standardize agent report locations and fix script paths
2026-02-18 14:07:17 -05:00
google-labs-jules[bot]andPR0M3TH3AN 31b18f5d5a chore: standardize agent report locations and fix script paths
- 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]>
2026-02-18 19:05:42 +00:00
thePR0M3TH3AN 15375022bc Merge pull request #297 from PR0M3TH3AN/update-test-integrity-standards-13788430145668256212
Establish Scenario-First Testing Standards
2026-02-18 13:36:20 -05:00
google-labs-jules[bot]andPR0M3TH3AN 5d698a8455 feat: establish scenario-first testing standards
- 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]>
2026-02-18 18:35:38 +00:00
thePR0M3TH3AN d0e6dfcd13 Merge pull request #296 from PR0M3TH3AN/agents/daily/docs-code-investigator-2026-02-18-6970163250262674054
Daily Agent: docs-code-investigator - Document src/lock-ops.mjs
2026-02-18 13:25:03 -05:00
google-labs-jules[bot]andPR0M3TH3AN 8455c99dfc chore(ai): document src/lock-ops.mjs
- 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]>
2026-02-18 18:19:28 +00:00
thePR0M3TH3AN 5590933c5c Merge pull request #295 from PR0M3TH3AN/docs-alignment-agent-daily-fix-1003327856478317093
docs: align package config and documentation paths
2026-02-18 11:52:48 -05:00