Skip to content

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

0 watching

Forks

Latest commit

 

History

3,979 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ditto Subnet (Bittensor SN118)

Public monorepo for Bittensor Subnet 118 (SN118), which incentivizes language-neutral agent memory harnesses. Miners submit a Docker build context serving the public harness HTTP contract; platform-operated screeners build and screen submissions; validators run each screened image in an isolated Docker sandbox and score it on DittoBench (tool calling and memory recall), setting weights on chain via Pylon (king-of-the-hill emission when eligible miners exist; 100% owner-associated burn when none qualify).

  • Stack: Python >=3.12,<3.14 (uv, Pydantic v2, pytest, ruff, mypy, MIT license), Go scorers & relays (services/dittobench-api, services/model-relay), TypeScript/web Platform dashboard & Backroom (apps/platform, apps/backroom), Terraform/Ansible (infra/).
  • External library: The reusable Rust/Go harness library lives in ditto-assistant/ditto-harness.

Quick Start

# Local Python dev (no wallet secrets or chain/API calls)
uv sync
make lint          # ruff format --check + ruff check
make typecheck     # mypy ditto/
make test          # pytest (fast unit suite)

Miner CLI (ditto)

Installed via pyproject.toml ([project.scripts]):

ditto verify --path <agent.tar.gz>                     # offline pre-flight check
ditto --network <finney|test|local> [--chain-endpoint ws://...] upload \
  --path <agent.tar.gz> --name <name> --coldkey <coldkey> --hotkey <hotkey> [-y]
ditto status <agent_id>

--network locks the API URL and subtensor network together; --chain-endpoint overrides only the chain target. See docs/MINER.md.

Validator Compose Stack

cp .env.example .env    # set wallet names, hotkey, Pylon token, W&B key (or WANDB_MODE=disabled)
./scripts/validator-compose.sh config --quiet
./scripts/validator-compose.sh up -d --build
./scripts/validator-compose.sh ps

Runs the validator worker, Pylon, DittoBench scorer, and isolated Docker sandbox from one .env. Inference is ticket-scoped via Platform (validators hold no LLM provider keys). See docs/VALIDATOR.md.

Common Commands (Makefile)

Defined in Makefile:

make lint                       # ruff format --check + ruff check
make format                     # ruff format + ruff check --fix
make typecheck                  # mypy ditto/
make test                       # uv run pytest
make localstack-up              # start local model relay + dittobench-api (STUB=1 for free relay)
make localstack-bench           # run local scored/practice bench (see localstack/README.md)
make localstack-smoke           # free scored-v12 plumbing smoke against refharness
make localstack-phase1          # scored v12 with Linux broker + TLS
make localstack-down            # stop localstack services
make preview-compose            # resolve preview plan (see preview/README.md)
make preview-test               # pytest ditto/tests/preview -q

Repository Layout

Ownership and semantic-release component boundaries are defined in release/components.toml:

Path Purpose
ditto/ Root Python package: miner_cli/ (ditto CLI), validator/, api_models/ (wire shapes), chain/ (Pylon client), preview/ (ditto-preview), treasury/, tests/
miners/ Reference starter kits: dittobench-starter-kit/ (production), dittobench-unified-starter-kit/, plus shadow kits (dittobench-coding-starter-kit/, dittobench-generator-starter-kit/, dittobench-router-starter-kit/, cpm-starter-kit/)
apps/platform/ SN118 Platform API, Alembic migrations, durable queue, dashboard, and control plane
apps/backroom/ Public-source SN118 operations console (backroom.dittobench.ai)
services/ dittobench-api/ (Go scorer), screener-orchestrator/, model-relay/, cpm-scorer/, pylon/
workers/screener/ Provider-neutral screening worker runtime
packages/ Shared contracts: ditto-screening-protocol/, dittobench-coding-contract/, ditto-edge-protocol/
research/ Deterministic benchmark generators & graders (dittobench-datagen/, dittobench-coding-datagen/, screener-controls/)
localstack/, preview/ Local end-to-end bench stack (localstack/README.md) and preview control harness (preview/README.md)
infra/ SN118 Terraform, Ansible, systemd, and containers (infra/README.md)
.agents/skills/ Repo-owned specialized skills (mirrored under .claude/skills/)

Operator & Contributor Guides

Agent Guidance

Read AGENTS.md and CLAUDE.md (plus the nearest nested AGENTS.md) before making changes. Critical rules:

  • Start every substantial task with the context router:
    python3 .agents/skills/ditto-subnet-context/scripts/lookup-context.py "<task>"
  • Worktree isolation: use .agents/skills/ditto-subnet-worktree; update cross-component producers, consumers, migrations, and release/components.toml in one monorepo PR stack.
  • Production control plane: Backroom MCP (https://backroom.dittobench.ai/mcp) is the sole production control plane — never infer live state from logs or local defaults.
  • Skills mirror: every skill must exist in both .agents/skills/<name> and .claude/skills/<name>.
  • Commit / PR prefixes: conventional commits drive component releases (python-semantic-release); never use test: — use chore(tests): for test-only changes.
  • Wire compatibility: Pydantic wire models must ignore unknown fields (ConfigDict(extra="ignore"), never extra="forbid").
  • Git Docker contexts: always pin with BuildKit ?ref=refs/heads/<branch>&checksum=<40-sha>, never #<sha>.
  • Required PR check: migration-order/merge-result enforces Alembic migration ordering on main.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages