quantflow-instructions

A set of development rules for the Quantflow project. It covers installation, code checks, tests, documentation, and limits on when an agent may edit or commit code.

In plain words
What is it for?
It is for running Quantflow’s installation, linting, testing, and documentation commands, while following the project’s rules for code changes and version-control actions.
Why use it?
It gives contributors a consistent way to validate changes and avoids accidental edits to generated documentation or unrequested code. It also keeps committing and pushing under the developer’s control.

Instructions file for GitHub Copilot

Install

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.

agentmods
npx agentmods add instructions/quantmind/quantflow/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/quantmind/quantflow

Made for: GitHub Copilot.

Per session 1,266 This file is loaded in full into every session.
When invoked 1,266 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.01266 $0.01266
Opus 5 $0.00633 $0.00633
Sonnet 5 $0.00253 $0.00253
Haiku 4.5 $0.00127 $0.00127

Measured 2d ago against content hash f34b8522abff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

quantflow-instructions 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.

.github/copilot-instructions.md · 85 lines

How it starts

The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Quantflow Instructions

Development

  • Always run make lint after code changes — runs taplo, isort, black, ruff, and mypy
  • Never edit readme.md directly — it is generated from docs/index.md via make docs
  • To install all dependencies (including all optional extras) run make install-dev
  • Do not modify code unless the developer explicitly asks for a code change.
  • Never run git commit (or git push) unless the developer explicitly asks for it. Preparing changes in the working tree is the deliverable; committing is the developer's action.
  • Never change code that works unless you have been asked by the developer to do so, or you have a good reason to believe the code is wrong.
  • Concentrate on fixing the problem, not on making the code look nice unless you are extremely confident that your code style is better than the original and that the original code style is not serving a purpose (e.g. readability, consistency with other code, etc.). If you are unsure, ask the developer or leave the code style as it is.

Run Tests

  • To run all tests use make tests — runs all tests in the tests/ directory using pytest
  • To run a specific test file, use uv run pytest tests/path/to/test_file.py

Docker

  • The Dockerfile is at dev/quantflow.dockerfile
  • Uses ghcr.io/astral-sh/uv:python3.14-bookworm-slim as the base image (uv + Python bundled, no separate install needed)
  • Multi-stage build: builder installs deps and builds docs, runtime copies the .venv and app code
  • Package manager is uv — do not use Poetry or pip directly

Documentation

  • The documentation for quantflow is available at https://quantflow.quantmid.com
  • Documentation is built using mkdocs and stored in the docs/ directory. The documentation source files are written in markdown format.
  • Split prose into short paragraphs (one idea per paragraph) separated by blank lines. Never write a wall-of-text paragraph that strings together mechanism, rationale, caveats and usage advice. This applies to mkdocs tutorials, theory pages and long docstrings.
  • Do not use dashes (em dashes, en dashes, or hyphens used as dashes) in documentation files or docstrings. Use colons, parentheses, or restructure the sentence instead.
  • Always use Annotated(..., Doc("...")) for docstrings in code, never use triple-quoted strings below the definition of a function or class. For example:
    from typing_extensions import Annotated, Doc
    
    def foo(x: Annotated[int, Doc("This is the docstring for x")]) -> float:
        """This is the docstring for foo"""
        return float(x)
    
  • Do not use Docstrings with markdown text that may generate headings (e.g. # Heading, ## Heading, etc.)
  • Math in documentation and docstrings: always use \begin{equation}...\end{equation} for any formula or equation. Use $...$ only for brief inline references to variables (e.g. $F$, $K$). Do not use $$...$$, `...`, or RST syntax (.. math::, :math:).
  • Math notation convention: use $\Phi$ for the characteristic function and $\phi$ for the characteristic exponent, where $\Phi = e^{-\phi}$.
  • Glossary entries in docs/glossary.md must be kept in alphabetical order.
  • Do not repeat concept definitions inline in tutorials or docstrings, link to the glossary instead using a relative markdown link (e.g. [moneyness](../glossary.md#moneyness)).
  • Use relative links for all mkdocs page links (e.g. [Option Pricing](../theory/option_pricing.md)) — prefer relative over absolute URLs to keep links shorter and portable.
  • Prefer mkdocstrings relative cross-references whenever the target is visible from the current scope: write [label][.member] (same class) or [label][..Sibling] (same module) instead of repeating the fully-qualified path. Use the full path only when the target lives in a different module than the current docstring.
  • To rebuild doc examples run uv run python dev/tools/build_examples.py — runs all scripts in docs/examples/ and writes their output to docs/examples/output/

Read the full file on GitHub · 85 lines

Changes

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.

  1. 2d ago First seen · 85 lines · 1,266 tokens per session scan A f34b8522abff

Subscribe to this mod's changes

quantflow-instructions is an instructions file published in the GitHub repository quantmind/quantflow (52 stars, last pushed 16d ago), licensed BSD-3-Clause. It adds 1,266 tokens to every session, about $0.0063 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.