← Back to App

Epok Advisor Docs

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 CategoryExamplesOrganization
Knowledge BaseIndustry themes, data points, reference materialKB folders + tags
Report TemplatesBase format and structure for generated reportsKB folders, tagged "Report Template"
Prompts & InstructionsAI prompts for analysis and report generationKB folders, tagged "Prompt" / "System Instruction"
Engagement DocumentsWorkshop notes, intake notes, report drafts, transcriptsEngagement folders + milestone tags
Analysis OutputsAI-generated analyses from the Analysis tabEngagement-scoped, tagged "Analysis Output"
QuestionnairesStructured 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

  1. Create — New document (manual, ingested, or AI-generated) starts as draft
  2. Edit — Each save creates a new version; previous versions are preserved
  3. Publish — Marks version as published; triggers embedding for AI search
  4. Classify — Assign to folder, add tags, optionally link to engagement
  5. Consume — Read in UI, feed to AI chat/analysis, export externally
  6. Archive — Old versions automatically archived when new version is published