CLRS
AGENTS.md5.1k starsChanged todayMITView on GitHub
Solutions to Introduction to Algorithms, Third Edition, published at https://walkccc.me/CLRS with MkDocs and Material for MkDocs. Math is rendered client-side by KaTeX (docs/js/katex.js), not by a Markdown extension. math fence there instead, with plain LaTeX (\\, \{`), since fenced content skips Markdown. CI checks commit messages and author/committer timestamp equality on pull requests and pushes to main, checks PR titles on pull requests, runs npm run format:check, scripts/check_math.py, and mkdocs build --strict on every pull request and deploys main to…
- Installs packages
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
Commit messages and PR titles use Update <files> with file basenames, for example Update 33.3.md or Update 5-1.md, 5-2.md.
- Distinctive: line 27
Commit messages contain only that subject line: no body or trailers.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLRS Solutions
Solutions to Introduction to Algorithms, Third Edition, published at https://walkccc.me/CLRS with MkDocs and Material for MkDocs. Math is rendered client-side by KaTeX (docs/js/katex.js), not by a Markdown extension.
Layout
docs/ChapXX/XX.Y.md: exercises of section XX.Y, one## XX.Y-Zheading per exercise.docs/ChapXX/Problems/XX-Z.md: end-of-chapter problems.mkdocs.yml: thenavlists every page. A new page must be added there.
Writing a solution
- Quote the exercise statement as a blockquote (
> ...), then write the solution below it. - Unsolved exercises say
(Omit!). Replace it rather than adding a second answer. - Pseudocode goes in a
```cppblock in CLRS style:PROCEDURE-NAME(A, p, r), 4-space indentation,=for assignment,==for comparison. - Markdown runs before KaTeX, so escape what Markdown would eat:
- Line breaks inside
cases/alignedare\\\\, not\\. - Literal braces are
\\{and\\}. _and*inside$...$sometimes need\_and\*when Markdown turns them into emphasis.
- Line breaks inside
- GitHub's preview applies the same Markdown escaping inside math, so this source renders there too, apart from occasional quirks in
$$blocks. - List items use
-, and anything continuing an item is indented 4 spaces; MkDocs drops 2-space continuations out of the list.npm run format(Prettier with math masked out) enforces this. - Inside a list item, GitHub ignores
$$. Use a```mathfence there instead, with plain LaTeX (\\,\{), since fenced content skips Markdown.
Commit history
- Commit messages and PR titles use
Update <files>with file basenames, for exampleUpdate 33.3.mdorUpdate 5-1.md, 5-2.md. - Commit messages contain only that subject line: no body or trailers. Check every contributor commit before merging; changing the PR title does not change its commit messages.
- Preserve each commit's original author timestamp, including its timezone offset. Set its committer timestamp to that same author timestamp; never use the rewording or merge time. Preserve the tree and both identities. Keep a backup ref and verify these fields for every rewritten commit. Do not squash contributors' commits to normalize their messages.
- Land authorized changes by fast-forwarding the verified PR head to
main. Do not use GitHub rebase/squash merge, which replaces committer timestamps. If rebasing is needed, use--committer-date-is-author-date, update the PR branch, and rerun checks before landing. - Shared skills live in
.agents/skills/. When asked to handle issues or pull requests, or given GitHub notification emails, read.agents/skills/triage/SKILL.mdand follow its workflow.
Verify
pip install -r requirements.txt
npm ci
npm run format
python3 scripts/check_math.py
mkdocs build --strict
mkdocs serveCI checks commit messages and author/committer timestamp equality on pull requests and pushes to main, checks PR titles on pull requests, runs npm run format:check, scripts/check_math.py, and mkdocs build --strict on every pull request and deploys main to the gh-pages branch.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
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.

