lat-md
Skill2 starsChanged 2 months agoApache-2.0View 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, 5 of them edited.
Adopted by
Most recently taken up by
- vercel-labs/lat.mdedited, first seen Nov 11, 2026
- vercel/vercel-pyedited, first seen Oct 25, 2026
- nubjs/nubtheir own version, first seen Oct 8, 2026
- fathah/hermes-desktopedited, first seen Oct 8, 2026
- vercel-labs/notebook-factoryedited, first seen Oct 2, 2026
- vojtaholik/smeredited, first seen Jul 14, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 5
- fathah/hermes-desktop★ 15k96% same
- vercel-labs/lat.md★ 2.1k67% same
- vercel/vercel-py★ 3467% same
- vercel-labs/notebook-factory★ 479% same
- vojtaholik/smer★ 196% 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 repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
11 rules. 5 are common, 1 is distinctive, and 5 are very specific to this project.
5
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Treat lat.md/ as a focused snapshot of the current state of affairs or planned features.
- Common: line 25
Test specifications (what is tested and why)
- Common: line 37
Every section must have a leading paragraph — at least one sentence immediately after the heading, before any child headings or other block …
- Very specific: line 121
Place one @lat: comment per section, at the relevant code — not at the top of the file.
- Very specific: line 157
Every leaf section under require-code-mention: true must be referenced by exactly one @lat: comment
- Common: line 158
Every section MUST have a description — at least one sentence explaining what the test verifies and why
- Very specific: line 176
Always run lat check after editing lat.md/ files.
- Common: line 177
All wiki links point to existing sections or source code symbols
- Distinctive: line 178
All relative markdown links point to existing files
- Common: line 181
Every section has a leading paragraph (≤250 chars)
- Very specific: line 183
Every lat.md/ directory has an accurate index
“Common” is measured: kept by at least 6 in 10 of the 6 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 state of affairs or planned features. 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
- 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.
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]].
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]].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 structlat 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) and # (Python).
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 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.

