This repository uses explicit project context under .agents/ and .cursor/rules/.
Read those files before making changes.
If Cursor is available, also honor .cursor/mcp.json and use the project MCP tools for validation before improvising ad hoc commands.
For public web work, also read:
docs/brand-guidelines.mddocs/landing-governance.mdlanding/AGENTS.md
- Keep changes small and scoped to the requested task.
- Do not edit unrelated files.
- Do not create parallel implementations for the same concept.
- Treat existing docs, content files, and contracts as the source of truth before adding new ones.
- Default workflow is issue -> branch -> PR -> merge.
- One branch should carry one technical story with one clear dominant scope.
- Do not start branch work without an issue unless the task is an urgent fix and the user explicitly says to skip it.
- Multi-scope PRs that mix core, desktop, docs, CI, or auxiliary cleanup are not accepted by default; they require explicit written justification in the PR.
- Preserve the repository architecture:
- core logic in
src/quantlab/ - CLI routing in
src/quantlab/cli/ - desktop shell work in
desktop/ - public docs in
docs/ - public landing surface in
landing/ - generated artifacts in
outputs/
- core logic in
- Keep
main.pylimited to compatibility/bootstrap behavior. - Prefer reversible changes over broad refactors.
- Add or update
pytestcoverage when behavior changes. - Treat broker and execution changes as safety-sensitive.
- Preserve deterministic behavior and artifact contracts unless the task explicitly changes them.
- If a change replaces an existing surface, remove the old surface instead of leaving both versions side by side.
- Do not introduce alternate package managers or lockfiles without explicit approval.
- Prefer the repo MCP tools for routine validation:
quantlab_checkquantlab_versionquantlab_runs_listquantlab_paper_sessions_healthquantlab_desktop_smoke
- For public web work, use these references:
docs/brand-guidelines.mddocs/landing-governance.mdlanding/AGENTS.md
- Read
.agents/project-brief.md. - Read
.agents/implementation-rules.md. - Read
.agents/current-state.md. - Inspect
.cursor/rules/and.cursor/mcp.jsonwhen working in this repo. - Inspect the exact files involved in the task.
- Confirm existing behavior before changing it.
- For repo-level Codex guidance, use
.agents/prompts/quantlab-agent-definitive.md. - For public landing work, also read
docs/landing-governance.mdandlanding/AGENTS.md. - Search for duplicate copy, duplicate surfaces, and duplicate contracts before writing new ones.
- Use type hints for new Python code.
- Avoid side effects on import.
- Keep documentation aligned with observable behavior.
- Do not introduce secrets or environment-specific data into version control.
- If multiple agents or workers are active, assign disjoint file ownership.
- Do not edit the same file from parallel tasks unless the task explicitly requires it.
- Reuse the existing source of truth instead of introducing a second version of the same data or copy.
- Tie branch names, PRs, and commits back to the originating issue when one exists.
- Summaries should name the files changed and note whether anything was removed or replaced.
- Run the smallest relevant validation first.
- For code changes, prefer
pytestor the repo MCP checks that cover the touched surface. - For public web changes, verify build and the documented deploy path.