documentation-and-adrs
Skill2 starsChanged 5 days agoMITView on GitHub
Records decisions and documentation for ML research codebases. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing model APIs, logging new dataset schemas, or recording context that future researchers and agents will need to understand the codebase.
90 other projects use a version of this, 64 of them edited.
Adopted by
Most recently taken up by
- dzikrisyairozi/agent-skillsedited, first seen Nov 29, 2026
- aakash1552005/universal-agent-skillsedited, first seen Nov 29, 2026
- karanmrn/karanagentskillstheir own version, first seen Nov 29, 2026
- karanmrn/kstacktheir own version, first seen Nov 29, 2026
- Dannykkh/skill-olympustheir own version, first seen Nov 29, 2026
- alexj11324/Mikkaedited, first seen Nov 29, 2026
Used with
Projects with it also use accessibility-engineering, constraint-driven-development and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
steven123397Skillaccessibility-engineering
Audits existing interfaces for WCAG 2.2 AA conformance and remediates the violations found. Use when auditing a page or component for accessibility, running axe-core or pa11y, triaging a11y violations, or checking screen reader and contrast issues before shipping.
Also in 4 projects that use this
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 20 projects that use this
jaydubya818Skillobservability-and-instrumentation
Add or review logs, metrics, traces, and actionable alerts.
Also in 36 projects that use this
jaydubya818Skilldeprecation-and-migration
Retire APIs or migrate consumers and persistent data across releases.
Also in 44 projects that use this
HK-hubSkillsource-driven-development
Grounds every implementation decision in official documentation. Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters.
Also in 45 projects that use this
seikaikyoSkilldoubt-driven-development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
Also in 41 projects that use this
Other versions90 projects use a version of this.
Word for word · 0
None found.
Edited · 64
- ollaya-dev/ollaya★ 1.5k13% same
- shashankswe2020-ux/whoop-mcp★ 18112% same
- muratgur/ordinus★ 11113% same
- alexj11324/Mikka★ 9011% same
- aspectly-labs/Mikka★ 9011% same
- sampleXbro/agentsmesh★ 3112% same
- jaskirat1616/grok-skills★ 2211% same
- ishandutta2007/Awesome-Agent-Skills★ 2112% same
- aboylabs/ai-agent-skills★ 1512% same
- HK-hub/AgentSkills★ 611% same
54 more not listed
Wrote their own version · 26
- addyosmani/agent-skills★ 121ksame name
- vinvcn/addyosmani-agent-skills-zh★ 46same name
- jmxt3/gitscape.ai★ 33same name
- JPeetz/agent-skills★ 21same name
- karanmrn/karanagentskills★ 11same name
- karanmrn/kstack★ 11same name
- Dannykkh/skill-olympus★ 9same name
- ldaume/agentic-engineering-harness★ 5same name
- bnalwalid/walidforge-skills★ 2same name
- codexskills/agent-forge★ 2same name
16 more not listed
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 repository15 other files it gives its agents.
- research_agentAGENTS.md
- ai-checklistSkill
- anonymizationSkill
- code-reviewSkill
- competitor-analysisSkill
- conventional-commitSkill
- edaSkill
- github-pagesSkill
- huggingface-spaceSkill
- idea-roastSkill
- ml-experiment-launchSkill
- paper-draftingSkill
- refactorSkill
- research-notesSkill
- security-and-hardeningSkill
The file
We split this skill into the rules it gives an agent
6 rules. 1 is common, 4 are distinctive, and 1 is very specific to this project.
1
Common
Most of the 83 edited versions we read keep these.
4
Distinctive
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
- Distinctive: line 19
When you find yourself explaining the same training gotcha or preprocessing constraint repeatedly
- Common: line 21
When NOT to use: Don't document obvious code.
- Very specific: line 39
Before creating an ADR, inspect the repository for established conventions (existing ADRs in docs/adrs/ or docs/decisions/, project …
- Distinctive: line 87
Don't delete old ADRs. They capture historical research lineage.
- Distinctive: line 176
Every repository root should have a clear README:
- Distinctive: line 216
No ADRs in a repository with complex custom architectures
“Common” is measured: kept by at least 6 in 10 of the 83 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
Documentation and ADRs (ML Research & Python Edition)
Overview
Document decisions, not just code. The most valuable documentation in ML research captures the why — the architectural constraints, hardware limits, trade-offs, and experimental rationale that led to a specific model design or training pipeline. Code shows what was built; documentation explains why it was structured this way and what alternative approaches were rejected. This context is essential for future researchers, engineers, and AI agents.
When to Use
- Making a significant architectural decision (e.g., switching from RNN to Transformer, adopting PyTorch Lightning or Hydra)
- Choosing between competing approaches (e.g., loss functions, tokenization strategies, audio feature extraction parameters)
- Adding or changing a shared API (
src/models/,src/data/) - Shipping a new model variant or dataset processing pipeline
- Onboarding new collaborators or AI agents to the project
- When you find yourself explaining the same training gotcha or preprocessing constraint repeatedly
When NOT to use: Don't document obvious code. Don't add comments that restate what the code already says. Don't write ADRs for throwaway experimental prototypes.
Architecture Decision Records (ADRs)
ADRs capture the reasoning behind significant technical and modeling decisions. They are the highest-value documentation you can write in research.
When to Write an ADR
- Choosing a foundational model architecture or pretrained checkpoint backbone
- Selecting loss functions, regularization techniques, or optimization algorithms
- Designing experiment configuration hierarchies (e.g., Hydra schema design)
- Choosing between data frameworks or audio/vision processing libraries (
librosavstorchaudio) - Any architectural choice that would be expensive or time-consuming to reverse after a multi-day training run
Match the existing convention first
Before creating an ADR, inspect the repository for established conventions (existing ADRs in docs/adrs/ or docs/decisions/, project instructions, etc.). Match:
- Location and format — e.g.,
docs/adrs/ordocs/decisions/. - Numbering and naming — continue the existing sequence (
0001-use-hydra-config.md, etc.).
ADR Template
Store ADRs in docs/adrs/ with sequential numbering:
# ADR-001: Use Hydra for ML Experiment Configuration
## Status
Accepted
## Date
2026-10-24
## Context
We need a robust configuration management system for training machine learning models across multiple hardware environments. Key requirements:
- Hierarchical configuration composition (combining model, dataset, and optimizer configs)
- Command-line overrides for hyperparameter sweeps
- Reproducibility and easy logging of active configurations
## Decision
Use `hydra-core` for recursive YAML-based configuration management under `configs/`.
## Alternatives Considered
### Plain Python Dataclasses / Argparse
- Pros: No extra dependencies, full Python control
- Cons: Cumbersome command-line overrides for complex nested parameters, no built-in multi-run composition
- Rejected: Does not scale well as model complexity grows
### JSON / YAML configuration files loaded manually
- Pros: Simple parsing
- Cons: Lacks modular composition and dynamic overrides
- Rejected: Leads to code duplication across training scripts
## Consequences
- All training runs must define their entry point inside `configs/main.yaml`
- Parameters must be passed through configs rather than hardcoded in `src/`
- Team needs familiarity with Hydra composition syntaxADR Lifecycle
PROPOSED → ACCEPTED → (SUPERSEDED or DEPRECATED)Don't delete old ADRs. They capture historical research lineage.
Inline Documentation
When to Comment
- Comment the why, not the what:
# BAD: Restates the code
# Multiply tensor by scaling factor
x = x * 0.5
# GOOD: Explains non-obvious intent or tensor shape invariant
# Apply temperature scaling to logits before softmax to prevent overconfidence
# during early training epochs (see ADR-002 for temperature schedule rationale)
scaled_logits = logits / temperatureWhen NOT to Comment
# Don't comment self-explanatory code
def compute_accuracy(preds: Tensor, targets: Tensor) -> float:
return (preds == targets).float().mean().item()
# Don't leave TODO comments for things you should just do now
# TODO: fix tensor shape bug ← Just fix it
# Don't leave commented-out code
# old_model = CustomRNN() ← Delete it, git history preserves itDocument Known Gotchas in ML Pipelines
"""IMPORTANT: Audio waveforms must be normalized to [-1.0, 1.0] before
passing into the MelSpectrogram transform, otherwise librosa feature extraction
will produce scaled outputs that trigger NaN losses in FP16 training.
See ADR-004 for audio pipeline specifications.
"""
def extract_features(waveform: np.ndarray) -> np.ndarray:
...Model & API Documentation (Python / PyTorch)
For model architectures, datasets, and public utility APIs in src/:
Google-Style Docstrings (Preferred for Python / PyTorch)
import torch
from torch import Tensor, nn
class AudioClassifier(nn.Module):
"""Audio classification model using convolutional frontends and attention.
Attributes:
config: Model configuration dataclass containing hyperparameters.
"""
def __init__(self, config: ModelConfig) -> None:
"""Initializes the audio classifier.
Args:
config (ModelConfig): Configuration object containing model dimensions and dropout.
Raises:
ValueError: If hidden dimension is not divisible by attention heads.
"""
super().__init__()
self.config = config
def forward(self, audio_inputs: Tensor) -> Tensor:
"""Computes forward pass and returns unnormalized class logits.
Args:
audio_inputs (Tensor): Tensor of shape (batch_size, sequence_length).
Returns:
Logits tensor of shape (batch_size, num_classes).
"""
...README structure
Every repository root should have a clear README:
Project Name
One-paragraph description of the machine learning research repository.
Quick Start
- Clone the repo and install dependencies via Pixi:
pixi installArchitecture
Brief overview of src/ (source code), configs/ (Hydra YAMLs), test/ (pytest), and docs/ (research notes and ADRs)
Documentation for Agents
Special consideration for AI agent context:
- AGENTS.md — Global rules, tech stack (Python 3.12, torch==2.7.1, transformers==5.16.0, Hydra, Pixi), and file structure.
- Skills (
.agents/skills/) — Modular operational playbooks loaded on demand. - ADRs — Prevent agents from re-litigating past architectural or modeling decisions.
- Inline gotchas — Prevent agents from introducing tensor dimension mismatches or numerical instability.
Common Rationalizations
| Rationalization | Reality |
| "The code is self-documenting" | Code shows tensor shapes and math, but not why a specific architecture or loss function was chosen over alternatives. |
| "We'll write docs when the model architecture stabilizes" | Architectures stabilize faster when documented. Writing the doc is the first test of the design. |
| "Nobody reads docs" | Architectures stabilize faster when documented. Writing the doc is the first test of the design. |
| "ADRs are overhead" | A 10-minute ADR prevents wasting GPU compute on hypotheses that were already rejected for architectural reasons. |
Red Flags
- Significant architectural decisions or loss function choices with no written rationale
- Model modules and training functions with no type annotations or docstrings
- README that doesn't explain how to launch training or tests
- Commented-out model architectures instead of deletion
- No ADRs in a repository with complex custom architectures
- Documentation that restates code instead of explaining research intent
Verification
After documenting:
[ ] ADRs exist in docs/adrs/ for major architectural and modeling decisions
[ ] README covers quick start commands via Pixi and repository structure
[ ] Model and dataset functions in src/ have Google-style docstrings and type hints
[ ] Known gotchas (audio sampling rates, tensor shape invariants) are documented inline
[ ] No commented-out model code remains
[ ] AGENTS.md is current and accurate
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.

