From 326608ce7e08e374a36edc575299b88f8cbb21ef Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 19:28:03 +0000 Subject: [PATCH] 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 <53631862+PR0M3TH3AN@users.noreply.github.com> --- .gitignore | 24 +++++++++++++++++++ AGENTS.md | 16 +++++++++++++ CLAUDE.md | 6 +++++ AFTER.md => reports/performance/AFTER.md | 0 .../performance/BASELINE.md | 0 .../performance/DIAGNOSIS.md | 0 .../performance/INITIAL_BASELINE.md | 0 .../performance/benchmark-after.txt | 0 .../performance/benchmark-baseline.txt | 0 .../performance}/hits-2026-02-15.json | 0 .../performance}/hits-2026-02-16.json | 0 .../performance}/hits-2026-02-17.json | 0 .../performance}/hits-intervals.txt | 0 .../performance}/hits-promises.txt | 0 {perf => reports/performance}/hits-relays.txt | 0 .../performance}/hits-torrent.txt | 0 .../performance}/hits-visibility.txt | 0 .../performance}/hits-workers.txt | 0 .../find_dead_code.py | 0 src/prompts/daily/const-refactor-agent.md | 2 +- src/prompts/daily/perf-agent.md | 4 ++-- dashboard.log => task-logs/dashboard.log | 0 .../dashboard_verify.log | 0 .../dashboard_test.log | 0 .../dashboard_test_2.log | 0 .../test_output_full.txt | 0 .../test_output_verify.log | 0 27 files changed, 49 insertions(+), 3 deletions(-) rename AFTER.md => reports/performance/AFTER.md (100%) rename BASELINE.md => reports/performance/BASELINE.md (100%) rename DIAGNOSIS.md => reports/performance/DIAGNOSIS.md (100%) rename INITIAL_BASELINE.md => reports/performance/INITIAL_BASELINE.md (100%) rename benchmark-after.txt => reports/performance/benchmark-after.txt (100%) rename benchmark-baseline.txt => reports/performance/benchmark-baseline.txt (100%) rename {perf => reports/performance}/hits-2026-02-15.json (100%) rename {perf => reports/performance}/hits-2026-02-16.json (100%) rename {perf => reports/performance}/hits-2026-02-17.json (100%) rename {perf => reports/performance}/hits-intervals.txt (100%) rename {perf => reports/performance}/hits-promises.txt (100%) rename {perf => reports/performance}/hits-relays.txt (100%) rename {perf => reports/performance}/hits-torrent.txt (100%) rename {perf => reports/performance}/hits-visibility.txt (100%) rename {perf => reports/performance}/hits-workers.txt (100%) rename find_dead_code.py => scripts/find_dead_code.py (100%) rename dashboard.log => task-logs/dashboard.log (100%) rename dashboard_verify.log => task-logs/dashboard_verify.log (100%) rename dashboard_test.log => test_logs/dashboard_test.log (100%) rename dashboard_test_2.log => test_logs/dashboard_test_2.log (100%) rename test_output_full.txt => test_logs/test_output_full.txt (100%) rename test_output_verify.log => test_logs/test_output_verify.log (100%) diff --git a/.gitignore b/.gitignore index 70d0f37..04607c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,27 @@ node_modules dist/ .scheduler-memory/ + +# Logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Test logs +test_logs/*.log +test_logs/*.txt + +# Task logs +task-logs/*.log + +# Artifacts and temporary files +artifacts/ +reports/performance/hits-*.json +reports/performance/hits-*.txt +reports/performance/benchmark-*.txt + +# Root clutter prevention +test_output_full.txt +benchmark-after.txt +benchmark-baseline.txt diff --git a/AGENTS.md b/AGENTS.md index 3c7644d..c400977 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -115,6 +115,22 @@ Its goal is “make the suite reflect reality and reject fake passes.” --- +## File Organization & Cleanliness (Clean Repo Standard) + +Agents must keep the repository root clean. Do not create log files, temporary outputs, or artifacts in the root directory. + +**Standard Locations:** + +* **Reports**: `reports//` (e.g., `reports/performance/`, `reports/audit/`). See [Report Location Standard](#report-location-standard). +* **Test Logs**: `test_logs/` (e.g., `test_logs/test_output_full.txt`). +* **Task Logs**: `task-logs/` (e.g., `task-logs/daily/`). +* **Artifacts**: `artifacts/` (for raw data, repros, or other artifacts). +* **General Logs**: `logs/` (if needed, otherwise `task-logs/`). + +**Prohibitions:** +* No `*.log`, `*.txt`, `*.json`, or `*.md` files in the root directory (except standard docs like `README.md`, `AGENTS.md`, `CLAUDE.md`, `KNOWN_ISSUES.md`). +* If a tool or script defaults to writing to root, redirect its output or configure it to write to one of the standard locations. + ## Report Location Standard All agents that generate reports must adhere to the following directory structure. Reports must be placed in `reports//`. diff --git a/CLAUDE.md b/CLAUDE.md index a20b517..70615db 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -74,3 +74,9 @@ Prefer boundary-level service virtualization (“digital twins” / behavioral c * not rate-limited / not flaky (StrongDM’s “Digital Twin Universe” is the reference pattern.) ([factory.strongdm.ai][2]) + +### Clean Repo Standard + +* **No Root Clutter**: Do not create logs, artifacts, or temporary files in the repository root. +* **Structured Output**: Use `reports/`, `test_logs/`, `task-logs/`, or `artifacts/` as appropriate. +* **Redirect Output**: If a command writes to root, redirect it (e.g., `cmd > test_logs/output.txt`). diff --git a/AFTER.md b/reports/performance/AFTER.md similarity index 100% rename from AFTER.md rename to reports/performance/AFTER.md diff --git a/BASELINE.md b/reports/performance/BASELINE.md similarity index 100% rename from BASELINE.md rename to reports/performance/BASELINE.md diff --git a/DIAGNOSIS.md b/reports/performance/DIAGNOSIS.md similarity index 100% rename from DIAGNOSIS.md rename to reports/performance/DIAGNOSIS.md diff --git a/INITIAL_BASELINE.md b/reports/performance/INITIAL_BASELINE.md similarity index 100% rename from INITIAL_BASELINE.md rename to reports/performance/INITIAL_BASELINE.md diff --git a/benchmark-after.txt b/reports/performance/benchmark-after.txt similarity index 100% rename from benchmark-after.txt rename to reports/performance/benchmark-after.txt diff --git a/benchmark-baseline.txt b/reports/performance/benchmark-baseline.txt similarity index 100% rename from benchmark-baseline.txt rename to reports/performance/benchmark-baseline.txt diff --git a/perf/hits-2026-02-15.json b/reports/performance/hits-2026-02-15.json similarity index 100% rename from perf/hits-2026-02-15.json rename to reports/performance/hits-2026-02-15.json diff --git a/perf/hits-2026-02-16.json b/reports/performance/hits-2026-02-16.json similarity index 100% rename from perf/hits-2026-02-16.json rename to reports/performance/hits-2026-02-16.json diff --git a/perf/hits-2026-02-17.json b/reports/performance/hits-2026-02-17.json similarity index 100% rename from perf/hits-2026-02-17.json rename to reports/performance/hits-2026-02-17.json diff --git a/perf/hits-intervals.txt b/reports/performance/hits-intervals.txt similarity index 100% rename from perf/hits-intervals.txt rename to reports/performance/hits-intervals.txt diff --git a/perf/hits-promises.txt b/reports/performance/hits-promises.txt similarity index 100% rename from perf/hits-promises.txt rename to reports/performance/hits-promises.txt diff --git a/perf/hits-relays.txt b/reports/performance/hits-relays.txt similarity index 100% rename from perf/hits-relays.txt rename to reports/performance/hits-relays.txt diff --git a/perf/hits-torrent.txt b/reports/performance/hits-torrent.txt similarity index 100% rename from perf/hits-torrent.txt rename to reports/performance/hits-torrent.txt diff --git a/perf/hits-visibility.txt b/reports/performance/hits-visibility.txt similarity index 100% rename from perf/hits-visibility.txt rename to reports/performance/hits-visibility.txt diff --git a/perf/hits-workers.txt b/reports/performance/hits-workers.txt similarity index 100% rename from perf/hits-workers.txt rename to reports/performance/hits-workers.txt diff --git a/find_dead_code.py b/scripts/find_dead_code.py similarity index 100% rename from find_dead_code.py rename to scripts/find_dead_code.py diff --git a/src/prompts/daily/const-refactor-agent.md b/src/prompts/daily/const-refactor-agent.md index 378da83..21c1339 100644 --- a/src/prompts/daily/const-refactor-agent.md +++ b/src/prompts/daily/const-refactor-agent.md @@ -176,7 +176,7 @@ DETAILED WORKFLOW (step-by-step) 9) **Follow-up** - Track PR reviews and address comments. - - When merged, update `INITIAL_BASELINE.md` or a `perf/constants-refactor/history.md` to note the canonicalization for future audits. + - When merged, update `reports/performance/INITIAL_BASELINE.md` or a `reports/performance/constants-refactor/history.md` to note the canonicalization for future audits. - If any replacement surfaced ambiguous semantics that required a behavior change, document in `src/decisions/DECISIONS_.md` and open an Issue for broader discussion. - If no work is required, exit without making changes. diff --git a/src/prompts/daily/perf-agent.md b/src/prompts/daily/perf-agent.md index b30c150..24f8b4e 100644 --- a/src/prompts/daily/perf-agent.md +++ b/src/prompts/daily/perf-agent.md @@ -50,7 +50,7 @@ Commit early and often: - `src/todo/TODO_.md` — tasks (Done / Blocked). - `src/decisions/DECISIONS_.md` — design choices & rationale. - `src/test_logs/TEST_LOG_.md` — commands, env, outputs, failures. -- `INITIAL_BASELINE.md` — baseline metrics (login time, decrypt queue size, relay latencies, webtorrent count). +- `reports/performance/INITIAL_BASELINE.md` — baseline metrics (login time, decrypt queue size, relay latencies, webtorrent count). - `perf/` (optional) — scripts and small helpers. Read `AGENTS.md` and `KNOWN_ISSUES.md` before edits. @@ -175,7 +175,7 @@ ESCALATION & RISK POLICY ------------------------------------------------------------------------------- FIRST-RUN CHECKLIST (execute now) -1. Commit files in `src/context/`, `src/todo/`, `src/decisions/`, `src/test_logs/`, `INITIAL_BASELINE.md`. +- Commit files in `src/context/`, `src/todo/`, `src/decisions/`, `src/test_logs/`, `reports/performance/INITIAL_BASELINE.md`. 2. Run Search Patterns across repo and save `reports/performance/hits-YYYY-MM-DD.json`. 3. Prioritize P0 findings, open at most 1–3 small PRs (bounded concurrency, worker queue limits, visibility gating). 4. Audit `/content` upload pages: inventory claims → map to code → verify → open docs PR or issue. diff --git a/dashboard.log b/task-logs/dashboard.log similarity index 100% rename from dashboard.log rename to task-logs/dashboard.log diff --git a/dashboard_verify.log b/task-logs/dashboard_verify.log similarity index 100% rename from dashboard_verify.log rename to task-logs/dashboard_verify.log diff --git a/dashboard_test.log b/test_logs/dashboard_test.log similarity index 100% rename from dashboard_test.log rename to test_logs/dashboard_test.log diff --git a/dashboard_test_2.log b/test_logs/dashboard_test_2.log similarity index 100% rename from dashboard_test_2.log rename to test_logs/dashboard_test_2.log diff --git a/test_output_full.txt b/test_logs/test_output_full.txt similarity index 100% rename from test_output_full.txt rename to test_logs/test_output_full.txt diff --git a/test_output_verify.log b/test_logs/test_output_verify.log similarity index 100% rename from test_output_verify.log rename to test_logs/test_output_verify.log