lat-md
Skill34 starsChanged 5 months agoMITView on GitHub
Writing and maintaining lat.md documentation files — structured markdown that describes a project's architecture, design decisions, and test specs. Use when creating, editing, or reviewing files in the lat.md/ directory.
6 other projects use a version of this, 4 of them edited.
Adopted by
Most recently taken up by
- nubjs/nubtheir own version, first seen Oct 8, 2026
- fathah/hermes-desktopedited, first seen Oct 8, 2026
- vercel-labs/lat.mdword for word, first seen Oct 8, 2026
- vercel-labs/notebook-factoryedited, first seen Oct 2, 2026
- vercel-labs/ggbuildedited, first seen Sep 9, 2026
- vojtaholik/smeredited, first seen Jul 14, 2026
Other versions6 projects use a version of this.
Word for word · 1
- vercel-labs/lat.md★ 2.1k100% same
Edited · 4
- fathah/hermes-desktop★ 14k92% same
- vercel-labs/notebook-factory★ 499% same
- vercel-labs/ggbuild★ 195% same
- vojtaholik/smer★ 192% same
Wrote their own version · 1
- nubjs/nub★ 4.4ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- iter-coroutineSkill
- vercel-automationsSkill
The file
We split this skill into the rules it gives an agent
12 rules. 5 are common, 3 are distinctive, and 4 are very specific to this project.
5
Common
Most of the 5 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 25
Test specifications (what is tested and why)
- Common: line 38
Every section must have a leading paragraph — at least one sentence immediately after the heading, before any child headings or other block …
- Distinctive: line 66
Default to prose. Reserve Mermaid diagrams for concepts involving more than seven interacting subjects (such as components, states, or …
- Distinctive: line 90
When documenting implemented behavior, prefer the narrowest relevant source-symbol link over a whole-file link.
- Very specific: line 147
Place one @lat: comment per section, at the relevant code — not at the top of the file.
- Very specific: line 184
Every leaf section under require-code-mention: true must be referenced by exactly one @lat: comment
- Common: line 185
Every section MUST have a description — at least one sentence explaining what the test verifies and why
- Very specific: line 203
Always run lat check after editing lat.md/ files.
- Common: line 204
All wiki links point to existing sections, repository paths, or source code symbols
- Distinctive: line 205
All relative markdown links point to existing files
- Common: line 208
Every section has a leading paragraph (≤250 chars)
- Very specific: line 210
Every lat.md/ directory has an accurate index
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
lat.md Authoring Guide
This skill covers the syntax, structure rules, and conventions for writing lat.md/ files. Load it whenever you need to create or edit sections in the lat.md/ directory.
Project-specific lat documentation belongs in lat.md/. Do not modify this generated skill or a generated AGENTS.md to record project guidance: both are owned by lat tooling and may be replaced by a later lat init.
What belongs in lat.md
lat.md/ files describe what the project does and why — domain concepts, key design decisions, business logic, and test specifications. They do NOT duplicate source code. Think of each section as an anchor that source code references back to.
Treat lat.md/ as a focused snapshot of the current implemented state. Plans may be drafted in lat.md/ alongside implementation, with the intent that by commit time they describe what was implemented. Otherwise, keep proposals, hypothetical designs, and future work outside lat.md/ unless the user explicitly requests them there. A planning-only task does not require a knowledge-graph update. Do not use it as a journal or changelog, and do not grow it just to record insignificant implementation details.
Good candidates for sections:
- Architecture decisions and their rationale
- Domain concepts and business rules
- API contracts and protocols
- Test specifications (what is tested and why)
- Non-obvious constraints or invariants
Bad candidates:
- Step-by-step code walkthroughs (the code itself is the walkthrough)
- Auto-generated API docs (use tools for that)
- Journal/changelog entries for each change
- Proposals, planned features, hypothetical designs, or promises of future behavior, unless explicitly requested by the user or drafted alongside implementation to describe implemented behavior by commit time
- Temporary notes or TODOs
- Insignificant implementation details that do not change the current-state model
Section structure
Every section must have a leading paragraph — at least one sentence immediately after the heading, before any child headings or other block content.
The first paragraph must be ≤250 characters (excluding [[wiki link]] content). This paragraph is the section's identity — it appears in search results, command output, and RAG context.
# Good Section
Brief overview of what this section documents and why it matters.
More detail can go in subsequent paragraphs, code blocks, or lists.
## Child heading
Details about this child topic.# Bad Section
## Child heading
This is invalid — "Bad Section" has no leading paragraph.lat check enforces this rule.
Diagrams
Default to prose. Reserve Mermaid diagrams for concepts involving more than seven interacting subjects (such as components, states, or stages) with complex sequencing, branching, or dependencies that prose alone makes hard to follow.
The subject count alone does not justify a diagram; omit diagrams for simple sequences or relationships that a short paragraph or list explains clearly. A diagram should give users and later agents an overview of the interactions.
Keep each diagram focused on one process, use readable labels, and explain the important decisions in surrounding prose with precise source-symbol links. Prefer a small overview or several focused diagrams over one dense diagram. Use fenced mermaid blocks and run lat check to validate syntax and readability.
Section IDs
Sections are addressed by file path and heading chain:
- Full form:
lat.md/path/to/file#Heading#SubHeading - Short form:
file#Heading#SubHeading(when the file stem is unique)
Examples: lat.md/tests/search#RAG Replay Tests, cli#init, parser#Wiki Links.
Configured external sources use [[handle:path/to/file.md#Heading]] for
Markdown headings and [[handle:path/to/file.ts#symbol]] for supported code
symbols. Run lat external show <handle> before cloning an external source;
its output includes the pinned commit and safe checkout suggestions.
Wiki links
Cross-reference other sections or source code with [[target]] or [[target|alias]].
When documenting implemented behavior, prefer the narrowest relevant source-symbol link over a whole-file link. Use whole-file or directory links when discussing the module or resource as a whole, or when no supported symbol represents the target. If prose names a symbol, link that symbol directly.
Section links
Section links connect related concepts while keeping their stable graph identities explicit.
See [[cli#init]] for setup details.
The parser validates [[parser#Wiki Links|wiki link syntax]].Repository path links
Reference any existing file or directory beneath the project root without a fragment:
[[schema.sql]]
[[CHANGELOG]]
[[src/components]]Unsupported formats validate as references but cannot be opened by Lat. A #fragment requires a lat.md/ section or a supported source file.
Source code links
Reference functions, classes, constants, and methods in source files:
[[src/config.ts#getConfigDir]] — function
[[src/server.ts#App#listen]] — class method
[[lib/utils.py#parse_args]] — Python function
[[src/lib.rs#Greeter#greet]] — Rust impl method
[[src/app.go#Greeter#Greet]] — Go method
[[src/app.h#Greeter]] — C structWhen prose names an implementation symbol or a behavior governed by one, link the symbol instead of using a bare code span or copying its literal value. Prefer [[src/config.ts#DEFAULT_TIMEOUT]] (or [[src/config.ts#DEFAULT_TIMEOUT|the default timeout]]) over a bare identifier or copied value. Keep the behavioral explanation in prose; the link makes its implementation binding navigable and validated.
lat check validates that all targets exist.
Code refs
Tie source code back to lat.md/ sections with @lat: comments:
// @lat: [[cli#init]]
export function init() { ... }# @lat: [[cli#init]]
def init():
...Supported comment styles: // (JS/TS/Rust/Go/C/PHP) and # (Python/PHP).
Place one @lat: comment per section, at the relevant code — not at the top of the file.
Test specs
Describe tests as sections in lat.md/ files. Add frontmatter to require that every leaf section has a matching @lat: comment in test code:
---
lat:
require-code-mention: true
---
# Tests
Authentication test specifications.
## User login
Verify credential validation and error handling.
### Rejects expired tokens
Tokens past their expiry timestamp are rejected with 401, even if otherwise valid.
### Handles missing password
Login request without a password field returns 400 with a descriptive error.Each test references its spec:
# @lat: [[tests#User login#Rejects expired tokens]]
def test_rejects_expired_tokens():
...Rules:
- Every leaf section under
require-code-mention: truemust be referenced by exactly one@lat:comment - Every section MUST have a description — at least one sentence explaining what the test verifies and why
lat checkflags unreferenced specs and dangling code refs
Frontmatter
Optional YAML frontmatter at the top of lat.md/ files:
---
lat:
require-code-mention: true
---Currently the only supported field is require-code-mention for test spec enforcement.
Validation
Always run lat check after editing lat.md/ files. It validates:
- All wiki links point to existing sections, repository paths, or source code symbols
- All relative markdown links point to existing files
- Full and collapsed reference-style links have definitions
- All
@lat:code refs point to existing sections - Every section has a leading paragraph (≤250 chars)
- All
require-code-mentionleaf sections are referenced in code - Every
lat.md/directory has an accurate index
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

