Thought a little bit today about automated documentation for vibe-coded things.
okay please help me with creating an automated documetaiton system for my Obsidian -> Next.JS front-end.
In general, the software I write using Cursor is excellent and suits my personal workflow well, but I am having a hard time keeping track of the changes (especially because the mechanics of this software project are not entirely understood by me since they were written by an llm).
So let's work through a strategy and some approaches to best documenting all of this in the background while I work (eventually this will inform a system prompt for cursor, but we'll get there later)
Hmmm, actually let's keep it simple:
i kind of just want a change log that is continually added to and also edited for continuity. simple date followed by bullet points of changes in plain english. not overly brief, but not too chatty. and i want this in the form of a system prompt that reminds cursor to, after each prompt, document appropriately based on the requests during the session.
The resulting system prompt:
## AUTOMATED CHANGELOG MAINTENANCE
After completing each user request, you MUST update the project changelog located at `CHANGELOG.md` in the project root. Follow this exact format:
### Format Guidelines:
- **Date:** Use YYYY-MM-DD format
- **Bullet Points:** Start each change with a dash (-)
- **Plain English:** Explain what changed and why, as if telling a colleague
- **Detail Level:** Include enough context to understand the change later, but keep it concise
- **Continuity:** Read previous entries to maintain consistent tone and avoid repetition
### Entry Structure:
YYYY-MM-DD
Brief description of what was changed and the reasoning behind it
Include file names when relevant, but focus on the functional impact
Mention any new features, bug fixes, or architectural changes
Note any dependencies added, removed, or updated
Flag breaking changes or significant refactors
### Examples of Good Entries:
2024-12-20
Updated Tags component to improve hover states and accessibility - added better contrast ratios and keyboard navigation support in Tags.tsx
Fixed markdown rendering issue where code blocks weren't displaying properly - modified MarkdownRenderer.tsx to handle edge cases with nested formatting
Refactored asset upload pipeline to handle video compression more efficiently - streamlined blob_parser_with_compression.py to reduce processing time by ~40%
Added error handling to post parsing when dates are malformed - parser.py now gracefully handles edge cases and logs warnings instead of crashing
2024-12-19
Implemented responsive design improvements for mobile viewing - updated layout.tsx and globals.css to better handle smaller screens
Added support for new markdown frontmatter fields including tags and categories - modified posts.ts to parse additional metadata
Fixed deployment script issue where asset compression was running twice - updated package.json build process to eliminate redundant compression step
### What NOT to Document:
- Routine maintenance tasks (updating dependencies without functional changes)
- Minor formatting/whitespace changes
- Debugging steps that didn't result in code changes
- Reverted changes that had no net effect
### Integration Instructions:
1. Create/update CHANGELOG.md after each coding session
2. Add new entries at the TOP of the file (most recent first)
3. If multiple changes happen in one day, group them under the same date
4. Read the last few entries before adding new ones to maintain consistency
5. If a change relates to a previous entry, reference it for context
### Reminder Trigger:
At the end of each response where code was modified, added, or architectural decisions were made, conclude with:
"📝 **Changelog updated** - Added entry for [brief description of main change]"
This ensures the changelog stays current and captures the evolution of the codebase in understandable terms.