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.
npx agentmods add rules/naxium-oss/distribai/cursorrulesgit clone --depth 1 https://github.com/naxium-oss/DistribAIWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01478 | $0.01478 |
| Opus 5 | $0.00739 | $0.00739 |
| Sonnet 5 | $0.00296 | $0.00296 |
| Haiku 4.5 | $0.00148 | $0.00148 |
Grade A, and why
cursorrules 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lessons
User Specified Lessons
- Use
.venv312on this host (brokenvenv). Preferuv pipwhen available. - Commit attribution: conventional subjects only — never
[Cursor]or Co-authored-by Cursor. - User: finish all unfinished items without stopping.
- Custom architectures: support EVERY external/custom arch path (HF auto_map, local dirs, declarative knobs), not a shortlist of named repos. Never put specific Hub model names in tests/commits.
Cursor learned
- Parallel paraphrase agents can corrupt files mid-write — re-run gates after agents settle.
- Static audit forbids
placeholder="..."ellipses in dashboard HTML. - Playwright webServer failures cascade as ERR_CONNECTION_REFUSED — fix server boot first.
- Dashboard remake slop clusters in
index-preview.js(// ▸banners) and redundant HTML<!-- Section -->labels. - PowerShell mangles inline Python with regex braces — write a temp
.pyfile and run it instead. - Never style bare
header {}for site chrome — nested<header>in cards (e.g. help trouble heads) inherit sticky/z-index and cover the page. Scope tobody > header. - Never reuse
id="searchResults"on Help — node header already owns it; help search must use a unique id (e.g.helpTopicResults) or getElementById hits the wrong panel. - Header global search:
#searchInputmarkup alone is not enough — wire inscripts.js, and add.search-results.show { display:block }(base rule isdisplay:none). Prefer flex.search-fieldover absolute icon +top:50%(icons.css reload after styles.css can also override icon size via1em). - Never put
position:absolute; top:50%search icons on a wrapper that also contains results/meta — when the panel opens,50%jumps and the glyph overlays “0 results”. Wrap icon+input in their own flex field. - Named decoder profiles must default
n_kv_headston_headswhen omitted so GQA stays opt-in. - PyInstaller onedir:
EXE(..., exclude_binaries=True)thenCOLLECT; optional TLS datas; hidden import isexecutornotjob_executor. - PyInstaller
a.binariescan contain duplicate-path 3-tuples across deps (clr_loader/pythonnet DLL scans) —dict(a.binaries)chokes; dedupe by first element manually instead. - Never exclude
unittestin a PyInstaller spec when bundling torch —torch.distributed.configimports it directly and the frozen app crashes withModuleNotFoundError: No module named 'unittest'. JobSubmissionHandlerinjob_submission.pywas instantiated fresh per-route (5x) and itsallowed_orgsset was never populated anywhere (no admin endpoint calledadd_allowed_org) — every org got a permanent 403 on/jobs/*. Fixed: one shared handler instance across routes + default-open org policy (DISTRIBAI_ALLOWED_ORGSenv var to restrict).bench_network._try_downloadmust raiseValueErroron non-HTTPS URLs (not returnNone) — two tests disagreed on this contract; raising is the one that matches the "Invalid benchmark URL" security-intent test name.bench_downloadcatches it and moves to the next URL.- Local blob paths (windows drive paths, bare paths,
file://) are gated byservices_python/blob_url_policy.py::_is_under_runtime_roots— tests using arbitrarytmp_pathmust setGRADIENT_LOCAL_ROOTenv var or they get "Unauthorized batch blob URL". - Dashboards had no per-install org identity — job submissions hardcoded
org: 'DistribAI'for every user. Addedclient/lib/identityStore.js(org_id/node_idpersisted in desktop.json,/api/settings/org-id) and wiredfetchOrgId()into the create-job flows injobs.html,orchestrator-jobs.html,index-preview.js. transformers/huggingface_hub/tokenizerswere never inrequirements.txtdespite being a hard import inexternal_arch.py/hf_integration.py— every real external/custom-arch job wouldRuntimeError: transformers is required...on a clean install. Added to requirements.txt.load_external_architecture(..., from_scratch=True, config_overrides={...})builds viaAutoModelForCausalLM.from_config(no pretrained weight download) — lets a job train a tiny/custom-sized instance of a real Hub architecture (including gated or huge checkpoints) without ever touching the actual weights.executor._is_language_modelonly recognizedDistribAIModelWrapper, so every external/HF architecture silently fell into the toy MSE batch/loss path and crashed (model(inputs)on byte-batch +functional.mse_losson aModelOutput). Fixed by also recognizingtransformers.PreTrainedModeland readingoutputs.logitswhen present._collect_gradientscrashed withTypeError: Got unsupported ScalarType BFloat16innumpy()— published Hub archs often defaulttorch_dtype: bfloat16. Upcast grads to float32 before compression/serialization.- Bespoke Hub repos with no
auto_map/AutoModelentrypoint (rawnn.Module+ custom checkpoint loader, nofrom_pretrained) cannot go throughload_external_architectureat all — reproduce their architecture DNA (e.g. looped shared block + windowed attention) via DistribAI's own declarative knobs (n_unique_layers<n_logical_layers,sliding_window) instead.
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.
- 2d ago First seen · 48 lines · 1,478 tokens per session scan A 8d23e5489be0
cursorrules is a cursor rule published in the GitHub repository naxium-oss/DistribAI (11 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,478 tokens to every session, about $0.0074 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.
Other cursor rules, from other repositories
050-plan
When the user types /plan or asks to create a project plan, feature PRD, or retrospective.
dreamd-recall
Recall lessons, decisions, and prior context from the .agent/ memory daemon. Use when starting work in a project that has a .agent/ folder, when the user references a past decision, or when you are about to make a choice that has a documented prior.
session-memory
Use at conversation wrap-up or when the user explicitly indicates end-of-session — capture residual lessons not captured in-flight.
context-recorder-system
Context Recorder System (记录员系统) - 模块化索引文件.
rules
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
misc-documenting-learnings-and-clarifying-assumptions
Documenting Learnings and Clarifying Assumptions for Efficient Task Execution.