
annotations
by riemac
储存项目技能的仓库
SKILL.md
name: annotations description: Annotation and documentation protocol for rapid-iteration projects (“vibe coding”). Enforces Google Docstring Style plus comment-as-contract: consistency with signatures/types, explicit pre/post-conditions, units/frames/conventions, and rich implementation comments. Use Notes with ASCII + pseudocode for complex algorithms.
Annotations (Google Docstring + Comment-as-Contract)
Core Principles
-
Google Docstring Style (primary)
- Use Google-style sections:
Args,Returns,Raises,Attributes,Notes,Examples - Docstrings must describe semantics and contracts, not restate names
- Use Google-style sections:
-
Comment-as-Contract Document anything that can break silently:
- Pre/post-conditions: ranges, shapes, dtype/device, required keys, ordering
- Units and conventions: units, angle conventions, coordinate frames, axis order, quaternion convention, normalization
- Determinism & randomness: seeds, sampling behavior, stochastic branches
- Failure modes: when exceptions raised, undefined behavior, NaN/overflow hazards
-
Signature/type info and docs must agree
- Signature + type hints are source of truth
- Docs must not contradict; use prose for constraints types can't express
-
Implementation comments required
- Dense, local explanations near the code they justify
- Optimize for "future you" to modify safely without re-deriving intent
What Must Be Documented
Functions / Methods
- One-line summary (imperative mood)
Argsfor every parameter (meaning + constraints)Returnsfor every return value (meaning + shape/unit/convention)Raisesfor intentional or common failuresNotesif algorithm is non-trivial, involves math/geometry, has subtle invariants, or has performance/stability considerations
Classes / Components
- One-line summary + role in system
Attributesdocumenting state, units/conventions, lifecycle (created/reset/updated)- Public methods with side effects and invariants
Config / Schema / CLI
- Each field/flag meaning, default rationale (if non-obvious), units, valid range
- Cross-field constraints (e.g.,
min <= max, mutually exclusive flags)
Implementation Comments (inside code)
Required when code contains:
- non-obvious transforms or conventions
- branching logic encoding a design choice
- "magic numbers" (thresholds, scalings, epsilons)
- performance hacks (vectorization, caching, preallocation)
- "temporary" logic you might forget to remove
Guidelines: Comments answer why + what invariant (not narrating obvious operations)
Templates and Examples
See resource files for detailed templates and Python/IsaacLab examples:
Review Checklist
- Docstrings/comments match signature + type hints
- Constraints documented for non-obvious inputs (range/shape/unit/frame/convention)
- Frames/units/conventions stated wherever transforms occur
- Magic constants justified or replaced by named constants with rationale
- Notes exists for complex algorithms and includes pseudocode
- Implementation comments explain why and invariants, not trivial steps
- Documentation updated after refactors (no drift)
Anti-Patterns
❌ Docstrings only restate names without semantics
❌ Missing units/frames/conventions where misinterpretation is likely
❌ Comments narrating obvious operations rather than intent
❌ Silent assumptions (deg vs rad, axis order, quaternion convention) left undocumented
❌ Docstrings drifting after signature changes
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です