program-directory-and-file-definitions

program-directory-and-file-definitions is a cursor rule for Cursor from Intrafere/MOTO-Autonomous-ASI. It costs 15,750 tokens per session, scanned A, original, MIT.

A project guide that maps important folders and source files to their runtime roles. It also documents where the application stores data and logs and how those locations can change.

In plain words
What is it for?
Finding major code areas, understanding desktop data and log roots, configuring alternate roots, and following rules for changing them safely.
Why use it?
Projects with several runtime components can become difficult to navigate, especially when configuration changes where files are stored.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/. Also seen: mentions Codex.

Good fit Finding major code areas, understanding desktop data and log roots, configuring alternate roots, and following rules for changing them safely.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/intrafere/moto-autonomous-asi/program-directory-and-file-definitions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Intrafere/MOTO-Autonomous-ASI

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for program-directory-and-file-definitions

README.md
[![agentmods](https://agentmods.dev/badge/rules/intrafere/moto-autonomous-asi/program-directory-and-file-definitions/github.svg)](https://agentmods.dev/rules/intrafere/moto-autonomous-asi/program-directory-and-file-definitions)
Your own site
<a href="https://agentmods.dev/rules/intrafere/moto-autonomous-asi/program-directory-and-file-definitions"><img src="https://agentmods.dev/badge/rules/intrafere/moto-autonomous-asi/program-directory-and-file-definitions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for program-directory-and-file-definitions

Your own site · 80×15
<a href="https://agentmods.dev/rules/intrafere/moto-autonomous-asi/program-directory-and-file-definitions"><img src="https://agentmods.dev/badge/rules/intrafere/moto-autonomous-asi/program-directory-and-file-definitions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15,750 This file is loaded in full into every session.
When invoked 15,750 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.15750 $0.15750
Opus 5 $0.07875 $0.07875
Sonnet 5 $0.03150 $0.03150
Haiku 4.5 $0.01575 $0.01575

Measured 5d ago against content hash 64ef1532d3e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

program-directory-and-file-definitions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/program-directory-and-file-definitions.mdc · 546 lines

How it starts

The opening of the file, as written. The whole thing — 546 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LM Studio Server Information (Default Mode Only)

LM Studio and its pre-loaded models can be reached at "http://127.0.0.1:1234" (overridable via MOTO_LM_STUDIO_BASE_URL). NOTE: The system works without LM Studio. If LM Studio is unavailable, users can configure OpenRouter for all roles. In generic mode (generic_mode=True), workflow inference paths bypass LM Studio — embeddings use FastEmbed and configured roles normalize to OpenRouter, while hidden legacy diagnostics should not be used by hosted UI.

Runtime Root Note

backend/data/ and backend/logs/ are the default desktop roots, not immutable global paths.

  • The active backend instance may override mutable roots with MOTO_DATA_ROOT and MOTO_LOG_ROOT
  • Exactly one backend process may own a data root at a time; an OS-backed lifespan lease is authoritative even for direct launches and explicit overrides. Chroma is derived cache state: Windows desktop replaces prior-process native state before first open, while hosted Linux retains persistence.
  • Runtime root changes after import must use the atomic bind_runtime_roots() contract, which re-derives the complete mutable path graph; long-lived stores resolve against the active root and RAG opens Chroma lazily.
  • Secret persistence may be isolated per instance with MOTO_SECRET_NAMESPACE
  • Frontend browser persistence may be isolated on shared origins with VITE_MOTO_STORAGE_PREFIX; launch/control-plane config may supply MOTO_FRONTEND_STORAGE_PREFIX and project it into the frontend env
  • Hosted protected request size may be capped with MOTO_GENERIC_MAX_REQUEST_BYTES / GENERIC_MAX_REQUEST_BYTES (default 16 MiB)
  • Additional local launches may create generated instance folders such as .moto_instances/{instance_id}/data and .moto_instances/{instance_id}/logs

Current High-Level Project Directory Structure and File Descriptions

This is a maintained source-map for important directories and files, not a strict exhaustive inventory of every generated artifact or test helper. project-root/ ├── .github/ # GitHub community health files │ ├── ISSUE_TEMPLATE/ # Public issue forms + security contact routing │ ├── codeql/ # CodeQL analysis configuration │ ├── workflows/ # GitHub Actions workflows, including CodeQL │ └── pull_request_template.md # Default pull request template ├── .moto_instances/ # Generated local multi-instance runtime roots (not source-controlled) │ └── {instance_id}/ │ ├── data/ # Instance-specific mutable data root │ └── logs/ # Instance-specific mutable log root ├── backend/ │ ├── shared/ # SHARED RESOURCES │ │ ├── init.py # Package initialization │ │ ├── config.py # RAGConfig, SystemConfig (instance runtime contract, ports, data/log roots, secret namespace, generic_mode) │ │ ├── models.py # Pydantic models (includes ModelConfig with per-role supercharge_enabled, BoostConfig, WorkflowTask) │ │ ├── lm_studio_client.py # LM Studio HTTP API client + same-base numeric :# instance sharing │ │ ├── openrouter_client.py # OpenRouter HTTP API client (credit exhaustion detection + model/endpoint metadata) │ │ ├── openai_codex_client.py # Desktop-only OpenAI Codex/ChatGPT OAuth client, Codex backend adapter, and Codex model metadata normalizer │ │ ├── xai_grok_client.py # Desktop-only xAI Grok/SuperGrok OAuth client, model metadata normalizer, and typed hard spending/subscription-limit detection │ │ ├── sakana_fugu_client.py # Desktop-only Sakana client (Responses/chat fallback, model metadata, typed quota/entitlement classification) │ │ ├── api_client_manager.py # Unified API router (exact configured-role enforcement, Supercharge, OpenRouter/OAuth/LM Studio fallback, boost) │ │ ├── provider_errors.py # Typed safe provider-route, context-limit, and operator-repair-required errors │ │ ├── boost_manager.py # Singleton boost manager (tracks boost modes: next-count, always-prefer, category; aliases absorbed LeanOJ path-decision tasks into Final Solver boost category) │ │ ├── boost_logger.py # Boost API call logger (persists redacted/default-safe entries to boost_api_log.txt) │ │ ├── workflow_predictor.py # Legacy/shared workflow prediction helper; active coordinators maintain their own workflow_tasks │ │ ├── workflow_start_guard.py # Process-wide async guard and committed owner for atomic mutually-exclusive workflow starts │ │ ├── runtime_root_lock.py # Cross-process OS-backed lease enforcing one backend owner per active data root │ │ ├── sleep_inhibitor.py # Owner-based Windows system/execution Power Requests for active top-level workflows and independently queued manual proof checks │ │ ├── free_model_manager.py # Free model rotation/cooldown singleton (looping + auto-selector backup) │ │ ├── model_error_utils.py # Shared helpers for non-retryable provider/config failures; only recoverable credit exhaustion should pause workflows │ │ ├── provider_pause.py # Process-local provider-credit pause/resume signal used by proof workflows and OpenRouter reset │ │ ├── rag_lock.py # Global RAG operation lock (prevents Aggregator/Compiler collision) │ │ ├── token_tracker.py # Cumulative input/output token tracker singleton with per-model breakdown and research timer │ │ ├── wolfram_alpha_client.py # Wolfram Alpha API client (logs redacted metadata, not raw query/result text) │ │ ├── utils.py # Common utilities │ │ ├── json_parser.py # JSON parsing with sanitization for LLM quirks │ │ ├── response_extraction.py # Central OpenAI-compatible assistant text extraction with content-first reasoning/thinking fallback policy │ │ ├── critique_memory.py # Paper critique persistence (saves up to 10 validator critiques per paper) │ │ ├── critique_prompts.py # Default critique prompt and builder function for validator critiques │ │ ├── secret_store.py # Secure credential persistence via OS keyring (OpenRouter, desktop OAuth tokens, Wolfram Alpha); bypassed in generic mode │ │ ├── runtime_settings.py # Non-secret runtime setting persistence under the active data root (free-model knobs, desktop/default proof knobs, and connectivity toggles) │ │ ├── provider_notification_store.py # Bounded non-secret provider notifications with workflow ownership and stable recovery keys │ │ ├── build_info.py # Build identity resolver (manifest + git HEAD/ZIP stamp + env overrides) │ │ ├── path_safety.py # Safe path resolution helpers (realpath/normpath containment checks) │ │ ├── syntheticlib4_client.py # Contract-first SyntheticLib4 local-snapshot client for release/status/retrieve/account-proof work and API-key scaffolding; inactive runtime has zero records, while explicit fixtures remain test-only │ │ ├── proof_identity.py # moto-proof-identity-v1: canonical theorem whitespace + Lean newline/outer-whitespace hashes, separate from publisher integrity hashes │ │ ├── proof_search/ # Typed records/normalizers; SQLite schema v2 atomic index; composite exact neighborhoods; freshness/hydration/tool service; policy-versioned at-most-64→21→7 run-safe Assistant selection │ │ ├── solution_path/ # Typed run-scoped Progressive Solution Path state, durable serial proposal review engine, and prompt integration helpers │ │ ├── fastembed_provider.py # FastEmbed embedding wrapper (generic mode only, lazy-imported) │ │ ├── lean4_client.py # Lean 4 proof checker client (subprocess gated on lean4_enabled, optional LSP persistent mode gated on lean4_lsp_enabled; offloads temp/workspace filesystem operations from the FastAPI event loop) │ │ ├── lean_proof_integrity.py # Shared post-Lean integrity gate (rejects fake axiom/constant/opaque devices and validates theorem-statement alignment) │ │ ├── brainstorm_proof_gate.py # Shared Lean 4 gate for optional brainstorm proof candidates before normal validation; rejects missing novelty/rationale metadata before Lean cost and preserves Lean-accepted real artifacts for novelty/validator review │ │ └── smt_client.py # Z3/SMT launcher-managed subprocess wrapper (gated on smt_enabled; never authoritative on its own) │ ├── aggregator/ # AGGREGATOR │ │ ├── init.py │ │ ├── core/ │ │ │ ├── init.py │ │ │ ├── rag_manager.py # 4-stage RAG pipeline orchestrator (ChromaDB calls and heavy retrieval scoring are offloaded/snapshot-based to keep GUI/API routes responsive) │ │ │ ├── coordinator.py # Manages 1-10 submitters + 1 validator (default 3, configurable per-submitter) │ │ │ ├── queue_manager.py # Submission queue FIFO/batch/count/clear helper; coordinator owns submitter pause decisions │ │ │ └── context_allocator.py # Direct injection vs RAG routing (tries direct first, offloads to RAG only when doesn't fit). Includes allocate_cleanup_review_context() which NEVER skips due to size - uses RAG when database too large. │ │ ├── ingestion/ │ │ │ ├── init.py │ │ │ ├── chunker.py # Multi-config chunking (256/512/768/1024) │ │ │ ├── pipeline.py # Document ingestion pipeline │ │ │ ├── normalizer.py # Text normalization │ │ │ └── metadata_extractor.py # Extract metadata from chunks │ │ ├── validation/ │ │ │ ├── init.py │ │ │ ├── contradiction_checker.py # Detect contradictions │ │ │ └── json_validator.py # Validate JSON responses │ │ ├── memory/ │ │ │ ├── init.py │ │ │ ├── shared_training.py # Validator-distributed database (accepted submissions) │ │ │ ├── local_training.py # Per-submitter rejection logs (last 5) │ │ │ └── event_log.py # Persistent event log (acceptances, rejections, cleanup removals) │ │ ├── agents/ │ │ │ ├── init.py │ │ │ ├── submitter.py # Submitter agent (parallel, cyclic chunk sizes) │ │ │ └── validator.py # Validator agent (sequential validation) │ │ └── prompts/ │ │ ├── init.py │ │ ├── submitter_prompts.py # Submitter system prompts + JSON schemas │ │ └── validator_prompts.py # Validator system prompts + JSON schemas │ │ │ ├── compiler/ # COMPILER (Phase 2) │ │ ├── init.py # Package initialization │ │ ├── core/ │ │ │ ├── init.py # Package initialization │ │ │ ├── compiler_coordinator.py # Orchestrates sequential Markov chain workflow │ │ │ └── compiler_rag_manager.py # Compiler-specific RAG wrapper (user-configurable context per role) │ │ ├── agents/ │ │ │ ├── init.py # Package initialization │ │ │ ├── writer_submitter.py # 3 modes: construction, outline, review │ │ │ └── high_param_submitter.py # Rigor & Proofs role (rigor/proof/critique generation) │ │ ├── validation/ │ │ │ ├── init.py # Package initialization │ │ │ └── compiler_validator.py # Validates coherence, rigor, placement (plus rigor_lean_placement mode for Lean-4 theorem placement) │ │ ├── prompts/ │ │ │ ├── init.py # Package initialization │ │ │ ├── outline_prompts.py # Outline generation & update prompts │ │ │ ├── construction_prompts.py # Paper construction prompts │ │ │ ├── review_prompts.py # Paper review/cleanup prompts │ │ │ └── rigor_prompts.py # Rigor theorem-discovery + placement prompts (Lean-4-verified flow) │ │ └── memory/ │ │ ├── init.py # Package initialization │ │ ├── outline_memory.py # Current outline state (direct inject/RAG) │ │ ├── paper_memory.py # Current paper state (direct inject/RAG). Skeleton markers: ABSTRACT_PLACEHOLDER, INTRO_PLACEHOLDER, CONCLUSION_PLACEHOLDER, THEOREMS_APPENDIX_START/END (wraps Lean-4-verified theorem entries), PAPER_ANCHOR. │ │ ├── critique_memory.py # Accepted critiques database for peer review phase │ │ ├── critique_rejection_memory.py # Last 5 critique rejection feedback logs │ │ └── compiler_rejection_log.py # Last 10 rejections & acceptances │ │ │ ├── autonomous/ # AUTONOMOUS RESEARCH (Phase 3) │ │ ├── init.py # Package initialization │ │ ├── proof_pruning_evidence.py # Pure deterministic semantic-pruning evidence ranking, projection, token estimation, and evidence/dependency/descriptor fingerprints │ │ ├── core/ │ │ │ ├── init.py # Package initialization │ │ │ ├── autonomous_coordinator.py # Orchestrates the Tier 1 → Tier 2 → Tier 3 autonomous workflow (invokes proof verification checkpoints after brainstorm/Tier 2 paper completion when lean4_enabled) │ │ │ ├── autonomous_rag_manager.py # Autonomous-specific RAG wrapper │ │ │ ├── proof_round_driver.py # Shared one-round, bounded automatic multi-round, and unbounded continuous-pruning policies; candidate and Lean execution stay in ProofVerificationStage │ │ │ ├── proof_verification_stage.py # Orchestrates impact-first identification → Lean attempts (3 full + 2 tactic) → integrity/downshift → post-Lean novelty/storage; optional SMT/Mathlib; per-source lock │ │ │ ├── proof_run_manager.py # Owns one-round and continuous manual proof-run lifecycle/status, Stop, terminal cleanup, source reservations, and sleep ownership │ │ │ ├── proof_pruning_coordinator.py # Run-scoped bounded semantic review scheduling, generation-safe coalescing, durable migration, stale-fenced commit, and lifecycle drain │ │ │ ├── proof_novelty.py # Shared proof novelty assessment helper used by autonomous proof verification and compiler rigor │ │ │ ├── proof_registration.py # Shared registration helper for verified Lean proofs from autonomous, compiler, aggregator, and LeanOJ flows │ │ │ └── proof_dependency_extractor.py # Parses verified Lean 4 code to extract ProofDependency records (imports, Mathlib lemmas, MOTO-origin refs) │ │ ├── agents/ │ │ │ ├── init.py # Package initialization │ │ │ ├── topic_selector.py # Topic selection submitter (new/continue) │ │ │ ├── topic_validator.py # Topic selection validator │ │ │ ├── completion_reviewer.py # Brainstorm completion review (SPECIAL SELF-VALIDATION) │ │ │ ├── reference_selector.py # Reference paper selection workflow │ │ │ ├── paper_title_selector.py # Paper title selection │ │ │ ├── proof_identification_agent.py # Extracts impact-first theorem candidates with expected novelty/prompt-relevance/anti-known-result rationale; skips not_novel or missing-tier candidates before Lean cost │ │ │ ├── proof_candidate_list_validator.py # Independent identity-complete pre-Lean Validator for whole candidate lists and the 75% novelty gate │ │ │ ├── proof_formalization_agent.py # Generates Lean 4 proof scripts for candidates with mandatory full source context plus novelty metadata, Mathlib hints, and SMT hints when enabled │ │ │ ├── proof_pruning_agent.py # Fail-closed semantic proposer/Validator over bounded candidate-centered or conservatively arbitrated section evidence; returns fenced non-mutating commit intent │ │ │ ├── lemma_search_agent.py # Mathlib lemma search agent (Build 2) — surfaces relevant existing lemmas for formalization prompts │ │ │ └── final_answer/ # TIER 3 - Final Answer Generation Agents │ │ │ ├── init.py # Package initialization │ │ │ ├── certainty_assessor.py # Assesses "known certainties" from Tier 2 papers │ │ │ ├── answer_format_selector.py # Selects short-form vs long-form answer │ │ │ └── volume_organizer.py # Organizes volume structure (long-form) │ │ ├── validation/ │ │ │ ├── init.py # Package initialization │ │ │ └── paper_redundancy_checker.py # Paper library redundancy review │ │ ├── prompts/ │ │ │ ├── init.py # Package initialization │ │ │ ├── topic_prompts.py # Topic selection & validation prompts │ │ │ ├── topic_exploration_prompts.py # Builds aggregator user prompt for topic exploration phase │ │ │ ├── completion_prompts.py # Completion review & self-validation prompts │ │ │ ├── paper_reference_prompts.py # Reference selection prompts │ │ │ ├── paper_title_exploration_prompts.py # Builds aggregator user prompt for paper title exploration phase │ │ │ ├── paper_title_prompts.py # Paper title selection prompts │ │ │ ├── paper_redundancy_prompts.py # Paper redundancy review prompts │ │ │ ├── paper_continuation_prompts.py # Brainstorm multi-paper continuation decision prompts │ │ │ ├── proof_prompts.py # Proof identification/formalization/statement-alignment/novelty prompts + failure-hint direct injection helper │ │ │ ├── proof_pruning_prompts.py # Isolated proposer/Validator/repair contracts for proof live-context pruning │ │ │ └── final_answer_prompts.py # TIER 3 - Final answer assessment/selection/volume prompts │ │ └── memory/ │ │ ├── init.py # Package initialization │ │ ├── brainstorm_memory.py # Per-brainstorm database management (includes retroactive edit/remove/add during paper compilation) │ │ ├── paper_library.py # Paper library management (Tier 2) │ │ ├── research_metadata.py # Research metadata (brainstorms + papers associations, proof runtime config snapshot) │ │ ├── autonomous_rejection_logs.py # Topic selection & completion feedback logs │ │ ├── topic_exploration_memory.py # In-memory candidate DB for topic exploration phase │ │ ├── paper_model_tracker.py # Per-paper model usage tracking and author attribution │ │ ├── autonomous_api_logger.py # Autonomous API call logger singleton │ │ ├── proof_database.py # Session-aware Lean 4 verified-proof storage (records, Lean sources, novelty/reverse-dependency indexes, owning-run live-context state, revisioned pruning snapshots); cross-session library access via list_proof_library() and get_library_proof() │ │ ├── final_answer_memory.py # TIER 3 - Final answer state & volume management │ │ └── session_manager.py # Prompt-based session folder organization │ │ │ ├── leanoj/ # LEANOJ PROOF SOLVER (proof-only top-level mode; no paper writing) │ │ ├── init.py │ │ ├── prompts.py # LeanOJ topic/batched-topic/brainstorm/prune/path/final-solver JSON prompts; brainstorm validation assigns final-context roles; prune review conservatively asks whether outdated/redundant memory should be removed, updated, or supplemented with one compact corrective idea; final solver edits single-route durable master proofs and reviews Lean-accepted final code before stop │ │ └── core/ │ │ ├── init.py │ │ ├── leanoj_context.py # LeanOJ full artifact persistence, direct-first allocation, final-context routing (verified helpers + active plans direct; refuted constructions separated as compact warnings), session-scoped RAG indexing/retrieval, final-cycle packets, and clear/resume cleanup │ │ └── leanoj_coordinator.py # Parallel topic + brainstorm submitters, batch validators, resumable persistence, partial proof capture, context-role classification, single-route durable master_proof.lean editing, watchdog, final Lean verification, and semantic final-solver review │ │ │ ├── scripts/ # Utility scripts │ │ ├── cache_openrouter_models.py # Caches OpenRouter models with mapping display_name -> api_id │ │ └── startup/ # Legacy/internal startup helper scripts kept out of repo root │ │ │ ├── api/ │ │ ├── init.py │ │ ├── main.py # FastAPI app entry point (lifespan reads generic_mode, fail-closes hosted auth env, ensures desktop API token, skips LM Studio test in generic mode) │ │ ├── middleware.py # CORS, error handling, desktop token/origin checks, proxy auth validation, hosted body-size cap + actual-body hash check │ │ ├── proxy_auth.py # Shared generic-mode proxy auth helpers (allowlist + HMAC over method/path/query/verified body hash for REST/WebSocket) │ │ └── routes/ │ │ ├── init.py │ │ ├── aggregator.py # Aggregator API endpoints (includes /events) │ │ ├── compiler.py # Compiler API endpoints │ │ ├── autonomous.py # Autonomous Research API endpoints │ │ ├── leanoj.py # LeanOJ Proof Solver API endpoints (/api/leanoj/*: start with matching-progress resume, stop, status, master-proof draft/edit summaries, current-run proofs, cross-session library, skip-brainstorm, force-brainstorm, clear) │ │ ├── boost.py # Boost API endpoints (enable/disable/toggle/status + OpenRouter provider endpoint metadata) │ │ ├── workflow.py # Workflow predictions plus typed Progressive Solution Path snapshot and generation-fenced repair-resume endpoints │ │ ├── update.py # Update/check endpoints for launcher/updater state (POST /api/update/pull, GET /api/update/pull-status) │ │ ├── download.py # PDF generation endpoint via Playwright (desktop only; sanitize/block external requests; returns 501 in generic mode) │ │ ├── openrouter.py # OpenRouter API endpoints (global key, models/providers via header/body keys only, LM Studio availability, model cache, reset exhaustion) │ │ ├── cloud_access.py # OpenRouter/OAuth support endpoints including desktop OAuth login/model listing │ │ ├── websocket.py # WebSocket for real-time updates (generic proxy auth or desktop one-time tickets before accept) │ │ ├── features.py # GET /api/features — shared build identity plus stable capability flags; GET /api/update-notice — launcher/runtime-refreshed update notice │ │ ├── proofs.py # Proof database + Lean 4/SMT runtime + manual proof-check/run discovery/control + live-context mutation + certificate/dependency routes; current proof lists expose proof_set_revision, and bounded run collection/source lookup support reconnect recovery │ │ ├── proof_search.py # Unified overview/search/reindex, bounded detail hydration (session_id/search_id/run_id), latest Assistant pack, and paginated support-lineage routes; public search caps at 7 │ │ ├── syntheticlib4.py # SyntheticLib4 corpus status/release/refresh/safe local import/reindex/retrieve-batch/account-proof routes plus production OAuth placeholders; public retrieve-batch is capped at 7 records │ │ ├── connectivity.py # Non-secret grouped connectivity status/toggle routes for inference providers and optional skills │ │ └── health.py # GET /api/health — readiness/liveness probe with slim instance/build metadata │ │ │ ├── data/ # Persistent data storage │ │ ├── user_uploads/ # User-uploaded files │ │ ├── model_cache.json # Auto-generated by cache script - Maps display names to OpenRouter API IDs for profile system │ │ ├── rag_shared_training.txt # Accepted submissions (aggregator output) │ │ ├── aggregator_event_log.txt # Persistent event log (key events survive restarts) │ │ ├── aggregator_stats.json # Persistent stats (acceptances, rejections, cleanup stats) │ │ ├── compiler_outline.txt # Current paper outline │ │ ├── compiler_paper.txt # Current paper being constructed │ │ ├── compiler_last_10_rejections.txt # Last 10 compiler rejections │ │ ├── compiler_last_10_acceptances.txt # Last 10 compiler acceptances │ │ ├── Summary_Of_Last_5_Validator_Rejections_For_Submitter_.txt # Aggregator submitter rejections (1-10, dynamically created per submitter) │ │ ├── auto_brainstorms/ # Autonomous Research - Tier 1 (Brainstorm databases) │ │ │ ├── brainstorm_{topic_id}.txt # Per-brainstorm accepted submissions │ │ │ ├── brainstorm_{topic_id}metadata.json # Brainstorm metadata │ │ │ ├── brainstorm{topic_id}submitter_1_rejections.txt # Per-brainstorm submitter rejections │ │ │ ├── brainstorm{topic_id}submitter_2_rejections.txt │ │ │ ├── brainstorm{topic_id}submitter_3_rejections.txt │ │ │ └── completion_feedback{topic_id}.txt # Completion review feedback (last 5) │ │ ├── auto_papers/ # Autonomous Research - Tier 2 (Finished papers) │ │ │ ├── paper_{paper_id}.txt # Full paper content │ │ │ ├── paper_{paper_id}abstract.txt # Abstract only │ │ │ ├── paper{paper_id}source_brainstorm.txt # Cached brainstorm database │ │ │ ├── paper{paper_id}last_10_rejections.txt # Compiler rejections for this paper │ │ │ ├── pruned/ # Pruned papers preserved for user download, excluded from model context │ │ │ │ ├── pruned_paper{paper_id}.txt # Pruned full paper with top-of-file PRUNED PAPER banner │ │ │ │ └── pruned_paper_{paper_id}metadata.json # Pruned metadata/reason │ │ │ └── archive/ # Legacy archived (redundant) papers, treated as pruned history │ │ │ └── paper{paper_id}.txt │ │ ├── auto_final_answer/ # Autonomous Research - Tier 3 (LEGACY - replaced by auto_sessions) │ │ │ ├── final_answer_state.json # Tier 3 state (crash recovery) │ │ │ ├── volume_organization.json # Volume structure (long-form) │ │ │ ├── tier3_rejections.txt # Tier 3 rejection log (last 10) │ │ │ ├── chapter_{index}paper.txt # Gap/intro/conclusion papers │ │ │ ├── chapter{index}outline.txt # Chapter outlines │ │ │ └── final_volume.txt # Assembled volume (long-form) │ │ ├── auto_sessions/ # Autonomous Research - Session-based folder organization │ │ │ └── {sanitized_prompt}{timestamp}/ # Per-session folder │ │ │ ├── brainstorms/ # Tier 1 brainstorm databases │ │ │ ├── papers/ # Tier 2 completed papers plus pruned/ preserved context-excluded papers │ │ │ ├── final_answer/ # Tier 3 final answer data │ │ │ ├── proofs/ # Lean 4 verified-proof records (proofs_index.json, proof_{proof_id}.json, proof_{proof_id}_lean.lean; generated IDs currently include the proof_ prefix) │ │ │ ├── session_metadata.json # Session info (prompt, created_at, status) │ │ │ ├── session_stats.json # Session statistics │ │ │ └── workflow_state.json # Workflow state for crash recovery │ │ ├── proofs/ # Legacy (non-session) Lean 4 proof storage (mirrors per-session proofs/ layout) │ │ ├── manual_proofs/ # Active manual Aggregator/Compiler proof storage; archived/cleared on manual run reset so old proofs do not enter new manual prompts │ │ ├── manual_proof_runs/ # Archived manual proof runs for history/library viewing only, never active prompt context │ │ ├── proof_search/ # Derived schema/identity-versioned SQLite/FTS index, atomically rebuildable from canonical proof sources │ │ ├── syntheticlib4/ # Planned authorized SyntheticLib4 local snapshots/status/cache under the active data root │ │ ├── leanoj_sessions/ # LeanOJ run state (state.json, master_proof.lean, master_proof_edits.jsonl, master_proof_snapshots.jsonl, phase counters, proof fragments, attempts, verified final Lean code; stop/crash resumes unless cleared) │ │ ├── leanoj_partial_proofs/ # LeanOJ partial/supporting proof scaffold JSONL store, keyed by session │ │ ├── leanoj_artifacts/ # LeanOJ full-memory artifact logs (accepted ideas with context_role metadata, verified/partial/failed proof fragments, final attempts, final-cycle packets) used for direct-first RAG allocation │ │ ├── auto_research_metadata.json # Autonomous Research metadata (LEGACY - now in session folders) │ │ ├── auto_research_stats.json # Autonomous Research statistics (LEGACY - now in session folders) │ │ ├── auto_workflow_state.json # Autonomous Research workflow state (LEGACY - now in session folders) │ │ ├── auto_research_topic_rejections.txt # Topic selection rejections (last 5) │ │ └── chroma_db/ # ChromaDB persistent storage │ │ │ └── logs/ # Application logs │ ├── frontend/ │ ├── src/ │ │ ├── components/ │ │ │ ├── aggregator/ # AGGREGATOR │ │ │ │ ├── AggregatorInterface.jsx # User prompt, file upload, start/stop, developer-gated Creativity Emphasis Boost │ │ │ │ ├── AggregatorSettings.jsx # Model selection, context sizes, capability-gated LM/OpenRouter UI │ │ │ │ ├── AggregatorLogs.jsx # Metrics, acceptance rates, queue; loads persisted events on mount │ │ │ │ └── LiveResults.jsx # Real-time accepted submissions view │ │ │ │ │ │ │ ├── compiler/ # COMPILER │ │ │ │ ├── CompilerInterface.jsx # Manual Compiler prompt, allowed-output controls, start/stop, and status │ │ │ │ ├── CompilerSettings.jsx # Compiler role selections (Validator, Writing, Rigor & Proofs, Assistant), capability-gated LM/OpenRouter UI; deprecated critique fields mirror Rigor & Proofs │ │ │ │ ├── CompilerLogs.jsx # Metrics: construction vs rigor, miniscule edits │ │ │ │ └── LivePaper.jsx # Real-time paper viewing, save draft, word count │ │ │ │ │ │ │ ├── autonomous/ # AUTONOMOUS RESEARCH │ │ │ ├── AutonomousResearchInterface.jsx # Main control: research prompt, start/stop, current tier, developer-gated Creativity Emphasis Boost │ │ │ ├── AutonomousResearch.css # Autonomous research styles │ │ │ ├── BrainstormList.jsx # List all brainstorm topics with status │ │ │ ├── PaperLibrary.jsx # Grid view of completed papers (title + abstract) │ │ │ ├── AutonomousResearchSettings.jsx # Autonomous settings: models/providers/profiles, free-model controls, Tier 3 toggle, Wolfram, Lean/SMT proof runtime, developer-only raw/Supercharge UI │ │ │ ├── AutonomousResearchLogs.jsx # Metrics/per-submitter stats, event log, combined API call logs │ │ │ ├── LivePaperProgress.jsx # Real-time Tier 2 paper display (embedded in interface) │ │ │ ├── LiveTier3Progress.jsx # Real-time Tier 3 final answer display (embedded in interface) │ │ │ ├── FinalAnswerView.jsx # TIER 3 - Final answer tab (separate tab for completed answers) │ │ │ ├── FinalAnswerLibrary.jsx # All sessions final answer library viewer │ │ │ ├── FinalAnswerLibrary.css # Final answer library styles │ │ │ ├── ArchiveViewerModal.jsx # Research lineage archive viewer (papers + brainstorms) │ │ │ ├── ArchiveViewerModal.css # Archive viewer styles │ │ │ ├── MathematicalProofs.jsx # Flat live-session per-proof tab reused by Autonomous and Manual modes; shared run controls plus readable owning-run prune status/actions, dependency graph, and scoped exports │ │ │ ├── MathematicalProofs.css # Proof library styles │ │ │ ├── ProofCheckModeModal.jsx # Accessible shared one-round/continuous proof-check chooser used by all six check entry points │ │ │ ├── ProofRunStatusControls.jsx # Shared source/run round, pruning, Stop, and terminal status controls │ │ │ ├── ProofGraph.jsx # Hand-rolled SVG proof dependency graph view │ │ │ ├── ProofGraph.css # Proof graph styles │ │ │ ├── ProofNotificationStack.jsx # Persistent popup notifications for novel proof discoveries │ │ │ ├── ProofLibrary.jsx # Historical proof library with novelty filter, collapsed run/prompt groups, full expanded proof content, and read-only persisted live-context prune provenance │ │ │ ├── ProofLibrary.css # Proof library viewer styles │ │ │ ├── Stage2PaperHistory.jsx # Tier 2 paper history list (grouped per research run; sub-tab inside CompletedWorksLibrary) │ │ │ └── Stage2PaperHistory.css # Tier 2 paper history styles │ │ │ │ │ │ └── leanoj/ # LEANOJ PROOF SOLVER UI │ │ │ ├── LeanOJInterface.jsx # Prompt/template input, start/resume, stop, skip/force brainstorm, clear progress, live status, developer-gated Creativity Emphasis Boost, verified Lean output │ │ │ ├── LeanOJSettings.jsx # LeanOJ-specific model profiles/settings; grouped UI controls map user-facing roles to the underlying LeanOJ request role keys │ │ │ ├── LeanOJBrainstorms.jsx # LeanOJ accepted ideas/recursive brainstorm memory viewer │ │ │ ├── LeanOJLogs.jsx # LeanOJ API-call log wrapper; live event stream and proof fragments are shown in the interface/proof tabs │ │ │ ├── LeanOJMasterProof.jsx # Master proof draft tab (on-demand draft, metadata, edit history, download) │ │ │ ├── LeanOJMasterProof.css # Master proof draft tab styles │ │ │ ├── LeanOJMathematicalProofs.jsx # Flat current-run verified proof/proof-fragment viewer; suppresses run-prompt fallback fields without truncating proof content │ │ │ ├── LeanOJProofLibrary.jsx # Historical completed-run library with collapsed prompt groups and bounded prompt-header previews; excludes the currently loaded run │ │ │ └── index.js # LeanOJ component exports │ │ │ │ │ ├── StartupProviderSetupModal.jsx # Post-disclaimer startup chooser for OpenRouter or LM Studio setup; desktop OAuth is shown only as an after-startup add-on because embeddings require OpenRouter/LM Studio (OpenRouter-only in generic mode) │ │ ├── ConnectivityPanel.jsx # Grouped top-right connectivity launcher for inference providers and optional skills │ │ ├── OpenRouterApiKeyModal.jsx # OpenRouter/OAuth modal for OpenRouter API key and desktop OAuth logins │ │ ├── SyntheticLib4AccessModal.jsx # SyntheticLib4 coming-soon proof-corpus explainer │ │ ├── WolframAlphaAccessModal.jsx # Wolfram Alpha App ID and enable/disable modal │ │ ├── LMStudioConnectivityModal.jsx # LM Studio status/setup modal │ │ ├── AgentConversationMemoryModal.jsx # User-facing stored-proof memory toggle/status modal │ │ ├── PaperCritiqueModal.jsx # Modal for displaying validator paper critiques (ratings, feedback, history) │ │ ├── CritiqueNotificationStack.jsx # Persistent popup notifications for high-scoring critiques (≥6.25 avg) │ │ ├── CreditExhaustionNotificationStack.jsx # Persistent red notifications for OpenRouter credit exhaustion with "Retry OpenRouter" reset button │ │ ├── CodexOAuthNotificationStack.jsx # Persistent desktop Codex OAuth/provider-repair notifications │ │ ├── ModelErrorNotificationStack.jsx # Durable workflow-scoped model/configuration repair notifications │ │ ├── OpenRouterFreeModelsControl.jsx # Shared free-model filter, looping, and auto-selector controls │ │ ├── ApiCallLogs.jsx # Shared combined API-call log viewer │ │ ├── BoostControlModal.jsx # Modal for boost configuration (next-X, category, always-prefer) with mode-aware copy │ │ ├── BoostControlModal.css # Boost control modal styles │ │ ├── WorkflowPanel.jsx # Boost/token/Assistant panel plus activation-gated, stale-fenced Progressive Solution Path card and lifecycle refresh │ │ ├── WorkflowPanel.css # Boost controls panel and Assistant Memory Bank styles │ │ ├── SolutionPathModal.jsx # Advisory route viewer with repair guidance, settings routing, retry, focus restoration, and accessible status │ │ ├── SolutionPathModal.css # Progressive Solution Path modal styles │ │ ├── TextFileUploader.jsx # User file upload component │ │ ├── TextFileUploader.css # File uploader styles │ │ ├── OpenRouterPrivacyWarningModal.jsx # Privacy policy error modal (OpenRouter data sharing, capability-aware alternatives) │ │ ├── HelpTooltip.jsx # Shared portal-based help tooltip component (used across settings/interfaces) │ │ ├── ProofStrengthBadge.jsx # Shared PS badge/tooltip for highlighted proof-strength models and primary proof-creation roles │ │ ├── settings-common.css # Shared settings panel styles │ │ ├── critique-modal.css # Paper critique modal styles │ │ │ │ │ ├── services/ │ │ │ ├── api.js # Backend API calls (includes openRouterAPI, /api/features, proof routes, LeanOJ API, and cross-session proof library helpers) │ │ │ └── websocket.js # WebSocket connection │ │ │ │ │ ├── hooks/ │ │ │ └── useProofCheckRuntime.js # Shared source-keyed proof-run controller: readiness, queueing, discovery/reload reconciliation, lifecycle events, and generation-fenced controls │ │ │ │ │ ├── utils/ │ │ │ ├── downloadHelpers.js # PDF/raw download helpers (Playwright backend PDF) │ │ │ ├── modelCache.js # Frontend model cache utilities (display_name → api_id lookup) │ │ │ ├── openRouterSelection.js # Shared OpenRouter selector auto-fill helpers (context/output from model + host metadata) │ │ │ ├── autonomousProfiles.js # Shared autonomous recommended-profile definitions and persistence helpers │ │ │ ├── leanojProfiles.js # LeanOJ-specific recommended/user profile definitions, persistence helpers, and request builder (topic generation uses all submitters; legacy topic_generator/selector is sourced from Brainstorm Submitter 1; legacy path_decider request field is derived from Final Proof Solver) │ │ │ ├── safeStorage.js # Defensive browser-storage readers for small UI preferences │ │ │ ├── activityStyles.js # Shared live-activity formatting/styling helpers │ │ │ ├── activityPersistence.js # Bounded activity persistence helpers │ │ │ ├── liveActivityPersistence.js # Instance-prefixed durable live-activity storage and recovery │ │ │ ├── workflowLifecycle.js # Workflow lifecycle identity and stale-event reconciliation helpers │ │ │ ├── proofPresentation.js # Live-context prune classification, risk warnings, and revision/identity-fenced mutation payloads │ │ │ ├── manualProofSources.js # Manual proof-source identity and lookup helpers │ │ │ ├── manualLogRouting.js # Manual workflow proof/activity routing helpers │ │ │ ├── solutionPathPresentation.js # Progressive Solution Path UI state and stale-safe presentation helpers │ │ │ ├── credentialProviderRefresh.js # Mounted-settings credential/provider refresh coordination │ │ │ ├── promptDraftStorage.js # Durable prompt-draft storage with large-value offload │ │ │ ├── oauthProviders.js # Shared desktop OAuth/subscription provider registry helpers │ │ │ ├── runtimeConfig.js # Frontend runtime helpers (instance storage prefix, active data-root display, instance ID) │ │ │ ├── researchRunHistory.js # Groups Tier 2 papers + final answers into per-run history entries for Stage2PaperHistory/FinalAnswerLibrary │ │ │ └── disclaimerHelper.js # Frontend-only disclaimer injection for brainstorm/paper views │ │ │ │ │ ├── App.jsx # Main shell, capabilities/mode routing, global solution-path modal/settings ownership, and workflow-scoped path activity dispatch │ │ ├── index.css # Styles │ │ └── index.jsx # React entry point │ │ │ ├── package.json │ └── vite.config.js │ ├── tests/ # Regression/security tests for launcher, update, API hardening, proof/compiler behavior, and orchestration helpers │ └── test_.py # Pytest modules; keep focused on behavior and path/security regressions │ ├── requirements.txt # Python dependencies (default mode) ├── requirements-generic.txt # Additive deps for generic mode (-r requirements.txt + fastembed + onnxruntime) ├── Dockerfile # Canonical hosted generic-mode container contract (python:3.12-slim, API-only backend image) ├── .dockerignore # Hosted image build-context exclusions (desktop/frontend/dev artifacts stay out of the container) ├── docker/ │ └── entrypoint.sh # Hosted backend startup wrapper (defaults hosted envs, creates runtime dirs, delegates to backend.api.main) ├── package.json # Root scripts ├── moto-update-manifest.json # Build 0 updater/build identity manifest committed on main ├── SECURITY.md # Security policy and private vulnerability reporting ├── Click To Launch MOTO.bat # The authoritative Windows launcher entrypoint (bootstraps Python 3.10+ via winget when missing, refreshes/relaunches if needed, then delegates to moto_launcher.py) ├── linux-ubuntu-launcher.sh # Linux/Ubuntu launcher entrypoint (thin bash wrapper that delegates to moto_launcher.py) ├── moto_launcher.py # Internal Python launcher orchestration (update check, runtime resolution, dependency install, service startup) ├── moto_updater.py # Build 1 updater helper (manifest fetch, install classification, ZIP/git apply flow, launcher state tracking) └── .moto_launcher_state.json # Gitignored local launcher state (tracks active service-window PIDs and runtime roots to block unsafe update-apply)

Read the full file on GitHub · 546 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +17 lines · +335 tokens per session 64ef1532d3e1
  2. 10d ago First seen · 529 lines · 15,415 tokens per session scan A 56b002974764

Subscribe to this mod's changes

program-directory-and-file-definitions is a cursor rule published in the GitHub repository Intrafere/MOTO-Autonomous-ASI (83 stars, last pushed 5d ago), licensed MIT. It adds 15,750 tokens to every session, about $0.0788 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.