# Petbrains Mvp Builder Self Commenting

> Self-Commenting

- Skill: `tomevault-io/petbrains-mvp-builder-self-commenting` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/petbrains-mvp-builder-self-commenting`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/petbrains-mvp-builder-self-commenting/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/petbrains-mvp-builder-self-commenting

---


# 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:

```bash
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

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/petbrains) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

