Documentation
Code Comments
Inline comments — explain WHY, not WHAT:
# GOOD — explains why
# LXD operations are blocking; must use to_thread to avoid blocking the event loop
container = await asyncio.to_thread(lxc_manager.create_container, name, image)
# BAD — states the obvious
# Create the container
container = await asyncio.to_thread(lxc_manager.create_container, name, image)
// GOOD — explains why
// Re-fetch on every mount because there's no global state cache
onMounted(() => fetchExamData())
// BAD — obvious
// Fetch data when component mounts
onMounted(() => fetchExamData())
Don't add comments to self-evident code. If the code is unclear, refactor it first.
CHANGELOG.md
Updated with every feature, fix, or breaking change. Format:
## [Unreleased]
### Added
- Exam results page with per-task breakdown and score chart
### Fixed
- Container cleanup task now handles already-deleted containers gracefully
### Changed
- Admin user table now shows last login time
Sections: Added, Fixed, Changed, Removed, Security.
Project Docs (docs/)
| File | When to update |
|---|---|
SPEC.md | New feature planned or architecture decision changed |
docs/BACKEND.md | New API endpoint, service, or pattern added |
docs/FRONTEND.md | New view, component, or API service method added |
docs/LXD.md | LXD configuration or container image changes |
docs/auth-design.md | Authentication flow changes |
docs/standards/*.md | Convention or standard established or changed |
README / Access
README.md— project overview, how to run locallyaccess.md— server credentials and SSH access (gitignored)DEPLOYMENT.md— production deploy steps
Claude Memory
Update when:
- Significant bug investigated and fixed (root cause + fix)
- Architecture decision made or changed
- New convention or standard established
- Infrastructure or deployment config changes
Memory files are in /Users/zafarsaidov/.claude/projects/.../memory/.