outl: Instructions file for GitHub Copilot

.github/instructions/shared-primitives.instructions.md

outl shared-primitives.instructions.md is an instructions file for GitHub Copilot from outlmd/outl. It costs 12,548 tokens per session, scanned A, original, MIT.

Instructions for reviewing shared helper functions against a central catalog of existing primitives. Shared primitives are reusable building blocks, and the rules require related documentation and code changes to stay synchronized.

In plain words
What is it for?
Use it during pull-request review when adding normalization, extraction, hashing, Markdown, action, or other reusable code.
Why use it?
It prevents duplicate helpers and inconsistent implementations by requiring contributors to check the catalog before adding new functions or public symbols.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is outlmd/outl's own configuration. It tells GitHub Copilot how to work on outl itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything outl configures →

Reuse

Borrowing it

Nothing to install: this file belongs to outlmd/outl. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/outlmd/outl/main/.github/instructions/shared-primitives.instructions.md
Clone the repo
git clone --depth 1 https://github.com/outlmd/outl

Made for: GitHub Copilot.

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

agentmods badge for outl shared-primitives.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/outlmd/outl/shared-primitives/github.svg)](https://agentmods.dev/instructions/outlmd/outl/shared-primitives)
Your own site
<a href="https://agentmods.dev/instructions/outlmd/outl/shared-primitives"><img src="https://agentmods.dev/badge/instructions/outlmd/outl/shared-primitives/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for outl shared-primitives.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/outlmd/outl/shared-primitives"><img src="https://agentmods.dev/badge/instructions/outlmd/outl/shared-primitives.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12,548 This file is loaded in full into every session.
When invoked 12,548 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.12548 $0.12548
Opus 5.5 $0.05019 $0.05019
Sonnet 5.5 $0.02510 $0.02510
Haiku 4.5 $0.01255 $0.01255

Measured yesterday against content hash 86f4343941df, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

outl shared-primitives.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 yesterday.

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/instructions/shared-primitives.instructions.md · 238 lines

How it starts

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

Shared primitives catalog

The catalog is indexed at docs/shared-primitives.md. Its rows live in primitives-core.md, primitives-markdown.md and primitives-actions.md; the index says which part owns what. Before approving a helper, grep all four (docs/shared-primitives.md docs/primitives-*.md) and scan the relevant sub-table. If the diff adds a primitive that overlaps with a catalog entry, it is a duplicate — block the PR and point at the existing function with file:line.

Review checklist on every PR that adds a helper:

  • Does the new function name / signature describe something already in the catalog? If yes → blocker, point at the existing one.
  • Does the PR add a normalize, coerce, strip, slugify, hash, derive, or extract helper without grepping the catalog first? Ask: "did you check <catalog entry> before writing this?"
  • Does the new code create a page / write .md / mint a NodeId / build a LogOp outside the catalog primitives? Block — that's how invariants drift.
  • Does the PR add a new pub fn|struct|enum|const in crates/outl-{core,md,actions}/src/? The new symbol must appear in the Shared primitives catalog (the local doc-sync-guard.sh + catalog-sync-guard.sh hooks enforce this pre-merge; the same rule applies in review).

Recently added — durability primitives. Block any PR that reads a file it is about to write back with read_to_string(..).unwrap_or_default(). That is the silent-page-wipe bug: a failed read parses as an empty AST, gets rendered, and atomically replaces a full page with nothing.

Intent Use this File
Read a .md you are about to mutate and write back — missing file → empty, every other I/O error propagates outl_md::atomic::read_for_rewrite crates/outl-md/src/atomic.rs
Build one sidecar block entry — the only way to build one unless you're preserving an expanded ref_handle; keeps content_hash, ref_handle and the level-2 text derived from the same revision. A hand-rolled literal is how they end up describing different revisions outl_md::sidecar::SidecarBlock::from_text(id, line, indent, text) crates/outl-md/src/sidecar/payload.rs
Sidecar format version — currently 2. Block any PR that bumps it for an additive field. Feature detection is by field presence, never by version number; an already-shipped binary rejects a higher version, rebuilds the sidecar from scratch, and duplicates every block. Bump only when an existing field changes meaning or encoding. Never hardcode the integer in a Sidecar literal outl_md::sidecar::SIDECAR_VERSION / MIN_READABLE_SIDECAR_VERSION crates/outl-md/src/sidecar/payload.rs
Low-level crash-safe write (prefer the journal::write_md_atomic wrapper) outl_md::atomic::write_atomic crates/outl-md/src/atomic.rs
Path of a workspace's orphan log — every reconcile_md call must pass this, never None. One owner: outl_ws's Paths::at derives from it outl_actions::sync::orphans_log_path / SyncEngine::orphans_log crates/outl-actions/src/sync.rs

Recently added — device identity. Block any PR that reads the write actor from <workspace>/.outl/config.toml. That file rides the file-sync surface (Syncthing / Dropbox / NFS / git all replicate .outl/), flock(2) is machine-local, so two devices reading one actor_id both append to one ops-<actor>.jsonl and lose ops with no error.

Intent Use this File
Resolve which actor this device writes as for a workspace (migration-safe; the only supported entry point for CLI / TUI / MCP / embedders) outl_ws::actor::resolve_device_actor crates/outl-ws/src/actor.rs
Device-local actor store — per workspace instance (actor_for_instance, keyed by WorkspaceId plus the canonical root path, so a copied directory forks instead of sharing an op log, while a moved one keeps its actor) and device-wide (device_actor, the Tauri clients' <dir>/actor) outl_core::DeviceStore (errors: outl_core::DeviceError) crates/outl-core/src/device/mod.rs
Stable fingerprint of one physical device — the claim marker that lets exactly one device adopt a legacy config.toml actor outl_core::MachineId (via DeviceStore::machine_id) crates/outl-core/src/device/mod.rs
Directory holding this device's identity files ($OUTL_DEVICE_DIR, else $XDG_CONFIG_HOME/outl, else ~/.config/outl) — never inside a workspace outl_core::device_dir crates/outl-core/src/device/mod.rs
Whether an actor binding may be dropped — the single owner of that verdict, so a listing and a prune cannot disagree (root gone and its parent present and past the TTL; anything unreadable keeps the binding) outl_core::BindingVerdict, outl_core::ActorBinding, outl_core::STALE_BINDING_TTL (via DeviceStore::actor_bindings / stale_actor_bindings / prune_binding) crates/outl-core/src/device/gc.rs
Device-store scratch files a killed writer left half-published (never bindings, never backed up) outl_core::STALE_SCRATCH_TTL (via DeviceStore::stale_scratch / prune_scratch) crates/outl-core/src/device/gc.rs

Read the full file on GitHub · 238 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. yesterday Changed · +1 lines · +57 tokens per session 86f4343941df
  2. 3d ago Changed · +3 lines · +211 tokens per session a28b8eb1f4ca
  3. 11d ago Changed · +13 lines · +402 tokens per session 1fdf37fe1e72
  4. 20d ago Changed · +14 lines · +600 tokens per session 65365c63dd35
  5. 23d ago Changed · +1 lines · +221 tokens per session 97421406d4a1
  6. 28d ago Changed · +4 lines · +176 tokens per session 71d03b30a60a
  7. 29d ago Changed · +15 lines · +816 tokens per session 0cd0a478eb8f
  8. 1mo ago Changed · +2 lines · +188 tokens per session 10764d6ba34e
  9. 1mo ago Changed · +1 lines · +143 tokens per session 62c7c3c41a46
  10. 1mo ago First seen · 184 lines · 9,734 tokens per session scan A c14fa01f9668

Subscribe to this mod's changes

outl shared-primitives.instructions.md is an instructions file published in the GitHub repository outlmd/outl (222 stars, last pushed yesterday), licensed MIT. It adds 12,548 tokens to every session, about $0.0502 per session on Opus 5.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-01.

Related

Other instructions, from other repositories

md-feedback copilot-instructions.md

Copilot instructions for yeominux/md-feedback, covering plan review workflow, before implementing any plan, annotation types and mcp setup.

yeominux/md-feedback · 309 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens