Record AI development context in /__prompts/ directory.
- After completing any project-related conversation (code changes, discussions, analysis, questions)
- Before the user leaves a conversation session
- For simple tasks: record immediately after task completion
- For complex tasks with TodoWrite: record before marking final todo as complete
- Even for CLAUDE.md modifications or meta-discussions about the project/rules
CRITICAL PATH STRUCTURE: __prompts/YYMMDD/NNNN-{feature-slug}-{type}.md
- Root Location:
__prompts/directory is ALWAYS at monorepo root (same level as CLAUDE.md) - Date Subdirectories: Files MUST be placed in date-based subdirectories (e.g.,
__prompts/250818/,__prompts/250819/) - NO files directly in
__prompts/: All files must be inside date subdirectories
- Full Path Example:
__prompts/250819/0004-i18n-improvement-chat.md - YYMMDD: Date directory from
<env>tag'sToday's datefield, formatted as YYMMDD- Example: 2025-08-19 → 250819
- Create directory if it doesn't exist
- NNNN: Sequential number for the day (0001, 0002, etc.)
- MUST check existing files in the date subdirectory first
- Use
ls __prompts/YYMMDD/ | sortto find highest number - Use the next sequential number after the highest existing number
- Example: If
0003-*exists, next should be0004-*
- feature-slug: Descriptive feature identifier (kebab-case)
- type: One of: chat, plan, or test
- ❌ WRONG:
__prompts/250819-0001-feature-chat.md(file directly in __prompts) - ✅ CORRECT:
__prompts/250819/0001-feature-chat.md(file in date subdirectory) - ❌ WRONG:
__prompts/250819/250819-0001-feature-chat.md(date prefix duplicated) - ✅ CORRECT:
__prompts/250819/0001-feature-chat.md(no date prefix in filename)
-chat.md: Full conversation verbatim - preserve exact user prompts and AI responses to maintain brain snapshot (tool calls excluded, but include code snippets and full responses)-plan.md: Implementation strategy (in English)-test.md: Non-technical verification steps (Korean)
Replace sensitive information with ****:
- API keys, tokens, passwords
- Database URLs, connection strings
- Personal information (emails, names, addresses)
- Example:
NEXT_PUBLIC_SUPABASE_URL=https://xyz.supabase.co→NEXT_PUBLIC_SUPABASE_URL=****
Create a git commit when all todos are marked complete (if using TodoWrite)
- Include all prompts, even experimental ones (brain snapshots matter)
- Preserve the exact conversation flow for future reference
- Keep the implementation plan clear and actionable
- Make test steps easy to follow for non-technical users
Refer to https://www.stdy.blog/coding-agent-rule-for-easier-monitoring/ for more detail (why I'm doing this)