# Drafted

Multi-tenant shared surface for AI-human collaboration. Drafted organizes agent-produced work into **projects** (frames on a zoomable real-time surface), **skills** (reusable operating procedures agents load), and a **wiki** (durable org knowledge) — with MCP tools for agents and a browser UI for humans.

- Product vision and positioning: [PRODUCT.md](PRODUCT.md)
- Architecture, development, and operations: [AGENTS.md](AGENTS.md)
- Live: [drafted.live](https://drafted.live)

## OKF-native

Drafted is a native producer and consumer of the **Open Knowledge Format (OKF) v0.1** ([GoogleCloudPlatform/knowledge-catalog](https://github.com/GoogleCloudPlatform/knowledge-catalog)):

- **The org wiki is an OKF v0.1 bundle.** Every page carries conformant YAML frontmatter (required `type`, one-line `description`, `tags`, synthesized `timestamp`; unknown keys preserved). `index.md` at every level is synthesized, `log.md` keeps the date-grouped change history, links resolve with or without `.md`, and broken links are legal. The wiki UI shows a live OKF conformance badge.
- **Bundle exchange everywhere.** Export/import the wiki (`GET /api/wiki/export.tar.gz`, `POST /api/wiki/import`), the skill library (`skills/<slug>/SKILL.md` layout), and whole projects (`<layer>/<lane>/<file>.md` concepts; markdown links round-trip as connectors) — via HTTP or the MCP `wiki`, `skill`, and `project` tools, with dry-run reports.

## Install

**Claude Code, Codex, or any MCP client** — installs the MCP server, the Drafted skill, *and* the eight slash commands (into `~/.claude/commands/drafted/` and `~/.codex/prompts/drafted/`):

```bash
# macOS / Linux — download, then run the local file:
curl -fsSL https://drafted.live/install.sh -o /tmp/install-drafted.sh
bash /tmp/install-drafted.sh

# Windows (PowerShell) — download, then run the local file:
Invoke-WebRequest https://drafted.live/install.ps1 -OutFile $env:TEMP\drafted-install.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File $env:TEMP\drafted-install.ps1
```

> **Why not `curl | bash` / `irm | iex`?** Heuristic antivirus (Norton IDP, SmartScreen) flags the pipe-to-shell pattern as download-and-execute malware. Downloading the installer to a local file and running it avoids the false-positive block.

> Adding the MCP server on its own (e.g. `claude mcp add`) gives you the tools without the skill or the commands.

**Claude on the web (claude.ai) and Cowork** — install the plugin, not the bare connector. The plugin bundles the Drafted connector *plus* the Drafted skill and the eight slash commands (`/drafted:onboard-drafted`, `/drafted:create-project`, `/drafted:create-skill`, `/drafted:ingest`, `/drafted:extract`, `/drafted:improve-wiki`, `/drafted:improve-skill`, `/drafted:improve-project-harness`); adding the connector URL on its own gives you the tools with none of the guidance.

> 1. Settings → Customize plugins → Add → Add marketplace → `https://github.com/ddfourtwo/drafted-web` → install **Drafted**.
> 2. Settings → Connectors → find **Drafted** → **Connect**, then approve the sign-in.
>
> Both halves matter: the plugin carries the skill and commands, the connector carries the tools. Installing the plugin does not sign you in to the connector.

## Quick start (developing Drafted itself)

```bash
npm install && npm run dev   # Docker services + schema + server with hot reload
```

- App: http://localhost:3477
- Email inbox (magic links): http://localhost:8025
- MinIO console: http://localhost:9001

Sign in with any email and grab the magic link from Mailpit.
