# Documentation Maintenance Process

**Last Updated:** 2026-01-07

Comprehensive guide for maintaining and updating tool documentation to ensure accuracy, completeness, and AI-agent efficiency.

## When to Update Documentation

### Code Changes

**Update Required When:**

- Constants change (legal values, rates, thresholds)
- Formulas change (calculation logic)
- Functions change (new features, bug fixes)
- Default values change
- Validation rules change

**Files to Update:**

- Tool-specific documentation (`*-documentation.md`)
- Constants section
- Calculation examples
- Function documentation
- Change log

### Annual Updates

**Update Required:**

- January 1 (or when new year values announced)
- All year references (2025 → 2026, etc.)
- All legal values (rates, thresholds, limits)
- All example calculations
- All content sections (H1, descriptions, FAQs)

**Files to Update:**

- All 17 tool documentation files
- README.md (if structure changes)
- Consolidated status files
- Change log in each tool doc

### Law Changes

**Update Required When:**

- New laws announced
- Legal values change mid-year
- Regulations updated
- Official sources publish updates

**Files to Update:**

- Affected tool documentation files
- Constants section
- Legal basis section
- Content sections
- FAQs (if affected)

## How to Update Documentation

### Step-by-Step Process

1. **Identify What Changed**

   - Read code changes
   - Identify affected values
   - Identify affected sections

2. **Read Tool Documentation**

   - Open tool-specific doc (`*-documentation.md`)
   - Review current state
   - Identify sections to update

3. **Update Relevant Sections**

   - Constants section (if values changed)
   - Calculation examples (if formulas changed)
   - Content sections (if text changed)
   - 2026 Update Requirements (mark complete)
   - Change log (add entry)

4. **Update Metadata**

   - Update "Last Updated" date
   - Update version history if major change

5. **Update Consolidated Files**

   - Update `FINAL_STATUS_2026.md` if status changes
   - Update `VERIFICATION_SUMMARY_2026.md` if values verified
   - Update `TESTING_SUMMARY_2026.md` if testing done

6. **Verify Updates**
   - Check all year references updated
   - Check all value references updated
   - Check no "(pending verification)" notes remain
   - Check change log entry added

### Which Files to Update

**Tool-Specific Changes:**

- Update only the affected tool doc (`*-documentation.md`)

**Multiple Tool Changes:**

- Update all affected tool docs
- Update consolidated status files

**Structural Changes:**

- Update `README.md`
- Update `TOOLS_MAINTENANCE_GUIDE.md`
- Update `TOOL_DOCUMENTATION_TEMPLATE.md`

**Status Changes:**

- Update `FINAL_STATUS_2026.md`
- Update `TESTING_SUMMARY_2026.md`
- Update `VERIFICATION_SUMMARY_2026.md`
- Update `NEXT_STEPS_2026.md`

## Documentation Review Process

### Quarterly Review

**When:** Every 3 months (January, April, July, October)

**Process:**

1. Review official sources for changes
2. Check if any values need updating
3. Update affected tool docs
4. Update consolidated status files

**Focus:**

- Legal value changes
- Mid-year law changes
- Official source updates

### Annual Review

**When:** January (comprehensive update)

**Process:**

1. Research all 2026 values
2. Verify from official sources
3. Update all tool docs
4. Update all year references
5. Update all example calculations
6. Update consolidated status files
7. Review documentation structure

**Focus:**

- All year references
- All legal values
- All example calculations
- Documentation completeness

## File Naming Conventions

### ✅ DO

- Update existing files
- Use consolidated status files (`FINAL_STATUS_2026.md`, etc.)
- Follow naming pattern: `*-documentation.md` for tool docs
- Use descriptive names for reference files

### ❌ DON'T

- Create new status files (consolidate instead)
- Create duplicate documentation files
- Use generic names like "status.md" or "updates.md"
- Create files with dates in names (use consolidated files)

## Status File Management

### Consolidated Status Files

**Use These Files:**

- `FINAL_STATUS_2026.md` - Overall project status
- `TESTING_SUMMARY_2026.md` - Testing status and plans
- `VERIFICATION_SUMMARY_2026.md` - Verification results
- `NEXT_STEPS_2026.md` - Next steps and action items

**How to Update:**

- Update existing consolidated files
- Add new information to relevant sections
- Remove outdated information
- Keep references to detailed files

### Detailed Reference Files (Keep)

**These Files Provide Detail:**

- `COMPLETE_VERIFICATION_SUMMARY_2026.md` - Detailed verification
- `COMPREHENSIVE_TESTING_SUMMARY_2026.md` - Detailed testing
- `VALUE_VERIFICATION_RESULTS_2026.md` - Detailed verification results
- `CODE_ANALYSIS_RESULTS.md` - Detailed code analysis
- `TOOL_BY_TOOL_ANALYSIS.md` - Detailed tool analysis

**Purpose:**

- Provide detailed information
- Reference from consolidated files
- Keep for historical reference

## Change Log Requirements

### What to Document

**In Tool Documentation:**

- Date of update
- Values changed (old → new)
- Sections updated
- Source of new values

**In Consolidated Status Files:**

- Major status changes
- Phase completions
- Important milestones

### Change Log Format

```markdown
### Update History

**2026-01-07:**

- Updated all 2026 values (constants, examples, content)
- Updated "Last Updated" date
- Removed "(pending verification)" notes
- Updated year references (2025 → 2026)

**Previous Updates:**

- [Date]: [Description of changes]
```

## Best Practices

### For Cursor AI Agents

1. **Always Read First**

   - Read tool documentation before making changes
   - Read consolidated status files for current state
   - Read README.md for structure overview

2. **Update Documentation When Code Changes**

   - Don't skip documentation updates
   - Update "Last Updated" date
   - Add change log entry

3. **Use Consolidated Files**

   - Don't create new status files
   - Update existing consolidated files
   - Reference detailed files when needed

4. **Follow Naming Conventions**

   - Use `*-documentation.md` for tool docs
   - Use consolidated status files for status
   - Use descriptive names for reference files

5. **Verify Before Completing**
   - Check all year references updated
   - Check all value references updated
   - Check no "(pending verification)" notes remain
   - Check change log entry added

### For Human Maintainers

1. **Regular Reviews**

   - Quarterly: Check for law changes
   - Annually: Comprehensive update

2. **Documentation First**

   - Update docs before major changes
   - Keep docs in sync with code

3. **Consolidate, Don't Duplicate**

   - Update existing files
   - Don't create duplicate status files

4. **Track Changes**
   - Use change logs
   - Document sources
   - Update dates

## Common Pitfalls

### ❌ Don't

- Update code without updating docs
- Create new status files instead of updating consolidated files
- Skip "Last Updated" date updates
- Leave "(pending verification)" notes in user-facing content
- Create duplicate documentation files

### ✅ Do

- Update docs when code changes
- Use consolidated status files
- Update "Last Updated" dates
- Remove verification notes from user content
- Update existing files, don't create duplicates

## References

- **Documentation Structure:** `DOCUMENTATION_STRUCTURE.md`
- **Tool Documentation Template:** `TOOL_DOCUMENTATION_TEMPLATE.md`
- **Maintenance Guide:** `TOOLS_MAINTENANCE_GUIDE.md`
- **README:** `README.md`

---

**Note:** This process ensures documentation stays accurate, complete, and efficient for both human maintainers and AI agents.
