DocsAI — Full PRD

team docs-ai v2 ·by andre ·Mar 23, 2026 productoreference

Source of truth: ~/cofoundy/products/cofoundy-platform/docs-ai/PRD.md. This is the team-facing snapshot, last synced 2026-05-03. Do not edit this file directly — edit the root PRD and re-publish.

One-liner

AI-native client deliverable portal for agencies. AI agents publish markdown → clients see branded, access-controlled pages with view tracking.


The Problem

Every company using AI agents (Claude Code, Cursor, Copilot) generates markdown files that sit in git repos, invisible to anyone who doesn’t cat files in a terminal. The output is trapped.

For Cofoundy specifically:

For the market broadly:


The Insight

Documents shouldn’t be edited by humans anymore. They should be authored by AI agents and published automatically. The human’s job is to review, approve, and share — not to format, upload, and manage links.

The defensible version isn’t “we render markdown better” — it’s “we are the only platform purpose-built for agencies to publish AI-generated deliverables for clients, with workflow depth that documentation platforms won’t build.”

Analogy: DocSend meets GitBook, but for AI-native agencies. Content stays in git (zero vendor lock-in), platform handles branding, access control, view tracking, and client-facing workflows.


Competitive Landscape (March 2026 Research)

Why not just use an existing tool?

ToolWhat it does wellWhy it’s not this
GitBook ($65/site/mo, 450K users)Markdown + git sync + RBAC + API. Covers ~90% of features.Documentation platform, not client deliverables. No view tracking, no per-client branded spaces, no approval workflows. Could add an AI publish endpoint in weeks — biggest threat.
Mintlify ($18M from a16z, ~$10M ARR)MDX-native, git-native, auto-generates docs from code. Customers: Anthropic, Vercel, Cursor.API docs only. Narrow focus. But validates “markdown in, beautiful pages out” at 10x YoY growth.
Notion ($600M ARR, 100M+ users)Notion Sites launched June 2024 — pages become websites with custom domains.Proprietary block format, not markdown-native. No git sync. Agencies already use it but deliverable sharing is clunky.
Qwilr/PandaDoc ($35-59/user/mo)Branded client-facing proposals with analytics.Drag-and-drop editors. No markdown, no git, no AI agent API. Right workflow, wrong input format.
WordPress (43% of web)Launched MCP write in March 2026 — AI agents can publish posts.Overkill CMS for deliverable publishing. But massive distribution threat.

The whitespace

No existing tool combines: markdown-from-git + branded client pages + view tracking + version diffs + approval workflows + AI agent API. GitBook has the tech but not the workflow. Qwilr has the workflow but not the tech. We need both. Version diffs are a hidden advantage: because content lives in git, we get diffing for free at the storage layer — the challenge is rendering it visually for non-technical clients (word-level inline diffs, not code diffs).

Emerging signal

5+ Show HN projects in 2025 solving “markdown → shareable URL” (mdto.page, md2.website, wrds.cc). One commenter explicitly requested an API “for agents to share content.” An OSS project (waynesutton/markdown-site, 598 stars) positions itself as “publishing for AI agents.” None became SaaS products with RBAC or agency workflows.

Adjacent layer (we sit above, not against)

A separate emerging category is agent-native primitive hosting — hosting and storage explicitly built for AI agents to publish and store files. Different category than Cofoundy Docs:

ToolWhat it doesWhy it’s not a competitor
here.now (here.now)“Web hosting and storage for agents.” Agents publish static files (HTML/PDF/images) to {slug}.here.now. Anonymous tier (24h URL, no account). Drives for agent-to-agent file handoff. Stablecoin paywalls via Tempo.Raw substrate. No branding, no client roles, no view tracking, no version diffs, no approval workflows, no agency multi-tenancy. We could even use it as one storage backend.
Cloudflare Pages / Vercel / NetlifyStatic site deploy with custom domains, CI/CD.Generic. No agent-author-first, no llms.txt-first, no client deliverable workflow.

Lesson from here.now: Their agent-discovery surface (/llms.txt, /llms-full.txt, /openapi.json, /.well-known/agent.json, /.well-known/ai-plugin.json, hosted skill installable via npx skills add, ?mode=agent rendering, structured error contract with code/retry_after/docs_url) is best-in-class. We must match or exceed it on V1.1 — see “Agent-Native Surface” below. An “AI-native” product that ships less agent-discovery surface than a generic file-host is mispositioned.


Market Sizing

RingSizeHow we get there
Beachhead: Agencies using AI coding tools that need client deliverable publishing25K-70K firms globally, $60M-$340M/yr at $200-400/moCofoundy = customer zero. Direct outreach to dev shops and consultancies.
Adjacent: Developer documentation (compete with GitBook/Mintlify)$500M+/yrNot recommended — incumbents too strong here.
Broader: Document management SaaS$8-10B in 2025, 13-16% CAGRLong-term expansion if agency wedge works.
AI coding tools market (context)$3.5-7.4B in 2025, 21-28% CAGRThis market creates our users. Cursor: $0→$2B ARR in 18 months.

The initial market is narrow but growing explosively with AI agent adoption.


Users & Personas

PersonaHow they interactPrimary need
AI Agent (Claude Code)API / CLI skill (/publish)Push markdown → get URL back
Team Member (Cofoundy ops)Simple web UIBrowse, edit, organize docs. Light editing for non-technical team
Client (external)Read-only branded viewSee deliverables professionally. Download if needed
Public visitorBlog / case study pagesSEO-friendly content, brand presence

Priority order: AI Agent > Client reader > Team member > Public visitor


Core Concepts

Document

A markdown file in a project folder with YAML frontmatter:

src/content/docs/{project}/{slug}.md
---
title: "Brand Guidelines — Acme Corp"
role: client          # team | client | public
version: 3
author: andre
created: 2026-03-22
tags: [branding, deliverable]
---

# Brand Guidelines
...

Note: project is determined by the folder name, not frontmatter. This prevents slug collisions across projects.

Project Space

Documents are grouped by folder. Maps 1:1 to Cofoundy’s project structure:

Access Roles

RoleCan see team docsCan see client docsCan see public docs
Admin (Cofoundy)YesYes (all clients)Yes
Team (Cofoundy staff)YesYes (assigned clients)Yes
Client (external)NoOnly their projectYes
PublicNoNoYes

What We Have Now (shipped 2026-03-22 → 2026-03-25)

Goal

Cofoundy uses it internally for 1 week. Claude Code can publish. Team can read. Clients see deliverables. Access is per-project (PoLP).

Platform

  1. Astro 6 static site with Zod-validated content collections

    • Full markdown rendering: GFM, syntax highlighting (Shiki dual-theme), tables
    • Mermaid.js diagram rendering (client-side, theme-aware)
    • Table of contents auto-generated per doc
    • Nested folder routing: src/content/docs/{project}/{slug}.md
  2. Cofoundy branding

    • Header: Cofoundy logo (white/dark variants) + “docs” label
    • Footer: isologo + cofoundy.dev link
    • Fonts: Space Grotesk (headings), Inter (body), JetBrains Mono (code)
    • Colors: brand tokens matching @cofoundy/ui (#46A0D0 primary, #020b1b dark bg)
    • Dark/light theme switcher (persisted to localStorage, respects system preference)
    • Print-friendly CSS (clean PDF via browser print)
  3. Frontmatter schema (validated at build time)

    • title (required), role (required: team/client/public), version, author, created, tags
    • type: markdown (default) or pdf — PDF docs embed a pdf.js viewer
    • pdf_file: filename for PDF documents (stored in public/files/{project}/)
    • Project derived from folder name — no frontmatter duplication, no slug collisions
  4. PDF document viewer (pdf.js)

    • Canvas-based renderer (not browser iframe — consistent cross-browser)
    • Toolbar: prev/next page, zoom in/out, zoom level indicator, fullscreen, download
    • Keyboard navigation (arrow keys)
    • Dark container with white page + shadow (Skim-like aesthetic)
    • Supports PDF-only docs (frontmatter only, no markdown body)

Infrastructure

  1. Deploy: Cloudflare Pages + GitHub Actions

    • Repo: github.com/cofoundy/docs-ai (private)
    • Production: docs.cofoundy.dev (custom domain, SSL)
    • Auto-deploy on push to main via GitHub Actions (deploy.yml)
    • Uses wrangler@latest + org secrets CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID
  2. Two-layer access control (authentication + authorization)

    • Authentication: Cloudflare Access (OTP login via email, 24h session cookie)
    • Authorization: D1 permissions middleware (functions/_middleware.ts)
    • Access model (Principle of Least Privilege):
    RoleTeam docsClient docsPublic docs
    adminAllAll projectsAll
    teamAllAll projectsAll
    clientNoOnly their project(s)All
    • D1 permissions table: (email, role, project) — source of truth for who sees what
    • CF Access apps: “DocsAI Team” (/team/*), “DocsAI Client” (/client/*) — gate for login
    • scripts/grant-access.sh — single command to: insert D1 permission + sync CF Access + send Resend email
    • scripts/sync-access.sh — syncs CF Access policies from access-config.json
    • Branded 403 page for unauthorized access attempts
  3. View analytics (D1 + Pages Functions)

    • Cloudflare D1 database: docs-ai-analytics (SQLite, WEUR region)
    • POST /_api/track — logs page view with session ID, viewer email (from CF Access JWT), referrer
    • GET /_api/views — aggregated analytics (team-only: views, unique viewers, avg time, last viewed)
    • Tracking beacon in every doc page (fetch on load, sendBeacon on leave for time-on-page)
    • Dashboard at /team/analytics — filterable by project, sortable table

Publishing

  1. /publish skill (cofoundy-toolkit v1.21+)

    • Backed by deterministic publish.py script (PEP 723 inline deps via uv) — not a prompt
    • Input: path to .md file + --project + --role + optional --notify <email> + optional --tags
    • Reads source, parses frontmatter, extracts H1 from body and strips it (single-source-of-truth: frontmatter title is canonical, body must not duplicate)
    • Auto-increments version if a doc with same slug already exists
    • Validates tags against controlled vocabulary (Domain × Type × optional Subdomain — see SKILL.md)
    • Commits + pushes → GitHub Actions auto-deploys
    • Returns role-prefixed URL (/team/..., /client/..., or /...)
    • --notify <email>: calls grant-access.sh which grants D1 permission + syncs CF Access + sends branded Resend email
    • Supports --type pdf for PDF documents
    • --dry-run writes preview to stderr without touching file or git
    • Fully autonomous e2e: one command publishes, grants access, notifies client
  2. Index pages

    • Global index: sections for public, team, client projects with doc counts + role badges
    • Per-project index: doc list sorted by date
    • Team index links to analytics dashboard

Content (15 docs published)

ProjectRoleDocs
cofoundyteamWelcome, Team, Brand Book, Leads Guide (PDF)
starthack-2026team + publicREADME (public), Pitch Guardrails, Numbers Cheatsheet, Deployment
docs-aiteam + publicPublic PRD, Full PRD
client-democlientProject Brief, Technical Proposal, Weekly Update #1

Not yet built


V1 Features — SHIPPED (2026-03-23 → 2026-03-25)

All V1 features have been built and deployed.

FeatureStatusNotes
Client spacesShippeddocs.cofoundy.dev/client/{project}/ with per-project access
View analyticsShippedD1 database, tracking beacon, /team/analytics dashboard
GitHub Actions auto-deployShippedPush to main → auto-deploy
Cloudflare Access + D1 middlewareShippedTwo-layer: CF Access (auth) + D1 middleware (authorization, PoLP)
PDF document viewerShippedpdf.js canvas renderer with toolbar, fullscreen, keyboard nav
Client email notificationsShippedgrant-access.sh — D1 insert + CF Access sync + Resend email
Per-project permissions (PoLP)ShippedD1 permissions table enforced by _middleware.ts on every request
Autonomous e2e publishShipped/publish --notify email does everything: publish + grant access + notify

Not yet built (deferred to V1.5)


V1.1 — Agent-Native Surface (committed, parallel to V2.0)

Premise: We claim “AI-native”. We must implement more agent-discovery surface than a generic file-host. here.now is the bar to clear, not exceed by half.

FeaturePath / SpecPurpose
/llms.txt (root)https://docs.cofoundy.dev/llms.txtllmstxt.org spec — concise context for any agent reading our site. Lists projects + key URLs.
/llms-full.txt/llms-full.txtExpanded version — full doc index with summaries.
Scoped /llms.txt/{project}/llms.txt, /team/{project}/llms.txtPer-project context. Agent reading a client space gets only that client’s docs.
?mode=agentAny URL with ?mode=agentReturns clean markdown + frontmatter JSON, no chrome (no nav, no theme toggle, no JS).
/openapi.jsonOpenAPI 3.1Full API spec: list docs, get doc, search, publish, get analytics, manage permissions. Enables Cursor/Codex/any agent without skill.
/.well-known/agent.jsonAgent manifestCofoundy Docs declares itself as an agent-readable surface (per emerging W3C agent discovery patterns).
/.well-known/ai-plugin.jsonOpenAI plugin manifestChatGPT plugins compatibility.
/.well-known/mcp.jsonMCP server discoveryPoints to mcp.docs.cofoundy.dev (MCP server).
/.well-known/skills/index.jsonHermes/Claude skill indexLists hosted skills (just /publish for now).
MCP servermcp.docs.cofoundy.devTools: list_docs, read_doc, search, publish_doc, get_analytics, grant_access.
Hosted skill, npx-installablenpx @cofoundy/docs installInstalls /publish skill into Claude Code/Cursor/Codex without cloning the toolkit.
Structured error contractAll API responses on error{code, message, retry_after?, docs_url} — agent-friendly debugging.
Live-docs > cached-skill contractDocumented in skill + llms.txtMeta-instruction: “If your local skill disagrees with /openapi.json, prefer live.” Prevents drift bugs.
Scoped agent tokensTTL + path prefixE.g., a 7-day token scoped to client-acme/ write-only. For agent-to-agent handoff and least-privilege automation.

Anti-feature: Don’t invent a parallel agent protocol. Comply with llmstxt.org / well-known / OpenAPI / MCP standards and extend with our domain (deliverables) — never a private alternative.


V2.0 — Stack Migration (Committed)

Decision: Pull V2’s “Next.js rewrite” forward to V2.0 (immediately after V1.1 agent surface). Astro was correct for MVP validation. The next ceiling is visual richness + multi-tenancy + workflow loop, all of which the design system already serves natively.

What changes

LayerAstro (current)Next.js (V2.0)
FrameworkAstro 6 (static + minimal JS)Next.js 15+ (App Router, RSC, SSG default for docs, SSR for /team//client middleware)
Content format.md only.md + .mdx (component imports in MDX)
Component library1 Astro component (TOC), inline JS for everything else@cofoundy/ui consumed directly via transpilePackages
StylingVanilla CSS + tokensSame tokens, exposed via @cofoundy/ui/styles + Tailwind v4
PDF viewerpdf.js inlinereact-pdf or pdf.js dynamic import
MermaidVanilla JS lightboxReact component wrapper
Auth/RBACCF Access + D1 middlewareSame backend; frontend reads JWT via Next middleware
HostingCloudflare PagesCloudflare Pages with Next-on-Pages, OR Vercel (decide based on edge needs)

Why now (not after Week 4 validation)

The premise of Week 4 validation is “does this resolve the agency deliverable problem?”. That premise can only be validated with a product that delivers the visual richness the positioning promises. Markdown-with-colors is not “documents that feel designed.” We migrate to the stack that lets us actually build the product before we ask if the product works.

Migration plan (1 day with /sprint, parallel dispatch)

  1. Next.js scaffold + App Router + routing parity
  2. DocLayout port → React component, MDX setup, remark-breaks port
  3. PDF viewer + html2pdf + Mermaid component
  4. Cloudflare Access middleware + D1 permissions port
  5. 26 docs migration (most stay .md, flagship docs go .mdx)
  6. Browser QA gate before DNS cutover
  7. Astro instance kept at legacy.docs.cofoundy.dev for 30 days as fallback

V2.1 — Visual Vocabulary (MDX Components)

Premise: Once on Next.js + @cofoundy/ui, MDX docs can compose any component from the design system. Authors get a vocabulary that goes beyond prose.

Components available in MDX (from @cofoundy/ui)

ComponentUse case
<PersonalNote author={...} avatar={...} signature={...}>”From the desk of Andre” — signed personal intro at top of deliverable. Web-grade web component (NOT the email version — shares tokens, different layout).
<MetadataCard items={[...]} />Replaces the **Para:**\n**Tiempo:**\n**Costo:** plain-text block. Renders as branded chips/cards.
<Callout variant="note|tip|warn|danger">Already exists in CSS. Wrapped as MDX component.
<ScopeList items={[...]} />Bulleted list with checkmarks (port from email PersonalNote primitive). For “deliverable scope” sections.
<InfoBox label value link?> / <InfoBoxRow>Stat cards inline (from email primitives, web-grade port).
<NextStepCallout label body>Branded “next step” CTA (port from email).
<StatCard label value trend />KPI in a doc — e.g., monthly client report shows “Revenue +18%“
<BarChart>, <FunnelChart>, <HorizontalBar>, <DonutChart>Embedded charts. Pure CSS, no charting lib.
<Heatmap data={...} />GitHub-style activity grid — for engagement reports.
<Leaderboard items={[...]} />Ranked list for “top contributors / top clients / top deliverables” docs.
<ProgressBar current target />Project progress indicator.
<ActivityFeed events={[...]} />Timeline of events for project status docs.
<AnimatedNumber value duration />Counter animation for hero KPIs.
<Button>, <Badge>, <Avatar>, <Logo>Branded primitives.
<ChatAboutDoc docId={current} />Embedded ChatWidgetFloating scoped to the current doc — agent-powered Q&A. The doc itself becomes interactive.
<ApprovalBlock requiredFrom={email}>Signed-off CTA — pairs with V2 approval workflow.

Authoring patterns to encode


V2.2 — AI Capabilities Beyond Authoring

Premise: “DocsAI” should mean AI throughout the lifecycle, not just at publish-time. Each doc URL accepts query params that invoke AI on-demand, server-side via Workers.

FeatureURL patternBehavior
Translation on demand?lang=es, ?lang=en, ?lang=ptLLM translates content client-side cached at edge. Important for LATAM agencies serving multi-country clients.
Re-explain a section?explain=section-3LLM rewrites a specific section in simpler terms. Lowers the “I don’t understand the technical proposal” barrier.
Executive summary mode?mode=executiveLLM generates a 1-paragraph TL;DR + 3-bullet decision summary at top of doc. Server-rendered, cached.
Inline Q&A<ChatAboutDoc> MDX component (V2.1)Agent answers grounded in the doc — no hallucinated context outside this URL.
Auto-tags + auto-summary on publishServer-side at /publishLLM generates tags (validated against vocabulary), summary frontmatter field, reading_time. Author can override.
Suggested improvements post-publishSent via email digest (weekly)Based on analytics: “this doc was read 3 times by client@acme.com but they didn’t approve. Consider clarifying section 4.”
Smart redirect for old slugsLLM-aided fuzzy matchOld URL → suggest closest current doc.

Privacy gate: LLM ops on client and team roles must use models with no-train data agreements (Claude Enterprise, Azure OpenAI). Public docs can use cheaper models. Per-tenant model selection in V3.


V2 — Workflow Loop (the actual moat)

Premise: The PRD’s claim that “moat is workflow, not tech” requires features that are workflow-shaped, not document-shaped.

  1. Comments & approval — client can comment on a doc. Team gets notified. “Approve” button for deliverables that need sign-off. Records who approved, when, from which CF Access email. Webhook fires to publishing agent on approve/comment — closes the loop. Agent can read feedback and trigger republish autonomously.

  2. Version diff view — visual inline diff between versions (word-level, Google Docs “suggesting” mode — not git-style). Diff selector dropdown: “Compare v2 ↔ v3” or “Show changes since last viewed.” Pairs with comments — review the diff, then approve.

  3. Agent-to-agent handoff — agent A drafts deliverable, hands off to specialist agent B with scoped token (e.g., legal-reviewer-agent, brand-reviewer-agent), then to publishing agent C. Each stage logged.

  4. Re-read frequency tracking — Qwilr-style insight surfaced in /team/analytics: “client@acme.com read your proposal 3 times in 24h before signing.” Strongest signal for sales engagement.

  5. Section-level analytics — heatmap per doc (which sections get read, which get skipped, which get re-read), scroll depth, time-per-section. Surfaced in dashboard.

  6. AI vs human read differentiation — track UA + headers to know when an agent (Claude/Cursor/ChatGPT) read a doc vs a human. “Your client’s agent read this doc as context — they’re acting on it” is a separate signal from “your client read this.”

  7. Deliverable approval webhook — third-party integration: on approve, fire webhook to client’s CRM (HubSpot, Pipedrive), accounting system, or back to the publishing agent.

  8. White-label — client’s own branding on their space. Custom domain: docs.acmecorp.com → their project space. Branded header/footer/colors. Enterprise tier.

  9. Web editor — Monaco/CodeMirror with live preview + frontmatter form. Lower priority than agent surface — most authors will be agents, not humans.

  10. LaTeX compilation/publish --type latex compiles .tex → branded PDF, uploads to platform. Niche but unique. Maintained.


V3 — Distribution & Open Source Track

Premise (Andre’s call, 2026-05-03): OSS positioning is the right play. Resolves three problems simultaneously: differentiation vs closed competitors (GitBook/Mintlify), distribution via npm/MCP/well-known surfaces, and defense against “Anthropic ships Artifacts-as-deliverables” risk.

Model — Vercel/Next.js, Cal.com, Sentry, PostHog pattern

LayerLicenseWhat it is
@cofoundy/docs-engineMIT / Apache-2Core: MDX renderer, frontmatter validation, doc-component library, publish CLI, llms.txt generation, ?mode=agent handler, OpenAPI exporter, .well-known generators. Ships as npx @cofoundy/docs init.
Self-host instructionsOSSAnyone can host their own Cofoundy Docs instance on Cloudflare/Vercel/Render. Bring own auth, own DB.
docs.cofoundy.com (Cofoundy Cloud)Hosted SaaSMulti-tenant hosting, RBAC, view tracking, custom domains, approval workflows, analytics, Resend email, agent-to-agent handoff, MCP server. Per-workspace billing.
@cofoundy/docs-mcp-serverOSSDrop-in MCP server. Self-host or use ours.

Distribution channels

Anonymous publish + claim flow (here.now-inspired)

Pricing model V3 (per-deliverable + workspace)

Reframe from per-workspace SaaS pricing ($29-99/mo) to:

TierPriceIncludes
OSS / Self-hostFreeFull engine, no Cofoundy Cloud features
Free CloudFree1 workspace, 5 deliverables/mo, *.docs.cofoundy.com subdomain, view tracking
Pro$29/mo1 workspace, 50 deliverables/mo, custom domain, branded email, comments + approval
Agency$99/mo3 workspaces, unlimited deliverables, white-label, agent-to-agent handoff, MCP server, SSO
EnterpriseCustomMulti-tenant for re-sellers, SLA, dedicated support

Per-deliverable metering aligns price to value (each deliverable = client touchpoint). Custom domain + white-label = hard upgrade trigger.


Technical Architecture (live)

Claude Code ──/publish skill──► docs-ai repo (Astro 6 + content collections)
       │                              │
       │                        git push to main
       │                              │
       │                     GitHub Actions auto-deploy
       │                              │
       │                    ┌─────────┴─────────┐
       │                    │                   │
       │              Astro build          Pages Functions
       │              (static HTML)        (Workers on CF)
       │                    │                   │
       │              Cloudflare Pages    ┌─────┤
       │                    │             │     │
       │              docs.cofoundy.dev   │   /_api/track
       │                    │             │   /_api/views
       │                    ▼             │
       │              _middleware.ts ◄─────┘
       │              (authorization)
       │                    │
       │         ┌──────────┼──────────┐
       │         │          │          │
       │      /public    /team/*    /client/*
       │      (open)   (CF Access) (CF Access)
       │                    │          │
       │                    ▼          ▼
       │              D1: permissions table
       │              (email, role, project)
       │                    │
       │              admin → sees all
       │              team  → sees team + all clients
       │              client → sees only their project

       └──► grant-access.sh ──► D1 insert + CF Access sync + Resend email

Stack (V1, current): Astro 6, Shiki, Mermaid.js, pdf.js, Cloudflare Pages + D1 + Workers, GitHub Actions, Resend.

Stack (V2.0 target, committed): Next.js 15+ (App Router, RSC), MDX, @cofoundy/ui design system, react-pdf, Mermaid wrapper, Cloudflare Pages (Next-on-Pages) + D1 + Workers, GitHub Actions, Resend, MCP server, Cloudflare R2 (asset storage for V3 multi-tenant).

Target architecture (V2.0 + V1.1 + V2.1)

                  ┌─────────────── AGENT-NATIVE SURFACE (V1.1) ───────────────┐
                  │                                                            │
                  │  /llms.txt                  /openapi.json                  │
                  │  /llms-full.txt             /.well-known/agent.json        │
                  │  /{project}/llms.txt        /.well-known/ai-plugin.json    │
                  │  /{project}/{slug}?mode=agent   /.well-known/mcp.json      │
                  │  mcp.docs.cofoundy.com (MCP server)                        │
                  │  npx @cofoundy/docs install (hosted skill)                 │
                  └────────────────────────────┬───────────────────────────────┘


Claude Code / Cursor / Codex /                Next.js 15 (App Router)
ChatGPT / Hermes / any-agent  ─────────►      ├─ /[project]/[slug]      (SSG, MDX rendered)
       │                                      ├─ /team/[project]/[slug] (SSR + middleware)
       │ /publish skill OR MCP                ├─ /client/[project]/[slug] (SSR + middleware)
       │ OR REST API                          ├─ /api/track             (analytics beacon)
       │                                      ├─ /api/views             (analytics dashboard)
       │                                      ├─ /api/publish           (REST publish endpoint)
       │                                      ├─ /api/explain           (AI re-explain a section)
       │                                      ├─ /api/translate         (AI translate to lang=)
       │                                      ├─ /api/summary           (AI executive summary)
       │                                      └─ /api/chat              (AI Q&A grounded in doc)
       │                                                │
       │                                                ▼
       │                              @cofoundy/ui (transpiled)
       │                              ├─ analytics: StatCard, BarChart, Funnel, Heatmap
       │                              ├─ docs: PersonalNote, MetadataCard, ScopeList,
       │                              │        Callout, NextStepCallout, ApprovalBlock
       │                              ├─ chat: ChatWidgetFloating (askAbout=docId)
       │                              └─ ui: Button, Badge, Avatar, Logo, Sidebar
       │                                                │
       │                                                ▼
       │                              Cloudflare Pages (Next-on-Pages)
       │                                                │
       │                              ┌─────────────────┼─────────────────┐
       │                              │                 │                 │
       │                          D1: permissions   D1: analytics    R2: PDFs/assets
       │                          D1: comments      D1: read_events  R2: workspace files
       │                          D1: approvals     D1: ai_cache     (V3 multi-tenant)
       │                                                │
       │                              webhooks ◄────────┤
       └──────────────────────────  on approve/comment   │
                                    fire to publisher    │

                                                  Cloudflare Access
                                                  (Auth: OTP, OAuth, SSO V3)

V3 layer (multi-tenant): Workspace router (subdomain or custom domain → workspace ID), per-workspace D1 partitioning OR Durable Objects, R2 prefix isolation, per-workspace Resend domain, billing via Stripe.


Risks (revised May 2026)

RiskSeverityMitigation
Feature-swallowed by GitBook — they add an AI agent publish endpoint (weeks of work for them) and our core feature becomes a checkboxHIGHBuild agency workflow depth (view tracking, approvals, client spaces, agent-to-agent handoff) that GitBook won’t prioritize. They serve dev docs, not agency deliverables.
Anthropic ships “Artifacts as deliverables” — Claude.ai already has Artifacts. A “branded artifacts with custom domain + access control” upgrade is one sprint for them.HIGHOSS positioning (V3) defangs this — if Cofoundy Docs is the open-source standard, Anthropic shipping a hosted version becomes a complement, not a kill. Same dynamic as Vercel surviving Next.js being Anthropic-agnostic.
Browser-native AI rendering — ChatGPT Atlas + Arc render llms.txt and structured data natively in the browser-as-agent UI. The “branded URL” stops being a differentiator if the browser-agent is the renderer.MEDIUMCompete on workflow, not rendering. Approval, comments, view tracking, custom domains, client identity are not browser features. Make ?mode=agent a first-class citizen so we work with browser-native rendering.
AI agents bypass us entirely — Claude Code can already generate full websites and deploy to Vercel in one loop.MEDIUMA branded site ≠ a professional deliverable portal with access control, analytics, versioning, approval. Value is workflow + identity surface, not rendering.
Standardization eats our protocolllmstxt.org, MCP, OpenAI plugin spec, well-known agent surface. If we invent a private protocol, we get bypassed.MEDIUMComply + extend. Treat llmstxt.org / MCP / OpenAPI / well-known as table stakes. Our extensions live in our domain (deliverables, approvals, agency workspaces), never in protocol.
Initial market too narrow — only 25K-70K firms globally fit the exact agency profileMEDIUMOSS distribution + per-deliverable freemium broadens top-of-funnel beyond agencies (solo consultants, internal teams, dev shops). The agency tier is the monetization wedge, not the entire market.
WordPress MCP — WordPress launched AI agent write in March 2026. 43% of the web.LOWWordPress is a CMS, not a deliverable portal. Different use case, different buyer.
Notion Sites expanding — 100M+ users, $600M ARR, adding custom domainsMEDIUMNotion locks content in proprietary blocks. We keep content in git = zero vendor lock-in. Different philosophy, different user.
MCP commoditization — when every site exposes an MCP server, “agent-friendly” is no longer a feature.LOWWorkflow depth + identity + branding move from differentiator to required. Same path as “responsive design” 2012 → 2018. Fine.
Core tech is commodity — replicable in 1-3 monthsHIGHTech is not the moat. Agency workflow depth + agent ecosystem position + OSS distribution + design system integration is. Move fast — 6-12 month window.

Open Questions

  1. Name — “DocsAI” is generic. Need something sharper. Candidates: Folio, Publi, Inkwell, Quill, Sendoff, Closing, Postmark (taken). Decide before V3 OSS launch — domain availability matters.

  2. Positioning — Research says “DocSend for AI-native agencies” is more defensible than “Vercel for documents.” With OSS track, possible reframe: “the open-source deliverable layer for AI-native work.” Validate with agencies AND with the OSS community separately.

  3. Pricing — per-workspace vs per-deliverable — V3 pricing table proposes hybrid (workspace base + deliverable metering). Validate which dimension drives upgrades. Risk: per-deliverable feels punitive; per-workspace feels arbitrary cap. May need usage-based with no hard cap.

  4. OSS license — MIT vs Apache-2 vs AGPL — MIT/Apache for max distribution; AGPL forces re-hosters to upstream improvements (Vercel did MIT, Sentry did BSL after AGPL friction, Cal.com on AGPL). Decision before V3 launch.

  5. MCP-first vs API-first — Should the public surface be primarily MCP (agent-discoverable, native tool calls) or REST API (universal, language-agnostic)? Likely both, but resource ordering matters. MCP is younger, REST has 25 years of muscle memory.

  6. Anonymous publish flow — own subdomain or use here.now as backend? — Could ship *.preview.docs.cofoundy.com ourselves, or proxy to here.now’s anonymous tier. The here.now route trades sovereignty for speed-to-ship.

  7. Multi-tenant isolation — D1 partitioning vs Durable Objects vs separate DBs per workspace — V3 architecture decision. D1 row-level isolation cheapest; Durable Objects best for per-tenant compute; separate DBs cleanest but ops-heavy.

  8. AI model selection per tenant — Public docs can use cheap models. Client/team docs need no-train data agreements (Claude Enterprise, Azure OpenAI). Should this be tenant-configurable in Pro/Agency tiers?

  9. File downloads beyond PDF — should client spaces also serve raw files (zip of assets, brand packages)? Edges into here.now territory. Probably yes for V3 (workspace = also a file drive).

  10. Build vs. integrate (web editor) — Monaco/CodeMirror from scratch or embed HackMD/CodiMD? Lower priority than agent surface; most authors will be agents.

  11. Doc as software — versioning UX — Each publish = immutable build (Vercel deploy mental model). Should clients see “v3 (current)” with “v2 (sept)” in a dropdown, or a Git-history view? Pairs with V2 visual diff.

  12. Identity beyond email OTP — SSO (Google/Microsoft), GitHub, magic-link-via-WhatsApp (LATAM clients), wallet-based (web3 clients). Which to ship first depends on first 5 paying agencies’ client mix.

  13. Browser extension / overlay — A Chrome/Atlas extension that detects “you’re on docs.cofoundy.dev” and shows agency-side tools (analytics inline, comment thread, approval shortcut). Speculative.


Strategic Decisions Log

2026-05-03 — V2.0 pull-forward + agent-native surface + OSS track

Context: During a session reviewing the @cofoundy/ui design system (audited as full tier-1 design system, not email-only as initially assumed) and benchmarking against here.now’s agent-discovery surface, three strategic calls were made by Andre (CEO).

DecisionRationaleTrade-off
Pull V2.0 (Next.js migration) forward — out of “if go after Week 4” conditional, into committed near-term workVisual richness ceiling of Astro+plain-markdown blocks the validation premise. You cannot validate “documents that feel designed” with a stack that cannot consume the design system. The premise of Week 4 validation already presupposed a product that the V1 stack can’t deliver.Eats Astro investment (PDF viewer, print CSS, Mermaid lightbox, scroll-spy TOC) — but /sprint parallel dispatch makes this a 1-day rebuild, not 1-2 weeks. Bundle size goes from ~0KB JS (Astro static) to ~150-200KB (React+Radix). Mitigated via SSG default + RSC for non-interactive sections.
Ship agent-native surface as V1.1llms.txt (root + scoped), ?mode=agent, .well-known/*, OpenAPI 3.1, MCP server, hosted skill via npx, structured error contractAn “AI-native” product that ships less agent-discovery surface than a generic file-host (here.now) is mispositioned. llmstxt.org is becoming standard; comply + extend, never invent parallel.Adds scope before V2.0 stack work. Mitigated: most of these are static endpoints (llms.txt, well-known/*) generated at build time — additive, not architectural.
OSS track committed for V3Three problems solved at once: (1) differentiation vs GitBook/Mintlify (closed), (2) distribution via npm/MCP/well-known surfaces, (3) defense vs “Anthropic ships Artifacts-as-deliverables” risk — if Cofoundy Docs becomes the open standard, Anthropic shipping a hosted version becomes a complement.OSS gives away the engine; monetization shifts to Cofoundy Cloud (hosting + RBAC + analytics + multi-tenant + email + auth + custom domains) — Vercel/Next.js, Cal.com, Sentry, PostHog model. License (MIT vs Apache vs AGPL) still open.

Decision criteria not used (rejected): “Wait for Week 4 go/no-go before any V2 work.” Andre’s call: validation requires the product. Ship the product, validate concurrently.

Anti-decisions (explicitly NOT doing):


Validation Framework

Status (May 2026): Week 1 complete. Validation now runs concurrent with V1.1 + V2.0 build, not before it (per Strategic Decisions Log entry above). Weeks 2-4 below remain as the customer signal capture protocol; their gating role on V2 work is removed.

Week 1: Build MVP + V1 (2026-03-22 → 2026-03-25) — COMPLETE

Week 2: First Client Test (starting 2026-03-25)

Week 3: Market Signal

Week 4: Go/No-Go Decision


References & Research Sources

Future agents: this section lists the URLs/files behind the analysis in this PRD. If a referenced site has changed, refetch it and update the relevant section. Do not assume the synthesis below is permanent — it is dated 2026-05-03.

Live external sources to refetch when revisiting

SourceURL / PathWhat we extracted
here.now homepagehttps://here.now”Web hosting and storage for agents.” Positioning, hero copy, agent-icon grid. Treat as primitive layer, not competitor.
here.now/llms.txthttps://here.now/llms.txtThe reference implementation of agent-discovery surface for V1.1. Read it before proposing changes to our /llms.txt.
here.now/docshttps://here.now/docsAPI surface (presigned upload, slug-based site CRUD, scoped Drive tokens).
here.now/pricing.mdhttps://here.now/pricing.mdFree/Hobby/Developer tiers + anonymous flow. Reference for V3 anonymous-publish + claim.
llmstxt.org spechttps://llmstxt.orgSpec for /llms.txt and /llms-full.txt. Comply, don’t reinvent.
MCP spechttps://modelcontextprotocol.ioFor mcp.docs.cofoundy.com server design.
OpenAPI 3.1https://www.openapis.org/specificationFor /openapi.json.
W3C Well-Known URIsRFC 8615For /.well-known/* endpoints.

Internal references (read before V2.0 sprint)

SourcePathWhat it tells you
@cofoundy/ui package~/cofoundy/packages/ui/The design system to consume. 28 UI primitives + 17 analytics + 13 chat + 12 messaging + 16 email components. Read packages/ui/CLAUDE.md first, then browse src/components/.
@cofoundy/ui Storybookhttps://ui.cofoundy.devLive visual catalog (71 stories). Single best place to see component vocabulary.
/publish skill~/cofoundy/plugins/cofoundy-toolkit/skills/publish/Current publishing pipeline. SKILL.md + scripts/publish.py. Tag taxonomy lives here.
Mail skill (founders)~/cofoundy/plugins/cofoundy-founders/skills/mail/Reference for email-flavored visual vocabulary. PersonalNote, ScopeList, NextStepCallout, InfoBox patterns to port to web.
Workspace setup~/cofoundy/plugins/cofoundy-toolkit/commands/workspace-setup.mdHow team members get the codebase. Update when onboarding flow changes.

Why this section exists

A new agent picking up this PRD in a fresh session does not have the conversation history that produced it. They CAN refetch here.now and audit @cofoundy/ui — but they don’t necessarily know to. This section is the breadcrumb trail. Updates to V1.1, V2.1, or V3 features should refetch here.now/llms.txt first to check whether their patterns have evolved.


Why This Could Be a Startup

  1. Timing — AI coding agent adoption is growing 25-28% CAGR. Cursor went $0→$2B ARR in 18 months. The volume of AI-generated markdown is exploding, and the “last mile” to non-technical stakeholders will only get worse.

  2. Wedge — Start with agencies (Cofoundy = customer zero). The sharpest pain: multiple clients, multiple projects, professional output matters. No markdown-native tool serves this workflow today.

  3. Counter-positioning — Content stays in git, not proprietary blocks (vs Notion) or a managed editor (vs GitBook). Zero vendor lock-in on content. For teams already working in IDEs with AI agents, this aligns with existing workflows.

  4. Moat is workflow, not tech — Tech is commodity (1-3 months to replicate). Moat is agency workflow depth: per-client spaces, view tracking, approval flows, white-label — plus AI agent ecosystem positioning. Once /publish targets this platform from every major agent, switching costs are real.

  5. Revenue — Free for public docs. $29/mo per client workspace. $99/mo for white-label + custom domains. Benchmarked against GitBook ($65/site), DocSend ($10-65/user), Mintlify ($300/mo).

  6. Expansion — Agency deliverables → consulting firms → legal (contracts) → marketing (content) → any team that uses AI to write for external stakeholders.

What the research validated

What the research warned