Thanks for considering a contribution! Read docs/what-is-an-essay.md first — it explains the essay anatomy, the draft → stable lifecycle, and the CI gates.
- Fork + clone.
pip install leanandpip install -e tools/from the repo root.- Set
FLASHALPHA_API_KEYin your env (free key at https://flashalpha.com). - Pick a
draftessay from the catalog or open a discussion to propose a new one. - Write the README first (intuition + setup + algorithm sections), then the algorithm files, then run
lean backtest python/andlean backtest csharp/, then capture goldens withpython -m tools.capture-golden essays/<your-essay>. - Open a PR. CI Layer 0 (structural) must pass; Layer 1 (backtest) will validate your goldens.
A new essay isn't a new repo — it's a new entry in the essays/<theme>/<NN-slug>/ tree:
- Pick a theme (or propose a new one)
- Number the essay (next available in the theme)
- Run
python -m tools.new-essay --theme <theme> --slug <slug> --title "..."to scaffold the folder - Fill in
README.md,python/main.py,csharp/Main.cs,references.md - Capture goldens, render results, commit
draft → stable → deprecated. stable requires non-empty golden.json in both langs + nightly CI passing for 3 consecutive runs.