ODD Document Manager
A command-line tool for managing design documents with YAML frontmatter, git integration, and automatic indexing.
Installation
The binary will be at target/release/odm.
Quick Start
# List all documents
# Create a new document
# Add an existing document
# Transition a document to review
# Validate all documents
# Update the index
Commands
odm list (alias: ls)
List all design documents, optionally filtered by state.
# List all documents
# List only drafts
# Show full details
odm show <number>
Display a specific document by number.
# Show document with full content
# Show only metadata
odm new <title>
Create a new design document from template.
# Create with auto-detected author
# Specify author
odm add <path>
Add a document with full processing (numbering, headers, git staging).
# Add a document
# Preview what would happen
odm add-headers <path> (alias: headers)
Add or update YAML frontmatter headers.
odm transition <path> <state> (alias: mv)
Transition a document to a new state.
Valid states:
- draft
- under-review (or "under review")
- revised
- accepted
- active
- final
- deferred
- rejected
- withdrawn
- superseded
odm sync-location <path> (alias: sync)
Move document to match its YAML state header.
odm validate (alias: check)
Validate all documents for consistency.
# Check for issues
# Auto-fix issues where possible
odm update-index (alias: sync-index)
Synchronize the index with documents on filesystem.
odm index
Generate the index file.
# Generate markdown index
# Generate JSON index
Document States
Documents progress through these states:
- Draft - Initial work in progress
- Under Review - Ready for team review
- Revised - Revisions made after review
- Accepted - Approved by team
- Active - Currently being implemented
- Final - Implementation complete
- Deferred - Postponed for later
- Rejected - Not approved
- Withdrawn - Author withdrew proposal
- Superseded - Replaced by newer document
Document Structure
Each document should have YAML frontmatter:
---
number: 1
title: "Feature Name"
author: Alice Smith
created:
updated:
state: Draft
supersedes: null
superseded-by: null
---
# Feature Name
## Overview
...
Directory Structure
docs/
├── 00-index.md # Auto-generated index
├── 01-draft/ # Draft documents
├── 02-under-review/ # Documents under review
├── 03-revised/ # Revised documents
├── 04-accepted/ # Accepted documents
├── 05-active/ # Active implementation
├── 06-final/ # Final documents
├── 07-deferred/ # Deferred documents
├── 08-rejected/ # Rejected documents
├── 09-withdrawn/ # Withdrawn documents
└── 10-superseded/ # Superseded documents
Workflow Examples
Creating a New Design
# 1. Create from template
# 2. Edit the document
# 3. When ready for review
# 4. Update index
Adding an Existing Document
# Add document with full processing
# The tool will:
# - Assign number (e.g., 0042)
# - Move to project
# - Place in draft directory
# - Add YAML headers
# - Stage with git
# - Update index
Bulk Operations
# After manually moving files
# Fix YAML states to match new location
for; do
done
# Update index
Troubleshooting
"Failed to load document index"
Make sure you're in a directory with design docs or specify the docs directory:
State/Directory Mismatch
Run odm validate --fix to automatically correct mismatches.
Document Not in Index
Run odm update-index to sync the index.
Git Errors
Ensure you're in a git repository and have committed the docs directory.
Tips
- Use tab completion for file paths
- Run
odm validatebefore committing - Use
--dry-runwithaddto preview changes - Aliases make common commands faster (
ls,mv,sync)