Economic-Modeling-Studio / rules
Cursor rule4 starsChanged 6 days agoMITView on GitHub
Code Translation standards
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,243 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository210 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/ai-ml-code.mdcCursor rule
- .cursor/rules/data-pipelines.mdcCursor rule
- .cursor/rules/documentation.mdcCursor rule
- .cursor/rules/dsge-code.mdcCursor rule
- .cursor/rules/econometrics-code.mdcCursor rule
- .cursor/rules/eviews-code.mdcCursor rule
- .cursor/rules/forecasts.mdcCursor rule
- .cursor/rules/gempack-code.mdcCursor rule
- .cursor/rules/lego-manifests.mdcCursor rule
- .cursor/rules/llm-code.mdcCursor rule
- .cursor/rules/model-code.mdcCursor rule
- .cursor/rules/notebooks-and-scripts.mdcCursor rule
- .cursor/rules/r-code.mdcCursor rule
- .cursor/rules/restricted-data.mdcCursor rule
- .cursor/rules/rl-code.mdcCursor rule
- .cursor/rules/sectoral-trade-climate-code.mdcCursor rule
- .cursor/rules/semi-structural-code.mdcCursor rule
- .cursor/rules/stata-code.mdcCursor rule
- .cursor/rules/tests.mdcCursor rule
- .cursor/rules/validation.mdcCursor rule
- adoptSkill
- ai-auditSkill
- backtestSkill
- build-abmSkill
- build-causal-mlSkill
- build-cgeSkill
- build-climate-macroSkill
- build-deep-forecasterSkill
- build-drl-policySkill
- build-dsgeSkill
- build-financial-programmingSkill
- build-fpasSkill
- build-game-modelSkill
- build-hankSkill
- build-io-samSkill
- build-llm-agentsSkill
- build-llm-pipelineSkill
- build-multicountrySkill
- build-neural-solverSkill
- build-rag-kbSkill
- build-semi-structuralSkill
- build-sfcSkill
- build-trade-modelSkill
- calibrate-modelSkill
- calibration-planSkill
- carbon-pricing-analysisSkill
- chart-packSkill
- climate-scenarioSkill
- code-inventorySkill
- code-reviewSkill
- country-typologySkill
- create-exerciseSkill
- data-requirementsSkill
- debt-decompositionSkill
- debt-sustainabilitySkill
- design-trainingSkill
- distributional-analysisSkill
- equivalence-testSkill
- The first 60 shown.
The file
We split this code-translation.mdc into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Every target file starts with a header naming its source file (and line range where a file is split)
- Very specific: line 15
Every construct that does not translate one-to-one gets a row in construct-log.md with its effect on results
- Very specific: line 17
Write outputs at full precision under the source's file names.
≈ “Common” is an estimate: at least 1 in 5 of the 6,809 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Code Translation standards globs: translations/** alwaysApply: false --- <!-- Generated from .claude/rules/code-translation.md by tools/sync_agents.py. Edit the source, then run the script. --> # Rules: Code Translation - The source code is read-only. Never edit, move, reformat or delete files in the source folder; `source-manifest.json` holds their fingerprints and `python tools/translate.py verify-source <workspace>` must pass at sign-off - Uploaded source folders go to `translations/incoming/<name>/`, which git ignores; do not commit third-party or confidential code - Work from an approved `plan.md`; translated code goes to `target/` only, and agents write only to the paths the plan gives them - Every target file starts with a header naming its source file (and line range where a file is split) - First pass is faithful: same behavior, same outputs and file names, bugs kept and logged; refactoring and fixes come after equivalence, as separate approved changes re-tested against the same reference outputs - Make every default explicit where languages differ: missing values, sorting, rounding, indexing, storage order, standard-error type, degrees of freedom, quantile definition, base category, solver, tolerances - Every construct that does not translate one-to-one gets a row in `construct-log.md` with its effect on results - Reference outputs come from the source (run here or supplied by the user, with provenance); never from the translation and never invented. Without them, equivalence is `NOT ASSESSED — NO REFERENCE OUTPUTS` - Write outputs at full precision under the source's file names; compare with `python tools/translate.py compare` using tolerances fixed before the comparison - Random draws: read the source's exported draws or compare distributions; never claim equal draws from equal seeds across software - Target code follows the studio rules for its language and folder (`r-code.md`, `stata-code.md`, `eviews-code.md`, `gempack-code.md`, `model-code.md`, and the others) and runs from a clean start with one command - The equivalence verdict comes from `translation-equivalence-auditor`, who did not translate the code
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

