| name | notetaker-fundamentals |
| description | Use when leaving structured notes, comments, and annotations in code. Covers AI note-taking patterns, TODO formats, context preservation, and development breadcrumbs for future AI assistants and human developers. |
| allowed-tools | ["Read","Write","Edit","Bash","Grep","Glob"] |
Note-Taking Fundamentals for AI-Assisted Development
Effective note-taking patterns for AI assistants to leave meaningful context in codebases.
Philosophy
When AI assistants make changes to code, they should leave breadcrumbs for future AI assistants and human developers. Notes should:
- Preserve context about why decisions were made
- Signal uncertainty where alternative approaches exist
- Mark incomplete work that needs follow-up
- Link to relevant context (issues, PRs, documentation)
- Explain non-obvious patterns that might confuse readers
Note Formats
AI Development Notes
Special comment format for AI-to-AI communication:
When to use:
- Explaining non-obvious implementation decisions
- Documenting alternative approaches that were considered
- Linking to related context (PRs, issues, discussions)
- Warning about subtle bugs or edge cases
- Preserving rationale for future refactoring decisions
Structured TODO Comments
Enhanced TODO format with context:
TODO Format Structure:
// TODO(ai/<category>): <Brief description>
// <Additional context>
// <Alternative approaches>
// <Blockers/Dependencies>
// <Impact/Priority>
Common categories:
ai/refactor - Code structure improvements
ai/performance - Optimization opportunities
ai/security - Security considerations
ai/accessibility - A11y improvements
ai/testing - Test coverage gaps
ai/docs - Documentation needs
ai/context - Context preservation
ai/edge-case - Unhandled edge cases
Decision Records
Inline decision records for significant choices:
When to use decision records:
- Choosing between competing patterns/libraries
- Performance trade-offs (memory vs speed, etc.)
- Architecture decisions affecting multiple files
- Security-sensitive choices
- Decisions that will be questioned later
Context Preservation
Leaving breadcrumbs for future understanding:
if (isSafari) {
}
Uncertainty Markers
Signaling areas where AI is uncertain:
Note Placement Guidelines
Where to Place Notes
Good placements:
function processApproval(request: ApprovalRequest) {
}
Bad placements:
function processApproval(request: ApprovalRequest) {
const step1 = validate(request);
const step2 = process(step1);
}
Proximity Rules
- Place notes immediately before the code they describe
- For file-level notes, place at the top after imports
- For function-level notes, place immediately before the function
- For inline notes, place on the line above the relevant code
Note Density
Avoid over-annotation:
const input = parseInput(raw);
const valid = validate(input);
const result = process(valid);
const input = parseInput(raw);
const valid = validate(input);
const result = process(valid);
Cross-Referencing
Linking to Issues/PRs
Linking to Documentation
Linking to Other Code
Note Maintenance
Expiration Dates
For temporary notes or workarounds:
Note Updates
When modifying code with existing notes:
Anti-Patterns
Don't
❌ Leave vague notes
❌ Over-explain obvious code
count += 1
❌ Leave notes without actionable information
❌ Duplicate information already in commit messages
Do
✅ Provide specific, actionable context
✅ Explain the "why" not the "what"
✅ Include concrete next steps
✅ Link to external context
Examples by Language
TypeScript/JavaScript
export function searchUsers(query: string): Promise<User[]> {
}
Python
class UserRepository:
def __init__(self, db: AsyncSession):
self.db = db
async def get_by_id(self, user_id: int) -> Optional[User]:
pass
Go
func TracingMiddleware() gin.HandlerFunc {
return func(c *gin.Context) {
}
}
Rust
unsafe fn parse_str<'a>(buf: &'a [u8]) -> Result<&'a str, ParseError> {
}
Integration with Development Workflow
Pre-Commit Review
Before committing, AI should review notes:
- Ensure all
AI-UNCERTAIN notes have corresponding test coverage
- Check that
TODO(ai/*) notes have enough context for follow-up
- Verify links to issues/PRs are valid
- Remove or update outdated notes
Note Extraction
Teams can extract AI notes for review:
grep -r "AI-DEV-NOTE" src/
grep -r "TODO(ai/" src/
grep -r "AI-UNCERTAIN" src/
Note Analytics
Track note patterns to improve AI assistance:
- Density of
AI-UNCERTAIN notes (indicates confidence)
- Categories of
TODO(ai/*) notes (indicates common issues)
- Age of notes (indicates maintenance burden)
Related Skills
- code-annotation-patterns
- documentation-linking
Resources