Back to list
petbrains

self-commenting

by petbrains

Document-Driven Development framework for Claude Code — structured specs, TDD cycles, feedback loops, and skills system

6🍴 1📅 Jan 24, 2026

SKILL.md


name: self-commenting description: AI-native code commenting system with grep-searchable AICODE-* markers for cross-session memory. Use when: working with code files, leaving notes for future sessions, breaking down complex tasks, documenting non-obvious logic, recording bug fixes. Triggers: start coding session, edit code, complex logic, leave note, todo for later, debug session, bug fix, AICODE markers, self-commenting. allowed-tools: Read, Write, Bash(grep:*)

Self-Commenting

Long-term memory layer in code using grep-searchable AICODE-* markers.

Process

SCAN → WORK → ANNOTATE

Step 1: Scan

Before modifying any file, find existing markers:

grep -rn "AICODE-" <file-or-directory>

Read markers to understand previous context and pending tasks.

Step 2: Work

Edit code normally.

Step 3: Annotate

Add markers for cross-session memory:

  • AICODE-NOTE — critical implementation details
  • AICODE-TODO — pending tasks to complete
  • AICODE-FIX — non-trivial bug solutions (problem → cause → fix)

See references/conventions.md for format, language syntax, and examples.

Decision Rules

Add AICODE-NOTE when:

  • Non-obvious algorithm or approach
  • External API constraints
  • Complex state management
  • Integration quirks

Add AICODE-TODO when:

  • Task out of current scope
  • Needs more information
  • Depends on other work

Add AICODE-FIX when:

  • Bug solution was non-trivial
  • Root cause wasn't obvious
  • Similar bugs might occur elsewhere

Skip markers when:

  • Code is self-explanatory
  • Standard pattern usage
  • Trivial one-line fix

Session Workflow

Start: grep -rn "AICODE-" src/

Before debugging: Check for similar AICODE-FIX in codebase

End: Add TODO for incomplete work, NOTE for key decisions, FIX for solved bugs

Score

Total Score

75/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon