Writing Docs (Tattletale House Style)

SkillFiles & storage

Repository documentation contract for the Tattletale monorepo: the house style for doc comments, module headers, inline comments, and any committed prose (what-over-how, contracts over narration, banned-vocabulary blocklist, format rules, eight canonical reference files). Use when writing or updating doc comments, module headers, inline comments, or any prose in this repo, or when de-sloping existing comments.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Writing Docs (Tattletale House Style) skill

What this skill tells your AI

The instructions your AI receives, as published by mratsim/tattletale in .agents/skills/writing-docs/SKILL.md and read by ahel’s review.

What I do

This skill is the repository documentation contract. It distills the eight canonical files' style (REFERENCE.md) plus the Write Without Hidden Context framing below into one enforceable standard.

  • the reader is a developer who just cloned the repo
  • the reader carries no history, no pipeline labels, no campaign vocabulary

When to use me

  • writing or updating any committed prose
  • de-sloping existing comments

The prose spans doc comments, module headers, inline comments, type docs, kernel docs, Lean comments, test file headers, and commit messages.

Golden rules

  1. Think who is your audience. A user gets ## docs on correct use, never a drowning in how it is done.
  2. Think who is your audience, part two. A maintainer gets # comments in industry-standard jargon.
  3. Write without hidden context. Rewrite any sentence a repo puller cannot understand.
  4. A wall of text is hostile. Prefer diagrams for lifecycles, dataflow, and multidimensional structures.
  5. A wall of text is hostile, part two. Prefer bullet points for contracts.

Quick start

  1. Write the doc as a contract covering behavior, preconditions, postconditions, invariants, and shapes.
  2. Never narrate the journey.
  3. Open a module header with a noun phrase, PagedRadixTrie (a compressed Radix/Patricia trie).
  4. Module headers run 3-8 tight lines, test headers carry the run command only.
  5. Before committing, run the doc linter and read the banned-vocabulary table (EXAMPLES.md).

Write Without Hidden Context

Applies to all repository prose.

  • documentation, comments, docstrings
  • commit and PR text, plans, reports
  • names, errors, technical summaries

Everything must make sense to a technically capable reader. The reader has the repository. The reader carries none of the conversation or development history.

  • Describe the system as it exists with purpose, behavior, invariants, interfaces, evidence, and limits.
  • Never narrate the journey.
  • No lifecycle labels act as identities (Phase 2, pilot, next, current, new, old, latest).
  • No false definite references. A bare the experiment is invalid unless the antecedent is locally clear.
  • Counts, dates, and versions are attributes, not identities.
  • On first reference, give the semantic role and the durable identifier (artifact, path, schema, revision, hash).
  • Explain concepts before identifiers. Codenames and experiment labels never enter the design vocabulary.
  • Mention literal identifiers such as XOR-Cheb-T12 only after describing what they mean.
  • Canonical documentation is a present-state specification, not a changelog.
  • Replace stale claims instead of layering history on top.
  • Chronology, rejected attempts, and retrospectives belong only in explicitly historical documents.
  • Label status explicitly (implemented, qualified, research-only, unsupported).
  • State evidence as conditions, measurement, result, and conclusion, not as a story.
  • Comments explain invariants, intent, and non-obvious constraints, never change history.
  • TODOs name the missing condition and the removal criterion.
  • Commits and PRs state the resulting behavior, the technical reason, the compatibility impact, and the validation.
  • Commits and PRs do not recount attempts or pivots.

The final test applies to every sentence, if understanding it requires "you had to be there," rewrite it.

Contract

  1. What, not how. State what the code does and the contract it upholds.
  2. What, not how, the exception. Narration of an invisible strategy, dataflow, or lifecycle is legitimate.
  3. What, not how, the exception in detail. A scheduler's strategy or a sync path with a deadlock failure mode qualifies.
  4. Contracts over narration. Preconditions, postconditions, invariants, ownership, shapes, lifecycle.
  5. Contracts over narration, the form. Enumerations and layout facts are bullets or tables, one concept per bullet.
  6. Never open a description with The. Start with what the thing is (Compile-time record: ...).
  7. Never open a description with The, the exception. A value-returning function opens with Returns ....
  8. Depth scales with reader need. One line for self-evident failure modes, full explanation for invisible ones.
  9. Depth scales with reader need, the invisible set. Concurrency, memory ordering, asm correctness.
  10. Depth scales with reader need, the math. State and prove non-obvious math.
  11. No hidden context. No finding IDs, iteration labels, history narration, temporal words, or unverifiable claims.
  12. No hidden context, the perf clause. Perf numbers need a referenced benchmark.
  13. Audience syntax. ##//// is for API users, #/// for maintainers and auditors.
  14. Audience syntax, the boundary. A ## comment never points at test files or unrelated subsystems.
  15. Audience syntax, the legitimate case. A contract reference to a paired module (pack ↔ ukernel) is legitimate.
  16. The name carries the doc. When the identifier says what it is, drop the comment that restates it.
  17. The name carries the doc, the floor. Public items still need a doc comment stating the contract.
  18. Doc comments sit in the body. The doc comment of a proc or func is its first body line, a ## block above the declaration is banned.
  19. Banned vocabulary. The hard blocklist (EXAMPLES.md) is absolute for every committed prose.
  20. Banned vocabulary, the scope. The blocklist binds this skill's own files too.
  21. Banned vocabulary, the single exception. EXAMPLES.md quotes banned forms as teaching material.
  22. Format rules. Parentheses stay whole, no ; and no em-dashes in prose, lines break at phrase boundaries.
  23. Format rules, the cap. 140 chars per prose line, bullets for enumerations.
  24. Format rules, the colon. A prose colon ends its line, what it introduces goes on the next lines.
  25. Format rules, the severed unit. No line opens on a severed one-word continuation ("apply,").
  26. Format rules, the reference. Details in REFERENCE.md.
  27. Fix in batches. One scripted replace pass per file, then one rescan, never a lint-edit-recheck cycle per finding.
  28. Write in passing form. Compose every comment block in the passing form the first time, a block written clean costs no fix tokens.
  29. Test docs scale with test complexity. A tile op or kernel-vs-reference match needs setup, reference, tolerance.
  30. Test docs scale with test complexity, the floor. Elaborate docs only for genuinely intricate machinery.
  31. Test docs scale with test complexity, the doubt clause. When in doubt, cut.
  32. No justification prose. State what the code does, never a refusal or lack.
  33. No justification prose, the tombstone clause. A deleted check carries no tombstone comment.

Advanced features

  • Per-domain patterns (module headers, SME2 kernels, tensor ops, transformer layers, stateful modules + Lean)
  • Format rules, canonical references, and the full self-check live in REFERENCE.md
  • The banned-vocabulary replacement table and before/after examples live in EXAMPLES.md

Signals

GitHub stars
40
Forks
4
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
writing-docs-mratsim
Source
github.com/mratsim/tattletale