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.
npx agentmods add instructions/dcelisgarza/portfoliooptimisers.jl/julia-docstringsgit clone --depth 1 https://github.com/dcelisgarza/PortfolioOptimisers.jlWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/dcelisgarza/portfoliooptimisers.jl/julia-docstrings)<a href="https://agentmods.dev/instructions/dcelisgarza/portfoliooptimisers.jl/julia-docstrings"><img src="https://agentmods.dev/badge/instructions/dcelisgarza/portfoliooptimisers.jl/julia-docstrings.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.09250 | $0.09250 |
| Opus 5 | $0.04625 | $0.04625 |
| Sonnet 5 | $0.01850 | $0.01850 |
| Haiku 4.5 | $0.00925 | $0.00925 |
Grade A, and why
PortfolioOptimisers.jl julia-docstrings.instructions.md 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 1,013 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Docstring and Documentation Guidelines for PortfolioOptimisers.jl
General Guidelines
- Look at how other docstrings are implemented and follow similar patterns.
- Write clear and concise documentation.
- Use consistent terminology and style.
- Include code examples where applicable.
- All public types, functions, and macros must have docstrings.
- Scope:
src/**/*.jl,ext/**/*.jlanddocs/**/*.md. A package extension inext/is documented on the same terms assrc/. - An extension documents the names it declares itself, and nothing else. An extension implements a seam that
src/declares, and the declaration carries the docstring, the# Referencessection and the API-page entry. So a method of a function declared insrc/gets no docstring of its own inext/, and the extension's own module, constants, types and macros each get one. Write a citation in thesrc/declaration, where the API page that renders it carries the bibliography block; an extension needs neither an API page nor a bibliography block of its own.test/test_26_docs.jlgates this per file, through thesweptflag insweep/manifest.toml.
The summary sentence (load-bearing — read this before writing a type docstring)
Every type docstring opens with $(DocStringExtensions.TYPEDEF), a blank line, then a summary paragraph. The first sentence of that paragraph is extracted verbatim and rendered as the type's one-line description in the Capability Catalogue (ADR 0040), which is the user-facing inventory of everything the package can do.
This is a real contract, not a convention that merely happens to hold. It is what lets the catalogue carry prose without keeping a second, drifting copy of every description. If a docstring loses its summary paragraph, the docs build fails with an error naming the type.
Write the first sentence so it stands alone in a bullet list:
- Lead with what it does, in the active voice.
Denoises by setting the smallest \num_factors` eigenvalues to zero.— notA denoising algorithm that sets...`. - Keep it under ~120 characters. If the idea needs more, put a crisp first sentence and move the detail into a second sentence, which still renders on the API page but not in the catalogue. Do not compress by deleting information.
- Avoid filler openers:
A flexible container type for...,A concrete estimator type for.... They cost a line and say nothing. - **Do not append
in \PortfolioOptimisers.jl`.** Every docstring in the package is inPortfolioOptimisers.jl`. - Do not put
@reflinks in the first sentence. The catalogue appends the type's own links after the description, so a link in the summary renders twice. Put cross-references in a second sentence or in# Related. - Do not open with a display formula. Inline maths is fine; a full
$...$equation belongs in# Mathematical definition. - Never leave a bare
_outside a code span. Markdown reads_as emphasis and will pair it with the underscore inside a neighbouring`snake_case`link, eating both and destroying the link.(f_μ vector)sitting next to[`plot_factor_mu`](@ref)rendered as(fμ vector … [`plotfactor_— a dead link that Documenter cannot resolve and the site builder reports only as a single anonymous./@ref. Write`f_mu`instead. - Siblings should not all share a prefix. If every algorithm in a family starts
Centrality algorithm type for ..., the catalogue shows that boilerplate eight times over. Say what distinguishes each one.
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.
- today First seen · 1,013 lines · 9,250 tokens per session scan A 760d8c0ea3ab
PortfolioOptimisers.jl julia-docstrings.instructions.md is an instructions file published in the GitHub repository dcelisgarza/PortfolioOptimisers.jl (21 stars, last pushed today), licensed MIT. It adds 9,250 tokens to every session, about $0.0462 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-09-04.
Other instructions, from other repositories
ATLAS CLAUDE.md
Claude Code instructions for Noctilucenty/ATLAS, covering claude.md — atlas project context (auto-loaded), what this is, current state (2026-07-24), hard rules (violations wreck the project) and operational map.
DeepSpeed AGENTS.md
AGENTS.md instructions for deepspeedai/DeepSpeed, covering deepspeed project rules, commit & ci requirements, code change discipline, test discipline and tool caveats.
stackql AGENTS.md
AGENTS.md instructions for stackql/stackql, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and testing guidelines.
meme-search CLAUDE.md
Instructions for neonwatty/meme-search, covering claude.md, 📁 file organization guidelines, 🤖 task agent usage guidelines, when to use task agents and documentation lookup pattern.
awesome-quant AGENTS.md
AGENTS.md instructions for wilsonfreitas/awesome-quant, covering agents.md, project overview, architecture, work tracking and planning and commands.
cookiecutter-mlops-package AGENTS.md
Instructions for fmind/cookiecutter-mlops-package, covering agents.md, project overview, setup & core commands, definition of done and conventions & idioms.