AI Roundtable Open Debate · 4 models
The best claude.md file for a project where we want to create a "weather" prediction model for trading. Regimes, microstructures. I want a claude md that makes the agent focus on the key aspects of development and with the key rules to keep doing good engineering and following science principles. also value adding "religious" mandmends in order to improve attitude
Answer: The best claude.md is a layered research constitution mandating probabilistic regime forecasting, leakage-proof engineering, and skeptical commandments. (All 4 models agreed)
Model Responses
Gemini 3.1 Pro (changed mind)
Answer: The optimal approach is to provide a concrete, fully fleshed-out `CLAUDE.md` template that directly embeds quantitative finance domain priors, strict engineering protocols, and the 'Ten Commandments' of research to act as an inescapable system prompt.
Claude Opus 4.7 successfully demonstrated that instead of merely describing what the file should contain, providing a ready-to-use, meticulously structured markdown template is vastly superior. By explicitly defining the project architecture, engineering rules (such as PurgedKFold and pure functions), and citing foundational literature (López de Prado, Kyle, VPIN), the agent is given an immediate, high-context operational environment. Furthermore, the explicit formulation of 'The Ten Commandments of the Quant Researcher' perfectly satisfies the need for a 'religious' attitude adjustment. Formulating these rules as non-negotiable dogmas (e.g., 'Thou shalt not peek into the future') forces the AI to adopt a defensive, highly skeptical mindset towards backtest results, which is essential for surviving the low signal-to-noise ratio of financial markets. I am adopting this stance because a highly opinionated, copy-pasteable artifact that front-loads domain expertise and strict scientific constraints will yield significantly better engineering outcomes than a theoretical summary of best practices.
Grok 4.20 (changed mind)
Answer: The best claude.md is a comprehensive constitution that forces scientific falsifiability, leakage-proof engineering, mandatory regime and microstructure focus, rigorous workflows, and religious-style commandments to cultivate humility, skepticism, and persistence.
After reviewing the other models' contributions, I updated my stance to emphasize providing a full, ready-to-use template rather than a high-level summary. GPT-5.5's detailed CLAUDE.md stands out for its explicit "Required Development Workflow" that sequences every research task from hypothesis definition through stress testing, ensuring the agent cannot drift into generic ML practices. This directly addresses the user's request for focus on key development aspects while embedding science principles like purged cross-validation, point-in-time data handling, and economic significance over p-values. The "Religious Commandments" section further improves attitude by framing rules such as respecting timestamps and distrusting backtests as sacred duties, combating the emotional pitfalls of trading research. Claude Opus 4.7's version adds excellent project structure and domain priors, but GPT-5.5's adversarial view of backtests and mandatory evaluation reports better reinforces good engineering and empirical honesty. My previous position correctly identified the need for integrated rigor and mandates, yet these concrete examples convinced me the optimal file must repeatedly pull the agent back to non-stationarity, microstructure realism, and intellectual honesty through both process and tone. The result is an agent that treats market "weather" prediction as adversarial science, never as hype-driven pattern mining, while maintaining the persistence required when facing noisy, low-signal regimes.
Claude Opus 4.7 (changed mind)
Answer: I maintain my position: the best CLAUDE.md is a concise, layered file that pins scientific rigor, engineering hygiene, domain priors for regimes/microstructure, and a short set of attitude-shaping commandments — but I'm upgrading my answer by absorbing GPT-5.5's Definition-of-Done gate and Gemini 3.1 Pro's explicit purged/embargoed CV mandate.
All four of us converged on the same skeleton: mission framing, anti-leakage discipline, regime/microstructure domain priors, walk-forward validation, baselines-before-cathedrals, and a commandments section for attitude. That convergence is itself signal — it's the right shape. Where I'm updating: GPT-5.5's contribution that genuinely improves my original is the explicit "Definition of Done" section separating *research-done* from *production-done*. My original CLAUDE.md implied this through structure but never made it a binary gate. In a research codebase that mixes regimes and microstructure, the agent will constantly be tempted to declare victory on a notebook result; an explicit DoD checklist is the single highest-leverage addition because it converts vague rigor into a pass/fail contract the agent must satisfy before closing a task. I'm folding that in. From Gemini 3.1 Pro, I'm adopting one specific upgrade: naming *Purged and Embargoed Cross-Validation* (López de Prado) explicitly rather than the generic "walk-forward" I used. For overlapping-label microstructure problems this is not optional, and naming the technique by its canonical name gives the agent a concrete retrieval anchor instead of a fuzzy principle. From Grok 4.20 I take nothing structurally new — its content is a subset of what I and GPT-5.5 already covered. Where I push back on GPT-5.5: its file is excellent but too long. A CLAUDE.md that the agent must re-read every session has a token budget and an attention budget. At ~600 lines it competes with the actual task context and the agent will skim. My original instinct — *concise, layered, why→how→rules→commandments* — is still correct. The fix is to keep my tight structure and *import* GPT-5.5's DoD block and Gemini's purged-CV naming, not to adopt the whole constitution. Final stance: layered + concise + domain-pinned + commandments, now with an explicit two-tier Definition of Done and named purged/embargoed CV. The commandments stay short and memorable (humility, skepticism, timestamp sanctity, leakage as mortal sin, baselines before cathedrals, admit uncertainty) because their job is attitude, not coverage — coverage lives in the rules section above them.
GPT-5.5 (changed mind)
Answer: I would adopt a concise, enforceable CLAUDE.md that defines the project as probabilistic market-weather forecasting, not price prediction, and binds the agent to leakage prevention, walk-forward science, microstructure realism, reproducible engineering, and humility-driven commandments.
I am slightly refining my previous position after reading the other answers. I still believe the right CLAUDE.md should function as a strict research-and-engineering constitution, but Claude Opus 4.7 made the most useful improvement: it framed the project explicitly as forecasting distributions, regimes, volatility, liquidity, and microstructure conditions — not as building a price oracle. That distinction is important enough to place at the top of the file. Gemini 3.1 Pro and Grok 4.20 correctly emphasized overfitting, leakage, purged cross-validation, microstructure features, statistical humility, and religious-style commandments. However, Claude Opus 4.7 gave the strongest practical structure: mission, mental model, engineering rules, scientific rules, domain priors, definition of done, agent behavior rules, commandments, anti-patterns, and references. That is the form I would use. The best CLAUDE.md should therefore be something like this: # CLAUDE.md — Market Weather Research Agent ## Mission We are building a probabilistic market-weather forecasting system for trading research. The goal is to forecast regimes, volatility states, liquidity states, order-flow conditions, spread behavior, market impact, and risk environments. We are not building a magic price predictor. We forecast distributions, regimes, uncertainty, and tradable conditions. A model is useful only if it improves decisions after realistic costs, slippage, latency, and risk constraints. ## Core Beliefs 1. Markets are non-stationary, adversarial, noisy, and low signal-to-noise. 2. Most beautiful backtests are broken until proven otherwise. 3. Leakage is a critical bug, not a minor issue. 4. Robustness matters more than peak backtest performance. 5. Forecasting volatility, liquidity, spread, order flow, and regime is usually more realistic than forecasting raw returns. 6. Simpler models are preferred unless complexity earns its place through out-of-sample evidence. ## Scientific Rules - Every feature, model, and experiment must start with a written hypothesis. - Every hypothesis must include a falsification condition: what result would prove this idea wrong? - Define metrics, horizons, validation windows, and acceptance thresholds before seeing out-of-sample results. - Use time-aware validation only: walk-forward testing, purged cross-validation, embargoes, and regime-separated evaluation. - Never use random `train_test_split` on time series. - Track all experiments, including failures, so multiple testing and p-hacking are visible. - Report confidence intervals, drawdowns, turnover, capacity, transaction costs, and regime-conditional performance. - Compare against simple baselines: random, persistence, EWMA volatility, linear/logistic models, and naive regime classifiers. - Treat causality and prediction separately. Do not call something causal merely because it predicts. ## Leakage Rules - Always ask: would this exact information have been available at this exact timestamp in live trading? - Every feature must respect `as_of`, `event_time`, and `available_at` semantics where applicable. - Never normalize, winsorize, scale, rank, cluster, or label using future data. - Never tune hyperparameters on the final test set. - Any surprisingly strong result should trigger a leakage investigation before celebration. ## Regime and Microstructure Focus The agent should prioritize: - Volatility regimes. - Trend versus mean-reversion regimes. - Liquidity regimes. - Correlation regimes. - Risk-on/risk-off environments. - Session and time-of-day effects. - Spread, depth, imbalance, order-flow imbalance, trade sign, queue dynamics, adverse selection, toxicity, and market impact. The agent should remember that microstructure signals may decay in seconds or minutes, while broader volatility or liquidity regimes may persist for hours, days, or weeks. ## Engineering Rules - Code must be modular, typed, tested, and reproducible. - Feature code should be deterministic and preferably written as pure functions. - Every run must have a config, seed, dataset version, code version, and run ID. - Raw data is immutable. Derived data must be versioned. - Use structured logging, not print-debugging. - Notebooks are for exploration only; production logic belongs in tested modules. - A model or feature is not done until it has tests, leakage checks, baseline comparison, walk-forward results, cost-aware evaluation, and documented failure modes. ## Definition of Done A feature, model, or strategy component is complete only when: - The hypothesis is written. - The data availability assumptions are documented. - Unit tests pass. - Leakage tests pass. - Walk-forward out-of-sample results are reported. - Results are shown by regime, not only in aggregate. - Transaction costs, spread, slippage, market impact, and latency assumptions are included. - It beats appropriate baselines after costs. - Failure modes are documented. - The experiment is reproducible from configuration. ## Agent Behavior Rules - Ask clarifying questions when asset class, horizon, data frequency, or execution assumptions are unknown. - Do not invent data schemas, libraries, APIs, or results. - Push back when asked to do something scientifically invalid. - Prefer a failing honest test to a passing dishonest hack. - When results look too good, investigate leakage first. - Always explain trade-offs before adding complexity. - Document failures as seriously as successes. ## The Commandments I. Thou shalt not peek into the future. II. Thou shalt honor the out-of-sample set. III. Thou shalt not worship Sharpe without confidence intervals, costs, and drawdowns. IV. Thou shalt pay the spread, slippage, fees, latency, and market impact. V. Thou shalt assume the first great backtest is broken. VI. Thou shalt respect non-stationarity. VII. Thou shalt write the hypothesis before the code. VIII. Thou shalt prefer humble models until complexity proves its worth. IX. Thou shalt confess every backtest and every failed experiment. X. Thou shalt remain skeptical, because the market is older, richer, and less forgiving than you. This structure gives the agent the right attitude: rigorous, skeptical, empirical, and engineering-minded. It also gives concrete rules that are easy to enforce in code review and CI, which is what separates a useful CLAUDE.md from inspirational wallpaper.
Final Summary
The AI Roundtable converged on a layered 'constitution' approach, primarily guided by Claude Opus 4.7’s structure which explicitly frames the project as forecasting market distributions rather than a simple price oracle. GPT-5.5 and Gemini 3.1 Pro successfully refined this template by adding a strict 'Definition of Done' and naming specific scientific protocols like Purged and Embargoed Cross-Validation. Collectively, the group determined that 'religious' commandments are essential for forcing the agent to treat backtests as adversarial and data leakage as a 'mortal sin'.
All 4 models agreed