Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,20 @@ term-challenge/
│ ├── submission.rs # Named submission registry and version tracking
│ └── timeout_handler.rs # Review assignment timeout tracking
├── storage/
│ ├── Cargo.toml # chain (sled) and local (SQLite) storage implementations
│ ├── Cargo.toml # native library, depends on platform-core + platform-challenge-sdk
│ └── src/
│ ├── lib.rs
│ ├── chain.rs
│ ├── local.rs
│ └── traits.rs
│ ├── lib.rs # Root module, re-exports, From impls for StorageError
│ ├── traits.rs # ChallengeStorage trait, StorageError, Result alias
│ ├── chain.rs # Chain storage (sled)
│ ├── local.rs # Local storage (SQLite)
│ ├── pg.rs # PostgreSQL connection pool (deadpool-postgres)
│ └── postgres/
│ ├── mod.rs # Submodule declarations
│ ├── evaluations.rs # Evaluation CRUD using EvaluationResult (f64 score, UUID ChallengeId)
│ ├── leaderboard.rs # Leaderboard queries using WeightAssignment (f64 weight)
│ ├── submissions.rs # Submission storage with ChallengeId (UUID) and Hotkey (SS58)
│ ├── task_logs.rs # Task log storage and retrieval
│ └── validators.rs # Validator management with Hotkey (SS58 encoding)
├── cli/
│ ├── Cargo.toml # native binary, ratatui TUI
│ └── src/
Expand Down Expand Up @@ -165,6 +173,9 @@ The `term-cli` crate is a **native binary** (NOT `no_std`) that provides a termi
# Build CLI (native)
cargo build --release -p term-cli

# Build storage library (native)
cargo build --release -p term-challenge-storage

# Build WASM module
cargo build --release --target wasm32-unknown-unknown -p term-challenge-wasm

Expand Down Expand Up @@ -194,7 +205,7 @@ Git hooks live in `.githooks/` and are activated with `git config core.hooksPath
5. **Host functions are the ONLY external interface.** No direct HTTP, no filesystem, no std::net.
6. **Do NOT add `#[allow(dead_code)]` broadly.** Fix unused code or remove it.

> **Note:** The `cli/` and `server/` crates are exempt from the `no_std` rule (rule 1) and the host-functions-only rule (rule 5) since they are native code that runs outside the WASM sandbox. Rules 2, 3, 4, and 6 still apply to both.
> **Note:** The `cli/`, `server/`, and `storage/` crates are exempt from the `no_std` rule (rule 1) and the host-functions-only rule (rule 5) since they are native code that runs outside the WASM sandbox. Rules 2, 3, 4, and 6 still apply to all.

## DO / DO NOT

Expand Down
Loading