Getting Started with MOTH
Step 1: Learn the Syntax
Start with the Quick Reference to learn the basic syntax in 5 minutes.
[SECTION_NAME]
key:value
key:item1;item2;item3
key:{k=v;k2=v2}
Step 2: Choose Your Use Case
📋 PRD
Writing a product specification? MOTH helps structure your requirements clearly.
⚙️ Coding Rules
Creating .cursorrules? MOTH provides a clean format for AI instructions.
🏗️ Architecture
Documenting your system? MOTH makes architecture docs scannable and clear.
Step 3: Write Your Content
Start with a simple structure and build from there. Remember: MOTH is a blueprint, not a spec. Add detail only where needed. Check out the Examples page to see the full MediaHub DAM example with expanded PRD.
#MOTH:repo
meta:{project:MediaHub-DAM;version:1.0}
[GOAL]
Build a multi-tenant Digital Asset Management backend
with vector search, rights, and automation.
[FEATURES]
TenantAuth:P0; RBAC:P0; Assets:P0; Search:P0
Rights:P0; Reviews:P0; Jobs:P0; Audit:P0
[SCHEMAS]
tenants:{*id=uuid;*name=string;*domain=hostname}
users:{*id=uuid;*email=email;(name)=string}
assets:{
*id=uuid;
*tenant_id=uuid;
*kind=enum[image,video,doc];
*uri=url;
*bytes=int;
status=enum[active,deleted]
}
[WORKFLOWS]
ingest:{received→scanned→registered→ready}
review:{open→approved|changes→closed}
[API]
POST:/v1/assets{project_id,kind}→{asset_id,upload_url}
GET:/v1/assets/{id}→{asset,versions,renditions}
POST:/v1/search/text{q,limit}→{asset_ids}Step 4: Use in Your Project
Add your MOTH file to your project and load it in your favorite tool:
Cursor
Add to .cursorrules or load as context
Cline
Add to project context in settings
ChatGPT / Claude
Paste into your chat or upload as file
Step 6: Learn from Examples
Check out real-world examples to see how MOTH is used in practice.
View Examples →Pro Tips
- ✓ Keep MOTH files in your project repo (e.g., /rules/prd.moth)
- ✓ Update MOTH files as your project evolves
- ✓ Use MOTH for all technical documentation
- ✓ Combine with kablUI for complete app specs
- ✓ Share MOTH files with your team and AI agents