# Template.net templates versus K2F Gallery

In contrast, **K2F Gallery** ([k2f.dev/gallery](/gallery)) is a free, open-source repository of production-grade **document templates** built on the **K2F format** and distributed under the permissive **Apache 2.0** license. Engineered specifically for autonomous AI coding agents (such as Claude Code, Cursor, Codex, Manus, and Workbuddy), software engineers, and automated publishing pipelines, K2F Gallery delivers **agent document templates** that cleanly separate declarative semantic intent from deterministic geometry. Rather than distributing disconnected office binaries, static PDF exports, or closed cloud projects, K2F packages documents as machine-readable JSON Abstract Syntax Trees (AST) paired with immutable, pre-compiled render locks. This dual-state architecture enables autonomous software agents to inspect, edit, verify, and compile documents across multiple standard formats—including Microsoft Word (`.docx`), PowerPoint (`.pptx`), Adobe InDesign (`.idml`), and interactive AcroForm PDF—without human manual intervention, subscription paywalls, missing font errors, or visual layout drift.

K2F is not an open marketplace for stock photography, raster mockups, or social media video templates, nor is it an interactive drag-and-drop design tool. K2F v0.1 ships strictly with fixed `"paged"` canvas documents (native presentation slide canvas and infinite canvas modes are roadmap design targets), does not import proprietary desktop binaries or cloud templates (`INDD_IS_NOT_A_SOURCE`, `PSD_IS_NOT_A_SOURCE`, `AI_IS_NOT_A_SOURCE`), does not import pre-existing PDF files into State A (`PDF_IS_NOT_A_SOURCE`), lacks a drag-and-drop desktop GUI, and prohibits arbitrary Bézier vector drawing paths in State A JSON (basic shapes are decorated boxes via role and variant; complex graphics use external SVGs or raster images in `assets/images/`). Deliverables exported from K2F are unidirectional drawings rendered directly from the compiled render lock rather than round-trip sources of truth (`DOCX_IS_NOT_A_SOURCE`, `PPTX_IS_NOT_A_SOURCE`, `PDF_IS_NOT_A_SOURCE`, `IDML_IS_NOT_A_SOURCE`). In Word and PowerPoint exports, visual elements are drawn to match lock geometry rather than reflowable Office content controls. Agent outputs default to `UNSIGNED`, and while local CLI tooling (`pip install k2f`) and stdio MCP (`download_template`) are shipped, remote HTTP MCP services remain Not publicly specified.

## At a glance

| Decision factor | Template.net | K2F Gallery |
| :--- | :--- | :--- |
| **Primary audience** | Business professionals, legal teams, HR managers, marketers, and graphic designers seeking ready-made copy and multi-app template files | Autonomous AI coding agents, software engineers, and automated publishing pipelines |
| **Catalog scope & assets** | 1,000,000+ templates, graphics, stock assets, and design mockups spanning business, legal, financial, HR, marketing, social, and personal media | 469+ production-grade document templates focused purely on structured, multi-page business, legal, technical, and marketing documents |
| **Template format** | Disconnected native application files (`.docx`, `.pptx`, `.xlsx`, `.pages`, `.key`, `.idml`, `.psd`, `.ai`), static PDFs, and proprietary cloud editor canvas | Open, self-contained `.K2F` ZIP package containing a semantic JSON AST (`content/root.json`) and an immutable compiled render lock (`document.K2F.lock`) |
| **Agent edit path** | Headless automation barriers: no public REST API, Terms of Service ban automated scraping, no native MCP server; OOXML run fragmentation (`<w:r>`) and missing semantic IDs prevent reliable programmatic patching | Zero-auth HTTP GET `/api/gallery/templates/{slug}` or stdio MCP (`download_template`); direct full-tree JSON read/write via stable hierarchical dotted node IDs |
| **Command-line tooling** | Standalone local CLI or offline compiler is Not publicly specified; programmatic batch layout requires manual export or external automation | Native CLI (`pip install k2f`) and offline verification gate (`pack_verify.py`) for unpacking, local CPU compilation, and schema validation |
| **Published output** | Manual export to static PDF, Word, PowerPoint, or raster images from web editor or desktop apps; lacks synchronized multi-format engine | Single-source lock compilation exporting deterministically to pixel-aligned interactive AcroForm PDF, Microsoft Word (`.docx`), PowerPoint (`.pptx`), and Adobe InDesign (`.idml`) |
| **Microsoft Office support** | Native `.docx` and `.pptx` authored in Office; subject to cross-platform layout shifts (twip calculations, font metric mismatches); multi-app versions drift | Native direct export from compiled render lock to `.docx` and `.pptx`, drawing exact coordinates and glyph positions without OOXML run fragmentation; elements are lock drawings, not reflowable Office controls |
| **Fillable PDF forms** | Visual workarounds only (underlines `____`, table borders, square glyphs `□`); exports as flat vector lines requiring manual authoring in Adobe Acrobat Pro | Native `form_field` nodes compile directly into functional interactive PDF AcroForms (`/Tx`, `/Btn`) from a single source of truth |
| **Font handling & stability** | Fonts are not embedded; downloadable files rely on system/external fonts; missing fonts cause silent substitution, text reflow, and layout breaks | Self-contained package; TrueType/OpenType font binaries embedded in `assets/fonts/`; HarfBuzz shaping ensures bit-exact cross-platform rendering |
| **License & distribution** | Commercial subscription (Plus/Max) or restrictive Free tier (3 downloads/day, attribution); strict bans on resale, competing libraries, and automated access | Permissive open source (**Apache 2.0**); free and open catalog; zero login, no accounts, no credit cards, no paywalls, no watermarks, and no download quotas |
| **Verification & integrity** | No document layout contract, appearance hash, or compile-time geometry lock; rendering varies across host operating systems and software versions | Deterministic layout compilation (`k2f_layout`); cryptographic `content_hash` and `appearance_hash`; optional Ed25519 digital signatures; viewer integrity banners (`SIGNED`, `UNSIGNED`, `SIGNED_BUT_BROKEN`, `BROKEN_INTEGRITY`, `UNLOCKED`) with `ENGINE_MISMATCH` detection |
| **Version control & diffs** | Git treats downloaded files as opaque binary ZIPs (`.docx`, `.idml`, `.psd`); web editor revisions are locked in proprietary cloud storage | Git-native Canonical JSON (sorted keys, 2-space indentation); readable line-by-line diffs; optional `changelog.json` |
| **Pricing model** | Paid subscription ($2–$8+/mo Plus billed annually, Max for teams), or free tier limited to 3 downloads/day with watermarks/attribution | Completely free public repository; zero cost for human users and automated software agents |
| **Source of truth boundary** | Disconnected working copies; editing a Word file does not update the InDesign or cloud version; exported PDFs are static and non-editable | `.K2F` is sole source of truth; K2F does not import binary templates or PDFs; exported Office, PDF, and IDML files are unidirectional read-only lock drawings (`*_IS_NOT_A_SOURCE`) |

## Template.net vs K2F Gallery: What Template.net offers

Template.net operates as an extensive commercial digital asset library and creative productivity hub. Established to provide pre-designed documents, agreements, and collateral for business operations, its repository encompasses more than 1 million templates, stock graphics, and design mockups categorized across major industry domains:

- **Legal & Business Documentation:** Non-disclosure agreements (NDAs), partnership agreements, employment contracts, commercial and residential leases, independent contractor agreements, corporate bylaws, board resolutions, corporate compliance policies, and employee handbooks.
- **Corporate Proposals & Management Reports:** Business proposals, formal project charters, business plans, feasibility studies, pitch presentations, executive summaries, meeting agendas, and formal corporate minutes.
- **Financial & Sales Operations:** Quotations, estimates, commercial invoices, billing statements, purchase orders, sales receipts, expense reports, and budget worksheets.
- **Human Resources & Career:** Job descriptions, candidate offer letters, formal termination notices, employee onboarding checklists, performance appraisals, ATS-optimized resumes, and curriculum vitae (CV).
- **Marketing & Print Collateral:** Tri-fold and bi-fold brochures, promotional flyers, posters, corporate business cards, letterheads, brand identity packages, certificates of appreciation/completion, restaurant menus, product catalogs, and rack cards.
- **Social Media & Digital Advertising:** Instagram posts and stories, Facebook ad banners and covers, LinkedIn post graphics and banners, YouTube thumbnails, Pinterest graphics, and digital web display advertisements.
- **Planners & Personal Media:** Printable and digital daily, weekly, and monthly planners, habit trackers, meal planners, wedding stationery, event invitations, greeting cards, and recipe sheets.

### Underlying application ecosystems and file formats

To support a wide spectrum of corporate workflows, Template.net provides downloads tailored for multiple desktop productivity and design ecosystems:
- **Microsoft Office Suite:** Formatted Microsoft Word (`.docx`, `.doc`) documents, PowerPoint (`.pptx`, `.ppt`) slide decks utilizing master slide layouts, and Excel (`.xlsx`, `.xls`) calculation spreadsheets.
- **Google Workspace:** Direct cloud copy links for Google Docs, Google Slides, and Google Sheets.
- **Apple iWork:** Native Apple Pages (`.pages`), Apple Keynote (`.key`), and Apple Numbers (`.numbers`) documents for macOS and iOS environments.
- **Adobe Creative Cloud:** Multi-page Adobe InDesign (`.indd`, `.idml`) publication layouts, layered Adobe Photoshop (`.psd`) raster mockups with smart objects, and Adobe Illustrator (`.ai`, `.eps`) vector graphic assets.
- **Web & Graphic Formats:** Scalable Vector Graphics (`.svg`), Portable Network Graphics (`.png`), JPEG, and animated `.gif` assets.
- **Template.net Online Editor:** A proprietary, in-browser WYSIWYG canvas editor that enables users to customize, format, and render documents entirely within a web browser without installing desktop software.

### The standalone PDF and fillable form reality

A close technical examination of Template.net's deliverables reveals important constraints for enterprise and digital workflows:
- **Static, post-layout PDF captures:** Template.net distributes downloadable PDF versions for many documents, and its browser editor allows direct PDF exports. However, these files are static print captures generated from Microsoft Word, Adobe InDesign, or browser HTML5 canvas printing subsystems. There is **no native, semantically editable master PDF template format**. Once downloaded, the document becomes a flat stream of static vector path instructions (`re`, `m`, `l`) and pre-rendered glyph placements (`Tj`) that cannot be programmatically reflowed or structured without destructive reverse-engineering.
- **Absence of native interactive AcroForm fields:** While Template.net provides thousands of visual forms—such as employment applications, medical intake questionnaires, rental agreements, client intake forms, and inspection checklists—these files rely on standard visual workarounds in downloadable DOCX, Pages, or PDF formats. Form fields are represented by table grid borders, underlined blank lines (`___________`), or empty square Unicode characters (`□`). When exported to PDF, these elements render as flat vector lines and static text rather than interactive PDF AcroForm fields (`/Tx` text inputs, `/Btn` checkboxes or radio buttons, `/Sig` signature fields). Converting a Template.net form into a functional, fillable digital form requires manual, post-hoc authoring inside specialized software like Adobe Acrobat Pro.
- **Decoupled multi-format maintenance:** When a template title is offered across multiple formats (such as Word, InDesign, and Google Docs), each file is a completely decoupled asset manually crafted by different graphic artists. Modifications made to the Word version do not propagate to the InDesign or Pages files, resulting in visual and typographic divergence across formats.

### Font handling and layout drift

Template.net's downloadable source files do not embed font binaries by default:
- **Font substitution risk:** Downloadable `.docx`, `.pptx`, `.pages`, and `.idml` files rely on external system typefaces or third-party fonts (such as Google Fonts). When opened on a computer lacking the specified fonts, the host operating system or word processor silently substitutes default fallback typefaces (e.g., Arial, Times New Roman, or Minion Pro).
- **Layout reflow:** Because fallback fonts feature different horizontal metrics, kerning tables, and vertical ascender/descender measurements, font substitution frequently causes unexpected text reflow, broken line wraps, misaligned table cells, and unwanted page count expansion.
- **Stock asset restrictions:** Templates incorporate decorative photography and icons. On free tier downloads, high-resolution stock photography is often watermarked, replaced with low-resolution placeholders, or omitted, requiring users to source external commercial imagery independently.

### Licensing, pricing, and redistribution terms

Access and usage rights on Template.net are governed by its universal Terms of Service and End User License policies:
- **Permitted usage rights:** Users receive a limited, non-exclusive, non-transferable license to customize and reproduce templates for personal, educational, and internal business deliverables (such as client proposals, commercial contracts, corporate presentations, and marketing collateral).
- **Subscription tiers:**
  - *Free Tier:* Provides basic access to select templates and the online editor, with 100 MB of cloud storage. Downloads are strictly limited to **3 downloads per day** and may mandate attribution or include Template.net branding/watermarks.
  - *Plus Plan:* Paid subscription offering 5,000 AI credits/month, access to 1 million+ premium templates, 100 GB cloud storage, watermark removal, brand kits, and commercial licensing for finished assets, with entry promotional pricing starting around $2 to $8 USD/month (billed annually).
  - *Max Plan:* Geared toward corporate teams, providing 50,000 AI credits/month, 1 TB cloud storage, real-time team collaboration tools, shared brand kits, centralized asset management, and priority support.
- **Strict redistribution and resale bans:** Users are explicitly prohibited from reselling, sublicensing, distributing, sharing, or transferring Template.net templates, design tools, or raw stock assets as standalone digital files.
- **Competing marketplace prohibition:** The terms strictly forbid utilizing Template.net assets or AI-generated outputs to build, populate, or operate competing template directories, digital asset libraries, or design marketplaces.
- **Anti-scraping restrictions:** The Terms of Service ban automated scraping, web crawling, data harvesting, or programmatic extraction of templates, graphics, or site content outside authorized interfaces.
- **Enterprise deployment boundaries:** Template.net does not provide an open-source, on-premise, or self-hosted deployment engine for internal corporate document pipelines.
- **Update notifications:** Automated webhook notifications for asset updates are Not publicly specified.

### Customization workflow and generative AI

Customizing an asset on Template.net follows a human-centric visual workflow:
1. **Search and filtering:** Users search the web catalog, filtering by software compatibility (Word, Google Docs, InDesign, Photoshop, Pages, etc.).
2. **Editing path:**
   - *Online WYSIWYG Editor:* Users click "Edit Online" to launch the browser canvas, where they click into text boxes to rewrite placeholder copy, drag and drop stock photography, alter color palettes, and rearrange visual elements.
   - *Desktop Software:* Users click "Download" to save native files (`.docx`, `.pptx`, `.idml`, `.psd`) for offline editing inside Microsoft Office, Adobe Creative Cloud, or Apple iWork.
3. **Integrated Generative AI:** The platform integrates built-in generative AI drafting tools directly into its browser workspace across 20+ languages:
   - *AI Document Generator:* Creates draft business plans, reports, contracts, and proposals from natural language prompts.
   - *AI Presentation Generator:* Builds multi-slide pitch decks and educational presentations.
   - *AI Writer:* Generates professional paragraphs, emails, and resume bullet points.
   - *AI Design Generator:* Produces social graphics and marketing banners based on text prompts.
4. **Delivery channels:** Users export finished documents from the browser editor in PDF, DOCX, PPTX, JPG, PNG, or SVG formats, generate cloud view links for online review, or print directly via desktop applications.

## What K2F Gallery adds

K2F Gallery ([k2f.dev/gallery](/gallery)) provides an open-source, machine-readable repository of 469+ production-grade **document templates** engineered specifically for automated software workflows and autonomous AI coding agents. Built on the open **K2F format** and distributed under the permissive **Apache 2.0** license, K2F Gallery enables software developers, publishing pipelines, and AI assistants to discover, customize, verify, and export pixel-stable publications without commercial paywalls, account registration, or desktop application lock-in:

- **Free and open access:** K2F Gallery requires zero login, no user registration, no API keys, no paywalls, no credit cards, no watermarks, and no download quotas. Anyone or any automated agent can download and utilize templates immediately under the Apache 2.0 license.
- **Structured document taxonomy:** Templates are organized across 7 major gallery groups encompassing 20 distinct document kinds:
  - `docs`: structured reports ([`/gallery/docs/report`](/gallery/docs/report)), corporate proposals ([`/gallery/docs/proposal`](/gallery/docs/proposal)), research papers, interactive forms ([`/gallery/docs/form`](/gallery/docs/form)), memos, newsletters, documentation guides, and books.
  - `presentations`: presentation slide decks ([`/gallery/presentations/presentation`](/gallery/presentations/presentation)).
  - `print-marketing`: marketing flyers ([`/gallery/print-marketing/flyer`](/gallery/print-marketing/flyer)), folded brochures ([`/gallery/print-marketing/brochure`](/gallery/print-marketing/brochure)), restaurant menus, formal certificates ([`/gallery/print-marketing/certificate`](/gallery/print-marketing/certificate)), business letters ([`/gallery/print-marketing/letter`](/gallery/print-marketing/letter)), posters, greeting cards, and infographics.
  - `planners`: daily and weekly productivity planners and educational worksheets.
  - `business`: corporate invoices ([`/gallery/business/invoice`](/gallery/business/invoice)) and legal contracts ([`/gallery/business/legal`](/gallery/business/legal)).
  - `career`: structured resumes and CVs ([`/gallery/career/cv`](/gallery/career/cv)).
  - `digital`: social media marketing assets.

### The dual-state .K2F package architecture

Every template in K2F Gallery is packaged as an open, self-contained ZIP archive encapsulating two synchronized, mathematically linked representations:

- **State A (semantic tree):** Located at `content/root.json` (with support for modular multi-file includes via `{ "include": "content/...." }` in container `children`). State A contains pure semantic nodes tagged with mandatory, hierarchical dotted IDs (`parent_id.child_type_semantic_name`, e.g., `doc.header.title`, `invoice.items_table.row_1`, `form.applicant.signature`), closed-enum structural roles (`h1`, `card`, `warning`, `form_field`), optional `variant` tags, and semantic `modifiers` (such as inline emphasis, links, or math) bound to exact UTF-8 byte ranges (`range: [start, end]`). **Strict Rule**: Visual styling lives exclusively in `styles/theme.json` and is strictly forbidden on individual nodes; placing inline style fields on a node is the single most common compilation failure.
- **State C (render lock):** Located at `document.K2F.lock`. Produced exclusively by the reference engine (`k2f_layout` and `k2f_paint`), State C is an immutable geometry manifest storing exact millipoint coordinates, glyph positioning calculated via HarfBuzz text shaping (`rustybuzz`), Unicode UAX #14 line breaks, NFC string normalization, and deterministic paint operations (fills, strokes, gradients, box shadows, blurs) in explicit draw order. The reference engine is an external compilation pipeline implemented in Rust, not an on-disk file inside the `.K2F` package.
- **Self-contained assets and theming:** The package embeds all required TrueType/OpenType font files directly in `assets/fonts/`, visual images in `assets/images/`, tabular data in `assets/data/`, canvas presets in `manifest.json`, and all design tokens (color palettes, font stacks, and named box decoration primitives) in `styles/theme.json`.

### Strict intent–presentation separation and global restyling

Because content semantics and visual styling are strictly separated, restyling a K2F document is completely deterministic. Rather than manually clicking through hundreds of text frames to update fonts or colors, an author or AI agent modifies named tokens in `styles/theme.json` (such as switching palette colors, typography scales, or border radiuses). Recompiling the package via the reference engine (`f(content, theme) → geometry`) recalculates the render lock with zero coordinate drift, overlapping frames, or broken margins.

### Single-source multi-format delivery

While Template.net distributes separate, disconnected files for Word, InDesign, and PowerPoint (which drift apart when edited), K2F serves as a unified master source that renders four production deliverable formats directly from the exact same compiled render lock:

1. **Microsoft Word (`.docx`):** Direct Word export rendered from the compiled render lock, drawing exact coordinates and glyph positions to preserve layout geometry, typography, and text content without OOXML run fragmentation or pagination shifts.
2. **Microsoft PowerPoint (`.pptx`):** Widescreen slide decks rendered directly from presentation templates.
3. **Adobe InDesign (`.idml`):** Clean InDesign Markup Language packages complete with an accompanying `Document Fonts/` directory containing all embedded font binaries, bridging automated agent workflows directly into human prepress finishing.
4. **Interactive AcroForm PDF:** High-resolution PDF documents where semantic `form_field` nodes compile directly into standard, fillable PDF form controls (text inputs, checkboxes, signature areas).

Deliverables exported from K2F are unidirectional drawings rendered from the compiled lock rather than round-trip sources of truth (`DOCX_IS_NOT_A_SOURCE`, `PPTX_IS_NOT_A_SOURCE`, `PDF_IS_NOT_A_SOURCE`, `IDML_IS_NOT_A_SOURCE`). In Word and PowerPoint, exported elements are drawn from lock coordinates and glyph positions rather than reflowable Office content controls.

### The agent authoring loop (unpack → design.md → edit → pack_verify)

K2F Gallery templates are built for autonomous AI agents operating in local developer environments (Cursor, Claude Code, Codex, Manus, Workbuddy) using the official K2F CLI (`pip install k2f`):

1. **Unpack:** The agent unpacks a downloaded package using `k2f unpack template.K2F -o ./source` (or initializes a starter workspace via `scripts/init_package.py --workspace ./out/doc`), extracting editable State A files, theme tokens, and assets while omitting compiled locks.
2. **Design specification:** Agents write a concrete Markdown design specification (`source/design.md`) establishing typography, role hierarchies, line rhythm, spacing grids, and palette intent before altering JSON files.
3. **Semantic editing:** The agent edits `content/root.json` and `styles/theme.json` as clean, readable code. Edits target exact node IDs. Golden structural components are copied from the catalog dictionary (`catalog/content/ex_*.json`) into `children` without inventing custom schema fields. Interactive fields are copied from `catalog/content/ex_form.json` rather than hand-drawing underscores (`____`) or square glyphs (`□`). Modifier byte ranges are computed via `scripts/modifier_range.py`.
4. **Pack and compile:** The agent executes `python scripts/pack_verify.py ./source -o ./doc.K2F --render preview.png`, invoking `k2f pack` and `k2f compile`. The engine executes deterministic two-pass layout (`f(content, theme) → geometry`), binds appearance hashes, compiles `document.K2F.lock`, and validates schema conformity against embedded JSON schemas (`/schema/`).
5. **Verification gate:** `pack_verify.py` asserts expected page counts (`--expect-pages N`), validates structural integrity (confirming default `UNSIGNED` state for machine edits), and renders pixel-accurate PNG preview sheets (`preview-1.png`).
6. **Visual regression check:** Automated checks inspect the rendered preview for visual anomalies—specifically catching empty lower-third paper (`PAGE_UNDERFILL` / `LAYOUT_SLACK`) and requiring agents to pin the page shell using `ex_filled_page.json` before completing the task.

Every template page on k2f.dev (`/gallery/{slug}`) embeds `<k2f-viewer>` (the WebAssembly component from `@openk2f/k2f`), links to the in-browser [Playground](/playground), provides multi-format download buttons, and displays a copyable prompt for coding assistants:
```text
Use the K2F skill to create a [describe what you want] using template https://k2f.dev/gallery/{slug}. Install with npx skills add suzheng/k2f --skill k2f if needed.
```

### Cryptographic trust and compliance

Every `.K2F` package computes a cryptographic `content_hash` over the semantic tree and an `appearance_hash` binding content, theme tokens, embedded font binaries, canvas settings, and the reference engine commit SHA (`engine_commit_sha`). Packages support optional asymmetric **Ed25519 digital signatures** (`signatures/v1.json`). Official viewers enforce a mandatory integrity banner displaying canonical states (`SIGNED`, `UNSIGNED`, `SIGNED_BUT_BROKEN`, `BROKEN_INTEGRITY`, `UNLOCKED`), while flagging any runtime layout engine discrepancies (`ENGINE_MISMATCH`). Machine edits default to `UNSIGNED`. Packages strictly prohibit executable scripts, macros, or dynamic external network requests, meeting enterprise legal, financial, and regulatory compliance requirements.

## Head-to-head

### Acquisition

Acquiring templates from Template.net is designed around a consumer web marketplace. Users navigate a web portal, browse graphic categories, manage subscription quotas (or a free limit of 3 downloads per day), and download ZIP files manually. Programmatic access faces significant hurdles:
- **No public REST API:** Template.net offers no publicly accessible production REST API or GraphQL endpoint to search, query, or download templates. While a Developer Early Access Program has been announced, it remains restricted to a closed waitlist accessible only by contacting `api@template.net`.
- **Anti-bot protections:** Template downloads are protected behind user authentication sessions, dynamic CSRF tokens, Cloudflare bot-management barriers, and download entitlement verification.
- **Terms of Service automation ban:** Automated scraping or programmatic bulk downloading violates the platform's Terms of Service and triggers IP-level rate-limiting or account suspension.
- **No MCP server:** There is zero Model Context Protocol (MCP) server support for Template.net, leaving autonomous AI coding assistants with no mechanism to discover or retrieve assets headlessly.

K2F Gallery operates on an open-access distribution model. Users visit [K2F Gallery](/gallery) and download `.K2F` author packages, Word (`.docx`), PowerPoint (`.pptx`), InDesign (`.idml`), or fillable AcroForm PDF files with a single click, completely free of charge, with zero login, no account registration, and no download quotas. For automated software pipelines and AI coding assistants, K2F Gallery provides zero-auth programmatic endpoints via standard HTTP `GET` requests:
```text
https://k2f.dev/api/gallery/templates/{slug}
https://k2f.dev/api/gallery/templates/{slug}/docx
https://k2f.dev/api/gallery/templates/{slug}/pptx
```
Alternatively, local AI agents can invoke the stdio MCP tool (`download_template`) to retrieve template packages directly into their workspace. Because the entire catalog is licensed under Apache 2.0, organizations own their templates outright, can store them in local Git repositories, and can redistribute them without commercial licensing constraints.

### Editing

Editing a Template.net template is a visual, human-centric process. In the browser editor, users manipulate text boxes, adjust colors, and reposition visual elements on a drag-and-drop canvas. In desktop applications, users manually replace placeholder text in Word, PowerPoint, or InDesign. This workflow encounters significant structural friction when automated:
- **OOXML run fragmentation:** In Word (`.docx`) files, sentences are frequently fragmented across multiple arbitrary inline XML runs (`<w:r><w:t>Term</w:t></w:r><w:r><w:t>ination Clause</w:t></w:r>`). When an AI agent attempts regex replacements or text insertions, it frequently breaks XML boundaries and triggers fatal Word schema recovery errors.
- **Lack of semantic IDs:** Word and PowerPoint elements lack persistent, machine-addressable semantic IDs. Paragraphs carry ephemeral hex identifiers (e.g., `w14:paraId="7F2A190B"`) that regenerate on save and convey zero semantic meaning.
- **Opaque binary design files:** Adobe Photoshop (`.psd`) and Illustrator (`.ai`) files are proprietary binary blobs completely inaccessible to text-based AI agent mutation. InDesign (`.idml`) files feature tightly coupled geometric spreads that break without the proprietary Adobe InDesign composition engine.
- **Opaque version control:** Committing downloaded `.docx`, `.pptx`, or `.idml` files to Git produces binary diffs (`Binary files differ`), preventing pull request reviews or automated CI/CD linting.

Editing in K2F Gallery is code-first, semantic, and machine-friendly. After running `k2f unpack`, the template expands into clean Canonical JSON files with sorted keys and 2-space indentation. Authors or AI agents edit content in `content/root.json` by targeting stable, hierarchical dotted IDs (`doc.header.title`, `invoice.items_table.row_1`, `form.applicant.signature`). Because visual styling is quarantined entirely in `styles/theme.json`, changing text never accidentally shifts margins, corrupts padding, or breaks layout grids. All required fonts are embedded directly within `assets/fonts/`, eliminating font sync failures entirely. Changes are tracked seamlessly in standard Git repositories, enabling precise line-by-line diffs, pull requests, and automated testing pipelines. Recompiling the package deterministically locks geometry via HarfBuzz shaping without requiring human spatial adjustments. Note that K2F is not designed for interactive visual sketching or casual drag-and-drop human drafting; it relies on structured semantic editing and deterministic engine compilation.

### Publishing

Publishing from Template.net templates depends entirely on human-operated desktop software or proprietary cloud rendering. In the online editor, documents export to PDF, DOCX, PPTX, or image formats via server-side HTML5 canvas conversions. In desktop applications, users print locally or export to high-resolution print PDF. However, Template.net exhibits notable publishing fragmentation:
- **Dynamic cross-platform reflow:** Microsoft Word, Google Docs, and Apple Pages compute layout geometry dynamically at runtime based on installed system fonts, screen DPI, font rasterizers (DirectWrite on Windows, CoreText on macOS, FreeType on Linux), and the active printer driver. A two-page proposal downloaded from Template.net can easily reflow into three pages with orphaned headings on a different workstation.
- **Format drift in multi-format titles:** Because Template.net’s Word, InDesign, and Pages files are separate assets, updating text or styling in one format leaves the other deliverables out of date.
- **Non-interactive form exports:** Visual forms exported from Template.net render as flat vector lines and static text, requiring manual post-processing in Adobe Acrobat Pro to create fillable fields.

K2F Gallery utilizes a single-source publishing model driven by its compiled render lock (`document.K2F.lock`). Because client viewers—including the WebAssembly `<k2f-viewer>` web component, Desktop Reader, and export filters—paint the render lock directly without reflowing text, document appearance remains strictly identical across all environments. A single `.K2F` package outputs four production formats simultaneously: pixel-aligned Microsoft Word (`.docx`), PowerPoint (`.pptx`), Adobe InDesign (`.idml`) packages with embedded fonts, and interactive AcroForm PDFs with real fillable inputs. Published documents carry cryptographic `content_hash` and `appearance_hash` values that prove visual fidelity down to the layout engine commit SHA, alongside optional Ed25519 digital signatures and mandatory viewer integrity banners. K2F v0.1 does not, however, support video templates, motion graphics, or photorealistic raster mockups.

### Agents

The agent experience highlights the core architectural divide between the two systems. Template.net is isolated from autonomous AI coding agents by the **headless automation barrier**:
- **No headless local compiler:** Template.net provides no command-line compiler, no Python package (`pip install template-net`), and no standalone local binary that an agent can execute locally on CPU to compile, validate, or render documents.
- **Prohibitive cloud infrastructure:** Compiling or rendering a modified Template.net document programmatically requires driving heavyweight third-party software (such as headless Chromium instances or Windows COM automation for Microsoft Office).
- **Closed cloud format:** Documents customized within Template.net's online editor reside in an undocumented, proprietary cloud format hosted on Template.net servers, inaccessible to external AI agents.
- **Absence of schema validation:** Template.net files provide no automated JSON schema against which an agent can validate its edits to ensure structural, typographic, or design consistency before committing changes.

K2F Gallery was engineered from day one for autonomous AI agents:
- **Zero-auth programmatic access:** Agents fetch raw `.K2F` packages headlessly via standard HTTP `GET` requests to `/api/gallery/templates/{slug}` or via the stdio MCP tool (`download_template`) with zero API keys, OAuth flows, or paid quotas.
- **Machine-readable JSON AST:** Unpacking a template yields clean JSON with stable, hierarchical dotted IDs. Agents address and patch specific content nodes (e.g., updating `invoice.items_table.row_1.total`) with exact precision.
- **Local compilation and zero-cost quality gates:** Agents compile documents, shape text via HarfBuzz, lock geometry, validate schemas, and render PNG preview sheets locally on their CPU in milliseconds using `pack_verify.py` and the reference CLI (`pip install k2f`). No cloud API calls, subscription fees, or network latencies are incurred.
- **Self-correcting feedback loops:** When an agent introduces an error, the compiler outputs structured machine-readable error codes (`SCHEMA_INVALID`, `UNKNOWN_ID`, `PAGE_UNDERFILL`), providing the agent with the exact feedback needed to autonomously repair the document before publishing.

## When to choose Template.net

Choose Template.net when your priority is immediate access to pre-drafted business copy, massive asset volume, and visual editing across established office and graphic software:

- **Need for pre-drafted legal and business copy:** You require turnkey contracts, employment agreements, corporate policies, or proposal structures with professional boilerplate language already drafted, eliminating the need to write legal or corporate text from scratch.
- **Massive catalog depth across diverse niches:** You need access to an expansive library of more than 1 million templates spanning specialized industry domains—such as medical intake forms, construction change orders, real estate closing packets, wedding stationery, and restaurant menus.
- **Multi-app native file workflows:** Your team works across varied commercial applications—including Microsoft Word, PowerPoint, Excel, Google Docs, Apple Pages, Apple Keynote, Adobe InDesign, Photoshop, and Illustrator—and prefers native file formats for manual desktop customization.
- **Browser-based WYSIWYG editing with generative AI:** You want non-technical team members to edit documents visually in a web browser, leveraging built-in generative AI tools (AI Document Generator, AI Writer, AI Presentation Generator) to draft text and create layouts without installing local software.
- **Integrated marketing and social media collateral:** You need to produce diverse marketing collateral, social media banners, YouTube thumbnails, and print promotional items alongside standard business documents within a single commercial subscription.

## When to choose K2F Gallery

Choose K2F Gallery when your workflow demands autonomous AI agent authoring, strict cross-device layout determinism, open-source ownership, and single-source multi-format delivery:

- **Autonomous AI agent document generation:** You utilize AI coding assistants (Claude Code, Cursor, Codex, Manus, Workbuddy) or automated software backends to generate, customize, patch, or restyle production documents programmatically using stable dotted IDs without human pre-tagging.
- **Single-source multi-format enterprise publishing:** You must maintain a single authoritative template package that exports deterministically into pixel-aligned Microsoft Word (`.docx`), PowerPoint (`.pptx`), Adobe InDesign (`.idml`), and interactive AcroForm PDF files from a single compiled render lock.
- **Native Microsoft Office delivery:** You need high-fidelity Word and PowerPoint deliverables and cannot tolerate the fragmented text boxes, broken tables, and altered typography caused by lossy PDF-to-Office conversion tools.
- **Deterministic cross-device visual stability:** You require documents that render with bit-exact consistency across macOS, Windows, Linux, and web browsers, backed by pre-calculated HarfBuzz text shaping, embedded font binaries, and render lock painting.
- **Zero-auth, open-source adoption:** You require free, unrestricted access to production templates under the Apache 2.0 license, with zero subscription fees, no accounts, no credit cards, no watermarks, and no download quotas.
- **Git-native version control and CI/CD pipelines:** You want documents stored as clean Canonical JSON files that can be versioned in Git repositories, reviewed line-by-line in pull requests, and compiled in automated sub-second CI/CD pipelines.
- **Local compilation and complete data privacy:** You need an authoring and compilation pipeline that runs entirely offline on local CPU hardware via lightweight command-line tools (`k2f pack`, `pack_verify.py`), ensuring proprietary or regulated data never leaves your environment.
- **Tamper-evident legal and financial compliance:** You publish documents requiring mathematical proof of integrity via cryptographic `content_hash`, `appearance_hash`, optional Ed25519 digital signatures, and mandatory viewer integrity banners.
- **Interactive fillable PDF generation:** You need to produce applications, intake forms, contracts, or sign-off sheets where semantic `form_field` nodes compile directly into standard interactive AcroForm PDF controls without post-processing in Adobe Acrobat Pro.

## Bottom line

Template.net and K2F Gallery address two distinct stages and paradigms of modern document production. Template.net remains an expansive, human-centric creative repository for professionals and businesses seeking pre-drafted legal agreements, multi-application office files, and browser-based visual editing backed by generative AI. However, its reliance on disconnected binary files, un-embedded fonts, commercial paywalls, bot-defense barriers, and the lack of a headless compiler or public API prevent it from serving as a viable foundation for autonomous AI coding agents or automated publishing pipelines.

K2F Gallery provides an open, agent-native document catalog engineered specifically for programmatic authoring. By providing free, Apache 2.0-licensed `.K2F` packages that cleanly decouple semantic JSON trees from deterministic render locks, K2F enables AI coding assistants to discover templates headlessly, patch content with pinpoint accuracy, verify visual quality locally in milliseconds, and compile single-source deliverables across Word, PowerPoint, InDesign, and fillable PDF.

To explore ready-to-use production templates across business, legal, marketing, and publishing categories, browse the [Gallery](/gallery) on [k2f.dev](https://k2f.dev). For technical specifications, format documentation, and layout engine architecture, visit the [documentation](/docs) or experiment with templates directly in the interactive [Playground](/playground). To understand the architectural motivation behind the format, read [why K2F exists](/why), or explore how K2F compares to other publishing standards on [Compare](/compare) (such as [Envato Elements versus K2F Gallery](/compare/envato-elements), [Freepik Templates versus K2F Gallery](/compare/freepik-templates), [Creative Market versus K2F Gallery](/compare/creative-market), [Adobe Stock Templates versus K2F Gallery](/compare/adobe-stock-templates), [Microsoft Create versus K2F Gallery](/compare/microsoft-create), [Canva Templates versus K2F Gallery](/compare/canva-templates), [Adobe Express Templates versus K2F Gallery](/compare/adobe-express-templates), [Adobe InDesign versus K2F](/compare/idml), [PDF versus K2F](/compare/pdf), [Word versus K2F](/compare/docx), [PowerPoint versus K2F](/compare/pptx), and [Typst versus K2F](/compare/typst)).

This comparison is based on publicly available information at the time of writing. Capabilities, pricing, and policies may change; verify details with the relevant provider.
