document-versioning-standard.mdā¢3.59 kB
---
document: Document Versioning Standard
version: 1.0.0
status: active
author: Claude
created: 2024-06-01
last_updated: 2024-06-01
---
# Document Versioning Standard
## šÆ Overview
All project documents must include a versioning header to track document lifecycle and maintain clear version history.
## š Required Header Format
### For Markdown Files (.md)
```markdown
---
document: [Document Name]
version: [X.Y.Z]
status: active | superseded | deprecated
superseded_by: [path/to/new/document] (if applicable)
author: [Author Name]
created: YYYY-MM-DD
last_updated: YYYY-MM-DD
---
# Document Title
```
### For Code Files (.js, .ts, .json)
```javascript
/**
* @document [Document Name]
* @version [X.Y.Z]
* @status active | superseded | deprecated
* @superseded_by [path/to/new/file] (if applicable)
* @author [Author Name]
* @created YYYY-MM-DD
* @last_updated YYYY-MM-DD
*/
```
### For Configuration Files (.yml, .yaml)
```yaml
# ---
# document: [Document Name]
# version: [X.Y.Z]
# status: active | superseded | deprecated
# superseded_by: [path/to/new/file] (if applicable)
# author: [Author Name]
# created: YYYY-MM-DD
# last_updated: YYYY-MM-DD
# ---
```
### For SQL Files
```sql
-- ---
-- document: [Document Name]
-- version: [X.Y.Z]
-- status: active | superseded | deprecated
-- superseded_by: [path/to/new/file] (if applicable)
-- author: [Author Name]
-- created: YYYY-MM-DD
-- last_updated: YYYY-MM-DD
-- ---
```
## š Versioning Lifecycle
### 1. Active Status
```markdown
---
document: API Specification
version: 1.0.0
status: active
author: Claude
created: 2024-06-01
last_updated: 2024-06-01
---
```
### 2. Superseded Status
```markdown
---
document: API Specification
version: 1.0.0
status: superseded
superseded_by: docs/api/api-spec-v2.0.0.md
author: Claude
created: 2024-06-01
last_updated: 2024-06-15
---
> ā ļø **DEPRECATED**: This document was superseded by version 2.0.0 on 2024-06-15
> See: [api-spec-v2.0.0.md](./api-spec-v2.0.0.md)
```
### 3. Deprecated Status
```markdown
---
document: Legacy Configuration
version: 0.9.0
status: deprecated
author: Claude
created: 2024-05-01
last_updated: 2024-05-31
---
> ā **DEPRECATED**: This document is no longer maintained as of 2024-05-31
```
## š Version Update Process
When creating a new version:
1. **Update the old document**:
- Change status to `superseded`
- Add `superseded_by` path
- Add deprecation notice at top
2. **Create the new document**:
- Include fresh header
- Reference the previous version
- Document what changed
## šØ Enforcement
- All new documents MUST include version header
- Updates MUST increment version number
- Superseded documents MUST be marked
- CI/CD can check for missing headers
## š Examples
### Document Supersession
```markdown
# Old Document (workflow-v1.0.0.md)
---
document: Workflow Documentation
version: 1.0.0
status: superseded
superseded_by: docs/workflows/workflow-v2.0.0.md
author: Claude
created: 2024-06-01
last_updated: 2024-06-10
---
> ā ļø **DEPRECATED**: This document was superseded by version 2.0.0 on 2024-06-10
> See: [workflow-v2.0.0.md](./workflow-v2.0.0.md)
[Original content...]
# New Document (workflow-v2.0.0.md)
---
document: Workflow Documentation
version: 2.0.0
status: active
author: Claude
created: 2024-06-10
last_updated: 2024-06-10
---
> š **Note**: This document supersedes version 1.0.0
> Previous version: [workflow-v1.0.0.md](./workflow-v1.0.0.md)
[New content...]
```
---
*This standard ensures complete document traceability throughout the project lifecycle.*