// Update and clean up project documentation files (primarily .ai/features/, but also README.md, PROGRESS_TRACKER.md, CLAUDE.md, and other .md files). Use when user requests documentation cleanup, organization, or updates for any feature, module, or project documentation (e.g., 'update photo viewer docs', 'clean up README', 'organize documentation'). Removes code snippets, outdated details, and redundant information while preserving essential architectural decisions and technical context.
| name | doc-update |
| description | Update and clean up project documentation files (primarily .ai/features/, but also README.md, PROGRESS_TRACKER.md, CLAUDE.md, and other .md files). Use when user requests documentation cleanup, organization, or updates for any feature, module, or project documentation (e.g., 'update photo viewer docs', 'clean up README', 'organize documentation'). Removes code snippets, outdated details, and redundant information while preserving essential architectural decisions and technical context. |
This skill provides a systematic workflow for updating and cleaning up project documentation files. While primarily designed for feature documentation in .ai/features/, it works with any markdown documentation in the project including README.md, PROGRESS_TRACKER.md, CLAUDE.md, or documentation within code modules.
The skill removes verbose implementation details, code snippets, outdated information, and redundant content while preserving essential architectural decisions and technical context needed for future development.
It is particularly valuable for maintaining a lean, focused documentation set that provides maximum value without information overload.
Use this skill when the user requests documentation cleanup, updates, or organization for:
.ai/features/ (primary use case)Trigger phrases:
Follow this 7-step workflow when updating feature documentation:
Extract the documentation target from the user's request and locate the corresponding file.
Actions:
.ai/features/feature-*.md (e.g., "photo viewer" → feature-photo-viewer.md)README.md, PROGRESS_TRACKER.md, CLAUDE.md.md file mentioned by userExamples:
User: "Update photo viewer documentation"
→ Target: .ai/features/feature-photo-viewer.md
User: "Clean up README"
→ Target: README.md
User: "Posprzątaj PROGRESS_TRACKER"
→ Target: PROGRESS_TRACKER.md
Before making changes, gather comprehensive context about the feature's current state from multiple sources.
Required Context Sources:
Feature File: Read the target .ai/features/feature-*.md file
PROGRESS_TRACKER.md: Check feature status in project tracker
Git History: Check implementation progress
# Find commits related to this feature
git log --all --oneline --grep="feature-name"
git log --all --oneline --grep="photo-viewer"
# Check if feature branch exists or was merged
git branch -a | grep -i feature-name
Codebase: Systematically search and analyze implementation
CRITICAL: This is NOT optional - you MUST perform thorough code search before updating docs!
a) Search by keywords (use Grep tool with multiple patterns):
# Example for "photo-viewer" feature:
grep -r "photo.?viewer" --ignore-case # Find all variants
grep -r "photoViewer" # camelCase
grep -r "PhotoViewer" # PascalCase
grep -r "photo_viewer" # snake_case
b) Identify key files (use Glob tool to find all related files):
*Controller.java, *Service.java, *Repository.java, *Entity.java, *DTO.java*.component.ts, *.service.ts, *.guard.ts, *.model.ts, *.html*Test.java, *.spec.ts, *.e2e.tsc) Read key files (use Read tool - NOT just "check if exists"):
d) Create component inventory (make a list while reading):
com.photomap.service.PhotoViewerService)src/app/photo-viewer/photo-viewer.component.ts)PhotoViewerDTO, PhotoMetadata)extractExifData(), generateThumbnail())Do not proceed to Step 3 until you have:
CLAUDE.md: Review project conventions
Do not proceed until all context is gathered.
Based on gathered context, classify the feature into one of these statuses:
Decision Matrix:
| Indicator | Status |
|---|---|
| Branch merged + all phases complete + in PROGRESS_TRACKER "Last Completed" | ✅ COMPLETED |
| Branch active + some phases complete + in "Currently Working On" | ⏳ IN-PROGRESS |
| No code + in "Post-MVP" section + only planning details | 🔜 PLANNED |
| Some code + explicit "paused" marker + in waiting state | ⏸️ PAUSED |
| Explicit deprecation notice or code removed | 🗑️ DEPRECATED |
Reference: See references/feature-status-levels.md for detailed status definitions.
Based on status determined in Step 3, apply the corresponding cleanup strategy.
Remove:
Keep:
Target reduction: 60-85% file size reduction
Remove:
Keep:
Target reduction: 40-60% file size reduction
Remove:
Keep:
Target reduction: 30-50% file size reduction
Reference: See references/cleanup-guidelines.md for detailed guidelines.
Ensure the feature file has a clear, prominent status section at the top.
Required Format:
# [Feature Name]
**Status:** [✅/⏳/🔜/⏸️/🗑️] [Description]
**Branch:** [branch-name] ([merged to main] or [active])
**Completed:** [YYYY-MM-DD] (for completed features)
**Last Updated:** [YYYY-MM-DD] (for in-progress features)
## Overview
[Brief 1-2 paragraph summary]
Examples:
**Status:** ✅ Completed (2025-10-25)
**Branch:** `feature/photo-viewer` (merged to master)
**Status:** ⏳ In Progress - Phase 2 of 4
**Branch:** `feature/email-system`
**Last Updated:** 2025-11-03
**Status:** 🔜 Planned (Post-MVP)
**Estimated Effort:** 2-3 weeks
CRITICAL: Every feature documentation MUST include a "Key Components" section with file paths/package references.
This section should be added immediately after the Overview section, containing ONLY references to code (NOT code snippets or implementation details).
Required Format:
## Key Components
### Backend
| Path/Package | Description |
|--------------|-------------|
| `com.photomap.service.PhotoService` | Main service for photo CRUD operations, EXIF extraction |
| `com.photomap.controller.PhotoController` | REST endpoints: POST /api/photos, GET /api/photos/{id} |
| `com.photomap.entity.Photo` | JPA entity with geolocation fields (latitude, longitude) |
| `com.photomap.repository.PhotoRepository` | Spring Data JPA repository for Photo entity |
### Frontend
| Path/Component | Description |
|----------------|-------------|
| `src/app/photo-viewer/photo-viewer.component.ts` | Main component displaying photo with map integration |
| `src/app/services/photo.service.ts` | Manages photo state via BehaviorSubject, handles API calls |
| `src/app/models/photo.model.ts` | TypeScript interface for Photo with metadata |
Rules for "Key Components" section:
Content Rules:
src/app/service/photo.service.ts)com.photomap.service.PhotoService)Source of Information:
Status-Specific Guidelines:
For ✅ COMPLETED features:
For ⏳ IN-PROGRESS features:
(planned) suffixPhotoExportService (planned) - Export photos to ZIPFor 🔜 PLANNED features:
(proposed) suffixcom.photomap.service.NotificationService (proposed) - Email notificationsGrouping:
### Backend section only### Frontend section onlyPurpose of this section:
CRITICAL: Check project's language policy in CLAUDE.md FIRST before deciding on documentation language.
Step-by-step process:
Check CLAUDE.md for language policy:
Apply appropriate rule:
A) If CLAUDE.md specifies documentation language:
Documentation: English (all .md files) → Convert to EnglishDokumentacja: Polski → Convert to PolishB) If NO language policy in CLAUDE.md:
C) If user explicitly requests translation:
Priority order:
Example workflows:
Scenario 1: Project with English policy
- CLAUDE.md says: "Documentation: English (all .md files)"
- Current doc: Polish
- Action: Convert to English
Scenario 2: Project without policy
- CLAUDE.md: No language policy specified
- Current doc: Polish
- Action: Keep in Polish
Scenario 3: User explicit request
- User says: "Update docs and translate to Polish"
- CLAUDE.md says: "Documentation: English"
- Action: Translate to Polish (user request overrides policy)
Scenario 4: No policy, mixed language doc
- CLAUDE.md: No language policy
- Current doc: Mixed Polish/English
- Action: Ask user which language to standardize to
NEVER make documentation changes without user review.
Review Process:
Review Checklist - verify BEFORE showing summary to user:
Before presenting the review summary, verify that all required steps were completed:
✅ Code verification performed (Step 2.4):
✅ Documentation completeness:
✅ Status accuracy:
✅ Cleanup level appropriate:
⚠️ If ANY checklist item is NOT checked - DO NOT proceed to user review. Go back and complete missing steps first.
Example Review Summary:
Zaktualizowałem dokumentację feature-photo-viewer.md:
Zmiany:
- Usunięto szczegółowe checklisty zadań (150 linii)
- Usunięto fragmenty kodu (80 linii)
- Usunięto verbose testing procedures (60 linii)
- Zachowano architekturę i kluczowe decyzje techniczne
- Zachowano Future Considerations
Status: ✅ COMPLETED
Rozmiar: 478 linii → 85 linii (82% redukcja)
Czy zatwierdzić te zmiany w dokumentacji?
This skill includes reference documentation in the references/ directory:
Detailed guidelines for what to keep and remove for each implementation status. Includes specific examples and strategies for condensing different types of content.
Read this when: You need specific guidance on what to remove or keep for a particular status level.
Comprehensive definitions of all implementation statuses (COMPLETED, IN-PROGRESS, PLANNED, etc.) with indicators and classification criteria.
Read this when: You're unsure how to classify a feature's status or need to understand status transitions.
Before/after examples of documentation transformations for different statuses, showing actual file size reductions and specific changes made.
Read this when: You want to see concrete examples of the cleanup process or validate your approach.
| Status | Cleanup Level | Target Reduction | Key Focus |
|---|---|---|---|
| ✅ COMPLETED | Aggressive | 60-85% | Architecture + decisions |
| ⏳ IN-PROGRESS | Moderate | 40-60% | Current work + context |
| 🔜 PLANNED | Light | 30-50% | Requirements + why |
| ⏸️ PAUSED | Moderate | 40-60% | Context for resume |
| 🗑️ DEPRECATED | Minimal | Archive | Historical reference |