Emit is an AI-first local authoring workspace and bidirectional synchronization tool for EmDash (Cloudflare Workers + D1 + R2). It provides a full-featured CLI and a Model Context Protocol (MCP) server designed for autonomous coding agents (Google Antigravity, Claude Code, Cursor) and human writers.
- Why Emit?
- 1-Minute Daily Workflow
- Overview & Architecture Philosophy
- Key Features
- Installation
- Initial Setup & Profiles
- Workspace Structure & Data Model
- Markdown, Frontmatter & The 4-Step Golden Path
- CLI Commands Overview
- Model Context Protocol (MCP) Support
- Authoritative Documentation & Architecture Specs (
docs/) - Development, Testing & License
- π‘οΈ Zero-Cost AI Iteration (Defend Cloudflare D1 Limits):
When AI agents (like Google Antigravity, Cursor, or Claude Code) interact directly with a remote CMS, their rapid, iterative read/search/edit loops can quickly exhaust API quotas (such as Cloudflare D1 daily read/write limits). Emit trades a one-time upfront sync cost (an initial
emit pullor full-libraryemit snapshotperforms a batch read to populate.emit/cache.dbvianode:sqlite) for zero network requests during iteration and minimal delta on syncβagents can search (snapshot-first), diff, validate guards, and iterate thousands of times locally, syncing only the final reviewed delta via a distributed lock and 3-way merge. βοΈ True Offline Authoring & Media Staging: Web editors struggle on flights or unstable Wi-Fi, especially with image uploads. With Emit, place new images inmedia/drafts/, write Markdown in VS Code or Obsidian with relative image preview (../../../media/...), and push when back onlineβEmit handles the upload β confirm β promote R2 pipeline and URL rewrite automatically. You can even cache existing remote media binaries (emit snapshot --include-media) for full offline restoration viaemit pull --from-snapshot.- π 24 Code-Level Guardrails for AI Agents (G1βG24):
Autonomous agents can accidentally publish unfinished drafts or hallucinate taxonomy slugs if given raw CMS APIs. Emit enforces 24 physical preflight guardrails before any writeβblocking unapproved live publishing without
--allow-publish/allowPublish: true(G3), invalid taxonomy terms (G4), manualmvcorruption (G2), and deleting in-use media (G20).
Your day-to-day writing workflow takes just 4 steps:
- Initialize once:
emit profile add <name> --origin https://your-site.example --token <token>andemit init - Pull latest state:
emit pull(syncs recent posts, taxonomies, and referenced media) - Write & iterate offline: Edit Markdown in VS Code / Obsidian or run local CLI / MCP checks (
0-HTTPsearch, diff, and guard validation) - Push safely:
emit push(uploadsmedia/drafts/*, acquires a distributed lock, and 3-way merges)
Using Cursor, Claude Desktop/Code, or Antigravity via MCP? Copy-paste the 6-line stdio config in MCP Client Configuration.
EmDash is a modern serverless headless CMS built on Cloudflare Workers, D1, and R2. Emit turns any local directory into a Git-like local authoring workbench, allowing you and AI coding agents to draft, inspect, diff, and publish Markdown articles with strict safety guardrails.
ββββββββββββββββββββ Local Workspace (0 Network / 0 D1) ββββββββββββββββββββ
β β
β AI Agents (Google Antigravity / Cursor / Claude Code) β
β β² β
β β MCP (17 tools) / CLI β
β βΌ β
β Emit Engine + Local SQLite (.emit/cache.db Staging Desk) β
β β² β
β β Markdown + media/ (VS Code / Obsidian) β
ββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
β emit pull / snapshot (Batch Read)
β emit push (Lock + 3-Way Merge Delta)
βΌ
βββββββββββββββββββββββ Cloudflare (Online Remote) βββββββββββββββββββββββββ
β EmDash CMS (Cloudflare Workers + D1 SQL + R2 Media) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- What Emit IS (Core Goal):
- An active authoring and editing workbench (Staging Desk) where human authors and AI agents collaborate safely.
- A Local-First workflow with automatic offline draft image upload (
media/drafts/), article-relative image preview (../../../media/<storageKey>), distributed mutex locks, Hybrid 3-Way Merge, and 24 preflight safety guards (G1βG24).
- What Emit is NOT (Deliberate Non-Goals):
- Not a full-site database dumper: Emit maintains a bounded sliding window of recent articles on disk (default: latest 30 published + 30 drafts, configurable via
postsSyncLimitin.emit/config.json), pruning older clean files to keep local searches and AI context windows fast. - Every historical article remains 100% reachable on demand: Use
emit article-searchto find any past post by keyword, tag, category, or date range, then pull it on demand viaemit pull <ULID>. If an out-of-window article has unpushed local edits, Emit's Unpushed Edits Safeguard keeps those files untouched and reports them as a warning while the rest of the sync completes.
- Not a full-site database dumper: Emit maintains a bounded sliding window of recent articles on disk (default: latest 30 published + 30 drafts, configurable via
Emit and the Official EmDash MCP server are designed to work side by side against the same site:
| Operation | Right Tool |
|---|---|
| Drafting, reviewing, diffing, and publishing articles with safety guards (G1βG24), locks & 3-way merge | Emit (emit pull / emit push, MCP sync_* tools) |
| Finding and targeting past articles or media assets (with local mirror status & offline body search) | Emit (emit article-search / emit media-search) |
| On-demand retrieval of any single historical article by ULID | Emit (emit pull <id>) |
| Bulk media library management (mass upload, mass delete) or arbitrary site-wide collection queries | Official EmDash MCP / EmDash Admin Dashboard |
Most headless CMS tools only support one-way Markdown import or strip custom styling attributes on round-trip. Emit implements a 3-Tier Portable Text AST engine that converts standard prose cleanly while protecting rich CMS layout attributes from destructive resets:
Remote EmDash Portable Text AST (JSON Blocks)
βββ Tier 1 & 2: Headings, Lists, Marks, GFM Tables, Thematic Breaks (---)
β + Plain Images βββΊ Track A:  [πΌοΈ Offline Editor Preview]
βββ Tier 3: Styled Images (alignment, displayWidth, caption) & Custom Blocks (core:gallery)
βββΊ Track B: <!--ec:block {"_type":"image","alignment":"left",...} --> [π Protected by Guard G9]
- GFM Tables & Thematic Breaks: Pipe tables (
| col |) and horizontal rules (---) round-trip losslessly to EmDash Portable TexttableandthematicBreakblocks. - Dual-Track Image & Custom Block Fidelity: Plain images serialize as standard Markdown (
Track A) for immediate preview in VS Code / Obsidian, while styled images (alignment,displayWidth,caption) and custom EmDash blocks automatically fall back to single-line opaque comment fences (Track B,<!--ec:block {...} -->) guarded by G9 (MODIFIED_OPAQUE_BLOCK) so server-side layout is never lost on push.
- Offline Image Preview with Zero Phantom Diffs (
localMediaRefs: true): On disk, mirrored body images are written as article-relative paths (../../../media/<storageKey>, resolving to local mirrormedia/<markdownRef>.<ext>), so Markdown preview works 100% offline. In.emit/cache.db(base_snapshots) and remote payloads, Emit preserves the canonical/_emdash/api/media/file/<storageKey>URLβmeaningemit diffandemit statusnever report false diffs. - Automated Offline Draft Image Pipeline (
media/drafts/): Drop new images intomedia/drafts/<filename>, reference them on a standalone line (or infeaturedImage), and runemit push. Emit automatically executes EmDash's 4-stage upload (upload-urlβPUTβconfirm), rewrites the link, and moves the file tomedia/<markdownRef>.<ext>(+.yamlcompanion), reusing already-promoted assets across articles without re-uploading. - Multi-Language First Workspace & Offline Taxonomy Staging: Articles and taxonomies are cleanly organized by locale (
posts/<locale>/{draft,published}/,categories/<locale>/,tags/<locale>/). Create localized translations viaemit new --translation-of(with automatictranslationGrouptaxonomy mapping), inspect missing translation pairs offline viaemit status --i18n, and stage new categories/tags completely offline viaemit new-term(categories/drafts/<locale>/, auto-created & promoted onemit push).
- Uncommitted Draft Revisions on Published Articles (
published*): When a live published article is edited and saved as an unpublished draft in the EmDash Web Admin, Emit detects it via Two-Track Revisions (separating raw transport_revfrom composite comparison keys${version}@draft:${draftRevisionId}). The file stays inposts/<locale>/published/withstatus: published # draft revision(published* [has unpublished draft]inemit status): a normalemit pushupdates the remote draft, while--allow-publishpublishes it live. - Structure-Aware Hybrid 3-Way Merge & Distributed Locks: Acquires a 7-minute mutual exclusion lease (
POST /lock) before writing. If concurrent edits occur, Emit performs a 3-way merge across three distinct structural dimensionsβ(1) YAML Frontmatter key-by-key, (2) Taxonomy categories/tags as mathematical sets (with pre-PUT remote taxonomy auditing), and (3) Markdown body line-by-line vianode-diff3βwhile rescuing divergent local files toposts/conflicts/.
- 24 Code-Level Preflight & Sync Guardrails (G1βG24): Physically blocks AI agent accidents before any network requestβpreventing unapproved live publishing (G3), hallucinated category/tag names (G4), manual
mvfilename corruption (G2), pushing quarantined conflict copies (G12), accidental taxonomy wipes (G19), or deleting in-use media (G20). - Snapshot-First Exhaustive Search (
snapshotStatusFraming) & 0-GET Self-Healing:emit article-searchandemit media-searchsearch 100% of the local workspace +.emit/cache.dbsnapshot with zero network calls (with explicitfresh/stale/missingcoverage framing and optional--livekeyword-only FTS for articles). On pull, untouched local articles self-heal deleted remote taxonomy terms and legacy spellings on the 0-GET fast path. - Zero-Friction Multi-Site Profiles & Zero Native Dependencies: Auto-detects the target EmDash site from your current working directory (
~/.config/emit/profiles.yaml) and runs on Node.js 22+ built-innode:sqlite(DatabaseSync) with zero C++node-gypdependencies.
Requires Node.js v22.0.0 or higher.
# Global installation via npm (Recommended)
npm install -g emdash-emit
emit --version
# Or run directly via npx
npx emdash-emit status# 1. Register your EmDash instance and Personal Access Token (stored in ~/.config/emit/profiles.yaml with 0600 permissions)
emit profile add my-blog \
--origin https://your-blog.example.com \
--token <your-personal-access-token> \
--workspace /path/to/local/blog-repo
# 2. Initialize the workspace (.emit/config.json, .emit/cache.db, and .emit/.gitignore)
cd /path/to/local/blog-repo
emit init
# 3. (Optional) Verify credentials against the remote server
emit doctor --check-authWhen you manage multiple blogs (e.g., personal and work), link each profile to its --workspace directory. Emit automatically selects the matching profile based on your current working directory (emit profile current shows the exact Resolved by: ... rationale).
To rotate a token safely without exposing secrets in shell history or touching other profile settings:
# Interactive prompt with terminal echo disabled
emit profile set-token my-blog
# Or pipe directly from macOS Keychain / secret manager
security find-generic-password -s emdash-pat -w | emit profile set-token my-blog --stdinFor details on the 4-tier authentication chain, automatic OAuth 401 token refresh, origin resolution precedence, and
.emit/config.jsonoptions (postsSyncLimit,mediaSyncLimit,localMediaRefs,concurrency), see docs/architecture-and-layers.md.
emit init automatically generates .emit/.gitignore to exclude the machine-local SQLite database (cache.db*, mcp_state.json). For your root repository .gitignore, use the following configuration:
# Emit Local Cache Database (Strictly exclude binary SQLite DBs)
.emit/cache.db*
.emit/*.db*
*.db
*.db-wal
*.db-shm
# OS & Editor temporary files
.DS_Store
Thumbs.db
Temp/
tmp/
# Optional: Media binaries (Uncomment if you prefer not to commit large images to Git)
# media/*.jpg
# media/*.png
# media/*.webp
# media/*.avif
# media/*.mp4.emit/cache.db*must be excluded from Git (machine-local SQLite state)..emit/config.jsonandmedia/*.yamlcan be safely committed to Git (tokens live outside the repo in~/.config/emit/profiles.yaml).
your-blog/
βββ .emit/ # Workspace config (config.json) & SQLite baseline cache (cache.db, Schema v9)
βββ categories/ # Locale-scoped category YAML definitions (<locale>/<id>-<label>.yaml)
β βββ drafts/ # Offline staged categories (<locale>/<provisionalId>-<label>.yaml; auto-promoted on push)
βββ tags/ # Locale-scoped tag YAML definitions (<locale>/<id>-<label>.yaml)
β βββ drafts/ # Offline staged tags (<locale>/<provisionalId>-<label>.yaml; auto-promoted on push)
βββ media/ # Mirrored media (<markdownRef>.<ext> + .yaml; named after storageKey)
β βββ drafts/ # Staging folder for offline draft images (auto-uploaded & moved on push)
β βββ _cache/ # Opt-in offline media cache (via snapshot --include-media; gitignored)
βββ posts/ # Local Markdown Articles (<locale>/{draft,published}/<yyyyMMdd>_<ulid>-<title>.md)
βββ <locale>/
β βββ draft/ # Draft articles for <locale> (e.g. ja, en)
β βββ published/ # Live published articles (includes published* with "# draft revision")
βββ conflicts/ # Read-only rescue copies (.conflict.md, .deleted.md) β never pushed
Important
Two Media Identifier Spaces (id vs storageKey):
Every EmDash media asset has two unrelated 26-character ULIDs:
- Media Record
id(D1 primary key): Used in frontmatterfeaturedImage: "01M67P0MBMJQQXH2K95HHCYRYB"andGET /_emdash/api/media/{id}. - Media
storageKey(R2 object key): Used in Markdown body URLs (/_emdash/api/media/file/<storageKey>) and local mirror filenames (media/<markdownRef>.<ext>).
Never interchange them. See docs/media-id-spaces.md and docs/media-pipeline.md for full details.
Emit supports two primary entry flowsβWorkflow A (One-Shot New Draft) and Workflow B (Discovering & Revising Existing/Historical Posts)βboth converging into offline Markdown authoring and a 2-Stage Push (Draft Staging β Live Publish):
[0. SYNC WORKSPACE] emit pull (Syncs latest 30+30 posts, categories/tags & referenced media)
β
βββββββββββββββββββββββββββββββββββββββββββββββ
βΌ (Workflow A: Create New Post) βΌ (Workflow B: Revise Existing / Past Post)
[1A. ONE-SHOT SCAFFOLD] [1B. DISCOVER & TARGET]
emit new <slug> -t "Title" \ β’ Recent (in window): inspect "emit status"
-C tech -T ai -d "SEO desc" \ β’ Older (outside 30-post window):
-f "../../../media/drafts/cover.jpg" emit article-search "keyword" --tag ai
(Generates schema-valid YAML in 1 step; βββΊ emit pull <26-char-ULID>
no manual frontmatter YAML editing!) (Pulls post + mirrors its images on demand)
β β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββ
βΌ
[2. OFFLINE AUTHORING & MEDIA STAGING]
β’ Edit Markdown body in VS Code / Obsidian / Cursor (images preview offline via ../../../media/)
β’ New local images: drop in media/drafts/<file> & reference as 
β’ Existing remote images: find via "emit media-search [--since today | --offline]"
β’ Preserved blocks: keep <!--ec:block {...} --> lines intact (layout/styling protected by G9)
β
βΌ
[3. DIFF & 2-STAGE PUSH (Draft Staging βββΊ Live Publish)]
β’ Inspect changes: emit diff <file>
β’ Stage as Draft: emit push <file>
(Auto-uploads media/drafts/* -> moves to media/, acquires 7-min lock,
3-way merges if needed, and saves draft on EmDash.
*Even on a live published post, bare "emit push" safely stages an
unpublished draft revision [published*] without altering live!*)
β’ Publish Live: Set "status: published" in frontmatter, then run:
emit push <file> --allow-publish
---
id: 01M6ABCDEF1234567890123456 # 26-char canonical ULID (auto-generated; DO NOT EDIT)
slug: building-ai-powered-cms-tools
title: 'Building AI-Powered CMS Tools'
collection: posts
status: draft # "draft" or "published"
publishedAt: null
locale: ja
featuredImage: '01M67P0MBMJQQXH2K95HHCYRYB' # 26-char media record ULID, "../../../media/drafts/cover.jpg", or null
taxonomies: # Always nest categories and tags under taxonomies:
categories:
- ζͺει‘
tags:
- typescript
- ai
seo:
title: null
description: 'A complete guide to AI-driven CMS workflows'
canonical: null # Full https://... URL or null
noIndex: false
image: null
bylines:
- aroooy
---
Write your Markdown body here (do not repeat `# Building AI-Powered CMS Tools` at the top)...
- Always nest
categoriesandtagsundertaxonomies:(top-level keys are stripped by schema validation). - Never rename or move files with
mv(Guard G2): Updatetitle,slug, orstatusin frontmatter and runemit push; Emit relocates the file automatically. - Offline Draft Images (
media/drafts/): Place new images inmedia/drafts/<file>and reference them on a standalone line (). Onemit push, Emit uploads the image, rewrites the link, and moves the file tomedia/<markdownRef>.<ext>. - Dual-Track Images & Preserved Blocks (
<!--ec:block ... -->): Plain images render as standard Markdown (Track A), while styled images (alignment,displayWidth) and custom blocks are wrapped in<!--ec:block ... -->comment fences (Track B) protected by Guard G9. Do not tamper with opaque comment fences. - Publishing Live (Guard G3): Promoting to
status: published(or publishing a draft revision on apublished*article) requires--allow-publish.
For the complete table of Safety Guardrails (G1βG24) and AST conversion rules, see docs/safety-guards-and-diagnostics.md and docs/markdown-and-ast.md.
Emit provides 17 top-level CLI commands (plus 10 subcommands under profile and conflicts). For all flags, parameters, and output examples, see docs/cli-and-mcp-reference.md.
| Command | Summary | Common Example |
|---|---|---|
emit init |
Initialize workspace (.emit/config.json, cache.db, .emit/.gitignore) or re-link a moved folder |
emit init / emit init --profile work |
emit profile |
Manage site profiles (list, add, current, set-token, remove, use) |
emit profile add blog --origin <url> --workspace . |
emit new <slug> |
Scaffold a new draft offline (or localized translation via --translation-of with Auto-Map) & G18 duplicate-slug guard |
emit new my-post -t "Title" -l ja -C tech -T ai |
emit new-term <tax> <slug> |
Stage a new category or tag term offline in <tax>/drafts/<locale>/ (auto-created & promoted on emit push) |
emit new-term tag typescript --name "TypeScript" -l ja |
emit update-term <tax> <tgt> |
Update an existing category or tag term (--name, --slug, --parent, --clear-parent, --description) and refresh local YAML |
emit update-term category news --name "γη₯γγ" -l ja |
emit pull [target] |
Pull sliding window (articles + taxonomies + referenced media) or a single article by ULID/path | emit pull / emit pull 01M6ABCDEF... |
emit push [file] |
Validate (G1βG24), promote drafts/ terms & images, acquire lock, 3-way merge, and push to EmDash |
emit push / emit push posts/ja/draft/20261104_01M6...md |
emit status |
Inspect workspace sync status (synced, published*, modified, untracked, invalid) & --i18n coverage matrix |
emit status --i18n / emit status --search "AI" |
emit diff [file] |
Show unified diff between local working file(s) and reconstructed baseline snapshot (omit [file] to diff all modified articles) |
emit diff / emit diff posts/ja/draft/20261104_01M6...md |
emit publish <target> |
Promote a staged remote draft (published*) or draft article to live published status |
emit publish 01M6ABCDEF... |
emit discard-draft <target> |
Discard a staged remote draft on a published article and re-pull the live version (G21) |
emit discard-draft 01M6ABCDEF... |
emit delete <target> |
Delete article locally & remotely after creating a .deleted.md backup in posts/conflicts/ |
emit delete <file> --allow-delete-published |
emit conflicts |
Inspect and resolve rescue copies in posts/conflicts/ (list, diff, resolve, prune) |
emit conflicts list / emit conflicts resolve <path> --accept-local |
emit doctor |
Run offline workspace health checks + opt-in probes (--check-auth, --check-media-library, --check-media-urls) |
emit doctor / emit doctor --check-auth |
emit article-search [q] |
Exhaustive 0-HTTP search across local Markdown and snapshot_articles (or keyword-only remote FTS via --live) |
emit article-search "Cloudflare" --tag ai --since 2026-01-01 / emit article-search "Cloudflare" --live |
emit media-search [q] |
Exhaustive 0-HTTP search across local mirrors and snapshot_media by keyword and date range |
emit media-search "header" --mirrored-only |
emit pull-taxonomies |
Standalone download of remote categories and tags into categories/<locale>/*.yaml and tags/<locale>/*.yaml |
emit pull-taxonomies |
emit pull-media |
Mirror media assets by --article <id>, --storage-key <key>, or bounded library window |
emit pull-media --article 01M6ABCDEF... |
emit snapshot |
Capture full-library metadata snapshot (articles, media, taxonomies) into cache.db and optionally cache media binaries |
emit snapshot --include-media / emit snapshot --status |
emit guide |
Print the concise Golden Path cheat sheet and AI safety rules to the console | emit guide |
emit mcp |
Launch Emit as a Model Context Protocol (MCP) stdio server for AI coding agents | emit mcp |
Emit includes a first-class stdio MCP server so AI coding agents (Google Antigravity, Claude Code / Claude Desktop, Cursor) can autonomously manage and author EmDash content.
{
"mcpServers": {
"emit": {
"command": "emit",
"args": ["mcp"]
}
}
}(If Emit is not installed globally, use "command": "npx", "args": ["-y", "emdash-emit", "mcp"].)
Every tool attaches structured _meta (profile, workspace, origin, resolvedBy) and returns actionable error codes and remediation hints. See docs/cli-and-mcp-reference.md for full parameter schemas.
| Tool | Purpose |
|---|---|
sync_status |
Inspect local workspace tracking status, summary counts, and actionRequired files |
sync_diff |
View unified diff between local working file and baseline snapshot |
sync_new |
Scaffold new draft article (or translationOf translation with locale Auto-Map) offline with canonical ULID, one-shot metadata, and taxonomy hints |
sync_new_term |
Stage a new category or tag term offline under categories/drafts/<locale>/ or tags/drafts/<locale>/ (auto-promoted on sync_push) |
sync_update_term |
Update an existing category or tag term (name, slug, parent, clearParent, description) and refresh local YAML mirrors |
sync_pull |
Pull batch sliding window (articles + taxonomies + referenced media), single article by id/filePath, or offline fromSnapshot: true |
sync_push |
Push local article changes with preflight guards (G1βG24), distributed lock, 3-way merge, drafts/ term promotion & media/drafts/* auto-upload |
sync_publish |
Promote a staged remote draft (published*) or draft article to live published status (enforces Guard G22) |
sync_discard_draft |
Discard a staged remote draft on a published article and re-pull the live version (enforces Guard G21) |
sync_delete |
Safely delete an article locally and remotely with .deleted.md rescue backup |
sync_conflicts |
list, diff, resolve, or prune quarantined rescue copies in posts/conflicts/ |
sync_doctor |
Run workspace diagnostics (offline by default; opt-in checkAuth, checkMediaLibrary, checkMediaUrls) |
sync_article_search |
Exhaustive 0-HTTP search across local Markdown and snapshot_articles (snapshotStatus framing), or keyword-only remote FTS with live: true |
sync_media_search |
Exhaustive 0-HTTP search across local mirrors and snapshot_media (snapshotStatus framing) by keyword and date range |
sync_pull_taxonomies |
Standalone sync of remote category and tag YAML definitions |
sync_pull_media |
Mirror media assets by article, storageKey, or bounded library window |
sync_push_media |
Upload standalone local image files (media/drafts/* or external) and/or sync alt/caption metadata |
sync_delete_media |
Delete unreferenced media assets with Guard G20 (MEDIA_IN_USE_PROTECTION) and media/_trash/ backup |
sync_snapshot |
capture, status, clear, or prune-cache for full-library metadata snapshots and opt-in media/_cache/ binaries in cache.db |
profile_list |
List all configured EmDash connection profiles and resolution rationale |
profile_switch |
Switch active session/default profile for multi-site environments |
Detailed specifications, subsystem designs, and troubleshooting guides are organized by domain boundary under docs/:
- Architecture, Layering & Infrastructure (
docs/architecture-and-layers.md) β 4-tier layering rules (Axes 0β9), Workspace Contracts, Profile/Auth/Origin resolution precedence, SQLitecache.dbschema (v9), and CLI/MCP presentation symmetry. - Sync Engine, Revisions & 3-Way Merge (
docs/sync-engine-and-revisions.md) β Modular Pull (6 stages) & Push (10 modules), Two-Track Revision model (revForTransportvsrevForComparison),published*draft revisions, distributed locks, Hybrid 3-Way Merge, andposts/conflicts/quarantine lifecycle. - Markdown, Frontmatter & Portable Text AST (
docs/markdown-and-ast.md) βFrontmatterSchema,parseMarkdownLenientself-healing, YAML scalar quoting, baseline reconstruction, Portable Text conversion, and Dual-Track Image Model (Tier 1 vs Tier 3<!--ec:block ... -->). - Local-First Media Pipeline (
docs/media-pipeline.md) βmedia/drafts/auto-upload & promotion,localMediaRefsrelative path localization,storageKeyToMarkdownRefmirror naming, and remote-authoritative media pruning. - Two Media ID Spaces:
idvsstorageKey(docs/media-id-spaces.md) β Authoritative specification of D1 recordidvs R2storageKey, endpoint lookup matrices, and migrated-corpus behavior. - Taxonomies (Two-Layer Representation) & Bylines (
docs/taxonomies-and-bylines.md) β Layer A percent-encoded slugs vs Layer B decoded CJK display, collision resolution, 0-GET deleted taxonomy auto-healing, pre-PUT remote taxonomy audit, and author bylines. - Safety Guardrails (G1βG24), Diagnostics, Search & Troubleshooting FAQ (
docs/safety-guards-and-diagnostics.md) β Complete G1βG24 guard table,emit doctorchecks, snapshot-first search rules (snapshotStatus), and Troubleshooting FAQ. - CLI Command & MCP Tool Complete Reference (
docs/cli-and-mcp-reference.md) β Full option reference and output examples for all 24 CLI commands (+10 subcommands) and 21 MCP tools. - npm Publish Guide (
docs/npm-publish-guide.md) & Historical Implementation Plans (docs/plans/) β Release workflow and archived design plans (v0.1.012βv0.1.046).
# Run unit test suite (Vitest)
npm test
# Run TypeScript strict typecheck (src + tests)
npm run typecheck
# Check circular dependencies (Madge)
npm run check:cycles
# Run complete CI verification gate (format:check + typecheck + check:cycles + test)
npm run checkThis project is open-source software licensed under the MIT License.
Copyright (c) 2026 SPORT-SERVICE RSβ
R. All rights reserved.