Content Strategy
Markdown as the Content Layer
All business content in Epok Advisor is stored as versioned markdown in the database. Markdown is the universal format for anything that isn't transactional data — themes, notes, reports, prompts, analysis outputs, and more.
What Lives as Content
| Content Category | Examples | Organization |
|---|---|---|
| Knowledge Base | Industry themes, data points, reference material | KB folders + tags |
| Report Templates | Base format and structure for generated reports | KB folders, tagged "Report Template" |
| Prompts & Instructions | AI prompts for analysis and report generation | KB folders, tagged "Prompt" / "System Instruction" |
| Engagement Documents | Workshop notes, intake notes, report drafts, transcripts | Engagement folders + milestone tags |
| Analysis Outputs | AI-generated analyses from the Analysis tab | Engagement-scoped, tagged "Analysis Output" |
| Questionnaires | Structured question sets (stored as JSON, not markdown) | Separate questionnaire_templates table |
Why Markdown?
- Human-readable — Anyone can read and edit content in the TipTap editor or raw markdown view
- AI-friendly — LLMs parse markdown natively; no extraction or conversion needed for chat, analysis, or RAG
- Versionable — Every edit creates a new version; full history is preserved
- Embeddable — Published content is automatically chunked and embedded for AI semantic search
- Exportable — Markdown converts cleanly to Google Docs, Gamma presentations, rich text clipboard, and plain text
How Content Is Organized
Content uses two complementary systems:
- Folders — Hierarchical structure (nested folders with parent/child relationships). Provides organizational location.
- Tags — Flat classification labels (multi-select). Provides semantic meaning and cross-cutting filters.
A document lives in exactly one folder (or is unfiled) but can have any number of tags. Tags include both content-type labels (Theme, Transcript, Report Draft) and milestone markers (MS: Intake, MS: Workshop 1, etc.).
How Content Flows
Content Creation
├── Manual: TipTap editor (rich or raw markdown)
├── Auto-ingest: Otter.ai → Zapier → /api/v1/ingest → KB Inbox
├── AI Analysis: Prompt + @docs → streaming LLM → saved as document
└── Agent tools: ChatGPT/Claude → /api/v1/tools → create_document
↓
Database (content_documents + content_versions)
├── Draft → review → Publish
└── Publish triggers auto-embedding (pgvector)
↓
Consumption
├── Web UI: TipTap rendered view, version history
├── AI Chat: RAG retrieval → context for Claude/GPT responses
├── AI Analysis: @-mention documents as inputs to analysis prompts
├── Agent Tools: read_document, search_kb, list_documents
└── Export: Google Docs, Gamma, clipboard (markdown/plain/rich)
Content Lifecycle
- Create — New document (manual, ingested, or AI-generated) starts as draft
- Edit — Each save creates a new version; previous versions are preserved
- Publish — Marks version as published; triggers embedding for AI search
- Classify — Assign to folder, add tags, optionally link to engagement
- Consume — Read in UI, feed to AI chat/analysis, export externally
- Archive — Old versions automatically archived when new version is published