name: file-maintenance
description: Use for continuous maintenance of repository files with emphasis on correctness, factual accuracy, freshness, consistency, and duplicate/stale file prevention.
File Maintenance
Quick Index (Action-Routed)
Read First (All Actions)
MissionUse This Skill WhenScope BoundaryCore Principles
Action Modules (Read As Needed)
- Accuracy maintenance:
File Integrity AuditFactuality and Freshness Checks
- Consistency maintenance:
Cross-File Consistency RulesDuplicate and Staleness Control
- Documentation maintenance depth:
Doc Accuracy StandardOperational Validation
Output
Deliverable FormatAnti-Patterns
Mission
Maintain repository files so they remain accurate, current, internally consistent, and actionable for developers and operators.
Use This Skill When
- documentation or policy files may be stale after changes
- duplicate files or conflicting variants appear
- commands/examples in docs might no longer match implementation
- periodic file hygiene reviews are requested
- quality audits require factuality and consistency checks
Scope Boundary
This skill governs ongoing file lifecycle quality across docs and support artifacts.
Use Doc Maintenance for:
- change-driven documentation updates during active implementation
Use File Structure Optimization for:
- repo layout and directory architecture optimization
Core Principles
- every maintained file must have a clear purpose and current owner context
- prefer one canonical source per fact
- stale or conflicting files must be corrected, consolidated, or removed
- documentation claims require validation evidence
- maintenance outputs must be auditable
Anti-Overuse Rules
Use when:
- the task is a file hygiene, factuality, freshness, or consistency audit
- duplicate or stale documents may conflict
- public docs or policy files need cross-file validation
Do not use when:
- a single canonical doc is being updated as part of implementation
- no repository files are changing
doc-maintenance already covers the necessary change-driven doc update
Stop after:
- stale/conflicting files are corrected or explicitly tracked
- canonical sources are identified
- unresolved findings have owner, severity, and next action
File Integrity Audit
Audit file surfaces for:
- purpose clarity
- last-updated relevance
- duplicate/conflicting variants
- broken references/paths/commands
- ownership ambiguity
Factuality and Freshness Checks
For high-value docs/artifacts:
- verify dates, versions, and commands are still valid
- verify referenced paths/files exist
- verify procedures match current behavior
- verify policy statements match enforced tooling
- mark unresolved uncertainty explicitly
Cross-File Consistency Rules
- same concept should not be described differently across canonical docs
- terminology must be consistent across policy/runbook files
- sample commands must align with current scripts
- linked artifacts must exist and be reachable
- if conflicts exist, designate canonical source and reconcile others
Duplicate and Staleness Control
- detect duplicate files with overlapping scope
- consolidate into canonical file where feasible
- archive/remove obsolete copies with explicit notes when needed
- avoid keeping "backup" duplicates in active source paths
- track unresolved cleanup items with owner and date
Doc Accuracy Standard
For docs in scope, ensure:
- statements are specific and testable
- instructions are executable in current repo context
- references use current filenames and paths
- temporal language is minimized unless date-bound context is required
- update timestamps/status artifacts reflect latest state
Operational Validation
Recommended validation pass:
- targeted command execution or plausibility check
- link/path existence scan
- policy-to-enforcement alignment check
- issue list of remaining uncertain claims
Acceptance Checklist
- no unresolved high-severity factual conflicts
- no broken high-priority file references
- stale duplicates addressed or tracked with explicit remediation
- docs/policies aligned with actual tooling behavior
- maintenance evidence captured
When applying this skill, provide:
- files audited and findings
- corrections/consolidations/removals made
- validation checks run and outcomes
- unresolved items with severity and next action
Source Reference
Primary references:
- Google developer documentation style guidance:
- https://developers.google.com/style/
- https://developers.google.com/style/timeless-documentation
- Apple documentation workflow guidance:
- https://developer.apple.com/documentation/xcode/writing-documentation
- https://developer.apple.com/documentation/xcode/documenting-apps-frameworks-and-packages
- MIT software construction quality principles:
- https://ocw.mit.edu/courses/6-005-software-construction-spring-2016/
Anti-Patterns
- leaving known inaccuracies untracked
- keeping multiple conflicting "source of truth" files
- updating content without validating commands/paths
- burying critical caveats in non-canonical docs
- treating file hygiene as optional after major changes