Commit Graph
107 Commits
Author SHA1 Message Date
thePR0M3TH3AN 6870c3a610 TASK-conversation-console-workflow: retain nested-route assertion 2026-10-01 08:21:55 -04:00
thePR0M3TH3AN 8ba1af611c TASK-conversation-console-workflow: keep nested capture on supported route 2026-10-01 08:17:56 -04:00
thePR0M3TH3AN 6988fe3b1a TASK-conversation-console-workflow: keep verification limits visible 2026-10-01 08:08:21 -04:00
thePR0M3TH3AN 8916038215 TASK-conversation-console-workflow: verify current preview after repeated refresh 2026-10-01 07:55:37 -04:00
thePR0M3TH3AN 0747b35341 TASK-conversation-console-workflow: preserve drafts after preview invalidation 2026-10-01 07:49:05 -04:00
thePR0M3TH3AN ffff333f48 TASK-conversation-console-workflow: refresh stale previews and focus deep links 2026-10-01 07:37:07 -04:00
thePR0M3TH3AN a67a04d57f TASK-conversation-console-workflow: preserve startup title check 2026-10-01 07:01:58 -04:00
thePR0M3TH3AN 5d43b2deb3 TASK-conversation-console-workflow: preserve dashboard captures across views 2026-10-01 06:58:12 -04:00
thePR0M3TH3AN 0fdfcb3b68 TASK-3909cbf6-10c6-44ce-b82e-5bfb62cf34c8 harden artifact target guard 2026-10-01 05:45:12 -04:00
thePR0M3TH3AN 014bdb4f97 TASK-3909cbf6-10c6-44ce-b82e-5bfb62cf34c8 isolate dashboard artifacts 2026-10-01 05:33:22 -04:00
thePR0M3TH3AN f46c713cc9 TASK-pilot-generated-check-artifacts isolate check outputs
Closes: TASK-pilot-generated-check-artifacts
2026-09-30 19:33:30 -04:00
thePR0M3TH3AN 03fcbdd23f Checkpoint portable TORCH fleet, provider adapters and owner dashboard 2026-09-30 13:28:40 -04:00
thePR0M3TH3AN 056fab8af4 Remove superseded Nostr implementation 2026-09-27 16:59:32 -04:00
google-labs-jules[bot]andPR0M3TH3AN 624f322383 [security] replace innerHTML usages in dashboard/app.js — convert to safe DOM APIs
- Replaced innerHTML assignment in dashboard/app.js with DOMParser.
- Updated baseline count in scripts/check-innerhtml.mjs.
- Generated context, todo, decisions, and test logs for innerhtml-migration-agent.
- Executed full scheduler daily flow and published lock/completion.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-03-02 20:17:40 +00:00
google-labs-jules[bot]andPR0M3TH3AN f98827c350 [security] replace innerHTML usages with DOMPurify and textContent
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-28 03:47:35 +00:00
thePR0M3TH3AN 802711f00c Merge pull request #478 from PR0M3TH3AN/scheduler-agent-selection-13421489652897686129
Add scheduler agent selection script
2026-02-26 21:51:50 -05:00
google-labs-jules[bot]andPR0M3TH3AN 361a3de27a feat: add scheduler agent selection script
- Implements `scripts/agent/select-agent.py` to handle daily agent rotation.
- Logic includes round-robin selection with exclusion of locked, completed, and paused agents.
- Supports input from `lock:check` JSON output.
- Robustly handles empty logs and first-run scenarios.
- Verified with unit tests covering basic selection, exclusion logic, and wrap-around.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 02:47:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN b9da3ae2d1 Decompose run-scheduler-cycle.mjs and fix CI validation
- Extracted scheduler logic into `scheduler-config.mjs`, `scheduler-logger.mjs`, and `scheduler-state.mjs`.
- Updated `run-scheduler-cycle.mjs` to import from these new modules.
- Updated `scripts/validate-scheduler-flow-parity.mjs` to check the new modules for required prompt snippets.
- Updated `test/scheduler-lock-failure-schema.contract.test.mjs` to copy the new dependency modules into the test fixture.
- Reduced `run-scheduler-cycle.mjs` size by ~333 lines.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 00:21:53 +00:00
google-labs-jules[bot]andPR0M3TH3AN 74950ca1a9 Decomposed scripts/agent/run-scheduler-cycle.mjs into modular components
Extracted logic into scheduler-config.mjs, scheduler-logger.mjs, and scheduler-state.mjs to improve maintainability and reduce file size (1160 -> 827 lines). Corrected module imports and verified via linting and dry-run usage.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-27 00:15:50 +00:00
thePR0M3TH3AN 811f45b3af Harden memory workflow to reduce merge conflicts 2026-02-26 08:18:47 -05:00
thePR0M3TH3AN 1e3f88e488 Fix Windows-unsafe artifact filenames and enforce safe timestamp format 2026-02-25 21:07:32 -05:00
thePR0M3TH3AN 1fa4d4560e Fix host-repo scheduler config resolution and handoff defaults 2026-02-25 14:48:11 -05:00
thePR0M3TH3AN 723d9c8b53 Fix host-repo scheduler flow and init lint compatibility 2026-02-25 14:36:29 -05:00
thePR0M3TH3AN 55208c2e45 Merge origin/main into refactor/lock-ops-decomposition-2507393976208881863 (resolve conflicts) 2026-02-25 12:22:43 -05:00
google-labs-jules[bot]andPR0M3TH3AN 964f33b91c daily: test-audit-agent execution and tooling fix
Executed test-audit-agent.
- Fixed scripts/test-audit/run-flaky-check.mjs to exclude Playwright tests by default.
- Generated audit report in reports/test-audit/.
- Created completion log.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-24 19:18:57 +00:00
google-labs-jules[bot]andPR0M3TH3AN 45f0e16631 feat(scheduler): execute load-test-agent daily run
- Implement `scripts/agent/simple-relay.mjs` for local load testing
- Execute `load-test-agent` prompt via scheduler flow
- Generate load test reports and run artifacts
- Complete daily task for `load-test-agent`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-22 23:09:26 +00:00
google-labs-jules[bot]andPR0M3TH3AN 003e18b93b Fix CI lint error in lock-publisher.mjs
- Ensure `src/lock-publisher.mjs` does not import `randomInt`.
- Clean up test output artifacts.
- Re-verify tests pass locally.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 20:48:15 +00:00
thePR0M3TH3AN 9fef4c4f46 update 2026-02-21 15:16:45 -05:00
google-labs-jules[bot]andPR0M3TH3AN c0c5ac5473 fix(torch-lock): re-apply fixes for circular deps and syntax errors
- Moved `withTimeout` implementation to `src/lock-utils.mjs` and exported it correctly.
- Removed duplicate local definitions of `withTimeout`, `mergeRelayList`, and `secureRandom` in `src/lock-ops.mjs` and `src/lock-publisher.mjs`.
- Fixed imports in `src/lock-ops.mjs`, `src/lock-publisher.mjs`, and `src/relay-health.mjs` to use `src/lock-utils.mjs` consistently.
- Updated `test/utils.test.mjs` and `test/utils-async.test.mjs` to fix broken imports and test definitions.
- Verified `npm run lock:complete` and `npm run scheduler:daily` execute correctly.
- Updated `src/todo/TODO_2026-02-20T03-00-00Z.md` to mark verification task as completed.
- Verified `src/relay-health.mjs` does not use `MINUTE_MS` locally, despite mysterious CI error. Confirmed imports are correct.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-21 19:23:48 +00:00
google-labs-jules[bot]andPR0M3TH3AN 1a46fd0484 feat(docs): add broken link validation script
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 21:53:25 +00:00
google-labs-jules[bot]andPR0M3TH3AN 0927372c82 feat(perf): establish baseline and identify async patterns
- Scanned codebase for `setInterval`, `Promise.all`, and other async patterns.
- Generated `reports/performance/hits-2026-02-20.json`.
- Identified potential unbounded concurrency in `src/services/memory`.
- Created daily performance report.
- Updated run artifacts and memory.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 19:36:55 +00:00
thePR0M3TH3AN 2b8a0c3d0d update 2026-02-20 12:51:17 -05:00
thePR0M3TH3ANandClaude Sonnet 4.6 a5f08ff082 feat(scheduler): add local time-window guard to prevent within-window re-runs
Adds a cadence-aware time-window check that runs after the Nostr relay lock
check to exclude agents that already ran within the current window (24h daily,
7d weekly). This closes the cross-midnight edge case where the relay's
date-scoped d-tag rolls over but the agent ran minutes ago.

Changes:
- scheduler-utils.mjs: export log-parsing helpers (parseDateValue,
  parseTimestampFromFilename, parseAgentFromFilename, isStrictSchedulerLogFilename,
  parseFrontmatterCreatedAt, parseFrontmatterAgent, parseFrontmatterValue) plus
  CADENCE_WINDOW_MS constant and buildRecentlyRunExclusionSet(). Helpers are
  exported so they can be unit-tested independently. Adds 'node:path' import.
- run-scheduler-cycle.mjs: import the moved helpers from utils (removes ~45 lines
  of duplicate definitions), call buildRecentlyRunExclusionSet after excludedSet
  is built from relay data, merge results, log newly-excluded agents. Adds cycle
  saturation detection: when all roster agents are covered by the time-window
  guard, exit 0 with a clear "Cycle complete" message instead of a failure.
- test/scheduler-time-window.test.mjs: 30 new scenario-first unit tests covering
  SCN-TWG-01..11 (in-window exclusion, out-of-window pass-through, cross-midnight,
  frontmatter precedence, weekly threshold, empty dir, missing dir, deferred
  log passthrough, mixed rosters, anti-cheat for non-log files).

All 30 new tests pass. Existing scheduler-ratchet tests (7) still pass.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-20 11:05:52 -05:00
thePR0M3TH3ANandClaude Sonnet 4.6 8a9080e7c3 fix(memory): close the content gap so agents can actually write and retrieve learnings
- run-selected-prompt.mjs: set SCHEDULER_MEMORY_FILE env var before spawning each agent so
  store.mjs has a well-known path to read from (memory-updates/<ts>__<agent>.md)
- retrieve.mjs: format memories.md using m.summary + date/tags in readable markdown sections
  instead of raw m.content blobs; agents can now scan injected context at a glance
- store.mjs: remove semantically-empty fallback placeholder events that polluted the store
  and degraded retrieval quality; also fix default cadence 'weekly' -> 'daily' to match retrieve
- scheduler-flow.md: replace vague "write insights" instruction with a concrete three-section
  template (Key findings / Patterns / Warnings) and clarify that $SCHEDULER_MEMORY_FILE is
  set by the scheduler automatically

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-02-20 10:51:03 -05:00
thePR0M3TH3AN 206146b78e Merge pull request #365 from PR0M3TH3AN/agents/weekly/prompt-safety-agent-1954565905191419761
feat: Weekly Prompt Safety Audit
2026-02-20 07:48:05 -05:00
google-labs-jules[bot]andPR0M3TH3AN b23b9e4982 feat: Weekly Prompt Safety Audit
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 05:10:15 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9278dadab0 Print final run summary in scheduler cycle and prompts
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-20 04:50:26 +00:00
thePR0M3TH3AN a7a7679223 update 2026-02-19 23:36:01 -05:00
Claude 639ad6877d chore: code quality, CI/CD, and DX improvements
Phase 3 — Code Quality:
- Deduplicate nowUnix() in lock-ops.mjs (import from utils.mjs)
- Promote ESLint no-unused-vars to error, fix all 46 violations
- Remove dead code: unused imports, variables, and catch bindings
- Add /* global marked */ for CDN-loaded library in dashboard

Phase 4 — CI/CD:
- Add Node.js version matrix (22, 23) to CI workflow
- Add npm audit security scan step to CI
- Add innerHTML usage check to CI pipeline
- Enable Dependabot for npm and GitHub Actions dependencies
- Create PR template

Phase 5 — Developer Experience:
- Create .env.example documenting all environment variables
- Expand CONTRIBUTING.md with commit conventions, agent/prompt
  creation guide, architecture overview, and test integrity
- Add system architecture diagram with Mermaid (docs/architecture/)

https://claude.ai/code/session_01GfwUNbgeMgXreFDbsNQMsS
2026-02-19 21:03:30 +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 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
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
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
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
google-labs-jules[bot]andPR0M3TH3AN 7305dd964d Optimize createLifecyclePlan with Promise.all
Replaced sequential `await condenseGroup` calls with `Promise.all` to run condensation tasks concurrently.
Added `scripts/benchmark-pruner.mjs` to measure performance improvement.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 03:30:28 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9e993800fa [scheduler] daily/decompose-agent: Decompose scripts/agent/run-scheduler-cycle.mjs
- 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]>
2026-02-17 22:41:37 +00:00
thePR0M3TH3AN 8fb2a2ab99 Merge branch 'main' into agents/daily/ci-health-agent-2026-02-17-8365488986185039286 2026-02-17 15:09:34 -05:00
google-labs-jules[bot]andPR0M3TH3AN 5e99e81f2d chore(scheduler): Execute ci-health-agent and fix critical bugs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 19:58:43 +00:00
google-labs-jules[bot]andPR0M3TH3AN 2466c80af9 fix(dashboard): Allow access to src/constants.mjs and fix lock-ops
`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]>
2026-02-17 19:52:10 +00:00